(() => {
"use strict";
var __webpack_modules__ = ({
"./node_modules/@fluentui/dom-utilities/lib/elementContains.js":
/*!*********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/elementContains.js ***!
\*********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
elementContains: () => (elementContains)
});
/* import */ var _getParent__rspack_import_0 = __webpack_require__(/*! ./getParent */ "./node_modules/@fluentui/dom-utilities/lib/getParent.js");
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
function elementContains(parent, child, allowVirtualParents) {
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
var isContained = false;
if (parent && child) {
if (allowVirtualParents) {
if (parent === child) {
isContained = true;
}
else {
isContained = false;
while (child) {
var nextParent = (0,_getParent__rspack_import_0.getParent)(child);
if (nextParent === parent) {
isContained = true;
break;
}
child = nextParent;
}
}
}
else if (parent.contains) {
isContained = parent.contains(child);
}
}
return isContained;
}
//# sourceMappingURL=elementContains.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/elementContainsAttribute.js":
/*!******************************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/elementContainsAttribute.js ***!
\******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
elementContainsAttribute: () => (elementContainsAttribute)
});
/* import */ var _findElementRecursive__rspack_import_0 = __webpack_require__(/*! ./findElementRecursive */ "./node_modules/@fluentui/dom-utilities/lib/findElementRecursive.js");
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
function elementContainsAttribute(element, attribute, doc) {
var elementMatch = (0,_findElementRecursive__rspack_import_0.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);
}
//# sourceMappingURL=elementContainsAttribute.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/findElementRecursive.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/findElementRecursive.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
findElementRecursive: () => (findElementRecursive)
});
/* import */ var _getParent__rspack_import_0 = __webpack_require__(/*! ./getParent */ "./node_modules/@fluentui/dom-utilities/lib/getParent.js");
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body || element instanceof Document) {
return null;
}
return matchFunction(element) ? element : findElementRecursive((0,_getParent__rspack_import_0.getParent)(element), matchFunction);
}
//# sourceMappingURL=findElementRecursive.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/getActiveElement.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/getActiveElement.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getActiveElement: () => (getActiveElement)
});
var getActiveElement = function (doc) {
var ae = doc.activeElement;
while (ae === null || ae === void 0 ? void 0 : ae.shadowRoot) {
ae = ae.shadowRoot.activeElement;
}
return ae;
};
//# sourceMappingURL=getActiveElement.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/getEventTarget.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/getEventTarget.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getEventTarget: () => (getEventTarget)
});
var getEventTarget = function (event) {
var target = event.target;
if (target && target.shadowRoot) {
target = event.composedPath()[0];
}
return target;
};
//# sourceMappingURL=getEventTarget.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/getParent.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/getParent.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getParent: () => (getParent)
});
/* import */ var _getVirtualParent__rspack_import_0 = __webpack_require__(/*! ./getVirtualParent */ "./node_modules/@fluentui/dom-utilities/lib/getVirtualParent.js");
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
function getParent(child, allowVirtualParents) {
var _a, _b;
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
if (!child) {
return null;
}
var parent = allowVirtualParents && (0,_getVirtualParent__rspack_import_0.getVirtualParent)(child);
if (parent) {
return parent;
}
// Support looking for parents in shadow DOM
if (typeof child.assignedElements !== 'function' && ((_a = child.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentNode)) {
// Element is slotted
return child.assignedSlot;
}
else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) {
// nodeType 11 is DOCUMENT_FRAGMENT
// Element is in shadow root
return child.parentNode.host;
}
else {
return child.parentNode;
}
}
//# sourceMappingURL=getParent.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/getVirtualParent.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/getVirtualParent.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getVirtualParent: () => (getVirtualParent)
});
/* import */ var _isVirtualElement__rspack_import_0 = __webpack_require__(/*! ./isVirtualElement */ "./node_modules/@fluentui/dom-utilities/lib/isVirtualElement.js");
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
function getVirtualParent(child) {
var parent;
if (child && (0,_isVirtualElement__rspack_import_0.isVirtualElement)(child)) {
parent = child._virtual.parent;
}
return parent;
}
//# sourceMappingURL=getVirtualParent.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/isVirtualElement.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/isVirtualElement.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
isVirtualElement: () => (isVirtualElement)
});
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
function isVirtualElement(element) {
return element && !!element._virtual;
}
//# sourceMappingURL=isVirtualElement.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/portalContainsElement.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/portalContainsElement.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
portalContainsElement: () => (portalContainsElement)
});
/* import */ var _findElementRecursive__rspack_import_0 = __webpack_require__(/*! ./findElementRecursive */ "./node_modules/@fluentui/dom-utilities/lib/findElementRecursive.js");
/* import */ var _setPortalAttribute__rspack_import_1 = __webpack_require__(/*! ./setPortalAttribute */ "./node_modules/@fluentui/dom-utilities/lib/setPortalAttribute.js");
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
function portalContainsElement(target, parent, doc) {
var _a;
var elementMatch = (0,_findElementRecursive__rspack_import_0.findElementRecursive)(target, function (testElement) { var _a; return parent === testElement || !!((_a = testElement.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(testElement, _setPortalAttribute__rspack_import_1.DATA_PORTAL_ATTRIBUTE)); }, doc);
return elementMatch !== null && !!((_a = elementMatch.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(elementMatch, _setPortalAttribute__rspack_import_1.DATA_PORTAL_ATTRIBUTE));
}
//# sourceMappingURL=portalContainsElement.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/setPortalAttribute.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/setPortalAttribute.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DATA_PORTAL_ATTRIBUTE: () => (DATA_PORTAL_ATTRIBUTE),
setPortalAttribute: () => (setPortalAttribute)
});
var DATA_PORTAL_ATTRIBUTE = 'data-portal-element';
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
function setPortalAttribute(element) {
element.setAttribute(DATA_PORTAL_ATTRIBUTE, 'true');
}
//# sourceMappingURL=setPortalAttribute.js.map
}),
"./node_modules/@fluentui/dom-utilities/lib/setVirtualParent.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/dom-utilities/lib/setVirtualParent.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
setVirtualParent: () => (setVirtualParent)
});
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
function setVirtualParent(child, parent) {
var virtualChild = child;
var virtualParent = parent;
if (!virtualChild._virtual) {
virtualChild._virtual = {
children: [],
};
}
var oldParent = virtualChild._virtual.parent;
if (oldParent && oldParent !== parent) {
// Remove the child from its old parent.
var index = oldParent._virtual.children.indexOf(virtualChild);
if (index > -1) {
oldParent._virtual.children.splice(index, 1);
}
}
virtualChild._virtual.parent = virtualParent || undefined;
if (virtualParent) {
if (!virtualParent._virtual) {
virtualParent._virtual = {
children: [],
};
}
virtualParent._virtual.children.push(virtualChild);
}
}
//# sourceMappingURL=setVirtualParent.js.map
}),
"./node_modules/@fluentui/foundation-legacy/lib/createComponent.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/foundation-legacy/lib/createComponent.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createComponent: () => (createComponent)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_style_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/style-utilities */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js");
/* import */ var _fluentui_utilities__rspack_import_6 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _slots__rspack_import_4 = __webpack_require__(/*! ./slots */ "./node_modules/@fluentui/foundation-legacy/lib/slots.js");
/* import */ var _utilities__rspack_import_5 = __webpack_require__(/*! ./utilities */ "./node_modules/@fluentui/foundation-legacy/lib/utilities.js");
/**
* Assembles a higher order component based on the following: styles, theme, view, and state.
* Imposes a separation of concern and centralizes styling processing to increase ease of use and robustness
* in how components use and apply styling and theming.
*
* Automatically merges and applies themes and styles with theme / styleprops having the highest priority.
* State component, if provided, is passed in props for processing. Props from state / user are automatically processed
* and styled before finally being passed to view.
*
* State components should contain all stateful behavior and should not generate any JSX, but rather simply call
* the view prop.
*
* Views should simply be stateless pure functions that receive all props needed for rendering their output.
*
* State component is optional. If state is not provided, created component is essentially a functional
* stateless component.
*
* @param options - component Component options. See IComponentOptions for more detail.
*/
function createComponent(view, options) {
if (options === void 0) { options = {}; }
var _a = options.factoryOptions, factoryOptions = _a === void 0 ? {} : _a;
var defaultProp = factoryOptions.defaultProp;
var ResultComponent = function (componentProps) {
var settings = _getCustomizations(options.displayName, react__rspack_import_0.useContext(_fluentui_utilities__rspack_import_2.CustomizerContext), options.fields);
var stateReducer = options.state;
if (stateReducer) {
// Don't assume state will return all props, so spread useState result over component props.
componentProps = (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, componentProps), stateReducer(componentProps));
}
var theme = componentProps.theme || settings.theme;
var tokens = _resolveTokens(componentProps, theme, options.tokens, settings.tokens, componentProps.tokens);
var styles = _resolveStyles(componentProps, theme, tokens, options.styles, settings.styles, componentProps.styles);
var viewProps = (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, componentProps), { styles: styles, tokens: tokens, _defaultStyles: styles, theme: theme });
return view(viewProps);
};
ResultComponent.displayName = options.displayName || view.name;
// If a shorthand prop is defined, create a factory for the component.
// TODO: This shouldn't be a concern of createComponent.. factoryOptions should just be forwarded.
// Need to weigh creating default factories on component creation vs. memoizing them on use in slots.tsx.
if (defaultProp) {
ResultComponent.create = (0,_slots__rspack_import_4.createFactory)(ResultComponent, { defaultProp: defaultProp });
}
(0,_utilities__rspack_import_5.assign)(ResultComponent, options.statics);
// Later versions of TypeSript should allow us to merge objects in a type safe way and avoid this cast.
return ResultComponent;
}
/**
* Resolve all styles functions with both props and tokens and flatten results along with all styles objects.
*/
function _resolveStyles(props, theme, tokens) {
var allStyles = [];
for (var _i = 3; _i < arguments.length; _i++) {
allStyles[_i - 3] = arguments[_i];
}
return _fluentui_style_utilities__rspack_import_1.concatStyleSets.apply(void 0, allStyles.map(function (styles) {
return typeof styles === 'function' ? styles(props, theme, tokens) : styles;
}));
}
/**
* Resolve all tokens functions with props flatten results along with all tokens objects.
*/
function _resolveTokens(props, theme) {
var allTokens = [];
for (var _i = 2; _i < arguments.length; _i++) {
allTokens[_i - 2] = arguments[_i];
}
var tokens = {};
for (var _a = 0, allTokens_1 = allTokens; _a < allTokens_1.length; _a++) {
var currentTokens = allTokens_1[_a];
if (currentTokens) {
// TODO: why is this cast needed? TS seems to think there is a (TToken | Function) union from somewhere.
currentTokens =
typeof currentTokens === 'function'
? currentTokens(props, theme)
: currentTokens;
if (Array.isArray(currentTokens)) {
currentTokens = _resolveTokens.apply(void 0, (0,tslib__rspack_import_3.__spreadArray)([props, theme], currentTokens, false));
}
(0,_utilities__rspack_import_5.assign)(tokens, currentTokens);
}
}
return tokens;
}
/**
* Helper function for calling Customizations.getSettings falling back to default fields.
*
* @param displayName Displayable name for component.
* @param context React context passed to component containing contextual settings.
* @param fields Optional list of properties to grab from global store and context.
*/
function _getCustomizations(displayName, context, fields) {
// TODO: do we want field props? should fields be part of IComponent and used here?
// TODO: should we centrally define DefaultFields? (not exported from styling)
// TODO: tie this array to ICustomizationProps, such that each array element is keyof ICustomizationProps
var DefaultFields = ['theme', 'styles', 'tokens'];
return _fluentui_utilities__rspack_import_6.Customizations.getSettings(fields || DefaultFields, displayName, context.customizations);
}
//# sourceMappingURL=createComponent.js.map
}),
"./node_modules/@fluentui/foundation-legacy/lib/slots.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/foundation-legacy/lib/slots.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createFactory: () => (createFactory),
getSlots: () => (getSlots),
withSlots: () => (withSlots)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_merge_styles__rspack_import_4 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _fluentui_utilities__rspack_import_5 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _utilities__rspack_import_3 = __webpack_require__(/*! ./utilities */ "./node_modules/@fluentui/foundation-legacy/lib/utilities.js");
/**
* This function is required for any module that uses slots.
*
* This function is a slot resolver that automatically evaluates slot functions to generate React elements.
* A byproduct of this resolver is that it removes slots from the React hierarchy by bypassing React.createElement.
*
* To use this function on a per-file basis, use the jsx directive targeting withSlots.
* This directive must be the FIRST LINE in the file to work correctly.
* Usage of this pragma also requires withSlots import statement.
*
* See React.createElement
*/
// Can't use typeof on React.createElement since it's overloaded. Approximate createElement's signature for now
// and widen as needed.
function withSlots(type, props) {
var children = [];
for (var _i = 2; _i < arguments.length; _i++) {
children[_i - 2] = arguments[_i];
}
var slotType = type;
if (slotType.isSlot) {
// Since we are bypassing createElement, use React.Children.toArray to make sure children are
// properly assigned keys.
// TODO: should this be mutating? does React mutate children subprop with createElement?
// TODO: will toArray clobber existing keys?
// TODO: React generates warnings because it doesn't detect hidden member _store that is set in createElement.
// Even children passed to createElement without keys don't generate this warning.
// Is there a better way to prevent slots from appearing in hierarchy? toArray doesn't address root issue.
children = react__rspack_import_0.Children.toArray(children);
// TODO: There is something weird going on here with children embedded in props vs. rest args.
// Comment out these lines to see. Make sure this function is doing the right things.
if (children.length === 0) {
return slotType(props);
}
return slotType((0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, props), { children: children }));
}
else {
// TODO: Are there some cases where children should NOT be spread? Also, spreading reraises perf question.
// Children had to be spread to avoid breaking KeytipData in Toggle.view:
// react-dom.development.js:18931 Uncaught TypeError: children is not a function
// Without spread, function child is a child array of one element
// TODO: is there a reason this can't be:
// return React.createElement.apply(this, arguments);
return react__rspack_import_0.createElement.apply(react__rspack_import_0, (0,tslib__rspack_import_1.__spreadArray)([type, props], children, false));
}
}
/**
* This function creates factories that render ouput depending on the user ISlotProp props passed in.
* @param DefaultComponent - Base component to render when not overridden by user props.
* @param options - Factory options, including defaultProp value for shorthand prop mapping.
* @returns ISlotFactory function used for rendering slots.
*/
function createFactory(DefaultComponent, options) {
if (options === void 0) { options = {}; }
var _a = options.defaultProp, defaultProp = _a === void 0 ? 'children' : _a;
var result = function (componentProps, userProps, userSlotOptions, defaultStyles, theme) {
// If they passed in raw JSX, just return that.
if (react__rspack_import_0.isValidElement(userProps)) {
return userProps;
}
var flattenedUserProps = _translateShorthand(defaultProp, userProps);
var finalProps = _constructFinalProps(defaultStyles, theme, componentProps, flattenedUserProps);
if (userSlotOptions) {
if (userSlotOptions.component) {
// TODO: Remove cast if possible. This cast is needed because TS errors on the intrinsic portion of ReactType.
// return ;
var UserComponent = userSlotOptions.component;
return react__rspack_import_0.createElement(UserComponent, (0,tslib__rspack_import_1.__assign)({}, finalProps));
}
if (userSlotOptions.render) {
return userSlotOptions.render(finalProps, DefaultComponent);
}
}
return react__rspack_import_0.createElement(DefaultComponent, (0,tslib__rspack_import_1.__assign)({}, finalProps));
};
return result;
}
/**
* Default factory for components without explicit factories.
*/
var defaultFactory = (0,_fluentui_utilities__rspack_import_2.memoizeFunction)(function (type) { return createFactory(type); });
/**
* This function generates slots that can be used in JSX given a definition of slots and their corresponding types.
* @param userProps - Props as pass to component.
* @param slots - Slot definition object defining the default slot component for each slot.
* @returns A set of created slots that components can render in JSX.
*/
function getSlots(userProps, slots) {
var result = {};
// userProps already has default props mixed in by createComponent. Recast here to gain typing for this function.
var mixedProps = userProps;
var _loop_1 = function (name_1) {
if (slots.hasOwnProperty(name_1)) {
// This closure method requires the use of withSlots to prevent unnecessary rerenders. This is because React
// detects each closure as a different component (since it is a new instance) from the previous one and then
// forces a rerender of the entire slot subtree. For now, the only way to avoid this is to use withSlots, which
// bypasses the call to React.createElement.
var slot = function (componentProps) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (args.length > 0) {
// If React.createElement is being incorrectly used with slots, there will be additional arguments.
// We can detect these additional arguments and error on their presence.
throw new Error('Any module using getSlots must use withSlots. Please see withSlots javadoc for more info.');
}
// TODO: having TS infer types here seems to cause infinite loop.
// use explicit types or casting to preserve typing if possible.
// TODO: this should be a lookup on TProps property instead of being TProps directly, which is probably
// causing the infinite loop
return _renderSlot(slots[name_1],
// TODO: this cast to any is hiding a relationship issue between the first two args
componentProps, mixedProps[name_1], mixedProps.slots && mixedProps.slots[name_1],
// _defaultStyles should always be present, but a check for existence is added to make view tests
// easier to use.
mixedProps._defaultStyles && mixedProps._defaultStyles[name_1], mixedProps.theme);
};
slot.isSlot = true;
result[name_1] = slot;
}
};
for (var name_1 in slots) {
_loop_1(name_1);
}
return result;
}
/**
* Helper function that translates shorthand as needed.
* @param defaultProp
* @param slotProps
*/
function _translateShorthand(defaultProp, slotProps) {
var _a;
var transformedProps;
if (typeof slotProps === 'string' || typeof slotProps === 'number' || typeof slotProps === 'boolean') {
transformedProps = (_a = {},
_a[defaultProp] = slotProps,
_a);
}
else {
transformedProps = slotProps;
}
return transformedProps;
}
/**
* Helper function that constructs final styles and props given a series of props ordered by increasing priority.
*/
function _constructFinalProps(defaultStyles, theme) {
var allProps = [];
for (var _i = 2; _i < arguments.length; _i++) {
allProps[_i - 2] = arguments[_i];
}
var finalProps = {};
var classNames = [];
for (var _a = 0, allProps_1 = allProps; _a < allProps_1.length; _a++) {
var props = allProps_1[_a];
classNames.push(props && props.className);
(0,_utilities__rspack_import_3.assign)(finalProps, props);
}
finalProps.className = (0,_fluentui_merge_styles__rspack_import_4.mergeCss)([defaultStyles, classNames], { rtl: (0,_fluentui_utilities__rspack_import_5.getRTL)(theme) });
return finalProps;
}
/**
* Render a slot given component and user props. Uses component factory if available, otherwise falls back
* to default factory.
* @param ComponentType Factory component type.
* @param componentProps The properties passed into slot from within the component.
* @param userProps The user properties passed in from outside of the component.
*/
function _renderSlot(ComponentType, componentProps, userProps, slotOptions, defaultStyles, theme) {
if (ComponentType.create !== undefined) {
return ComponentType.create(componentProps, userProps, slotOptions, defaultStyles);
}
else {
// TODO: need to resolve typing / generic issues passing through memoizeFunction. for now, cast to 'unknown'
return defaultFactory(ComponentType)(componentProps, userProps, slotOptions, defaultStyles, theme);
}
}
//# sourceMappingURL=slots.js.map
}),
"./node_modules/@fluentui/foundation-legacy/lib/utilities.js":
/*!*******************************************************************!*\
!*** ./node_modules/@fluentui/foundation-legacy/lib/utilities.js ***!
\*******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
assign: () => (assign)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
var assign = tslib__rspack_import_0.__assign;
//# sourceMappingURL=utilities.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getRTL: () => (getRTL),
getStyleOptions: () => (getStyleOptions),
setRTL: () => (setRTL)
});
/* import */ var _shadowConfig__rspack_import_0 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/**
* Sets the current RTL value.
*/
function setRTL(isRTL) {
if (_rtl !== isRTL) {
_rtl = isRTL;
}
}
/**
* Gets the current RTL value.
*/
function getRTL() {
if (_rtl === undefined) {
_rtl =
// eslint-disable-next-line no-restricted-globals
typeof document !== 'undefined' &&
// eslint-disable-next-line no-restricted-globals
!!document.documentElement &&
// eslint-disable-next-line no-restricted-globals
document.documentElement.getAttribute('dir') === 'rtl';
}
return _rtl;
}
// This has been split into 2 lines because it was working in Fabric due to the code being transpiled to es5, so this
// was converted to var while not working in Fluent that uses babel to transpile the code to be es6-like. Splitting the
// logic into two lines, however, allows it to work in both scenarios.
var _rtl;
_rtl = getRTL();
function getStyleOptions() {
return {
rtl: getRTL(),
shadowConfig: _shadowConfig__rspack_import_0.DEFAULT_SHADOW_CONFIG,
};
}
//# sourceMappingURL=StyleOptionsState.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/Stylesheet.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/Stylesheet.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
InjectionMode: () => (InjectionMode),
STYLESHEET_SETTING: () => (STYLESHEET_SETTING),
Stylesheet: () => (Stylesheet)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _shadowConfig__rspack_import_1 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
var InjectionMode = {
/**
* Avoids style injection, use getRules() to read the styles.
*/
none: 0,
/**
* Inserts rules using the insertRule api.
*/
insertNode: 1,
/**
* Appends rules using appendChild.
*/
appendChild: 2,
};
var STYLESHEET_SETTING = '__stylesheet__';
/**
* MSIE 11 doesn't cascade styles based on DOM ordering, but rather on the order that each style node
* is created. As such, to maintain consistent priority, IE11 should reuse a single style node.
*/
var REUSE_STYLE_NODE = typeof navigator !== 'undefined' && /rv:11.0/.test(navigator.userAgent);
var _global = {};
// Grab window.
try {
// Why the cast?
// if compiled/type checked in same program with `@fluentui/font-icons-mdl2` which extends `Window` on global
// ( check packages/font-icons-mdl2/src/index.ts ) the definitions don't match! Thus the need of this extra assertion
_global = (window || {});
}
catch (_a) {
/* leave as blank object */
}
var _stylesheet;
/**
* Represents the state of styles registered in the page. Abstracts
* the surface for adding styles to the stylesheet, exposes helpers
* for reading the styles registered in server rendered scenarios.
*
* @public
*/
var Stylesheet = /** @class */ (function () {
function Stylesheet(config, serializedStylesheet) {
var _a, _b, _c, _d, _e, _f;
this._rules = [];
this._preservedRules = [];
this._counter = 0;
this._keyToClassName = {};
this._onInsertRuleCallbacks = [];
this._onResetCallbacks = [];
this._classNameToArgs = {};
// If there is no document we won't have an element to inject into.
this._config = (0,tslib__rspack_import_0.__assign)({ injectionMode: typeof document === 'undefined' ? InjectionMode.none : InjectionMode.insertNode, defaultPrefix: 'css', namespace: undefined, cspSettings: undefined }, config);
this._classNameToArgs = (_a = serializedStylesheet === null || serializedStylesheet === void 0 ? void 0 : serializedStylesheet.classNameToArgs) !== null && _a !== void 0 ? _a : this._classNameToArgs;
this._counter = (_b = serializedStylesheet === null || serializedStylesheet === void 0 ? void 0 : serializedStylesheet.counter) !== null && _b !== void 0 ? _b : this._counter;
this._keyToClassName = (_d = (_c = this._config.classNameCache) !== null && _c !== void 0 ? _c : serializedStylesheet === null || serializedStylesheet === void 0 ? void 0 : serializedStylesheet.keyToClassName) !== null && _d !== void 0 ? _d : this._keyToClassName;
this._preservedRules = (_e = serializedStylesheet === null || serializedStylesheet === void 0 ? void 0 : serializedStylesheet.preservedRules) !== null && _e !== void 0 ? _e : this._preservedRules;
this._rules = (_f = serializedStylesheet === null || serializedStylesheet === void 0 ? void 0 : serializedStylesheet.rules) !== null && _f !== void 0 ? _f : this._rules;
}
/**
* Gets the singleton instance.
*/
Stylesheet.getInstance = function (shadowConfig) {
_stylesheet = _global[STYLESHEET_SETTING];
if (_global[_shadowConfig__rspack_import_1.SHADOW_DOM_STYLESHEET_SETTING]) {
return _global[_shadowConfig__rspack_import_1.SHADOW_DOM_STYLESHEET_SETTING].getInstance(shadowConfig);
}
if (!_stylesheet || (_stylesheet._lastStyleElement && _stylesheet._lastStyleElement.ownerDocument !== document)) {
var fabricConfig = (_global === null || _global === void 0 ? void 0 : _global.FabricConfig) || {};
var stylesheet = new Stylesheet(fabricConfig.mergeStyles, fabricConfig.serializedStylesheet);
_stylesheet = stylesheet;
_global[STYLESHEET_SETTING] = stylesheet;
}
return _stylesheet;
};
/**
* Serializes the Stylesheet instance into a format which allows rehydration on creation.
* @returns string representation of `ISerializedStylesheet` interface.
*/
Stylesheet.prototype.serialize = function () {
return JSON.stringify({
classNameToArgs: this._classNameToArgs,
counter: this._counter,
keyToClassName: this._keyToClassName,
preservedRules: this._preservedRules,
rules: this._rules,
});
};
/**
* Configures the stylesheet.
*/
Stylesheet.prototype.setConfig = function (config) {
this._config = (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, this._config), config);
};
/**
* Configures a reset callback.
*
* @param callback - A callback which will be called when the Stylesheet is reset.
* @returns function which when called un-registers provided callback.
*/
Stylesheet.prototype.onReset = function (callback) {
var _this = this;
this._onResetCallbacks.push(callback);
return function () {
_this._onResetCallbacks = _this._onResetCallbacks.filter(function (cb) { return cb !== callback; });
};
};
/**
* Configures an insert rule callback.
*
* @param callback - A callback which will be called when a rule is inserted.
* @returns function which when called un-registers provided callback.
*/
Stylesheet.prototype.onInsertRule = function (callback) {
var _this = this;
this._onInsertRuleCallbacks.push(callback);
return function () {
_this._onInsertRuleCallbacks = _this._onInsertRuleCallbacks.filter(function (cb) { return cb !== callback; });
};
};
/**
* Generates a unique classname.
*
* @param displayName - Optional value to use as a prefix.
*/
Stylesheet.prototype.getClassName = function (displayName) {
var namespace = this._config.namespace;
var prefix = displayName || this._config.defaultPrefix;
return "".concat(namespace ? namespace + '-' : '').concat(prefix, "-").concat(this._counter++);
};
/**
* Used internally to cache information about a class which was
* registered with the stylesheet.
*/
Stylesheet.prototype.cacheClassName = function (className, key, args, rules) {
this._keyToClassName[this._getCacheKey(key)] = className;
this._classNameToArgs[className] = {
args: args,
rules: rules,
};
};
/**
* Gets the appropriate classname given a key which was previously
* registered using cacheClassName.
*/
Stylesheet.prototype.classNameFromKey = function (key) {
return this._keyToClassName[this._getCacheKey(key)];
};
/**
* Gets all classnames cache with the stylesheet.
*/
Stylesheet.prototype.getClassNameCache = function () {
return this._keyToClassName;
};
/**
* Gets the arguments associated with a given classname which was
* previously registered using cacheClassName.
*/
Stylesheet.prototype.argsFromClassName = function (className) {
var entry = this._classNameToArgs[className];
return entry && entry.args;
};
/**
* Gets the rules associated with a given classname which was
* previously registered using cacheClassName.
*/
Stylesheet.prototype.insertedRulesFromClassName = function (className) {
var entry = this._classNameToArgs[className];
return entry && entry.rules;
};
/**
* Inserts a css rule into the stylesheet.
* @param preserve - Preserves the rule beyond a reset boundary.
*/
Stylesheet.prototype.insertRule = function (rule, preserve, stylesheetKey) {
if (stylesheetKey === void 0) { stylesheetKey = _shadowConfig__rspack_import_1.GLOBAL_STYLESHEET_KEY; }
var injectionMode = this._config.injectionMode;
var element = injectionMode !== InjectionMode.none ? this._getStyleElement() : undefined;
if (preserve) {
this._preservedRules.push(rule);
}
if (element) {
switch (injectionMode) {
case InjectionMode.insertNode:
this._insertRuleIntoSheet(element.sheet, rule);
break;
case InjectionMode.appendChild:
element.appendChild(document.createTextNode(rule));
break;
}
}
else {
this._rules.push(rule);
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (this._config.onInsertRule) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
this._config.onInsertRule(rule);
}
this._onInsertRuleCallbacks.forEach(function (callback) {
return callback({ key: stylesheetKey, sheet: (element ? element.sheet : undefined), rule: rule });
});
};
/**
* Gets all rules registered with the stylesheet; only valid when
* using InsertionMode.none.
*/
Stylesheet.prototype.getRules = function (includePreservedRules) {
return (includePreservedRules ? this._preservedRules.join('') : '') + this._rules.join('');
};
/**
* Resets the internal state of the stylesheet. Only used in server
* rendered scenarios where we're using InsertionMode.none.
*/
Stylesheet.prototype.reset = function () {
this._rules = [];
this._counter = 0;
this._classNameToArgs = {};
this._keyToClassName = {};
this._onResetCallbacks.forEach(function (callback) { return callback(); });
};
// Forces the regeneration of incoming styles without totally resetting the stylesheet.
Stylesheet.prototype.resetKeys = function () {
this._keyToClassName = {};
};
Stylesheet.prototype._createStyleElement = function () {
var _a;
var doc = ((_a = this._config.window) === null || _a === void 0 ? void 0 : _a.document) || document;
var head = doc.head;
var styleElement = doc.createElement('style');
var nodeToInsertBefore = null;
styleElement.setAttribute('data-merge-styles', 'true');
var cspSettings = this._config.cspSettings;
if (cspSettings) {
if (cspSettings.nonce) {
styleElement.setAttribute('nonce', cspSettings.nonce);
}
}
if (this._lastStyleElement) {
// If the `nextElementSibling` is null, then the insertBefore will act as a regular append.
// https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore#Syntax
nodeToInsertBefore = this._lastStyleElement.nextElementSibling;
}
else {
var placeholderStyleTag = this._findPlaceholderStyleTag();
if (placeholderStyleTag) {
nodeToInsertBefore = placeholderStyleTag.nextElementSibling;
}
else {
nodeToInsertBefore = head.childNodes[0];
}
}
head.insertBefore(styleElement, head.contains(nodeToInsertBefore) ? nodeToInsertBefore : null);
this._lastStyleElement = styleElement;
return styleElement;
};
Stylesheet.prototype._insertRuleIntoSheet = function (sheet, rule) {
if (!sheet) {
return false;
}
try {
sheet.insertRule(rule, sheet.cssRules.length);
return true;
}
catch (e) {
// The browser will throw exceptions on unsupported rules (such as a moz prefix in webkit.)
// We need to swallow the exceptions for this scenario, otherwise we'd need to filter
// which could be slower and bulkier.
}
return false;
};
Stylesheet.prototype._getCacheKey = function (key) {
return key;
};
Stylesheet.prototype._getStyleElement = function () {
var _this = this;
if (!this._styleElement) {
this._styleElement = this._createStyleElement();
if (!REUSE_STYLE_NODE) {
// Reset the style element on the next frame.
var win = this._config.window || window;
win.requestAnimationFrame(function () {
_this._styleElement = undefined;
});
}
}
return this._styleElement;
};
Stylesheet.prototype._findPlaceholderStyleTag = function () {
var head = document.head;
if (head) {
return head.querySelector('style[data-merge-styles]');
}
return null;
};
return Stylesheet;
}());
//# sourceMappingURL=Stylesheet.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
concatStyleSets: () => (concatStyleSets)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _shadowConfig__rspack_import_0 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/**
* Combine a set of styles together (but does not register css classes).
* @param styleSets - One or more stylesets to be merged (each param can also be falsy).
*/
function concatStyleSets() {
var styleSets = [];
for (var _i = 0; _i < arguments.length; _i++) {
styleSets[_i] = arguments[_i];
}
if (styleSets &&
styleSets.length === 1 &&
styleSets[0] &&
!styleSets[0].subComponentStyles &&
!(0,_shadowConfig__rspack_import_0.isShadowConfig)(styleSets[0])) {
return styleSets[0];
}
var mergedSet = {};
// We process sub component styles in two phases. First we collect them, then we combine them into 1 style function.
var workingSubcomponentStyles = {};
for (var _a = 0, styleSets_1 = styleSets; _a < styleSets_1.length; _a++) {
var currentSet = styleSets_1[_a];
if (currentSet && !(0,_shadowConfig__rspack_import_0.isShadowConfig)(currentSet)) {
for (var prop in currentSet) {
if (currentSet.hasOwnProperty(prop)) {
if (prop === 'subComponentStyles' && currentSet.subComponentStyles !== undefined) {
// subcomponent styles - style functions or objects
var currentComponentStyles = currentSet.subComponentStyles;
for (var subCompProp in currentComponentStyles) {
if (currentComponentStyles.hasOwnProperty(subCompProp)) {
if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {
workingSubcomponentStyles[subCompProp].push(currentComponentStyles[subCompProp]);
}
else {
workingSubcomponentStyles[subCompProp] = [currentComponentStyles[subCompProp]];
}
}
}
continue;
}
// the as any casts below is a workaround for ts 2.8.
// todo: remove cast to any in ts 2.9.
var mergedValue = mergedSet[prop];
var currentValue = currentSet[prop];
if (mergedValue === undefined) {
mergedSet[prop] = currentValue;
}
else {
mergedSet[prop] = (0,tslib__rspack_import_1.__spreadArray)((0,tslib__rspack_import_1.__spreadArray)([], (Array.isArray(mergedValue) ? mergedValue : [mergedValue]), true), (Array.isArray(currentValue) ? currentValue : [currentValue]), true);
}
}
}
}
}
if (Object.keys(workingSubcomponentStyles).length > 0) {
mergedSet.subComponentStyles = {};
var mergedSubStyles = mergedSet.subComponentStyles;
var _loop_1 = function (subCompProp) {
if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {
var workingSet_1 = workingSubcomponentStyles[subCompProp];
mergedSubStyles[subCompProp] = function (styleProps) {
return concatStyleSets.apply(void 0, workingSet_1.map(function (styleFunctionOrObject) {
return typeof styleFunctionOrObject === 'function' ? styleFunctionOrObject(styleProps) : styleFunctionOrObject;
}));
};
}
};
// now we process the subcomponent styles if there are any
for (var subCompProp in workingSubcomponentStyles) {
_loop_1(subCompProp);
}
}
return mergedSet;
}
//# sourceMappingURL=concatStyleSets.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/concatStyleSetsWithProps.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/concatStyleSetsWithProps.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
concatStyleSetsWithProps: () => (concatStyleSetsWithProps)
});
/* import */ var _concatStyleSets__rspack_import_0 = __webpack_require__(/*! ./concatStyleSets */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js");
/**
* Concatenates style sets into one, but resolves functional sets using the given props.
* @param styleProps - Props used to resolve functional sets.
* @param allStyles - Style sets, which can be functions or objects.
*/
function concatStyleSetsWithProps(styleProps) {
var allStyles = [];
for (var _i = 1; _i < arguments.length; _i++) {
allStyles[_i - 1] = arguments[_i];
}
var result = [];
for (var _a = 0, allStyles_1 = allStyles; _a < allStyles_1.length; _a++) {
var styles = allStyles_1[_a];
if (styles) {
result.push(typeof styles === 'function' ? styles(styleProps) : styles);
}
}
if (result.length === 1) {
return result[0];
}
else if (result.length) {
// cliffkoh: I cannot figure out how to avoid the cast to any here.
// It is something to do with the use of Omit in IStyleSet.
// It might not be necessary once Omit becomes part of lib.d.ts (when we remove our own Omit and rely on
// the official version).
return _concatStyleSets__rspack_import_0.concatStyleSets.apply(void 0, result);
}
return {};
}
//# sourceMappingURL=concatStyleSetsWithProps.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/extractStyleParts.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/extractStyleParts.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
extractStyleParts: () => (extractStyleParts)
});
/* import */ var _shadowConfig__rspack_import_0 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/**
* Separates the classes and style objects. Any classes that are pre-registered
* args are auto expanded into objects.
*/
function extractStyleParts(sheet) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var classes = [];
var objects = [];
var stylesheet = sheet;
function _processArgs(argsList) {
for (var _i = 0, argsList_1 = argsList; _i < argsList_1.length; _i++) {
var arg = argsList_1[_i];
if (arg && !(0,_shadowConfig__rspack_import_0.isShadowConfig)(arg)) {
if (typeof arg === 'string') {
if (arg.indexOf(' ') >= 0) {
_processArgs(arg.split(' '));
}
else {
var translatedArgs = stylesheet.argsFromClassName(arg);
if (translatedArgs) {
_processArgs(translatedArgs);
}
else {
// Avoid adding the same class twice.
if (classes.indexOf(arg) === -1) {
classes.push(arg);
}
}
}
}
else if (Array.isArray(arg)) {
_processArgs(arg);
}
else if (typeof arg === 'object') {
objects.push(arg);
}
}
}
}
_processArgs(args);
return {
classes: classes,
objects: objects,
};
}
//# sourceMappingURL=extractStyleParts.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/fontFace.js":
/*!*************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/fontFace.js ***!
\*************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
fontFace: () => (fontFace)
});
/* import */ var _StyleOptionsState__rspack_import_2 = __webpack_require__(/*! ./StyleOptionsState */ "./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js");
/* import */ var _Stylesheet__rspack_import_0 = __webpack_require__(/*! ./Stylesheet */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _styleToClassName__rspack_import_1 = __webpack_require__(/*! ./styleToClassName */ "./node_modules/@fluentui/merge-styles/lib/styleToClassName.js");
/**
* Registers a font face.
* @public
*/
function fontFace(font) {
var stylesheet = _Stylesheet__rspack_import_0.Stylesheet.getInstance();
var rule = (0,_styleToClassName__rspack_import_1.serializeRuleEntries)((0,_StyleOptionsState__rspack_import_2.getStyleOptions)(), font);
var className = stylesheet.classNameFromKey(rule);
if (className) {
return;
}
var name = stylesheet.getClassName();
stylesheet.insertRule("@font-face{".concat(rule, "}"), true);
stylesheet.cacheClassName(name, rule, [], ['font-face', rule]);
}
//# sourceMappingURL=fontFace.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/getVendorSettings.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/getVendorSettings.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getVendorSettings: () => (getVendorSettings),
setVendorSettings: () => (setVendorSettings)
});
var _vendorSettings;
function getVendorSettings() {
var _a;
if (!_vendorSettings) {
// eslint-disable-next-line no-restricted-globals
var doc = typeof document !== 'undefined' ? document : undefined;
var nav = typeof navigator !== 'undefined' ? navigator : undefined;
var userAgent = (_a = nav === null || nav === void 0 ? void 0 : nav.userAgent) === null || _a === void 0 ? void 0 : _a.toLowerCase();
if (!doc) {
_vendorSettings = {
isWebkit: true,
isMoz: true,
isOpera: true,
isMs: true,
};
}
else {
_vendorSettings = {
isWebkit: !!(doc && 'WebkitAppearance' in doc.documentElement.style),
isMoz: !!(userAgent && userAgent.indexOf('firefox') > -1),
isOpera: !!(userAgent && userAgent.indexOf('opera') > -1),
isMs: !!(nav && (/rv:11.0/i.test(nav.userAgent) || /Edge\/\d./i.test(navigator.userAgent))),
};
}
}
return _vendorSettings;
}
/**
* Sets the vendor settings for prefixing and vendor specific operations.
*/
function setVendorSettings(vendorSettings) {
_vendorSettings = vendorSettings;
}
//# sourceMappingURL=getVendorSettings.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/keyframes.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/keyframes.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
keyframes: () => (keyframes)
});
/* import */ var _StyleOptionsState__rspack_import_2 = __webpack_require__(/*! ./StyleOptionsState */ "./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js");
/* import */ var _Stylesheet__rspack_import_0 = __webpack_require__(/*! ./Stylesheet */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _styleToClassName__rspack_import_1 = __webpack_require__(/*! ./styleToClassName */ "./node_modules/@fluentui/merge-styles/lib/styleToClassName.js");
/**
* Registers keyframe definitions.
*
* @public
*/
function keyframes(timeline) {
var stylesheet = _Stylesheet__rspack_import_0.Stylesheet.getInstance();
var rulesArray = [];
for (var prop in timeline) {
if (timeline.hasOwnProperty(prop)) {
rulesArray.push(prop, '{', (0,_styleToClassName__rspack_import_1.serializeRuleEntries)((0,_StyleOptionsState__rspack_import_2.getStyleOptions)(), timeline[prop]), '}');
}
}
var rules = rulesArray.join('');
var className = stylesheet.classNameFromKey(rules);
if (className) {
return className;
}
var name = stylesheet.getClassName();
stylesheet.insertRule("@keyframes ".concat(name, "{").concat(rules, "}"), true);
stylesheet.cacheClassName(name, rules, [], ['keyframes', rules]);
return name;
}
//# sourceMappingURL=keyframes.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/mergeStyleSets.js":
/*!*******************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/mergeStyleSets.js ***!
\*******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeCssSets: () => (mergeCssSets),
mergeStyleSets: () => (mergeStyleSets)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _concatStyleSets__rspack_import_4 = __webpack_require__(/*! ./concatStyleSets */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js");
/* import */ var _extractStyleParts__rspack_import_5 = __webpack_require__(/*! ./extractStyleParts */ "./node_modules/@fluentui/merge-styles/lib/extractStyleParts.js");
/* import */ var _StyleOptionsState__rspack_import_0 = __webpack_require__(/*! ./StyleOptionsState */ "./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js");
/* import */ var _styleToClassName__rspack_import_6 = __webpack_require__(/*! ./styleToClassName */ "./node_modules/@fluentui/merge-styles/lib/styleToClassName.js");
/* import */ var _shadowConfig__rspack_import_1 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var _Stylesheet__rspack_import_3 = __webpack_require__(/*! ./Stylesheet */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/**
* Takes in one or more style set objects, each consisting of a set of areas,
* each which will produce a class name. Using this is analogous to calling
* `mergeStyles` for each property in the object, but ensures we maintain the
* set ordering when multiple style sets are merged.
*
* @param styleSets - One or more style sets to be merged.
*/
function mergeStyleSets() {
var styleSets = [];
for (var _i = 0; _i < arguments.length; _i++) {
styleSets[_i] = arguments[_i];
}
return mergeCssSets(styleSets, (0,_StyleOptionsState__rspack_import_0.getStyleOptions)());
}
/**
* Takes in one or more style set objects, each1consisting of a set of areas,
* each which will produce a class name. Using this is analogous to calling
* `mergeCss` for each property in the object, but ensures the
* set ordering when multiple style sets are merged.
*
* @param styleSets - One or more style sets to be merged.
* @param options - (optional) Options to use when creating rules.
*/
function mergeCssSets(styleSets, options) {
var classNameSet = { subComponentStyles: {} };
var shadowConfig = undefined;
var styleSet;
if ((0,_shadowConfig__rspack_import_1.isShadowConfig)(styleSets[0])) {
shadowConfig = styleSets[0];
styleSet = styleSets[1];
}
else {
styleSet = styleSets[0];
}
shadowConfig !== null && shadowConfig !== void 0 ? shadowConfig : (shadowConfig = options === null || options === void 0 ? void 0 : options.shadowConfig);
var opts = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, options), { shadowConfig: shadowConfig });
if (!styleSet && styleSets.length <= 1) {
return { subComponentStyles: {} };
}
var sheet = _Stylesheet__rspack_import_3.Stylesheet.getInstance(shadowConfig);
opts.stylesheet = sheet;
var concatenatedStyleSet = _concatStyleSets__rspack_import_4.concatStyleSets.apply(void 0, styleSets);
var registrations = [];
for (var styleSetArea in concatenatedStyleSet) {
if (concatenatedStyleSet.hasOwnProperty(styleSetArea)) {
if (styleSetArea === 'subComponentStyles') {
classNameSet.subComponentStyles = concatenatedStyleSet.subComponentStyles || {};
continue;
}
else if (styleSetArea === '__shadowConfig__') {
continue;
}
var styles = concatenatedStyleSet[styleSetArea];
var _a = (0,_extractStyleParts__rspack_import_5.extractStyleParts)(sheet, styles), classes = _a.classes, objects = _a.objects;
if (objects === null || objects === void 0 ? void 0 : objects.length) {
var registration = (0,_styleToClassName__rspack_import_6.styleToRegistration)(opts || {}, { displayName: styleSetArea }, objects);
if (registration) {
registrations.push(registration);
classNameSet[styleSetArea] = classes.concat([registration.className]).join(' ');
}
}
else {
classNameSet[styleSetArea] = classes.join(' ');
}
}
}
for (var _i = 0, registrations_1 = registrations; _i < registrations_1.length; _i++) {
var registration = registrations_1[_i];
if (registration) {
(0,_styleToClassName__rspack_import_6.applyRegistration)(registration, options === null || options === void 0 ? void 0 : options.specificityMultiplier, shadowConfig);
}
}
return classNameSet;
}
//# sourceMappingURL=mergeStyleSets.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/mergeStyles.js":
/*!****************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/mergeStyles.js ***!
\****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeCss: () => (mergeCss),
mergeStyles: () => (mergeStyles)
});
/* import */ var _extractStyleParts__rspack_import_3 = __webpack_require__(/*! ./extractStyleParts */ "./node_modules/@fluentui/merge-styles/lib/extractStyleParts.js");
/* import */ var _shadowConfig__rspack_import_1 = __webpack_require__(/*! ./shadowConfig */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var _StyleOptionsState__rspack_import_0 = __webpack_require__(/*! ./StyleOptionsState */ "./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js");
/* import */ var _Stylesheet__rspack_import_2 = __webpack_require__(/*! ./Stylesheet */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _styleToClassName__rspack_import_4 = __webpack_require__(/*! ./styleToClassName */ "./node_modules/@fluentui/merge-styles/lib/styleToClassName.js");
/**
* Concatenation helper, which can merge class names together. Skips over falsey values.
*
* @public
*/
function mergeStyles() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return mergeCss(args, (0,_StyleOptionsState__rspack_import_0.getStyleOptions)());
}
/**
* Concatenation helper, which can merge class names together. Skips over falsey values.
* Accepts a set of options that will be used when calculating styles.
*
* @public
*/
function mergeCss(args, options) {
var styleArgs = args instanceof Array ? args : [args];
var opts = options || {};
var hasShadowConfig = (0,_shadowConfig__rspack_import_1.isShadowConfig)(styleArgs[0]);
if (hasShadowConfig) {
opts.shadowConfig = styleArgs[0];
}
opts.stylesheet = _Stylesheet__rspack_import_2.Stylesheet.getInstance(opts.shadowConfig);
var _a = (0,_extractStyleParts__rspack_import_3.extractStyleParts)(opts.stylesheet, styleArgs), classes = _a.classes, objects = _a.objects;
if (objects.length) {
classes.push((0,_styleToClassName__rspack_import_4.styleToClassName)(opts, objects));
}
return classes.join(' ');
}
//# sourceMappingURL=mergeStyles.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/shadowConfig.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/shadowConfig.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DEFAULT_SHADOW_CONFIG: () => (DEFAULT_SHADOW_CONFIG),
GLOBAL_STYLESHEET_KEY: () => (GLOBAL_STYLESHEET_KEY),
SHADOW_DOM_STYLESHEET_SETTING: () => (SHADOW_DOM_STYLESHEET_SETTING),
isShadowConfig: () => (isShadowConfig),
makeShadowConfig: () => (makeShadowConfig)
});
var GLOBAL_STYLESHEET_KEY = '__global__';
var SHADOW_DOM_STYLESHEET_SETTING = '__shadow_dom_stylesheet__';
var DEFAULT_SHADOW_CONFIG = {
stylesheetKey: GLOBAL_STYLESHEET_KEY,
inShadow: false,
window: undefined,
__isShadowConfig__: true,
};
var makeShadowConfig = function (stylesheetKey, inShadow, window) {
return {
stylesheetKey: stylesheetKey,
inShadow: inShadow,
window: window,
__isShadowConfig__: true,
};
};
var isShadowConfig = function (value) {
if (!(value && isRecord(value))) {
return false;
}
return value.__isShadowConfig__ === true;
};
function isRecord(value) {
return value !== null && typeof value === 'object' && !Array.isArray(value);
}
//# sourceMappingURL=shadowConfig.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/styleToClassName.js":
/*!*********************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/styleToClassName.js ***!
\*********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
applyRegistration: () => (applyRegistration),
serializeRuleEntries: () => (serializeRuleEntries),
styleToClassName: () => (styleToClassName),
styleToRegistration: () => (styleToRegistration)
});
/* import */ var tslib__rspack_import_6 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Stylesheet__rspack_import_5 = __webpack_require__(/*! ./Stylesheet */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _transforms_kebabRules__rspack_import_1 = __webpack_require__(/*! ./transforms/kebabRules */ "./node_modules/@fluentui/merge-styles/lib/transforms/kebabRules.js");
/* import */ var _transforms_prefixRules__rspack_import_4 = __webpack_require__(/*! ./transforms/prefixRules */ "./node_modules/@fluentui/merge-styles/lib/transforms/prefixRules.js");
/* import */ var _transforms_provideUnits__rspack_import_2 = __webpack_require__(/*! ./transforms/provideUnits */ "./node_modules/@fluentui/merge-styles/lib/transforms/provideUnits.js");
/* import */ var _transforms_rtlifyRules__rspack_import_3 = __webpack_require__(/*! ./transforms/rtlifyRules */ "./node_modules/@fluentui/merge-styles/lib/transforms/rtlifyRules.js");
/* import */ var _tokenizeWithParentheses__rspack_import_0 = __webpack_require__(/*! ./tokenizeWithParentheses */ "./node_modules/@fluentui/merge-styles/lib/tokenizeWithParentheses.js");
var DISPLAY_NAME = 'displayName';
function getDisplayName(rules) {
var rootStyle = rules && rules['&'];
return rootStyle ? rootStyle.displayName : undefined;
}
var globalSelectorRegExp = /\:global\((.+?)\)/g;
/**
* Finds comma separated selectors in a :global() e.g. ":global(.class1, .class2, .class3)"
* and wraps them each in their own global ":global(.class1), :global(.class2), :global(.class3)"
*
* @param selectorWithGlobals The selector to process
* @returns The updated selector
*/
function expandCommaSeparatedGlobals(selectorWithGlobals) {
// We the selector does not have a :global() we can shortcut
if (!globalSelectorRegExp.test(selectorWithGlobals)) {
return selectorWithGlobals;
}
var replacementInfo = [];
var findGlobal = /\:global\((.+?)\)/g;
var match = null;
// Create a result list for global selectors so we can replace them.
while ((match = findGlobal.exec(selectorWithGlobals))) {
// Only if the found selector is a comma separated list we'll process it.
if (match[1].indexOf(',') > -1) {
replacementInfo.push([
match.index,
match.index + match[0].length,
// Wrap each of the found selectors in :global()
match[1]
.split(',')
.map(function (v) { return ":global(".concat(v.trim(), ")"); })
.join(', '),
]);
}
}
// Replace the found selectors with their wrapped variants in reverse order
return replacementInfo
.reverse()
.reduce(function (selector, _a) {
var matchIndex = _a[0], matchEndIndex = _a[1], replacement = _a[2];
var prefix = selector.slice(0, matchIndex);
var suffix = selector.slice(matchEndIndex);
return prefix + replacement + suffix;
}, selectorWithGlobals);
}
function isSelector(potentialSelector) {
return potentialSelector.indexOf(':global(') >= 0 || potentialSelector.indexOf(':') === 0;
}
function expandSelector(newSelector, currentSelector) {
if (newSelector.indexOf(':global(') >= 0) {
return newSelector.replace(globalSelectorRegExp, '$1');
}
else if (newSelector.indexOf(':host(') === 0) {
return newSelector;
}
else if (newSelector.indexOf(':') === 0) {
return currentSelector + newSelector;
}
else if (newSelector.indexOf('&') < 0) {
return currentSelector + ' ' + newSelector;
}
return newSelector;
}
function extractSelector(currentSelector, rules, selector, value, stylesheet) {
if (rules === void 0) { rules = { __order: [] }; }
if (selector.indexOf('@') === 0) {
selector = selector + '{' + currentSelector;
extractRules([value], rules, selector, stylesheet);
}
else if (selector.indexOf(',') > -1) {
expandCommaSeparatedGlobals(selector)
.split(',')
.map(function (s) { return s.trim(); })
.forEach(function (separatedSelector) {
return extractRules([value], rules, expandSelector(separatedSelector, currentSelector), stylesheet);
});
}
else {
extractRules([value], rules, expandSelector(selector, currentSelector), stylesheet);
}
}
function extractRules(args, rules, currentSelector, stylesheet) {
if (rules === void 0) { rules = { __order: [] }; }
if (currentSelector === void 0) { currentSelector = '&'; }
var currentRules = rules[currentSelector];
if (!currentRules) {
currentRules = {};
rules[currentSelector] = currentRules;
rules.__order.push(currentSelector);
}
for (var _i = 0, args_1 = args; _i < args_1.length; _i++) {
var arg = args_1[_i];
// If the arg is a string, we need to look up the class map and merge.
if (typeof arg === 'string') {
var expandedRules = stylesheet.argsFromClassName(arg);
if (expandedRules) {
extractRules(expandedRules, rules, currentSelector, stylesheet);
}
// Else if the arg is an array, we need to recurse in.
}
else if (Array.isArray(arg)) {
extractRules(arg, rules, currentSelector, stylesheet);
}
else {
for (var prop in arg) {
if (arg.hasOwnProperty(prop)) {
var propValue = arg[prop];
if (prop === 'selectors') {
// every child is a selector.
var selectors = arg.selectors;
for (var newSelector in selectors) {
if (selectors.hasOwnProperty(newSelector)) {
extractSelector(currentSelector, rules, newSelector, selectors[newSelector], stylesheet);
}
}
}
else if (typeof propValue === 'object' || isSelector(prop)) {
// prop is a selector.
if (propValue !== null && propValue !== undefined) {
extractSelector(currentSelector, rules, prop, propValue, stylesheet);
}
}
else {
if (propValue !== undefined) {
// Else, add the rule to the currentSelector.
if (prop === 'margin' || prop === 'padding') {
expandQuads(currentRules, prop, propValue);
}
else {
currentRules[prop] = propValue;
}
}
}
}
}
}
}
return rules;
}
function expandQuads(currentRules, name, value) {
var parts = typeof value === 'string' ? (0,_tokenizeWithParentheses__rspack_import_0.tokenizeWithParentheses)(value) : [value];
if (parts.length === 0) {
parts.push(value);
}
if (parts[parts.length - 1] === '!important') {
// Remove !important from parts, and append it to each part individually
parts = parts.slice(0, -1).map(function (p) { return p + ' !important'; });
}
currentRules[name + 'Top'] = parts[0];
currentRules[name + 'Right'] = parts[1] || parts[0];
currentRules[name + 'Bottom'] = parts[2] || parts[0];
currentRules[name + 'Left'] = parts[3] || parts[1] || parts[0];
}
function getKeyForRules(options, rules) {
var serialized = [options.rtl ? 'rtl' : 'ltr'];
var hasProps = false;
for (var _i = 0, _a = rules.__order; _i < _a.length; _i++) {
var selector = _a[_i];
serialized.push(selector);
var rulesForSelector = rules[selector];
for (var propName in rulesForSelector) {
if (rulesForSelector.hasOwnProperty(propName) && rulesForSelector[propName] !== undefined) {
hasProps = true;
serialized.push(propName, rulesForSelector[propName]);
}
}
}
return hasProps ? serialized.join('') : undefined;
}
function repeatString(target, count) {
if (count <= 0) {
return '';
}
if (count === 1) {
return target;
}
return target + repeatString(target, count - 1);
}
function serializeRuleEntries(options, ruleEntries) {
if (!ruleEntries) {
return '';
}
var allEntries = [];
for (var entry in ruleEntries) {
if (ruleEntries.hasOwnProperty(entry) && entry !== DISPLAY_NAME && ruleEntries[entry] !== undefined) {
allEntries.push(entry, ruleEntries[entry]);
}
}
// Apply transforms.
for (var i = 0; i < allEntries.length; i += 2) {
(0,_transforms_kebabRules__rspack_import_1.kebabRules)(allEntries, i);
(0,_transforms_provideUnits__rspack_import_2.provideUnits)(allEntries, i);
(0,_transforms_rtlifyRules__rspack_import_3.rtlifyRules)(options, allEntries, i);
(0,_transforms_prefixRules__rspack_import_4.prefixRules)(allEntries, i);
}
// Apply punctuation.
for (var i = 1; i < allEntries.length; i += 4) {
allEntries.splice(i, 1, ':', allEntries[i], ';');
}
return allEntries.join('');
}
function styleToRegistration(options) {
var _a;
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var stylesheet = (_a = options.stylesheet) !== null && _a !== void 0 ? _a : _Stylesheet__rspack_import_5.Stylesheet.getInstance(options.shadowConfig);
var rules = extractRules(args, undefined, undefined, stylesheet);
var key = getKeyForRules(options, rules);
if (key) {
var registration = {
className: stylesheet.classNameFromKey(key),
key: key,
args: args,
};
if (!registration.className) {
registration.className = stylesheet.getClassName(getDisplayName(rules));
var rulesToInsert = [];
for (var _b = 0, _c = rules.__order; _b < _c.length; _b++) {
var selector = _c[_b];
rulesToInsert.push(selector, serializeRuleEntries(options, rules[selector]));
}
registration.rulesToInsert = rulesToInsert;
}
return registration;
}
return undefined;
}
/**
* Insert style to stylesheet.
* @param registration Style registration.
* @param specificityMultiplier Number of times classname selector is repeated in the css rule.
* This is to increase css specificity in case it's needed. Default to 1.
*/
function applyRegistration(registration, specificityMultiplier, shadowConfig, sheet) {
if (specificityMultiplier === void 0) { specificityMultiplier = 1; }
var stylesheet = sheet !== null && sheet !== void 0 ? sheet : _Stylesheet__rspack_import_5.Stylesheet.getInstance(shadowConfig);
var className = registration.className, key = registration.key, args = registration.args, rulesToInsert = registration.rulesToInsert;
if (rulesToInsert) {
// rulesToInsert is an ordered array of selector/rule pairs.
for (var i = 0; i < rulesToInsert.length; i += 2) {
var rules = rulesToInsert[i + 1];
if (rules) {
var selector = rulesToInsert[i];
selector = selector.replace(/&/g, repeatString(".".concat(registration.className), specificityMultiplier));
// Insert. Note if a media query, we must close the query with a final bracket.
var processedRule = "".concat(selector, "{").concat(rules, "}").concat(selector.indexOf('@') === 0 ? '}' : '');
stylesheet.insertRule(processedRule);
}
}
stylesheet.cacheClassName(className, key, args, rulesToInsert);
}
}
function styleToClassName(options) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var registration = styleToRegistration.apply(void 0, (0,tslib__rspack_import_6.__spreadArray)([options], args, false));
if (registration) {
applyRegistration(registration, options.specificityMultiplier, options.shadowConfig, options.stylesheet);
return registration.className;
}
return '';
}
//# sourceMappingURL=styleToClassName.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/tokenizeWithParentheses.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/tokenizeWithParentheses.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
tokenizeWithParentheses: () => (tokenizeWithParentheses)
});
/**
* Split a string into tokens separated by whitespace, except all text within parentheses
* is treated as a single token (whitespace is ignored within parentheses).
*
* Unlike String.split(' '), multiple consecutive space characters are collapsed and
* removed from the returned array (including leading and trailing spaces).
*
* For example:
* `tokenizeWithParentheses("3px calc(var(--x) / 2) 9px 0 ")`
* => `["3px", "calc(var(--x) / 2)", "9px", "0"]`
*
* @returns The array of tokens. Returns an empty array if the string was empty or contained only whitespace.
*/
function tokenizeWithParentheses(value) {
var parts = [];
var partStart = 0;
var parens = 0;
for (var i = 0; i < value.length; i++) {
switch (value[i]) {
case '(':
parens++;
break;
case ')':
if (parens) {
parens--;
}
break;
case '\t':
case ' ':
if (!parens) {
// Add the new part if it's not an empty string
if (i > partStart) {
parts.push(value.substring(partStart, i));
}
partStart = i + 1;
}
break;
}
}
// Add the last part
if (partStart < value.length) {
parts.push(value.substring(partStart));
}
return parts;
}
//# sourceMappingURL=tokenizeWithParentheses.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/transforms/kebabRules.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/transforms/kebabRules.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
kebabRules: () => (kebabRules)
});
var rules = {};
function kebabRules(rulePairs, index) {
var rule = rulePairs[index];
if (rule.charAt(0) !== '-') {
rulePairs[index] = rules[rule] = rules[rule] || rule.replace(/([A-Z])/g, '-$1').toLowerCase();
}
}
//# sourceMappingURL=kebabRules.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/transforms/prefixRules.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/transforms/prefixRules.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
prefixRules: () => (prefixRules)
});
/* import */ var _getVendorSettings__rspack_import_0 = __webpack_require__(/*! ../getVendorSettings */ "./node_modules/@fluentui/merge-styles/lib/getVendorSettings.js");
var autoPrefixNames = {
'user-select': 1,
};
function prefixRules(rulePairs, index) {
var vendorSettings = (0,_getVendorSettings__rspack_import_0.getVendorSettings)();
var name = rulePairs[index];
if (autoPrefixNames[name]) {
var value = rulePairs[index + 1];
if (autoPrefixNames[name]) {
if (vendorSettings.isWebkit) {
rulePairs.push('-webkit-' + name, value);
}
if (vendorSettings.isMoz) {
rulePairs.push('-moz-' + name, value);
}
if (vendorSettings.isMs) {
rulePairs.push('-ms-' + name, value);
}
if (vendorSettings.isOpera) {
rulePairs.push('-o-' + name, value);
}
}
}
}
//# sourceMappingURL=prefixRules.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/transforms/provideUnits.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/transforms/provideUnits.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
provideUnits: () => (provideUnits)
});
var NON_PIXEL_NUMBER_PROPS = [
'column-count',
'font-weight',
'flex',
'flex-grow',
'flex-shrink',
'fill-opacity',
'opacity',
'order',
'z-index',
'zoom',
];
function provideUnits(rulePairs, index) {
var name = rulePairs[index];
var value = rulePairs[index + 1];
if (typeof value === 'number') {
var isNonPixelProp = NON_PIXEL_NUMBER_PROPS.indexOf(name) > -1;
var isVariableOrPrefixed = name.indexOf('--') > -1;
var unit = isNonPixelProp || isVariableOrPrefixed ? '' : 'px';
rulePairs[index + 1] = "".concat(value).concat(unit);
}
}
//# sourceMappingURL=provideUnits.js.map
}),
"./node_modules/@fluentui/merge-styles/lib/transforms/rtlifyRules.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/merge-styles/lib/transforms/rtlifyRules.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
rtlifyRules: () => (rtlifyRules)
});
var _a;
var LEFT = 'left';
var RIGHT = 'right';
var NO_FLIP = '@noflip';
var NAME_REPLACEMENTS = (_a = {},
_a[LEFT] = RIGHT,
_a[RIGHT] = LEFT,
_a);
var VALUE_REPLACEMENTS = {
'w-resize': 'e-resize',
'sw-resize': 'se-resize',
'nw-resize': 'ne-resize',
};
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
function rtlifyRules(options, rulePairs, index) {
if (options.rtl) {
var name_1 = rulePairs[index];
if (!name_1) {
return;
}
var value = rulePairs[index + 1];
if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
}
else if (name_1.indexOf(LEFT) >= 0) {
rulePairs[index] = name_1.replace(LEFT, RIGHT);
}
else if (name_1.indexOf(RIGHT) >= 0) {
rulePairs[index] = name_1.replace(RIGHT, LEFT);
}
else if (String(value).indexOf(LEFT) >= 0) {
rulePairs[index + 1] = value.replace(LEFT, RIGHT);
}
else if (String(value).indexOf(RIGHT) >= 0) {
rulePairs[index + 1] = value.replace(RIGHT, LEFT);
}
else if (NAME_REPLACEMENTS[name_1]) {
rulePairs[index] = NAME_REPLACEMENTS[name_1];
}
else if (VALUE_REPLACEMENTS[value]) {
rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
}
else {
switch (name_1) {
case 'margin':
case 'padding':
rulePairs[index + 1] = flipQuad(value);
break;
case 'box-shadow':
rulePairs[index + 1] = negateNum(value, 0);
break;
}
}
}
}
/**
* Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value.
*/
function negateNum(value, partIndex) {
var parts = value.split(' ');
var numberVal = parseInt(parts[partIndex], 10);
parts[0] = parts[0].replace(String(numberVal), String(numberVal * -1));
return parts.join(' ');
}
/**
* Given a string quad, flips the left and right values.
*/
function flipQuad(value) {
if (typeof value === 'string') {
var parts = value.split(' ');
if (parts.length === 4) {
return "".concat(parts[0], " ").concat(parts[3], " ").concat(parts[2], " ").concat(parts[1]);
}
}
return value;
}
//# sourceMappingURL=rtlifyRules.js.map
}),
"./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FocusZone: () => (FocusZone)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _FocusZone_types__rspack_import_8 = __webpack_require__(/*! ./FocusZone.types */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js");
/* import */ var _fluentui_utilities__rspack_import_4 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/createMergedRef.js");
/* import */ var _fluentui_utilities__rspack_import_5 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _fluentui_utilities__rspack_import_6 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/dom-utilities/lib/getParent.js");
/* import */ var _fluentui_utilities__rspack_import_7 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _fluentui_utilities__rspack_import_9 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _fluentui_utilities__rspack_import_10 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _fluentui_utilities__rspack_import_11 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _fluentui_utilities__rspack_import_12 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _fluentui_utilities__rspack_import_13 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _fluentui_utilities__rspack_import_14 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _fluentui_utilities__rspack_import_15 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _fluentui_utilities__rspack_import_16 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/scroll.js");
/* import */ var _fluentui_utilities__rspack_import_17 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/dom-utilities/lib/portalContainsElement.js");
/* import */ var _fluentui_utilities__rspack_import_18 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _fluentui_utilities__rspack_import_19 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootContext.js");
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _fluentui_style_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/style-utilities */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var IS_FOCUSABLE_ATTRIBUTE = 'data-is-focusable';
var IS_ENTER_DISABLED_ATTRIBUTE = 'data-disable-click-on-enter';
var FOCUSZONE_ID_ATTRIBUTE = 'data-focuszone-id';
var TABINDEX = 'tabindex';
var NO_VERTICAL_WRAP = 'data-no-vertical-wrap';
var NO_HORIZONTAL_WRAP = 'data-no-horizontal-wrap';
var LARGE_DISTANCE_FROM_CENTER = 999999999;
var LARGE_NEGATIVE_DISTANCE_FROM_CENTER = -999999999;
var focusZoneStyles;
var focusZoneClass = 'ms-FocusZone';
/**
* Raises a click on a target element based on a keyboard event.
*/
function raiseClickFromKeyboardEvent(target, ev) {
var event;
if (typeof MouseEvent === 'function') {
event = new MouseEvent('click', {
ctrlKey: ev === null || ev === void 0 ? void 0 : ev.ctrlKey,
metaKey: ev === null || ev === void 0 ? void 0 : ev.metaKey,
shiftKey: ev === null || ev === void 0 ? void 0 : ev.shiftKey,
altKey: ev === null || ev === void 0 ? void 0 : ev.altKey,
bubbles: ev === null || ev === void 0 ? void 0 : ev.bubbles,
cancelable: ev === null || ev === void 0 ? void 0 : ev.cancelable,
});
}
else {
// eslint-disable-next-line no-restricted-globals
event = document.createEvent('MouseEvents');
// eslint-disable-next-line @typescript-eslint/no-deprecated
event.initMouseEvent('click', ev ? ev.bubbles : false, ev ? ev.cancelable : false,
// eslint-disable-next-line no-restricted-globals
window, // not using getWindow() since this can only be run client side
0, // detail
0, // screen x
0, // screen y
0, // client x
0, // client y
ev ? ev.ctrlKey : false, ev ? ev.altKey : false, ev ? ev.shiftKey : false, ev ? ev.metaKey : false, 0, // button
null);
}
target.dispatchEvent(event);
}
// Helper function that will return a class for when the root is focused
function getRootClass() {
if (!focusZoneStyles) {
focusZoneStyles = (0,_fluentui_merge_styles__rspack_import_2.mergeStyles)({
selectors: {
':focus': {
outline: 'none',
},
},
}, focusZoneClass);
}
return focusZoneStyles;
}
var _allInstances = {};
var _outerZones = new Set();
var ALLOWED_INPUT_TYPES = ['text', 'number', 'password', 'email', 'tel', 'url', 'search', 'textarea'];
var ALLOW_VIRTUAL_ELEMENTS = false;
var FocusZone = /** @class */ (function (_super) {
(0,tslib__rspack_import_3.__extends)(FocusZone, _super);
function FocusZone(props) {
var _a, _b, _c, _d;
var _this = _super.call(this, props) || this;
_this._root = react__rspack_import_0.createRef();
_this._mergedRef = (0,_fluentui_utilities__rspack_import_4.createMergedRef)();
_this._onFocus = function (ev) {
if (_this._portalContainsElement(ev.target)) {
// If the event target is inside a portal do not process the event.
return;
}
var _a = _this.props, onActiveElementChanged = _a.onActiveElementChanged,
// eslint-disable-next-line @typescript-eslint/no-deprecated
doNotAllowFocusEventToPropagate = _a.doNotAllowFocusEventToPropagate, stopFocusPropagation = _a.stopFocusPropagation,
// eslint-disable-next-line @typescript-eslint/no-deprecated
onFocusNotification = _a.onFocusNotification, onFocus = _a.onFocus, shouldFocusInnerElementWhenReceivedFocus = _a.shouldFocusInnerElementWhenReceivedFocus, defaultTabbableElement = _a.defaultTabbableElement;
var isImmediateDescendant = _this._isImmediateDescendantOfZone(ev.target);
var newActiveElement;
if (isImmediateDescendant) {
newActiveElement = ev.target;
}
else {
var parentElement = ev.target;
while (parentElement && parentElement !== _this._root.current) {
if ((0,_fluentui_utilities__rspack_import_5.isElementTabbable)(parentElement, undefined, _this._inShadowRoot) &&
_this._isImmediateDescendantOfZone(parentElement)) {
newActiveElement = parentElement;
break;
}
parentElement = (0,_fluentui_utilities__rspack_import_6.getParent)(parentElement, ALLOW_VIRTUAL_ELEMENTS);
}
}
// If an inner focusable element should be focused when FocusZone container receives focus
if (shouldFocusInnerElementWhenReceivedFocus && ev.target === _this._root.current) {
var maybeElementToFocus = defaultTabbableElement &&
typeof defaultTabbableElement === 'function' &&
_this._root.current &&
defaultTabbableElement(_this._root.current);
// try to focus defaultTabbable element
if (maybeElementToFocus && (0,_fluentui_utilities__rspack_import_5.isElementTabbable)(maybeElementToFocus, undefined, _this._inShadowRoot)) {
newActiveElement = maybeElementToFocus;
maybeElementToFocus.focus();
}
else {
// force focus on first focusable element
_this.focus(true);
if (_this._activeElement) {
// set to null as new active element was handled in method above
newActiveElement = null;
}
}
}
var initialElementFocused = !_this._activeElement;
// If the new active element is a child of this zone and received focus,
// update alignment an immediate descendant
if (newActiveElement && newActiveElement !== _this._activeElement) {
if (isImmediateDescendant || initialElementFocused) {
_this._setFocusAlignment(newActiveElement, true, true);
}
_this._activeElement = newActiveElement;
if (initialElementFocused) {
_this._updateTabIndexes();
}
}
if (onActiveElementChanged) {
onActiveElementChanged(_this._activeElement, ev);
}
if (stopFocusPropagation || doNotAllowFocusEventToPropagate) {
ev.stopPropagation();
}
if (onFocus) {
onFocus(ev);
}
else if (onFocusNotification) {
onFocusNotification();
}
};
_this._onBlur = function () {
_this._setParkedFocus(false);
};
_this._onMouseDown = function (ev) {
if (_this._portalContainsElement(ev.target)) {
// If the event target is inside a portal do not process the event.
return;
}
var disabled = _this.props.disabled;
if (disabled) {
return;
}
var target = ev.target;
var path = [];
while (target && target !== _this._root.current) {
path.push(target);
target = (0,_fluentui_utilities__rspack_import_6.getParent)(target, ALLOW_VIRTUAL_ELEMENTS);
}
while (path.length) {
target = path.pop();
if (target && (0,_fluentui_utilities__rspack_import_5.isElementTabbable)(target, undefined, _this._inShadowRoot)) {
_this._setActiveElement(target, true);
}
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(target)) {
// Stop here since the focus zone will take care of its own children.
break;
}
}
};
/**
* Handle the keystrokes.
*/
_this._onKeyDown = function (ev, theme) {
if (_this._portalContainsElement(ev.target)) {
// If the event target is inside a portal do not process the event.
return;
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, direction = _a.direction, disabled = _a.disabled, isInnerZoneKeystroke = _a.isInnerZoneKeystroke, pagingSupportDisabled = _a.pagingSupportDisabled, shouldEnterInnerZone = _a.shouldEnterInnerZone;
if (disabled) {
return;
}
if (_this.props.onKeyDown) {
_this.props.onKeyDown(ev);
}
// If the default has been prevented, do not process keyboard events.
if (ev.isDefaultPrevented()) {
return;
}
if (_this._getDocument().activeElement === _this._root.current && _this._isInnerZone) {
// If this element has focus, it is being controlled by a parent.
// Ignore the keystroke.
return;
}
if (((shouldEnterInnerZone && shouldEnterInnerZone(ev)) || (isInnerZoneKeystroke && isInnerZoneKeystroke(ev))) &&
_this._isImmediateDescendantOfZone(ev.target)) {
// Try to focus
var innerZone = _this._getFirstInnerZone();
if (innerZone) {
if (!innerZone.focus(true)) {
return;
}
}
else if ((0,_fluentui_utilities__rspack_import_5.isElementFocusSubZone)(ev.target)) {
if (!_this.focusElement((0,_fluentui_utilities__rspack_import_5.getNextElement)(ev.target, ev.target.firstChild, true))) {
return;
}
}
else {
return;
}
}
else if (ev.altKey) {
return;
}
else {
// eslint-disable-next-line @fluentui/deprecated-keyboard-event-props, @typescript-eslint/no-deprecated
switch (ev.which) {
case _fluentui_utilities__rspack_import_7.KeyCodes.space:
if (_this._shouldRaiseClicksOnSpace && _this._tryInvokeClickForFocusable(ev.target, ev)) {
break;
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.left:
if (direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.vertical) {
_this._preventDefaultWhenHandled(ev);
if (_this._moveFocusLeft(theme)) {
break;
}
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.right:
if (direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.vertical) {
_this._preventDefaultWhenHandled(ev);
if (_this._moveFocusRight(theme)) {
break;
}
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.up:
if (direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.horizontal) {
_this._preventDefaultWhenHandled(ev);
if (_this._moveFocusUp()) {
break;
}
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.down:
if (direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.horizontal) {
_this._preventDefaultWhenHandled(ev);
if (_this._moveFocusDown()) {
break;
}
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.pageDown:
if (!pagingSupportDisabled && _this._moveFocusPaging(true)) {
break;
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.pageUp:
if (!pagingSupportDisabled && _this._moveFocusPaging(false)) {
break;
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.tab:
if (
// eslint-disable-next-line @typescript-eslint/no-deprecated
_this.props.allowTabKey ||
_this.props.handleTabKey === _FocusZone_types__rspack_import_8.FocusZoneTabbableElements.all ||
(_this.props.handleTabKey === _FocusZone_types__rspack_import_8.FocusZoneTabbableElements.inputOnly &&
_this._isElementInput(ev.target))) {
var focusChanged = false;
_this._processingTabKey = true;
if (direction === _FocusZone_types__rspack_import_8.FocusZoneDirection.vertical ||
!_this._shouldWrapFocus(_this._activeElement, NO_HORIZONTAL_WRAP)) {
focusChanged = ev.shiftKey ? _this._moveFocusUp() : _this._moveFocusDown();
}
else {
var tabWithDirection = (0,_fluentui_utilities__rspack_import_9.getRTL)(theme) ? !ev.shiftKey : ev.shiftKey;
focusChanged = tabWithDirection ? _this._moveFocusLeft(theme) : _this._moveFocusRight(theme);
}
_this._processingTabKey = false;
if (focusChanged) {
break;
}
else if (_this.props.shouldResetActiveElementWhenTabFromZone) {
_this._activeElement = null;
}
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.home:
if (_this._isContentEditableElement(ev.target) ||
(_this._isElementInput(ev.target) &&
!_this._shouldInputLoseFocus(ev.target, false))) {
return false;
}
var firstChild = _this._root.current && _this._root.current.firstChild;
if (_this._root.current &&
firstChild &&
_this.focusElement((0,_fluentui_utilities__rspack_import_5.getNextElement)(_this._root.current, firstChild, true))) {
break;
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.end:
if (_this._isContentEditableElement(ev.target) ||
(_this._isElementInput(ev.target) &&
!_this._shouldInputLoseFocus(ev.target, true))) {
return false;
}
var lastChild = _this._root.current && _this._root.current.lastChild;
if (_this._root.current &&
_this.focusElement((0,_fluentui_utilities__rspack_import_5.getPreviousElement)(_this._root.current, lastChild, true, true, true))) {
break;
}
return;
case _fluentui_utilities__rspack_import_7.KeyCodes.enter:
if (_this._shouldRaiseClicksOnEnter && _this._tryInvokeClickForFocusable(ev.target, ev)) {
break;
}
return;
default:
return;
}
}
ev.preventDefault();
ev.stopPropagation();
};
_this._getHorizontalDistanceFromCenter = function (isForward,
// eslint-disable-next-line @typescript-eslint/no-deprecated
activeRect,
// eslint-disable-next-line @typescript-eslint/no-deprecated
targetRect) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var leftAlignment = _this._focusAlignment.left || _this._focusAlignment.x || 0;
// ClientRect values can be floats that differ by very small fractions of a decimal.
// If the difference between top and bottom are within a pixel then we should treat
// them as equivalent by using Math.floor. For instance 5.2222 and 5.222221 should be equivalent,
// but without Math.Floor they will be handled incorrectly.
var targetRectTop = Math.floor(targetRect.top);
var activeRectBottom = Math.floor(activeRect.bottom);
var targetRectBottom = Math.floor(targetRect.bottom);
var activeRectTop = Math.floor(activeRect.top);
var isValidCandidateOnpagingDown = isForward && targetRectTop > activeRectBottom;
var isValidCandidateOnpagingUp = !isForward && targetRectBottom < activeRectTop;
if (isValidCandidateOnpagingDown || isValidCandidateOnpagingUp) {
if (leftAlignment >= targetRect.left && leftAlignment <= targetRect.left + targetRect.width) {
return 0;
}
return Math.abs(targetRect.left + targetRect.width / 2 - leftAlignment);
}
if (!_this._shouldWrapFocus(_this._activeElement, NO_VERTICAL_WRAP)) {
return LARGE_NEGATIVE_DISTANCE_FROM_CENTER;
}
return LARGE_DISTANCE_FROM_CENTER;
};
// Manage componentRef resolution.
(0,_fluentui_utilities__rspack_import_10.initializeComponentRef)(_this);
if (true) {
(0,_fluentui_utilities__rspack_import_11.warnDeprecations)('FocusZone', props, {
rootProps: undefined,
allowTabKey: 'handleTabKey',
elementType: 'as',
ariaDescribedBy: 'aria-describedby',
ariaLabelledBy: 'aria-labelledby',
});
}
_this._id = (0,_fluentui_utilities__rspack_import_12.getId)('FocusZone');
_this._focusAlignment = {
left: 0,
top: 0,
};
_this._processingTabKey = false;
var shouldRaiseClicksFallback = (_b = (_a = props.shouldRaiseClicks) !== null && _a !== void 0 ? _a : FocusZone.defaultProps.shouldRaiseClicks) !== null && _b !== void 0 ? _b : true;
_this._shouldRaiseClicksOnEnter = (_c = props.shouldRaiseClicksOnEnter) !== null && _c !== void 0 ? _c : shouldRaiseClicksFallback;
_this._shouldRaiseClicksOnSpace = (_d = props.shouldRaiseClicksOnSpace) !== null && _d !== void 0 ? _d : shouldRaiseClicksFallback;
return _this;
}
/** Used for testing purposes only. */
FocusZone.getOuterZones = function () {
return _outerZones.size;
};
/**
* Handle global tab presses so that we can patch tabindexes on the fly.
* HEADS UP: This must not be an arrow function in order to be referentially equal among instances
* for ref counting to work correctly!
*/
FocusZone._onKeyDownCapture = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated, @fluentui/deprecated-keyboard-event-props
if (ev.which === _fluentui_utilities__rspack_import_7.KeyCodes.tab) {
_outerZones.forEach(function (zone) { return zone._updateTabIndexes(); });
}
};
FocusZone.prototype.componentDidMount = function () {
var _a;
var root = this._root.current;
this._inShadowRoot = !!((_a = this.context) === null || _a === void 0 ? void 0 : _a.shadowRoot);
_allInstances[this._id] = this;
if (root) {
var parentElement = (0,_fluentui_utilities__rspack_import_6.getParent)(root, ALLOW_VIRTUAL_ELEMENTS);
while (parentElement && parentElement !== this._getDocument().body && parentElement.nodeType === 1) {
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(parentElement)) {
this._isInnerZone = true;
break;
}
parentElement = (0,_fluentui_utilities__rspack_import_6.getParent)(parentElement, ALLOW_VIRTUAL_ELEMENTS);
}
if (!this._isInnerZone) {
_outerZones.add(this);
this._root.current && this._root.current.addEventListener('keydown', FocusZone._onKeyDownCapture, true);
}
this._root.current && this._root.current.addEventListener('blur', this._onBlur, true);
// Assign initial tab indexes so that we can set initial focus as appropriate.
this._updateTabIndexes();
if (this.props.defaultTabbableElement && typeof this.props.defaultTabbableElement === 'string') {
this._activeElement = this._getDocument().querySelector(this.props.defaultTabbableElement);
// eslint-disable-next-line @typescript-eslint/no-deprecated
}
else if (this.props.defaultActiveElement) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
this._activeElement = this._getDocument().querySelector(this.props.defaultActiveElement);
}
if (this.props.shouldFocusOnMount) {
this.focus();
}
}
};
FocusZone.prototype.componentDidUpdate = function () {
var _a;
var root = this._root.current;
var doc = this._getDocument();
this._inShadowRoot = !!((_a = this.context) === null || _a === void 0 ? void 0 : _a.shadowRoot);
// If either _activeElement or _defaultFocusElement are no longer contained by _root,
// reset those variables (and update tab indexes) to avoid memory leaks
if ((this._activeElement && !(0,_fluentui_utilities__rspack_import_13.elementContains)(this._root.current, this._activeElement, ALLOW_VIRTUAL_ELEMENTS)) ||
(this._defaultFocusElement &&
!(0,_fluentui_utilities__rspack_import_13.elementContains)(this._root.current, this._defaultFocusElement, ALLOW_VIRTUAL_ELEMENTS))) {
this._activeElement = null;
this._defaultFocusElement = null;
this._updateTabIndexes();
}
if (!this.props.preventFocusRestoration &&
doc &&
this._lastIndexPath &&
(doc.activeElement === doc.body || doc.activeElement === null || doc.activeElement === root)) {
// The element has been removed after the render, attempt to restore focus.
var elementToFocus = (0,_fluentui_utilities__rspack_import_5.getFocusableByIndexPath)(root, this._lastIndexPath);
if (elementToFocus) {
this._setActiveElement(elementToFocus, true);
elementToFocus.focus();
this._setParkedFocus(false);
}
else {
// We had a focus path to restore, but now that path is unresolvable. Park focus
// on the container until we can try again.
this._setParkedFocus(true);
}
}
};
FocusZone.prototype.componentWillUnmount = function () {
delete _allInstances[this._id];
if (!this._isInnerZone) {
_outerZones.delete(this);
this._root.current && this._root.current.removeEventListener('keydown', FocusZone._onKeyDownCapture, true);
}
if (this._root.current) {
this._root.current.removeEventListener('blur', this._onBlur, true);
}
this._activeElement = null;
this._defaultFocusElement = null;
};
FocusZone.prototype.render = function () {
var _this = this;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = this.props, tag = _a.as, elementType = _a.elementType, rootProps = _a.rootProps, ariaDescribedBy = _a.ariaDescribedBy, ariaLabelledBy = _a.ariaLabelledBy, className = _a.className;
var divProps = (0,_fluentui_utilities__rspack_import_14.getNativeProps)(this.props, _fluentui_utilities__rspack_import_14.htmlElementProperties);
var Tag = tag || elementType || 'div';
// Note, right before rendering/reconciling proceeds, we need to record if focus
// was in the zone before the update. This helper will track this and, if focus
// was actually in the zone, what the index path to the element is at this time.
// Then, later in componentDidUpdate, we can evaluate if we need to restore it in
// the case the element was removed.
this._evaluateFocusBeforeRender();
// Only support RTL defined in global theme, not contextual theme/RTL.
var theme = (0,_fluentui_style_utilities__rspack_import_1.getTheme)();
return (react__rspack_import_0.createElement(Tag, (0,tslib__rspack_import_3.__assign)({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }, divProps, rootProps, {
// Once the getClassName correctly memoizes inputs this should
// be replaced so that className is passed to getRootClass and is included there so
// the class names will always be in the same order.
className: (0,_fluentui_utilities__rspack_import_15.css)(getRootClass(), className),
// eslint-disable-next-line @typescript-eslint/no-deprecated
ref: this._mergedRef(this.props.elementRef, this._root), "data-focuszone-id": this._id,
// eslint-disable-next-line react/jsx-no-bind
onKeyDown: function (ev) { return _this._onKeyDown(ev, theme); }, onFocus: this._onFocus, onMouseDownCapture: this._onMouseDown }), this.props.children));
};
/**
* Sets focus to the first tabbable item in the zone.
* @param forceIntoFirstElement - If true, focus will be forced into the first element, even
* if focus is already in the focus zone.
* @param bypassHiddenElements - If true, focus will be not be set on hidden elements.
* @returns True if focus could be set to an active element, false if no operation was taken.
*/
FocusZone.prototype.focus = function (forceIntoFirstElement, bypassHiddenElements) {
if (forceIntoFirstElement === void 0) { forceIntoFirstElement = false; }
if (bypassHiddenElements === void 0) { bypassHiddenElements = false; }
if (this._root.current) {
if (!forceIntoFirstElement &&
this._root.current.getAttribute(IS_FOCUSABLE_ATTRIBUTE) === 'true' &&
this._isInnerZone) {
var ownerZoneElement = this._getOwnerZone(this._root.current);
if (ownerZoneElement !== this._root.current) {
var ownerZone = _allInstances[ownerZoneElement.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];
return !!ownerZone && ownerZone.focusElement(this._root.current);
}
return false;
}
else if (!forceIntoFirstElement &&
this._activeElement &&
(0,_fluentui_utilities__rspack_import_13.elementContains)(this._root.current, this._activeElement) &&
(0,_fluentui_utilities__rspack_import_5.isElementTabbable)(this._activeElement, undefined, this._inShadowRoot) &&
(!bypassHiddenElements || (0,_fluentui_utilities__rspack_import_5.isElementVisibleAndNotHidden)(this._activeElement))) {
this._activeElement.focus();
return true;
}
else {
var firstChild = this._root.current.firstChild;
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getNextElement)(this._root.current, firstChild, true, undefined, undefined, undefined, undefined, undefined, bypassHiddenElements));
}
}
return false;
};
/**
* Sets focus to the last tabbable item in the zone.
* @returns True if focus could be set to an active element, false if no operation was taken.
*/
FocusZone.prototype.focusLast = function () {
if (this._root.current) {
var lastChild = this._root.current && this._root.current.lastChild;
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getPreviousElement)(this._root.current, lastChild, true, true, true));
}
return false;
};
/**
* Sets focus to a specific child element within the zone. This can be used in conjunction with
* shouldReceiveFocus to create delayed focus scenarios (like animate the scroll position to the correct
* location and then focus.)
* @param element - The child element within the zone to focus.
* @param forceAlignment - If true, focus alignment will be set according to the element provided.
* @returns True if focus could be set to an active element, false if no operation was taken.
*/
FocusZone.prototype.focusElement = function (element, forceAlignment) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = this.props, onBeforeFocus = _a.onBeforeFocus, shouldReceiveFocus = _a.shouldReceiveFocus;
if ((shouldReceiveFocus && !shouldReceiveFocus(element)) || (onBeforeFocus && !onBeforeFocus(element))) {
return false;
}
if (element) {
// when we set focus to a specific child, we should recalculate the alignment depending on its position.
this._setActiveElement(element, forceAlignment);
if (this._activeElement) {
this._activeElement.focus();
}
return true;
}
return false;
};
/**
* Forces horizontal alignment in the context of vertical arrowing to use specific point as the reference,
* rather than a center based on the last horizontal motion.
* @param point - the new reference point.
*/
FocusZone.prototype.setFocusAlignment = function (point) {
this._focusAlignment = point;
};
Object.defineProperty(FocusZone.prototype, "defaultFocusElement", {
get: function () {
return this._defaultFocusElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FocusZone.prototype, "activeElement", {
get: function () {
return this._activeElement;
},
enumerable: false,
configurable: true
});
FocusZone.prototype._evaluateFocusBeforeRender = function () {
var root = this._root.current;
var doc = this._getDocument();
if (doc) {
var focusedElement = doc.activeElement;
// Only update the index path if we are not parked on the root.
if (focusedElement !== root) {
var shouldRestoreFocus = (0,_fluentui_utilities__rspack_import_13.elementContains)(root, focusedElement, false);
this._lastIndexPath = shouldRestoreFocus ? (0,_fluentui_utilities__rspack_import_5.getElementIndexPath)(root, focusedElement) : undefined;
}
}
};
/**
* When focus is in the zone at render time but then all focusable elements are removed,
* we "park" focus temporarily on the root. Once we update with focusable children, we restore
* focus to the closest path from previous. If the user tabs away from the parked container,
* we restore focusability to the pre-parked state.
*/
FocusZone.prototype._setParkedFocus = function (isParked) {
var root = this._root.current;
if (root && this._isParked !== isParked) {
this._isParked = isParked;
if (isParked) {
if (!this.props.allowFocusRoot) {
this._parkedTabIndex = root.getAttribute('tabindex');
root.setAttribute('tabindex', '-1');
}
root.focus();
}
else if (!this.props.allowFocusRoot) {
if (this._parkedTabIndex) {
root.setAttribute('tabindex', this._parkedTabIndex);
this._parkedTabIndex = undefined;
}
else {
root.removeAttribute('tabindex');
}
}
}
};
FocusZone.prototype._setActiveElement = function (element, forceAlignment) {
var previousActiveElement = this._activeElement;
this._activeElement = element;
if (previousActiveElement) {
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(previousActiveElement)) {
this._updateTabIndexes(previousActiveElement);
}
previousActiveElement.tabIndex = -1;
}
if (this._activeElement) {
if (!this._focusAlignment || forceAlignment) {
this._setFocusAlignment(element, true, true);
}
this._activeElement.tabIndex = 0;
}
};
FocusZone.prototype._preventDefaultWhenHandled = function (ev) {
this.props.preventDefaultWhenHandled && ev.preventDefault();
};
/**
* Walk up the dom try to find a focusable element.
*/
FocusZone.prototype._tryInvokeClickForFocusable = function (targetElement, ev) {
var target = targetElement;
if (target === this._root.current) {
return false;
}
do {
if (target.tagName === 'BUTTON' ||
target.tagName === 'A' ||
target.tagName === 'INPUT' ||
target.tagName === 'TEXTAREA' ||
target.tagName === 'SUMMARY') {
return false;
}
if (this._isImmediateDescendantOfZone(target) &&
target.getAttribute(IS_FOCUSABLE_ATTRIBUTE) === 'true' &&
target.getAttribute(IS_ENTER_DISABLED_ATTRIBUTE) !== 'true') {
raiseClickFromKeyboardEvent(target, ev);
return true;
}
target = (0,_fluentui_utilities__rspack_import_6.getParent)(target, ALLOW_VIRTUAL_ELEMENTS);
} while (target !== this._root.current);
return false;
};
/**
* Traverse to find first child zone.
*/
FocusZone.prototype._getFirstInnerZone = function (rootElement) {
rootElement = rootElement || this._activeElement || this._root.current;
if (!rootElement) {
return null;
}
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(rootElement)) {
return _allInstances[rootElement.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];
}
var child = rootElement.firstElementChild;
while (child) {
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(child)) {
return _allInstances[child.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];
}
var match = this._getFirstInnerZone(child);
if (match) {
return match;
}
child = child.nextElementSibling;
}
return null;
};
FocusZone.prototype._moveFocus = function (isForward,
// eslint-disable-next-line @typescript-eslint/no-deprecated
getDistanceFromCenter, ev, useDefaultWrap) {
if (useDefaultWrap === void 0) { useDefaultWrap = true; }
var element = this._activeElement;
var candidateDistance = -1;
var candidateElement = undefined;
var changedFocus = false;
var isBidirectional = this.props.direction === _FocusZone_types__rspack_import_8.FocusZoneDirection.bidirectional;
if (!element || !this._root.current) {
return false;
}
if (this._isElementInput(element)) {
if (!this._shouldInputLoseFocus(element, isForward)) {
return false;
}
}
var activeRect = isBidirectional ? element.getBoundingClientRect() : null;
do {
element = (isForward ? (0,_fluentui_utilities__rspack_import_5.getNextElement)(this._root.current, element) : (0,_fluentui_utilities__rspack_import_5.getPreviousElement)(this._root.current, element));
if (isBidirectional) {
if (element) {
var targetRect = element.getBoundingClientRect();
// eslint-disable-next-line @typescript-eslint/no-deprecated
var elementDistance = getDistanceFromCenter(activeRect, targetRect);
if (elementDistance === -1 && candidateDistance === -1) {
candidateElement = element;
break;
}
if (elementDistance > -1 && (candidateDistance === -1 || elementDistance < candidateDistance)) {
candidateDistance = elementDistance;
candidateElement = element;
}
if (candidateDistance >= 0 && elementDistance < 0) {
break;
}
}
}
else {
candidateElement = element;
break;
}
} while (element);
// Focus the closest candidate
if (candidateElement && candidateElement !== this._activeElement) {
changedFocus = true;
this.focusElement(candidateElement);
}
else if (this.props.isCircularNavigation && useDefaultWrap) {
if (isForward) {
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getNextElement)(this._root.current, this._root.current.firstElementChild, true));
}
else {
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getPreviousElement)(this._root.current, this._root.current.lastElementChild, true, true, true));
}
}
return changedFocus;
};
FocusZone.prototype._moveFocusDown = function () {
var _this = this;
var targetTop = -1;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0;
if (
// eslint-disable-next-line @typescript-eslint/no-deprecated
this._moveFocus(true, function (activeRect, targetRect) {
var distance = -1;
// ClientRect values can be floats that differ by very small fractions of a decimal.
// If the difference between top and bottom are within a pixel then we should treat
// them as equivalent by using Math.floor. For instance 5.2222 and 5.222221 should be equivalent,
// but without Math.Floor they will be handled incorrectly.
var targetRectTop = Math.floor(targetRect.top);
var activeRectBottom = Math.floor(activeRect.bottom);
if (targetRectTop < activeRectBottom) {
if (!_this._shouldWrapFocus(_this._activeElement, NO_VERTICAL_WRAP)) {
return LARGE_NEGATIVE_DISTANCE_FROM_CENTER;
}
return LARGE_DISTANCE_FROM_CENTER;
}
if ((targetTop === -1 && targetRectTop >= activeRectBottom) || targetRectTop === targetTop) {
targetTop = targetRectTop;
if (leftAlignment >= targetRect.left && leftAlignment <= targetRect.left + targetRect.width) {
distance = 0;
}
else {
distance = Math.abs(targetRect.left + targetRect.width / 2 - leftAlignment);
}
}
return distance;
})) {
this._setFocusAlignment(this._activeElement, false, true);
return true;
}
return false;
};
FocusZone.prototype._moveFocusUp = function () {
var _this = this;
var targetTop = -1;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0;
if (
// eslint-disable-next-line @typescript-eslint/no-deprecated
this._moveFocus(false, function (activeRect, targetRect) {
var distance = -1;
// ClientRect values can be floats that differ by very small fractions of a decimal.
// If the difference between top and bottom are within a pixel then we should treat
// them as equivalent by using Math.floor. For instance 5.2222 and 5.222221 should be equivalent,
// but without Math.Floor they will be handled incorrectly.
var targetRectBottom = Math.floor(targetRect.bottom);
var targetRectTop = Math.floor(targetRect.top);
var activeRectTop = Math.floor(activeRect.top);
if (targetRectBottom > activeRectTop) {
if (!_this._shouldWrapFocus(_this._activeElement, NO_VERTICAL_WRAP)) {
return LARGE_NEGATIVE_DISTANCE_FROM_CENTER;
}
return LARGE_DISTANCE_FROM_CENTER;
}
if ((targetTop === -1 && targetRectBottom <= activeRectTop) || targetRectTop === targetTop) {
targetTop = targetRectTop;
if (leftAlignment >= targetRect.left && leftAlignment <= targetRect.left + targetRect.width) {
distance = 0;
}
else {
distance = Math.abs(targetRect.left + targetRect.width / 2 - leftAlignment);
}
}
return distance;
})) {
this._setFocusAlignment(this._activeElement, false, true);
return true;
}
return false;
};
FocusZone.prototype._moveFocusLeft = function (theme) {
var _this = this;
var shouldWrap = this._shouldWrapFocus(this._activeElement, NO_HORIZONTAL_WRAP);
if (this._moveFocus((0,_fluentui_utilities__rspack_import_9.getRTL)(theme),
// eslint-disable-next-line @typescript-eslint/no-deprecated
function (activeRect, targetRect) {
var distance = -1;
var topBottomComparison;
if ((0,_fluentui_utilities__rspack_import_9.getRTL)(theme)) {
// When in RTL, this comparison should be the same as the one in _moveFocusRight for LTR.
// Going left at a leftmost rectangle will go down a line instead of up a line like in LTR.
// This is important, because we want to be comparing the top of the target rect
// with the bottom of the active rect.
topBottomComparison = parseFloat(targetRect.top.toFixed(3)) < parseFloat(activeRect.bottom.toFixed(3));
}
else {
topBottomComparison = parseFloat(targetRect.bottom.toFixed(3)) > parseFloat(activeRect.top.toFixed(3));
}
if (topBottomComparison &&
targetRect.right <= activeRect.right &&
_this.props.direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.vertical) {
distance = activeRect.right - targetRect.right;
}
else if (!shouldWrap) {
distance = LARGE_NEGATIVE_DISTANCE_FROM_CENTER;
}
return distance;
}, undefined /*ev*/, shouldWrap)) {
this._setFocusAlignment(this._activeElement, true, false);
return true;
}
return false;
};
FocusZone.prototype._moveFocusRight = function (theme) {
var _this = this;
var shouldWrap = this._shouldWrapFocus(this._activeElement, NO_HORIZONTAL_WRAP);
if (this._moveFocus(!(0,_fluentui_utilities__rspack_import_9.getRTL)(theme),
// eslint-disable-next-line @typescript-eslint/no-deprecated
function (activeRect, targetRect) {
var distance = -1;
var topBottomComparison;
if ((0,_fluentui_utilities__rspack_import_9.getRTL)(theme)) {
// When in RTL, this comparison should be the same as the one in _moveFocusLeft for LTR.
// Going right at a rightmost rectangle will go up a line instead of down a line like in LTR.
// This is important, because we want to be comparing the bottom of the target rect
// with the top of the active rect.
topBottomComparison = parseFloat(targetRect.bottom.toFixed(3)) > parseFloat(activeRect.top.toFixed(3));
}
else {
topBottomComparison = parseFloat(targetRect.top.toFixed(3)) < parseFloat(activeRect.bottom.toFixed(3));
}
if (topBottomComparison &&
targetRect.left >= activeRect.left &&
_this.props.direction !== _FocusZone_types__rspack_import_8.FocusZoneDirection.vertical) {
distance = targetRect.left - activeRect.left;
}
else if (!shouldWrap) {
distance = LARGE_NEGATIVE_DISTANCE_FROM_CENTER;
}
return distance;
}, undefined /*ev*/, shouldWrap)) {
this._setFocusAlignment(this._activeElement, true, false);
return true;
}
return false;
};
FocusZone.prototype._moveFocusPaging = function (isForward, useDefaultWrap) {
if (useDefaultWrap === void 0) { useDefaultWrap = true; }
var element = this._activeElement;
if (!element || !this._root.current) {
return false;
}
if (this._isElementInput(element)) {
if (!this._shouldInputLoseFocus(element, isForward)) {
return false;
}
}
var scrollableParent = (0,_fluentui_utilities__rspack_import_16.findScrollableParent)(element);
if (!scrollableParent) {
return false;
}
var candidateDistance = -1;
var candidateElement = undefined;
var targetTop = -1;
var targetBottom = -1;
var pagesize = scrollableParent.clientHeight;
var activeRect = element.getBoundingClientRect();
do {
element = isForward
? (0,_fluentui_utilities__rspack_import_5.getNextElement)(this._root.current, element)
: (0,_fluentui_utilities__rspack_import_5.getPreviousElement)(this._root.current, element);
if (element) {
var targetRect = element.getBoundingClientRect();
var targetRectTop = Math.floor(targetRect.top);
var activeRectBottom = Math.floor(activeRect.bottom);
var targetRectBottom = Math.floor(targetRect.bottom);
var activeRectTop = Math.floor(activeRect.top);
var elementDistance = this._getHorizontalDistanceFromCenter(isForward, activeRect, targetRect);
var isElementPassedPageSizeOnPagingDown = isForward && targetRectTop > activeRectBottom + pagesize;
var isElementPassedPageSizeOnPagingUp = !isForward && targetRectBottom < activeRectTop - pagesize;
if (isElementPassedPageSizeOnPagingDown || isElementPassedPageSizeOnPagingUp) {
break;
}
if (elementDistance > -1) {
// for paging down
if (isForward && targetRectTop > targetTop) {
targetTop = targetRectTop;
candidateDistance = elementDistance;
candidateElement = element;
}
else if (!isForward && targetRectBottom < targetBottom) {
// for paging up
targetBottom = targetRectBottom;
candidateDistance = elementDistance;
candidateElement = element;
}
else if (candidateDistance === -1 || elementDistance <= candidateDistance) {
candidateDistance = elementDistance;
candidateElement = element;
}
}
}
} while (element);
var changedFocus = false;
// Focus the closest candidate
if (candidateElement && candidateElement !== this._activeElement) {
changedFocus = true;
this.focusElement(candidateElement);
this._setFocusAlignment(candidateElement, false, true);
}
else if (this.props.isCircularNavigation && useDefaultWrap) {
if (isForward) {
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getNextElement)(this._root.current, this._root.current.firstElementChild, true));
}
return this.focusElement((0,_fluentui_utilities__rspack_import_5.getPreviousElement)(this._root.current, this._root.current.lastElementChild, true, true, true));
}
return changedFocus;
};
FocusZone.prototype._setFocusAlignment = function (element, isHorizontal, isVertical) {
if (this.props.direction === _FocusZone_types__rspack_import_8.FocusZoneDirection.bidirectional &&
(!this._focusAlignment || isHorizontal || isVertical)) {
var rect = element.getBoundingClientRect();
var left = rect.left + rect.width / 2;
var top_1 = rect.top + rect.height / 2;
if (!this._focusAlignment) {
this._focusAlignment = { left: left, top: top_1 };
}
if (isHorizontal) {
this._focusAlignment.left = left;
}
if (isVertical) {
this._focusAlignment.top = top_1;
}
}
};
FocusZone.prototype._isImmediateDescendantOfZone = function (element) {
return this._getOwnerZone(element) === this._root.current;
};
FocusZone.prototype._getOwnerZone = function (element) {
var parentElement = (0,_fluentui_utilities__rspack_import_6.getParent)(element, ALLOW_VIRTUAL_ELEMENTS);
while (parentElement && parentElement !== this._root.current && parentElement !== this._getDocument().body) {
if ((0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(parentElement)) {
return parentElement;
}
parentElement = (0,_fluentui_utilities__rspack_import_6.getParent)(parentElement, ALLOW_VIRTUAL_ELEMENTS);
}
return parentElement;
};
FocusZone.prototype._updateTabIndexes = function (element) {
if (!this._activeElement &&
this.props.defaultTabbableElement &&
typeof this.props.defaultTabbableElement === 'function') {
this._activeElement = this.props.defaultTabbableElement(this._root.current);
}
if (!element && this._root.current) {
this._defaultFocusElement = null;
element = this._root.current;
if (this._activeElement && !(0,_fluentui_utilities__rspack_import_13.elementContains)(element, this._activeElement)) {
this._activeElement = null;
}
}
// If active element changes state to disabled, set it to null.
// Otherwise, we lose keyboard accessibility to other elements in focus zone.
if (this._activeElement && !(0,_fluentui_utilities__rspack_import_5.isElementTabbable)(this._activeElement, undefined, this._inShadowRoot)) {
this._activeElement = null;
}
var childNodes = element && element.children;
for (var childIndex = 0; childNodes && childIndex < childNodes.length; childIndex++) {
var child = childNodes[childIndex];
if (!(0,_fluentui_utilities__rspack_import_5.isElementFocusZone)(child)) {
// If the item is explicitly set to not be focusable then TABINDEX needs to be set to -1.
if (child.getAttribute && child.getAttribute(IS_FOCUSABLE_ATTRIBUTE) === 'false') {
child.setAttribute(TABINDEX, '-1');
}
if ((0,_fluentui_utilities__rspack_import_5.isElementTabbable)(child, undefined, this._inShadowRoot)) {
if (this.props.disabled) {
child.setAttribute(TABINDEX, '-1');
}
else if (!this._isInnerZone &&
((!this._activeElement && !this._defaultFocusElement) || this._activeElement === child)) {
this._defaultFocusElement = child;
if (child.getAttribute(TABINDEX) !== '0') {
child.setAttribute(TABINDEX, '0');
}
}
else if (child.getAttribute(TABINDEX) !== '-1') {
child.setAttribute(TABINDEX, '-1');
}
}
else if (child.tagName === 'svg' && child.getAttribute('focusable') !== 'false') {
// Disgusting IE hack. Sad face.
child.setAttribute('focusable', 'false');
}
}
else if (child.getAttribute(IS_FOCUSABLE_ATTRIBUTE) === 'true') {
if (!this._isInnerZone &&
((!this._activeElement && !this._defaultFocusElement) || this._activeElement === child)) {
this._defaultFocusElement = child;
if (child.getAttribute(TABINDEX) !== '0') {
child.setAttribute(TABINDEX, '0');
}
}
else if (child.getAttribute(TABINDEX) !== '-1') {
child.setAttribute(TABINDEX, '-1');
}
}
this._updateTabIndexes(child);
}
};
FocusZone.prototype._isContentEditableElement = function (element) {
return element && element.getAttribute('contenteditable') === 'true';
};
FocusZone.prototype._isElementInput = function (element) {
if (element &&
element.tagName &&
(element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea')) {
return true;
}
return false;
};
FocusZone.prototype._shouldInputLoseFocus = function (element, isForward) {
// If a tab was used, we want to focus on the next element.
if (!this._processingTabKey &&
element &&
element.type &&
ALLOWED_INPUT_TYPES.indexOf(element.type.toLowerCase()) > -1) {
var selectionStart = element.selectionStart;
var selectionEnd = element.selectionEnd;
var isRangeSelected = selectionStart !== selectionEnd;
var inputValue = element.value;
var isReadonly = element.readOnly;
// We shouldn't lose focus in the following cases:
// 1. There is range selected.
// 2. When selection start is larger than 0 and it is backward and not readOnly.
// 3. when selection start is not the end of length, it is forward and not readOnly.
// 4. We press any of the arrow keys when our handleTabKey isn't none or undefined (only losing focus if we hit
// tab) and if shouldInputLoseFocusOnArrowKey is defined, if scenario prefers to not loose the focus which is
// determined by calling the callback shouldInputLoseFocusOnArrowKey
if (isRangeSelected ||
(selectionStart > 0 && !isForward && !isReadonly) ||
(selectionStart !== inputValue.length && isForward && !isReadonly) ||
(!!this.props.handleTabKey &&
!(this.props.shouldInputLoseFocusOnArrowKey && this.props.shouldInputLoseFocusOnArrowKey(element)))) {
return false;
}
}
return true;
};
FocusZone.prototype._shouldWrapFocus = function (element, noWrapDataAttribute) {
return this.props.checkForNoWrap ? (0,_fluentui_utilities__rspack_import_5.shouldWrapFocus)(element, noWrapDataAttribute) : true;
};
/**
* Returns true if the element is a descendant of the FocusZone through a React portal.
*/
FocusZone.prototype._portalContainsElement = function (element) {
return element && !!this._root.current && (0,_fluentui_utilities__rspack_import_17.portalContainsElement)(element, this._root.current);
};
FocusZone.prototype._getDocument = function () {
return (0,_fluentui_utilities__rspack_import_18.getDocument)(this._root.current);
};
FocusZone.defaultProps = {
isCircularNavigation: false,
direction: _FocusZone_types__rspack_import_8.FocusZoneDirection.bidirectional,
shouldRaiseClicks: true,
// Hardcoding uncontrolled flag for proper interop with FluentUI V9.
'data-tabster': '{"uncontrolled": {}}',
};
FocusZone.contextType = _fluentui_utilities__rspack_import_19.MergeStylesShadowRootContext;
return FocusZone;
}(react__rspack_import_0.Component));
//# sourceMappingURL=FocusZone.js.map
}),
"./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js ***!
\****************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FocusZoneDirection: () => (FocusZoneDirection),
FocusZoneTabbableElements: () => (FocusZoneTabbableElements)
});
/**
* {@docCategory FocusZone}
*/
var FocusZoneTabbableElements = {
/** Tabbing is not allowed */
none: 0,
/** All tabbing action is allowed */
all: 1,
/** Tabbing is allowed only on input elements */
inputOnly: 2,
};
/**
* {@docCategory FocusZone}
*/
var FocusZoneDirection;
(function (FocusZoneDirection) {
/** Only react to up/down arrows. */
FocusZoneDirection[FocusZoneDirection["vertical"] = 0] = "vertical";
/** Only react to left/right arrows. */
FocusZoneDirection[FocusZoneDirection["horizontal"] = 1] = "horizontal";
/** React to all arrows. */
FocusZoneDirection[FocusZoneDirection["bidirectional"] = 2] = "bidirectional";
/**
* React to all arrows. Navigate next item in DOM on right/down arrow keys and previous - left/up arrow keys.
* Right and Left arrow keys are swapped in RTL mode.
*/
FocusZoneDirection[FocusZoneDirection["domOrder"] = 3] = "domOrder";
})(FocusZoneDirection || (FocusZoneDirection = {}));
//# sourceMappingURL=FocusZone.types.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useAsync.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useAsync.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useAsync: () => (useAsync)
});
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Hook to provide an Async instance that is automatically cleaned up on dismount.
*/
function useAsync() {
var asyncRef = react__rspack_import_0.useRef(undefined);
if (!asyncRef.current) {
asyncRef.current = new _fluentui_utilities__rspack_import_1.Async();
}
react__rspack_import_0.useEffect(function () {
return function () {
var _a;
(_a = asyncRef.current) === null || _a === void 0 ? void 0 : _a.dispose();
asyncRef.current = undefined;
};
}, []);
return asyncRef.current;
}
//# sourceMappingURL=useAsync.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useBoolean.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useBoolean.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useBoolean: () => (useBoolean)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _useConst__rspack_import_1 = __webpack_require__(/*! ./useConst */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/**
* Hook to store a value and generate callbacks for setting the value to true or false.
* The identity of the callbacks will always stay the same.
*
* @param initialState - Initial value
* @returns Array with the current value and an object containing the updater callbacks.
*/
function useBoolean(initialState) {
var _a = react__rspack_import_0.useState(initialState), value = _a[0], setValue = _a[1];
var setTrue = (0,_useConst__rspack_import_1.useConst)(function () { return function () {
setValue(true);
}; });
var setFalse = (0,_useConst__rspack_import_1.useConst)(function () { return function () {
setValue(false);
}; });
var toggle = (0,_useConst__rspack_import_1.useConst)(function () { return function () {
setValue(function (currentValue) { return !currentValue; });
}; });
return [value, { setTrue: setTrue, setFalse: setFalse, toggle: toggle }];
}
//# sourceMappingURL=useBoolean.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useConst.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useConst.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useConst: () => (useConst)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Hook to initialize and return a constant value. Unlike `React.useMemo`, this is guaranteed to
* always return the same value (and if the initializer is a function, only call it once).
* This is similar to setting a private member in a class constructor.
*
* If the value should ever change based on dependencies, use `React.useMemo` instead.
*
* @param initialValue - Initial value, or function to get the initial value. Similar to `useState`,
* only the value/function passed in the first time this is called is respected.
* @returns The value. The identity of this value will always be the same.
*/
function useConst(initialValue) {
// Use useRef to store the value because it's the least expensive built-in hook that works here
// (we could also use `const [value] = React.useState(initialValue)` but that's more expensive
// internally due to reducer handling which we don't need)
var ref = react__rspack_import_0.useRef(undefined);
if (ref.current === undefined) {
// Box the value in an object so we can tell if it's initialized even if the initializer
// returns/is undefined
ref.current = {
value: typeof initialValue === 'function' ? initialValue() : initialValue,
};
}
return ref.current.value;
}
//# sourceMappingURL=useConst.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useControllableValue.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useControllableValue.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useControllableValue: () => (useControllableValue)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _useConst__rspack_import_1 = __webpack_require__(/*! ./useConst */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
function useControllableValue(controlledValue, defaultUncontrolledValue, onChange) {
var _a = react__rspack_import_0.useState(defaultUncontrolledValue), value = _a[0], setValue = _a[1];
var isControlled = (0,_useConst__rspack_import_1.useConst)(controlledValue !== undefined);
var currentValue = isControlled ? controlledValue : value;
// Duplicate the current value and onChange in refs so they're accessible from
// setValueOrCallOnChange without creating a new callback every time
var valueRef = react__rspack_import_0.useRef(currentValue);
var onChangeRef = react__rspack_import_0.useRef(onChange);
react__rspack_import_0.useEffect(function () {
valueRef.current = currentValue;
onChangeRef.current = onChange;
});
// To match the behavior of the setter returned by React.useState, this callback's identity
// should never change. This means it MUST NOT directly reference variables that can change.
var setValueOrCallOnChange = (0,_useConst__rspack_import_1.useConst)(function () { return function (update, ev) {
// Assuming here that TValue is not a function, because a controllable value will typically
// be something a user can enter as input
var newValue = typeof update === 'function' ? update(valueRef.current) : update;
if (onChangeRef.current) {
onChangeRef.current(ev, newValue);
}
if (!isControlled) {
setValue(newValue);
}
}; });
return [currentValue, setValueOrCallOnChange];
}
//# sourceMappingURL=useControllableValue.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useEventCallback.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useEventCallback.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useEventCallback: () => (useEventCallback)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _useConst__rspack_import_2 = __webpack_require__(/*! ./useConst */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js");
/**
* Modified `useCallback` that returns the same function reference every time, but internally calls
* the most-recently passed callback implementation. Can be useful in situations such as:
* - Event handler dependencies change too frequently, such as user props which might change on
* every render, or volatile values such as useState/useDispatch
* - Callback must be referenced in a captured context (such as a window event handler or unmount
* handler that's registered once) but needs access to the latest props
*
* In general, prefer `useCallback` unless you've encountered one of the problems above.
*
* https://reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback
*
* @param fn - The callback function that will be used
* @returns A function which is referentially stable but internally calls the most recently passed callback
*/
function useEventCallback(fn) {
var callbackRef = react__rspack_import_0.useRef(function () {
throw new Error('Cannot call an event handler while rendering');
});
(0,_fluentui_utilities__rspack_import_1.useIsomorphicLayoutEffect)(function () {
callbackRef.current = fn;
}, [fn]);
// useConst rather than useCallback to ensure the reference is always stable
// (useCallback's deps list is an optimization, not a guarantee)
return (0,_useConst__rspack_import_2.useConst)(function () { return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var callback = callbackRef.current;
return callback.apply(void 0, args);
}; });
}
//# sourceMappingURL=useEventCallback.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useId.js":
/*!*********************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useId.js ***!
\*********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useId: () => (useId)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
*
* @param prefix - Optional prefix for the ID
* @param providedId - Optional id provided by a parent component. Defaults to the provided value if present,
* without conditioning the hook call
* @returns The ID
*/
function useId(prefix, providedId) {
// getId should only be called once since it updates the global constant for the next ID value.
// (While an extra update isn't likely to cause problems in practice, it's better to avoid it.)
var ref = react__rspack_import_0.useRef(providedId);
if (!ref.current) {
ref.current = (0,_fluentui_utilities__rspack_import_1.getId)(prefix);
}
return ref.current;
}
//# sourceMappingURL=useId.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useMergedRefs: () => (useMergedRefs)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that
* updates all provided refs
* @param refs - Refs to collectively update with one ref value.
* @returns A function with an attached "current" prop, so that it can be treated like a RefObject.
*/
function useMergedRefs() {
var refs = [];
for (var _i = 0; _i < arguments.length; _i++) {
refs[_i] = arguments[_i];
}
var mergedCallback = react__rspack_import_0.useCallback(function (value) {
// Update the "current" prop hanging on the function.
// eslint-disable-next-line @typescript-eslint/no-deprecated
mergedCallback.current = value;
for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) {
var ref = refs_1[_i];
if (typeof ref === 'function') {
ref(value);
}
else if (ref) {
// work around the immutability of the React.Ref type
// eslint-disable-next-line @typescript-eslint/no-deprecated
ref.current = value;
}
}
}, (0,tslib__rspack_import_1.__spreadArray)([], refs, true));
return mergedCallback;
}
//# sourceMappingURL=useMergedRefs.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useOnEvent.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useOnEvent.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useOnEvent: () => (useOnEvent)
});
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/on.js");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Hook to attach an event handler on mount and handle cleanup.
* @param element - Element (or ref to an element) to attach the event handler to
* @param eventName - The event to attach a handler for
* @param callback - The handler for the event
* @param useCapture - Whether or not to attach the handler for the capture phase
*/
function useOnEvent(element, eventName, callback, useCapture) {
// Use a ref for the callback to prevent repeatedly attaching/unattaching callbacks that are unstable across renders
var callbackRef = react__rspack_import_0.useRef(callback);
callbackRef.current = callback;
react__rspack_import_0.useEffect(function () {
var actualElement = element && 'current' in element ? element.current : element;
if (!actualElement || !actualElement.addEventListener) {
return;
}
var dispose = (0,_fluentui_utilities__rspack_import_1.on)(actualElement, eventName, function (ev) { return callbackRef.current(ev); }, useCapture);
return dispose;
}, [element, eventName, useCapture]);
}
//# sourceMappingURL=useOnEvent.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/usePrevious.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/usePrevious.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
usePrevious: () => (usePrevious)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Hook keeping track of a given value from a previous execution of the component the Hook is used in.
*
* See [React Hooks FAQ](https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state)
*/
function usePrevious(value) {
var ref = react__rspack_import_0.useRef(undefined);
react__rspack_import_0.useEffect(function () {
ref.current = value;
});
return ref.current;
}
//# sourceMappingURL=usePrevious.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useSetTimeout.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useSetTimeout.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useSetTimeout: () => (useSetTimeout)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _useConst__rspack_import_1 = __webpack_require__(/*! ./useConst */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/**
* Returns a wrapper function for `setTimeout` which automatically handles disposal.
*/
var useSetTimeout = function () {
var timeoutIds = (0,_useConst__rspack_import_1.useConst)({});
// Cleanup function.
react__rspack_import_0.useEffect(function () { return function () {
for (var _i = 0, _a = Object.keys(timeoutIds); _i < _a.length; _i++) {
var id = _a[_i];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
clearTimeout(id);
}
}; },
// useConst ensures this will never change, but react-hooks/exhaustive-deps doesn't know that
[timeoutIds]);
// Return wrapper which will auto cleanup.
return (0,_useConst__rspack_import_1.useConst)({
setTimeout: function (func, duration) {
var id = setTimeout(func, duration);
timeoutIds[id] = 1;
return id;
},
clearTimeout: function (id) {
delete timeoutIds[id];
clearTimeout(id);
},
});
};
//# sourceMappingURL=useSetTimeout.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useTarget.js":
/*!*************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useTarget.js ***!
\*************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useTarget: () => (useTarget)
});
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_react_window_provider__rspack_import_1 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/**
* Hook to calculate and cache the target element specified by the given target attribute,
* as well as the target element's (or host element's) parent window
* @param target- Target selector passed to the component as a property, describing the element that
* the callout should target
* @param hostElement- The callout's host element, used for determining the parent window.
*/
function useTarget(target, hostElement) {
var _a, _b, _c;
var previousTargetProp = react__rspack_import_0.useRef(undefined);
var targetRef = react__rspack_import_0.useRef(null);
/**
* Stores an instance of Window, used to check
* for server side rendering and if focus was lost.
*/
var targetWindow = (0,_fluentui_react_window_provider__rspack_import_1.useWindow)();
// If the target element changed, find the new one. If we are tracking
// target with class name, always find element because we do not know if
// fabric has rendered a new element and disposed the old element.
if (!target || target !== previousTargetProp.current || typeof target === 'string') {
var currentElement = hostElement === null || hostElement === void 0 ? void 0 : hostElement.current;
if (target) {
if (typeof target === 'string') {
// If element is part of shadow dom, then querySelector on shadow root, else query on document
if ((_a = currentElement === null || currentElement === void 0 ? void 0 : currentElement.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) {
targetRef.current = (_c = (_b = currentElement === null || currentElement === void 0 ? void 0 : currentElement.getRootNode()) === null || _b === void 0 ? void 0 : _b.querySelector(target)) !== null && _c !== void 0 ? _c : null;
}
else {
var currentDoc = (0,_fluentui_utilities__rspack_import_2.getDocument)(currentElement);
targetRef.current = currentDoc ? currentDoc.querySelector(target) : null;
}
}
else if ('stopPropagation' in target) {
targetRef.current = target;
}
else if ('getBoundingClientRect' in target) {
targetRef.current = target;
}
else if ('current' in target) {
targetRef.current = target.current;
}
else {
targetRef.current = target;
}
}
previousTargetProp.current = target;
}
return [targetRef, targetWindow];
}
//# sourceMappingURL=useTarget.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useUnmount.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useUnmount.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useUnmount: () => (useUnmount)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Hook which synchronously executes a callback when the component is about to unmount.
*
* @param callback - Function to call during unmount.
*/
var useUnmount = function (callback) {
var unmountRef = react__rspack_import_0.useRef(callback);
unmountRef.current = callback;
react__rspack_import_0.useEffect(function () { return function () {
var _a;
(_a = unmountRef.current) === null || _a === void 0 ? void 0 : _a.call(unmountRef);
}; }, []);
};
//# sourceMappingURL=useUnmount.js.map
}),
"./node_modules/@fluentui/react-hooks/lib/useWarnings.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/react-hooks/lib/useWarnings.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useWarnings: () => (useWarnings)
});
/* import */ var tslib__rspack_import_8 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_utilities__rspack_import_3 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/* import */ var _fluentui_utilities__rspack_import_4 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnConditionallyRequiredProps.js");
/* import */ var _fluentui_utilities__rspack_import_5 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _fluentui_utilities__rspack_import_6 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js");
/* import */ var _fluentui_utilities__rspack_import_7 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnControlledUsage.js");
/* import */ var _usePrevious__rspack_import_2 = __webpack_require__(/*! ./usePrevious */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _useConst__rspack_import_1 = __webpack_require__(/*! ./useConst */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
var warningId = 0;
/**
* Only in development mode, display console warnings when certain conditions are met.
* Note that all warnings except `controlledUsage` will only be shown on first render
* (new `controlledUsage` warnings may be shown later due to prop changes).
*/
function useWarnings(options) {
if (true) {
var name_1 = options.name, props = options.props, _a = options.other, other = _a === void 0 ? [] : _a, conditionallyRequired = options.conditionallyRequired, deprecations = options.deprecations, mutuallyExclusive = options.mutuallyExclusive, controlledUsage = options.controlledUsage;
/* eslint-disable react-hooks/rules-of-hooks -- build-time conditional */
var hasWarnedRef = react__rspack_import_0.useRef(false);
var componentId = (0,_useConst__rspack_import_1.useConst)(function () { return "useWarnings_".concat(warningId++); });
var oldProps = (0,_usePrevious__rspack_import_2.usePrevious)(props);
/* eslint-enable react-hooks/rules-of-hooks */
// Warn synchronously (not in useEffect) on first render to make debugging easier.
if (!hasWarnedRef.current) {
hasWarnedRef.current = true;
for (var _i = 0, other_1 = other; _i < other_1.length; _i++) {
var warning = other_1[_i];
(0,_fluentui_utilities__rspack_import_3.warn)(warning);
}
if (conditionallyRequired) {
for (var _b = 0, conditionallyRequired_1 = conditionallyRequired; _b < conditionallyRequired_1.length; _b++) {
var req = conditionallyRequired_1[_b];
(0,_fluentui_utilities__rspack_import_4.warnConditionallyRequiredProps)(name_1, props, req.requiredProps, req.conditionalPropName, req.condition);
}
}
deprecations && (0,_fluentui_utilities__rspack_import_5.warnDeprecations)(name_1, props, deprecations);
mutuallyExclusive && (0,_fluentui_utilities__rspack_import_6.warnMutuallyExclusive)(name_1, props, mutuallyExclusive);
}
// Controlled usage warnings may be displayed on either first or subsequent renders due to
// prop changes. Note that it's safe to run this synchronously (not in useEffect) even in
// concurrent mode because `warnControlledUsage` internally tracks which warnings have been
// displayed for each component instance (so nothing will be displayed twice).
controlledUsage && (0,_fluentui_utilities__rspack_import_7.warnControlledUsage)((0,tslib__rspack_import_8.__assign)((0,tslib__rspack_import_8.__assign)({}, controlledUsage), { componentId: componentId, props: props, componentName: name_1, oldProps: oldProps }));
}
}
//# sourceMappingURL=useWarnings.js.map
}),
"./node_modules/@fluentui/react-portal-compat-context/lib/PortalCompatContext.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@fluentui/react-portal-compat-context/lib/PortalCompatContext.js ***!
\***************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PortalCompatContextProvider: () => (PortalCompatContextProvider),
usePortalCompat: () => (usePortalCompat)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
'use client';
var PortalCompatContext = react__rspack_import_0.createContext(undefined);
var portalCompatContextDefaultValue = function() {
return function() {
return undefined;
};
};
var PortalCompatContextProvider = PortalCompatContext.Provider;
function usePortalCompat() {
var _React_useContext;
return (_React_useContext = react__rspack_import_0.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
}
}),
"./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
WindowContext: () => (WindowContext),
WindowProvider: () => (WindowProvider),
useDocument: () => (useDocument),
useWindow: () => (useWindow)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/**
* Context for providing the window.
*/
// eslint-disable-next-line @fluentui/no-context-default-value
var WindowContext = react__rspack_import_0.createContext({
// eslint-disable-next-line no-restricted-globals
window: typeof window === 'object' ? window : undefined,
});
/**
* Hook to access the window object. This can be overridden contextually using the `WindowProvider`.
*/
var useWindow = function () { return react__rspack_import_0.useContext(WindowContext).window; };
/**
* Hook to access the document object. This can be overridden contextually using the `WindowProvider`.
*/
var useDocument = function () { var _a; return (_a = react__rspack_import_0.useContext(WindowContext).window) === null || _a === void 0 ? void 0 : _a.document; };
/**
* Component to provide the window object contextually. This is useful when rendering content to an element
* contained within a child window or iframe element, where event handlers and styling must be projected
* to an alternative window or document.
*/
var WindowProvider = function (props) {
return react__rspack_import_0.createElement(WindowContext.Provider, { value: props }, props.children);
};
//# sourceMappingURL=WindowProvider.js.map
}),
"./node_modules/@fluentui/react/lib/common/DirectionalHint.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/common/DirectionalHint.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DirectionalHint: () => (DirectionalHint)
});
var DirectionalHint = {
/**
* Appear above the target element, with the left edges of the callout and target aligning.
*/
topLeftEdge: 0,
/**
* Appear above the target element, with the centers of the callout and target aligning.
*/
topCenter: 1,
/**
* Appear above the target element, with the right edges of the callout and target aligning.
*/
topRightEdge: 2,
/**
* Appear above the target element, aligning with the target element such that the callout tends toward
* the center of the screen.
*/
topAutoEdge: 3,
/**
* Appear below the target element, with the left edges of the callout and target aligning.
*/
bottomLeftEdge: 4,
/**
* Appear below the target element, with the centers of the callout and target aligning.
*/
bottomCenter: 5,
/**
* Appear below the target element, with the right edges of the callout and target aligning.
*/
bottomRightEdge: 6,
/**
* Appear below the target element, aligning with the target element such that the callout tends toward
* the center of the screen.
*/
bottomAutoEdge: 7,
/**
* Appear to the left of the target element, with the top edges of the callout and target aligning.
*/
leftTopEdge: 8,
/**
* Appear to the left of the target element, with the centers of the callout and target aligning.
*/
leftCenter: 9,
/**
* Appear to the left of the target element, with the bottom edges of the callout and target aligning.
*/
leftBottomEdge: 10,
/**
* Appear to the right of the target element, with the top edges of the callout and target aligning.
*/
rightTopEdge: 11,
/**
* Appear to the right of the target element, with the centers of the callout and target aligning.
*/
rightCenter: 12,
/**
* Appear to the right of the target element, with the bottom edges of the callout and target aligning.
*/
rightBottomEdge: 13,
};
//# sourceMappingURL=DirectionalHint.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.js ***!
\*****************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ActionButton: () => (ActionButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _BaseButton__rspack_import_2 = __webpack_require__(/*! ../BaseButton */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/customizable.js");
/* import */ var _ActionButton_styles__rspack_import_3 = __webpack_require__(/*! ./ActionButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.styles.js");
/**
* {@docCategory Button}
*/
var ActionButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(ActionButton, _super);
function ActionButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
ActionButton.prototype.render = function () {
var _a = this.props, styles = _a.styles, theme = _a.theme;
return (react__rspack_import_0.createElement(_BaseButton__rspack_import_2.BaseButton, (0,tslib__rspack_import_1.__assign)({}, this.props, { variantClassName: "ms-Button--action ms-Button--command", styles: (0,_ActionButton_styles__rspack_import_3.getStyles)(theme, styles), onRenderDescription: _Utilities__rspack_import_4.nullRender })));
};
ActionButton = (0,tslib__rspack_import_1.__decorate)([
(0,_Utilities__rspack_import_5.customizable)('ActionButton', ['theme', 'styles'], true)
], ActionButton);
return ActionButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=ActionButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.styles.js":
/*!************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.styles.js ***!
\************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_2 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _BaseButton_styles__rspack_import_1 = __webpack_require__(/*! ../BaseButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js");
var DEFAULT_BUTTON_HEIGHT = '40px';
var DEFAULT_PADDING = '0 4px';
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, customStyles) {
var _a, _b, _c;
var baseButtonStyles = (0,_BaseButton_styles__rspack_import_1.getStyles)(theme);
var actionButtonStyles = {
root: (_a = {
padding: DEFAULT_PADDING,
height: DEFAULT_BUTTON_HEIGHT,
color: theme.palette.neutralPrimary,
backgroundColor: 'transparent',
border: '1px solid transparent'
},
_a[_Styling__rspack_import_2.HighContrastSelector] = {
borderColor: 'Window',
},
_a),
rootHovered: (_b = {
color: theme.palette.themePrimary
},
_b[_Styling__rspack_import_2.HighContrastSelector] = {
color: 'Highlight',
},
_b),
iconHovered: {
color: theme.palette.themePrimary,
},
rootPressed: {
color: theme.palette.black,
},
rootExpanded: {
color: theme.palette.themePrimary,
},
iconPressed: {
color: theme.palette.themeDarker,
},
rootDisabled: (_c = {
color: theme.palette.neutralTertiary,
backgroundColor: 'transparent',
borderColor: 'transparent'
},
_c[_Styling__rspack_import_2.HighContrastSelector] = {
color: 'GrayText',
},
_c),
rootChecked: {
color: theme.palette.black,
},
iconChecked: {
color: theme.palette.themeDarker,
},
flexContainer: {
justifyContent: 'flex-start',
},
icon: {
color: theme.palette.themeDarkAlt,
},
iconDisabled: {
color: 'inherit',
},
menuIcon: {
color: theme.palette.neutralSecondary,
},
textContainer: {
flexGrow: 0,
},
};
return (0,_Styling__rspack_import_2.concatStyleSets)(baseButtonStyles, actionButtonStyles, customStyles);
});
//# sourceMappingURL=ActionButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/BaseButton.classNames.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/BaseButton.classNames.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ButtonGlobalClassNames: () => (ButtonGlobalClassNames),
getBaseButtonClassNames: () => (getBaseButtonClassNames)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var ButtonGlobalClassNames = {
msButton: 'ms-Button',
msButtonHasMenu: 'ms-Button--hasMenu',
msButtonIcon: 'ms-Button-icon',
msButtonMenuIcon: 'ms-Button-menuIcon',
msButtonLabel: 'ms-Button-label',
msButtonDescription: 'ms-Button-description',
msButtonScreenReaderText: 'ms-Button-screenReaderText',
msButtonFlexContainer: 'ms-Button-flexContainer',
msButtonTextContainer: 'ms-Button-textContainer',
};
var getBaseButtonClassNames = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, styles, className, variantClassName, iconClassName, menuIconClassName, disabled, hasMenu, checked, expanded, isSplit) {
var _a, _b;
var classNames = (0,_Styling__rspack_import_1.getGlobalClassNames)(ButtonGlobalClassNames, theme || {});
var isExpanded = expanded && !isSplit;
return (0,_Styling__rspack_import_1.mergeStyleSets)(styles.__shadowConfig__, {
root: [
classNames.msButton,
styles.root,
variantClassName,
checked && ['is-checked', styles.rootChecked],
isExpanded && [
'is-expanded',
styles.rootExpanded,
(_a = {},
_a[":hover .".concat(classNames.msButtonIcon)] = styles.iconExpandedHovered,
// menuIcon falls back to rootExpandedHovered to support original behavior
_a[":hover .".concat(classNames.msButtonMenuIcon)] = styles.menuIconExpandedHovered || styles.rootExpandedHovered,
_a[':hover'] = styles.rootExpandedHovered,
_a),
],
hasMenu && [ButtonGlobalClassNames.msButtonHasMenu, styles.rootHasMenu],
disabled && ['is-disabled', styles.rootDisabled],
!disabled &&
!isExpanded &&
!checked && (_b = {
':hover': styles.rootHovered
},
_b[":hover .".concat(classNames.msButtonLabel)] = styles.labelHovered,
_b[":hover .".concat(classNames.msButtonIcon)] = styles.iconHovered,
_b[":hover .".concat(classNames.msButtonDescription)] = styles.descriptionHovered,
_b[":hover .".concat(classNames.msButtonMenuIcon)] = styles.menuIconHovered,
_b[':focus'] = styles.rootFocused,
_b[':active'] = styles.rootPressed,
_b[":active .".concat(classNames.msButtonIcon)] = styles.iconPressed,
_b[":active .".concat(classNames.msButtonDescription)] = styles.descriptionPressed,
_b[":active .".concat(classNames.msButtonMenuIcon)] = styles.menuIconPressed,
_b),
disabled && checked && [styles.rootCheckedDisabled],
!disabled &&
checked && {
':hover': styles.rootCheckedHovered,
':active': styles.rootCheckedPressed,
},
className,
],
flexContainer: [classNames.msButtonFlexContainer, styles.flexContainer],
textContainer: [classNames.msButtonTextContainer, styles.textContainer],
icon: [
classNames.msButtonIcon,
iconClassName,
styles.icon,
isExpanded && styles.iconExpanded,
checked && styles.iconChecked,
disabled && styles.iconDisabled,
],
label: [classNames.msButtonLabel, styles.label, checked && styles.labelChecked, disabled && styles.labelDisabled],
menuIcon: [
classNames.msButtonMenuIcon,
menuIconClassName,
styles.menuIcon,
checked && styles.menuIconChecked,
disabled && !isSplit && styles.menuIconDisabled,
!disabled &&
!isExpanded &&
!checked && {
':hover': styles.menuIconHovered,
':active': styles.menuIconPressed,
},
isExpanded && ['is-expanded', styles.menuIconExpanded],
],
description: [
classNames.msButtonDescription,
styles.description,
checked && styles.descriptionChecked,
disabled && styles.descriptionDisabled,
],
screenReaderText: [classNames.msButtonScreenReaderText, styles.screenReaderText],
});
});
//# sourceMappingURL=BaseButton.classNames.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/BaseButton.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/BaseButton.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
BaseButton: () => (BaseButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/createMergedRef.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/portalContainsElement.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_16 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnConditionallyRequiredProps.js");
/* import */ var _Utilities__rspack_import_17 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_20 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_21 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/object.js");
/* import */ var _Utilities__rspack_import_22 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_24 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
/* import */ var _Utilities__rspack_import_27 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _Icon__rspack_import_4 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
/* import */ var _Icon__rspack_import_6 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/FontIcon.js");
/* import */ var _Icon__rspack_import_7 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/ImageIcon.js");
/* import */ var _common_DirectionalHint__rspack_import_25 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _ContextualMenu__rspack_import_9 = __webpack_require__(/*! ../../ContextualMenu */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.js");
/* import */ var _BaseButton_classNames__rspack_import_19 = __webpack_require__(/*! ./BaseButton.classNames */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.classNames.js");
/* import */ var _SplitButton_SplitButton_classNames__rspack_import_26 = __webpack_require__(/*! ./SplitButton/SplitButton.classNames */ "./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.classNames.js");
/* import */ var _KeytipData__rspack_import_23 = __webpack_require__(/*! ../../KeytipData */ "./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
var TouchIdleDelay = 500; /* ms */
var COMPONENT_NAME = 'BaseButton';
/**
* {@docCategory Button}
*/
var BaseButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(BaseButton, _super);
function BaseButton(props) {
var _this = _super.call(this, props) || this;
_this._buttonElement = react__rspack_import_0.createRef();
_this._splitButtonContainer = react__rspack_import_0.createRef();
_this._mergedRef = (0,_Utilities__rspack_import_2.createMergedRef)();
_this._renderedVisibleMenu = false;
_this._getMemoizedMenuButtonKeytipProps = (0,_Utilities__rspack_import_3.memoizeFunction)(function (keytipProps) {
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, keytipProps), { hasMenu: true });
});
_this._onRenderIcon = function (buttonProps, defaultRender) {
var iconProps = _this.props.iconProps;
if (iconProps && (iconProps.iconName !== undefined || iconProps.imageProps)) {
var className = iconProps.className, imageProps = iconProps.imageProps, rest = (0,tslib__rspack_import_1.__rest)(iconProps, ["className", "imageProps"]);
// If the styles prop is specified as part of iconProps, fall back to regular Icon as FontIcon and ImageIcon
// do not have this prop.
if (iconProps.styles) {
return react__rspack_import_0.createElement(_Icon__rspack_import_4.Icon, (0,tslib__rspack_import_1.__assign)({ className: (0,_Utilities__rspack_import_5.css)(_this._classNames.icon, className), imageProps: imageProps }, rest));
}
if (iconProps.iconName) {
return react__rspack_import_0.createElement(_Icon__rspack_import_6.FontIcon, (0,tslib__rspack_import_1.__assign)({ className: (0,_Utilities__rspack_import_5.css)(_this._classNames.icon, className) }, rest));
}
if (imageProps) {
return react__rspack_import_0.createElement(_Icon__rspack_import_7.ImageIcon, (0,tslib__rspack_import_1.__assign)({ className: (0,_Utilities__rspack_import_5.css)(_this._classNames.icon, className), imageProps: imageProps }, rest));
}
}
return null;
};
_this._onRenderTextContents = function () {
var _a = _this.props, text = _a.text, children = _a.children,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_b = _a.secondaryText,
// eslint-disable-next-line @typescript-eslint/no-deprecated
secondaryText = _b === void 0 ? _this.props.description : _b, _c = _a.onRenderText, onRenderText = _c === void 0 ? _this._onRenderText : _c, _d = _a.onRenderDescription, onRenderDescription = _d === void 0 ? _this._onRenderDescription : _d;
if (text || typeof children === 'string' || secondaryText) {
return (react__rspack_import_0.createElement("span", { className: _this._classNames.textContainer },
onRenderText(_this.props, _this._onRenderText),
onRenderDescription(_this.props, _this._onRenderDescription)));
}
return [onRenderText(_this.props, _this._onRenderText), onRenderDescription(_this.props, _this._onRenderDescription)];
};
_this._onRenderText = function () {
var text = _this.props.text;
var children = _this.props.children;
// For backwards compat, we should continue to take in the text content from children.
if (text === undefined && typeof children === 'string') {
text = children;
}
if (_this._hasText()) {
return (react__rspack_import_0.createElement("span", { key: _this._labelId, className: _this._classNames.label, id: _this._labelId }, text));
}
return null;
};
_this._onRenderChildren = function () {
var children = _this.props.children;
// If children is just a string, either it or the text will be rendered via onRenderLabel
// If children is another component, it will be rendered after text
if (typeof children === 'string') {
return null;
}
return children;
};
_this._onRenderDescription = function (props) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = props.secondaryText, secondaryText = _a === void 0 ? _this.props.description : _a;
// ms-Button-description is only shown when the button type is compound.
// In other cases it will not be displayed.
return secondaryText ? (react__rspack_import_0.createElement("span", { key: _this._descriptionId, className: _this._classNames.description, id: _this._descriptionId }, secondaryText)) : null;
};
_this._onRenderAriaDescription = function () {
var ariaDescription = _this.props.ariaDescription;
// If ariaDescription is given, descriptionId will be assigned to ariaDescriptionSpan,
// otherwise it will be assigned to descriptionSpan.
return ariaDescription ? (react__rspack_import_0.createElement("span", { className: _this._classNames.screenReaderText, id: _this._ariaDescriptionId }, ariaDescription)) : null;
};
_this._onRenderMenuIcon = function (props) {
var menuIconProps = _this.props.menuIconProps;
return react__rspack_import_0.createElement(_Icon__rspack_import_6.FontIcon, (0,tslib__rspack_import_1.__assign)({ iconName: "ChevronDown" }, menuIconProps, { className: _this._classNames.menuIcon }));
};
_this._onRenderMenu = function (menuProps) {
var MenuType = _this.props.menuAs ? (0,_Utilities__rspack_import_8.composeComponentAs)(_this.props.menuAs, _ContextualMenu__rspack_import_9.ContextualMenu) : _ContextualMenu__rspack_import_9.ContextualMenu;
return react__rspack_import_0.createElement(MenuType, (0,tslib__rspack_import_1.__assign)({}, menuProps));
};
_this._onDismissMenu = function (ev) {
var menuProps = _this.props.menuProps;
if (menuProps && menuProps.onDismiss) {
menuProps.onDismiss(ev);
}
if (!ev || !ev.defaultPrevented) {
_this._dismissMenu();
}
};
_this._dismissMenu = function () {
_this._menuShouldFocusOnMount = undefined;
_this._menuShouldFocusOnContainer = undefined;
_this.setState({ menuHidden: true });
};
_this._openMenu = function (shouldFocusOnContainer, shouldFocusOnMount) {
if (shouldFocusOnMount === void 0) { shouldFocusOnMount = true; }
if (_this.props.menuProps) {
_this._menuShouldFocusOnContainer = shouldFocusOnContainer;
_this._menuShouldFocusOnMount = shouldFocusOnMount;
_this._renderedVisibleMenu = true;
_this.setState({ menuHidden: false });
}
};
_this._onToggleMenu = function (shouldFocusOnContainer) {
var shouldFocusOnMount = true;
if (_this.props.menuProps && _this.props.menuProps.shouldFocusOnMount === false) {
shouldFocusOnMount = false;
}
_this.state.menuHidden ? _this._openMenu(shouldFocusOnContainer, shouldFocusOnMount) : _this._dismissMenu();
};
_this._onSplitContainerFocusCapture = function (ev) {
var container = _this._splitButtonContainer.current;
// If the target is coming from the portal we do not need to set focus on the container.
if (!container || (ev.target && (0,_Utilities__rspack_import_10.portalContainsElement)(ev.target, container))) {
return;
}
// We should never be able to focus the individual buttons in a split button. Focus
// should always remain on the container.
container.focus();
};
_this._onSplitButtonPrimaryClick = function (ev) {
if (!_this.state.menuHidden) {
_this._dismissMenu();
}
// toggle split buttons need two separate targets, even for touch
var singleTouchTarget = _this._processingTouch && !_this.props.toggle;
if (!singleTouchTarget && _this.props.onClick) {
_this.props.onClick(ev);
}
else if (singleTouchTarget) {
_this._onMenuClick(ev);
}
};
_this._onKeyDown = function (ev) {
// explicity cancelling event so click won't fire after this
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (_this.props.disabled && (ev.which === _Utilities__rspack_import_11.KeyCodes.enter || ev.which === _Utilities__rspack_import_11.KeyCodes.space)) {
ev.preventDefault();
ev.stopPropagation();
}
else if (!_this.props.disabled) {
if (_this.props.menuProps) {
_this._onMenuKeyDown(ev);
}
else if (_this.props.onKeyDown !== undefined) {
_this.props.onKeyDown(ev); // not cancelling event because it's not disabled
}
}
};
_this._onKeyUp = function (ev) {
if (!_this.props.disabled && _this.props.onKeyUp !== undefined) {
_this.props.onKeyUp(ev); // not cancelling event because it's not disabled
}
};
_this._onKeyPress = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (!_this.props.disabled && _this.props.onKeyPress !== undefined) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
_this.props.onKeyPress(ev); // not cancelling event because it's not disabled
}
};
_this._onMouseUp = function (ev) {
if (!_this.props.disabled && _this.props.onMouseUp !== undefined) {
_this.props.onMouseUp(ev); // not cancelling event because it's not disabled
}
};
_this._onMouseDown = function (ev) {
if (!_this.props.disabled && _this.props.onMouseDown !== undefined) {
_this.props.onMouseDown(ev); // not cancelling event because it's not disabled
}
};
_this._onClick = function (ev) {
if (!_this.props.disabled) {
if (_this.props.menuProps) {
_this._onMenuClick(ev);
}
else if (_this.props.onClick !== undefined) {
_this.props.onClick(ev); // not cancelling event because it's not disabled
}
}
};
_this._onSplitButtonContainerKeyDown = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === _Utilities__rspack_import_11.KeyCodes.enter || ev.which === _Utilities__rspack_import_11.KeyCodes.space) {
if (_this._buttonElement.current) {
_this._buttonElement.current.click();
ev.preventDefault();
ev.stopPropagation();
}
}
else {
_this._onMenuKeyDown(ev);
}
};
_this._onMenuKeyDown = function (ev) {
var _a;
if (_this.props.disabled) {
return;
}
if (_this.props.onKeyDown) {
_this.props.onKeyDown(ev);
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
var isUp = ev.which === _Utilities__rspack_import_11.KeyCodes.up;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var isDown = ev.which === _Utilities__rspack_import_11.KeyCodes.down;
if (!ev.defaultPrevented && _this._isValidMenuOpenKey(ev)) {
var onMenuClick = _this.props.onMenuClick;
if (onMenuClick) {
onMenuClick(ev, _this.props);
}
_this._onToggleMenu(false);
ev.preventDefault();
ev.stopPropagation();
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === _Utilities__rspack_import_11.KeyCodes.enter || ev.which === _Utilities__rspack_import_11.KeyCodes.space) {
// We manually set the focus visibility to true if opening via Enter or Space to account for the scenario where
// a user clicks on the button, closes the menu and then opens it via keyboard. In this scenario our default logic
// for setting focus visibility is not triggered since there is no keyboard navigation present beforehand.
(0,_Utilities__rspack_import_12.setFocusVisibility)(true, ev.target, (_a = _this.context) === null || _a === void 0 ? void 0 : _a.registeredProviders);
}
if (!(ev.altKey || ev.metaKey) && (isUp || isDown)) {
// Suppose a menu, with shouldFocusOnMount: false, is open, and user wants to keyboard to the menu items
// We need to re-render the menu with shouldFocusOnMount as true.
if (!_this.state.menuHidden && _this.props.menuProps) {
var currentShouldFocusOnMount = _this._menuShouldFocusOnMount !== undefined
? _this._menuShouldFocusOnMount
: _this.props.menuProps.shouldFocusOnMount;
if (!currentShouldFocusOnMount) {
ev.preventDefault();
ev.stopPropagation();
_this._menuShouldFocusOnMount = true;
_this.forceUpdate();
}
}
}
};
_this._onTouchStart = function () {
if (_this._isSplitButton &&
_this._splitButtonContainer.current &&
!('onpointerdown' in _this._splitButtonContainer.current)) {
_this._handleTouchAndPointerEvent();
}
};
_this._onMenuClick = function (ev) {
var _a = _this.props, onMenuClick = _a.onMenuClick, menuProps = _a.menuProps;
if (onMenuClick) {
onMenuClick(ev, _this.props);
}
// focus on the container by default when the menu is opened with a click event
// this differentiates from a keyboard interaction triggering the click event
var shouldFocusOnContainer = typeof (menuProps === null || menuProps === void 0 ? void 0 : menuProps.shouldFocusOnContainer) === 'boolean'
? menuProps.shouldFocusOnContainer
: ev.nativeEvent.pointerType === 'mouse';
if (!ev.defaultPrevented) {
_this._onToggleMenu(shouldFocusOnContainer);
ev.preventDefault();
ev.stopPropagation();
}
};
(0,_Utilities__rspack_import_13.initializeComponentRef)(_this);
_this._async = new _Utilities__rspack_import_14.Async(_this);
_this._events = new _Utilities__rspack_import_15.EventGroup(_this);
(0,_Utilities__rspack_import_16.warnConditionallyRequiredProps)(COMPONENT_NAME, props, ['menuProps', 'onClick'], 'split', _this.props.split);
(0,_Utilities__rspack_import_17.warnDeprecations)(COMPONENT_NAME, props, {
rootProps: undefined,
description: 'secondaryText',
toggled: 'checked',
});
_this._labelId = (0,_Utilities__rspack_import_18.getId)();
_this._descriptionId = (0,_Utilities__rspack_import_18.getId)();
_this._ariaDescriptionId = (0,_Utilities__rspack_import_18.getId)();
_this.state = {
menuHidden: true,
};
return _this;
}
Object.defineProperty(BaseButton.prototype, "_isSplitButton", {
get: function () {
return !!this.props.menuProps && !!this.props.onClick && this.props.split === true;
},
enumerable: false,
configurable: true
});
BaseButton.prototype.render = function () {
var _a;
var _b = this.props, ariaDescription = _b.ariaDescription, ariaLabel = _b.ariaLabel, ariaHidden = _b.ariaHidden, className = _b.className, disabled = _b.disabled, allowDisabledFocus = _b.allowDisabledFocus, primaryDisabled = _b.primaryDisabled,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_c = _b.secondaryText,
// eslint-disable-next-line @typescript-eslint/no-deprecated
secondaryText = _c === void 0 ? this.props.description : _c, href = _b.href, iconProps = _b.iconProps, menuIconProps = _b.menuIconProps, styles = _b.styles, checked = _b.checked, variantClassName = _b.variantClassName, theme = _b.theme, toggle = _b.toggle, getClassNames = _b.getClassNames, role = _b.role;
var menuHidden = this.state.menuHidden;
// Button is disabled if the whole button (in case of splitButton is disabled) or if the primary action is disabled
var isPrimaryButtonDisabled = disabled || primaryDisabled;
this._classNames = getClassNames
? getClassNames(theme, className, variantClassName, iconProps && iconProps.className, menuIconProps && menuIconProps.className, isPrimaryButtonDisabled, checked, !menuHidden, !!this.props.menuProps, this.props.split, !!allowDisabledFocus)
: (0,_BaseButton_classNames__rspack_import_19.getBaseButtonClassNames)(theme, styles, className, variantClassName, iconProps && iconProps.className, menuIconProps && menuIconProps.className, isPrimaryButtonDisabled, !!this.props.menuProps, checked, !menuHidden, this.props.split);
var _d = this, _ariaDescriptionId = _d._ariaDescriptionId, _labelId = _d._labelId, _descriptionId = _d._descriptionId;
// Anchor tag cannot be disabled hence in disabled state rendering
// anchor button as normal button
var renderAsAnchor = !isPrimaryButtonDisabled && !!href;
var tag = renderAsAnchor ? 'a' : 'button';
var nativeProps = (0,_Utilities__rspack_import_20.getNativeProps)(
// eslint-disable-next-line @typescript-eslint/no-deprecated
(0,_Utilities__rspack_import_21.assign)(renderAsAnchor ? {} : { type: 'button' }, this.props.rootProps, this.props), renderAsAnchor ? _Utilities__rspack_import_20.anchorProperties : _Utilities__rspack_import_20.buttonProperties, [
'disabled', // let disabled buttons be focused and styled as disabled.
]);
// Check for ariaLabel passed in via Button props, and fall back to aria-label passed in via native props
var resolvedAriaLabel = ariaLabel || nativeProps['aria-label'];
// Check for ariaDescription, secondaryText or aria-describedby in the native props to determine source of
// aria-describedby. Otherwise default to undefined so property does not appear in output.
var ariaDescribedBy = undefined;
if (ariaDescription) {
ariaDescribedBy = _ariaDescriptionId;
}
else if (secondaryText && this.props.onRenderDescription !== _Utilities__rspack_import_22.nullRender) {
// for buttons like CompoundButton with a valid onRenderDescription, we need to set an ariaDescribedBy
// for buttons that do not render anything (via nullRender), we should not set an ariaDescribedBy
ariaDescribedBy = _descriptionId;
}
else if (nativeProps['aria-describedby']) {
ariaDescribedBy = nativeProps['aria-describedby'];
}
// If an explicit aria-labelledby is given, use that and we're done.
// If any kind of description is given (which will end up as an aria-describedby attribute)
// and no ariaLabel is specified, set the labelledby element.
// Otherwise, the button is labeled implicitly by the descendent text on the button (if it exists).
var ariaLabelledBy = undefined;
if (nativeProps['aria-labelledby']) {
ariaLabelledBy = nativeProps['aria-labelledby'];
}
else if (ariaDescribedBy && !resolvedAriaLabel) {
ariaLabelledBy = this._hasText() ? _labelId : undefined;
}
var dataIsFocusable = this.props['data-is-focusable'] === false || (disabled && !allowDisabledFocus) || this._isSplitButton
? false
: true;
var isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
// if isCheckboxTypeRole, always return a checked value.
// Otherwise only return checked value if toggle is set to true.
// This is because role="checkbox" always needs to have an aria-checked value
// but our checked prop only sets aria-pressed if we mark the button as a toggle="true"
var checkedOrPressedValue = isCheckboxTypeRole ? !!checked : toggle === true ? !!checked : undefined;
var buttonProps = (0,_Utilities__rspack_import_21.assign)(nativeProps, (_a = {
className: this._classNames.root,
// eslint-disable-next-line @typescript-eslint/no-deprecated
ref: this._mergedRef(this.props.elementRef, this._buttonElement),
disabled: isPrimaryButtonDisabled && !allowDisabledFocus,
onKeyDown: this._onKeyDown,
onKeyPress: this._onKeyPress,
onKeyUp: this._onKeyUp,
onMouseDown: this._onMouseDown,
onMouseUp: this._onMouseUp,
onClick: this._onClick,
'aria-label': resolvedAriaLabel,
'aria-labelledby': ariaLabelledBy,
'aria-describedby': ariaDescribedBy,
'aria-disabled': isPrimaryButtonDisabled,
'data-is-focusable': dataIsFocusable
},
// aria-pressed attribute should only be present for toggle buttons
// aria-checked attribute should only be present for toggle buttons with checkbox type role
_a[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed'] = checkedOrPressedValue,
_a));
if (ariaHidden) {
buttonProps['aria-hidden'] = true;
}
if (this._isSplitButton) {
return this._onRenderSplitButtonContent(tag, buttonProps);
}
else if (this.props.menuProps) {
var _e = this.props.menuProps.id, id = _e === void 0 ? "".concat(this._labelId, "-menu") : _e;
(0,_Utilities__rspack_import_21.assign)(buttonProps, {
'aria-expanded': !menuHidden,
'aria-controls': !menuHidden ? id : null,
'aria-haspopup': true,
});
}
return this._onRenderContent(tag, buttonProps);
};
BaseButton.prototype.componentDidMount = function () {
// For split buttons, touching anywhere in the button should drop the dropdown, which should contain the
// primary action. This gives more hit target space for touch environments. We're setting the onpointerdown here,
// because React does not support Pointer events yet.
if (this._isSplitButton && this._splitButtonContainer.current) {
if ('onpointerdown' in this._splitButtonContainer.current) {
this._events.on(this._splitButtonContainer.current, 'pointerdown', this._onPointerDown, true);
}
if ('onpointerup' in this._splitButtonContainer.current && this.props.onPointerUp) {
this._events.on(this._splitButtonContainer.current, 'pointerup', this.props.onPointerUp, true);
}
}
};
BaseButton.prototype.componentDidUpdate = function (prevProps, prevState) {
// If Button's menu was closed, run onAfterMenuDismiss.
if (this.props.onAfterMenuDismiss && !prevState.menuHidden && this.state.menuHidden) {
this.props.onAfterMenuDismiss();
}
};
BaseButton.prototype.componentWillUnmount = function () {
this._async.dispose();
this._events.dispose();
};
BaseButton.prototype.focus = function () {
var _a, _b;
if (this._isSplitButton && this._splitButtonContainer.current) {
(0,_Utilities__rspack_import_12.setFocusVisibility)(true, undefined, (_a = this.context) === null || _a === void 0 ? void 0 : _a.registeredProviders);
this._splitButtonContainer.current.focus();
}
else if (this._buttonElement.current) {
(0,_Utilities__rspack_import_12.setFocusVisibility)(true, undefined, (_b = this.context) === null || _b === void 0 ? void 0 : _b.registeredProviders);
this._buttonElement.current.focus();
}
};
BaseButton.prototype.dismissMenu = function () {
this._dismissMenu();
};
BaseButton.prototype.openMenu = function (shouldFocusOnContainer, shouldFocusOnMount) {
this._openMenu(shouldFocusOnContainer, shouldFocusOnMount);
};
BaseButton.prototype._onRenderContent = function (tag, buttonProps) {
var _this = this;
var props = this.props;
var Tag = tag;
var menuIconProps = props.menuIconProps, menuProps = props.menuProps, _a = props.onRenderIcon, onRenderIcon = _a === void 0 ? this._onRenderIcon : _a, _b = props.onRenderAriaDescription, onRenderAriaDescription = _b === void 0 ? this._onRenderAriaDescription : _b, _c = props.onRenderChildren, onRenderChildren = _c === void 0 ? this._onRenderChildren : _c,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_d = props.onRenderMenu,
// eslint-disable-next-line @typescript-eslint/no-deprecated
onRenderMenu = _d === void 0 ? this._onRenderMenu : _d, _e = props.onRenderMenuIcon, onRenderMenuIcon = _e === void 0 ? this._onRenderMenuIcon : _e, disabled = props.disabled;
var keytipProps = props.keytipProps;
if (keytipProps && menuProps) {
keytipProps = this._getMemoizedMenuButtonKeytipProps(keytipProps);
}
var Button = function (keytipAttributes) { return (react__rspack_import_0.createElement(Tag, (0,tslib__rspack_import_1.__assign)({}, buttonProps, keytipAttributes),
react__rspack_import_0.createElement("span", { className: _this._classNames.flexContainer, "data-automationid": "splitbuttonprimary" },
onRenderIcon(props, _this._onRenderIcon),
_this._onRenderTextContents(),
onRenderAriaDescription(props, _this._onRenderAriaDescription),
onRenderChildren(props, _this._onRenderChildren),
!_this._isSplitButton &&
(menuProps || menuIconProps || _this.props.onRenderMenuIcon) &&
onRenderMenuIcon(_this.props, _this._onRenderMenuIcon),
menuProps &&
!menuProps.doNotLayer &&
_this._shouldRenderMenu() &&
onRenderMenu(_this._getMenuProps(menuProps), _this._onRenderMenu)))); };
var Content = keytipProps ? (
// If we're making a split button, we won't put the keytip here
react__rspack_import_0.createElement(_KeytipData__rspack_import_23.KeytipData, { keytipProps: !this._isSplitButton ? keytipProps : undefined, ariaDescribedBy: buttonProps['aria-describedby'], disabled: disabled }, function (keytipAttributes) { return Button(keytipAttributes); })) : (Button());
if (menuProps && menuProps.doNotLayer) {
return (react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null,
Content,
this._shouldRenderMenu() && onRenderMenu(this._getMenuProps(menuProps), this._onRenderMenu)));
}
return (react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null,
Content,
react__rspack_import_0.createElement(_Utilities__rspack_import_24.FocusRects, null)));
};
/**
* Method to help determine if the menu's component tree should
* be rendered. It takes into account whether the menu is expanded,
* whether it is a persisted menu and whether it has been shown to the user.
*/
BaseButton.prototype._shouldRenderMenu = function () {
var menuHidden = this.state.menuHidden;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = this.props, persistMenu = _a.persistMenu, renderPersistedMenuHiddenOnMount = _a.renderPersistedMenuHiddenOnMount;
if (!menuHidden) {
// Always should render a menu when it is expanded
return true;
}
else if (persistMenu && (this._renderedVisibleMenu || renderPersistedMenuHiddenOnMount)) {
// _renderedVisibleMenu ensures that the first rendering of
// the menu happens on-screen, as edge's scrollbar calculations are off if done while hidden.
return true;
}
return false;
};
BaseButton.prototype._hasText = function () {
// _onRenderTextContents and _onRenderText do not perform the same checks. Below is parity with what _onRenderText
// used to have before the refactor that introduced this function. _onRenderTextContents does not require props.
// text to be undefined in order for props.children to be used as a fallback.
// Purely a code maintainability/reuse issue, but logged as Issue #4979.
return this.props.text !== null && (this.props.text !== undefined || typeof this.props.children === 'string');
};
BaseButton.prototype._getMenuProps = function (menuProps) {
var persistMenu = this.props.persistMenu;
var menuHidden = this.state.menuHidden;
// the accessible menu label (accessible name) has a relationship to the button.
// If the menu props do not specify an explicit value for aria-label or aria-labelledBy,
// AND the button has text, we'll set the menu aria-labelledBy to the text element id.
if (!menuProps.ariaLabel && !menuProps.labelElementId && this._hasText()) {
menuProps = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, menuProps), { labelElementId: this._labelId });
}
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({ id: this._labelId + '-menu', directionalHint: _common_DirectionalHint__rspack_import_25.DirectionalHint.bottomLeftEdge }, menuProps), { shouldFocusOnContainer: this._menuShouldFocusOnContainer, shouldFocusOnMount: this._menuShouldFocusOnMount, hidden: persistMenu ? menuHidden : undefined, className: (0,_Utilities__rspack_import_5.css)('ms-BaseButton-menuhost', menuProps.className), target: this._isSplitButton ? this._splitButtonContainer.current : this._buttonElement.current, onDismiss: this._onDismissMenu });
};
BaseButton.prototype._onRenderSplitButtonContent = function (tag, buttonProps) {
var _this = this;
var _a = this.props, _b = _a.styles, styles = _b === void 0 ? {} : _b, disabled = _a.disabled, allowDisabledFocus = _a.allowDisabledFocus, checked = _a.checked, getSplitButtonClassNames = _a.getSplitButtonClassNames, primaryDisabled = _a.primaryDisabled, menuProps = _a.menuProps, toggle = _a.toggle, role = _a.role, primaryActionButtonProps = _a.primaryActionButtonProps;
var keytipProps = this.props.keytipProps;
var menuHidden = this.state.menuHidden;
var classNames = getSplitButtonClassNames
? getSplitButtonClassNames(!!disabled, !menuHidden, !!checked, !!allowDisabledFocus)
: styles && (0,_SplitButton_SplitButton_classNames__rspack_import_26.getSplitButtonClassNames)(styles, !!disabled, !menuHidden, !!checked, !!primaryDisabled);
(0,_Utilities__rspack_import_21.assign)(buttonProps, {
onClick: undefined,
onPointerDown: undefined,
onPointerUp: undefined,
tabIndex: -1,
'data-is-focusable': false,
});
if (keytipProps && menuProps) {
keytipProps = this._getMemoizedMenuButtonKeytipProps(keytipProps);
}
var containerProps = (0,_Utilities__rspack_import_20.getNativeProps)(buttonProps, [], ['disabled']);
// Add additional props to apply on primary action button
if (primaryActionButtonProps) {
(0,_Utilities__rspack_import_21.assign)(buttonProps, primaryActionButtonProps);
}
var SplitButton = function (keytipAttributes) { return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_1.__assign)({}, containerProps, { "data-ktp-target": keytipAttributes ? keytipAttributes['data-ktp-target'] : undefined, role: role ? role : 'button', "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": !menuHidden, "aria-pressed": toggle ? !!checked : undefined, "aria-describedby": (0,_Utilities__rspack_import_27.mergeAriaAttributeValues)(buttonProps['aria-describedby'], keytipAttributes ? keytipAttributes['aria-describedby'] : undefined), className: classNames && classNames.splitButtonContainer, onKeyDown: _this._onSplitButtonContainerKeyDown, onTouchStart: _this._onTouchStart, ref: _this._splitButtonContainer, "data-is-focusable": true, onClick: !disabled && !primaryDisabled ? _this._onSplitButtonPrimaryClick : undefined, tabIndex: (!disabled && !primaryDisabled) || allowDisabledFocus ? 0 : undefined, "aria-roledescription": buttonProps['aria-roledescription'], onFocusCapture: _this._onSplitContainerFocusCapture }),
react__rspack_import_0.createElement("span", { style: { display: 'flex', width: '100%' } },
_this._onRenderContent(tag, buttonProps),
_this._onRenderSplitButtonMenuButton(classNames, keytipAttributes),
_this._onRenderSplitButtonDivider(classNames)))); };
return keytipProps ? (react__rspack_import_0.createElement(_KeytipData__rspack_import_23.KeytipData, { keytipProps: keytipProps, disabled: disabled }, function (keytipAttributes) { return SplitButton(keytipAttributes); })) : (SplitButton());
};
BaseButton.prototype._onRenderSplitButtonDivider = function (classNames) {
if (classNames && classNames.divider) {
var onClick = function (ev) {
ev.stopPropagation();
};
return react__rspack_import_0.createElement("span", { className: classNames.divider, "aria-hidden": true, onClick: onClick });
}
return null;
};
BaseButton.prototype._onRenderSplitButtonMenuButton = function (classNames, keytipAttributes) {
var _a = this.props, allowDisabledFocus = _a.allowDisabledFocus, checked = _a.checked, disabled = _a.disabled, splitButtonMenuProps = _a.splitButtonMenuProps, splitButtonAriaLabel = _a.splitButtonAriaLabel, primaryDisabled = _a.primaryDisabled;
var menuHidden = this.state.menuHidden;
var menuIconProps = this.props.menuIconProps;
if (menuIconProps === undefined) {
menuIconProps = {
iconName: 'ChevronDown',
};
}
var splitButtonProps = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, splitButtonMenuProps), { styles: classNames, checked: checked, disabled: disabled, allowDisabledFocus: allowDisabledFocus, onClick: this._onMenuClick, menuProps: undefined, iconProps: (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, menuIconProps), { className: this._classNames.menuIcon }), ariaLabel: splitButtonAriaLabel, 'aria-haspopup': true, 'aria-expanded': !menuHidden, 'data-is-focusable': false });
// Add data-ktp-execute-target to the split button if the keytip is defined
return (react__rspack_import_0.createElement(BaseButton, (0,tslib__rspack_import_1.__assign)({}, splitButtonProps, { "data-ktp-execute-target": keytipAttributes ? keytipAttributes['data-ktp-execute-target'] : keytipAttributes, onMouseDown: this._onMouseDown, tabIndex: primaryDisabled && !allowDisabledFocus ? 0 : -1 })));
};
BaseButton.prototype._onPointerDown = function (ev) {
var onPointerDown = this.props.onPointerDown;
if (onPointerDown) {
onPointerDown(ev);
}
if (ev.pointerType === 'touch') {
this._handleTouchAndPointerEvent();
ev.preventDefault();
ev.stopImmediatePropagation();
}
};
BaseButton.prototype._handleTouchAndPointerEvent = function () {
var _this = this;
// If we already have an existing timeout from a previous touch and pointer event
// cancel that timeout so we can set a new one.
if (this._lastTouchTimeoutId !== undefined) {
this._async.clearTimeout(this._lastTouchTimeoutId);
this._lastTouchTimeoutId = undefined;
}
this._processingTouch = true;
this._lastTouchTimeoutId = this._async.setTimeout(function () {
_this._processingTouch = false;
_this._lastTouchTimeoutId = undefined;
// Touch and pointer events don't focus the button naturally,
// so adding an imperative focus call to guarantee this behavior.
// Only focus the button if a splitbutton menu is not open
if (_this.state.menuHidden) {
_this.focus();
}
}, TouchIdleDelay);
};
/**
* Returns if the user hits a valid keyboard key to open the menu
* @param ev - the keyboard event
* @returns True if user clicks on custom trigger key if enabled or alt + down arrow if not. False otherwise.
*/
BaseButton.prototype._isValidMenuOpenKey = function (ev) {
if (this.props.menuTriggerKeyCode) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === this.props.menuTriggerKeyCode;
}
else if (this.props.menuProps) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === _Utilities__rspack_import_11.KeyCodes.down && (ev.altKey || ev.metaKey);
}
// Note: When enter is pressed, we will let the event continue to propagate
// to trigger the onClick event on the button
return false;
};
BaseButton.defaultProps = {
baseClassName: 'ms-Button',
styles: {},
split: false,
};
// needed to access registeredProviders when manually setting focus visibility
BaseButton.contextType = _Utilities__rspack_import_24.FocusRectsContext;
return BaseButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=BaseButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var noOutline = {
outline: 0,
};
var iconStyle = function (fontSize) {
return {
fontSize: fontSize,
margin: '0 4px',
height: '16px',
lineHeight: '16px',
textAlign: 'center',
flexShrink: 0,
};
};
/**
* Gets the base button styles. Note: because it is a base class to be used with the `mergeRules`
* helper, it should have values for all class names in the interface. This let `mergeRules` optimize
* mixing class names together.
*/
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme) {
var _a, _b;
var semanticColors = theme.semanticColors, effects = theme.effects, fonts = theme.fonts;
var border = semanticColors.buttonBorder;
var disabledBackground = semanticColors.disabledBackground;
var disabledText = semanticColors.disabledText;
var buttonHighContrastFocus = {
left: -2,
top: -2,
bottom: -2,
right: -2,
outlineColor: 'ButtonText',
};
return {
root: [
(0,_Styling__rspack_import_1.getFocusStyle)(theme, { inset: 1, highContrastStyle: buttonHighContrastFocus, borderColor: 'transparent' }),
theme.fonts.medium,
{
border: '1px solid ' + border,
borderRadius: effects.roundedCorner2,
boxSizing: 'border-box',
cursor: 'pointer',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
padding: '0 16px',
textDecoration: 'none',
textAlign: 'center',
userSelect: 'none',
// IE11 workaround for preventing shift of child elements of a button when active.
':active > span': {
position: 'relative',
left: 0,
top: 0,
},
},
],
rootDisabled: [
(0,_Styling__rspack_import_1.getFocusStyle)(theme, { inset: 1, highContrastStyle: buttonHighContrastFocus, borderColor: 'transparent' }),
{
backgroundColor: disabledBackground,
borderColor: disabledBackground,
color: disabledText,
cursor: 'default',
':hover': noOutline,
':focus': noOutline,
},
],
iconDisabled: (_a = {
color: disabledText
},
_a[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
},
_a),
menuIconDisabled: (_b = {
color: disabledText
},
_b[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
},
_b),
flexContainer: {
display: 'flex',
height: '100%',
flexWrap: 'nowrap',
justifyContent: 'center',
alignItems: 'center',
},
description: {
display: 'block',
},
textContainer: {
flexGrow: 1,
display: 'block',
},
icon: iconStyle(fonts.mediumPlus.fontSize),
menuIcon: iconStyle(fonts.small.fontSize),
label: {
margin: '0 4px',
lineHeight: '100%',
display: 'block',
},
screenReaderText: _Styling__rspack_import_1.hiddenContentStyle,
};
});
//# sourceMappingURL=BaseButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/ButtonThemes.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/ButtonThemes.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
primaryStyles: () => (primaryStyles),
standardStyles: () => (standardStyles)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
var splitButtonDividerBaseStyles = function () {
return {
position: 'absolute',
width: 1,
right: 31,
top: 8,
bottom: 8,
};
};
function standardStyles(theme) {
var _a, _b, _c, _d, _e;
var s = theme.semanticColors, p = theme.palette;
var buttonBackground = s.buttonBackground;
var buttonBackgroundPressed = s.buttonBackgroundPressed;
var buttonBackgroundHovered = s.buttonBackgroundHovered;
var buttonBackgroundDisabled = s.buttonBackgroundDisabled;
var buttonText = s.buttonText;
var buttonTextHovered = s.buttonTextHovered;
var buttonTextDisabled = s.buttonTextDisabled;
var buttonTextChecked = s.buttonTextChecked;
var buttonTextCheckedHovered = s.buttonTextCheckedHovered;
return {
root: {
backgroundColor: buttonBackground,
color: buttonText,
},
rootHovered: (_a = {
backgroundColor: buttonBackgroundHovered,
color: buttonTextHovered
},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
borderColor: 'Highlight',
color: 'Highlight',
},
_a),
rootPressed: {
backgroundColor: buttonBackgroundPressed,
color: buttonTextChecked,
},
rootExpanded: {
backgroundColor: buttonBackgroundPressed,
color: buttonTextChecked,
},
rootChecked: {
backgroundColor: buttonBackgroundPressed,
color: buttonTextChecked,
},
rootCheckedHovered: {
backgroundColor: buttonBackgroundPressed,
color: buttonTextCheckedHovered,
},
rootDisabled: (_b = {
color: buttonTextDisabled,
backgroundColor: buttonBackgroundDisabled
},
_b[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_b),
// Split button styles
splitButtonContainer: (_c = {},
_c[_Styling__rspack_import_0.HighContrastSelector] = {
border: 'none',
},
_c),
splitButtonMenuButton: {
color: p.white,
backgroundColor: 'transparent',
':hover': (_d = {
backgroundColor: p.neutralLight
},
_d[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'Highlight',
},
_d),
},
splitButtonMenuButtonDisabled: {
backgroundColor: s.buttonBackgroundDisabled,
':hover': {
backgroundColor: s.buttonBackgroundDisabled,
},
},
splitButtonDivider: (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, splitButtonDividerBaseStyles()), (_e = { backgroundColor: p.neutralTertiaryAlt }, _e[_Styling__rspack_import_0.HighContrastSelector] = {
backgroundColor: 'WindowText',
}, _e)),
splitButtonDividerDisabled: {
backgroundColor: theme.palette.neutralTertiaryAlt,
},
splitButtonMenuButtonChecked: {
backgroundColor: p.neutralQuaternaryAlt,
':hover': {
backgroundColor: p.neutralQuaternaryAlt,
},
},
splitButtonMenuButtonExpanded: {
backgroundColor: p.neutralQuaternaryAlt,
':hover': {
backgroundColor: p.neutralQuaternaryAlt,
},
},
splitButtonMenuIcon: {
color: s.buttonText,
},
splitButtonMenuIconDisabled: {
color: s.buttonTextDisabled,
},
};
}
function primaryStyles(theme) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
var p = theme.palette, s = theme.semanticColors;
return {
root: (_a = {
backgroundColor: s.primaryButtonBackground,
border: "1px solid ".concat(s.primaryButtonBackground),
color: s.primaryButtonText
},
_a[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ color: 'Window', backgroundColor: 'WindowText', borderColor: 'WindowText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_a[".".concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, " &:focus, :host(.").concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, ") &:focus")] = {
':after': {
border: "none",
outlineColor: p.white,
},
},
_a),
rootHovered: (_b = {
backgroundColor: s.primaryButtonBackgroundHovered,
border: "1px solid ".concat(s.primaryButtonBackgroundHovered),
color: s.primaryButtonTextHovered
},
_b[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'Window',
backgroundColor: 'Highlight',
borderColor: 'Highlight',
},
_b),
rootPressed: (_c = {
backgroundColor: s.primaryButtonBackgroundPressed,
border: "1px solid ".concat(s.primaryButtonBackgroundPressed),
color: s.primaryButtonTextPressed
},
_c[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ color: 'Window', backgroundColor: 'WindowText', borderColor: 'WindowText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_c),
rootExpanded: {
backgroundColor: s.primaryButtonBackgroundPressed,
color: s.primaryButtonTextPressed,
},
rootChecked: {
backgroundColor: s.primaryButtonBackgroundPressed,
color: s.primaryButtonTextPressed,
},
rootCheckedHovered: {
backgroundColor: s.primaryButtonBackgroundPressed,
color: s.primaryButtonTextPressed,
},
rootDisabled: (_d = {
color: s.primaryButtonTextDisabled,
backgroundColor: s.primaryButtonBackgroundDisabled
},
_d[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_d),
// Split button styles
splitButtonContainer: (_e = {},
_e[_Styling__rspack_import_0.HighContrastSelector] = {
border: 'none',
},
_e),
splitButtonDivider: (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, splitButtonDividerBaseStyles()), (_f = { backgroundColor: p.white }, _f[_Styling__rspack_import_0.HighContrastSelector] = {
backgroundColor: 'Window',
}, _f)),
splitButtonMenuButton: (_g = {
backgroundColor: s.primaryButtonBackground,
color: s.primaryButtonText
},
_g[_Styling__rspack_import_0.HighContrastSelector] = {
backgroundColor: 'Canvas',
},
_g[':hover'] = (_h = {
backgroundColor: s.primaryButtonBackgroundHovered
},
_h[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'Highlight',
},
_h),
_g),
splitButtonMenuButtonDisabled: {
backgroundColor: s.primaryButtonBackgroundDisabled,
':hover': {
backgroundColor: s.primaryButtonBackgroundDisabled,
},
},
splitButtonMenuButtonChecked: {
backgroundColor: s.primaryButtonBackgroundPressed,
':hover': {
backgroundColor: s.primaryButtonBackgroundPressed,
},
},
splitButtonMenuButtonExpanded: {
backgroundColor: s.primaryButtonBackgroundPressed,
':hover': {
backgroundColor: s.primaryButtonBackgroundPressed,
},
},
splitButtonMenuIcon: {
color: s.primaryButtonText,
},
splitButtonMenuIconDisabled: (_j = {
color: p.neutralTertiary
},
_j[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
},
_j),
};
}
//# sourceMappingURL=ButtonThemes.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.js":
/*!*************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.js ***!
\*************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CommandBarButton: () => (CommandBarButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _BaseButton__rspack_import_2 = __webpack_require__(/*! ../BaseButton */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/customizable.js");
/* import */ var _CommandBarButton_styles__rspack_import_3 = __webpack_require__(/*! ./CommandBarButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.styles.js");
/**
* {@docCategory Button}
*/
var CommandBarButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(CommandBarButton, _super);
function CommandBarButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
CommandBarButton.prototype.render = function () {
var _a = this.props, styles = _a.styles, theme = _a.theme;
return (react__rspack_import_0.createElement(_BaseButton__rspack_import_2.BaseButton, (0,tslib__rspack_import_1.__assign)({}, this.props, { variantClassName: "ms-Button--commandBar", styles: (0,_CommandBarButton_styles__rspack_import_3.getStyles)(theme, styles), onRenderDescription: _Utilities__rspack_import_4.nullRender })));
};
CommandBarButton = (0,tslib__rspack_import_1.__decorate)([
(0,_Utilities__rspack_import_5.customizable)('CommandBarButton', ['theme', 'styles'], true)
], CommandBarButton);
return CommandBarButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=CommandBarButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.styles.js":
/*!********************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.styles.js ***!
\********************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_5 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_3 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _BaseButton_styles__rspack_import_1 = __webpack_require__(/*! ../BaseButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js");
/* import */ var _SplitButton_SplitButton_styles__rspack_import_2 = __webpack_require__(/*! ../SplitButton/SplitButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.styles.js");
/* import */ var _BaseButton_classNames__rspack_import_4 = __webpack_require__(/*! ../BaseButton.classNames */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.classNames.js");
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, customStyles, focusInset, focusColor) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
var baseButtonStyles = (0,_BaseButton_styles__rspack_import_1.getStyles)(theme);
var baseSplitButtonStyles = (0,_SplitButton_SplitButton_styles__rspack_import_2.getStyles)(theme);
var p = theme.palette, semanticColors = theme.semanticColors;
var commandButtonHighContrastFocus = {
left: 4,
top: 4,
bottom: 4,
right: 4,
border: 'none',
};
var commandButtonStyles = {
root: [
(0,_Styling__rspack_import_3.getFocusStyle)(theme, {
inset: 2,
highContrastStyle: commandButtonHighContrastFocus,
borderColor: 'transparent',
}),
theme.fonts.medium,
(_a = {
minWidth: '40px',
backgroundColor: p.white,
color: p.neutralPrimary,
padding: '0 4px',
border: 'none',
borderRadius: 0
},
_a[_Styling__rspack_import_3.HighContrastSelector] = {
border: 'none',
},
_a),
],
rootHovered: (_b = {
backgroundColor: p.neutralLighter,
color: p.neutralDark
},
_b[_Styling__rspack_import_3.HighContrastSelector] = {
color: 'Highlight',
},
_b[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.themeDarkAlt,
},
_b[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonMenuIcon)] = {
color: p.neutralPrimary,
},
_b),
rootPressed: (_c = {
backgroundColor: p.neutralLight,
color: p.neutralDark
},
_c[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.themeDark,
},
_c[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonMenuIcon)] = {
color: p.neutralPrimary,
},
_c),
rootChecked: (_d = {
backgroundColor: p.neutralLight,
color: p.neutralDark
},
_d[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.themeDark,
},
_d[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonMenuIcon)] = {
color: p.neutralPrimary,
},
_d),
rootCheckedHovered: (_e = {
backgroundColor: p.neutralQuaternaryAlt
},
_e[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.themeDark,
},
_e[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonMenuIcon)] = {
color: p.neutralPrimary,
},
_e),
rootExpanded: (_f = {
backgroundColor: p.neutralLight,
color: p.neutralDark
},
_f[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.themeDark,
},
_f[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonMenuIcon)] = {
color: p.neutralPrimary,
},
_f),
rootExpandedHovered: {
backgroundColor: p.neutralQuaternaryAlt,
},
rootDisabled: (_g = {
backgroundColor: p.white
},
_g[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = (_h = {
color: semanticColors.disabledBodySubtext
},
_h[_Styling__rspack_import_3.HighContrastSelector] = (0,tslib__rspack_import_5.__assign)({ color: 'GrayText' }, (0,_Styling__rspack_import_3.getHighContrastNoAdjustStyle)()),
_h),
_g[_Styling__rspack_import_3.HighContrastSelector] = (0,tslib__rspack_import_5.__assign)({ color: 'GrayText', backgroundColor: 'Window' }, (0,_Styling__rspack_import_3.getHighContrastNoAdjustStyle)()),
_g),
// Split button styles
splitButtonContainer: (_j = {
height: '100%'
},
_j[_Styling__rspack_import_3.HighContrastSelector] = {
border: 'none',
},
_j),
splitButtonDividerDisabled: (_k = {},
_k[_Styling__rspack_import_3.HighContrastSelector] = {
backgroundColor: 'Window',
},
_k),
splitButtonDivider: {
backgroundColor: p.neutralTertiaryAlt,
},
splitButtonMenuButton: {
backgroundColor: p.white,
border: 'none',
borderTopRightRadius: '0',
borderBottomRightRadius: '0',
color: p.neutralSecondary,
':hover': (_l = {
backgroundColor: p.neutralLighter,
color: p.neutralDark
},
_l[_Styling__rspack_import_3.HighContrastSelector] = {
color: 'Highlight',
},
_l[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.neutralPrimary,
},
_l),
':active': (_m = {
backgroundColor: p.neutralLight
},
_m[".".concat(_BaseButton_classNames__rspack_import_4.ButtonGlobalClassNames.msButtonIcon)] = {
color: p.neutralPrimary,
},
_m),
},
splitButtonMenuButtonDisabled: (_o = {
backgroundColor: p.white
},
_o[_Styling__rspack_import_3.HighContrastSelector] = (0,tslib__rspack_import_5.__assign)({ color: 'GrayText', border: 'none', backgroundColor: 'Window' }, (0,_Styling__rspack_import_3.getHighContrastNoAdjustStyle)()),
_o),
splitButtonMenuButtonChecked: {
backgroundColor: p.neutralLight,
color: p.neutralDark,
':hover': {
backgroundColor: p.neutralQuaternaryAlt,
},
},
splitButtonMenuButtonExpanded: {
backgroundColor: p.neutralLight,
color: p.black,
':hover': {
backgroundColor: p.neutralQuaternaryAlt,
},
},
splitButtonMenuIcon: {
color: p.neutralPrimary,
},
splitButtonMenuIconDisabled: {
color: p.neutralTertiary,
},
label: {
fontWeight: 'normal', // theme.fontWeights.semibold,
},
icon: {
color: p.themePrimary,
},
menuIcon: {
color: p.neutralSecondary,
},
};
return (0,_Styling__rspack_import_3.concatStyleSets)(baseButtonStyles, baseSplitButtonStyles, commandButtonStyles, customStyles);
});
//# sourceMappingURL=CommandBarButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/CommandButton/CommandButton.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/CommandButton/CommandButton.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CommandButton: () => (CommandButton)
});
/* import */ var _ActionButton_ActionButton__rspack_import_0 = __webpack_require__(/*! ../ActionButton/ActionButton */ "./node_modules/@fluentui/react/lib/components/Button/ActionButton/ActionButton.js");
/**
* {@docCategory Button}
*/
var CommandButton = _ActionButton_ActionButton__rspack_import_0.ActionButton;
//# sourceMappingURL=CommandButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DefaultButton: () => (DefaultButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _BaseButton__rspack_import_2 = __webpack_require__(/*! ../BaseButton */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/customizable.js");
/* import */ var _DefaultButton_styles__rspack_import_3 = __webpack_require__(/*! ./DefaultButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.styles.js");
/**
* {@docCategory Button}
*/
var DefaultButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(DefaultButton, _super);
function DefaultButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
DefaultButton.prototype.render = function () {
var _a = this.props, _b = _a.primary, primary = _b === void 0 ? false : _b, styles = _a.styles, theme = _a.theme;
return (react__rspack_import_0.createElement(_BaseButton__rspack_import_2.BaseButton, (0,tslib__rspack_import_1.__assign)({}, this.props, { variantClassName: primary ? 'ms-Button--primary' : 'ms-Button--default', styles: (0,_DefaultButton_styles__rspack_import_3.getStyles)(theme, styles, primary), onRenderDescription: _Utilities__rspack_import_4.nullRender })));
};
DefaultButton = (0,tslib__rspack_import_1.__decorate)([
(0,_Utilities__rspack_import_5.customizable)('DefaultButton', ['theme', 'styles'], true)
], DefaultButton);
return DefaultButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=DefaultButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.styles.js":
/*!**************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.styles.js ***!
\**************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_3 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _BaseButton_styles__rspack_import_1 = __webpack_require__(/*! ../BaseButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js");
/* import */ var _SplitButton_SplitButton_styles__rspack_import_2 = __webpack_require__(/*! ../SplitButton/SplitButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.styles.js");
/* import */ var _ButtonThemes__rspack_import_4 = __webpack_require__(/*! ../ButtonThemes */ "./node_modules/@fluentui/react/lib/components/Button/ButtonThemes.js");
var DEFAULT_BUTTON_MIN_HEIGHT = '32px';
var DEFAULT_BUTTON_MIN_WIDTH = '80px';
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, customStyles, primary) {
var baseButtonStyles = (0,_BaseButton_styles__rspack_import_1.getStyles)(theme);
var splitButtonStyles = (0,_SplitButton_SplitButton_styles__rspack_import_2.getStyles)(theme);
var defaultButtonStyles = {
root: {
minWidth: DEFAULT_BUTTON_MIN_WIDTH,
minHeight: DEFAULT_BUTTON_MIN_HEIGHT,
},
label: {
fontWeight: _Styling__rspack_import_3.FontWeights.semibold,
},
};
return (0,_Styling__rspack_import_3.concatStyleSets)(baseButtonStyles, defaultButtonStyles, primary ? (0,_ButtonThemes__rspack_import_4.primaryStyles)(theme) : (0,_ButtonThemes__rspack_import_4.standardStyles)(theme), splitButtonStyles, customStyles);
});
//# sourceMappingURL=DefaultButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
IconButton: () => (IconButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _BaseButton__rspack_import_2 = __webpack_require__(/*! ../BaseButton */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/customizable.js");
/* import */ var _IconButton_styles__rspack_import_3 = __webpack_require__(/*! ./IconButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.styles.js");
/**
* {@docCategory Button}
*/
var IconButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(IconButton, _super);
function IconButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
IconButton.prototype.render = function () {
var _a = this.props, styles = _a.styles, theme = _a.theme;
return (react__rspack_import_0.createElement(_BaseButton__rspack_import_2.BaseButton, (0,tslib__rspack_import_1.__assign)({}, this.props, { variantClassName: "ms-Button--icon", styles: (0,_IconButton_styles__rspack_import_3.getStyles)(theme, styles), onRenderText: _Utilities__rspack_import_4.nullRender, onRenderDescription: _Utilities__rspack_import_4.nullRender })));
};
IconButton = (0,tslib__rspack_import_1.__decorate)([
(0,_Utilities__rspack_import_5.customizable)('IconButton', ['theme', 'styles'], true)
], IconButton);
return IconButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=IconButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.styles.js":
/*!********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.styles.js ***!
\********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_3 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _BaseButton_styles__rspack_import_1 = __webpack_require__(/*! ../BaseButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/BaseButton.styles.js");
/* import */ var _SplitButton_SplitButton_styles__rspack_import_2 = __webpack_require__(/*! ../SplitButton/SplitButton.styles */ "./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.styles.js");
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, customStyles) {
var _a;
var baseButtonStyles = (0,_BaseButton_styles__rspack_import_1.getStyles)(theme);
var splitButtonStyles = (0,_SplitButton_SplitButton_styles__rspack_import_2.getStyles)(theme);
var palette = theme.palette, semanticColors = theme.semanticColors;
var iconButtonStyles = {
root: {
padding: '0 4px',
width: '32px',
height: '32px',
backgroundColor: 'transparent',
border: 'none',
color: semanticColors.link,
},
rootHovered: (_a = {
color: palette.themeDarkAlt,
backgroundColor: palette.neutralLighter
},
_a[_Styling__rspack_import_3.HighContrastSelector] = {
borderColor: 'Highlight',
color: 'Highlight',
},
_a),
rootHasMenu: {
width: 'auto',
},
rootPressed: {
color: palette.themeDark,
backgroundColor: palette.neutralLight,
},
rootExpanded: {
color: palette.themeDark,
backgroundColor: palette.neutralLight,
},
rootChecked: {
color: palette.themeDark,
backgroundColor: palette.neutralLight,
},
rootCheckedHovered: {
color: palette.themeDark,
backgroundColor: palette.neutralQuaternaryAlt,
},
rootDisabled: {
color: palette.neutralTertiaryAlt,
},
};
return (0,_Styling__rspack_import_3.concatStyleSets)(baseButtonStyles, iconButtonStyles, splitButtonStyles, customStyles);
});
//# sourceMappingURL=IconButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/PrimaryButton/PrimaryButton.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/PrimaryButton/PrimaryButton.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PrimaryButton: () => (PrimaryButton)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/customizable.js");
/* import */ var _DefaultButton_DefaultButton__rspack_import_2 = __webpack_require__(/*! ../DefaultButton/DefaultButton */ "./node_modules/@fluentui/react/lib/components/Button/DefaultButton/DefaultButton.js");
/**
* {@docCategory Button}
*/
var PrimaryButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(PrimaryButton, _super);
function PrimaryButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
PrimaryButton.prototype.render = function () {
return react__rspack_import_0.createElement(_DefaultButton_DefaultButton__rspack_import_2.DefaultButton, (0,tslib__rspack_import_1.__assign)({}, this.props, { primary: true, onRenderDescription: _Utilities__rspack_import_3.nullRender }));
};
PrimaryButton = (0,tslib__rspack_import_1.__decorate)([
(0,_Utilities__rspack_import_4.customizable)('PrimaryButton', ['theme', 'styles'], true)
], PrimaryButton);
return PrimaryButton;
}(react__rspack_import_0.Component));
//# sourceMappingURL=PrimaryButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.classNames.js":
/*!**************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.classNames.js ***!
\**************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
SplitButtonGlobalClassNames: () => (SplitButtonGlobalClassNames),
getSplitButtonClassNames: () => (getSplitButtonClassNames)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var SplitButtonGlobalClassNames = {
msSplitButtonDivider: 'ms-SplitButton-divider',
};
var getSplitButtonClassNames = (0,_Utilities__rspack_import_0.memoizeFunction)(function (styles, disabled, expanded, checked, primaryDisabled) {
return {
root: (0,_Styling__rspack_import_1.mergeStyles)(styles.splitButtonMenuButton, expanded && [styles.splitButtonMenuButtonExpanded], disabled && [styles.splitButtonMenuButtonDisabled], checked && !disabled && [styles.splitButtonMenuButtonChecked], primaryDisabled &&
!disabled && [
{
':focus': styles.splitButtonMenuFocused,
},
]),
splitButtonContainer: (0,_Styling__rspack_import_1.mergeStyles)(styles.splitButtonContainer, !disabled &&
checked && [
styles.splitButtonContainerChecked,
{
':hover': styles.splitButtonContainerCheckedHovered,
},
], !disabled &&
!checked && [
{
':hover': styles.splitButtonContainerHovered,
':focus': styles.splitButtonContainerFocused,
},
], disabled && styles.splitButtonContainerDisabled),
icon: (0,_Styling__rspack_import_1.mergeStyles)(styles.splitButtonMenuIcon, disabled && styles.splitButtonMenuIconDisabled, !disabled && primaryDisabled && styles.splitButtonMenuIcon),
flexContainer: (0,_Styling__rspack_import_1.mergeStyles)(styles.splitButtonFlexContainer),
divider: (0,_Styling__rspack_import_1.mergeStyles)(SplitButtonGlobalClassNames.msSplitButtonDivider, styles.splitButtonDivider, (primaryDisabled || disabled) && styles.splitButtonDividerDisabled),
};
});
//# sourceMappingURL=SplitButton.classNames.js.map
}),
"./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.styles.js":
/*!**********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Button/SplitButton/SplitButton.styles.js ***!
\**********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
var getStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (theme, customStyles) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
var effects = theme.effects, palette = theme.palette, semanticColors = theme.semanticColors;
var buttonHighContrastFocus = {
left: -2,
top: -2,
bottom: -2,
right: -2,
border: 'none',
};
var splitButtonDividerBaseStyles = {
position: 'absolute',
width: 1,
right: 31,
top: 8,
bottom: 8,
};
var splitButtonStyles = {
splitButtonContainer: [
(0,_Styling__rspack_import_1.getFocusStyle)(theme, { highContrastStyle: buttonHighContrastFocus, inset: 2, pointerEvents: 'none' }),
{
display: 'inline-flex',
'.ms-Button--default': {
borderTopRightRadius: '0',
borderBottomRightRadius: '0',
borderRight: 'none',
flexGrow: '1',
},
'.ms-Button--primary': (_a = {
borderTopRightRadius: '0',
borderBottomRightRadius: '0',
border: 'none',
flexGrow: '1',
':hover': {
border: 'none',
},
':active': {
border: 'none',
}
},
_a[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ color: 'WindowText', backgroundColor: 'Window', border: '1px solid WindowText', borderRightWidth: '0' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()), { ':hover': {
backgroundColor: 'Highlight',
border: '1px solid Highlight',
borderRightWidth: '0',
color: 'HighlightText',
}, ':active': {
border: '1px solid Highlight',
} }),
_a),
'.ms-Button--default + .ms-Button': (_b = {},
_b[_Styling__rspack_import_1.HighContrastSelector] = {
border: '1px solid WindowText',
borderLeftWidth: '0',
':hover': {
backgroundColor: 'HighlightText',
borderColor: 'Highlight',
color: 'Highlight',
'.ms-Button-menuIcon': (0,tslib__rspack_import_2.__assign)({ backgroundColor: 'HighlightText', color: 'Highlight' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
},
},
_b),
'.ms-Button--default + .ms-Button[aria-expanded="true"]': (_c = {},
_c[_Styling__rspack_import_1.HighContrastSelector] = {
backgroundColor: 'HighlightText',
borderColor: 'Highlight',
color: 'Highlight',
'.ms-Button-menuIcon': (0,tslib__rspack_import_2.__assign)({ backgroundColor: 'HighlightText', color: 'Highlight' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
},
_c),
'.ms-Button--primary + .ms-Button': (_d = {
border: 'none'
},
_d[_Styling__rspack_import_1.HighContrastSelector] = {
border: '1px solid WindowText',
borderLeftWidth: '0',
':hover': {
borderLeftWidth: '0',
backgroundColor: 'Highlight',
borderColor: 'Highlight',
color: 'HighlightText',
'.ms-Button-menuIcon': (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()), { color: 'HighlightText' }),
},
},
_d),
'.ms-Button--primary + .ms-Button[aria-expanded="true"]': (_e = {},
_e[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ backgroundColor: 'Highlight', borderColor: 'Highlight', color: 'HighlightText' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()), { '.ms-Button-menuIcon': {
color: 'HighlightText',
} }),
_e),
'.ms-Button.is-disabled': (_f = {},
_f[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_f),
},
],
splitButtonContainerHovered: {
'.ms-Button--default.is-disabled': (_g = {
backgroundColor: semanticColors.buttonBackgroundDisabled,
color: semanticColors.buttonTextDisabled
},
_g[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_g),
'.ms-Button--primary.is-disabled': (_h = {
backgroundColor: semanticColors.primaryButtonBackgroundDisabled,
color: semanticColors.primaryButtonTextDisabled
},
_h[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_h),
},
splitButtonContainerChecked: {
'.ms-Button--primary': (_j = {},
_j[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: 'Window', backgroundColor: 'WindowText' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_j),
},
splitButtonContainerCheckedHovered: {
'.ms-Button--primary': (_k = {},
_k[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: 'Window', backgroundColor: 'WindowText' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_k),
},
splitButtonContainerFocused: {
outline: 'none!important',
},
splitButtonMenuButton: (_l = {
padding: 6,
height: 'auto',
boxSizing: 'border-box',
borderRadius: 0,
borderTopRightRadius: effects.roundedCorner2,
borderBottomRightRadius: effects.roundedCorner2,
border: "1px solid ".concat(palette.neutralSecondaryAlt),
borderLeft: 'none',
outline: 'transparent',
userSelect: 'none',
display: 'inline-block',
textDecoration: 'none',
textAlign: 'center',
cursor: 'pointer',
verticalAlign: 'top',
width: 32,
marginLeft: -1,
marginTop: 0,
marginRight: 0,
marginBottom: 0
},
_l[_Styling__rspack_import_1.HighContrastSelector] = {
'.ms-Button-menuIcon': {
color: 'WindowText',
},
},
_l),
splitButtonDivider: (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, splitButtonDividerBaseStyles), (_m = {}, _m[_Styling__rspack_import_1.HighContrastSelector] = {
backgroundColor: 'WindowText',
}, _m)),
splitButtonDividerDisabled: (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, splitButtonDividerBaseStyles), (_o = {}, _o[_Styling__rspack_import_1.HighContrastSelector] = {
backgroundColor: 'GrayText',
}, _o)),
splitButtonMenuButtonDisabled: (_p = {
pointerEvents: 'none',
border: 'none',
':hover': {
cursor: 'default',
},
'.ms-Button--primary': (_q = {},
_q[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
borderColor: 'GrayText',
backgroundColor: 'Window',
},
_q),
'.ms-Button-menuIcon': (_r = {},
_r[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
},
_r)
},
_p[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
border: '1px solid GrayText',
backgroundColor: 'Window',
},
_p),
splitButtonFlexContainer: {
display: 'flex',
height: '100%',
flexWrap: 'nowrap',
justifyContent: 'center',
alignItems: 'center',
},
splitButtonContainerDisabled: (_s = {
outline: 'none',
border: 'none'
},
_s[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: 'GrayText', borderColor: 'GrayText', backgroundColor: 'Window' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_s),
splitButtonMenuFocused: (0,tslib__rspack_import_2.__assign)({}, (0,_Styling__rspack_import_1.getFocusStyle)(theme, { highContrastStyle: buttonHighContrastFocus, inset: 2 })),
};
return (0,_Styling__rspack_import_1.concatStyleSets)(splitButtonStyles, customStyles);
});
//# sourceMappingURL=SplitButton.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Callout/Callout.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Callout/Callout.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Callout: () => (Callout)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _CalloutContent__rspack_import_2 = __webpack_require__(/*! ./CalloutContent */ "./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.js");
/* import */ var _Layer__rspack_import_3 = __webpack_require__(/*! ../../Layer */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.js");
var Callout = react__rspack_import_0.forwardRef(function (_a, forwardedRef) {
var layerProps = _a.layerProps, doNotLayer = _a.doNotLayer, rest = (0,tslib__rspack_import_1.__rest)(_a, ["layerProps", "doNotLayer"]);
var content = react__rspack_import_0.createElement(_CalloutContent__rspack_import_2.CalloutContent, (0,tslib__rspack_import_1.__assign)({}, rest, { doNotLayer: doNotLayer, ref: forwardedRef }));
return doNotLayer ? content : react__rspack_import_0.createElement(_Layer__rspack_import_3.Layer, (0,tslib__rspack_import_1.__assign)({}, layerProps), content);
});
Callout.displayName = 'Callout';
//# sourceMappingURL=Callout.js.map
}),
"./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.base.js":
/*!************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.base.js ***!
\************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CalloutContentBase: () => (CalloutContentBase)
});
/* import */ var tslib__rspack_import_9 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _common_DirectionalHint__rspack_import_3 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/on.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_17 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_20 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/object.js");
/* import */ var _Positioning__rspack_import_5 = __webpack_require__(/*! ../../utilities/positioning/positioning */ "./node_modules/@fluentui/react/lib/utilities/positioning/positioning.js");
/* import */ var _Positioning__rspack_import_2 = __webpack_require__(/*! ../../Positioning */ "./node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js");
/* import */ var _Popup__rspack_import_19 = __webpack_require__(/*! ../../Popup */ "./node_modules/@fluentui/react/lib/components/Popup/Popup.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _fluentui_react_hooks__rspack_import_6 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useAsync.js");
/* import */ var _fluentui_react_hooks__rspack_import_7 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useOnEvent.js");
/* import */ var _fluentui_react_hooks__rspack_import_11 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_react_hooks__rspack_import_15 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_16 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useTarget.js");
/* import */ var _utilities_dom__rspack_import_8 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var _a;
var COMPONENT_NAME = 'CalloutContentBase';
var ANIMATIONS = (_a = {},
_a[_Positioning__rspack_import_2.RectangleEdge.top] = _Styling__rspack_import_1.AnimationClassNames.slideUpIn10,
_a[_Positioning__rspack_import_2.RectangleEdge.bottom] = _Styling__rspack_import_1.AnimationClassNames.slideDownIn10,
_a[_Positioning__rspack_import_2.RectangleEdge.left] = _Styling__rspack_import_1.AnimationClassNames.slideLeftIn10,
_a[_Positioning__rspack_import_2.RectangleEdge.right] = _Styling__rspack_import_1.AnimationClassNames.slideRightIn10,
_a);
var BEAK_ORIGIN_POSITION = { top: 0, left: 0 };
// Microsoft Edge will overwrite inline styles if there is an animation pertaining to that style.
// To help ensure that edge will respect the offscreen style opacity
// filter needs to be added as an additional way to set opacity.
// Also set pointer-events: none so that the callout will not occlude the element it is
// going to be positioned against
var OFF_SCREEN_STYLE = {
opacity: 0,
filter: 'opacity(0)',
pointerEvents: 'none',
};
// role and role description go hand-in-hand. Both would be included by spreading getNativeProps for a basic element
// This constant array can be used to filter these out of native props spread on callout root and apply them together on
// calloutMain (the Popup component within the callout)
var ARIA_ROLE_ATTRIBUTES = ['role', 'aria-roledescription'];
var DEFAULT_PROPS = {
preventDismissOnLostFocus: false,
preventDismissOnScroll: false,
preventDismissOnResize: false,
isBeakVisible: true,
beakWidth: 16,
gapSpace: 0,
minPagePadding: 8,
directionalHint: _common_DirectionalHint__rspack_import_3.DirectionalHint.bottomAutoEdge,
};
var getClassNames = (0,_Utilities__rspack_import_4.classNamesFunction)({
disableCaching: true, // disabling caching because stylesProp.position mutates often
});
/**
* (Hook) to return a function to lazily fetch the bounds of the target element for the callout.
*/
function useBounds(_a, targetRef, targetWindow) {
var bounds = _a.bounds, _b = _a.minPagePadding, minPagePadding = _b === void 0 ? DEFAULT_PROPS.minPagePadding : _b, target = _a.target;
var _c = react__rspack_import_0.useState(false), targetWindowResized = _c[0], setTargetWindowResized = _c[1];
var cachedBounds = react__rspack_import_0.useRef(undefined);
var getBounds = react__rspack_import_0.useCallback(function () {
if (!cachedBounds.current || targetWindowResized) {
var currentBounds = typeof bounds === 'function' ? (targetWindow ? bounds(target, targetWindow) : undefined) : bounds;
if (!currentBounds && targetWindow) {
currentBounds = (0,_Positioning__rspack_import_5.getBoundsFromTargetWindow)(targetRef.current, targetWindow);
currentBounds = {
top: currentBounds.top + minPagePadding,
left: currentBounds.left + minPagePadding,
right: currentBounds.right - minPagePadding,
bottom: currentBounds.bottom - minPagePadding,
width: currentBounds.width - minPagePadding * 2,
height: currentBounds.height - minPagePadding * 2,
};
}
cachedBounds.current = currentBounds;
targetWindowResized && setTargetWindowResized(false);
}
return cachedBounds.current;
}, [bounds, minPagePadding, target, targetRef, targetWindow, targetWindowResized]);
var async = (0,_fluentui_react_hooks__rspack_import_6.useAsync)();
(0,_fluentui_react_hooks__rspack_import_7.useOnEvent)(targetWindow, 'resize', async.debounce(function () {
setTargetWindowResized(true);
}, 500, { leading: true }));
return getBounds;
}
/**
* (Hook) to return the maximum available height for the Callout to render into.
*/
function useMaxHeight(_a, getBounds, targetRef, positions) {
var _b;
var calloutMaxHeight = _a.calloutMaxHeight, finalHeight = _a.finalHeight, directionalHint = _a.directionalHint, directionalHintFixed = _a.directionalHintFixed, hidden = _a.hidden, gapSpace = _a.gapSpace, beakWidth = _a.beakWidth, isBeakVisible = _a.isBeakVisible, coverTarget = _a.coverTarget;
var _c = react__rspack_import_0.useState(), maxHeight = _c[0], setMaxHeight = _c[1];
var _d = (_b = positions === null || positions === void 0 ? void 0 : positions.elementPosition) !== null && _b !== void 0 ? _b : {}, top = _d.top, bottom = _d.bottom;
var targetRect = (targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) ? (0,_Positioning__rspack_import_5.getRectangleFromTarget)(targetRef.current) : undefined;
react__rspack_import_0.useEffect(function () {
var _a;
var bounds = (_a = getBounds()) !== null && _a !== void 0 ? _a : {};
var topBounds = bounds.top;
var bottomBounds = bounds.bottom;
var calculatedHeight;
// If aligned to top edge of target and not covering target, update bottom bounds to the
// top of the target (accounting for gap space and beak)
if ((positions === null || positions === void 0 ? void 0 : positions.targetEdge) === _Positioning__rspack_import_2.RectangleEdge.top && (targetRect === null || targetRect === void 0 ? void 0 : targetRect.top) && !coverTarget) {
bottomBounds = targetRect.top - (0,_Positioning__rspack_import_5.calculateGapSpace)(isBeakVisible, beakWidth, gapSpace);
}
if (typeof top === 'number' && bottomBounds) {
calculatedHeight = bottomBounds - top;
}
else if (typeof bottom === 'number' && typeof topBounds === 'number' && bottomBounds) {
calculatedHeight = bottomBounds - topBounds - bottom;
}
if ((!calloutMaxHeight && !hidden) ||
(calloutMaxHeight && calculatedHeight && calloutMaxHeight > calculatedHeight)) {
setMaxHeight(calculatedHeight);
}
else if (calloutMaxHeight) {
setMaxHeight(calloutMaxHeight);
}
else {
setMaxHeight(undefined);
}
}, [
bottom,
calloutMaxHeight,
finalHeight,
directionalHint,
directionalHintFixed,
getBounds,
hidden,
positions,
top,
gapSpace,
beakWidth,
isBeakVisible,
targetRect,
coverTarget,
]);
return maxHeight;
}
/**
* (Hook) to find the current position of Callout. If Callout is resized then a new position is calculated.
*/
function usePositions(props, hostElement, calloutElement, targetRef, getBounds, popupRef) {
var _a = react__rspack_import_0.useState(), positions = _a[0], setPositions = _a[1];
var positionAttempts = react__rspack_import_0.useRef(0);
var previousTarget = react__rspack_import_0.useRef(undefined);
var async = (0,_fluentui_react_hooks__rspack_import_6.useAsync)();
var hidden = props.hidden, target = props.target, finalHeight = props.finalHeight, calloutMaxHeight = props.calloutMaxHeight, onPositioned = props.onPositioned, directionalHint = props.directionalHint, hideOverflow = props.hideOverflow, preferScrollResizePositioning = props.preferScrollResizePositioning;
var win = (0,_utilities_dom__rspack_import_8.useWindowEx)();
var localRef = react__rspack_import_0.useRef(undefined);
var popupStyles;
if (localRef.current !== popupRef.current) {
localRef.current = popupRef.current;
popupStyles = popupRef.current ? win === null || win === void 0 ? void 0 : win.getComputedStyle(popupRef.current) : undefined;
}
var popupOverflowY = popupStyles === null || popupStyles === void 0 ? void 0 : popupStyles.overflowY;
react__rspack_import_0.useEffect(function () {
if (!hidden) {
var timerId_1 = async.requestAnimationFrame(function () {
var _a, _b;
if (hostElement.current && calloutElement) {
var currentProps = (0,tslib__rspack_import_9.__assign)((0,tslib__rspack_import_9.__assign)({}, props), { target: targetRef.current, bounds: getBounds() });
// duplicate calloutElement & remove useMaxHeight's maxHeight for position calc
var dupeCalloutElement = calloutElement.cloneNode(true);
dupeCalloutElement.style.maxHeight = calloutMaxHeight ? "".concat(calloutMaxHeight) : '';
dupeCalloutElement.style.visibility = 'hidden';
(_a = calloutElement.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(dupeCalloutElement);
var previousPositions = previousTarget.current === target ? positions : undefined;
// only account for scroll resizing if styles allow callout to scroll
// (popup styles determine if callout will scroll)
var isOverflowYHidden = hideOverflow || popupOverflowY === 'clip' || popupOverflowY === 'hidden';
var shouldScroll = preferScrollResizePositioning && !isOverflowYHidden;
// If there is a finalHeight given then we assume that the user knows and will handle
// additional positioning adjustments so we should call positionCard
var newPositions = finalHeight
? (0,_Positioning__rspack_import_5.positionCard)(currentProps, hostElement.current, dupeCalloutElement, previousPositions, win)
: (0,_Positioning__rspack_import_5.positionCallout)(currentProps, hostElement.current, dupeCalloutElement, previousPositions, shouldScroll, undefined, win);
// clean up duplicate calloutElement
(_b = calloutElement.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(dupeCalloutElement);
// Set the new position only when the positions do not exist or one of the new callout positions
// is different. The position should not change if the position is within 2 decimal places.
if ((!positions && newPositions) ||
(positions && newPositions && !arePositionsEqual(positions, newPositions) && positionAttempts.current < 5)) {
// We should not reposition the callout more than a few times, if it is then the content is likely resizing
// and we should stop trying to reposition to prevent a stack overflow.
positionAttempts.current++;
setPositions(newPositions);
}
else if (positionAttempts.current > 0) {
// Only call the onPositioned callback if the callout has been re-positioned at least once.
positionAttempts.current = 0;
onPositioned === null || onPositioned === void 0 ? void 0 : onPositioned(positions);
}
}
}, calloutElement);
previousTarget.current = target;
return function () {
async.cancelAnimationFrame(timerId_1);
previousTarget.current = undefined;
};
}
else {
// When the callout is hidden, clear position state so that it is not accidentally used next render.
setPositions(undefined);
positionAttempts.current = 0;
}
}, [
hidden,
directionalHint,
async,
calloutElement,
calloutMaxHeight,
hostElement,
targetRef,
finalHeight,
getBounds,
onPositioned,
positions,
props,
target,
hideOverflow,
preferScrollResizePositioning,
popupOverflowY,
win,
]);
return positions;
}
/**
* (Hook) to set up behavior to automatically focus the callout when it appears, if indicated by props.
*/
function useAutoFocus(_a, positions, calloutElement) {
var hidden = _a.hidden, setInitialFocus = _a.setInitialFocus;
var async = (0,_fluentui_react_hooks__rspack_import_6.useAsync)();
var hasPositions = !!positions;
react__rspack_import_0.useEffect(function () {
if (!hidden && setInitialFocus && hasPositions && calloutElement) {
var timerId_2 = async.requestAnimationFrame(function () { return (0,_Utilities__rspack_import_10.focusFirstChild)(calloutElement); }, calloutElement);
return function () { return async.cancelAnimationFrame(timerId_2); };
}
}, [hidden, hasPositions, async, calloutElement, setInitialFocus]);
}
/**
* (Hook) to set up various handlers to dismiss the popup when it loses focus or the window scrolls or similar cases.
*/
function useDismissHandlers(_a, positions, hostElement, targetRef, targetWindow) {
var hidden = _a.hidden, onDismiss = _a.onDismiss, preventDismissOnScroll = _a.preventDismissOnScroll, preventDismissOnResize = _a.preventDismissOnResize, preventDismissOnLostFocus = _a.preventDismissOnLostFocus, dismissOnTargetClick = _a.dismissOnTargetClick, shouldDismissOnWindowFocus = _a.shouldDismissOnWindowFocus, preventDismissOnEvent = _a.preventDismissOnEvent;
var isMouseDownOnPopup = react__rspack_import_0.useRef(false);
var async = (0,_fluentui_react_hooks__rspack_import_6.useAsync)();
var mouseDownHandlers = (0,_fluentui_react_hooks__rspack_import_11.useConst)([
function () {
isMouseDownOnPopup.current = true;
},
function () {
isMouseDownOnPopup.current = false;
},
]);
var positionsExists = !!positions;
react__rspack_import_0.useEffect(function () {
var dismissOnScroll = function (ev) {
if (positionsExists && !preventDismissOnScroll) {
dismissOnClickOrScroll(ev);
}
};
var dismissOnResize = function (ev) {
if (!preventDismissOnResize && !(preventDismissOnEvent && preventDismissOnEvent(ev))) {
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(ev);
}
};
var dismissOnLostFocus = function (ev) {
if (!preventDismissOnLostFocus) {
dismissOnClickOrScroll(ev);
}
};
var dismissOnClickOrScroll = function (ev) {
var eventPaths = ev.composedPath ? ev.composedPath() : [];
var target = eventPaths.length > 0 ? eventPaths[0] : ev.target;
var isEventTargetOutsideCallout = hostElement.current && !(0,_Utilities__rspack_import_12.elementContains)(hostElement.current, target);
// If mouse is pressed down on callout but moved outside then released, don't dismiss the callout.
if (isEventTargetOutsideCallout && isMouseDownOnPopup.current) {
isMouseDownOnPopup.current = false;
return;
}
if ((!targetRef.current && isEventTargetOutsideCallout) ||
(ev.target !== targetWindow &&
isEventTargetOutsideCallout &&
(!targetRef.current ||
'stopPropagation' in targetRef.current ||
dismissOnTargetClick ||
(target !== targetRef.current && !(0,_Utilities__rspack_import_12.elementContains)(targetRef.current, target))))) {
if (preventDismissOnEvent && preventDismissOnEvent(ev)) {
return;
}
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(ev);
}
};
var dismissOnTargetWindowBlur = function (ev) {
// Do nothing
if (!shouldDismissOnWindowFocus) {
return;
}
if (((preventDismissOnEvent && !preventDismissOnEvent(ev)) ||
(!preventDismissOnEvent && !preventDismissOnLostFocus)) &&
!(targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.document.hasFocus()) &&
ev.relatedTarget === null) {
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(ev);
}
};
// This is added so the callout will dismiss when the window is scrolled
// but not when something inside the callout is scrolled. The delay seems
// to be required to avoid React firing an async focus event in IE from
// the target changing focus quickly prior to rendering the callout.
var disposablesPromise = new Promise(function (resolve) {
async.setTimeout(function () {
if (!hidden && targetWindow) {
var disposables_1 = [
(0,_Utilities__rspack_import_13.on)(targetWindow, 'scroll', dismissOnScroll, true),
(0,_Utilities__rspack_import_13.on)(targetWindow, 'resize', dismissOnResize, true),
(0,_Utilities__rspack_import_13.on)(targetWindow.document.documentElement, 'focus', dismissOnLostFocus, true),
(0,_Utilities__rspack_import_13.on)(targetWindow.document.documentElement, 'click', dismissOnLostFocus, true),
(0,_Utilities__rspack_import_13.on)(targetWindow, 'blur', dismissOnTargetWindowBlur, true),
];
resolve(function () {
disposables_1.forEach(function (dispose) { return dispose(); });
});
}
}, 0);
});
return function () {
disposablesPromise.then(function (dispose) { return dispose(); });
};
}, [
hidden,
async,
hostElement,
targetRef,
targetWindow,
onDismiss,
shouldDismissOnWindowFocus,
dismissOnTargetClick,
preventDismissOnLostFocus,
preventDismissOnResize,
preventDismissOnScroll,
positionsExists,
preventDismissOnEvent,
]);
return mouseDownHandlers;
}
var CalloutContentBase = react__rspack_import_0.memo(react__rspack_import_0.forwardRef(function (propsWithoutDefaults, forwardedRef) {
var props = (0,_Utilities__rspack_import_14.getPropsWithDefaults)(DEFAULT_PROPS, propsWithoutDefaults);
var styles = props.styles, style = props.style, ariaLabel = props.ariaLabel, ariaDescribedBy = props.ariaDescribedBy, ariaLabelledBy = props.ariaLabelledBy, className = props.className, isBeakVisible = props.isBeakVisible, children = props.children, beakWidth = props.beakWidth, calloutWidth = props.calloutWidth, calloutMaxWidth = props.calloutMaxWidth, calloutMinWidth = props.calloutMinWidth, doNotLayer = props.doNotLayer, finalHeight = props.finalHeight, _a = props.hideOverflow, hideOverflow = _a === void 0 ? !!finalHeight : _a, backgroundColor = props.backgroundColor, calloutMaxHeight = props.calloutMaxHeight, onScroll = props.onScroll,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_b = props.shouldRestoreFocus,
// eslint-disable-next-line @typescript-eslint/no-deprecated
shouldRestoreFocus = _b === void 0 ? true : _b, target = props.target, hidden = props.hidden, onLayerMounted = props.onLayerMounted, popupProps = props.popupProps;
var hostElement = react__rspack_import_0.useRef(null);
var popupRef = react__rspack_import_0.useRef(null);
var mergedPopupRefs = (0,_fluentui_react_hooks__rspack_import_15.useMergedRefs)(popupRef, popupProps === null || popupProps === void 0 ? void 0 : popupProps.ref);
var _c = react__rspack_import_0.useState(null), calloutElement = _c[0], setCalloutElement = _c[1];
var calloutCallback = react__rspack_import_0.useCallback(function (calloutEl) {
setCalloutElement(calloutEl);
}, []);
var rootRef = (0,_fluentui_react_hooks__rspack_import_15.useMergedRefs)(hostElement, forwardedRef);
var _d = (0,_fluentui_react_hooks__rspack_import_16.useTarget)(props.target, {
current: calloutElement,
}), targetRef = _d[0], targetWindow = _d[1];
var getBounds = useBounds(props, targetRef, targetWindow);
var positions = usePositions(props, hostElement, calloutElement, targetRef, getBounds, mergedPopupRefs);
var maxHeight = useMaxHeight(props, getBounds, targetRef, positions);
var _e = useDismissHandlers(props, positions, hostElement, targetRef, targetWindow), mouseDownOnPopup = _e[0], mouseUpOnPopup = _e[1];
// do not set both top and bottom css props from positions
// instead, use maxHeight
var isForcedInBounds = (positions === null || positions === void 0 ? void 0 : positions.elementPosition.top) && (positions === null || positions === void 0 ? void 0 : positions.elementPosition.bottom);
var cssPositions = (0,tslib__rspack_import_9.__assign)((0,tslib__rspack_import_9.__assign)({}, positions === null || positions === void 0 ? void 0 : positions.elementPosition), { maxHeight: maxHeight });
if (isForcedInBounds) {
cssPositions.bottom = undefined;
}
useAutoFocus(props, positions, calloutElement);
react__rspack_import_0.useEffect(function () {
if (!hidden) {
onLayerMounted === null || onLayerMounted === void 0 ? void 0 : onLayerMounted();
}
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if hidden changes
}, [hidden]);
// If there is no target window then we are likely in server side rendering and we should not render anything.
if (!targetWindow) {
return null;
}
var overflowYHidden = hideOverflow;
var beakVisible = isBeakVisible && !!target;
var classNames = getClassNames(styles, {
theme: props.theme,
className: className,
overflowYHidden: overflowYHidden,
calloutWidth: calloutWidth,
positions: positions,
beakWidth: beakWidth,
backgroundColor: backgroundColor,
calloutMaxWidth: calloutMaxWidth,
calloutMinWidth: calloutMinWidth,
doNotLayer: doNotLayer,
});
var overflowStyle = (0,tslib__rspack_import_9.__assign)((0,tslib__rspack_import_9.__assign)({ maxHeight: calloutMaxHeight ? calloutMaxHeight : '100%' }, style), (overflowYHidden && { overflowY: 'hidden' }));
var visibilityStyle = props.hidden ? { visibility: 'hidden' } : undefined;
// React.CSSProperties does not understand IRawStyle, so the inline animations will need to be cast as any for now.
return (react__rspack_import_0.createElement("div", { ref: rootRef, className: classNames.container, style: visibilityStyle },
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_9.__assign)({}, (0,_Utilities__rspack_import_17.getNativeProps)(props, _Utilities__rspack_import_17.divProperties, ARIA_ROLE_ATTRIBUTES), { className: (0,_Utilities__rspack_import_18.css)(classNames.root, positions && positions.targetEdge && ANIMATIONS[positions.targetEdge]), style: positions ? (0,tslib__rspack_import_9.__assign)({}, cssPositions) : OFF_SCREEN_STYLE,
// Safari and Firefox on Mac OS requires this to back-stop click events so focus remains in the Callout.
// See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
tabIndex: -1, ref: calloutCallback }),
beakVisible && react__rspack_import_0.createElement("div", { className: classNames.beak, style: getBeakPosition(positions) }),
beakVisible && react__rspack_import_0.createElement("div", { className: classNames.beakCurtain }),
react__rspack_import_0.createElement(_Popup__rspack_import_19.Popup
// don't use getNativeElementProps for role and roledescription because it will also
// pass through data-* props (resulting in them being used in two places)
, (0,tslib__rspack_import_9.__assign)({
// don't use getNativeElementProps for role and roledescription because it will also
// pass through data-* props (resulting in them being used in two places)
role: props.role, "aria-roledescription": props['aria-roledescription'], ariaDescribedBy: ariaDescribedBy, ariaLabel: ariaLabel, ariaLabelledBy: ariaLabelledBy, className: classNames.calloutMain, onDismiss: props.onDismiss, onMouseDown: mouseDownOnPopup, onMouseUp: mouseUpOnPopup, onRestoreFocus: props.onRestoreFocus, onScroll: onScroll,
// eslint-disable-next-line @typescript-eslint/no-deprecated
shouldRestoreFocus: shouldRestoreFocus, style: overflowStyle }, popupProps, { ref: mergedPopupRefs }), children))));
}), function (previousProps, nextProps) {
if (!nextProps.shouldUpdateWhenHidden && previousProps.hidden && nextProps.hidden) {
// Do not update when hidden.
return true;
}
return (0,_Utilities__rspack_import_20.shallowCompare)(previousProps, nextProps);
});
/**
* (Utility) to find and return the current `Callout` Beak position.
*
* @param positions
*/
function getBeakPosition(positions) {
var _a, _b;
var beakPositionStyle = (0,tslib__rspack_import_9.__assign)((0,tslib__rspack_import_9.__assign)({}, (_a = positions === null || positions === void 0 ? void 0 : positions.beakPosition) === null || _a === void 0 ? void 0 : _a.elementPosition), { display: ((_b = positions === null || positions === void 0 ? void 0 : positions.beakPosition) === null || _b === void 0 ? void 0 : _b.hideBeak) ? 'none' : undefined });
if (!beakPositionStyle.top && !beakPositionStyle.bottom && !beakPositionStyle.left && !beakPositionStyle.right) {
beakPositionStyle.left = BEAK_ORIGIN_POSITION.left;
beakPositionStyle.top = BEAK_ORIGIN_POSITION.top;
}
return beakPositionStyle;
}
/**
* (Utility) used to compare two different elementPositions to determine whether they are equal.
*
* @param prevElementPositions
* @param newElementPosition
*/
function arePositionsEqual(prevElementPositions, newElementPosition) {
return (comparePositions(prevElementPositions.elementPosition, newElementPosition.elementPosition) &&
comparePositions(prevElementPositions.beakPosition.elementPosition, newElementPosition.beakPosition.elementPosition));
}
/**
* (Utility) used in **arePositionsEqual** to compare two different elementPositions.
*
* @param prevElementPositions
* @param newElementPositions
*/
function comparePositions(prevElementPositions, newElementPositions) {
for (var key in newElementPositions) {
if (newElementPositions.hasOwnProperty(key)) {
var oldPositionEdge = prevElementPositions[key];
var newPositionEdge = newElementPositions[key];
if (oldPositionEdge !== undefined && newPositionEdge !== undefined) {
if (oldPositionEdge.toFixed(2) !== newPositionEdge.toFixed(2)) {
return false;
}
}
else {
return false;
}
}
}
return true;
}
CalloutContentBase.displayName = COMPONENT_NAME;
//# sourceMappingURL=CalloutContent.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CalloutContent: () => (CalloutContent)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _CalloutContent_base__rspack_import_1 = __webpack_require__(/*! ./CalloutContent.base */ "./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.base.js");
/* import */ var _CalloutContent_styles__rspack_import_2 = __webpack_require__(/*! ./CalloutContent.styles */ "./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.styles.js");
var CalloutContent = (0,_Utilities__rspack_import_0.styled)(_CalloutContent_base__rspack_import_1.CalloutContentBase, _CalloutContent_styles__rspack_import_2.getStyles, undefined, {
scope: 'CalloutContent',
});
//# sourceMappingURL=CalloutContent.js.map
}),
"./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.styles.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Callout/CalloutContent.styles.js ***!
\**************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
function getBeakStyle(beakWidth) {
return {
height: beakWidth,
width: beakWidth,
};
}
var GlobalClassNames = {
container: 'ms-Callout-container',
root: 'ms-Callout',
beak: 'ms-Callout-beak',
beakCurtain: 'ms-Callout-beakCurtain',
calloutMain: 'ms-Callout-main',
};
var getStyles = function (props) {
var _a;
var theme = props.theme, className = props.className, overflowYHidden = props.overflowYHidden, calloutWidth = props.calloutWidth, beakWidth = props.beakWidth, backgroundColor = props.backgroundColor, calloutMaxWidth = props.calloutMaxWidth, calloutMinWidth = props.calloutMinWidth, doNotLayer = props.doNotLayer;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
var semanticColors = theme.semanticColors, effects = theme.effects;
return {
container: [
classNames.container,
{
position: 'relative',
},
],
root: [
classNames.root,
theme.fonts.medium,
{
position: 'absolute',
display: 'flex',
zIndex: doNotLayer ? _Styling__rspack_import_0.ZIndexes.Layer : undefined,
boxSizing: 'border-box',
borderRadius: effects.roundedCorner2,
boxShadow: effects.elevation16,
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
borderWidth: 1,
borderStyle: 'solid',
borderColor: 'WindowText',
},
_a),
},
(0,_Styling__rspack_import_0.focusClear)(),
className,
!!calloutWidth && { width: calloutWidth },
!!calloutMaxWidth && { maxWidth: calloutMaxWidth },
!!calloutMinWidth && { minWidth: calloutMinWidth },
],
beak: [
classNames.beak,
{
position: 'absolute',
backgroundColor: semanticColors.menuBackground,
boxShadow: 'inherit',
border: 'inherit',
boxSizing: 'border-box',
transform: 'rotate(45deg)',
},
getBeakStyle(beakWidth),
backgroundColor && {
backgroundColor: backgroundColor,
},
],
beakCurtain: [
classNames.beakCurtain,
{
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
backgroundColor: semanticColors.menuBackground,
borderRadius: effects.roundedCorner2,
},
],
calloutMain: [
classNames.calloutMain,
{
backgroundColor: semanticColors.menuBackground,
overflowX: 'hidden',
overflowY: 'auto',
position: 'relative',
width: '100%',
borderRadius: effects.roundedCorner2,
},
overflowYHidden && {
overflowY: 'hidden',
},
backgroundColor && {
backgroundColor: backgroundColor,
},
],
};
};
//# sourceMappingURL=CalloutContent.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.base.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.base.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CheckboxBase: () => (CheckboxBase)
});
/* import */ var tslib__rspack_import_6 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_react_hooks__rspack_import_2 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_4 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useControllableValue.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _fluentui_utilities__rspack_import_5 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
/* import */ var _Icon_Icon__rspack_import_7 = __webpack_require__(/*! ../Icon/Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
var getClassNames = (0,_fluentui_utilities__rspack_import_1.classNamesFunction)();
var CheckboxBase = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var disabled = props.disabled, required = props.required, inputProps = props.inputProps, name = props.name, ariaLabel = props.ariaLabel, ariaLabelledBy = props.ariaLabelledBy, ariaDescribedBy = props.ariaDescribedBy, ariaPositionInSet = props.ariaPositionInSet, ariaSetSize = props.ariaSetSize, title = props.title, checkmarkIconProps = props.checkmarkIconProps, styles = props.styles, theme = props.theme, className = props.className, _a = props.boxSide, boxSide = _a === void 0 ? 'start' : _a;
var id = (0,_fluentui_react_hooks__rspack_import_2.useId)('checkbox-', props.id);
var rootRef = react__rspack_import_0.useRef(null);
var mergedRootRefs = (0,_fluentui_react_hooks__rspack_import_3.useMergedRefs)(rootRef, forwardedRef);
var inputRef = react__rspack_import_0.useRef(null);
var _b = (0,_fluentui_react_hooks__rspack_import_4.useControllableValue)(props.checked, props.defaultChecked, props.onChange), isChecked = _b[0], setIsChecked = _b[1];
var _c = (0,_fluentui_react_hooks__rspack_import_4.useControllableValue)(props.indeterminate, props.defaultIndeterminate), isIndeterminate = _c[0], setIsIndeterminate = _c[1];
(0,_fluentui_utilities__rspack_import_5.useFocusRects)(rootRef);
useDebugWarning(props);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
disabled: disabled,
indeterminate: isIndeterminate,
checked: isChecked,
reversed: boxSide !== 'start',
isUsingCustomLabelRender: !!props.onRenderLabel,
});
var onChange = react__rspack_import_0.useCallback(function (event) {
if (isIndeterminate) {
// If indeterminate, clicking the checkbox *only* removes the indeterminate state (or if
// controlled, lets the consumer know to change it by calling onChange). It doesn't
// change the checked state.
setIsChecked(!!isChecked, event);
setIsIndeterminate(false);
}
else {
setIsChecked(!isChecked, event);
}
}, [setIsChecked, setIsIndeterminate, isIndeterminate, isChecked]);
var defaultLabelRenderer = react__rspack_import_0.useCallback(function (checkboxProps) {
if (!checkboxProps) {
return null;
}
return checkboxProps.label ? (react__rspack_import_0.createElement("span", { className: classNames.text, title: checkboxProps.title }, checkboxProps.label)) : null;
}, [classNames.text]);
var setNativeIndeterminate = react__rspack_import_0.useCallback(function (indeterminate) {
if (!inputRef.current) {
return;
}
var value = !!indeterminate;
inputRef.current.indeterminate = value;
setIsIndeterminate(value);
}, [setIsIndeterminate]);
useComponentRef(props, isChecked, isIndeterminate, setNativeIndeterminate, inputRef);
react__rspack_import_0.useEffect(function () { return setNativeIndeterminate(isIndeterminate); }, [setNativeIndeterminate, isIndeterminate]);
var onRenderLabel = props.onRenderLabel || defaultLabelRenderer;
var ariaChecked = isIndeterminate
? 'mixed'
: undefined;
var mergedInputProps = (0,tslib__rspack_import_6.__assign)((0,tslib__rspack_import_6.__assign)({ className: classNames.input, type: 'checkbox' }, inputProps), { checked: !!isChecked, disabled: disabled, required: required, name: name, id: id, title: title, onChange: onChange, 'aria-disabled': disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-posinset': ariaPositionInSet, 'aria-setsize': ariaSetSize, 'aria-checked': ariaChecked });
return (react__rspack_import_0.createElement("div", { className: classNames.root, title: title, ref: mergedRootRefs },
react__rspack_import_0.createElement("input", (0,tslib__rspack_import_6.__assign)({}, mergedInputProps, { ref: inputRef, title: title, "data-ktp-execute-target": true })),
react__rspack_import_0.createElement("label", { className: classNames.label, htmlFor: id },
react__rspack_import_0.createElement("div", { className: classNames.checkbox, "data-ktp-target": true },
react__rspack_import_0.createElement(_Icon_Icon__rspack_import_7.Icon, (0,tslib__rspack_import_6.__assign)({ iconName: "CheckMark" }, checkmarkIconProps, { className: classNames.checkmark }))),
onRenderLabel(props, defaultLabelRenderer))));
});
CheckboxBase.displayName = 'CheckboxBase';
function useDebugWarning(props) {
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional
(0,_fluentui_react_hooks__rspack_import_8.useWarnings)({
name: 'Checkbox',
props: props,
mutuallyExclusive: {
checked: 'defaultChecked',
indeterminate: 'defaultIndeterminate',
},
});
}
}
function useComponentRef(props, isChecked, isIndeterminate, setIndeterminate, checkBoxRef) {
react__rspack_import_0.useImperativeHandle(props.componentRef, function () { return ({
get checked() {
return !!isChecked;
},
get indeterminate() {
return !!isIndeterminate;
},
set indeterminate(indeterminate) {
setIndeterminate(indeterminate);
},
focus: function () {
if (checkBoxRef.current) {
checkBoxRef.current.focus();
}
},
}); }, [checkBoxRef, isChecked, isIndeterminate, setIndeterminate]);
}
//# sourceMappingURL=Checkbox.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Checkbox: () => (Checkbox)
});
/* import */ var _fluentui_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Checkbox_base__rspack_import_1 = __webpack_require__(/*! ./Checkbox.base */ "./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.base.js");
/* import */ var _Checkbox_styles__rspack_import_2 = __webpack_require__(/*! ./Checkbox.styles */ "./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.styles.js");
var Checkbox = (0,_fluentui_utilities__rspack_import_0.styled)(_Checkbox_base__rspack_import_1.CheckboxBase, _Checkbox_styles__rspack_import_2.getStyles, undefined, { scope: 'Checkbox' });
//# sourceMappingURL=Checkbox.js.map
}),
"./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.styles.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.styles.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_style_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/style-utilities */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
var GlobalClassNames = {
root: 'ms-Checkbox',
label: 'ms-Checkbox-label',
checkbox: 'ms-Checkbox-checkbox',
checkmark: 'ms-Checkbox-checkmark',
text: 'ms-Checkbox-text',
};
var MS_CHECKBOX_LABEL_SIZE = '20px';
var MS_CHECKBOX_TRANSITION_DURATION = '200ms';
var MS_CHECKBOX_TRANSITION_TIMING = 'cubic-bezier(.4, 0, .23, 1)';
var getStyles = function (props) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
var className = props.className, theme = props.theme, reversed = props.reversed, checked = props.checked, disabled = props.disabled, isUsingCustomLabelRender = props.isUsingCustomLabelRender, indeterminate = props.indeterminate;
var semanticColors = theme.semanticColors, effects = theme.effects, palette = theme.palette, fonts = theme.fonts;
var classNames = (0,_fluentui_style_utilities__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
var checkmarkFontColor = semanticColors.inputForegroundChecked;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.inputBorder
var checkmarkFontColorHovered = palette.neutralSecondary;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.smallInputBorder
var checkboxBorderColor = palette.neutralPrimary;
var checkboxBorderIndeterminateColor = semanticColors.inputBackgroundChecked;
var checkboxBorderColorChecked = semanticColors.inputBackgroundChecked;
var checkboxBorderColorDisabled = semanticColors.disabledBodySubtext;
var checkboxBorderHoveredColor = semanticColors.inputBorderHovered;
var checkboxBorderIndeterminateHoveredColor = semanticColors.inputBackgroundCheckedHovered;
var checkboxBackgroundChecked = semanticColors.inputBackgroundChecked;
// TODO: after updating the semanticColors slots mapping the following 2 tokens need to be
// semanticColors.inputBackgroundCheckedHovered
var checkboxBackgroundCheckedHovered = semanticColors.inputBackgroundCheckedHovered;
var checkboxBorderColorCheckedHovered = semanticColors.inputBackgroundCheckedHovered;
var checkboxHoveredTextColor = semanticColors.inputTextHovered;
var checkboxBackgroundDisabledChecked = semanticColors.disabledBodySubtext;
var checkboxTextColor = semanticColors.bodyText;
var checkboxTextColorDisabled = semanticColors.disabledText;
var indeterminateDotStyles = [
(_a = {
content: '""',
borderRadius: effects.roundedCorner2,
position: 'absolute',
width: 10,
height: 10,
top: 4,
left: 4,
boxSizing: 'border-box',
borderWidth: 5,
borderStyle: 'solid',
borderColor: disabled ? checkboxBorderColorDisabled : checkboxBorderIndeterminateColor,
transitionProperty: 'border-width, border, border-color',
transitionDuration: MS_CHECKBOX_TRANSITION_DURATION,
transitionTimingFunction: MS_CHECKBOX_TRANSITION_TIMING
},
_a[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
borderColor: 'WindowText',
},
_a),
];
return {
root: [
classNames.root,
{
position: 'relative',
display: 'flex',
},
reversed && 'reversed',
checked && 'is-checked',
!disabled && 'is-enabled',
disabled && 'is-disabled',
!disabled && [
!checked && (_b = {},
_b[":hover .".concat(classNames.checkbox)] = (_c = {
borderColor: checkboxBorderHoveredColor
},
_c[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
borderColor: 'Highlight',
},
_c),
_b[":focus .".concat(classNames.checkbox)] = { borderColor: checkboxBorderHoveredColor },
_b[":hover .".concat(classNames.checkmark)] = (_d = {
color: checkmarkFontColorHovered,
opacity: '1'
},
_d[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
color: 'Highlight',
},
_d),
_b),
checked &&
!indeterminate && (_e = {},
_e[":hover .".concat(classNames.checkbox)] = {
background: checkboxBackgroundCheckedHovered,
borderColor: checkboxBorderColorCheckedHovered,
},
_e[":focus .".concat(classNames.checkbox)] = {
background: checkboxBackgroundCheckedHovered,
borderColor: checkboxBorderColorCheckedHovered,
},
_e[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = (_f = {},
_f[":hover .".concat(classNames.checkbox)] = {
background: 'Highlight',
borderColor: 'Highlight',
},
_f[":focus .".concat(classNames.checkbox)] = {
background: 'Highlight',
},
_f[":focus:hover .".concat(classNames.checkbox)] = {
background: 'Highlight',
},
_f[":focus:hover .".concat(classNames.checkmark)] = {
color: 'Window',
},
_f[":hover .".concat(classNames.checkmark)] = {
color: 'Window',
},
_f),
_e),
indeterminate && (_g = {},
_g[":hover .".concat(classNames.checkbox, ", :hover .").concat(classNames.checkbox, ":after")] = (_h = {
borderColor: checkboxBorderIndeterminateHoveredColor
},
_h[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
borderColor: 'WindowText',
},
_h),
_g[":focus .".concat(classNames.checkbox)] = {
borderColor: checkboxBorderIndeterminateHoveredColor,
},
_g[":hover .".concat(classNames.checkmark)] = {
opacity: '0',
},
_g),
(_j = {},
_j[":hover .".concat(classNames.text, ", :focus .").concat(classNames.text)] = (_k = {
color: checkboxHoveredTextColor
},
_k[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
color: disabled ? 'GrayText' : 'WindowText',
},
_k),
_j),
],
className,
],
input: (_l = {
position: 'absolute',
background: 'none',
opacity: 0
},
// eslint-disable-next-line @fluentui/max-len
_l[".".concat(_fluentui_utilities__rspack_import_1.IsFocusVisibleClassName, " &:focus + label::before, :host(.").concat(_fluentui_utilities__rspack_import_1.IsFocusVisibleClassName, ") &:focus + label::before")] = (_m = {
outline: '1px solid ' + theme.palette.neutralSecondary,
outlineOffset: '2px'
},
_m[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
outline: '1px solid WindowText',
},
_m),
_l),
label: [
classNames.label,
theme.fonts.medium,
{
display: 'flex',
alignItems: isUsingCustomLabelRender ? 'center' : 'flex-start',
cursor: disabled ? 'default' : 'pointer',
position: 'relative',
userSelect: 'none',
},
reversed && {
flexDirection: 'row-reverse',
justifyContent: 'flex-end',
},
{
'&::before': {
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
content: '""',
pointerEvents: 'none',
},
},
],
checkbox: [
classNames.checkbox,
(_o = {
position: 'relative',
display: 'flex',
flexShrink: 0,
alignItems: 'center',
justifyContent: 'center',
height: MS_CHECKBOX_LABEL_SIZE,
width: MS_CHECKBOX_LABEL_SIZE,
border: "1px solid ".concat(checkboxBorderColor),
borderRadius: effects.roundedCorner2,
boxSizing: 'border-box',
transitionProperty: 'background, border, border-color',
transitionDuration: MS_CHECKBOX_TRANSITION_DURATION,
transitionTimingFunction: MS_CHECKBOX_TRANSITION_TIMING,
/* in case the icon is bigger than the box */
overflow: 'hidden',
':after': indeterminate ? indeterminateDotStyles : null
},
_o[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ borderColor: 'WindowText' }, (0,_fluentui_style_utilities__rspack_import_0.getHighContrastNoAdjustStyle)()),
_o),
indeterminate && {
borderColor: checkboxBorderIndeterminateColor,
},
!reversed
? // This margin on the checkbox is for backwards compat. Notably it has the effect where a customRender
// is used, there will be only a 4px margin from checkbox to label. The label by default would have
// another 4px margin for a total of 8px margin between checkbox and label. We don't combine the two
// (and move it into the text) to not incur a breaking change for everyone using custom render atm.
{
marginRight: 4,
}
: {
marginLeft: 4,
},
!disabled &&
!indeterminate &&
checked && (_p = {
background: checkboxBackgroundChecked,
borderColor: checkboxBorderColorChecked
},
_p[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
background: 'Highlight',
borderColor: 'Highlight',
},
_p),
disabled && (_q = {
borderColor: checkboxBorderColorDisabled
},
_q[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
borderColor: 'GrayText',
},
_q),
checked &&
disabled && (_r = {
background: checkboxBackgroundDisabledChecked,
borderColor: checkboxBorderColorDisabled
},
_r[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = {
background: 'Window',
},
_r),
],
checkmark: [
classNames.checkmark,
(_s = {
opacity: checked && !indeterminate ? '1' : '0',
color: checkmarkFontColor
},
_s[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: disabled ? 'GrayText' : 'Window' }, (0,_fluentui_style_utilities__rspack_import_0.getHighContrastNoAdjustStyle)()),
_s),
],
text: [
classNames.text,
(_t = {
color: disabled ? checkboxTextColorDisabled : checkboxTextColor,
fontSize: fonts.medium.fontSize,
lineHeight: '20px'
},
_t[_fluentui_style_utilities__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: disabled ? 'GrayText' : 'WindowText' }, (0,_fluentui_style_utilities__rspack_import_0.getHighContrastNoAdjustStyle)()),
_t),
!reversed
? {
marginLeft: 4,
}
: {
marginRight: 4,
},
],
};
};
//# sourceMappingURL=Checkbox.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.base.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.base.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ChoiceGroupBase: () => (ChoiceGroupBase)
});
/* import */ var tslib__rspack_import_10 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Label__rspack_import_11 = __webpack_require__(/*! ../../Label */ "./node_modules/@fluentui/react/lib/components/Label/Label.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/array.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
/* import */ var _ChoiceGroupOption_index__rspack_import_12 = __webpack_require__(/*! ./ChoiceGroupOption/index */ "./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _fluentui_react_hooks__rspack_import_7 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useControllableValue.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_13 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
/* import */ var _utilities_dom__rspack_import_4 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var getOptionId = function (option, id) {
return "".concat(id, "-").concat(option.key);
};
var findOption = function (options, key) {
return key === undefined ? undefined : (0,_Utilities__rspack_import_2.find)(options, function (value) { return value.key === key; });
};
var focusSelectedOption = function (options, keyChecked, id, focusProviders, doc) {
var optionToFocus = findOption(options, keyChecked) || options.filter(function (option) { return !option.disabled; })[0];
var elementToFocus = optionToFocus && (doc === null || doc === void 0 ? void 0 : doc.getElementById(getOptionId(optionToFocus, id)));
if (elementToFocus) {
elementToFocus.focus();
(0,_Utilities__rspack_import_3.setFocusVisibility)(true, elementToFocus, focusProviders);
}
};
var focusFromFocusTrapZone = function (evt) {
return evt.relatedTarget instanceof HTMLElement && evt.relatedTarget.dataset.isFocusTrapZoneBumper === 'true';
};
var useComponentRef = function (options, keyChecked, id, componentRef, focusProviders) {
var doc = (0,_utilities_dom__rspack_import_4.useDocumentEx)();
react__rspack_import_0.useImperativeHandle(componentRef, function () { return ({
get checkedOption() {
return findOption(options, keyChecked);
},
focus: function () {
focusSelectedOption(options, keyChecked, id, focusProviders, doc);
},
}); }, [options, keyChecked, id, focusProviders, doc]);
};
var COMPONENT_NAME = 'ChoiceGroup';
var ChoiceGroupBase = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var className = props.className, theme = props.theme, styles = props.styles, _a = props.options, options = _a === void 0 ? [] : _a, label = props.label, required = props.required, disabled = props.disabled, name = props.name, defaultSelectedKey = props.defaultSelectedKey, componentRef = props.componentRef, onChange = props.onChange;
var id = (0,_fluentui_react_hooks__rspack_import_5.useId)('ChoiceGroup');
var labelId = (0,_fluentui_react_hooks__rspack_import_5.useId)('ChoiceGroupLabel');
var divProps = (0,_Utilities__rspack_import_6.getNativeProps)(props, _Utilities__rspack_import_6.divProperties, [
'onChange',
'className',
'required',
]);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
optionsContainIconOrImage: options.some(function (option) { return !!(option.iconProps || option.imageSrc); }),
});
var ariaLabelledBy = props.ariaLabelledBy || (label ? labelId : props['aria-labelledby']);
var _b = (0,_fluentui_react_hooks__rspack_import_7.useControllableValue)(props.selectedKey, defaultSelectedKey), keyChecked = _b[0], setKeyChecked = _b[1];
var _c = react__rspack_import_0.useState(), keyFocused = _c[0], setKeyFocused = _c[1];
var rootRef = react__rspack_import_0.useRef(null);
var mergedRootRefs = (0,_fluentui_react_hooks__rspack_import_8.useMergedRefs)(rootRef, forwardedRef);
var focusContext = react__rspack_import_0.useContext(_Utilities__rspack_import_9.FocusRectsContext);
useDebugWarnings(props);
useComponentRef(options, keyChecked, id, componentRef, focusContext === null || focusContext === void 0 ? void 0 : focusContext.registeredProviders);
(0,_Utilities__rspack_import_9.useFocusRects)(rootRef);
var onFocus = react__rspack_import_0.useCallback(function (ev, option) {
var _a;
if (option) {
setKeyFocused(option.itemKey);
(_a = option.onFocus) === null || _a === void 0 ? void 0 : _a.call(option, ev);
}
}, []);
var onBlur = react__rspack_import_0.useCallback(function (ev, option) {
var _a;
setKeyFocused(undefined);
(_a = option === null || option === void 0 ? void 0 : option.onBlur) === null || _a === void 0 ? void 0 : _a.call(option, ev);
}, []);
var onOptionChange = react__rspack_import_0.useCallback(function (evt, option) {
var _a;
if (!option) {
return;
}
setKeyChecked(option.itemKey);
(_a = option.onChange) === null || _a === void 0 ? void 0 : _a.call(option, evt);
onChange === null || onChange === void 0 ? void 0 : onChange(evt, findOption(options, option.itemKey));
}, [onChange, options, setKeyChecked]);
var onRadioFocus = react__rspack_import_0.useCallback(function (evt) {
// Handles scenarios like this bug: https://github.com/microsoft/fluentui/issues/20173
if (focusFromFocusTrapZone(evt)) {
focusSelectedOption(options, keyChecked, id, focusContext === null || focusContext === void 0 ? void 0 : focusContext.registeredProviders);
}
}, [options, keyChecked, id, focusContext]);
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_10.__assign)({ className: classNames.root }, divProps, { ref: mergedRootRefs }),
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_10.__assign)({ role: "radiogroup" }, (ariaLabelledBy && { 'aria-labelledby': ariaLabelledBy }), { onFocus: onRadioFocus }),
label && (react__rspack_import_0.createElement(_Label__rspack_import_11.Label, { className: classNames.label, required: required, id: labelId, disabled: disabled }, label)),
react__rspack_import_0.createElement("div", { className: classNames.flexContainer }, options.map(function (option) {
return (react__rspack_import_0.createElement(_ChoiceGroupOption_index__rspack_import_12.ChoiceGroupOption, (0,tslib__rspack_import_10.__assign)({ itemKey: option.key }, option, { key: option.key, onBlur: onBlur, onFocus: onFocus, onChange: onOptionChange, focused: option.key === keyFocused, checked: option.key === keyChecked, disabled: option.disabled || disabled, id: getOptionId(option, id), labelId: option.labelId || "".concat(labelId, "-").concat(option.key), name: name || id, required: required })));
})))));
});
ChoiceGroupBase.displayName = COMPONENT_NAME;
function useDebugWarnings(props) {
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional
(0,_fluentui_react_hooks__rspack_import_13.useWarnings)({
name: COMPONENT_NAME,
props: props,
mutuallyExclusive: {
selectedKey: 'defaultSelectedKey',
},
});
}
}
//# sourceMappingURL=ChoiceGroup.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ChoiceGroup: () => (ChoiceGroup)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _ChoiceGroup_base__rspack_import_1 = __webpack_require__(/*! ./ChoiceGroup.base */ "./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.base.js");
/* import */ var _ChoiceGroup_styles__rspack_import_2 = __webpack_require__(/*! ./ChoiceGroup.styles */ "./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.styles.js");
var ChoiceGroup = (0,_Utilities__rspack_import_0.styled)(_ChoiceGroup_base__rspack_import_1.ChoiceGroupBase, _ChoiceGroup_styles__rspack_import_2.getStyles, undefined, { scope: 'ChoiceGroup' });
//# sourceMappingURL=ChoiceGroup.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.styles.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroup.styles.js ***!
\***************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-ChoiceFieldGroup',
flexContainer: 'ms-ChoiceFieldGroup-flexContainer',
};
var getStyles = function (props) {
var className = props.className, optionsContainIconOrImage = props.optionsContainIconOrImage, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
className,
classNames.root,
theme.fonts.medium,
{
display: 'block',
},
],
flexContainer: [
classNames.flexContainer,
optionsContainIconOrImage && {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
},
],
};
};
//# sourceMappingURL=ChoiceGroup.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.js ***!
\*************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ChoiceGroupOptionBase: () => (ChoiceGroupOptionBase)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Image__rspack_import_6 = __webpack_require__(/*! ../../../Image */ "./node_modules/@fluentui/react/lib/components/Image/Image.js");
/* import */ var _Icon__rspack_import_7 = __webpack_require__(/*! ../../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/renderFunction/composeRenderFunction.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var LARGE_IMAGE_SIZE = 71;
var DEFAULT_PROPS = {
// This ensures default imageSize value doesn't mutate. Mutation can cause style re-calcuation.
imageSize: { width: 32, height: 32 },
};
var ChoiceGroupOptionBase = function (propsWithoutDefaults) {
// Mix the `key` prop back in since custom render functions may be expecting it
// (React uses `key` internally rather than passing it through to the component)
var props = (0,_Utilities__rspack_import_2.getPropsWithDefaults)((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, DEFAULT_PROPS), { key: propsWithoutDefaults.itemKey }), propsWithoutDefaults);
var ariaLabel = props.ariaLabel, focused = props.focused, required = props.required, theme = props.theme, iconProps = props.iconProps, imageSrc = props.imageSrc, imageSize = props.imageSize, disabled = props.disabled, checked = props.checked, id = props.id, styles = props.styles, name = props.name, rest = (0,tslib__rspack_import_3.__rest)(props, ["ariaLabel", "focused", "required", "theme", "iconProps", "imageSrc", "imageSize", "disabled", "checked", "id", "styles", "name"]);
var classNames = getClassNames(styles, {
theme: theme,
hasIcon: !!iconProps,
hasImage: !!imageSrc,
checked: checked,
disabled: disabled,
imageIsLarge: !!imageSrc && (imageSize.width > LARGE_IMAGE_SIZE || imageSize.height > LARGE_IMAGE_SIZE),
imageSize: imageSize,
focused: focused,
});
var _a = (0,_Utilities__rspack_import_4.getNativeProps)(rest, _Utilities__rspack_import_4.inputProperties), className = _a.className, nativeProps = (0,tslib__rspack_import_3.__rest)(_a, ["className"]);
var defaultOnRenderLabel = function () {
return (react__rspack_import_0.createElement("span", { id: props.labelId, className: "ms-ChoiceFieldLabel" }, props.text));
};
var defaultOnRenderField = function () {
var _a = props.imageAlt, imageAlt = _a === void 0 ? '' : _a, selectedImageSrc = props.selectedImageSrc;
var onRenderLabel = props.onRenderLabel
? (0,_Utilities__rspack_import_5.composeRenderFunction)(props.onRenderLabel, defaultOnRenderLabel)
: defaultOnRenderLabel;
var label = onRenderLabel((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, props), { key: props.itemKey }));
return (react__rspack_import_0.createElement("label", { htmlFor: id, className: classNames.field },
imageSrc && (react__rspack_import_0.createElement("div", { className: classNames.innerField },
react__rspack_import_0.createElement("div", { className: classNames.imageWrapper },
react__rspack_import_0.createElement(_Image__rspack_import_6.Image, (0,tslib__rspack_import_3.__assign)({ src: imageSrc, alt: imageAlt }, imageSize))),
react__rspack_import_0.createElement("div", { className: classNames.selectedImageWrapper },
react__rspack_import_0.createElement(_Image__rspack_import_6.Image, (0,tslib__rspack_import_3.__assign)({ src: selectedImageSrc, alt: imageAlt }, imageSize))))),
iconProps && (react__rspack_import_0.createElement("div", { className: classNames.innerField },
react__rspack_import_0.createElement("div", { className: classNames.iconWrapper },
react__rspack_import_0.createElement(_Icon__rspack_import_7.Icon, (0,tslib__rspack_import_3.__assign)({}, iconProps))))),
imageSrc || iconProps ? react__rspack_import_0.createElement("div", { className: classNames.labelWrapper }, label) : label));
};
var _b = props.onRenderField, onRenderField = _b === void 0 ? defaultOnRenderField : _b;
var onChange = function (evt) {
var _a;
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, evt, (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, props), { key: props.itemKey }));
};
var onBlur = function (evt) {
var _a;
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, evt);
};
var onFocus = function (evt) {
var _a;
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, evt, (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, props), { key: props.itemKey }));
};
return (react__rspack_import_0.createElement("div", { className: classNames.root },
react__rspack_import_0.createElement("div", { className: classNames.choiceFieldWrapper },
react__rspack_import_0.createElement("input", (0,tslib__rspack_import_3.__assign)({ "aria-label": ariaLabel, id: id, className: (0,_Utilities__rspack_import_8.css)(classNames.input, className), type: "radio", name: name, disabled: disabled, checked: checked, required: required }, nativeProps, { onChange: onChange, onFocus: onFocus, onBlur: onBlur })),
onRenderField((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, props), { key: props.itemKey }), defaultOnRenderField))));
};
ChoiceGroupOptionBase.displayName = 'ChoiceGroupOption';
//# sourceMappingURL=ChoiceGroupOption.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.js":
/*!********************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.js ***!
\********************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ChoiceGroupOption: () => (ChoiceGroupOption)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _ChoiceGroupOption_base__rspack_import_1 = __webpack_require__(/*! ./ChoiceGroupOption.base */ "./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.js");
/* import */ var _ChoiceGroupOption_styles__rspack_import_2 = __webpack_require__(/*! ./ChoiceGroupOption.styles */ "./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.styles.js");
var ChoiceGroupOption = (0,_Utilities__rspack_import_0.styled)(_ChoiceGroupOption_base__rspack_import_1.ChoiceGroupOptionBase, _ChoiceGroupOption_styles__rspack_import_2.getStyles, undefined, { scope: 'ChoiceGroupOption' });
//# sourceMappingURL=ChoiceGroupOption.js.map
}),
"./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.styles.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.styles.js ***!
\***************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
var GlobalClassNames = {
root: 'ms-ChoiceField',
choiceFieldWrapper: 'ms-ChoiceField-wrapper',
input: 'ms-ChoiceField-input',
field: 'ms-ChoiceField-field',
innerField: 'ms-ChoiceField-innerField',
imageWrapper: 'ms-ChoiceField-imageWrapper',
iconWrapper: 'ms-ChoiceField-iconWrapper',
labelWrapper: 'ms-ChoiceField-labelWrapper',
checked: 'is-checked',
};
var labelWrapperLineHeight = 15;
var labelWrapperHeight = labelWrapperLineHeight * 2 + 2; // adding 2px height to ensure text doesn't get cutoff
var iconSize = 32;
var choiceFieldSize = 20;
var choiceFieldTransitionDuration = '200ms';
var choiceFieldTransitionTiming = 'cubic-bezier(.4, 0, .23, 1)';
var radioButtonSpacing = 3;
var radioButtonInnerSize = 5;
function getChoiceGroupFocusStyle(focusBorderColor, hasIconOrImage) {
var _a, _b;
return [
'is-inFocus',
{
selectors: (_a = {},
_a[".".concat(_Utilities__rspack_import_1.IsFocusVisibleClassName, " &, :host(.").concat(_Utilities__rspack_import_1.IsFocusVisibleClassName, ") &")] = {
position: 'relative',
outline: 'transparent',
selectors: {
'::-moz-focus-inner': {
border: 0,
},
':after': {
content: '""',
top: -2,
right: -2,
bottom: -2,
left: -2,
pointerEvents: 'none',
border: "1px solid ".concat(focusBorderColor),
position: 'absolute',
selectors: (_b = {},
_b[_Styling__rspack_import_0.HighContrastSelector] = {
borderColor: 'WindowText',
borderWidth: hasIconOrImage ? 1 : 2,
},
_b),
},
},
},
_a),
},
];
}
function getImageWrapperStyle(isSelectedImageWrapper, className, checked) {
return [
className,
{
paddingBottom: 2,
transitionProperty: 'opacity',
transitionDuration: choiceFieldTransitionDuration,
transitionTimingFunction: 'ease',
selectors: {
'.ms-Image': {
display: 'inline-block',
borderStyle: 'none',
},
},
},
(checked ? !isSelectedImageWrapper : isSelectedImageWrapper) && [
'is-hidden',
{
position: 'absolute',
left: 0,
top: 0,
width: '100%',
height: '100%',
overflow: 'hidden',
opacity: 0,
},
],
];
}
var getStyles = function (props) {
var _a, _b, _c, _d, _e;
var theme = props.theme, hasIcon = props.hasIcon, hasImage = props.hasImage, checked = props.checked, disabled = props.disabled, imageIsLarge = props.imageIsLarge, focused = props.focused, imageSize = props.imageSize;
var palette = theme.palette, semanticColors = theme.semanticColors, fonts = theme.fonts;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
// Tokens
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.smallInputBorder
var circleBorderColor = palette.neutralPrimary;
var circleHoveredBorderColor = semanticColors.inputBorderHovered;
var circleCheckedBorderColor = semanticColors.inputBackgroundChecked;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.inputBackgroundCheckedHovered
var circleCheckedHoveredBorderColor = palette.themeDark;
var circleDisabledBorderColor = semanticColors.disabledBodySubtext;
var circleBackgroundColor = semanticColors.bodyBackground;
var dotUncheckedHoveredColor = palette.neutralSecondary;
var dotCheckedColor = semanticColors.inputBackgroundChecked;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.inputBackgroundCheckedHovered
var dotCheckedHoveredColor = palette.themeDark;
var dotDisabledColor = semanticColors.disabledBodySubtext;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.bodyTextChecked
var labelHoverFocusColor = palette.neutralDark;
var focusBorderColor = semanticColors.focusBorder;
var iconOrImageChoiceBorderUncheckedHoveredColor = semanticColors.inputBorderHovered;
// TODO: after updating the semanticColors slots mapping this needs to be semanticColors.inputBackgroundCheckedHovered
var iconOrImageChoiceBorderCheckedColor = semanticColors.inputBackgroundChecked;
var iconOrImageChoiceBorderCheckedHoveredColor = palette.themeDark;
var iconOrImageChoiceBackgroundColor = palette.neutralLighter;
var fieldHoverOrFocusProperties = {
selectors: {
'.ms-ChoiceFieldLabel': {
color: labelHoverFocusColor,
},
':before': {
borderColor: checked ? circleCheckedHoveredBorderColor : circleHoveredBorderColor,
},
':after': [
!hasIcon &&
!hasImage &&
!checked && {
content: '""',
transitionProperty: 'background-color',
left: 5,
top: 5,
width: 10,
height: 10,
backgroundColor: dotUncheckedHoveredColor,
},
checked && {
borderColor: dotCheckedHoveredColor,
background: dotCheckedHoveredColor,
},
],
},
};
var enabledFieldWithImageHoverOrFocusProperties = {
borderColor: checked ? iconOrImageChoiceBorderCheckedHoveredColor : iconOrImageChoiceBorderUncheckedHoveredColor,
selectors: {
':before': {
opacity: 1,
borderColor: checked ? circleCheckedHoveredBorderColor : circleHoveredBorderColor,
},
},
};
var circleAreaProperties = [
{
content: '""',
display: 'inline-block',
backgroundColor: circleBackgroundColor,
borderWidth: 1,
borderStyle: 'solid',
borderColor: circleBorderColor,
width: choiceFieldSize,
height: choiceFieldSize,
fontWeight: 'normal',
position: 'absolute',
top: 0,
left: 0,
boxSizing: 'border-box',
transitionProperty: 'border-color',
transitionDuration: choiceFieldTransitionDuration,
transitionTimingFunction: choiceFieldTransitionTiming,
borderRadius: '50%',
},
disabled && {
borderColor: circleDisabledBorderColor,
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ borderColor: 'GrayText', background: 'Window' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_a),
},
checked && {
borderColor: disabled ? circleDisabledBorderColor : circleCheckedBorderColor,
selectors: (_b = {},
_b[_Styling__rspack_import_0.HighContrastSelector] = {
borderColor: 'Highlight',
background: 'Window',
forcedColorAdjust: 'none',
},
_b),
},
(hasIcon || hasImage) && {
top: radioButtonSpacing,
right: radioButtonSpacing,
left: 'auto', // To reset the value of 'left' to its default value, so that 'right' works
opacity: checked ? 1 : 0,
},
];
var dotAreaProperties = [
{
content: '""',
width: 0,
height: 0,
borderRadius: '50%',
position: 'absolute',
left: choiceFieldSize / 2,
right: 0,
transitionProperty: 'border-width',
transitionDuration: choiceFieldTransitionDuration,
transitionTimingFunction: choiceFieldTransitionTiming,
boxSizing: 'border-box',
},
checked && {
borderWidth: 5,
borderStyle: 'solid',
borderColor: disabled ? dotDisabledColor : dotCheckedColor,
background: dotCheckedColor,
left: 5,
top: 5,
width: 10,
height: 10,
selectors: (_c = {},
_c[_Styling__rspack_import_0.HighContrastSelector] = {
borderColor: 'Highlight',
forcedColorAdjust: 'none',
},
_c),
},
checked &&
(hasIcon || hasImage) && {
top: radioButtonSpacing + radioButtonInnerSize,
right: radioButtonSpacing + radioButtonInnerSize,
left: 'auto', // To reset the value of 'left' to its default value, so that 'right' works
},
];
return {
root: [
classNames.root,
theme.fonts.medium,
{
display: 'flex',
alignItems: 'center',
boxSizing: 'border-box',
color: semanticColors.bodyText,
minHeight: 26,
border: 'none',
position: 'relative',
marginTop: 8,
selectors: {
'.ms-ChoiceFieldLabel': {
display: 'inline-block',
},
},
},
!hasIcon &&
!hasImage && {
selectors: {
'.ms-ChoiceFieldLabel': {
paddingLeft: '26px',
},
},
},
hasImage && 'ms-ChoiceField--image',
hasIcon && 'ms-ChoiceField--icon',
(hasIcon || hasImage) && {
display: 'inline-flex',
fontSize: 0,
margin: '0 4px 4px 0',
paddingLeft: 0,
backgroundColor: iconOrImageChoiceBackgroundColor,
height: '100%',
},
],
choiceFieldWrapper: [
classNames.choiceFieldWrapper,
focused && getChoiceGroupFocusStyle(focusBorderColor, hasIcon || hasImage),
],
// The hidden input
input: [
classNames.input,
{
position: 'absolute',
opacity: 0,
top: 0,
right: 0,
width: '100%',
height: '100%',
margin: 0,
},
disabled && 'is-disabled',
],
field: [
classNames.field,
checked && classNames.checked,
{
display: 'inline-block',
cursor: 'pointer',
marginTop: 0,
position: 'relative',
verticalAlign: 'top',
userSelect: 'none',
minHeight: 20,
selectors: {
':hover': !disabled && fieldHoverOrFocusProperties,
':focus': !disabled && fieldHoverOrFocusProperties,
// The circle
':before': circleAreaProperties,
// The dot
':after': dotAreaProperties,
},
},
hasIcon && 'ms-ChoiceField--icon',
hasImage && 'ms-ChoiceField-field--image',
(hasIcon || hasImage) && {
boxSizing: 'content-box',
cursor: 'pointer',
paddingTop: 22,
margin: 0,
textAlign: 'center',
transitionProperty: 'all',
transitionDuration: choiceFieldTransitionDuration,
transitionTimingFunction: 'ease',
border: '1px solid transparent',
justifyContent: 'center',
alignItems: 'center',
display: 'flex',
flexDirection: 'column',
},
checked && {
borderColor: iconOrImageChoiceBorderCheckedColor,
},
(hasIcon || hasImage) &&
!disabled && {
selectors: {
':hover': enabledFieldWithImageHoverOrFocusProperties,
':focus': enabledFieldWithImageHoverOrFocusProperties,
},
},
disabled && {
cursor: 'default',
selectors: {
'.ms-ChoiceFieldLabel': {
color: semanticColors.disabledBodyText,
selectors: (_d = {},
_d[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({ color: 'GrayText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_d),
},
},
},
checked &&
disabled && {
borderColor: iconOrImageChoiceBackgroundColor,
},
],
innerField: [
classNames.innerField,
hasImage && {
// using non-null assertion because we have a default in `ChoiceGroupOptionBase` class.
height: imageSize.height,
width: imageSize.width,
},
(hasIcon || hasImage) && {
position: 'relative',
display: 'inline-block',
paddingLeft: 30,
paddingRight: 30,
},
(hasIcon || hasImage) &&
imageIsLarge && {
paddingLeft: 24,
paddingRight: 24,
},
(hasIcon || hasImage) &&
disabled && {
opacity: 0.25,
selectors: (_e = {},
_e[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
opacity: 1,
},
_e),
},
],
imageWrapper: getImageWrapperStyle(false, classNames.imageWrapper, checked),
selectedImageWrapper: getImageWrapperStyle(true, classNames.imageWrapper, checked),
iconWrapper: [
classNames.iconWrapper,
{
fontSize: iconSize,
lineHeight: iconSize,
height: iconSize,
},
],
labelWrapper: [
classNames.labelWrapper,
fonts.medium,
(hasIcon || hasImage) && {
display: 'block',
position: 'relative',
margin: '4px 8px 2px 8px',
height: labelWrapperHeight,
lineHeight: labelWrapperLineHeight,
// using non-null assertion because we have a default in `ChoiceGroupOptionBase` class.
maxWidth: imageSize.width * 2,
overflow: 'hidden',
whiteSpace: 'pre-wrap',
},
],
};
};
//# sourceMappingURL=ChoiceGroupOption.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.base.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.base.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CommandBarBase: () => (CommandBarBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/BaseComponent.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _OverflowSet__rspack_import_6 = __webpack_require__(/*! ../../OverflowSet */ "./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.js");
/* import */ var _ResizeGroup__rspack_import_13 = __webpack_require__(/*! ../../ResizeGroup */ "./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.js");
/* import */ var _FocusZone__rspack_import_3 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.js");
/* import */ var _FocusZone__rspack_import_5 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js");
/* import */ var _Button__rspack_import_10 = __webpack_require__(/*! ../../Button */ "./node_modules/@fluentui/react/lib/components/Button/CommandBarButton/CommandBarButton.js");
/* import */ var _Tooltip__rspack_import_9 = __webpack_require__(/*! ../../Tooltip */ "./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.js");
/* import */ var _CommandBar_styles__rspack_import_8 = __webpack_require__(/*! ./CommandBar.styles */ "./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.styles.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var CommandBarBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(CommandBarBase, _super);
function CommandBarBase(props) {
var _this = _super.call(this, props) || this;
_this._overflowSet = react__rspack_import_0.createRef();
_this._resizeGroup = react__rspack_import_0.createRef();
_this._onRenderData = function (data) {
var _a = _this.props, ariaLabel = _a.ariaLabel, primaryGroupAriaLabel = _a.primaryGroupAriaLabel, farItemsGroupAriaLabel = _a.farItemsGroupAriaLabel;
var hasSecondSet = data.farItems && data.farItems.length > 0;
return (react__rspack_import_0.createElement(_FocusZone__rspack_import_3.FocusZone, { className: (0,_Utilities__rspack_import_4.css)(_this._classNames.root), direction: _FocusZone__rspack_import_5.FocusZoneDirection.horizontal, role: 'menubar', "aria-label": ariaLabel },
react__rspack_import_0.createElement(_OverflowSet__rspack_import_6.OverflowSet, { role: hasSecondSet ? 'group' : 'none', "aria-label": hasSecondSet ? primaryGroupAriaLabel : undefined, componentRef: _this._overflowSet, className: (0,_Utilities__rspack_import_4.css)(_this._classNames.primarySet), items: data.primaryItems, overflowItems: data.overflowItems.length ? data.overflowItems : undefined, onRenderItem: _this._onRenderItem, onRenderOverflowButton: _this._onRenderOverflowButton }),
hasSecondSet && (react__rspack_import_0.createElement(_OverflowSet__rspack_import_6.OverflowSet, { role: "group", "aria-label": farItemsGroupAriaLabel, className: (0,_Utilities__rspack_import_4.css)(_this._classNames.secondarySet), items: data.farItems, onRenderItem: _this._onRenderItem, onRenderOverflowButton: _Utilities__rspack_import_7.nullRender }))));
};
_this._onRenderItem = function (item) {
if (item.onRender) {
// These are the top level items, there is no relevant menu dismissing function to
// provide for the IContextualMenuItem onRender function. Pass in a no op function instead.
return item.onRender(item, function () { return undefined; });
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
var itemText = item.text || item.name;
var commandButtonProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ allowDisabledFocus: true, role: 'menuitem' }, item), { styles: (0,_CommandBar_styles__rspack_import_8.getCommandButtonStyles)(item.buttonStyles), className: (0,_Utilities__rspack_import_4.css)('ms-CommandBarItem-link', item.className), text: !item.iconOnly ? itemText : undefined, menuProps: item.subMenuProps, onClick: _this._onButtonClick(item) });
if (item.iconOnly && (itemText !== undefined || item.tooltipHostProps)) {
return (react__rspack_import_0.createElement(_Tooltip__rspack_import_9.TooltipHost, (0,tslib__rspack_import_2.__assign)({ role: "none", content: itemText,
// eslint-disable-next-line @typescript-eslint/no-deprecated
setAriaDescribedBy: false }, item.tooltipHostProps), _this._commandButton(item, commandButtonProps)));
}
return _this._commandButton(item, commandButtonProps);
};
_this._commandButton = function (item, props) {
var ButtonAs = _this.props.buttonAs;
var CommandBarButtonAs = item.commandBarButtonAs;
var DefaultButtonAs = _Button__rspack_import_10.CommandBarButton;
// The prop types between these three possible implementations overlap enough that a force-cast is safe.
var Type = DefaultButtonAs;
if (CommandBarButtonAs) {
Type = (0,_Utilities__rspack_import_11.composeComponentAs)(CommandBarButtonAs, Type);
}
if (ButtonAs) {
Type = (0,_Utilities__rspack_import_11.composeComponentAs)(ButtonAs, Type);
}
// Always pass the default implementation to the override so it may be composed.
return react__rspack_import_0.createElement(Type, (0,tslib__rspack_import_2.__assign)({}, props));
};
_this._onRenderOverflowButton = function (overflowItems) {
var _a = _this.props.overflowButtonProps, overflowButtonProps = _a === void 0 ? {} : _a;
var combinedOverflowItems = (0,tslib__rspack_import_2.__spreadArray)((0,tslib__rspack_import_2.__spreadArray)([], (overflowButtonProps.menuProps ? overflowButtonProps.menuProps.items : []), true), overflowItems, true);
var overflowProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ role: 'menuitem' }, overflowButtonProps), { styles: (0,tslib__rspack_import_2.__assign)({ menuIcon: { fontSize: '17px' } }, overflowButtonProps.styles), className: (0,_Utilities__rspack_import_4.css)('ms-CommandBar-overflowButton', overflowButtonProps.className), menuProps: (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, overflowButtonProps.menuProps), { items: combinedOverflowItems }), menuIconProps: (0,tslib__rspack_import_2.__assign)({ iconName: 'More' }, overflowButtonProps.menuIconProps) });
var OverflowButtonType = _this.props.overflowButtonAs
? (0,_Utilities__rspack_import_11.composeComponentAs)(_this.props.overflowButtonAs, _Button__rspack_import_10.CommandBarButton)
: _Button__rspack_import_10.CommandBarButton;
return react__rspack_import_0.createElement(OverflowButtonType, (0,tslib__rspack_import_2.__assign)({}, overflowProps));
};
_this._onReduceData = function (data) {
var _a = _this.props, shiftOnReduce = _a.shiftOnReduce, onDataReduced = _a.onDataReduced;
var primaryItems = data.primaryItems, overflowItems = data.overflowItems, cacheKey = data.cacheKey;
var farItems = data.farItems;
// Use first item if shiftOnReduce, otherwise use last item
var movedItem = primaryItems[shiftOnReduce ? 0 : primaryItems.length - 1];
if (movedItem !== undefined) {
movedItem.renderedInOverflow = true;
overflowItems = (0,tslib__rspack_import_2.__spreadArray)([movedItem], overflowItems, true);
primaryItems = shiftOnReduce ? primaryItems.slice(1) : primaryItems.slice(0, -1);
var newData = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, data), { primaryItems: primaryItems, overflowItems: overflowItems });
cacheKey = _this._computeCacheKey({ primaryItems: primaryItems, overflow: overflowItems.length > 0, farItems: farItems });
if (onDataReduced) {
onDataReduced(movedItem);
}
newData.cacheKey = cacheKey;
return newData;
}
return undefined;
};
_this._onGrowData = function (data) {
var _a = _this.props, shiftOnReduce = _a.shiftOnReduce, onDataGrown = _a.onDataGrown;
var minimumOverflowItems = data.minimumOverflowItems;
var primaryItems = data.primaryItems, overflowItems = data.overflowItems, cacheKey = data.cacheKey;
var farItems = data.farItems;
var movedItem = overflowItems[0];
// Make sure that moved item exists and is not one of the original overflow items
if (movedItem !== undefined && overflowItems.length > minimumOverflowItems) {
movedItem.renderedInOverflow = false;
overflowItems = overflowItems.slice(1);
// if shiftOnReduce, movedItem goes first, otherwise, last.
primaryItems = shiftOnReduce ? (0,tslib__rspack_import_2.__spreadArray)([movedItem], primaryItems, true) : (0,tslib__rspack_import_2.__spreadArray)((0,tslib__rspack_import_2.__spreadArray)([], primaryItems, true), [movedItem], false);
var newData = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, data), { primaryItems: primaryItems, overflowItems: overflowItems });
cacheKey = _this._computeCacheKey({ primaryItems: primaryItems, overflow: overflowItems.length > 0, farItems: farItems });
if (onDataGrown) {
onDataGrown(movedItem);
}
newData.cacheKey = cacheKey;
return newData;
}
return undefined;
};
(0,_Utilities__rspack_import_12.initializeComponentRef)(_this);
return _this;
}
CommandBarBase.prototype.render = function () {
var _a = this.props, items = _a.items, overflowItems = _a.overflowItems, farItems = _a.farItems, styles = _a.styles, theme = _a.theme, dataDidRender = _a.dataDidRender, _b = _a.onReduceData, onReduceData = _b === void 0 ? this._onReduceData : _b, _c = _a.onGrowData, onGrowData = _c === void 0 ? this._onGrowData : _c, _d = _a.resizeGroupAs, ResizeGroupAs = _d === void 0 ? _ResizeGroup__rspack_import_13.ResizeGroup : _d;
var commandBarData = {
primaryItems: (0,tslib__rspack_import_2.__spreadArray)([], items, true),
overflowItems: (0,tslib__rspack_import_2.__spreadArray)([], overflowItems, true),
minimumOverflowItems: (0,tslib__rspack_import_2.__spreadArray)([], overflowItems, true).length, // for tracking
farItems: farItems,
cacheKey: this._computeCacheKey({
primaryItems: (0,tslib__rspack_import_2.__spreadArray)([], items, true),
overflow: overflowItems && overflowItems.length > 0,
farItems: farItems,
}),
};
this._classNames = getClassNames(styles, { theme: theme });
// ResizeGroup will render these attributes to the root
.
// TODO We may need to elevate classNames from into ?
var nativeProps = (0,_Utilities__rspack_import_14.getNativeProps)(this.props, _Utilities__rspack_import_14.divProperties);
return (react__rspack_import_0.createElement(ResizeGroupAs, (0,tslib__rspack_import_2.__assign)({}, nativeProps, { componentRef: this._resizeGroup, data: commandBarData, onReduceData: onReduceData, onGrowData: onGrowData, onRenderData: this._onRenderData, dataDidRender: dataDidRender })));
};
CommandBarBase.prototype.focus = function () {
var overflowSet = this._overflowSet.current;
overflowSet && overflowSet.focus();
};
CommandBarBase.prototype.remeasure = function () {
this._resizeGroup.current && this._resizeGroup.current.remeasure();
};
CommandBarBase.prototype._onButtonClick = function (item) {
return function (ev) {
// inactive is deprecated. remove check in 7.0
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (item.inactive) {
return;
}
if (item.onClick) {
item.onClick(ev, item);
}
};
};
CommandBarBase.prototype._computeCacheKey = function (data) {
var primaryItems = data.primaryItems, overflow = data.overflow, farItems = data.farItems;
var returnKey = function (acc, current) {
var _a = current.cacheKey, cacheKey = _a === void 0 ? current.key : _a;
return acc + cacheKey;
};
var primaryKey = primaryItems && primaryItems.reduce(returnKey, '');
var overflowKey = overflow ? 'overflow' : '';
var farKey = farItems && farItems.reduce(returnKey, '');
return [primaryKey, overflowKey, farKey].join('');
};
CommandBarBase.defaultProps = {
items: [],
overflowItems: [],
};
return CommandBarBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=CommandBar.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.js":
/*!******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.js ***!
\******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CommandBar: () => (CommandBar)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _CommandBar_base__rspack_import_1 = __webpack_require__(/*! ./CommandBar.base */ "./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.base.js");
/* import */ var _CommandBar_styles__rspack_import_2 = __webpack_require__(/*! ./CommandBar.styles */ "./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.styles.js");
// Create a CommandBar variant which uses these default styles and this styled subcomponent.
var CommandBar = (0,_Utilities__rspack_import_0.styled)(_CommandBar_base__rspack_import_1.CommandBarBase, _CommandBar_styles__rspack_import_2.getStyles, undefined, {
scope: 'CommandBar',
});
//# sourceMappingURL=CommandBar.js.map
}),
"./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.styles.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/CommandBar/CommandBar.styles.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getCommandButtonStyles: () => (getCommandButtonStyles),
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
var COMMAND_BAR_HEIGHT = 44;
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var semanticColors = theme.semanticColors;
return {
root: [
theme.fonts.medium,
'ms-CommandBar',
{
display: 'flex',
backgroundColor: semanticColors.bodyBackground,
padding: '0 14px 0 24px',
height: COMMAND_BAR_HEIGHT,
},
className,
],
primarySet: [
'ms-CommandBar-primaryCommand',
{
flexGrow: '1',
display: 'flex',
alignItems: 'stretch',
},
],
secondarySet: [
'ms-CommandBar-secondaryCommand',
{
flexShrink: '0',
display: 'flex',
alignItems: 'stretch',
},
],
};
};
var getCommandButtonStyles = (0,_Utilities__rspack_import_0.memoizeFunction)(function (customStyles) {
var rootStyles = {
height: '100%',
};
var labelStyles = {
whiteSpace: 'nowrap',
};
var _a = customStyles || {}, root = _a.root, label = _a.label, restCustomStyles = (0,tslib__rspack_import_1.__rest)(_a, ["root", "label"]);
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, restCustomStyles), { root: root ? [rootStyles, root] : rootStyles, label: label ? [labelStyles, label] : labelStyles });
});
//# sourceMappingURL=CommandBar.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.base.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.base.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuBase: () => (ContextualMenuBase),
canAnyMenuItemsCheck: () => (canAnyMenuItemsCheck),
getSubmenuItems: () => (getSubmenuItems)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _ContextualMenu_types__rspack_import_3 = __webpack_require__(/*! ./ContextualMenu.types */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.js");
/* import */ var _common_DirectionalHint__rspack_import_2 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _FocusZone__rspack_import_14 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js");
/* import */ var _FocusZone__rspack_import_25 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/object.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_16 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_17 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/osDetector.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/mobileDetector.js");
/* import */ var _Utilities__rspack_import_20 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_27 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
/* import */ var _Utilities__rspack_import_31 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_32 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_36 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
/* import */ var _utilities_contextualMenu_index__rspack_import_19 = __webpack_require__(/*! ../../utilities/contextualMenu/index */ "./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js");
/* import */ var _Callout__rspack_import_35 = __webpack_require__(/*! ../../Callout */ "./node_modules/@fluentui/react/lib/components/Callout/Callout.js");
/* import */ var _ContextualMenuItem__rspack_import_30 = __webpack_require__(/*! ./ContextualMenuItem */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js");
/* import */ var _ContextualMenuItemWrapper_index__rspack_import_26 = __webpack_require__(/*! ./ContextualMenuItemWrapper/index */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.js");
/* import */ var _ContextualMenuItemWrapper_index__rspack_import_28 = __webpack_require__(/*! ./ContextualMenuItemWrapper/index */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.js");
/* import */ var _ContextualMenuItemWrapper_index__rspack_import_29 = __webpack_require__(/*! ./ContextualMenuItemWrapper/index */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.js");
/* import */ var _Styling__rspack_import_6 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _ContextualMenu_classNames__rspack_import_7 = __webpack_require__(/*! ./ContextualMenu.classNames */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.classNames.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _fluentui_react_hooks__rspack_import_9 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _fluentui_react_hooks__rspack_import_12 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js");
/* import */ var _fluentui_react_hooks__rspack_import_21 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useAsync.js");
/* import */ var _fluentui_react_hooks__rspack_import_22 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
/* import */ var _fluentui_react_hooks__rspack_import_23 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useTarget.js");
/* import */ var _ResponsiveMode__rspack_import_24 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js");
/* import */ var _ResponsiveMode__rspack_import_33 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
/* import */ var _utilities_MenuContext_index__rspack_import_34 = __webpack_require__(/*! ../../utilities/MenuContext/index */ "./node_modules/@fluentui/react/lib/utilities/MenuContext/MenuContext.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var getContextualMenuItemClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
// The default ContextualMenu properties have no items and beak, the default submenu direction is right and top.
var DEFAULT_PROPS = {
items: [],
shouldFocusOnMount: true,
gapSpace: 0,
directionalHint: _common_DirectionalHint__rspack_import_2.DirectionalHint.bottomAutoEdge,
beakWidth: 16,
};
/* return number of menu items, excluding headers and dividers */
function getItemCount(items) {
var totalItemCount = 0;
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
var item = items_1[_i];
if (item.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider && item.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Header) {
var itemCount = item.customOnRenderListLength ? item.customOnRenderListLength : 1;
totalItemCount += itemCount;
}
}
return totalItemCount;
}
function getSubmenuItems(item, options) {
var target = options === null || options === void 0 ? void 0 : options.target;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var items = item.subMenuProps ? item.subMenuProps.items : item.items;
if (items) {
var overrideItems = [];
for (var _i = 0, items_2 = items; _i < items_2.length; _i++) {
var subItem = items_2[_i];
if (subItem.preferMenuTargetAsEventTarget) {
// For sub-items which need an overridden target, intercept `onClick`
var onClick = subItem.onClick, contextItem = (0,tslib__rspack_import_4.__rest)(subItem, ["onClick"]);
overrideItems.push((0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, contextItem), { onClick: getOnClickWithOverrideTarget(onClick, target) }));
}
else {
overrideItems.push(subItem);
}
}
return overrideItems;
}
}
/**
* Returns true if a list of menu items can contain a checkbox
*/
function canAnyMenuItemsCheck(items) {
return items.some(function (item) {
if (item.canCheck) {
return true;
}
// If the item is a section, check if any of the items in the section can check.
if (item.sectionProps && item.sectionProps.items.some(function (submenuItem) { return submenuItem.canCheck === true; })) {
return true;
}
return false;
});
}
var NavigationIdleDelay = 250; /* ms */
var COMPONENT_NAME = 'ContextualMenu';
var _getMenuItemStylesFunction = (0,_Utilities__rspack_import_5.memoizeFunction)(function () {
var styles = [];
for (var _i = 0; _i < arguments.length; _i++) {
styles[_i] = arguments[_i];
}
return function (styleProps) {
return _Styling__rspack_import_6.concatStyleSetsWithProps.apply(void 0, (0,tslib__rspack_import_4.__spreadArray)([styleProps, _ContextualMenu_classNames__rspack_import_7.getItemStyles], styles, false));
};
});
//#region Custom hooks
function useVisibility(props, targetWindow) {
var _a = props.hidden, hidden = _a === void 0 ? false : _a, onMenuDismissed = props.onMenuDismissed, onMenuOpened = props.onMenuOpened;
var previousHidden = (0,_fluentui_react_hooks__rspack_import_8.usePrevious)(hidden);
var onMenuOpenedRef = react__rspack_import_0.useRef(onMenuOpened);
var onMenuClosedRef = react__rspack_import_0.useRef(onMenuDismissed);
var propsRef = react__rspack_import_0.useRef(props);
onMenuOpenedRef.current = onMenuOpened;
onMenuClosedRef.current = onMenuDismissed;
propsRef.current = props;
react__rspack_import_0.useEffect(function () {
var _a, _b;
// Don't issue dismissed callbacks on initial mount
if (hidden && previousHidden === false) {
(_a = onMenuClosedRef.current) === null || _a === void 0 ? void 0 : _a.call(onMenuClosedRef, propsRef.current);
}
else if (!hidden && previousHidden !== false) {
(_b = onMenuOpenedRef.current) === null || _b === void 0 ? void 0 : _b.call(onMenuOpenedRef, propsRef.current);
}
}, [hidden, previousHidden]);
// Issue onDismissedCallback on unmount
react__rspack_import_0.useEffect(function () { return function () { var _a; return (_a = onMenuClosedRef.current) === null || _a === void 0 ? void 0 : _a.call(onMenuClosedRef, propsRef.current); }; }, []);
}
function useSubMenuState(_a, dismiss) {
var hidden = _a.hidden, items = _a.items, theme = _a.theme, className = _a.className, id = _a.id, menuTarget = _a.target;
var _b = react__rspack_import_0.useState(), expandedMenuItemKey = _b[0], setExpandedMenuItemKey = _b[1];
var _c = react__rspack_import_0.useState(), submenuTarget = _c[0], setSubmenuTarget = _c[1];
/** True if the menu was expanded by mouse click OR hover (as opposed to by keyboard) */
var _d = react__rspack_import_0.useState(), shouldFocusOnContainer = _d[0], setShouldFocusOnContainer = _d[1];
var subMenuId = (0,_fluentui_react_hooks__rspack_import_9.useId)(COMPONENT_NAME, id);
var closeSubMenu = react__rspack_import_0.useCallback(function () {
setShouldFocusOnContainer(undefined);
setExpandedMenuItemKey(undefined);
setSubmenuTarget(undefined);
}, []);
var openSubMenu = react__rspack_import_0.useCallback(function (_a, target, focusContainer) {
var submenuItemKey = _a.key;
if (expandedMenuItemKey === submenuItemKey) {
return;
}
target.focus();
setShouldFocusOnContainer(focusContainer);
setExpandedMenuItemKey(submenuItemKey);
setSubmenuTarget(target);
}, [expandedMenuItemKey]);
react__rspack_import_0.useEffect(function () {
if (hidden) {
closeSubMenu();
}
}, [hidden, closeSubMenu]);
var onSubMenuDismiss = useOnSubmenuDismiss(dismiss, closeSubMenu);
var getSubmenuProps = function () {
var item = findItemByKeyFromItems(expandedMenuItemKey, items);
var submenuProps = null;
if (item) {
submenuProps = {
items: getSubmenuItems(item, { target: menuTarget }),
target: submenuTarget,
onDismiss: onSubMenuDismiss,
isSubMenu: true,
id: subMenuId,
shouldFocusOnMount: true,
shouldFocusOnContainer: shouldFocusOnContainer,
directionalHint: (0,_Utilities__rspack_import_10.getRTL)(theme) ? _common_DirectionalHint__rspack_import_2.DirectionalHint.leftTopEdge : _common_DirectionalHint__rspack_import_2.DirectionalHint.rightTopEdge,
className: className,
gapSpace: 0,
isBeakVisible: false,
};
if (item.subMenuProps) {
(0,_Utilities__rspack_import_11.assign)(submenuProps, item.subMenuProps);
}
if (item.preferMenuTargetAsEventTarget) {
var onItemClick = item.onItemClick;
submenuProps.onItemClick = getOnClickWithOverrideTarget(onItemClick, menuTarget);
}
}
return submenuProps;
};
return [expandedMenuItemKey, openSubMenu, getSubmenuProps, onSubMenuDismiss];
}
function useShouldUpdateFocusOnMouseMove(_a) {
var delayUpdateFocusOnHover = _a.delayUpdateFocusOnHover, hidden = _a.hidden;
var shouldUpdateFocusOnMouseEvent = react__rspack_import_0.useRef(!delayUpdateFocusOnHover);
var gotMouseMove = react__rspack_import_0.useRef(false);
react__rspack_import_0.useEffect(function () {
shouldUpdateFocusOnMouseEvent.current = !delayUpdateFocusOnHover;
gotMouseMove.current = hidden ? false : !delayUpdateFocusOnHover && gotMouseMove.current;
}, [delayUpdateFocusOnHover, hidden]);
var onMenuFocusCapture = react__rspack_import_0.useCallback(function () {
if (delayUpdateFocusOnHover) {
shouldUpdateFocusOnMouseEvent.current = false;
}
}, [delayUpdateFocusOnHover]);
return [shouldUpdateFocusOnMouseEvent, gotMouseMove, onMenuFocusCapture];
}
function usePreviousActiveElement(_a, targetWindow, hostElement) {
var hidden = _a.hidden, onRestoreFocus = _a.onRestoreFocus;
var previousActiveElement = react__rspack_import_0.useRef(undefined);
var tryFocusPreviousActiveElement = react__rspack_import_0.useCallback(function (options) {
var _a, _b;
if (onRestoreFocus) {
onRestoreFocus(options);
}
else if (options === null || options === void 0 ? void 0 : options.documentContainsFocus) {
// Make sure that the focus method actually exists
// In some cases the object might exist but not be a real element.
// This is primarily for IE 11 and should be removed once IE 11 is no longer in use.
(_b = (_a = previousActiveElement.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
}
}, [onRestoreFocus]);
(0,_fluentui_react_hooks__rspack_import_12.useIsomorphicLayoutEffect)(function () {
var _a, _b;
if (!hidden) {
var newElement = targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.document.activeElement;
if (!((_a = hostElement.current) === null || _a === void 0 ? void 0 : _a.contains(newElement)) && newElement.tagName !== 'BODY') {
previousActiveElement.current = newElement;
}
}
else if (previousActiveElement.current) {
tryFocusPreviousActiveElement({
originalElement: previousActiveElement.current,
containsFocus: true,
documentContainsFocus: ((_b = (0,_Utilities__rspack_import_13.getDocument)()) === null || _b === void 0 ? void 0 : _b.hasFocus()) || false,
});
previousActiveElement.current = undefined;
}
}, [hidden, targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.document.activeElement, tryFocusPreviousActiveElement, hostElement]);
return [tryFocusPreviousActiveElement];
}
function useKeyHandlers(_a, dismiss, hostElement, openSubMenu) {
var theme = _a.theme, isSubMenu = _a.isSubMenu, _b = _a.focusZoneProps, _c = _b === void 0 ? {} : _b, checkForNoWrap = _c.checkForNoWrap, _d = _c.direction, focusZoneDirection = _d === void 0 ? _FocusZone__rspack_import_14.FocusZoneDirection.vertical : _d;
/** True if the most recent keydown event was for alt (option) or meta (command). */
var lastKeyDownWasAltOrMeta = react__rspack_import_0.useRef(undefined);
/**
* Calls `shouldHandleKey` to determine whether the keyboard event should be handled;
* if so, stops event propagation and dismisses menu(s).
* @param ev - The keyboard event.
* @param shouldHandleKey - Returns whether we should handle this keyboard event.
* @param dismissAllMenus - If true, dismiss all menus. Otherwise, dismiss only the current menu.
* Only does anything if `shouldHandleKey` returns true.
* @returns Whether the event was handled.
*/
var keyHandler = function (ev, shouldHandleKey, dismissAllMenus) {
var handled = false;
if (shouldHandleKey(ev)) {
dismiss(ev, dismissAllMenus);
ev.preventDefault();
ev.stopPropagation();
handled = true;
}
return handled;
};
/**
* Checks if the submenu should be closed
*/
var shouldCloseSubMenu = function (ev) {
var submenuCloseKey = (0,_Utilities__rspack_import_10.getRTL)(theme) ? _Utilities__rspack_import_15.KeyCodes.right : _Utilities__rspack_import_15.KeyCodes.left;
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which !== submenuCloseKey || !isSubMenu) {
return false;
}
return !!(focusZoneDirection === _FocusZone__rspack_import_14.FocusZoneDirection.vertical ||
(checkForNoWrap && !(0,_Utilities__rspack_import_16.shouldWrapFocus)(ev.target, 'data-no-horizontal-wrap')));
};
var shouldHandleKeyDown = function (ev) {
return (
// eslint-disable-next-line @typescript-eslint/no-deprecated
ev.which === _Utilities__rspack_import_15.KeyCodes.escape || shouldCloseSubMenu(ev) || (ev.which === _Utilities__rspack_import_15.KeyCodes.up && (ev.altKey || ev.metaKey)));
};
var onKeyDown = function (ev) {
// Take note if we are processing an alt (option) or meta (command) keydown.
// See comment in shouldHandleKeyUp for reasoning.
lastKeyDownWasAltOrMeta.current = isAltOrMeta(ev);
// On Mac, pressing escape dismisses all levels of native context menus
// eslint-disable-next-line @typescript-eslint/no-deprecated
var dismissAllMenus = ev.which === _Utilities__rspack_import_15.KeyCodes.escape && ((0,_Utilities__rspack_import_17.isMac)() || (0,_Utilities__rspack_import_18.isIOS)());
return keyHandler(ev, shouldHandleKeyDown, dismissAllMenus);
};
/**
* We close the menu on key up only if ALL of the following are true:
* - Most recent key down was alt or meta (command)
* - The alt/meta key down was NOT followed by some other key (such as down/up arrow to
* expand/collapse the menu)
* - We're not on a Mac (or iOS)
*
* This is because on Windows, pressing alt moves focus to the application menu bar or similar,
* closing any open context menus. There is not a similar behavior on Macs.
*/
var shouldHandleKeyUp = function (ev) {
var keyPressIsAltOrMetaAlone = lastKeyDownWasAltOrMeta.current && isAltOrMeta(ev);
lastKeyDownWasAltOrMeta.current = false;
return !!keyPressIsAltOrMetaAlone && !((0,_Utilities__rspack_import_18.isIOS)() || (0,_Utilities__rspack_import_17.isMac)());
};
var onKeyUp = function (ev) {
return keyHandler(ev, shouldHandleKeyUp, true /* dismissAllMenus */);
};
var onMenuKeyDown = function (ev) {
// Mark as handled if onKeyDown returns true (for handling collapse cases)
// or if we are attempting to expand a submenu
var handled = onKeyDown(ev);
if (handled || !hostElement.current) {
return;
}
// If we have a modifier key being pressed, we do not want to move focus.
// Otherwise, handle up and down keys.
var hasModifier = !!(ev.altKey || ev.metaKey);
// eslint-disable-next-line @typescript-eslint/no-deprecated
var isUp = ev.which === _Utilities__rspack_import_15.KeyCodes.up;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var isDown = ev.which === _Utilities__rspack_import_15.KeyCodes.down;
if (!hasModifier && (isUp || isDown)) {
var elementToFocus = isUp
? (0,_Utilities__rspack_import_16.getLastFocusable)(hostElement.current, hostElement.current.lastChild, true)
: (0,_Utilities__rspack_import_16.getFirstFocusable)(hostElement.current, hostElement.current.firstChild, true);
if (elementToFocus) {
elementToFocus.focus();
ev.preventDefault();
ev.stopPropagation();
}
}
};
var onItemKeyDown = function (item, ev) {
var openKey = (0,_Utilities__rspack_import_10.getRTL)(theme) ? _Utilities__rspack_import_15.KeyCodes.left : _Utilities__rspack_import_15.KeyCodes.right;
if (!item.disabled &&
// eslint-disable-next-line @typescript-eslint/no-deprecated
(ev.which === openKey || ev.which === _Utilities__rspack_import_15.KeyCodes.enter || (ev.which === _Utilities__rspack_import_15.KeyCodes.down && (ev.altKey || ev.metaKey)))) {
openSubMenu(item, ev.currentTarget);
ev.preventDefault();
}
};
return [onKeyDown, onKeyUp, onMenuKeyDown, onItemKeyDown];
}
function useScrollHandler(asyncTracker) {
var isScrollIdle = react__rspack_import_0.useRef(true);
var scrollIdleTimeoutId = react__rspack_import_0.useRef(undefined);
/**
* Scroll handler for the callout to make sure the mouse events
* for updating focus are not interacting during scroll
*/
var onScroll = function () {
if (!isScrollIdle.current && scrollIdleTimeoutId.current !== undefined) {
asyncTracker.clearTimeout(scrollIdleTimeoutId.current);
scrollIdleTimeoutId.current = undefined;
}
else {
isScrollIdle.current = false;
}
scrollIdleTimeoutId.current = asyncTracker.setTimeout(function () {
isScrollIdle.current = true;
}, NavigationIdleDelay);
};
return [onScroll, isScrollIdle];
}
function useOnSubmenuDismiss(dismiss, closeSubMenu) {
var isMountedRef = react__rspack_import_0.useRef(false);
react__rspack_import_0.useEffect(function () {
isMountedRef.current = true;
return function () {
isMountedRef.current = false;
};
}, []);
/**
* This function is called ASYNCHRONOUSLY, and so there is a chance it is called
* after the component is unmounted. The isMountedRef is added to prevent
* from calling setState() after unmount. Do NOT copy this pattern in synchronous
* code.
*/
var onSubMenuDismiss = function (ev, dismissAll) {
if (dismissAll) {
dismiss(ev, dismissAll);
}
else if (isMountedRef.current) {
closeSubMenu();
}
};
return onSubMenuDismiss;
}
function useSubmenuEnterTimer(_a, asyncTracker) {
var _b = _a.subMenuHoverDelay, subMenuHoverDelay = _b === void 0 ? NavigationIdleDelay : _b;
var enterTimerRef = react__rspack_import_0.useRef(undefined);
var cancelSubMenuTimer = function () {
if (enterTimerRef.current !== undefined) {
asyncTracker.clearTimeout(enterTimerRef.current);
enterTimerRef.current = undefined;
}
};
var startSubmenuTimer = function (onTimerExpired) {
enterTimerRef.current = asyncTracker.setTimeout(function () {
onTimerExpired();
cancelSubMenuTimer();
}, subMenuHoverDelay);
};
return [cancelSubMenuTimer, startSubmenuTimer, enterTimerRef];
}
function useMouseHandlers(props,
// eslint-disable-next-line @typescript-eslint/no-deprecated
isScrollIdle, subMenuEntryTimer, targetWindow,
// eslint-disable-next-line @typescript-eslint/no-deprecated
shouldUpdateFocusOnMouseEvent,
// eslint-disable-next-line @typescript-eslint/no-deprecated
gotMouseMove, expandedMenuItemKey, hostElement, startSubmenuTimer, cancelSubMenuTimer, openSubMenu, onSubMenuDismiss, dismiss) {
var menuTarget = props.target;
var onItemMouseEnterBase = function (item, ev, target) {
if (shouldUpdateFocusOnMouseEvent.current) {
gotMouseMove.current = true;
}
if (shouldIgnoreMouseEvent()) {
return;
}
updateFocusOnMouseEvent(item, ev, target);
};
var onItemMouseMoveBase = function (item, ev, target) {
var targetElement = ev.currentTarget;
// Always do this check to make sure we record a mouseMove if needed (even if we are timed out)
if (shouldUpdateFocusOnMouseEvent.current) {
gotMouseMove.current = true;
}
else {
return;
}
if (!isScrollIdle.current ||
subMenuEntryTimer.current !== undefined ||
targetElement === (targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.document.activeElement)) {
return;
}
updateFocusOnMouseEvent(item, ev, target);
};
var shouldIgnoreMouseEvent = function () {
return !isScrollIdle.current || !gotMouseMove.current;
};
var onMouseItemLeave = function (item, ev) {
var _a;
if (shouldIgnoreMouseEvent()) {
return;
}
cancelSubMenuTimer();
if (expandedMenuItemKey !== undefined) {
return;
}
/**
* IE11 focus() method forces parents to scroll to top of element.
* Edge and IE expose a setActive() function for focusable divs that
* sets the page focus but does not scroll the parent element.
*/
if (hostElement.current.setActive) {
try {
hostElement.current.setActive();
}
catch (e) {
/* no-op */
}
}
else {
(_a = hostElement.current) === null || _a === void 0 ? void 0 : _a.focus();
}
};
/**
* Handles updating focus when mouseEnter or mouseMove fire.
* As part of updating focus, This function will also update
* the expand/collapse state accordingly.
*/
var updateFocusOnMouseEvent = function (item, ev, target) {
var targetElement = target ? target : ev.currentTarget;
if (item.key === expandedMenuItemKey) {
return;
}
cancelSubMenuTimer();
// If the menu is not expanded we can update focus without any delay
if (expandedMenuItemKey === undefined) {
targetElement.focus();
}
// Delay updating expanding/dismissing the submenu
// and only set focus if we have not already done so
if ((0,_utilities_contextualMenu_index__rspack_import_19.hasSubmenu)(item)) {
ev.stopPropagation();
startSubmenuTimer(function () {
targetElement.focus();
openSubMenu(item, targetElement, true);
});
}
else {
startSubmenuTimer(function () {
onSubMenuDismiss(ev);
targetElement.focus();
});
}
};
var onItemClick = function (item, ev) {
onItemClickBase(item, ev, ev.currentTarget);
};
var onItemClickBase = function (item, ev, target) {
var items = getSubmenuItems(item, { target: menuTarget });
// Cancel an async menu item hover timeout action from being taken and instead
// just trigger the click event instead.
cancelSubMenuTimer();
if (!(0,_utilities_contextualMenu_index__rspack_import_19.hasSubmenu)(item) && (!items || !items.length)) {
// This is an item without a menu. Click it.
executeItemClick(item, ev);
}
else {
if (item.key !== expandedMenuItemKey) {
// This has a collapsed sub menu. Expand it.
// focus on the container by default when the menu is opened with a click event
// this differentiates from a keyboard interaction triggering the click event
var shouldFocusOnContainer = typeof props.shouldFocusOnContainer === 'boolean'
? props.shouldFocusOnContainer
: ev.nativeEvent.pointerType === 'mouse';
openSubMenu(item, target, shouldFocusOnContainer);
}
}
ev.stopPropagation();
ev.preventDefault();
};
var onAnchorClick = function (item, ev) {
executeItemClick(item, ev);
ev.stopPropagation();
};
var executeItemClick = function (item, ev) {
if (item.disabled || item.isDisabled) {
return;
}
if (item.preferMenuTargetAsEventTarget) {
overrideTarget(ev, menuTarget);
}
var shouldDismiss = false;
if (item.onClick) {
shouldDismiss = !!item.onClick(ev, item);
}
else if (props.onItemClick) {
shouldDismiss = !!props.onItemClick(ev, item);
}
if (shouldDismiss || !ev.defaultPrevented) {
dismiss(ev, true);
}
};
return [
onItemMouseEnterBase,
onItemMouseMoveBase,
onMouseItemLeave,
onItemClick,
onAnchorClick,
executeItemClick,
onItemClickBase,
];
}
//#endregion
var ContextualMenuBase = react__rspack_import_0.memo(react__rspack_import_0.forwardRef(function (propsWithoutDefaults, forwardedRef) {
var _a;
var _b = (0,_Utilities__rspack_import_20.getPropsWithDefaults)(DEFAULT_PROPS, propsWithoutDefaults), ref = _b.ref, props = (0,tslib__rspack_import_4.__rest)(_b, ["ref"]);
var hostElement = react__rspack_import_0.useRef(null);
var asyncTracker = (0,_fluentui_react_hooks__rspack_import_21.useAsync)();
var menuId = (0,_fluentui_react_hooks__rspack_import_9.useId)(COMPONENT_NAME, props.id);
(0,_fluentui_react_hooks__rspack_import_22.useWarnings)({
name: COMPONENT_NAME,
props: props,
deprecations: {
getMenuClassNames: 'styles',
},
});
var dismiss = function (ev, dismissAll) { var _a; return (_a = props.onDismiss) === null || _a === void 0 ? void 0 : _a.call(props, ev, dismissAll); };
var _c = (0,_fluentui_react_hooks__rspack_import_23.useTarget)(props.target, hostElement), targetRef = _c[0], targetWindow = _c[1];
var tryFocusPreviousActiveElement = usePreviousActiveElement(props, targetWindow, hostElement)[0];
var _d = useSubMenuState(props, dismiss), expandedMenuItemKey = _d[0], openSubMenu = _d[1], getSubmenuProps = _d[2], onSubMenuDismiss = _d[3];
var _e = useShouldUpdateFocusOnMouseMove(props), shouldUpdateFocusOnMouseEvent = _e[0], gotMouseMove = _e[1], onMenuFocusCapture = _e[2];
var _f = useScrollHandler(asyncTracker), onScroll = _f[0], isScrollIdle = _f[1];
var _g = useSubmenuEnterTimer(props, asyncTracker), cancelSubMenuTimer = _g[0], startSubmenuTimer = _g[1], subMenuEntryTimer = _g[2];
var responsiveMode = (0,_ResponsiveMode__rspack_import_24.useResponsiveMode)(hostElement, props.responsiveMode);
useVisibility(props, targetWindow);
var _h = useKeyHandlers(props, dismiss, hostElement, openSubMenu), onKeyDown = _h[0], onKeyUp = _h[1], onMenuKeyDown = _h[2], onItemKeyDown = _h[3];
var _j = useMouseHandlers(props, isScrollIdle, subMenuEntryTimer, targetWindow, shouldUpdateFocusOnMouseEvent, gotMouseMove, expandedMenuItemKey, hostElement, startSubmenuTimer, cancelSubMenuTimer, openSubMenu, onSubMenuDismiss, dismiss), onItemMouseEnterBase = _j[0], onItemMouseMoveBase = _j[1], onMouseItemLeave = _j[2], onItemClick = _j[3], onAnchorClick = _j[4], executeItemClick = _j[5], onItemClickBase = _j[6];
//#region Render helpers
var onDefaultRenderMenuList = function (menuListProps,
// eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames, defaultRender) {
var indexCorrection = 0;
var items = menuListProps.items, totalItemCount = menuListProps.totalItemCount, hasCheckmarks = menuListProps.hasCheckmarks, hasIcons = menuListProps.hasIcons;
return (react__rspack_import_0.createElement("ul", { className: menuClassNames.list, onKeyDown: onKeyDown, onKeyUp: onKeyUp, role: 'presentation' }, items.map(function (item, index) {
var menuItem = renderMenuItem(item, index, indexCorrection, totalItemCount, hasCheckmarks, hasIcons, menuClassNames);
if (item.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider && item.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Header) {
var indexIncrease = item.customOnRenderListLength ? item.customOnRenderListLength : 1;
indexCorrection += indexIncrease;
}
return menuItem;
})));
};
var renderFocusZone = function (children, adjustedFocusZoneProps) {
var _a = props.focusZoneAs, ChildrenRenderer = _a === void 0 ? _FocusZone__rspack_import_25.FocusZone : _a;
return react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_4.__assign)({}, adjustedFocusZoneProps), children);
};
/**
* !!!IMPORTANT!!! Avoid mutating `item: IContextualMenuItem` argument. It will
* cause the menu items to always re-render because the component update is based on shallow comparison.
*/
var renderMenuItem = function (item, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons,
// eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames) {
var _a;
var renderedItems = [];
var iconProps = item.iconProps || { iconName: 'None' };
var getItemClassNames = item.getItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
itemProps = item.itemProps;
var styles = itemProps ? itemProps.styles : undefined;
// We only send a dividerClassName when the item to be rendered is a divider.
// For all other cases, the default divider style is used.
var dividerClassName = item.itemType === _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider ? item.className : undefined;
var subMenuIconClassName = item.submenuIconProps ? item.submenuIconProps.className : '';
// eslint-disable-next-line @typescript-eslint/no-deprecated
var itemClassNames;
// IContextualMenuItem#getItemClassNames for backwards compatibility
// otherwise uses mergeStyles for class names.
if (getItemClassNames) {
itemClassNames = getItemClassNames(props.theme, (0,_utilities_contextualMenu_index__rspack_import_19.isItemDisabled)(item), expandedMenuItemKey === item.key, !!(0,_utilities_contextualMenu_index__rspack_import_19.getIsChecked)(item), !!item.href, iconProps.iconName !== 'None', item.className, dividerClassName, iconProps.className, subMenuIconClassName, item.primaryDisabled);
}
else {
var itemStyleProps = {
theme: props.theme,
disabled: (0,_utilities_contextualMenu_index__rspack_import_19.isItemDisabled)(item),
expanded: expandedMenuItemKey === item.key,
checked: !!(0,_utilities_contextualMenu_index__rspack_import_19.getIsChecked)(item),
isAnchorLink: !!item.href,
knownIcon: iconProps.iconName !== 'None',
itemClassName: item.className,
dividerClassName: dividerClassName,
iconClassName: iconProps.className,
subMenuClassName: subMenuIconClassName,
primaryDisabled: item.primaryDisabled,
};
// We need to generate default styles then override if styles are provided
// since the ContextualMenu currently handles item classNames.
itemClassNames = getContextualMenuItemClassNames(_getMenuItemStylesFunction((_a = menuClassNames.subComponentStyles) === null || _a === void 0 ? void 0 : _a.menuItem, styles), itemStyleProps);
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (item.text === '-' || item.name === '-') {
item.itemType = _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider;
}
switch (item.itemType) {
case _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider:
renderedItems.push(renderSeparator(index, itemClassNames));
break;
case _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Header:
renderedItems.push(renderSeparator(index, itemClassNames));
var headerItem = renderHeaderMenuItem(item, itemClassNames, menuClassNames, index, hasCheckmarks, hasIcons);
renderedItems.push(renderListItem(headerItem, item.key || index, itemClassNames, item.title));
break;
case _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Section:
renderedItems.push(renderSectionItem(item, itemClassNames, menuClassNames, index, hasCheckmarks, hasIcons));
break;
default:
var defaultRenderNormalItem = function () {
return renderNormalItem(item, itemClassNames, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons);
};
var menuItem = props.onRenderContextualMenuItem
? props.onRenderContextualMenuItem(item, defaultRenderNormalItem)
: defaultRenderNormalItem();
renderedItems.push(renderListItem(menuItem, item.key || index, itemClassNames, item.title));
break;
}
// Since multiple nodes *could* be rendered, wrap them all in a fragment with this item's key.
// This ensures the reconciler handles multi-item output per-node correctly and does not re-mount content.
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, { key: item.key }, renderedItems);
};
var defaultMenuItemRenderer = function (item,
// eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames) {
var index = item.index, focusableElementIndex = item.focusableElementIndex, totalItemCount = item.totalItemCount, hasCheckmarks = item.hasCheckmarks, hasIcons = item.hasIcons;
return renderMenuItem(item, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons, menuClassNames);
};
var renderSectionItem = function (sectionItem,
// eslint-disable-next-line @typescript-eslint/no-deprecated
itemClassNames,
// eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames, index, hasCheckmarks, hasIcons) {
var sectionProps = sectionItem.sectionProps;
if (!sectionProps) {
return;
}
var headerItem;
var groupProps;
if (sectionProps.title) {
var headerContextualMenuItem = undefined;
var ariaLabelledby = '';
if (typeof sectionProps.title === 'string') {
// Since title is a user-facing string, it needs to be stripped
// of whitespace in order to build a valid element ID
var id_1 = menuId + sectionProps.title.replace(/\s/g, '');
headerContextualMenuItem = {
key: "section-".concat(sectionProps.title, "-title"),
itemType: _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Header,
text: sectionProps.title,
id: id_1,
};
ariaLabelledby = id_1;
}
else {
var id_2 = sectionProps.title.id || menuId + sectionProps.title.key.replace(/\s/g, '');
headerContextualMenuItem = (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, sectionProps.title), { id: id_2 });
ariaLabelledby = id_2;
}
if (headerContextualMenuItem) {
groupProps = {
role: 'group',
'aria-labelledby': ariaLabelledby,
};
headerItem = renderHeaderMenuItem(headerContextualMenuItem, itemClassNames, menuClassNames, index, hasCheckmarks, hasIcons);
}
}
if (sectionProps.items && sectionProps.items.length > 0) {
var correctedIndex_1 = 0;
return (react__rspack_import_0.createElement("li", { role: "presentation", key: sectionProps.key || sectionItem.key || "section-".concat(index) },
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_4.__assign)({}, groupProps),
react__rspack_import_0.createElement("ul", { className: menuClassNames.list, role: "presentation" },
sectionProps.topDivider && renderSeparator(index, itemClassNames, true, true),
headerItem && renderListItem(headerItem, sectionItem.key || index, itemClassNames, sectionItem.title),
sectionProps.items.map(function (contextualMenuItem, itemsIndex) {
var menuItem = renderMenuItem(contextualMenuItem, itemsIndex, correctedIndex_1, getItemCount(sectionProps.items), hasCheckmarks, hasIcons, menuClassNames);
if (contextualMenuItem.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Divider &&
contextualMenuItem.itemType !== _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Header) {
var indexIncrease = contextualMenuItem.customOnRenderListLength
? contextualMenuItem.customOnRenderListLength
: 1;
correctedIndex_1 += indexIncrease;
}
return menuItem;
}),
sectionProps.bottomDivider && renderSeparator(index, itemClassNames, false, true)))));
}
};
var renderListItem = function (content, key, classNames, // eslint-disable-line @typescript-eslint/no-deprecated
title) {
return (react__rspack_import_0.createElement("li", { role: "presentation", title: title, key: key, className: classNames.item }, content));
};
var renderSeparator = function (index, classNames, // eslint-disable-line @typescript-eslint/no-deprecated
top, fromSection) {
if (fromSection || index > 0) {
return (react__rspack_import_0.createElement("li", { role: "separator", key: 'separator-' + index + (top === undefined ? '' : top ? '-top' : '-bottom'), className: classNames.divider, "aria-hidden": "true" }));
}
return null;
};
var renderNormalItem = function (item, classNames, // eslint-disable-line @typescript-eslint/no-deprecated
index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons) {
if (item.onRender) {
return item.onRender((0,tslib__rspack_import_4.__assign)({ 'aria-posinset': focusableElementIndex + 1, 'aria-setsize': totalItemCount }, item), dismiss);
}
var contextualMenuItemAs = props.contextualMenuItemAs;
var commonProps = {
item: item,
classNames: classNames,
index: index,
focusableElementIndex: focusableElementIndex,
totalItemCount: totalItemCount,
hasCheckmarks: hasCheckmarks,
hasIcons: hasIcons,
contextualMenuItemAs: contextualMenuItemAs,
onItemMouseEnter: onItemMouseEnterBase,
onItemMouseLeave: onMouseItemLeave,
onItemMouseMove: onItemMouseMoveBase,
onItemMouseDown: onItemMouseDown,
executeItemClick: executeItemClick,
onItemKeyDown: onItemKeyDown,
expandedMenuItemKey: expandedMenuItemKey,
openSubMenu: openSubMenu,
dismissSubMenu: onSubMenuDismiss,
dismissMenu: dismiss,
};
if (item.href) {
var ContextualMenuAnchorAs = _ContextualMenuItemWrapper_index__rspack_import_26.ContextualMenuAnchor;
if (item.contextualMenuItemWrapperAs) {
ContextualMenuAnchorAs = (0,_Utilities__rspack_import_27.composeComponentAs)(item.contextualMenuItemWrapperAs, ContextualMenuAnchorAs);
}
return react__rspack_import_0.createElement(ContextualMenuAnchorAs, (0,tslib__rspack_import_4.__assign)({}, commonProps, { onItemClick: onAnchorClick }));
}
if (item.split && (0,_utilities_contextualMenu_index__rspack_import_19.hasSubmenu)(item)) {
var ContextualMenuSplitButtonAs = _ContextualMenuItemWrapper_index__rspack_import_28.ContextualMenuSplitButton;
if (item.contextualMenuItemWrapperAs) {
ContextualMenuSplitButtonAs = (0,_Utilities__rspack_import_27.composeComponentAs)(item.contextualMenuItemWrapperAs, ContextualMenuSplitButtonAs);
}
return (react__rspack_import_0.createElement(ContextualMenuSplitButtonAs, (0,tslib__rspack_import_4.__assign)({}, commonProps, { onItemClick: onItemClick, onItemClickBase: onItemClickBase, onTap: cancelSubMenuTimer })));
}
var ContextualMenuButtonAs = _ContextualMenuItemWrapper_index__rspack_import_29.ContextualMenuButton;
if (item.contextualMenuItemWrapperAs) {
ContextualMenuButtonAs = (0,_Utilities__rspack_import_27.composeComponentAs)(item.contextualMenuItemWrapperAs, ContextualMenuButtonAs);
}
return react__rspack_import_0.createElement(ContextualMenuButtonAs, (0,tslib__rspack_import_4.__assign)({}, commonProps, { onItemClick: onItemClick, onItemClickBase: onItemClickBase }));
};
var renderHeaderMenuItem = function (item,
// eslint-disable-next-line @typescript-eslint/no-deprecated
itemClassNames,
// eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames, index, hasCheckmarks, hasIcons) {
var ChildrenRenderer = _ContextualMenuItem__rspack_import_30.ContextualMenuItem;
if (item.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_27.composeComponentAs)(item.contextualMenuItemAs, ChildrenRenderer);
}
if (props.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_27.composeComponentAs)(props.contextualMenuItemAs, ChildrenRenderer);
}
var itemProps = item.itemProps, id = item.id;
var divHtmlProperties = itemProps && (0,_Utilities__rspack_import_31.getNativeProps)(itemProps, _Utilities__rspack_import_31.divProperties);
return (
// eslint-disable-next-line @typescript-eslint/no-deprecated
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_4.__assign)({ id: id, className: menuClassNames.header }, divHtmlProperties, { style: item.style }),
react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_4.__assign)({ item: item, classNames: itemClassNames, index: index, onCheckmarkClick: hasCheckmarks ? onItemClick : undefined, hasIcons: hasIcons }, itemProps))));
};
//#endregion
//#region Main render
var isBeakVisible = props.isBeakVisible;
var items = props.items, labelElementId = props.labelElementId, id = props.id, className = props.className, beakWidth = props.beakWidth, directionalHint = props.directionalHint, directionalHintForRTL = props.directionalHintForRTL, alignTargetEdge = props.alignTargetEdge, gapSpace = props.gapSpace, coverTarget = props.coverTarget, ariaLabel = props.ariaLabel, doNotLayer = props.doNotLayer, target = props.target, bounds = props.bounds, useTargetWidth = props.useTargetWidth, useTargetAsMinWidth = props.useTargetAsMinWidth, directionalHintFixed = props.directionalHintFixed, shouldFocusOnMount = props.shouldFocusOnMount, shouldFocusOnContainer = props.shouldFocusOnContainer, title = props.title, styles = props.styles, theme = props.theme, calloutProps = props.calloutProps, _k = props.onRenderSubMenu, onRenderSubMenu = _k === void 0 ? onDefaultRenderSubMenu : _k, _l = props.onRenderMenuList, onRenderMenuList = _l === void 0 ? function (menuListProps, defaultRender) { return onDefaultRenderMenuList(menuListProps, classNames, defaultRender); } : _l, focusZoneProps = props.focusZoneProps,
// eslint-disable-next-line @typescript-eslint/no-deprecated
getMenuClassNames = props.getMenuClassNames;
var classNames = getMenuClassNames
? getMenuClassNames(theme, className)
: getClassNames(styles, {
theme: theme,
className: className,
});
var hasIcons = itemsHaveIcons(items);
function itemsHaveIcons(contextualMenuItems) {
for (var _i = 0, contextualMenuItems_1 = contextualMenuItems; _i < contextualMenuItems_1.length; _i++) {
var item = contextualMenuItems_1[_i];
if (item.iconProps) {
return true;
}
if (item.itemType === _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Section &&
item.sectionProps &&
itemsHaveIcons(item.sectionProps.items)) {
return true;
}
}
return false;
}
var adjustedFocusZoneProps = (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({ direction: _FocusZone__rspack_import_14.FocusZoneDirection.vertical, handleTabKey: _FocusZone__rspack_import_14.FocusZoneTabbableElements.all, isCircularNavigation: true, 'data-tabster': '{"uncontrolled": {}, "focusable": { "excludeFromMover": true }}' }, focusZoneProps), { className: (0,_Utilities__rspack_import_32.css)(classNames.root, (_a = props.focusZoneProps) === null || _a === void 0 ? void 0 : _a.className) });
var hasCheckmarks = canAnyMenuItemsCheck(items);
var submenuProps = expandedMenuItemKey && props.hidden !== true ? getSubmenuProps() : null;
isBeakVisible = isBeakVisible === undefined ? responsiveMode <= _ResponsiveMode__rspack_import_33.ResponsiveMode.medium : isBeakVisible;
/**
* When useTargetWidth is true, get the width of the target element and apply it for the context menu container
*/
var contextMenuStyle;
var targetAsHtmlElement = targetRef.current;
if ((useTargetWidth || useTargetAsMinWidth) && targetAsHtmlElement && targetAsHtmlElement.offsetWidth) {
var targetBoundingRect = targetAsHtmlElement.getBoundingClientRect();
var targetWidth = targetBoundingRect.width - 2; /* Accounts for 1px border */
if (useTargetWidth) {
contextMenuStyle = {
width: targetWidth,
};
}
else if (useTargetAsMinWidth) {
contextMenuStyle = {
minWidth: targetWidth,
};
}
}
// The menu should only return if items were provided, if no items were provided then it should not appear.
if (items && items.length > 0) {
var totalItemCount_1 = getItemCount(items);
var calloutStyles_1 = classNames.subComponentStyles
? classNames.subComponentStyles.callout
: undefined;
return (react__rspack_import_0.createElement(_utilities_MenuContext_index__rspack_import_34.MenuContext.Consumer, null, function (menuContext) { return (react__rspack_import_0.createElement(_Callout__rspack_import_35.Callout, (0,tslib__rspack_import_4.__assign)({ styles: calloutStyles_1, onRestoreFocus: tryFocusPreviousActiveElement }, calloutProps, { target: target || menuContext.target, isBeakVisible: isBeakVisible, beakWidth: beakWidth, directionalHint: directionalHint, directionalHintForRTL: directionalHintForRTL, gapSpace: gapSpace, coverTarget: coverTarget, doNotLayer: doNotLayer, className: (0,_Utilities__rspack_import_32.css)('ms-ContextualMenu-Callout', calloutProps && calloutProps.className), setInitialFocus: shouldFocusOnMount, onDismiss: props.onDismiss || menuContext.onDismiss, onScroll: onScroll, bounds: bounds, directionalHintFixed: directionalHintFixed, alignTargetEdge: alignTargetEdge, hidden: props.hidden || menuContext.hidden, ref: forwardedRef }),
react__rspack_import_0.createElement("div", { style: contextMenuStyle, ref: hostElement, id: id, className: classNames.container, tabIndex: shouldFocusOnContainer ? 0 : -1, onKeyDown: onMenuKeyDown, onKeyUp: onKeyUp, onFocusCapture: onMenuFocusCapture, "aria-label": ariaLabel, "aria-labelledby": labelElementId, role: 'menu' },
title && react__rspack_import_0.createElement("div", { className: classNames.title },
" ",
title,
" "),
items && items.length
? renderFocusZone(onRenderMenuList({
ariaLabel: ariaLabel,
items: items,
totalItemCount: totalItemCount_1,
hasCheckmarks: hasCheckmarks,
hasIcons: hasIcons,
defaultMenuItemRenderer: function (item) {
return defaultMenuItemRenderer(item, classNames);
},
labelElementId: labelElementId,
}, function (menuListProps, defaultRender) { return onDefaultRenderMenuList(menuListProps, classNames, defaultRender); }), adjustedFocusZoneProps)
: null,
submenuProps && onRenderSubMenu(submenuProps, onDefaultRenderSubMenu)),
react__rspack_import_0.createElement(_Utilities__rspack_import_36.FocusRects, null))); }));
}
else {
return null;
}
//#endregion
}), function (prevProps, newProps) {
if (!newProps.shouldUpdateWhenHidden && prevProps.hidden && newProps.hidden) {
// Do not update when hidden.
return true;
}
return (0,_Utilities__rspack_import_11.shallowCompare)(prevProps, newProps);
});
ContextualMenuBase.displayName = 'ContextualMenuBase';
/**
* Returns true if the key for the event is alt (Mac option) or meta (Mac command).
*/
function isAltOrMeta(ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === _Utilities__rspack_import_15.KeyCodes.alt || ev.key === 'Meta';
}
function onItemMouseDown(item, ev) {
var _a;
(_a = item.onMouseDown) === null || _a === void 0 ? void 0 : _a.call(item, item, ev);
}
function onDefaultRenderSubMenu(subMenuProps, defaultRender) {
throw Error('ContextualMenuBase: onRenderSubMenu callback is null or undefined. ' +
'Please ensure to set `onRenderSubMenu` property either manually or with `styled` helper.');
}
/**
* Returns the item that matches a given key if any.
* @param key - The key of the item to match
* @param items - The items to look for the key
*/
function findItemByKeyFromItems(key, items) {
for (var _i = 0, items_3 = items; _i < items_3.length; _i++) {
var item = items_3[_i];
if (item.itemType === _ContextualMenu_types__rspack_import_3.ContextualMenuItemType.Section && item.sectionProps) {
var match = findItemByKeyFromItems(key, item.sectionProps.items);
if (match) {
return match;
}
}
else if (item.key && item.key === key) {
return item;
}
}
}
function getOnClickWithOverrideTarget(onClick, target) {
return onClick
? function (ev, item) {
overrideTarget(ev, target);
return onClick(ev, item);
}
: onClick;
}
function overrideTarget(ev, target) {
if (ev && target) {
ev.persist();
if (target instanceof Event) {
ev.target = target.target;
}
else if (target instanceof Element) {
ev.target = target;
}
}
}
//# sourceMappingURL=ContextualMenu.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.classNames.js":
/*!*************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.classNames.js ***!
\*************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getItemClassNames: () => (getItemClassNames),
getItemStyles: () => (getItemStyles),
getSplitButtonVerticalDividerClassNames: () => (getSplitButtonVerticalDividerClassNames)
});
/* import */ var _Divider_VerticalDivider_classNames__rspack_import_2 = __webpack_require__(/*! ../Divider/VerticalDivider.classNames */ "./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.classNames.js");
/* import */ var _ContextualMenu_cnstyles__rspack_import_3 = __webpack_require__(/*! ./ContextualMenu.cnstyles */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.cnstyles.js");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
var CONTEXTUAL_SPLIT_MENU_MINWIDTH = '28px';
var MediumScreenSelector = (0,_Styling__rspack_import_0.getScreenSelector)(0, _Styling__rspack_import_0.ScreenWidthMaxMedium);
var getSplitButtonVerticalDividerClassNames = (0,_Utilities__rspack_import_1.memoizeFunction)(
/* eslint-disable @typescript-eslint/no-deprecated */
function (theme) {
var _a;
return (0,_Styling__rspack_import_0.mergeStyleSets)((0,_Divider_VerticalDivider_classNames__rspack_import_2.getDividerClassNames)(theme), {
/* eslint-enable @typescript-eslint/no-deprecated */
wrapper: {
position: 'absolute',
right: 28, // width of the splitMenu based on the padding plus icon fontSize
selectors: (_a = {},
_a[MediumScreenSelector] = {
right: 32, // fontSize of the icon increased from 12px to 16px
},
_a),
},
divider: {
height: 16,
width: 1,
},
});
});
var GlobalClassNames = {
item: 'ms-ContextualMenu-item',
divider: 'ms-ContextualMenu-divider',
root: 'ms-ContextualMenu-link',
isChecked: 'is-checked',
isExpanded: 'is-expanded',
isDisabled: 'is-disabled',
linkContent: 'ms-ContextualMenu-linkContent',
linkContentMenu: 'ms-ContextualMenu-linkContent',
icon: 'ms-ContextualMenu-icon',
iconColor: 'ms-ContextualMenu-iconColor',
checkmarkIcon: 'ms-ContextualMenu-checkmarkIcon',
subMenuIcon: 'ms-ContextualMenu-submenuIcon',
label: 'ms-ContextualMenu-itemText',
secondaryText: 'ms-ContextualMenu-secondaryText',
splitMenu: 'ms-ContextualMenu-splitMenu',
screenReaderText: 'ms-ContextualMenu-screenReaderText',
};
/**
* @deprecated Will be removed in \>= 7.0.
* This is a package-internal method that has been depended on.
* It is being kept in this form for backwards compatibility.
* @internal
*/
// TODO: Audit perf. impact of and potentially remove memoizeFunction.
// https://github.com/microsoft/fluentui/issues/5534
var getItemClassNames = (0,_Utilities__rspack_import_1.memoizeFunction)(function (theme, disabled, expanded, checked, isAnchorLink, knownIcon, itemClassName, dividerClassName, iconClassName, subMenuClassName, primaryDisabled, className) {
var _a, _b, _c, _d;
var styles = (0,_ContextualMenu_cnstyles__rspack_import_3.getMenuItemStyles)(theme);
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return (0,_Styling__rspack_import_0.mergeStyleSets)({
item: [classNames.item, styles.item, itemClassName],
divider: [classNames.divider, styles.divider, dividerClassName],
root: [
classNames.root,
styles.root,
checked && [classNames.isChecked, styles.rootChecked],
isAnchorLink && styles.anchorLink,
expanded && [classNames.isExpanded, styles.rootExpanded],
disabled && [classNames.isDisabled, styles.rootDisabled],
!disabled &&
!expanded && [
{
selectors: (_a = {
':hover': styles.rootHovered,
':active': styles.rootPressed
},
// eslint-disable-next-line @fluentui/max-len
_a[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus, .").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus:hover")] = styles.rootFocused,
_a[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:hover")] = {
background: 'inherit;',
},
_a),
},
],
className,
],
splitPrimary: [
styles.root,
{
width: "calc(100% - ".concat(CONTEXTUAL_SPLIT_MENU_MINWIDTH, ")"),
},
checked && ['is-checked', styles.rootChecked],
(disabled || primaryDisabled) && ['is-disabled', styles.rootDisabled],
!(disabled || primaryDisabled) &&
!checked && [
{
selectors: (_b = {
':hover': styles.rootHovered
},
// when hovering over the splitPrimary also affect the splitMenu
_b[":hover ~ .".concat(classNames.splitMenu)] = styles.rootHovered,
_b[':active'] = styles.rootPressed,
// eslint-disable-next-line @fluentui/max-len
_b[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus, .").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus:hover")] = styles.rootFocused,
_b[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:hover")] = {
background: 'inherit;',
},
_b),
},
],
],
splitMenu: [
classNames.splitMenu,
styles.root,
{
flexBasis: '0',
padding: '0 8px',
minWidth: CONTEXTUAL_SPLIT_MENU_MINWIDTH,
},
expanded && ['is-expanded', styles.rootExpanded],
disabled && ['is-disabled', styles.rootDisabled],
!disabled &&
!expanded && [
{
selectors: (_c = {
':hover': styles.rootHovered,
':active': styles.rootPressed
},
// eslint-disable-next-line @fluentui/max-len
_c[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus, .").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus:hover")] = styles.rootFocused,
_c[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:hover")] = {
background: 'inherit;',
},
_c),
},
],
],
anchorLink: styles.anchorLink,
linkContent: [classNames.linkContent, styles.linkContent],
linkContentMenu: [
classNames.linkContentMenu,
styles.linkContent,
{
justifyContent: 'center',
},
],
icon: [
classNames.icon,
knownIcon && styles.iconColor,
styles.icon,
iconClassName,
disabled && [classNames.isDisabled, styles.iconDisabled],
],
iconColor: styles.iconColor,
checkmarkIcon: [classNames.checkmarkIcon, knownIcon && styles.checkmarkIcon, styles.icon, iconClassName],
subMenuIcon: [
classNames.subMenuIcon,
styles.subMenuIcon,
subMenuClassName,
expanded && { color: theme.palette.neutralPrimary },
disabled && [styles.iconDisabled],
],
label: [classNames.label, styles.label],
secondaryText: [classNames.secondaryText, styles.secondaryText],
splitContainer: [
styles.splitButtonFlexContainer,
!disabled &&
!checked && [
{
selectors: (_d = {},
// eslint-disable-next-line @fluentui/max-len
_d[".".concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus, .").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, " &:focus:hover, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus, :host(.").concat(_Utilities__rspack_import_4.IsFocusVisibleClassName, ") &:focus:hover")] = styles.rootFocused,
_d),
},
],
],
screenReaderText: [
classNames.screenReaderText,
styles.screenReaderText,
_Styling__rspack_import_0.hiddenContentStyle,
{ visibility: 'hidden' },
],
});
});
/**
* Wrapper function for generating ContextualMenuItem classNames which adheres to
* the getStyles API, but invokes memoized className generator function with
* primitive values.
*
* @param props - the ContextualMenuItem style props used to generate its styles.
*/
var getItemStyles = function (props) {
var theme = props.theme, disabled = props.disabled, expanded = props.expanded, checked = props.checked, isAnchorLink = props.isAnchorLink, knownIcon = props.knownIcon, itemClassName = props.itemClassName, dividerClassName = props.dividerClassName, iconClassName = props.iconClassName, subMenuClassName = props.subMenuClassName, primaryDisabled = props.primaryDisabled, className = props.className;
// eslint-disable-next-line @typescript-eslint/no-deprecated
return getItemClassNames(theme, disabled, expanded, checked, isAnchorLink, knownIcon, itemClassName, dividerClassName, iconClassName, subMenuClassName, primaryDisabled, className);
};
//# sourceMappingURL=ContextualMenu.classNames.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.cnstyles.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.cnstyles.js ***!
\***********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CONTEXTUAL_MENU_ITEM_HEIGHT: () => (CONTEXTUAL_MENU_ITEM_HEIGHT),
getMenuItemStyles: () => (getMenuItemStyles)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
var CONTEXTUAL_MENU_ITEM_HEIGHT = 36;
var MediumScreenSelector = (0,_Styling__rspack_import_0.getScreenSelector)(0, _Styling__rspack_import_0.ScreenWidthMaxMedium);
var getMenuItemStyles = (0,_Utilities__rspack_import_1.memoizeFunction)(function (theme) {
var _a, _b, _c, _d, _e;
var semanticColors = theme.semanticColors, fonts = theme.fonts, palette = theme.palette;
var ContextualMenuItemBackgroundHoverColor = semanticColors.menuItemBackgroundHovered;
var ContextualMenuItemTextHoverColor = semanticColors.menuItemTextHovered;
var ContextualMenuItemBackgroundSelectedColor = semanticColors.menuItemBackgroundPressed;
var ContextualMenuItemDividerColor = semanticColors.bodyDivider;
var menuItemStyles = {
item: [
fonts.medium,
{
color: semanticColors.bodyText,
position: 'relative',
boxSizing: 'border-box',
},
],
divider: {
display: 'block',
height: '1px',
backgroundColor: ContextualMenuItemDividerColor,
position: 'relative',
},
root: [
(0,_Styling__rspack_import_0.getFocusStyle)(theme),
fonts.medium,
{
color: semanticColors.bodyText,
backgroundColor: 'transparent',
border: 'none',
width: '100%',
height: CONTEXTUAL_MENU_ITEM_HEIGHT,
lineHeight: CONTEXTUAL_MENU_ITEM_HEIGHT,
display: 'block',
cursor: 'pointer',
padding: '0px 8px 0 4px', // inner elements have a margin of 4px (4 + 4 = 8px as on right side)
textAlign: 'left',
},
],
rootDisabled: {
color: semanticColors.disabledBodyText,
cursor: 'default',
pointerEvents: 'none',
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
// ensure disabled text looks different than enabled
color: 'GrayText',
opacity: 1,
},
_a),
},
rootHovered: {
backgroundColor: ContextualMenuItemBackgroundHoverColor,
color: ContextualMenuItemTextHoverColor,
selectors: {
'.ms-ContextualMenu-icon': {
color: palette.themeDarkAlt,
},
'.ms-ContextualMenu-submenuIcon': {
color: palette.neutralPrimary,
},
},
},
rootFocused: {
backgroundColor: palette.white,
},
rootChecked: {
selectors: {
'.ms-ContextualMenu-checkmarkIcon': {
color: palette.neutralPrimary,
},
},
},
rootPressed: {
backgroundColor: ContextualMenuItemBackgroundSelectedColor,
selectors: {
'.ms-ContextualMenu-icon': {
color: palette.themeDark,
},
'.ms-ContextualMenu-submenuIcon': {
color: palette.neutralPrimary,
},
},
},
rootExpanded: {
backgroundColor: ContextualMenuItemBackgroundSelectedColor,
color: semanticColors.bodyTextChecked,
selectors: (_b = {
'.ms-ContextualMenu-submenuIcon': (_c = {},
_c[_Styling__rspack_import_0.HighContrastSelector] = {
// icons inside of anchor tags are not properly inheriting color in high contrast
color: 'inherit',
},
_c)
},
_b[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_2.__assign)({}, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_b),
},
linkContent: {
whiteSpace: 'nowrap',
height: 'inherit',
display: 'flex',
alignItems: 'center',
maxWidth: '100%',
},
anchorLink: {
padding: '0px 8px 0 4px', // inner elements have a margin of 4px (4 + 4 = 8px as on right side)
textRendering: 'auto',
color: 'inherit',
letterSpacing: 'normal',
wordSpacing: 'normal',
textTransform: 'none',
textIndent: '0px',
textShadow: 'none',
textDecoration: 'none',
boxSizing: 'border-box',
},
label: {
margin: '0 4px',
verticalAlign: 'middle',
display: 'inline-block',
flexGrow: '1',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
overflow: 'hidden',
},
secondaryText: {
color: theme.palette.neutralSecondary,
paddingLeft: '20px',
textAlign: 'right',
},
icon: {
display: 'inline-block',
minHeight: '1px',
maxHeight: CONTEXTUAL_MENU_ITEM_HEIGHT,
fontSize: _Styling__rspack_import_0.IconFontSizes.medium,
width: _Styling__rspack_import_0.IconFontSizes.medium,
margin: '0 4px',
verticalAlign: 'middle',
flexShrink: '0',
selectors: (_d = {},
_d[MediumScreenSelector] = {
fontSize: _Styling__rspack_import_0.IconFontSizes.large,
width: _Styling__rspack_import_0.IconFontSizes.large,
},
_d),
},
iconColor: {
color: semanticColors.menuIcon,
},
iconDisabled: {
color: semanticColors.disabledBodyText,
},
checkmarkIcon: {
color: semanticColors.bodySubtext,
},
subMenuIcon: {
height: CONTEXTUAL_MENU_ITEM_HEIGHT,
lineHeight: CONTEXTUAL_MENU_ITEM_HEIGHT,
color: palette.neutralSecondary,
textAlign: 'center',
display: 'inline-block',
verticalAlign: 'middle',
flexShrink: '0',
fontSize: _Styling__rspack_import_0.IconFontSizes.small, // 12px
selectors: (_e = {
':hover': {
color: palette.neutralPrimary,
},
':active': {
color: palette.neutralPrimary,
}
},
_e[MediumScreenSelector] = {
fontSize: _Styling__rspack_import_0.IconFontSizes.medium, // 16px
},
_e),
},
splitButtonFlexContainer: [
(0,_Styling__rspack_import_0.getFocusStyle)(theme),
{
display: 'flex',
height: CONTEXTUAL_MENU_ITEM_HEIGHT,
flexWrap: 'nowrap',
justifyContent: 'center',
alignItems: 'flex-start',
},
],
};
return (0,_Styling__rspack_import_0.concatStyleSets)(menuItemStyles);
});
//# sourceMappingURL=ContextualMenu.cnstyles.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.js ***!
\**************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenu: () => (ContextualMenu)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/renderFunction/composeRenderFunction.js");
/* import */ var _ContextualMenu_base__rspack_import_3 = __webpack_require__(/*! ./ContextualMenu.base */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.base.js");
/* import */ var _ContextualMenu_styles__rspack_import_4 = __webpack_require__(/*! ./ContextualMenu.styles */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.styles.js");
function onRenderSubMenu(subMenuProps) {
return react__rspack_import_0.createElement(LocalContextualMenu, (0,tslib__rspack_import_1.__assign)({}, subMenuProps));
}
// This is to prevent cyclic import with ContextualMenu.base.tsx.
var LocalContextualMenu = (0,_Utilities__rspack_import_2.styled)(_ContextualMenu_base__rspack_import_3.ContextualMenuBase, _ContextualMenu_styles__rspack_import_4.getStyles, function (props) { return ({
onRenderSubMenu: props.onRenderSubMenu
? (0,_Utilities__rspack_import_5.composeRenderFunction)(props.onRenderSubMenu, onRenderSubMenu)
: onRenderSubMenu,
}); }, { scope: 'ContextualMenu' });
/**
* ContextualMenu description
*/
var ContextualMenu = LocalContextualMenu;
ContextualMenu.displayName = 'ContextualMenu';
//# sourceMappingURL=ContextualMenu.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.styles.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.styles.js ***!
\*********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _ContextualMenu_cnstyles__rspack_import_1 = __webpack_require__(/*! ./ContextualMenu.cnstyles */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.cnstyles.js");
var GlobalClassNames = {
root: 'ms-ContextualMenu',
container: 'ms-ContextualMenu-container',
list: 'ms-ContextualMenu-list',
header: 'ms-ContextualMenu-header',
title: 'ms-ContextualMenu-title',
isopen: 'is-open',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
var fonts = theme.fonts, semanticColors = theme.semanticColors, effects = theme.effects;
return {
root: [
theme.fonts.medium,
classNames.root,
classNames.isopen,
{
backgroundColor: semanticColors.menuBackground,
minWidth: '180px',
},
className,
],
container: [
classNames.container,
{
selectors: {
':focus': { outline: 0 },
},
},
],
list: [
classNames.list,
classNames.isopen,
{
listStyleType: 'none',
margin: '0',
padding: '0',
},
],
header: [
classNames.header,
fonts.small,
{
fontWeight: _Styling__rspack_import_0.FontWeights.semibold,
color: semanticColors.menuHeader,
background: 'none',
backgroundColor: 'transparent',
border: 'none',
height: _ContextualMenu_cnstyles__rspack_import_1.CONTEXTUAL_MENU_ITEM_HEIGHT,
lineHeight: _ContextualMenu_cnstyles__rspack_import_1.CONTEXTUAL_MENU_ITEM_HEIGHT,
cursor: 'default',
padding: '0px 6px',
userSelect: 'none',
textAlign: 'left',
},
],
title: [
classNames.title,
{
fontSize: fonts.mediumPlus.fontSize,
paddingRight: '14px',
paddingLeft: '14px',
paddingBottom: '5px',
paddingTop: '5px',
backgroundColor: semanticColors.menuItemBackgroundPressed,
},
],
subComponentStyles: {
callout: {
root: {
boxShadow: effects.elevation8,
},
},
menuItem: {},
},
};
};
//# sourceMappingURL=ContextualMenu.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.js":
/*!********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.js ***!
\********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuItemType: () => (ContextualMenuItemType),
DirectionalHint: () => (/* reexport safe */ _common_DirectionalHint__rspack_import_0.DirectionalHint)
});
/* import */ var _common_DirectionalHint__rspack_import_0 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/**
* {@docCategory ContextualMenu}
*/
var ContextualMenuItemType;
(function (ContextualMenuItemType) {
ContextualMenuItemType[ContextualMenuItemType["Normal"] = 0] = "Normal";
ContextualMenuItemType[ContextualMenuItemType["Divider"] = 1] = "Divider";
ContextualMenuItemType[ContextualMenuItemType["Header"] = 2] = "Header";
ContextualMenuItemType[ContextualMenuItemType["Section"] = 3] = "Section";
})(ContextualMenuItemType || (ContextualMenuItemType = {}));
//# sourceMappingURL=ContextualMenu.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.base.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.base.js ***!
\***********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuItemBase: () => (ContextualMenuItemBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _utilities_contextualMenu_index__rspack_import_3 = __webpack_require__(/*! ../../utilities/contextualMenu/index */ "./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Icon__rspack_import_1 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
var defaultIconRenderer = function (props) {
var item = props.item, classNames = props.classNames;
var iconProps = item.iconProps;
return react__rspack_import_0.createElement(_Icon__rspack_import_1.Icon, (0,tslib__rspack_import_2.__assign)({}, iconProps, { className: classNames.icon }));
};
var renderItemIcon = function (props) {
var item = props.item, hasIcons = props.hasIcons;
if (!hasIcons) {
return null;
}
if (item.onRenderIcon) {
return item.onRenderIcon(props, defaultIconRenderer);
}
return defaultIconRenderer(props);
};
var renderCheckMarkIcon = function (_a) {
var onCheckmarkClick = _a.onCheckmarkClick, item = _a.item, classNames = _a.classNames;
var isItemChecked = (0,_utilities_contextualMenu_index__rspack_import_3.getIsChecked)(item);
if (onCheckmarkClick) {
// Ensures that the item is passed as the first argument to the checkmark click callback.
var onClick = function (e) { return onCheckmarkClick(item, e); };
return (react__rspack_import_0.createElement(_Icon__rspack_import_1.Icon, { iconName: item.canCheck !== false && isItemChecked ? 'CheckMark' : '', className: classNames.checkmarkIcon,
// eslint-disable-next-line react/jsx-no-bind
onClick: onClick }));
}
return null;
};
var renderItemName = function (_a) {
var item = _a.item, classNames = _a.classNames;
/* eslint-disable @typescript-eslint/no-deprecated */
if (item.text || item.name) {
return react__rspack_import_0.createElement("span", { className: classNames.label }, item.text || item.name);
}
/* eslint-enable @typescript-eslint/no-deprecated */
return null;
};
var renderSecondaryText = function (_a) {
var item = _a.item, classNames = _a.classNames;
if (item.secondaryText) {
return react__rspack_import_0.createElement("span", { className: classNames.secondaryText }, item.secondaryText);
}
return null;
};
var renderSubMenuIcon = function (_a) {
var item = _a.item, classNames = _a.classNames, theme = _a.theme;
if ((0,_utilities_contextualMenu_index__rspack_import_3.hasSubmenu)(item)) {
return (react__rspack_import_0.createElement(_Icon__rspack_import_1.Icon, (0,tslib__rspack_import_2.__assign)({ iconName: (0,_Utilities__rspack_import_4.getRTL)(theme) ? 'ChevronLeft' : 'ChevronRight' }, item.submenuIconProps, { className: classNames.subMenuIcon })));
}
return null;
};
var ContextualMenuItemBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(ContextualMenuItemBase, _super);
function ContextualMenuItemBase(props) {
var _this = _super.call(this, props) || this;
_this.openSubMenu = function () {
var _a = _this.props, item = _a.item, openSubMenu = _a.openSubMenu, getSubmenuTarget = _a.getSubmenuTarget;
if (getSubmenuTarget) {
var submenuTarget = getSubmenuTarget();
if ((0,_utilities_contextualMenu_index__rspack_import_3.hasSubmenu)(item) && openSubMenu && submenuTarget) {
openSubMenu(item, submenuTarget);
}
}
};
_this.dismissSubMenu = function () {
var _a = _this.props, item = _a.item, dismissSubMenu = _a.dismissSubMenu;
if ((0,_utilities_contextualMenu_index__rspack_import_3.hasSubmenu)(item) && dismissSubMenu) {
dismissSubMenu();
}
};
_this.dismissMenu = function (dismissAll) {
var dismissMenu = _this.props.dismissMenu;
if (dismissMenu) {
dismissMenu(undefined /* ev */, dismissAll);
}
};
(0,_Utilities__rspack_import_5.initializeComponentRef)(_this);
return _this;
}
ContextualMenuItemBase.prototype.render = function () {
var _a = this.props, item = _a.item, classNames = _a.classNames;
var renderContent = item.onRenderContent || this._renderLayout;
return (react__rspack_import_0.createElement("div", { className: item.split ? classNames.linkContentMenu : classNames.linkContent }, renderContent(this.props, {
renderCheckMarkIcon: renderCheckMarkIcon,
renderItemIcon: renderItemIcon,
renderItemName: renderItemName,
renderSecondaryText: renderSecondaryText,
renderSubMenuIcon: renderSubMenuIcon,
})));
};
ContextualMenuItemBase.prototype._renderLayout = function (props, defaultRenders) {
return (react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null,
defaultRenders.renderCheckMarkIcon(props),
defaultRenders.renderItemIcon(props),
defaultRenders.renderItemName(props),
defaultRenders.renderSecondaryText(props),
defaultRenders.renderSubMenuIcon(props)));
};
return ContextualMenuItemBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=ContextualMenuItem.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js":
/*!******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js ***!
\******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuItem: () => (ContextualMenuItem)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _ContextualMenuItem_base__rspack_import_1 = __webpack_require__(/*! ./ContextualMenuItem.base */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.base.js");
/* import */ var _ContextualMenu_classNames__rspack_import_2 = __webpack_require__(/*! ./ContextualMenu.classNames */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.classNames.js");
/**
* ContextualMenuItem description
*/
var ContextualMenuItem = (0,_Utilities__rspack_import_0.styled)(_ContextualMenuItem_base__rspack_import_1.ContextualMenuItemBase, _ContextualMenu_classNames__rspack_import_2.getItemStyles, undefined, { scope: 'ContextualMenuItem' });
//# sourceMappingURL=ContextualMenuItem.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.js ***!
\**********************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuAnchor: () => (ContextualMenuAnchor)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _ContextualMenuItemWrapper__rspack_import_1 = __webpack_require__(/*! ./ContextualMenuItemWrapper */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.js");
/* import */ var _KeytipData__rspack_import_10 = __webpack_require__(/*! ../../../KeytipData */ "./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js");
/* import */ var _utilities_contextualMenu_index__rspack_import_6 = __webpack_require__(/*! ../../../utilities/contextualMenu/index */ "./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js");
/* import */ var _ContextualMenuItem__rspack_import_4 = __webpack_require__(/*! ../ContextualMenuItem */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js");
var ContextualMenuAnchor = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(ContextualMenuAnchor, _super);
function ContextualMenuAnchor() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._anchor = react__rspack_import_0.createRef();
_this._getMemoizedMenuButtonKeytipProps = (0,_Utilities__rspack_import_3.memoizeFunction)(function (keytipProps) {
return (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, keytipProps), { hasMenu: true });
});
_this._getSubmenuTarget = function () {
return _this._anchor.current ? _this._anchor.current : undefined;
};
_this._onItemClick = function (ev) {
var _a = _this.props, item = _a.item, onItemClick = _a.onItemClick;
if (onItemClick) {
onItemClick(item, ev);
}
};
_this._renderAriaDescription = function (ariaDescription, className) {
// If ariaDescription is given, descriptionId will be assigned to ariaDescriptionSpan
return ariaDescription ? (react__rspack_import_0.createElement("span", { id: _this._ariaDescriptionId, className: className }, ariaDescription)) : null;
};
return _this;
}
ContextualMenuAnchor.prototype.render = function () {
var _this = this;
var _a = this.props, item = _a.item, classNames = _a.classNames, index = _a.index, focusableElementIndex = _a.focusableElementIndex, totalItemCount = _a.totalItemCount, hasCheckmarks = _a.hasCheckmarks, hasIcons = _a.hasIcons, expandedMenuItemKey = _a.expandedMenuItemKey, onItemClick = _a.onItemClick, openSubMenu = _a.openSubMenu, dismissSubMenu = _a.dismissSubMenu, dismissMenu = _a.dismissMenu;
var ChildrenRenderer = _ContextualMenuItem__rspack_import_4.ContextualMenuItem;
if (this.props.item.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_5.composeComponentAs)(this.props.item.contextualMenuItemAs, ChildrenRenderer);
}
if (this.props.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_5.composeComponentAs)(this.props.contextualMenuItemAs, ChildrenRenderer);
}
var anchorRel = item.rel;
if (item.target && item.target.toLowerCase() === '_blank') {
anchorRel = anchorRel ? anchorRel : 'nofollow noopener noreferrer'; // Safe default to prevent tabjacking
}
var itemHasSubmenu = (0,_utilities_contextualMenu_index__rspack_import_6.hasSubmenu)(item);
var nativeProps = (0,_Utilities__rspack_import_7.getNativeProps)(item, _Utilities__rspack_import_7.anchorProperties);
var disabled = (0,_utilities_contextualMenu_index__rspack_import_6.isItemDisabled)(item);
var itemProps = item.itemProps, ariaDescription = item.ariaDescription;
var keytipProps = item.keytipProps;
if (keytipProps && itemHasSubmenu) {
keytipProps = this._getMemoizedMenuButtonKeytipProps(keytipProps);
}
// Check for ariaDescription to set the _ariaDescriptionId and render a hidden span with
// the description in it to be added to ariaDescribedBy
if (ariaDescription) {
this._ariaDescriptionId = (0,_Utilities__rspack_import_8.getId)();
}
var ariaDescribedByIds = (0,_Utilities__rspack_import_9.mergeAriaAttributeValues)(item.ariaDescribedBy, ariaDescription ? this._ariaDescriptionId : undefined, nativeProps['aria-describedby']);
var additionalItemProperties = {
'aria-describedby': ariaDescribedByIds,
};
return (react__rspack_import_0.createElement("div", null,
react__rspack_import_0.createElement(_KeytipData__rspack_import_10.KeytipData, { keytipProps: item.keytipProps, ariaDescribedBy: ariaDescribedByIds, disabled: disabled }, function (keytipAttributes) { return (react__rspack_import_0.createElement("a", (0,tslib__rspack_import_2.__assign)({}, additionalItemProperties, nativeProps, keytipAttributes, { ref: _this._anchor, href: item.href, target: item.target, rel: anchorRel, className: classNames.root, role: "menuitem", "aria-haspopup": itemHasSubmenu || undefined, "aria-expanded": itemHasSubmenu ? item.key === expandedMenuItemKey : undefined, "aria-posinset": focusableElementIndex + 1, "aria-setsize": totalItemCount, "aria-disabled": (0,_utilities_contextualMenu_index__rspack_import_6.isItemDisabled)(item),
// eslint-disable-next-line @typescript-eslint/no-deprecated
style: item.style, onClick: _this._onItemClick, onMouseEnter: _this._onItemMouseEnter, onMouseLeave: _this._onItemMouseLeave, onMouseMove: _this._onItemMouseMove, onKeyDown: itemHasSubmenu ? _this._onItemKeyDown : undefined }),
react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_2.__assign)({ componentRef: item.componentRef, item: item, classNames: classNames, index: index, onCheckmarkClick: hasCheckmarks && onItemClick ? onItemClick : undefined, hasIcons: hasIcons, openSubMenu: openSubMenu, dismissSubMenu: dismissSubMenu, dismissMenu: dismissMenu, getSubmenuTarget: _this._getSubmenuTarget }, itemProps)),
_this._renderAriaDescription(ariaDescription, classNames.screenReaderText))); })));
};
return ContextualMenuAnchor;
}(_ContextualMenuItemWrapper__rspack_import_1.ContextualMenuItemWrapper));
//# sourceMappingURL=ContextualMenuAnchor.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.js ***!
\**********************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuButton: () => (ContextualMenuButton)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _ContextualMenuItemWrapper__rspack_import_1 = __webpack_require__(/*! ./ContextualMenuItemWrapper */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.js");
/* import */ var _KeytipData__rspack_import_10 = __webpack_require__(/*! ../../../KeytipData */ "./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js");
/* import */ var _utilities_contextualMenu_index__rspack_import_6 = __webpack_require__(/*! ../../../utilities/contextualMenu/index */ "./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js");
/* import */ var _ContextualMenuItem__rspack_import_4 = __webpack_require__(/*! ../ContextualMenuItem */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js");
var ContextualMenuButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(ContextualMenuButton, _super);
function ContextualMenuButton() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._btn = react__rspack_import_0.createRef();
_this._getMemoizedMenuButtonKeytipProps = (0,_Utilities__rspack_import_3.memoizeFunction)(function (keytipProps) {
return (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, keytipProps), { hasMenu: true });
});
_this._renderAriaDescription = function (ariaDescription, className) {
// If ariaDescription is given, descriptionId will be assigned to ariaDescriptionSpan
return ariaDescription ? (react__rspack_import_0.createElement("span", { id: _this._ariaDescriptionId, className: className }, ariaDescription)) : null;
};
_this._getSubmenuTarget = function () {
return _this._btn.current ? _this._btn.current : undefined;
};
return _this;
}
ContextualMenuButton.prototype.render = function () {
var _this = this;
var _a = this.props, item = _a.item, classNames = _a.classNames, index = _a.index, focusableElementIndex = _a.focusableElementIndex, totalItemCount = _a.totalItemCount, hasCheckmarks = _a.hasCheckmarks, hasIcons = _a.hasIcons, contextualMenuItemAs = _a.contextualMenuItemAs, expandedMenuItemKey = _a.expandedMenuItemKey, onItemMouseDown = _a.onItemMouseDown, onItemClick = _a.onItemClick, openSubMenu = _a.openSubMenu, dismissSubMenu = _a.dismissSubMenu, dismissMenu = _a.dismissMenu;
var ChildrenRenderer = _ContextualMenuItem__rspack_import_4.ContextualMenuItem;
if (item.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_5.composeComponentAs)(item.contextualMenuItemAs, ChildrenRenderer);
}
if (contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_5.composeComponentAs)(contextualMenuItemAs, ChildrenRenderer);
}
var isChecked = (0,_utilities_contextualMenu_index__rspack_import_6.getIsChecked)(item);
var canCheck = isChecked !== null;
var defaultRole = (0,_utilities_contextualMenu_index__rspack_import_6.getMenuItemAriaRole)(item);
var itemHasSubmenu = (0,_utilities_contextualMenu_index__rspack_import_6.hasSubmenu)(item);
var itemProps = item.itemProps, ariaLabel = item.ariaLabel, ariaDescription = item.ariaDescription;
var buttonNativeProperties = (0,_Utilities__rspack_import_7.getNativeProps)(item, _Utilities__rspack_import_7.buttonProperties);
// Do not add the disabled attribute to the button so that it is focusable
delete buttonNativeProperties.disabled;
var itemRole = item.role || defaultRole;
// Check for ariaDescription to set the _ariaDescriptionId and render a hidden span with
// the description in it to be added to ariaDescribedBy
if (ariaDescription) {
this._ariaDescriptionId = (0,_Utilities__rspack_import_8.getId)();
}
var ariaDescribedByIds = (0,_Utilities__rspack_import_9.mergeAriaAttributeValues)(item.ariaDescribedBy, ariaDescription ? this._ariaDescriptionId : undefined, buttonNativeProperties['aria-describedby']);
var itemButtonProperties = {
className: classNames.root,
onClick: this._onItemClick,
onKeyDown: itemHasSubmenu ? this._onItemKeyDown : undefined,
onMouseEnter: this._onItemMouseEnter,
onMouseLeave: this._onItemMouseLeave,
onMouseDown: function (ev) {
return onItemMouseDown ? onItemMouseDown(item, ev) : undefined;
},
onMouseMove: this._onItemMouseMove,
href: item.href,
title: item.title,
'aria-label': ariaLabel,
'aria-describedby': ariaDescribedByIds,
'aria-haspopup': itemHasSubmenu || undefined,
'aria-expanded': itemHasSubmenu ? item.key === expandedMenuItemKey : undefined,
'aria-posinset': focusableElementIndex + 1,
'aria-setsize': totalItemCount,
'aria-disabled': (0,_utilities_contextualMenu_index__rspack_import_6.isItemDisabled)(item),
'aria-checked': (itemRole === 'menuitemcheckbox' || itemRole === 'menuitemradio') && canCheck ? !!isChecked : undefined,
'aria-selected': itemRole === 'menuitem' && canCheck ? !!isChecked : undefined,
role: itemRole,
// eslint-disable-next-line @typescript-eslint/no-deprecated
style: item.style,
};
var keytipProps = item.keytipProps;
if (keytipProps && itemHasSubmenu) {
keytipProps = this._getMemoizedMenuButtonKeytipProps(keytipProps);
}
return (react__rspack_import_0.createElement(_KeytipData__rspack_import_10.KeytipData, { keytipProps: keytipProps, ariaDescribedBy: ariaDescribedByIds, disabled: (0,_utilities_contextualMenu_index__rspack_import_6.isItemDisabled)(item) }, function (keytipAttributes) { return (react__rspack_import_0.createElement("button", (0,tslib__rspack_import_2.__assign)({ ref: _this._btn }, buttonNativeProperties, itemButtonProperties, keytipAttributes),
react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_2.__assign)({ componentRef: item.componentRef, item: item, classNames: classNames, index: index, onCheckmarkClick: hasCheckmarks && onItemClick ? onItemClick : undefined, hasIcons: hasIcons, openSubMenu: openSubMenu, dismissSubMenu: dismissSubMenu, dismissMenu: dismissMenu, getSubmenuTarget: _this._getSubmenuTarget }, itemProps)),
_this._renderAriaDescription(ariaDescription, classNames.screenReaderText))); }));
};
return ContextualMenuButton;
}(_ContextualMenuItemWrapper__rspack_import_1.ContextualMenuItemWrapper));
//# sourceMappingURL=ContextualMenuButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.js":
/*!***************************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.js ***!
\***************************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuItemWrapper: () => (ContextualMenuItemWrapper)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/object.js");
var ContextualMenuItemWrapper = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(ContextualMenuItemWrapper, _super);
function ContextualMenuItemWrapper(props) {
var _this = _super.call(this, props) || this;
_this._onItemMouseEnter = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseEnter = _a.onItemMouseEnter;
if (onItemMouseEnter) {
onItemMouseEnter(item, ev, ev.currentTarget);
}
};
_this._onItemClick = function (ev) {
var _a = _this.props, item = _a.item, onItemClickBase = _a.onItemClickBase;
if (onItemClickBase) {
onItemClickBase(item, ev, ev.currentTarget);
}
};
_this._onItemMouseLeave = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseLeave = _a.onItemMouseLeave;
if (onItemMouseLeave) {
onItemMouseLeave(item, ev);
}
};
_this._onItemKeyDown = function (ev) {
var _a = _this.props, item = _a.item, onItemKeyDown = _a.onItemKeyDown;
if (onItemKeyDown) {
onItemKeyDown(item, ev);
}
};
_this._onItemMouseMove = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseMove = _a.onItemMouseMove;
if (onItemMouseMove) {
onItemMouseMove(item, ev, ev.currentTarget);
}
};
_this._getSubmenuTarget = function () {
return undefined;
};
(0,_Utilities__rspack_import_2.initializeComponentRef)(_this);
return _this;
}
ContextualMenuItemWrapper.prototype.shouldComponentUpdate = function (newProps) {
return !(0,_Utilities__rspack_import_3.shallowCompare)(newProps, this.props);
};
return ContextualMenuItemWrapper;
}(react__rspack_import_0.Component));
//# sourceMappingURL=ContextualMenuItemWrapper.js.map
}),
"./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.js":
/*!***************************************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.js ***!
\***************************************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ContextualMenuSplitButton: () => (ContextualMenuSplitButton)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js");
/* import */ var _ContextualMenuItem__rspack_import_11 = __webpack_require__(/*! ../ContextualMenuItem */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItem.js");
/* import */ var _ContextualMenu_classNames__rspack_import_13 = __webpack_require__(/*! ../ContextualMenu.classNames */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.classNames.js");
/* import */ var _KeytipData__rspack_import_9 = __webpack_require__(/*! ../../../KeytipData */ "./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js");
/* import */ var _utilities_contextualMenu_index__rspack_import_8 = __webpack_require__(/*! ../../../utilities/contextualMenu/index */ "./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js");
/* import */ var _Divider__rspack_import_14 = __webpack_require__(/*! ../../../Divider */ "./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.js");
/* import */ var _ContextualMenuItemWrapper__rspack_import_1 = __webpack_require__(/*! ./ContextualMenuItemWrapper */ "./node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.js");
var TouchIdleDelay = 500; /* ms */
var ContextualMenuSplitButton = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(ContextualMenuSplitButton, _super);
function ContextualMenuSplitButton(props) {
var _this = _super.call(this, props) || this;
_this._getMemoizedMenuButtonKeytipProps = (0,_Utilities__rspack_import_3.memoizeFunction)(function (keytipProps) {
return (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, keytipProps), { hasMenu: true });
});
_this._onItemKeyDown = function (ev) {
var _a = _this.props, item = _a.item, onItemKeyDown = _a.onItemKeyDown;
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === _Utilities__rspack_import_4.KeyCodes.enter) {
_this._executeItemClick(ev);
ev.preventDefault();
ev.stopPropagation();
}
else if (onItemKeyDown) {
onItemKeyDown(item, ev);
}
};
_this._getSubmenuTarget = function () {
return _this._splitButton;
};
_this._renderAriaDescription = function (ariaDescription, className) {
// If ariaDescription is given, descriptionId will be assigned to ariaDescriptionSpan
return ariaDescription ? (react__rspack_import_0.createElement("span", { id: _this._ariaDescriptionId, className: className }, ariaDescription)) : null;
};
_this._onItemMouseEnterPrimary = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseEnter = _a.onItemMouseEnter;
if (onItemMouseEnter) {
onItemMouseEnter((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, item), { subMenuProps: undefined, items: undefined }), ev, _this._splitButton);
}
};
_this._onItemMouseEnterIcon = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseEnter = _a.onItemMouseEnter;
if (onItemMouseEnter) {
onItemMouseEnter(item, ev, _this._splitButton);
}
};
_this._onItemMouseMovePrimary = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseMove = _a.onItemMouseMove;
if (onItemMouseMove) {
onItemMouseMove((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, item), { subMenuProps: undefined, items: undefined }), ev, _this._splitButton);
}
};
_this._onItemMouseMoveIcon = function (ev) {
var _a = _this.props, item = _a.item, onItemMouseMove = _a.onItemMouseMove;
if (onItemMouseMove) {
onItemMouseMove(item, ev, _this._splitButton);
}
};
_this._onIconItemClick = function (ev) {
var _a = _this.props, item = _a.item, onItemClickBase = _a.onItemClickBase;
if (onItemClickBase) {
onItemClickBase(item, ev, (_this._splitButton ? _this._splitButton : ev.currentTarget));
}
};
_this._executeItemClick = function (ev) {
var _a = _this.props, item = _a.item, executeItemClick = _a.executeItemClick, onItemClick = _a.onItemClick;
if (item.disabled || item.isDisabled) {
return;
}
if (_this._processingTouch && !item.canCheck && onItemClick) {
return onItemClick(item, ev);
}
if (executeItemClick) {
executeItemClick(item, ev);
}
};
_this._onTouchStart = function (ev) {
if (_this._splitButton && !('onpointerdown' in _this._splitButton)) {
_this._handleTouchAndPointerEvent(ev);
}
};
_this._onPointerDown = function (ev) {
if (ev.pointerType === 'touch') {
_this._handleTouchAndPointerEvent(ev);
ev.preventDefault();
ev.stopImmediatePropagation();
}
};
_this._async = new _Utilities__rspack_import_5.Async(_this);
_this._events = new _Utilities__rspack_import_6.EventGroup(_this);
_this._dismissLabelId = (0,_Utilities__rspack_import_7.getId)();
return _this;
}
ContextualMenuSplitButton.prototype.componentDidMount = function () {
if (this._splitButton && 'onpointerdown' in this._splitButton) {
this._events.on(this._splitButton, 'pointerdown', this._onPointerDown, true);
}
};
ContextualMenuSplitButton.prototype.componentWillUnmount = function () {
this._async.dispose();
this._events.dispose();
};
ContextualMenuSplitButton.prototype.render = function () {
var _this = this;
var _a;
var _b = this.props, item = _b.item, classNames = _b.classNames, index = _b.index, focusableElementIndex = _b.focusableElementIndex, totalItemCount = _b.totalItemCount, hasCheckmarks = _b.hasCheckmarks, hasIcons = _b.hasIcons, onItemMouseLeave = _b.onItemMouseLeave, expandedMenuItemKey = _b.expandedMenuItemKey;
var itemHasSubmenu = (0,_utilities_contextualMenu_index__rspack_import_8.hasSubmenu)(item);
var keytipProps = item.keytipProps;
if (keytipProps) {
keytipProps = this._getMemoizedMenuButtonKeytipProps(keytipProps);
}
// Check for ariaDescription to set the _ariaDescriptionId and render a hidden span with
// the description in it to be added to ariaDescribedBy
var ariaDescription = item.ariaDescription;
if (ariaDescription) {
this._ariaDescriptionId = (0,_Utilities__rspack_import_7.getId)();
}
var ariaChecked = (_a = (0,_utilities_contextualMenu_index__rspack_import_8.getIsChecked)(item)) !== null && _a !== void 0 ? _a : undefined;
return (react__rspack_import_0.createElement(_KeytipData__rspack_import_9.KeytipData, { keytipProps: keytipProps, disabled: (0,_utilities_contextualMenu_index__rspack_import_8.isItemDisabled)(item) }, function (keytipAttributes) { return (react__rspack_import_0.createElement("div", { "data-ktp-target": keytipAttributes['data-ktp-target'], ref: function (splitButton) {
_this._splitButton = splitButton;
}, role: (0,_utilities_contextualMenu_index__rspack_import_8.getMenuItemAriaRole)(item), "aria-label": item.ariaLabel, className: classNames.splitContainer, "aria-disabled": (0,_utilities_contextualMenu_index__rspack_import_8.isItemDisabled)(item), "aria-expanded": itemHasSubmenu ? item.key === expandedMenuItemKey : undefined, "aria-haspopup": true, "aria-describedby": (0,_Utilities__rspack_import_10.mergeAriaAttributeValues)(item.ariaDescribedBy, ariaDescription ? _this._ariaDescriptionId : undefined, keytipAttributes['aria-describedby']), "aria-checked": ariaChecked, "aria-posinset": focusableElementIndex + 1, "aria-setsize": totalItemCount, onMouseEnter: _this._onItemMouseEnterPrimary, onMouseLeave: onItemMouseLeave ? onItemMouseLeave.bind(_this, (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, item), { subMenuProps: null, items: null })) : undefined, onMouseMove: _this._onItemMouseMovePrimary, onKeyDown: _this._onItemKeyDown, onClick: _this._executeItemClick, onTouchStart: _this._onTouchStart, tabIndex: 0, "data-is-focusable": true, "aria-roledescription": item['aria-roledescription'] },
_this._renderSplitPrimaryButton(item, classNames, index, hasCheckmarks, hasIcons),
_this._renderSplitDivider(item),
_this._renderSplitIconButton(item, classNames, index, keytipAttributes),
_this._renderAriaDescription(ariaDescription, classNames.screenReaderText))); }));
};
ContextualMenuSplitButton.prototype._renderSplitPrimaryButton = function (item,
// eslint-disable-next-line @typescript-eslint/no-deprecated
classNames, index, hasCheckmarks, hasIcons) {
var _a = this.props, _b = _a.contextualMenuItemAs, ChildrenRenderer = _b === void 0 ? _ContextualMenuItem__rspack_import_11.ContextualMenuItem : _b, onItemClick = _a.onItemClick;
var itemProps = {
key: item.key,
disabled: (0,_utilities_contextualMenu_index__rspack_import_8.isItemDisabled)(item) || item.primaryDisabled,
/* eslint-disable @typescript-eslint/no-deprecated */
name: item.name,
text: item.text || item.name,
secondaryText: item.secondaryText,
/* eslint-enable @typescript-eslint/no-deprecated */
className: classNames.splitPrimary,
canCheck: item.canCheck,
isChecked: item.isChecked,
checked: item.checked,
iconProps: item.iconProps,
id: this._dismissLabelId,
onRenderIcon: item.onRenderIcon,
data: item.data,
'data-is-focusable': false,
};
var itemComponentProps = item.itemProps;
return (react__rspack_import_0.createElement("button", (0,tslib__rspack_import_2.__assign)({}, (0,_Utilities__rspack_import_12.getNativeProps)(itemProps, _Utilities__rspack_import_12.buttonProperties)),
react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_2.__assign)({ "data-is-focusable": false, item: (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, itemProps), { onClick: item.onClick }), classNames: classNames, index: index, onCheckmarkClick: hasCheckmarks && onItemClick ? onItemClick : undefined, hasIcons: hasIcons }, itemComponentProps))));
};
ContextualMenuSplitButton.prototype._renderSplitDivider = function (item) {
var getDividerClassNames = item.getSplitButtonVerticalDividerClassNames || _ContextualMenu_classNames__rspack_import_13.getSplitButtonVerticalDividerClassNames;
return (react__rspack_import_0.createElement(_Divider__rspack_import_14.VerticalDivider
// eslint-disable-next-line @typescript-eslint/no-deprecated
, {
// eslint-disable-next-line @typescript-eslint/no-deprecated
getClassNames: getDividerClassNames }));
};
ContextualMenuSplitButton.prototype._renderSplitIconButton = function (item, classNames, // eslint-disable-line @typescript-eslint/no-deprecated
index, keytipAttributes) {
var _a = this.props, onItemMouseLeave = _a.onItemMouseLeave, onItemMouseDown = _a.onItemMouseDown, openSubMenu = _a.openSubMenu, dismissSubMenu = _a.dismissSubMenu, dismissMenu = _a.dismissMenu;
var ChildrenRenderer = _ContextualMenuItem__rspack_import_11.ContextualMenuItem;
if (this.props.item.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_15.composeComponentAs)(this.props.item.contextualMenuItemAs, ChildrenRenderer);
}
if (this.props.contextualMenuItemAs) {
ChildrenRenderer = (0,_Utilities__rspack_import_15.composeComponentAs)(this.props.contextualMenuItemAs, ChildrenRenderer);
}
var itemProps = {
onClick: this._onIconItemClick,
disabled: (0,_utilities_contextualMenu_index__rspack_import_8.isItemDisabled)(item),
className: classNames.splitMenu,
subMenuProps: item.subMenuProps,
submenuIconProps: item.submenuIconProps,
split: true,
key: item.key,
'aria-labelledby': this._dismissLabelId,
};
var buttonProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, (0,_Utilities__rspack_import_12.getNativeProps)(itemProps, _Utilities__rspack_import_12.buttonProperties)), {
onMouseEnter: this._onItemMouseEnterIcon,
onMouseLeave: onItemMouseLeave ? onItemMouseLeave.bind(this, item) : undefined,
onMouseDown: function (ev) {
return onItemMouseDown ? onItemMouseDown(item, ev) : undefined;
},
onMouseMove: this._onItemMouseMoveIcon,
'data-is-focusable': false,
'data-ktp-execute-target': keytipAttributes['data-ktp-execute-target'],
'aria-haspopup': true,
});
var itemComponentProps = item.itemProps;
return (react__rspack_import_0.createElement("button", (0,tslib__rspack_import_2.__assign)({}, buttonProps),
react__rspack_import_0.createElement(ChildrenRenderer, (0,tslib__rspack_import_2.__assign)({ componentRef: item.componentRef, item: itemProps, classNames: classNames, index: index, hasIcons: false, openSubMenu: openSubMenu, dismissSubMenu: dismissSubMenu, dismissMenu: dismissMenu, getSubmenuTarget: this._getSubmenuTarget }, itemComponentProps))));
};
ContextualMenuSplitButton.prototype._handleTouchAndPointerEvent = function (ev) {
var _this = this;
var onTap = this.props.onTap;
if (onTap) {
onTap(ev);
}
// If we already have an existing timeout from a previous touch/pointer event
// cancel that timeout so we can set a new one.
if (this._lastTouchTimeoutId) {
this._async.clearTimeout(this._lastTouchTimeoutId);
this._lastTouchTimeoutId = undefined;
}
this._processingTouch = true;
this._lastTouchTimeoutId = this._async.setTimeout(function () {
_this._processingTouch = false;
_this._lastTouchTimeoutId = undefined;
}, TouchIdleDelay);
};
return ContextualMenuSplitButton;
}(_ContextualMenuItemWrapper__rspack_import_1.ContextualMenuItemWrapper));
//# sourceMappingURL=ContextualMenuSplitButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/Dialog.base.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/Dialog.base.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogBase: () => (DialogBase)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _DialogContent_types__rspack_import_2 = __webpack_require__(/*! ./DialogContent.types */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.types.js");
/* import */ var _Modal__rspack_import_6 = __webpack_require__(/*! ../../Modal */ "./node_modules/@fluentui/react/lib/components/Modal/Modal.js");
/* import */ var _ResponsiveMode__rspack_import_8 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
/* import */ var _DialogContent__rspack_import_7 = __webpack_require__(/*! ./DialogContent */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var DefaultModalProps = {
isDarkOverlay: false,
isBlocking: false,
className: '',
containerClassName: '',
topOffsetFixed: false,
enableAriaHiddenSiblings: true,
};
var DefaultDialogContentProps = {
type: _DialogContent_types__rspack_import_2.DialogType.normal,
className: '',
topButtonsProps: [],
};
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_3.__extends)(DialogBase, _super);
function DialogBase(props) {
var _this = _super.call(this, props) || this;
_this._getSubTextId = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, ariaDescribedById = _a.ariaDescribedById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, subText = _a.subText;
var id = (modalProps && modalProps.subtitleAriaId) || ariaDescribedById;
if (!id) {
id = ((dialogContentProps && dialogContentProps.subText) || subText) && _this._defaultSubTextId;
}
return id;
};
_this._getTitleTextId = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, ariaLabelledById = _a.ariaLabelledById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, title = _a.title;
var id = (modalProps && modalProps.titleAriaId) || ariaLabelledById;
if (!id) {
id = ((dialogContentProps && dialogContentProps.title) || title) && _this._defaultTitleTextId;
}
return id;
};
_this._id = (0,_Utilities__rspack_import_4.getId)('Dialog');
_this._defaultTitleTextId = _this._id + '-title';
_this._defaultSubTextId = _this._id + '-subText';
if (true) {
(0,_Utilities__rspack_import_5.warnDeprecations)('Dialog', props, {
isOpen: 'hidden',
type: 'dialogContentProps.type',
subText: 'dialogContentProps.subText',
contentClassName: 'dialogContentProps.className',
topButtonsProps: 'dialogContentProps.topButtonsProps',
className: 'modalProps.className',
isDarkOverlay: 'modalProps.isDarkOverlay',
isBlocking: 'modalProps.isBlocking',
containerClassName: 'modalProps.containerClassName',
onDismissed: 'modalProps.onDismissed',
onLayerDidMount: 'modalProps.layerProps.onLayerDidMount',
ariaDescribedById: 'modalProps.subtitleAriaId',
ariaLabelledById: 'modalProps.titleAriaId',
});
}
return _this;
}
DialogBase.prototype.render = function () {
var _a, _b, _c;
var props = this.props;
var
/* eslint-disable @typescript-eslint/no-deprecated */
className = props.className, containerClassName = props.containerClassName, contentClassName = props.contentClassName, elementToFocusOnDismiss = props.elementToFocusOnDismiss, firstFocusableSelector = props.firstFocusableSelector, forceFocusInsideTrap = props.forceFocusInsideTrap, styles = props.styles, hidden = props.hidden, _d = props.disableRestoreFocus, disableRestoreFocus = _d === void 0 ? props.ignoreExternalFocusing : _d, isBlocking = props.isBlocking, isClickableOutsideFocusTrap = props.isClickableOutsideFocusTrap, isDarkOverlay = props.isDarkOverlay, _e = props.isOpen, isOpen = _e === void 0 ? !hidden : _e, onDismiss = props.onDismiss, onDismissed = props.onDismissed, onLayerDidMount = props.onLayerDidMount, responsiveMode = props.responsiveMode, subText = props.subText, theme = props.theme, title = props.title, topButtonsProps = props.topButtonsProps, type = props.type,
/* eslint-enable @typescript-eslint/no-deprecated */
minWidth = props.minWidth, maxWidth = props.maxWidth, modalProps = props.modalProps;
var mergedLayerProps = (0,tslib__rspack_import_3.__assign)({ onLayerDidMount: onLayerDidMount }, modalProps === null || modalProps === void 0 ? void 0 : modalProps.layerProps);
var dialogDraggableClassName;
var dragOptions;
// If dragOptions are provided, but no drag handle is specified, we supply a drag handle,
// and inform dialog contents to add class to draggable class to the header
if ((modalProps === null || modalProps === void 0 ? void 0 : modalProps.dragOptions) && !((_a = modalProps.dragOptions) === null || _a === void 0 ? void 0 : _a.dragHandleSelector)) {
// spread options to avoid mutating props
dragOptions = (0,tslib__rspack_import_3.__assign)({}, modalProps.dragOptions);
dialogDraggableClassName = 'ms-Dialog-draggable-header';
dragOptions.dragHandleSelector = ".".concat(dialogDraggableClassName);
}
var mergedModalProps = (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, DefaultModalProps), { elementToFocusOnDismiss: elementToFocusOnDismiss, firstFocusableSelector: firstFocusableSelector, forceFocusInsideTrap: forceFocusInsideTrap, disableRestoreFocus: disableRestoreFocus, isClickableOutsideFocusTrap: isClickableOutsideFocusTrap, responsiveMode: responsiveMode, className: className, containerClassName: containerClassName, isBlocking: isBlocking, isDarkOverlay: isDarkOverlay, onDismissed: onDismissed }), modalProps), { dragOptions: dragOptions, layerProps: mergedLayerProps, isOpen: isOpen });
var dialogContentProps = (0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({ className: contentClassName, subText: subText, title: title, topButtonsProps: topButtonsProps, type: type }, DefaultDialogContentProps), props.dialogContentProps), { draggableHeaderClassName: dialogDraggableClassName, titleProps: (0,tslib__rspack_import_3.__assign)({
// eslint-disable-next-line @typescript-eslint/no-deprecated
id: ((_b = props.dialogContentProps) === null || _b === void 0 ? void 0 : _b.titleId) || this._defaultTitleTextId }, (_c = props.dialogContentProps) === null || _c === void 0 ? void 0 : _c.titleProps) });
var classNames = getClassNames(styles, {
theme: theme,
className: mergedModalProps.className,
containerClassName: mergedModalProps.containerClassName,
hidden: hidden,
dialogDefaultMinWidth: minWidth,
dialogDefaultMaxWidth: maxWidth,
});
return (react__rspack_import_0.createElement(_Modal__rspack_import_6.Modal, (0,tslib__rspack_import_3.__assign)({}, mergedModalProps, { className: classNames.root, containerClassName: classNames.main, onDismiss: onDismiss || mergedModalProps.onDismiss, subtitleAriaId: this._getSubTextId(), titleAriaId: this._getTitleTextId() }),
react__rspack_import_0.createElement(_DialogContent__rspack_import_7.DialogContent, (0,tslib__rspack_import_3.__assign)({ subTextId: this._defaultSubTextId, showCloseButton: mergedModalProps.isBlocking, onDismiss: onDismiss }, dialogContentProps), props.children)));
};
DialogBase.defaultProps = {
hidden: true,
};
DialogBase = (0,tslib__rspack_import_3.__decorate)([
_ResponsiveMode__rspack_import_8.withResponsiveMode
], DialogBase);
return DialogBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Dialog.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/Dialog.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/Dialog.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Dialog: () => (Dialog)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Dialog_base__rspack_import_1 = __webpack_require__(/*! ./Dialog.base */ "./node_modules/@fluentui/react/lib/components/Dialog/Dialog.base.js");
/* import */ var _Dialog_styles__rspack_import_2 = __webpack_require__(/*! ./Dialog.styles */ "./node_modules/@fluentui/react/lib/components/Dialog/Dialog.styles.js");
var Dialog = (0,_Utilities__rspack_import_0.styled)(_Dialog_base__rspack_import_1.DialogBase, _Dialog_styles__rspack_import_2.getStyles, undefined, { scope: 'Dialog' });
Dialog.displayName = 'Dialog';
//# sourceMappingURL=Dialog.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/Dialog.styles.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/Dialog.styles.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-Dialog',
};
var getStyles = function (props) {
var _a;
var className = props.className, containerClassName = props.containerClassName, // eslint-disable-line @typescript-eslint/no-deprecated
_b = props.dialogDefaultMinWidth, // eslint-disable-line @typescript-eslint/no-deprecated
dialogDefaultMinWidth = _b === void 0 ? '288px' : _b, _c = props.dialogDefaultMaxWidth, dialogDefaultMaxWidth = _c === void 0 ? '340px' : _c, hidden = props.hidden, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [classNames.root, theme.fonts.medium, className],
main: [
{
width: dialogDefaultMinWidth,
outline: '3px solid transparent',
selectors: (_a = {},
_a["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinMedium, "px)")] = {
width: 'auto',
maxWidth: dialogDefaultMaxWidth,
minWidth: dialogDefaultMinWidth,
},
_a),
},
!hidden && { display: 'flex' },
containerClassName,
],
};
};
//# sourceMappingURL=Dialog.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.base.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.base.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogContentBase: () => (DialogContentBase)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _DialogContent_types__rspack_import_6 = __webpack_require__(/*! ./DialogContent.types */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.types.js");
/* import */ var _Button__rspack_import_8 = __webpack_require__(/*! ../../Button */ "./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.js");
/* import */ var _DialogFooter__rspack_import_2 = __webpack_require__(/*! ./DialogFooter */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.js");
/* import */ var _ResponsiveMode__rspack_import_9 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var DialogFooterType = (react__rspack_import_0.createElement(_DialogFooter__rspack_import_2.DialogFooter, null)).type;
var COMPONENT_NAME = 'DialogContent';
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogContentBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_3.__extends)(DialogContentBase, _super);
function DialogContentBase(props) {
var _this = _super.call(this, props) || this;
(0,_Utilities__rspack_import_4.initializeComponentRef)(_this);
(0,_Utilities__rspack_import_5.warnDeprecations)(COMPONENT_NAME, props, {
titleId: 'titleProps.id',
});
return _this;
}
DialogContentBase.prototype.render = function () {
var _a = this.props, showCloseButton = _a.showCloseButton, className = _a.className, closeButtonAriaLabel = _a.closeButtonAriaLabel, onDismiss = _a.onDismiss, subTextId = _a.subTextId, subText = _a.subText, _b = _a.titleProps, titleProps = _b === void 0 ? {} : _b,
// eslint-disable-next-line @typescript-eslint/no-deprecated
titleId = _a.titleId, title = _a.title, type = _a.type, styles = _a.styles, theme = _a.theme, draggableHeaderClassName = _a.draggableHeaderClassName;
var classNames = getClassNames(styles, {
theme: theme,
className: className,
isLargeHeader: type === _DialogContent_types__rspack_import_6.DialogType.largeHeader,
isClose: type === _DialogContent_types__rspack_import_6.DialogType.close,
draggableHeaderClassName: draggableHeaderClassName,
});
var groupings = this._groupChildren();
var subTextContent;
if (subText) {
subTextContent = (react__rspack_import_0.createElement("p", { className: classNames.subText, id: subTextId }, subText));
}
return (react__rspack_import_0.createElement("div", { className: classNames.content },
react__rspack_import_0.createElement("div", { className: classNames.header },
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_3.__assign)({ id: titleId, role: "heading", "aria-level": 1 }, titleProps, { className: (0,_Utilities__rspack_import_7.css)(classNames.title, titleProps.className) }), title),
react__rspack_import_0.createElement("div", { className: classNames.topButton },
this.props.topButtonsProps.map(function (props, index) { return (react__rspack_import_0.createElement(_Button__rspack_import_8.IconButton, (0,tslib__rspack_import_3.__assign)({ key: props.uniqueId || index }, props))); }),
(type === _DialogContent_types__rspack_import_6.DialogType.close || (showCloseButton && type !== _DialogContent_types__rspack_import_6.DialogType.largeHeader)) && (react__rspack_import_0.createElement(_Button__rspack_import_8.IconButton, { className: classNames.button, iconProps: { iconName: 'Cancel' }, ariaLabel: closeButtonAriaLabel, onClick: onDismiss })))),
react__rspack_import_0.createElement("div", { className: classNames.inner },
react__rspack_import_0.createElement("div", { className: classNames.innerContent },
subTextContent,
groupings.contents),
groupings.footers)));
};
// @TODO - typing the footers as an array of DialogFooter is difficult because
// casing "child as DialogFooter" causes a problem because
// "Neither type 'ReactElement' nor type 'DialogFooter' is assignable to the other."
DialogContentBase.prototype._groupChildren = function () {
var groupings = {
footers: [],
contents: [],
};
react__rspack_import_0.Children.map(this.props.children, function (child) {
if (typeof child === 'object' && child !== null && child.type === DialogFooterType) {
groupings.footers.push(child);
}
else {
groupings.contents.push(child);
}
});
return groupings;
};
DialogContentBase.defaultProps = {
showCloseButton: false,
className: '',
topButtonsProps: [],
closeButtonAriaLabel: 'Close',
};
DialogContentBase = (0,tslib__rspack_import_3.__decorate)([
_ResponsiveMode__rspack_import_9.withResponsiveMode
], DialogContentBase);
return DialogContentBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=DialogContent.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogContent: () => (DialogContent)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _DialogContent_base__rspack_import_1 = __webpack_require__(/*! ./DialogContent.base */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.base.js");
/* import */ var _DialogContent_styles__rspack_import_2 = __webpack_require__(/*! ./DialogContent.styles */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.styles.js");
var DialogContent = (0,_Utilities__rspack_import_0.styled)(_DialogContent_base__rspack_import_1.DialogContentBase, _DialogContent_styles__rspack_import_2.getStyles, undefined, { scope: 'DialogContent' });
DialogContent.displayName = 'DialogContent';
//# sourceMappingURL=DialogContent.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.styles.js":
/*!************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.styles.js ***!
\************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
contentLgHeader: 'ms-Dialog-lgHeader',
close: 'ms-Dialog--close',
subText: 'ms-Dialog-subText',
header: 'ms-Dialog-header',
headerLg: 'ms-Dialog--lgHeader',
button: 'ms-Dialog-button ms-Dialog-button--close',
inner: 'ms-Dialog-inner',
content: 'ms-Dialog-content',
title: 'ms-Dialog-title',
};
var getStyles = function (props) {
var _a, _b, _c;
var className = props.className, theme = props.theme, isLargeHeader = props.isLargeHeader, isClose = props.isClose, hidden = props.hidden, isMultiline = props.isMultiline, draggableHeaderClassName = props.draggableHeaderClassName;
var palette = theme.palette, fonts = theme.fonts, effects = theme.effects, semanticColors = theme.semanticColors;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
content: [
isLargeHeader && [
classNames.contentLgHeader,
{
borderTop: "4px solid ".concat(palette.themePrimary),
},
],
isClose && classNames.close,
{
flexGrow: 1,
overflowY: 'hidden', // required for allowScrollOnElement
},
className,
],
subText: [
classNames.subText,
fonts.medium,
{
margin: '0 0 24px 0',
color: semanticColors.bodySubtext,
lineHeight: '1.5',
wordWrap: 'break-word',
fontWeight: _Styling__rspack_import_0.FontWeights.regular,
},
],
header: [
classNames.header,
{
position: 'relative',
width: '100%',
boxSizing: 'border-box',
},
isClose && classNames.close,
draggableHeaderClassName && [
draggableHeaderClassName,
{
cursor: 'move',
},
],
],
button: [
classNames.button,
hidden && {
selectors: {
'.ms-Icon.ms-Icon--Cancel': {
color: semanticColors.buttonText,
fontSize: _Styling__rspack_import_0.IconFontSizes.medium,
},
},
},
],
inner: [
classNames.inner,
{
padding: '0 24px 24px',
selectors: (_a = {},
_a["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinSmall, "px) and (max-width: ").concat(_Styling__rspack_import_0.ScreenWidthMaxSmall, "px)")] = {
padding: '0 16px 16px',
},
_a),
},
],
innerContent: [
classNames.content,
{
position: 'relative',
width: '100%',
},
],
title: [
classNames.title,
fonts.xLarge,
{
color: semanticColors.bodyText,
margin: '0',
minHeight: fonts.xLarge.fontSize,
padding: '16px 46px 20px 24px',
lineHeight: 'normal',
selectors: (_b = {},
_b["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinSmall, "px) and (max-width: ").concat(_Styling__rspack_import_0.ScreenWidthMaxSmall, "px)")] = {
padding: '16px 46px 16px 16px',
},
_b),
},
isLargeHeader && {
color: semanticColors.menuHeader,
},
isMultiline && { fontSize: fonts.xxLarge.fontSize },
],
topButton: [
{
display: 'flex',
flexDirection: 'row',
flexWrap: 'nowrap',
position: 'absolute',
top: '0',
right: '0',
padding: '15px 15px 0 0',
selectors: (_c = {
'> *': {
flex: '0 0 auto',
},
'.ms-Dialog-button': {
color: semanticColors.buttonText,
},
'.ms-Dialog-button:hover': {
color: semanticColors.buttonTextHovered,
borderRadius: effects.roundedCorner2,
}
},
_c["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinSmall, "px) and (max-width: ").concat(_Styling__rspack_import_0.ScreenWidthMaxSmall, "px)")] = {
padding: '15px 8px 0 0',
},
_c),
},
],
};
};
//# sourceMappingURL=DialogContent.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.types.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogContent.types.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogType: () => (DialogType)
});
/**
* {@docCategory Dialog}
*/
var DialogType;
(function (DialogType) {
/** Standard dialog */
DialogType[DialogType["normal"] = 0] = "normal";
/** Dialog with large header banner */
DialogType[DialogType["largeHeader"] = 1] = "largeHeader";
/** Dialog with an 'x' close button in the upper-right corner */
DialogType[DialogType["close"] = 2] = "close";
})(DialogType || (DialogType = {}));
//# sourceMappingURL=DialogContent.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.base.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.base.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogFooterBase: () => (DialogFooterBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var DialogFooterBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(DialogFooterBase, _super);
function DialogFooterBase(props) {
var _this = _super.call(this, props) || this;
(0,_Utilities__rspack_import_3.initializeComponentRef)(_this);
return _this;
}
DialogFooterBase.prototype.render = function () {
var _a = this.props, className = _a.className, styles = _a.styles, theme = _a.theme;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (react__rspack_import_0.createElement("div", { className: this._classNames.actions },
react__rspack_import_0.createElement("div", { className: this._classNames.actionsRight }, this._renderChildrenAsActions())));
};
DialogFooterBase.prototype._renderChildrenAsActions = function () {
var _this = this;
return react__rspack_import_0.Children.map(this.props.children, function (child) {
return child ? react__rspack_import_0.createElement("span", { className: _this._classNames.action }, child) : null;
});
};
return DialogFooterBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=DialogFooter.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DialogFooter: () => (DialogFooter)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _DialogFooter_base__rspack_import_1 = __webpack_require__(/*! ./DialogFooter.base */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.base.js");
/* import */ var _DialogFooter_styles__rspack_import_2 = __webpack_require__(/*! ./DialogFooter.styles */ "./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.styles.js");
var DialogFooter = (0,_Utilities__rspack_import_0.styled)(_DialogFooter_base__rspack_import_1.DialogFooterBase, _DialogFooter_styles__rspack_import_2.getStyles, undefined, { scope: 'DialogFooter' });
DialogFooter.displayName = 'DialogFooter';
//# sourceMappingURL=DialogFooter.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.styles.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dialog/DialogFooter.styles.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
actions: 'ms-Dialog-actions',
action: 'ms-Dialog-action',
actionsRight: 'ms-Dialog-actionsRight',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
actions: [
classNames.actions,
{
position: 'relative',
width: '100%',
minHeight: '24px',
lineHeight: '24px',
margin: '16px 0 0',
fontSize: '0',
selectors: {
'.ms-Button': {
lineHeight: 'normal',
verticalAlign: 'middle',
},
},
},
className,
],
action: [
classNames.action,
{
margin: '0 4px',
},
],
actionsRight: [
classNames.actionsRight,
{
alignItems: 'center',
display: 'flex',
fontSize: '0',
justifyContent: 'flex-end',
marginRight: '-4px',
},
],
};
};
//# sourceMappingURL=DialogFooter.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.base.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.base.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
VerticalDividerBase: () => (VerticalDividerBase)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var VerticalDividerBase = react__rspack_import_0.forwardRef(function (props, ref) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var styles = props.styles, theme = props.theme, deprecatedGetClassNames = props.getClassNames, className = props.className;
var classNames = getClassNames(styles, { theme: theme, getClassNames: deprecatedGetClassNames, className: className });
return (react__rspack_import_0.createElement("span", { className: classNames.wrapper, ref: ref },
react__rspack_import_0.createElement("span", { className: classNames.divider })));
});
VerticalDividerBase.displayName = 'VerticalDividerBase';
//# sourceMappingURL=VerticalDivider.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.classNames.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.classNames.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getDividerClassNames: () => (getDividerClassNames)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/**
* @deprecated use getStyles exported from VerticalDivider.styles.ts
*/
var getDividerClassNames = (0,_Utilities__rspack_import_0.memoizeFunction)(
// eslint-disable-next-line @typescript-eslint/no-deprecated
function (theme) {
return (0,_Styling__rspack_import_1.mergeStyleSets)({
wrapper: {
display: 'inline-flex',
height: '100%',
alignItems: 'center',
},
divider: {
width: 1,
height: '100%',
backgroundColor: theme.palette.neutralTertiaryAlt,
},
});
});
//# sourceMappingURL=VerticalDivider.classNames.js.map
}),
"./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
VerticalDivider: () => (VerticalDivider)
});
/* import */ var _VerticalDivider_styles__rspack_import_2 = __webpack_require__(/*! ./VerticalDivider.styles */ "./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.styles.js");
/* import */ var _VerticalDivider_base__rspack_import_1 = __webpack_require__(/*! ./VerticalDivider.base */ "./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.base.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
var VerticalDivider = (0,_Utilities__rspack_import_0.styled)(_VerticalDivider_base__rspack_import_1.VerticalDividerBase, _VerticalDivider_styles__rspack_import_2.getStyles, undefined, {
scope: 'VerticalDivider',
});
//# sourceMappingURL=VerticalDivider.js.map
}),
"./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.styles.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Divider/VerticalDivider.styles.js ***!
\***************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
var getStyles = function (props) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var theme = props.theme, getClassNames = props.getClassNames, className = props.className;
if (!theme) {
throw new Error('Theme is undefined or null.');
}
if (getClassNames) {
var names = getClassNames(theme);
return {
wrapper: [names.wrapper],
divider: [names.divider],
};
}
return {
wrapper: [
{
display: 'inline-flex',
height: '100%',
alignItems: 'center',
},
className,
],
divider: [
{
width: 1,
height: '100%',
backgroundColor: theme.palette.neutralTertiaryAlt,
},
],
};
};
//# sourceMappingURL=VerticalDivider.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.base.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.base.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DropdownBase: () => (DropdownBase)
});
/* import */ var tslib__rspack_import_7 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/array.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/safeRequestAnimationFrame.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_19 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _Utilities__rspack_import_21 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_22 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_24 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_25 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _Utilities__rspack_import_26 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js");
/* import */ var _Utilities__rspack_import_27 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/* import */ var _Utilities__rspack_import_28 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_30 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_31 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _Utilities__rspack_import_34 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/osDetector.js");
/* import */ var _Utilities__rspack_import_35 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/mobileDetector.js");
/* import */ var _Callout__rspack_import_12 = __webpack_require__(/*! ../../Callout */ "./node_modules/@fluentui/react/lib/components/Callout/Callout.js");
/* import */ var _Callout__rspack_import_13 = __webpack_require__(/*! ../../Callout */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _Button__rspack_import_16 = __webpack_require__(/*! ../../Button */ "./node_modules/@fluentui/react/lib/components/Button/CommandButton/CommandButton.js");
/* import */ var _SelectableOption__rspack_import_15 = __webpack_require__(/*! ./Dropdown.types */ "./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js");
/* import */ var _utilities_DropdownSizePosCache__rspack_import_8 = __webpack_require__(/*! ./utilities/DropdownSizePosCache */ "./node_modules/@fluentui/react/lib/components/Dropdown/utilities/DropdownSizePosCache.js");
/* import */ var _FocusZone__rspack_import_32 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.js");
/* import */ var _FocusZone__rspack_import_33 = __webpack_require__(/*! ../../FocusZone */ "./node_modules/@fluentui/react-focus/lib/components/FocusZone/FocusZone.types.js");
/* import */ var _Icon__rspack_import_14 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
/* import */ var _Label__rspack_import_23 = __webpack_require__(/*! ../../Label */ "./node_modules/@fluentui/react/lib/components/Label/Label.js");
/* import */ var _Panel__rspack_import_11 = __webpack_require__(/*! ../../Panel */ "./node_modules/@fluentui/react/lib/components/Panel/Panel.js");
/* import */ var _ResponsiveMode__rspack_import_6 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js");
/* import */ var _ResponsiveMode__rspack_import_10 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
/* import */ var _SelectableOption__rspack_import_29 = __webpack_require__(/*! ../../SelectableOption */ "./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.js");
/* import */ var _Checkbox__rspack_import_17 = __webpack_require__(/*! ../../Checkbox */ "./node_modules/@fluentui/react/lib/components/Checkbox/Checkbox.js");
/* import */ var _fluentui_utilities__rspack_import_4 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _fluentui_react_hooks__rspack_import_2 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_window_provider__rspack_import_36 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _utilities_dom__rspack_import_20 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
// import and use V7 Checkbox to ensure no breaking changes.
var COMPONENT_NAME = 'Dropdown';
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var DEFAULT_PROPS = {
options: [],
};
function useSelectedItemsState(_a) {
var defaultSelectedKeys = _a.defaultSelectedKeys, selectedKeys = _a.selectedKeys, defaultSelectedKey = _a.defaultSelectedKey, selectedKey = _a.selectedKey, options = _a.options, multiSelect = _a.multiSelect;
var oldOptions = (0,_fluentui_react_hooks__rspack_import_2.usePrevious)(options);
var _b = react__rspack_import_0.useState([]), selectedIndices = _b[0], setSelectedIndices = _b[1];
// In controlled component usage where selectedKey is provided, update the selectedIndex
// state if the key or options change.
var selectedKeyPropToUse;
// this does a shallow compare (assumes options are pure), for the purposes of determining whether
// defaultSelectedKey/defaultSelectedKeys are respected.
var didOptionsChange = options !== oldOptions;
if (multiSelect) {
if (didOptionsChange && defaultSelectedKeys !== undefined) {
selectedKeyPropToUse = defaultSelectedKeys;
}
else {
selectedKeyPropToUse = selectedKeys;
}
}
else {
if (didOptionsChange && defaultSelectedKey !== undefined) {
selectedKeyPropToUse = defaultSelectedKey;
}
else {
selectedKeyPropToUse = selectedKey;
}
}
var oldSelectedKeyProp = (0,_fluentui_react_hooks__rspack_import_2.usePrevious)(selectedKeyPropToUse);
react__rspack_import_0.useEffect(function () {
/** Get all selected indexes for multi-select mode */
var getSelectedIndexes = function () {
if (selectedKeyPropToUse === undefined) {
if (multiSelect) {
return getAllSelectedIndices();
}
var selectedIndex = getSelectedIndex(null);
return selectedIndex !== -1 ? [selectedIndex] : [];
}
else if (!Array.isArray(selectedKeyPropToUse)) {
var selectedIndex = getSelectedIndex(selectedKeyPropToUse);
return selectedIndex !== -1 ? [selectedIndex] : [];
}
var returnValue = [];
for (var _i = 0, selectedKeyPropToUse_1 = selectedKeyPropToUse; _i < selectedKeyPropToUse_1.length; _i++) {
var key = selectedKeyPropToUse_1[_i];
var selectedIndex = getSelectedIndex(key);
selectedIndex !== -1 && returnValue.push(selectedIndex);
}
return returnValue;
};
var getAllSelectedIndices = function () {
return options
.map(function (option, index) { return (option.selected ? index : -1); })
.filter(function (index) { return index !== -1; });
};
var getSelectedIndex = function (searchKey) {
return (0,_Utilities__rspack_import_3.findIndex)(options, function (option) {
// eslint-disable-next-line eqeqeq
if (searchKey != null) {
return option.key === searchKey;
}
else {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return !!option.selected || !!option.isSelected;
}
});
};
if ((selectedKeyPropToUse !== undefined || !oldOptions) &&
(selectedKeyPropToUse !== oldSelectedKeyProp || didOptionsChange)) {
setSelectedIndices(getSelectedIndexes());
}
}, [didOptionsChange, multiSelect, oldOptions, oldSelectedKeyProp, options, selectedKeyPropToUse]);
return [selectedIndices, setSelectedIndices];
}
var DropdownBase = react__rspack_import_0.forwardRef(function (propsWithoutDefaults, forwardedRef) {
var props = (0,_fluentui_utilities__rspack_import_4.getPropsWithDefaults)(DEFAULT_PROPS, propsWithoutDefaults);
var rootRef = react__rspack_import_0.useRef(null);
var mergedRootRef = (0,_fluentui_react_hooks__rspack_import_5.useMergedRefs)(forwardedRef, rootRef);
var responsiveMode = (0,_ResponsiveMode__rspack_import_6.useResponsiveMode)(rootRef, props.responsiveMode);
var _a = useSelectedItemsState(props), selectedIndices = _a[0], setSelectedIndices = _a[1];
return (react__rspack_import_0.createElement(DropdownInternal, (0,tslib__rspack_import_7.__assign)({}, props, { responsiveMode: responsiveMode, hoisted: { rootRef: mergedRootRef, selectedIndices: selectedIndices, setSelectedIndices: setSelectedIndices } })));
});
DropdownBase.displayName = 'DropdownBase';
var DropdownInternal = /** @class */ (function (_super) {
(0,tslib__rspack_import_7.__extends)(DropdownInternal, _super);
function DropdownInternal(props) {
var _this = _super.call(this, props) || this;
_this._host = react__rspack_import_0.createRef();
_this._focusZone = react__rspack_import_0.createRef();
_this._dropDown = react__rspack_import_0.createRef();
_this._scrollIdleDelay = 250 /* ms */;
_this._sizePosCache = new _utilities_DropdownSizePosCache__rspack_import_8.DropdownSizePosCache();
_this._requestAnimationFrame = (0,_Utilities__rspack_import_9.safeRequestAnimationFrame)(_this);
/**
* Close menu callout if it is open
*/
_this.dismissMenu = function () {
var isOpen = _this.state.isOpen;
isOpen && _this.setState({ isOpen: false });
};
_this._onChange = function (event, options, index, checked, multiSelect) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, onChange = _a.onChange, onChanged = _a.onChanged;
if (onChange || onChanged) {
// for single-select, option passed in will always be selected.
// for multi-select, flip the checked value
var changedOpt = multiSelect ? (0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, options[index]), { selected: !checked }) : options[index];
onChange && onChange((0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, event), { target: _this._dropDown.current }), changedOpt, index);
onChanged && onChanged(changedOpt, index);
}
};
/** Get either props.placeholder (new name) or props.placeHolder (old name) */
_this._getPlaceholder = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return _this.props.placeholder || _this.props.placeHolder;
};
/** Get text in dropdown input as a string */
_this._getTitle = function (items, _unused) {
var _a = _this.props.multiSelectDelimiter, multiSelectDelimiter = _a === void 0 ? ', ' : _a;
return items.map(function (i) { return i.text; }).join(multiSelectDelimiter);
};
/** Render text in dropdown input */
_this._onRenderTitle = function (items) {
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, _this._getTitle(items));
};
/** Render placeholder text in dropdown input */
_this._onRenderPlaceholder = function (props) {
if (!_this._getPlaceholder()) {
return null;
}
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, _this._getPlaceholder());
};
/** Render Callout or Panel container and pass in list */
_this._onRenderContainer = function (props) {
var calloutProps = props.calloutProps, panelProps = props.panelProps;
var _a = _this.props, responsiveMode = _a.responsiveMode, dropdownWidth = _a.dropdownWidth;
var isSmall = responsiveMode <= _ResponsiveMode__rspack_import_10.ResponsiveMode.medium;
var focusTrapZoneProps = { firstFocusableTarget: "#".concat(_this._listId, "1") };
var panelStyles = _this._classNames.subComponentStyles
? _this._classNames.subComponentStyles.panel
: undefined;
var calloutWidth = undefined;
var calloutMinWidth = undefined;
if (dropdownWidth === 'auto') {
calloutMinWidth = _this._dropDown.current ? _this._dropDown.current.clientWidth : 0;
}
else {
calloutWidth = dropdownWidth || (_this._dropDown.current ? _this._dropDown.current.clientWidth : 0);
}
return isSmall ? (react__rspack_import_0.createElement(_Panel__rspack_import_11.Panel, (0,tslib__rspack_import_7.__assign)({ closeButtonAriaLabel: "Close", focusTrapZoneProps: focusTrapZoneProps, hasCloseButton: true, isOpen: true, isLightDismiss: true, onDismiss: _this._onDismiss, styles: panelStyles }, panelProps), _this._renderFocusableList(props))) : (react__rspack_import_0.createElement(_Callout__rspack_import_12.Callout, (0,tslib__rspack_import_7.__assign)({ isBeakVisible: false, gapSpace: 0, doNotLayer: false, directionalHintFixed: false, directionalHint: _Callout__rspack_import_13.DirectionalHint.bottomLeftEdge, calloutWidth: calloutWidth, calloutMinWidth: calloutMinWidth }, calloutProps, { className: _this._classNames.callout, target: _this._dropDown.current, onDismiss: _this._onDismiss, onScroll: _this._onScroll, onPositioned: _this._onPositioned }), _this._renderFocusableList(props)));
};
/** Render Caret Down Icon */
_this._onRenderCaretDown = function (props) {
return react__rspack_import_0.createElement(_Icon__rspack_import_14.Icon, { className: _this._classNames.caretDown, iconName: "ChevronDown", "aria-hidden": true });
};
/** Render List of items */
_this._onRenderList = function (props) {
var _a = props.onRenderItem, onRenderItem = _a === void 0 ? _this._onRenderItem : _a;
var queue = { items: [] };
var renderedList = [];
var emptyQueue = function () {
var newGroup = queue.id
? [
react__rspack_import_0.createElement("div", { role: "group", key: queue.id, "aria-labelledby": queue.id }, queue.items),
]
: queue.items;
renderedList = (0,tslib__rspack_import_7.__spreadArray)((0,tslib__rspack_import_7.__spreadArray)([], renderedList, true), newGroup, true);
// Flush items and id
queue = { items: [] };
};
var placeRenderedOptionIntoQueue = function (item, index) {
/*
Case Header
empty queue if it's not already empty
ensure unique ID for header and set queue ID
push header into queue
Case Divider
push divider into queue if not first item
empty queue if not already empty
Default
push item into queue
*/
switch (item.itemType) {
case _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Header:
queue.items.length > 0 && emptyQueue();
var id = _this._id + item.key;
queue.items.push(onRenderItem((0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({ id: id }, item), { index: index }), _this._onRenderItem));
queue.id = id;
break;
case _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Divider:
index > 0 && queue.items.push(onRenderItem((0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, item), { index: index }), _this._onRenderItem));
queue.items.length > 0 && emptyQueue();
break;
default:
queue.items.push(onRenderItem((0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, item), { index: index }), _this._onRenderItem));
}
};
// Place options into the queue. Queue will be emptied anytime a Header or Divider is encountered
props.options.forEach(function (item, index) {
placeRenderedOptionIntoQueue(item, index);
});
// Push remaining items into all renderedList
queue.items.length > 0 && emptyQueue();
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, renderedList);
};
_this._onRenderItem = function (item) {
switch (item.itemType) {
case _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Divider:
return _this._renderSeparator(item);
case _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Header:
return _this._renderHeader(item);
default:
return _this._renderOption(item);
}
};
_this._renderOption = function (item) {
var _a;
var _b = _this.props, _c = _b.onRenderOption, onRenderOption = _c === void 0 ? _this._onRenderOption : _c, _d = _b.hoisted.selectedIndices, selectedIndices = _d === void 0 ? [] : _d;
var isItemSelected = item.index !== undefined && selectedIndices ? selectedIndices.indexOf(item.index) > -1 : false;
// select the right className based on the combination of selected/disabled
var itemClassName = item.hidden // predicate: item hidden
? _this._classNames.dropdownItemHidden
: isItemSelected && item.disabled === true // predicate: both selected and disabled
? _this._classNames.dropdownItemSelectedAndDisabled
: isItemSelected // predicate: selected only
? _this._classNames.dropdownItemSelected
: item.disabled === true // predicate: disabled only
? _this._classNames.dropdownItemDisabled
: _this._classNames.dropdownItem;
var title = item.title;
// define the id and label id (for multiselect checkboxes)
var id = _this._listId + item.index;
var labelId = (_a = item.id) !== null && _a !== void 0 ? _a : id + '-label';
var multiSelectItemStyles = _this._classNames.subComponentStyles
? _this._classNames.subComponentStyles.multiSelectItem
: undefined;
return !_this.props.multiSelect ? (react__rspack_import_0.createElement(_Button__rspack_import_16.CommandButton, { id: id, key: item.key, "data-index": item.index, "data-is-focusable": !item.disabled, disabled: item.disabled, className: itemClassName, onClick: _this._onItemClick(item),
// eslint-disable-next-line react/jsx-no-bind
onMouseEnter: _this._onItemMouseEnter.bind(_this, item),
// eslint-disable-next-line react/jsx-no-bind
onMouseLeave: _this._onMouseItemLeave.bind(_this, item),
// eslint-disable-next-line react/jsx-no-bind
onMouseMove: _this._onItemMouseMove.bind(_this, item), role: "option", "aria-selected": isItemSelected ? 'true' : 'false', ariaLabel: item.ariaLabel, title: title, "aria-posinset": _this._sizePosCache.positionInSet(item.index), "aria-setsize": _this._sizePosCache.optionSetSize }, onRenderOption(item, _this._onRenderOption))) : (react__rspack_import_0.createElement(_Checkbox__rspack_import_17.Checkbox, { id: id, key: item.key, disabled: item.disabled, onChange: _this._onItemClick(item), inputProps: (0,tslib__rspack_import_7.__assign)({ 'aria-selected': isItemSelected, onMouseEnter: _this._onItemMouseEnter.bind(_this, item), onMouseLeave: _this._onMouseItemLeave.bind(_this, item), onMouseMove: _this._onItemMouseMove.bind(_this, item), role: 'option' }, {
'data-index': item.index,
'data-is-focusable': !(item.disabled || item.hidden),
}), label: item.text, title: title,
// eslint-disable-next-line react/jsx-no-bind
onRenderLabel: _this._onRenderItemLabel.bind(_this, (0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, item), { id: labelId })), className: (0,_Utilities__rspack_import_18.css)(itemClassName, 'is-multi-select'), checked: isItemSelected, styles: multiSelectItemStyles, ariaPositionInSet: !item.hidden ? _this._sizePosCache.positionInSet(item.index) : undefined, ariaSetSize: !item.hidden ? _this._sizePosCache.optionSetSize : undefined, ariaLabel: item.ariaLabel, ariaLabelledBy: item.ariaLabel ? undefined : labelId }));
};
/** Render content of item (i.e. text/icon inside of button) */
_this._onRenderOption = function (item) {
return react__rspack_import_0.createElement("span", { className: _this._classNames.dropdownOptionText }, item.text);
};
/*
* Render content of a multiselect item label.
* Text within the label is aria-hidden, to prevent duplicate input/label exposure
*/
_this._onRenderMultiselectOption = function (item) {
return (react__rspack_import_0.createElement("span", { id: item.id, "aria-hidden": "true", className: _this._classNames.dropdownOptionText }, item.text));
};
/** Render custom label for multiselect checkbox items */
_this._onRenderItemLabel = function (item) {
var _a = _this.props.onRenderOption, onRenderOption = _a === void 0 ? _this._onRenderMultiselectOption : _a;
return onRenderOption(item, _this._onRenderMultiselectOption);
};
_this._onPositioned = function (positions) {
if (_this._focusZone.current) {
// Focusing an element can trigger a reflow. Making this wait until there is an animation
// frame can improve perf significantly.
_this._requestAnimationFrame(function () {
var selectedIndices = _this.props.hoisted.selectedIndices;
if (_this._focusZone.current) {
if (!_this._hasBeenPositioned &&
selectedIndices &&
selectedIndices[0] &&
!_this.props.options[selectedIndices[0]].disabled) {
var element = (0,_Utilities__rspack_import_19.getDocument)().getElementById("".concat(_this._id, "-list").concat(selectedIndices[0]));
if (element) {
_this._focusZone.current.focusElement(element);
}
_this._hasBeenPositioned = true;
}
else {
_this._focusZone.current.focus();
}
}
});
}
if (!_this.state.calloutRenderEdge || _this.state.calloutRenderEdge !== positions.targetEdge) {
_this.setState({
calloutRenderEdge: positions.targetEdge,
});
}
};
_this._onItemClick = function (item) {
return function (event) {
if (!item.disabled) {
_this.setSelectedIndex(event, item.index);
if (!_this.props.multiSelect) {
// only close the callout when it's in single-select mode
_this.setState({
isOpen: false,
});
}
}
};
};
/**
* Scroll handler for the callout to make sure the mouse events
* for updating focus are not interacting during scroll
*/
_this._onScroll = function () {
var win = (0,_utilities_dom__rspack_import_20.getWindowEx)(_this.context); // can only be called on the client
if (!_this._isScrollIdle && _this._scrollIdleTimeoutId !== undefined) {
win.clearTimeout(_this._scrollIdleTimeoutId);
_this._scrollIdleTimeoutId = undefined;
}
else {
_this._isScrollIdle = false;
}
_this._scrollIdleTimeoutId = win.setTimeout(function () {
_this._isScrollIdle = true;
}, _this._scrollIdleDelay);
};
_this._onMouseItemLeave = function (item, ev) {
if (_this._shouldIgnoreMouseEvent()) {
return;
}
/**
* IE11 focus() method forces parents to scroll to top of element.
* Edge and IE expose a setActive() function for focusable divs that
* sets the page focus but does not scroll the parent element.
*/
if (_this._host.current) {
if (_this._host.current.setActive) {
try {
_this._host.current.setActive();
}
catch (e) {
/* no-op */
}
}
else {
_this._host.current.focus();
}
}
};
_this._onDismiss = function () {
_this.setState({ isOpen: false });
};
_this._onDropdownBlur = function (ev) {
// If Dropdown disabled do not proceed with this logic.
var disabled = _this._isDisabled();
if (disabled) {
return;
}
if (_this.state.isOpen) {
// Do not call onBlur or update focus state when the callout is opened
return;
}
_this.setState({ hasFocus: false });
if (_this.props.onBlur) {
_this.props.onBlur(ev);
}
};
_this._onDropdownKeyDown = function (ev) {
// If Dropdown disabled do not process any keyboard events.
var disabled = _this._isDisabled();
if (disabled) {
return;
}
// Take note if we are processing an alt (option) or meta (command) keydown.
// See comment in _shouldHandleKeyUp for reasoning.
_this._lastKeyDownWasAltOrMeta = _this._isAltOrMeta(ev);
if (_this.props.onKeyDown) {
_this.props.onKeyDown(ev);
if (ev.defaultPrevented) {
return;
}
}
var newIndex;
var selectedIndex = _this.props.hoisted.selectedIndices.length ? _this.props.hoisted.selectedIndices[0] : -1;
var containsExpandCollapseModifier = ev.altKey || ev.metaKey;
var isOpen = _this.state.isOpen;
// eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case _Utilities__rspack_import_21.KeyCodes.enter:
_this.setState({
isOpen: !isOpen,
});
break;
case _Utilities__rspack_import_21.KeyCodes.escape:
if (!isOpen) {
return;
}
_this.setState({
isOpen: false,
});
break;
case _Utilities__rspack_import_21.KeyCodes.up:
if (containsExpandCollapseModifier) {
if (isOpen) {
_this.setState({ isOpen: false });
break;
}
return;
}
if (_this.props.multiSelect) {
_this.setState({ isOpen: true });
}
else if (!_this._isDisabled()) {
newIndex = _this._moveIndex(ev, -1, selectedIndex - 1, selectedIndex);
}
break;
case _Utilities__rspack_import_21.KeyCodes.down:
if (containsExpandCollapseModifier) {
ev.stopPropagation();
ev.preventDefault();
}
if ((containsExpandCollapseModifier && !isOpen) || _this.props.multiSelect) {
_this.setState({ isOpen: true });
}
else if (!_this._isDisabled()) {
newIndex = _this._moveIndex(ev, 1, selectedIndex + 1, selectedIndex);
}
break;
case _Utilities__rspack_import_21.KeyCodes.home:
if (!_this.props.multiSelect) {
newIndex = _this._moveIndex(ev, 1, 0, selectedIndex);
}
break;
case _Utilities__rspack_import_21.KeyCodes.end:
if (!_this.props.multiSelect) {
newIndex = _this._moveIndex(ev, -1, _this.props.options.length - 1, selectedIndex);
}
break;
case _Utilities__rspack_import_21.KeyCodes.space:
// event handled in _onDropdownKeyUp
break;
default:
return;
}
if (newIndex !== selectedIndex) {
ev.stopPropagation();
ev.preventDefault();
}
};
_this._onDropdownKeyUp = function (ev) {
// If Dropdown disabled do not process any keyboard events.
var disabled = _this._isDisabled();
if (disabled) {
return;
}
var shouldHandleKey = _this._shouldHandleKeyUp(ev);
var isOpen = _this.state.isOpen;
if (_this.props.onKeyUp) {
_this.props.onKeyUp(ev);
if (ev.defaultPrevented) {
return;
}
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case _Utilities__rspack_import_21.KeyCodes.space:
_this.setState({
isOpen: !isOpen,
});
break;
default:
if (shouldHandleKey && isOpen) {
_this.setState({ isOpen: false });
}
return;
}
ev.stopPropagation();
ev.preventDefault();
};
_this._onZoneKeyDown = function (ev) {
var _a, _b;
var elementToFocus;
// Take note if we are processing an alt (option) or meta (command) keydown.
// See comment in _shouldHandleKeyUp for reasoning.
_this._lastKeyDownWasAltOrMeta = _this._isAltOrMeta(ev);
var containsExpandCollapseModifier = ev.altKey || ev.metaKey;
// eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case _Utilities__rspack_import_21.KeyCodes.up:
if (containsExpandCollapseModifier) {
_this.setState({ isOpen: false });
}
else {
if (_this._host.current) {
elementToFocus = (0,_Utilities__rspack_import_22.getLastFocusable)(_this._host.current, _this._host.current.lastChild, true);
}
}
break;
// All directional keystrokes should be canceled when the zone is rendered.
// This avoids the body scroll from reacting and thus dismissing the dropdown.
case _Utilities__rspack_import_21.KeyCodes.home:
case _Utilities__rspack_import_21.KeyCodes.end:
case _Utilities__rspack_import_21.KeyCodes.pageUp:
case _Utilities__rspack_import_21.KeyCodes.pageDown:
break;
case _Utilities__rspack_import_21.KeyCodes.down:
if (!containsExpandCollapseModifier && _this._host.current) {
elementToFocus = (0,_Utilities__rspack_import_22.getFirstFocusable)(_this._host.current, _this._host.current.firstChild, true);
}
break;
case _Utilities__rspack_import_21.KeyCodes.escape:
_this.setState({ isOpen: false });
break;
case _Utilities__rspack_import_21.KeyCodes.tab:
_this.setState({ isOpen: false });
var document_1 = (0,_Utilities__rspack_import_19.getDocument)();
if (document_1) {
if (ev.shiftKey) {
(_a = (0,_Utilities__rspack_import_22.getPreviousElement)(document_1.body, _this._dropDown.current, false, false, true, true)) === null || _a === void 0 ? void 0 : _a.focus();
}
else {
(_b = (0,_Utilities__rspack_import_22.getNextElement)(document_1.body, _this._dropDown.current, false, false, true, true)) === null || _b === void 0 ? void 0 : _b.focus();
}
}
break;
default:
return;
}
if (elementToFocus) {
elementToFocus.focus();
}
ev.stopPropagation();
ev.preventDefault();
};
_this._onZoneKeyUp = function (ev) {
var shouldHandleKey = _this._shouldHandleKeyUp(ev);
if (shouldHandleKey && _this.state.isOpen) {
_this.setState({ isOpen: false });
ev.preventDefault();
}
};
_this._onDropdownClick = function (ev) {
if (_this.props.onClick) {
_this.props.onClick(ev);
if (ev.defaultPrevented) {
return;
}
}
var isOpen = _this.state.isOpen;
var disabled = _this._isDisabled();
if (!disabled && !_this._shouldOpenOnFocus()) {
_this.setState({
isOpen: !isOpen,
});
}
_this._isFocusedByClick = false; // reset
};
_this._onDropdownMouseDown = function () {
_this._isFocusedByClick = true;
};
_this._onFocus = function (ev) {
var disabled = _this._isDisabled();
if (!disabled) {
if (_this.props.onFocus) {
_this.props.onFocus(ev);
}
var state = { hasFocus: true };
if (_this._shouldOpenOnFocus()) {
state.isOpen = true;
}
_this.setState(state);
}
};
/**
* Because the isDisabled prop is deprecated, we have had to repeat this logic all over the place.
* This helper method avoids all the repetition.
*/
_this._isDisabled = function () {
var disabled = _this.props.disabled;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var isDisabled = _this.props.isDisabled;
// Remove this deprecation workaround at 1.0.0
if (disabled === undefined) {
disabled = isDisabled;
}
return disabled;
};
_this._onRenderLabel = function (props) {
var label = props.label, required = props.required, disabled = props.disabled;
var labelStyles = _this._classNames.subComponentStyles
? _this._classNames.subComponentStyles.label
: undefined;
return label ? (react__rspack_import_0.createElement(_Label__rspack_import_23.Label, { className: _this._classNames.label, id: _this._labelId, required: required, styles: labelStyles, disabled: disabled }, label)) : null;
};
(0,_Utilities__rspack_import_24.initializeComponentRef)(_this);
var multiSelect = props.multiSelect, selectedKey = props.selectedKey, selectedKeys = props.selectedKeys, defaultSelectedKey = props.defaultSelectedKey, defaultSelectedKeys = props.defaultSelectedKeys, options = props.options;
if (true) {
(0,_Utilities__rspack_import_25.warnDeprecations)(COMPONENT_NAME, props, {
isDisabled: 'disabled',
onChanged: 'onChange',
placeHolder: 'placeholder',
onRenderPlaceHolder: 'onRenderPlaceholder',
});
(0,_Utilities__rspack_import_26.warnMutuallyExclusive)(COMPONENT_NAME, props, {
defaultSelectedKey: 'selectedKey',
defaultSelectedKeys: 'selectedKeys',
selectedKeys: 'selectedKey',
});
if (multiSelect) {
var warnMultiSelect = function (prop) {
return (0,_Utilities__rspack_import_27.warn)("Dropdown property '".concat(prop, "' cannot be used when 'multiSelect' is true. Use '").concat(prop, "s' instead."));
};
if (selectedKey !== undefined) {
warnMultiSelect('selectedKey');
}
if (defaultSelectedKey !== undefined) {
warnMultiSelect('defaultSelectedKey');
}
}
else {
var warnNotMultiSelect = function (prop) {
return (0,_Utilities__rspack_import_27.warn)("Dropdown property '".concat(prop, "s' cannot be used when 'multiSelect' is false/unset. Use '").concat(prop, "' instead."));
};
if (selectedKeys !== undefined) {
warnNotMultiSelect('selectedKey');
}
if (defaultSelectedKeys !== undefined) {
warnNotMultiSelect('defaultSelectedKey');
}
}
}
_this._id = props.id || (0,_Utilities__rspack_import_28.getId)('Dropdown');
_this._labelId = _this._id + '-label';
_this._listId = _this._id + '-list';
_this._optionId = _this._id + '-option';
_this._isScrollIdle = true;
_this._hasBeenPositioned = false;
_this._sizePosCache.updateOptions(options);
_this.state = {
isOpen: false,
hasFocus: false,
calloutRenderEdge: undefined,
};
return _this;
}
Object.defineProperty(DropdownInternal.prototype, "selectedOptions", {
/**
* All selected options
*/
get: function () {
var _a = this.props, options = _a.options, selectedIndices = _a.hoisted.selectedIndices;
return (0,_SelectableOption__rspack_import_29.getAllSelectedOptions)(options, selectedIndices);
},
enumerable: false,
configurable: true
});
DropdownInternal.prototype.componentWillUnmount = function () {
clearTimeout(this._scrollIdleTimeoutId);
};
DropdownInternal.prototype.componentDidUpdate = function (prevProps, prevState) {
if (prevState.isOpen === true && this.state.isOpen === false) {
this._gotMouseMove = false;
this._hasBeenPositioned = false;
if (this.props.onDismiss) {
this.props.onDismiss();
}
}
};
DropdownInternal.prototype.render = function () {
var id = this._id;
var props = this.props;
var className = props.className, label = props.label, options = props.options, ariaLabel = props.ariaLabel, required = props.required, errorMessage = props.errorMessage, propStyles = props.styles, theme = props.theme, panelProps = props.panelProps, calloutProps = props.calloutProps, _a = props.onRenderTitle, onRenderTitle = _a === void 0 ? this._getTitle : _a, _b = props.onRenderContainer, onRenderContainer = _b === void 0 ? this._onRenderContainer : _b, _c = props.onRenderCaretDown, onRenderCaretDown = _c === void 0 ? this._onRenderCaretDown : _c, _d = props.onRenderLabel, onRenderLabel = _d === void 0 ? this._onRenderLabel : _d, _e = props.onRenderItem, onRenderItem = _e === void 0 ? this._onRenderItem : _e, selectedIndices = props.hoisted.selectedIndices, responsiveMode = props.responsiveMode;
var _f = this.state, isOpen = _f.isOpen, calloutRenderEdge = _f.calloutRenderEdge, hasFocus = _f.hasFocus;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var onRenderPlaceholder = props.onRenderPlaceholder || props.onRenderPlaceHolder || this._getPlaceholder;
// If our cached options are out of date update our cache
if (options !== this._sizePosCache.cachedOptions) {
this._sizePosCache.updateOptions(options);
}
var selectedOptions = (0,_SelectableOption__rspack_import_29.getAllSelectedOptions)(options, selectedIndices);
var divProps = (0,_Utilities__rspack_import_30.getNativeProps)(props, _Utilities__rspack_import_30.divProperties);
var disabled = this._isDisabled();
var isSmall = responsiveMode <= _ResponsiveMode__rspack_import_10.ResponsiveMode.medium;
var errorMessageId = id + '-errorMessage';
this._classNames = getClassNames(propStyles, {
theme: theme,
className: className,
hasError: !!(errorMessage && errorMessage.length > 0),
hasLabel: !!label,
isOpen: isOpen,
required: required,
disabled: disabled,
isRenderingPlaceholder: !selectedOptions.length,
panelClassName: panelProps ? panelProps.className : undefined,
calloutClassName: calloutProps ? calloutProps.className : undefined,
calloutRenderEdge: calloutRenderEdge,
});
var hasErrorMessage = !!errorMessage && errorMessage.length > 0;
return (react__rspack_import_0.createElement("div", { className: this._classNames.root, ref: this.props.hoisted.rootRef, "aria-owns": isOpen && !isSmall ? this._listId : undefined },
onRenderLabel(this.props, this._onRenderLabel),
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_7.__assign)({ "data-is-focusable": !disabled, "data-ktp-target": true, ref: this._dropDown, id: id, tabIndex: disabled ? -1 : 0, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen ? 'true' : 'false', "aria-label": ariaLabel, "aria-labelledby": label && !ariaLabel ? (0,_Utilities__rspack_import_31.mergeAriaAttributeValues)(this._labelId, this._optionId) : undefined, "aria-describedby": hasErrorMessage ? this._id + '-errorMessage' : undefined, "aria-required": required, "aria-disabled": disabled, "aria-invalid": hasErrorMessage, "aria-controls": isOpen && !isSmall ? this._listId : undefined }, divProps, { className: this._classNames.dropdown, onBlur: this._onDropdownBlur, onKeyDown: this._onDropdownKeyDown, onKeyUp: this._onDropdownKeyUp, onClick: this._onDropdownClick, onMouseDown: this._onDropdownMouseDown, onFocus: this._onFocus }),
react__rspack_import_0.createElement("span", { id: this._optionId, className: this._classNames.title, "aria-live": hasFocus ? 'polite' : undefined, "aria-atomic": hasFocus ? true : undefined },
// If option is selected render title, otherwise render the placeholder text
selectedOptions.length
? onRenderTitle(selectedOptions, this._onRenderTitle)
: onRenderPlaceholder(props, this._onRenderPlaceholder)),
react__rspack_import_0.createElement("span", { className: this._classNames.caretDownWrapper }, onRenderCaretDown(props, this._onRenderCaretDown))),
isOpen &&
onRenderContainer((0,tslib__rspack_import_7.__assign)((0,tslib__rspack_import_7.__assign)({}, props), { onDismiss: this._onDismiss, onRenderItem: onRenderItem }), this._onRenderContainer),
hasErrorMessage && (react__rspack_import_0.createElement("div", { role: "alert", id: errorMessageId, className: this._classNames.errorMessage }, errorMessage))));
};
DropdownInternal.prototype.focus = function (shouldOpenOnFocus) {
if (this._dropDown.current) {
this._dropDown.current.focus();
if (shouldOpenOnFocus) {
this.setState({
isOpen: true,
});
}
}
};
DropdownInternal.prototype.setSelectedIndex = function (event, index) {
var _a = this.props, options = _a.options, selectedKey = _a.selectedKey, selectedKeys = _a.selectedKeys, multiSelect = _a.multiSelect, notifyOnReselect = _a.notifyOnReselect, _b = _a.hoisted.selectedIndices, selectedIndices = _b === void 0 ? [] : _b;
var checked = selectedIndices ? selectedIndices.indexOf(index) > -1 : false;
var newIndexes = [];
index = Math.max(0, Math.min(options.length - 1, index));
// If this is a controlled component then no state change should take place.
if (selectedKey !== undefined || selectedKeys !== undefined) {
this._onChange(event, options, index, checked, multiSelect);
return;
}
if (!multiSelect && !notifyOnReselect && index === selectedIndices[0]) {
return;
}
else if (multiSelect) {
newIndexes = selectedIndices ? this._copyArray(selectedIndices) : [];
if (checked) {
var position = newIndexes.indexOf(index);
if (position > -1) {
// unchecked the current one
newIndexes.splice(position, 1);
}
}
else {
// add the new selected index into the existing one
newIndexes.push(index);
}
}
else {
// Set the selected option if this is an uncontrolled component
newIndexes = [index];
}
event.persist();
// Call onChange after state is updated
this.props.hoisted.setSelectedIndices(newIndexes);
this._onChange(event, options, index, checked, multiSelect);
};
DropdownInternal.prototype._copyArray = function (array) {
var newArray = [];
for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {
var element = array_1[_i];
newArray.push(element);
}
return newArray;
};
/**
* Finds the next valid Dropdown option and sets the selected index to it.
* @param stepValue - Value of how many items the function should traverse. Should be -1 or 1.
* @param index - Index of where the search should start
* @param selectedIndex - The selectedIndex Dropdown's state
* @returns The next valid dropdown option's index
*/
DropdownInternal.prototype._moveIndex = function (event, stepValue, index, selectedIndex) {
var options = this.props.options;
// Return selectedIndex if nothing has changed or options is empty
if (selectedIndex === index || options.length === 0) {
return selectedIndex;
}
// If the user is pressing the up or down key we want to make
// sure that the dropdown cycles through the options without
// causing the screen to scroll. In _onDropdownKeyDown
// at the very end is a check to see if newIndex !== selectedIndex.
// If the index is less than 0 and we set it back to 0, then
// newIndex will equal selectedIndex and not stop the action
// of the key press happening and vice versa for indexes greater
// than or equal to the options length.
if (index >= options.length) {
index = 0;
}
else if (index < 0) {
index = options.length - 1;
}
var stepCounter = 0;
// If current index is a header or divider, or disabled, increment by step
while (options[index].itemType === _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Header ||
options[index].itemType === _SelectableOption__rspack_import_15.SelectableOptionMenuItemType.Divider ||
options[index].disabled) {
// If stepCounter exceeds length of options, then return selectedIndex (-1)
if (stepCounter >= options.length) {
return selectedIndex;
}
// If index + stepValue is out of bounds, wrap around
if (index + stepValue < 0) {
index = options.length;
}
else if (index + stepValue >= options.length) {
index = -1;
}
index = index + stepValue;
stepCounter++;
}
this.setSelectedIndex(event, index);
return index;
};
/** Wrap item list in a FocusZone */
DropdownInternal.prototype._renderFocusableList = function (props) {
var _a = props.onRenderList, onRenderList = _a === void 0 ? this._onRenderList : _a, label = props.label, ariaLabel = props.ariaLabel, multiSelect = props.multiSelect;
return (react__rspack_import_0.createElement("div", { className: this._classNames.dropdownItemsWrapper, onKeyDown: this._onZoneKeyDown, onKeyUp: this._onZoneKeyUp, ref: this._host, tabIndex: 0 },
react__rspack_import_0.createElement(_FocusZone__rspack_import_32.FocusZone, { ref: this._focusZone, direction: _FocusZone__rspack_import_33.FocusZoneDirection.vertical, id: this._listId, className: this._classNames.dropdownItems, role: "listbox", "aria-label": ariaLabel, "aria-labelledby": label && !ariaLabel ? this._labelId : undefined, "aria-multiselectable": multiSelect }, onRenderList(props, this._onRenderList))));
};
DropdownInternal.prototype._renderSeparator = function (item) {
var index = item.index, key = item.key;
var separatorClassName = item.hidden ? this._classNames.dropdownDividerHidden : this._classNames.dropdownDivider;
if (index > 0) {
return react__rspack_import_0.createElement("div", { role: "presentation", key: key, className: separatorClassName });
}
return null;
};
DropdownInternal.prototype._renderHeader = function (item) {
var _a = this.props.onRenderOption, onRenderOption = _a === void 0 ? this._onRenderOption : _a;
var key = item.key, id = item.id;
var headerClassName = item.hidden
? this._classNames.dropdownItemHeaderHidden
: this._classNames.dropdownItemHeader;
return (react__rspack_import_0.createElement("div", { id: id, key: key, className: headerClassName }, onRenderOption(item, this._onRenderOption)));
};
DropdownInternal.prototype._onItemMouseEnter = function (item, ev) {
if (this._shouldIgnoreMouseEvent()) {
return;
}
var targetElement = ev.currentTarget;
targetElement.focus();
};
DropdownInternal.prototype._onItemMouseMove = function (item, ev) {
var doc = (0,_utilities_dom__rspack_import_20.getDocumentEx)(this.context); // can only be called on the client
var targetElement = ev.currentTarget;
this._gotMouseMove = true;
if (!this._isScrollIdle || doc.activeElement === targetElement) {
return;
}
targetElement.focus();
};
DropdownInternal.prototype._shouldIgnoreMouseEvent = function () {
return !this._isScrollIdle || !this._gotMouseMove;
};
/**
* Returns true if the key for the event is alt (Mac option) or meta (Mac command).
*/
DropdownInternal.prototype._isAltOrMeta = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === _Utilities__rspack_import_21.KeyCodes.alt || ev.key === 'Meta';
};
/**
* We close the menu on key up only if ALL of the following are true:
* - Most recent key down was alt or meta (command)
* - The alt/meta key down was NOT followed by some other key (such as down/up arrow to
* expand/collapse the menu)
* - We're not on a Mac (or iOS)
*
* This is because on Windows, pressing alt moves focus to the application menu bar or similar,
* closing any open context menus. There is not a similar behavior on Macs.
*/
DropdownInternal.prototype._shouldHandleKeyUp = function (ev) {
var keyPressIsAltOrMetaAlone = this._lastKeyDownWasAltOrMeta && this._isAltOrMeta(ev);
this._lastKeyDownWasAltOrMeta = false;
return !!keyPressIsAltOrMetaAlone && !((0,_Utilities__rspack_import_34.isMac)() || (0,_Utilities__rspack_import_35.isIOS)());
};
/**
* Returns true if dropdown should set to open on focus.
* Otherwise, isOpen state should be toggled on click
*/
DropdownInternal.prototype._shouldOpenOnFocus = function () {
var hasFocus = this.state.hasFocus;
var openOnKeyboardFocus = this.props.openOnKeyboardFocus;
return !this._isFocusedByClick && openOnKeyboardFocus === true && !hasFocus;
};
DropdownInternal.defaultProps = {
options: [],
};
DropdownInternal.contextType = _fluentui_react_window_provider__rspack_import_36.WindowContext;
return DropdownInternal;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Dropdown.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Dropdown: () => (Dropdown)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Dropdown_base__rspack_import_1 = __webpack_require__(/*! ./Dropdown.base */ "./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.base.js");
/* import */ var _Dropdown_styles__rspack_import_2 = __webpack_require__(/*! ./Dropdown.styles */ "./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.styles.js");
var Dropdown = (0,_Utilities__rspack_import_0.styled)(_Dropdown_base__rspack_import_1.DropdownBase, _Dropdown_styles__rspack_import_2.getStyles, undefined, {
scope: 'Dropdown',
});
Dropdown.displayName = 'Dropdown';
//# sourceMappingURL=Dropdown.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.styles.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dropdown/Dropdown.styles.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
/* import */ var _Positioning__rspack_import_3 = __webpack_require__(/*! ../../Positioning */ "./node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var _a, _b, _c, _d, _e;
var GlobalClassNames = {
root: 'ms-Dropdown-container',
label: 'ms-Dropdown-label',
dropdown: 'ms-Dropdown',
title: 'ms-Dropdown-title',
caretDownWrapper: 'ms-Dropdown-caretDownWrapper',
caretDown: 'ms-Dropdown-caretDown',
callout: 'ms-Dropdown-callout',
panel: 'ms-Dropdown-panel',
dropdownItems: 'ms-Dropdown-items',
dropdownItem: 'ms-Dropdown-item',
dropdownDivider: 'ms-Dropdown-divider',
dropdownOptionText: 'ms-Dropdown-optionText',
dropdownItemHeader: 'ms-Dropdown-header',
titleIsPlaceHolder: 'ms-Dropdown-titleIsPlaceHolder',
titleHasError: 'ms-Dropdown-title--hasError',
};
var DROPDOWN_HEIGHT = 32;
var DROPDOWN_ITEM_HEIGHT = 36;
var highContrastAdjustMixin = (_a = {},
_a["".concat(_Styling__rspack_import_1.HighContrastSelector, ", ").concat(_Styling__rspack_import_1.HighContrastSelectorWhite.replace('@media ', ''))] = (0,tslib__rspack_import_0.__assign)({}, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_a);
var highContrastItemAndTitleStateMixin = {
selectors: (0,tslib__rspack_import_0.__assign)((_b = {}, _b[_Styling__rspack_import_1.HighContrastSelector] = (_c = {
backgroundColor: 'Highlight',
borderColor: 'Highlight',
color: 'HighlightText'
},
_c[".".concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, " &:focus:after")] = {
borderColor: 'HighlightText',
},
_c), _b['.ms-Checkbox-checkbox'] = (_d = {},
_d[_Styling__rspack_import_1.HighContrastSelector] = {
borderColor: 'HighlightText',
},
_d), _b), highContrastAdjustMixin),
};
var highContrastBorderState = {
selectors: (_e = {},
_e[_Styling__rspack_import_1.HighContrastSelector] = {
borderColor: 'Highlight',
},
_e),
};
var MinimumScreenSelector = (0,_Styling__rspack_import_1.getScreenSelector)(0, _Styling__rspack_import_1.ScreenWidthMinMedium);
var getStyles = function (props) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
var theme = props.theme, hasError = props.hasError, hasLabel = props.hasLabel, className = props.className, isOpen = props.isOpen, disabled = props.disabled, required = props.required, isRenderingPlaceholder = props.isRenderingPlaceholder, panelClassName = props.panelClassName, calloutClassName = props.calloutClassName, calloutRenderEdge = props.calloutRenderEdge;
if (!theme) {
throw new Error('theme is undefined or null in base Dropdown getStyles function.');
}
var globalClassnames = (0,_Styling__rspack_import_1.getGlobalClassNames)(GlobalClassNames, theme);
var palette = theme.palette, semanticColors = theme.semanticColors, effects = theme.effects, fonts = theme.fonts;
var rootHoverFocusActiveSelectorNeutralDarkMixin = {
color: semanticColors.menuItemTextHovered,
};
var rootHoverFocusActiveSelectorNeutralPrimaryMixin = {
color: semanticColors.menuItemText,
};
var borderColorError = {
borderColor: semanticColors.errorText,
};
var dropdownItemStyle = [
globalClassnames.dropdownItem,
{
backgroundColor: 'transparent',
boxSizing: 'border-box',
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
padding: '0 8px',
width: '100%',
minHeight: DROPDOWN_ITEM_HEIGHT,
lineHeight: 20,
height: 0,
position: 'relative',
border: '1px solid transparent',
borderRadius: 0,
wordWrap: 'break-word',
overflowWrap: 'break-word',
textAlign: 'left',
'.ms-Button-flexContainer': {
width: '100%',
},
},
];
var dropdownHeaderStyle = [
globalClassnames.dropdownItemHeader,
(0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, fonts.medium), { fontWeight: _Styling__rspack_import_1.FontWeights.semibold, color: semanticColors.menuHeader, background: 'none', backgroundColor: 'transparent', border: 'none', height: DROPDOWN_ITEM_HEIGHT, lineHeight: DROPDOWN_ITEM_HEIGHT, cursor: 'default', padding: '0 8px', userSelect: 'none', textAlign: 'left', selectors: (_a = {},
_a[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_0.__assign)({ color: 'GrayText' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_a) }),
];
var selectedItemBackgroundColor = semanticColors.menuItemBackgroundPressed;
var itemSelectors = function (isSelected) {
var _a, _b;
if (isSelected === void 0) { isSelected = false; }
return {
selectors: (_a = {
'&:hover': [
{
color: semanticColors.menuItemTextHovered,
backgroundColor: !isSelected ? semanticColors.menuItemBackgroundHovered : selectedItemBackgroundColor,
},
highContrastItemAndTitleStateMixin,
],
'&.is-multi-select:hover': [
{ backgroundColor: !isSelected ? 'transparent' : selectedItemBackgroundColor },
highContrastItemAndTitleStateMixin,
],
'&:active:hover': [
{
color: semanticColors.menuItemTextHovered,
backgroundColor: !isSelected
? semanticColors.menuItemBackgroundPressed
: semanticColors.menuItemBackgroundHovered,
},
highContrastItemAndTitleStateMixin,
]
},
_a[".".concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, " &:focus:after, :host(.").concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, ") &:focus:after")] = (_b = {
left: 0,
top: 0,
bottom: 0,
right: 0
},
_b[_Styling__rspack_import_1.HighContrastSelector] = {
inset: '2px',
},
_b),
_a[_Styling__rspack_import_1.HighContrastSelector] = {
border: 'none',
},
_a),
};
};
var dropdownItemSelected = (0,tslib__rspack_import_0.__spreadArray)((0,tslib__rspack_import_0.__spreadArray)([], dropdownItemStyle, true), [
{
backgroundColor: selectedItemBackgroundColor,
color: semanticColors.menuItemTextHovered,
},
itemSelectors(true),
highContrastItemAndTitleStateMixin,
], false);
var dropdownItemDisabled = (0,tslib__rspack_import_0.__spreadArray)((0,tslib__rspack_import_0.__spreadArray)([], dropdownItemStyle, true), [
{
color: semanticColors.disabledText,
cursor: 'default',
selectors: (_b = {},
_b[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'GrayText',
border: 'none',
},
_b),
},
], false);
var titleOpenBorderRadius = calloutRenderEdge === _Positioning__rspack_import_3.RectangleEdge.bottom
? "".concat(effects.roundedCorner2, " ").concat(effects.roundedCorner2, " 0 0")
: "0 0 ".concat(effects.roundedCorner2, " ").concat(effects.roundedCorner2);
var calloutOpenBorderRadius = calloutRenderEdge === _Positioning__rspack_import_3.RectangleEdge.bottom
? "0 0 ".concat(effects.roundedCorner2, " ").concat(effects.roundedCorner2)
: "".concat(effects.roundedCorner2, " ").concat(effects.roundedCorner2, " 0 0");
return {
root: [globalClassnames.root, className],
label: globalClassnames.label,
dropdown: [
globalClassnames.dropdown,
_Styling__rspack_import_1.normalize,
fonts.medium,
{
color: semanticColors.menuItemText,
borderColor: semanticColors.focusBorder,
position: 'relative',
outline: 0,
userSelect: 'none',
selectors: (_c = {},
_c['&:hover .' + globalClassnames.title] = [
!disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,
{ borderColor: isOpen ? palette.neutralSecondary : palette.neutralPrimary },
highContrastBorderState,
],
_c['&:focus .' + globalClassnames.title] = [
!disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,
{ selectors: (_d = {}, _d[_Styling__rspack_import_1.HighContrastSelector] = { color: 'Highlight' }, _d) },
],
_c['&:focus:after'] = [
{
pointerEvents: 'none',
content: "''",
position: 'absolute',
boxSizing: 'border-box',
top: '0px',
left: '0px',
width: '100%',
height: '100%',
// see https://github.com/microsoft/fluentui/pull/9182 for semantic color disc
border: !disabled ? "2px solid ".concat(palette.themePrimary) : 'none',
borderRadius: '2px',
selectors: (_e = {},
_e[_Styling__rspack_import_1.HighContrastSelector] = {
color: 'Highlight',
},
_e),
},
],
_c['&:active .' + globalClassnames.title] = [
!disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,
{ borderColor: palette.themePrimary },
highContrastBorderState,
],
_c['&:hover .' + globalClassnames.caretDown] = !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
_c['&:focus .' + globalClassnames.caretDown] = [
!disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
{ selectors: (_f = {}, _f[_Styling__rspack_import_1.HighContrastSelector] = { color: 'Highlight' }, _f) },
],
_c['&:active .' + globalClassnames.caretDown] = !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
_c['&:hover .' + globalClassnames.titleIsPlaceHolder] = !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
_c['&:focus .' + globalClassnames.titleIsPlaceHolder] = !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
_c['&:active .' + globalClassnames.titleIsPlaceHolder] = !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,
_c['&:hover .' + globalClassnames.titleHasError] = borderColorError,
_c['&:active .' + globalClassnames.titleHasError] = borderColorError,
_c),
},
isOpen && 'is-open',
disabled && 'is-disabled',
required && 'is-required',
required &&
!hasLabel && {
selectors: (_g = {
':before': {
content: "'*'",
color: semanticColors.errorText,
position: 'absolute',
top: -5,
right: -10,
}
},
_g[_Styling__rspack_import_1.HighContrastSelector] = {
selectors: {
':after': {
right: -14, // moving the * 4 pixel to right to alleviate border clipping in HC mode.
},
},
},
_g),
},
],
title: [
globalClassnames.title,
_Styling__rspack_import_1.normalize,
{
backgroundColor: semanticColors.inputBackground,
borderWidth: 1,
borderStyle: 'solid',
borderColor: semanticColors.inputBorder,
borderRadius: isOpen ? titleOpenBorderRadius : effects.roundedCorner2,
cursor: 'pointer',
display: 'block',
height: DROPDOWN_HEIGHT,
lineHeight: DROPDOWN_HEIGHT - 2,
padding: "0 28px 0 8px",
position: 'relative',
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
},
isRenderingPlaceholder && [globalClassnames.titleIsPlaceHolder, { color: semanticColors.inputPlaceholderText }],
hasError && [globalClassnames.titleHasError, borderColorError],
disabled && {
backgroundColor: semanticColors.disabledBackground,
border: 'none',
color: semanticColors.disabledText,
cursor: 'default',
selectors: (_h = {},
_h[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_0.__assign)({ border: '1px solid GrayText', color: 'GrayText', backgroundColor: 'Window' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_h),
},
],
caretDownWrapper: [
globalClassnames.caretDownWrapper,
{
height: DROPDOWN_HEIGHT,
lineHeight: DROPDOWN_HEIGHT - 2, // height minus the border
paddingTop: 1,
position: 'absolute',
right: 8,
top: 0,
},
!disabled && {
cursor: 'pointer',
},
],
caretDown: [
globalClassnames.caretDown,
{ color: palette.neutralSecondary, fontSize: fonts.small.fontSize, pointerEvents: 'none' },
disabled && {
color: semanticColors.disabledText,
selectors: (_j = {},
_j[_Styling__rspack_import_1.HighContrastSelector] = (0,tslib__rspack_import_0.__assign)({ color: 'GrayText' }, (0,_Styling__rspack_import_1.getHighContrastNoAdjustStyle)()),
_j),
},
],
errorMessage: (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({ color: semanticColors.errorText }, theme.fonts.small), { paddingTop: 5 }),
callout: [
globalClassnames.callout,
{
boxShadow: effects.elevation8,
borderRadius: calloutOpenBorderRadius,
selectors: (_k = {},
_k['.ms-Callout-main'] = { borderRadius: calloutOpenBorderRadius },
_k),
},
calloutClassName,
],
dropdownItemsWrapper: { selectors: { '&:focus': { outline: 0 } } },
dropdownItems: [globalClassnames.dropdownItems, { display: 'block' }],
dropdownItem: (0,tslib__rspack_import_0.__spreadArray)((0,tslib__rspack_import_0.__spreadArray)([], dropdownItemStyle, true), [itemSelectors()], false),
dropdownItemSelected: dropdownItemSelected,
dropdownItemDisabled: dropdownItemDisabled,
dropdownItemSelectedAndDisabled: [dropdownItemSelected, dropdownItemDisabled, { backgroundColor: 'transparent' }],
dropdownItemHidden: (0,tslib__rspack_import_0.__spreadArray)((0,tslib__rspack_import_0.__spreadArray)([], dropdownItemStyle, true), [{ display: 'none' }], false),
dropdownDivider: [globalClassnames.dropdownDivider, { height: 1, backgroundColor: semanticColors.bodyDivider }],
dropdownDividerHidden: [globalClassnames.dropdownDivider, { display: 'none' }],
dropdownOptionText: [
globalClassnames.dropdownOptionText,
{
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
minWidth: 0,
maxWidth: '100%',
wordWrap: 'break-word',
overflowWrap: 'break-word',
margin: '1px',
},
],
dropdownItemHeader: dropdownHeaderStyle,
dropdownItemHeaderHidden: (0,tslib__rspack_import_0.__spreadArray)((0,tslib__rspack_import_0.__spreadArray)([], dropdownHeaderStyle, true), [{ display: 'none' }], false),
subComponentStyles: {
label: { root: { display: 'inline-block' } },
multiSelectItem: {
root: {
padding: 0,
},
label: {
alignSelf: 'stretch',
padding: '0 8px',
width: '100%',
},
input: {
selectors: (_l = {},
// eslint-disable-next-line @fluentui/max-len
_l[".".concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, " &:focus + label::before, :host(.").concat(_Utilities__rspack_import_2.IsFocusVisibleClassName, ") &:focus + label::before")] = {
outlineOffset: '0px',
},
_l),
},
},
panel: {
root: [panelClassName],
main: {
selectors: (_m = {},
// In case of extra small screen sizes
_m[MinimumScreenSelector] = {
// panelWidth xs
width: 272,
},
_m),
},
contentInner: { padding: '0 0 20px' },
},
},
};
};
//# sourceMappingURL=Dropdown.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Dropdown/utilities/DropdownSizePosCache.js":
/*!************************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Dropdown/utilities/DropdownSizePosCache.js ***!
\************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DropdownSizePosCache: () => (DropdownSizePosCache)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Dropdown_types__rspack_import_0 = __webpack_require__(/*! ../Dropdown.types */ "./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js");
/**
* A utility class to cache size and position in cache.
*
* Dropdown options has non-selectable display types. It is therefore not cheap to determine
* the total number of actual selectable options as well as the position an option is in the
* list of options - O(n) cost for each lookup.
*
* Given that we potentially have to make this determination on every single render pass, this
* cache should provide a little bit of relief.
*/
var DropdownSizePosCache = /** @class */ (function () {
function DropdownSizePosCache() {
this._size = 0;
}
/**
* Invalidates the cache and recalculate the size of selectable options.
*/
DropdownSizePosCache.prototype.updateOptions = function (options) {
var displayOnlyOptionsCache = [];
var notSelectableOptionsCache = [];
var size = 0;
for (var i = 0; i < options.length; i++) {
var _a = options[i], itemType = _a.itemType, hidden = _a.hidden;
if (itemType === _Dropdown_types__rspack_import_0.SelectableOptionMenuItemType.Divider || itemType === _Dropdown_types__rspack_import_0.SelectableOptionMenuItemType.Header) {
displayOnlyOptionsCache.push(i);
notSelectableOptionsCache.push(i);
}
else if (hidden) {
notSelectableOptionsCache.push(i);
}
else {
size++;
}
}
this._size = size;
this._displayOnlyOptionsCache = displayOnlyOptionsCache;
this._notSelectableOptionsCache = notSelectableOptionsCache;
this._cachedOptions = (0,tslib__rspack_import_1.__spreadArray)([], options, true);
};
Object.defineProperty(DropdownSizePosCache.prototype, "optionSetSize", {
/**
* The size of all the selectable options.
*/
get: function () {
return this._size;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DropdownSizePosCache.prototype, "cachedOptions", {
/**
* The chached options array.
*/
get: function () {
return this._cachedOptions;
},
enumerable: false,
configurable: true
});
/**
* Returns the position of this option element relative to the full set of selectable option elements.
* Note: the first selectable element is position 1 in the set.
* @param index The raw index of the option element.
*/
DropdownSizePosCache.prototype.positionInSet = function (index) {
if (index === undefined) {
return undefined;
}
// we could possibly memoize this too but this should be good enough, most of the time (the expectation is that
// when you have a lot of options, the selectable options will heavily dominate over the non-selectable options.
var offset = 0;
while (index > this._notSelectableOptionsCache[offset]) {
offset++;
}
if (this._displayOnlyOptionsCache[offset] === index) {
throw new Error("Unexpected: Option at index ".concat(index, " is not a selectable element."));
}
if (this._notSelectableOptionsCache[offset] === index) {
return undefined;
}
return index - offset + 1;
};
return DropdownSizePosCache;
}());
//# sourceMappingURL=DropdownSizePosCache.js.map
}),
"./node_modules/@fluentui/react/lib/components/Fabric/Fabric.base.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Fabric/Fabric.base.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FabricBase: () => (FabricBase)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/FocusRectsProvider.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/customizations/Customizer.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _Styling__rspack_import_3 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/theme/lib/createTheme.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var getFabricTheme = (0,_Utilities__rspack_import_2.memoizeFunction)(function (theme, isRTL) { return (0,_Styling__rspack_import_3.createTheme)((0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, theme), { rtl: isRTL })); });
var getDir = function (_a) {
var theme = _a.theme, dir = _a.dir;
var contextDir = (0,_Utilities__rspack_import_5.getRTL)(theme) ? 'rtl' : 'ltr';
var pageDir = (0,_Utilities__rspack_import_5.getRTL)() ? 'rtl' : 'ltr';
var componentDir = dir ? dir : contextDir;
return {
// If Fabric dir !== contextDir
// Or If contextDir !== pageDir
// Then we need to set dir of the Fabric root
rootDir: componentDir !== contextDir || componentDir !== pageDir ? componentDir : dir,
// If dir !== contextDir || pageDir
// then set contextual theme around content
needsTheme: componentDir !== contextDir,
};
};
var FabricBase = react__rspack_import_0.forwardRef(function (props, ref) {
var className = props.className, theme = props.theme, applyTheme = props.applyTheme, applyThemeToBody = props.applyThemeToBody, styles = props.styles;
var classNames = getClassNames(styles, {
theme: theme,
applyTheme: applyTheme,
className: className,
});
var rootElement = react__rspack_import_0.useRef(null);
useApplyThemeToBody(applyThemeToBody, classNames, rootElement);
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, useRenderedContent(props, classNames, rootElement, ref));
});
FabricBase.displayName = 'FabricBase';
function useRenderedContent(props, _a, rootElement, ref) {
var root = _a.root;
var _b = props.as, Root = _b === void 0 ? 'div' : _b, dir = props.dir, theme = props.theme;
var divProps = (0,_Utilities__rspack_import_6.getNativeProps)(props, _Utilities__rspack_import_6.divProperties, ['dir']);
var _c = getDir(props), rootDir = _c.rootDir, needsTheme = _c.needsTheme;
var renderedContent = (react__rspack_import_0.createElement(_Utilities__rspack_import_7.FocusRectsProvider, { providerRef: rootElement },
react__rspack_import_0.createElement(Root, (0,tslib__rspack_import_4.__assign)({ dir: rootDir }, divProps, { className: root, ref: (0,_fluentui_react_hooks__rspack_import_8.useMergedRefs)(rootElement, ref) }))));
// Create the contextual theme if component direction does not match parent direction.
if (needsTheme) {
// Disabling ThemeProvider here because theme doesn't need to be re-provided by ThemeProvider if dir has changed.
renderedContent = (
// eslint-disable-next-line @typescript-eslint/no-deprecated
react__rspack_import_0.createElement(_Utilities__rspack_import_9.Customizer, { settings: { theme: getFabricTheme(theme, dir === 'rtl') } }, renderedContent));
}
return renderedContent;
}
function useApplyThemeToBody(applyThemeToBody, _a, rootElement) {
var bodyThemed = _a.bodyThemed;
react__rspack_import_0.useEffect(function () {
if (applyThemeToBody) {
var currentDoc_1 = (0,_Utilities__rspack_import_10.getDocument)(rootElement.current);
if (currentDoc_1) {
currentDoc_1.body.classList.add(bodyThemed);
return function () {
currentDoc_1.body.classList.remove(bodyThemed);
};
}
}
}, [bodyThemed, applyThemeToBody, rootElement]);
return rootElement;
}
//# sourceMappingURL=Fabric.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Fabric/Fabric.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Fabric/Fabric.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Fabric: () => (Fabric)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Fabric_base__rspack_import_1 = __webpack_require__(/*! ./Fabric.base */ "./node_modules/@fluentui/react/lib/components/Fabric/Fabric.base.js");
/* import */ var _Fabric_styles__rspack_import_2 = __webpack_require__(/*! ./Fabric.styles */ "./node_modules/@fluentui/react/lib/components/Fabric/Fabric.styles.js");
/**
* @deprecated This component is deprecated as of `@fluentui/react` version 8. Use `ThemeProvider` instead.
*/
var Fabric = (0,_Utilities__rspack_import_0.styled)(_Fabric_base__rspack_import_1.FabricBase, _Fabric_styles__rspack_import_2.getStyles, undefined, {
scope: 'Fabric',
});
//# sourceMappingURL=Fabric.js.map
}),
"./node_modules/@fluentui/react/lib/components/Fabric/Fabric.styles.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Fabric/Fabric.styles.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var inheritFont = { fontFamily: 'inherit' };
var GlobalClassNames = {
root: 'ms-Fabric',
bodyThemed: 'ms-Fabric-bodyThemed',
};
var getStyles = function (props) {
var applyTheme = props.applyTheme, className = props.className, preventBlanketFontInheritance = props.preventBlanketFontInheritance, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
theme.fonts.medium,
{
color: theme.palette.neutralPrimary,
},
!preventBlanketFontInheritance && {
'& button': inheritFont,
'& input': inheritFont,
'& textarea': inheritFont,
},
// apply theme to only if applyTheme is true
applyTheme && {
color: theme.semanticColors.bodyText,
backgroundColor: theme.semanticColors.bodyBackground,
},
className,
],
bodyThemed: [
{
backgroundColor: theme.semanticColors.bodyBackground,
},
],
};
};
//# sourceMappingURL=Fabric.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/FocusTrapZone/FocusTrapZone.js":
/*!************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/FocusTrapZone/FocusTrapZone.js ***!
\************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FocusTrapZone: () => (FocusTrapZone)
});
/* import */ var tslib__rspack_import_17 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesShadowRoot.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/getActiveElement.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/getEventTarget.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/on.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/modalize.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _fluentui_react_hooks__rspack_import_1 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _fluentui_react_hooks__rspack_import_7 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _fluentui_react_hooks__rspack_import_10 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useEventCallback.js");
/* import */ var _fluentui_react_hooks__rspack_import_16 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useUnmount.js");
/* import */ var _WindowProvider__rspack_import_2 = __webpack_require__(/*! ../../WindowProvider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _utilities_dom__rspack_import_3 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var COMPONENT_NAME = 'FocusTrapZone';
var DEFAULT_PROPS = {
disabled: false,
disableFirstFocus: false,
forceFocusInsideTrap: true,
isClickableOutsideFocusTrap: false,
// Hardcoding completely uncontrolled flag for proper interop with FluentUI V9.
'data-tabster': '{"uncontrolled": {"completely": true}}',
};
var useComponentRef = function (componentRef, previouslyFocusedElement, focusFTZ) {
react__rspack_import_0.useImperativeHandle(componentRef, function () { return ({
get previouslyFocusedElement() {
return previouslyFocusedElement;
},
focus: focusFTZ,
}); }, [focusFTZ, previouslyFocusedElement]);
};
var FocusTrapZone = react__rspack_import_0.forwardRef(function (propsWithoutDefaults, ref) {
var _a;
var root = react__rspack_import_0.useRef(null);
var firstBumper = react__rspack_import_0.useRef(null);
var lastBumper = react__rspack_import_0.useRef(null);
var mergedRootRef = (0,_fluentui_react_hooks__rspack_import_1.useMergedRefs)(root, ref);
var doc = (0,_WindowProvider__rspack_import_2.useDocument)();
var win = (0,_utilities_dom__rspack_import_3.useWindowEx)();
var inShadow = (0,_Utilities__rspack_import_4.useHasMergeStylesShadowRootContext)();
var isFirstRender = (_a = (0,_fluentui_react_hooks__rspack_import_5.usePrevious)(false)) !== null && _a !== void 0 ? _a : true;
var props = (0,_Utilities__rspack_import_6.getPropsWithDefaults)(DEFAULT_PROPS, propsWithoutDefaults);
var internalState = (0,_fluentui_react_hooks__rspack_import_7.useConst)({
hasFocus: false,
focusStackId: (0,_fluentui_react_hooks__rspack_import_8.useId)('ftz-', props.id),
});
var children = props.children, componentRef = props.componentRef, disabled = props.disabled, disableFirstFocus = props.disableFirstFocus, forceFocusInsideTrap = props.forceFocusInsideTrap, focusPreviouslyFocusedInnerElement = props.focusPreviouslyFocusedInnerElement,
// eslint-disable-next-line @typescript-eslint/no-deprecated
firstFocusableSelector = props.firstFocusableSelector, firstFocusableTarget = props.firstFocusableTarget,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_b = props.disableRestoreFocus,
// eslint-disable-next-line @typescript-eslint/no-deprecated
disableRestoreFocus = _b === void 0 ? props.ignoreExternalFocusing : _b, isClickableOutsideFocusTrap = props.isClickableOutsideFocusTrap, enableAriaHiddenSiblings = props.enableAriaHiddenSiblings;
var bumperProps = {
'aria-hidden': true,
style: {
pointerEvents: 'none',
position: 'fixed', // 'fixed' prevents browsers from scrolling to bumpers when viewport does not contain them
},
tabIndex: disabled ? -1 : 0, // make bumpers tabbable only when enabled
'data-is-visible': true,
'data-is-focus-trap-zone-bumper': true,
};
var focusElementAsync = react__rspack_import_0.useCallback(function (element) {
if (element !== firstBumper.current && element !== lastBumper.current) {
(0,_Utilities__rspack_import_9.focusAsync)(element);
}
}, []);
/**
* Callback to force focus into FTZ (named to avoid overlap with global focus() callback).
* useEventCallback always returns the same callback reference but updates the implementation
* every render to avoid stale captured values.
*/
var focusFTZ = (0,_fluentui_react_hooks__rspack_import_10.useEventCallback)(function () {
if (!root.current) {
return; // not done mounting
}
var previouslyFocusedElementInTrapZone = internalState.previouslyFocusedElementInTrapZone;
if (focusPreviouslyFocusedInnerElement &&
previouslyFocusedElementInTrapZone &&
(0,_Utilities__rspack_import_11.elementContains)(root.current, previouslyFocusedElementInTrapZone)) {
// focus on the last item that had focus in the zone before we left the zone
focusElementAsync(previouslyFocusedElementInTrapZone);
return;
}
var firstFocusableChild = null;
if (typeof firstFocusableTarget === 'string') {
firstFocusableChild = root.current.querySelector(firstFocusableTarget);
}
else if (firstFocusableTarget) {
firstFocusableChild = firstFocusableTarget(root.current);
}
else if (firstFocusableSelector) {
var focusSelector = typeof firstFocusableSelector === 'string' ? firstFocusableSelector : firstFocusableSelector();
firstFocusableChild = root.current.querySelector('.' + focusSelector);
}
// Fall back to first element if query selector did not match any elements.
if (!firstFocusableChild) {
firstFocusableChild = (0,_Utilities__rspack_import_9.getNextElement)(root.current, root.current.firstChild, false, false, false, true, undefined, undefined, undefined, inShadow);
}
if (firstFocusableChild) {
focusElementAsync(firstFocusableChild);
}
});
/** Used in root div focus/blur handlers */
var focusBumper = function (isFirstBumper) {
if (disabled || !root.current) {
return;
}
var nextFocusable = isFirstBumper === internalState.hasFocus
? (0,_Utilities__rspack_import_9.getLastTabbable)(root.current, lastBumper.current, true, false, inShadow)
: (0,_Utilities__rspack_import_9.getFirstTabbable)(root.current, firstBumper.current, true, false, inShadow);
if (nextFocusable) {
if (nextFocusable === firstBumper.current || nextFocusable === lastBumper.current) {
// This can happen when FTZ contains no tabbable elements.
// focusFTZ() will take care of finding a focusable element in FTZ.
focusFTZ();
}
else {
nextFocusable.focus();
}
}
};
/** Root div blur handler (doesn't need useCallback since it's for a native element) */
var onRootBlurCapture = function (ev) {
var _a;
(_a = props.onBlurCapture) === null || _a === void 0 ? void 0 : _a.call(props, ev);
var relatedTarget = ev.relatedTarget;
if (ev.relatedTarget === null) {
// In IE11, due to lack of support, event.relatedTarget is always
// null making every onBlur call to be "outside" of the root
// even when it's not. Using document.activeElement is another way
// for us to be able to get what the relatedTarget without relying
// on the event
relatedTarget = (0,_Utilities__rspack_import_12.getActiveElement)(doc);
}
if (!(0,_Utilities__rspack_import_11.elementContains)(root.current, relatedTarget)) {
internalState.hasFocus = false;
}
};
/** Root div focus handler (doesn't need useCallback since it's for a native element) */
var onRootFocusCapture = function (ev) {
var _a;
(_a = props.onFocusCapture) === null || _a === void 0 ? void 0 : _a.call(props, ev);
if (ev.target === firstBumper.current) {
focusBumper(true);
}
else if (ev.target === lastBumper.current) {
focusBumper(false);
}
internalState.hasFocus = true;
if (ev.target !== ev.currentTarget && !(ev.target === firstBumper.current || ev.target === lastBumper.current)) {
// every time focus changes within the trap zone, remember the focused element so that
// it can be restored if focus leaves the pane and returns via keystroke (i.e. via a call to this.focus(true))
internalState.previouslyFocusedElementInTrapZone = (0,_Utilities__rspack_import_13.getEventTarget)(ev.nativeEvent);
}
};
/** Called to restore focus on unmount or props change. (useEventCallback ensures latest prop values are used.) */
var returnFocusToInitiator = (0,_fluentui_react_hooks__rspack_import_10.useEventCallback)(function (elementToFocusOnDismiss) {
FocusTrapZone.focusStack = FocusTrapZone.focusStack.filter(function (value) { return internalState.focusStackId !== value; });
if (!doc) {
return;
}
// Do not use getActiveElement() here.
// When the FTZ is in shadow DOM focus returns to the
// shadow host rather than body so we need to be
// able to inspect that
var activeElement = doc.activeElement;
if (!disableRestoreFocus &&
typeof (elementToFocusOnDismiss === null || elementToFocusOnDismiss === void 0 ? void 0 : elementToFocusOnDismiss.focus) === 'function' &&
// only restore focus if the current focused element is within the FTZ, or if nothing is focused
((0,_Utilities__rspack_import_11.elementContains)(root.current, activeElement) || activeElement === doc.body || activeElement.shadowRoot)) {
focusElementAsync(elementToFocusOnDismiss);
}
});
/** Called in window event handlers. (useEventCallback ensures latest prop values are used.) */
var forceFocusOrClickInTrap = (0,_fluentui_react_hooks__rspack_import_10.useEventCallback)(function (ev) {
// be sure to use the latest values here
if (disabled) {
return;
}
if (internalState.focusStackId === FocusTrapZone.focusStack.slice(-1)[0]) {
var targetElement = (0,_Utilities__rspack_import_13.getEventTarget)(ev);
if (targetElement && !(0,_Utilities__rspack_import_11.elementContains)(root.current, targetElement)) {
if (doc && (0,_Utilities__rspack_import_12.getActiveElement)(doc) === doc.body) {
setTimeout(function () {
if (doc && (0,_Utilities__rspack_import_12.getActiveElement)(doc) === doc.body) {
focusFTZ();
internalState.hasFocus = true; // set focus here since we stop event propagation
}
}, 0);
}
else {
focusFTZ();
internalState.hasFocus = true; // set focus here since we stop event propagation
}
ev.preventDefault();
ev.stopPropagation();
}
}
});
// Update window event handlers when relevant props change
react__rspack_import_0.useEffect(function () {
var disposables = [];
if (forceFocusInsideTrap) {
disposables.push((0,_Utilities__rspack_import_14.on)(win, 'focus', forceFocusOrClickInTrap, true));
}
if (!isClickableOutsideFocusTrap) {
disposables.push((0,_Utilities__rspack_import_14.on)(win, 'click', forceFocusOrClickInTrap, true));
}
return function () {
disposables.forEach(function (dispose) { return dispose(); });
};
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run when these two props change
}, [forceFocusInsideTrap, isClickableOutsideFocusTrap, win]);
// On prop change or first render, focus the FTZ and update focusStack if appropriate
react__rspack_import_0.useEffect(function () {
// Do nothing if disabled, or if it's a re-render and forceFocusInsideTrap is false
// (to match existing behavior, the FTZ handles first focus even if forceFocusInsideTrap
// is false, though it's debatable whether it should do this)
if (disabled || (!isFirstRender && !forceFocusInsideTrap) || !root.current) {
return;
}
// Transition from forceFocusInsideTrap / FTZ disabled to enabled (or initial mount)
FocusTrapZone.focusStack.push(internalState.focusStackId);
var elementToFocusOnDismiss = props.elementToFocusOnDismiss || (0,_Utilities__rspack_import_12.getActiveElement)(doc);
if (!disableFirstFocus && !(0,_Utilities__rspack_import_11.elementContains)(root.current, elementToFocusOnDismiss)) {
focusFTZ();
}
// To match existing behavior, always return focus on cleanup (even if we didn't handle
// initial focus), but it's debatable whether that's correct
return function () { return returnFocusToInitiator(elementToFocusOnDismiss); };
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run when these two props change
}, [forceFocusInsideTrap, disabled]);
// Handle modalization separately from first focus
react__rspack_import_0.useEffect(function () {
if (!disabled && enableAriaHiddenSiblings) {
var unmodalize = (0,_Utilities__rspack_import_15.modalize)(root.current);
return unmodalize;
}
}, [disabled, enableAriaHiddenSiblings, root]);
// Cleanup lifecyle method for internalState.
(0,_fluentui_react_hooks__rspack_import_16.useUnmount)(function () {
// Dispose of element references so the DOM Nodes can be garbage-collected
delete internalState.previouslyFocusedElementInTrapZone;
});
useComponentRef(componentRef, internalState.previouslyFocusedElementInTrapZone, focusFTZ);
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_17.__assign)({ "aria-labelledby": props.ariaLabelledBy }, (0,_Utilities__rspack_import_18.getNativeProps)(props, _Utilities__rspack_import_18.divProperties), { ref: mergedRootRef, onFocusCapture: onRootFocusCapture, onBlurCapture: onRootBlurCapture }),
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_17.__assign)({}, bumperProps, { ref: firstBumper })),
children,
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_17.__assign)({}, bumperProps, { ref: lastBumper }))));
});
FocusTrapZone.displayName = COMPONENT_NAME;
FocusTrapZone.focusStack = [];
//# sourceMappingURL=FocusTrapZone.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/FontIcon.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/FontIcon.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FontIcon: () => (FontIcon),
getFontIcon: () => (getFontIcon),
getIconContent: () => (getIconContent)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Icon_styles__rspack_import_6 = __webpack_require__(/*! ./Icon.styles */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.styles.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Styling__rspack_import_2 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var getIconContent = (0,_Utilities__rspack_import_1.memoizeFunction)(function (iconName) {
var _a = (0,_Styling__rspack_import_2.getIcon)(iconName) || {
subset: {},
code: undefined,
}, code = _a.code, subset = _a.subset;
if (!code) {
return null;
}
return {
children: code,
iconClassName: subset.className,
fontFamily: subset.fontFace && subset.fontFace.fontFamily,
mergeImageProps: subset.mergeImageProps,
};
}, undefined, true /*ignoreNullOrUndefinedResult */);
/**
* Fast icon component which only supports font glyphs (not images) and can't be targeted by customizations.
* To style the icon, use `className` or reference `ms-Icon` in CSS.
* {@docCategory Icon}
*/
var FontIcon = function (props) {
var iconName = props.iconName, className = props.className, _a = props.style, style = _a === void 0 ? {} : _a;
var iconContent = getIconContent(iconName) || {};
var iconClassName = iconContent.iconClassName, children = iconContent.children, fontFamily = iconContent.fontFamily, mergeImageProps = iconContent.mergeImageProps;
var nativeProps = (0,_Utilities__rspack_import_3.getNativeProps)(props, _Utilities__rspack_import_3.htmlElementProperties);
var accessibleName = props['aria-label'] || props.title;
var containerProps = props['aria-label'] || props['aria-labelledby'] || props.title
? {
role: mergeImageProps ? undefined : 'img',
}
: {
'aria-hidden': true,
};
var finalChildren = children;
if (mergeImageProps) {
if (typeof children === 'object' && typeof children.props === 'object' && accessibleName) {
finalChildren = react__rspack_import_0.cloneElement(children, { alt: accessibleName });
}
}
return (react__rspack_import_0.createElement("i", (0,tslib__rspack_import_4.__assign)({ "data-icon-name": iconName }, containerProps, nativeProps, (mergeImageProps
? {
title: undefined,
'aria-label': undefined,
}
: {}), { className: (0,_Utilities__rspack_import_5.css)(_Icon_styles__rspack_import_6.MS_ICON, _Icon_styles__rspack_import_6.classNames.root, iconClassName, !iconName && _Icon_styles__rspack_import_6.classNames.placeholder, className),
// Apply the font family this way to ensure it doesn't get overridden by Fabric Core ms-Icon styles
// https://github.com/microsoft/fluentui/issues/10449
style: (0,tslib__rspack_import_4.__assign)({ fontFamily: fontFamily }, style) }), finalChildren));
};
/**
* Memoized helper for rendering a FontIcon.
* @param iconName - The name of the icon to use from the icon font.
* @param className - Class name for styling the icon.
* @param ariaLabel - Label for the icon for the benefit of screen readers.
* {@docCategory Icon}
*/
var getFontIcon = (0,_Utilities__rspack_import_1.memoizeFunction)(function (iconName, className, ariaLabel) {
return FontIcon({ iconName: iconName, className: className, 'aria-label': ariaLabel });
});
//# sourceMappingURL=FontIcon.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/Icon.base.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/Icon.base.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
IconBase: () => (IconBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Icon_types__rspack_import_4 = __webpack_require__(/*! ./Icon.types */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.types.js");
/* import */ var _Image_Image__rspack_import_7 = __webpack_require__(/*! ../Image/Image */ "./node_modules/@fluentui/react/lib/components/Image/Image.js");
/* import */ var _Image_Image_types__rspack_import_3 = __webpack_require__(/*! ../Image/Image.types */ "./node_modules/@fluentui/react/lib/components/Image/Image.types.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _FontIcon__rspack_import_5 = __webpack_require__(/*! ./FontIcon */ "./node_modules/@fluentui/react/lib/components/Icon/FontIcon.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)({
// Icon is used a lot by other components.
// It's likely to see expected cases which pass different className to the Icon.
// Therefore setting a larger cache size.
cacheSize: 100,
});
var IconBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(IconBase, _super);
function IconBase(props) {
var _this = _super.call(this, props) || this;
_this._onImageLoadingStateChange = function (state) {
if (_this.props.imageProps && _this.props.imageProps.onLoadingStateChange) {
_this.props.imageProps.onLoadingStateChange(state);
}
if (state === _Image_Image_types__rspack_import_3.ImageLoadState.error) {
_this.setState({ imageLoadError: true });
}
};
_this.state = {
imageLoadError: false,
};
return _this;
}
IconBase.prototype.render = function () {
var _a = this.props, children = _a.children, className = _a.className, styles = _a.styles, iconName = _a.iconName, imageErrorAs = _a.imageErrorAs, theme = _a.theme;
var isPlaceholder = typeof iconName === 'string' && iconName.length === 0;
var isImage =
// eslint-disable-next-line @typescript-eslint/no-deprecated
!!this.props.imageProps || this.props.iconType === _Icon_types__rspack_import_4.IconType.image || this.props.iconType === _Icon_types__rspack_import_4.IconType.Image;
var iconContent = (0,_FontIcon__rspack_import_5.getIconContent)(iconName) || {};
var iconClassName = iconContent.iconClassName, iconContentChildren = iconContent.children, mergeImageProps = iconContent.mergeImageProps;
var classNames = getClassNames(styles, {
theme: theme,
className: className,
iconClassName: iconClassName,
isImage: isImage,
isPlaceholder: isPlaceholder,
});
var RootType = isImage ? 'span' : 'i';
var nativeProps = (0,_Utilities__rspack_import_6.getNativeProps)(this.props, _Utilities__rspack_import_6.htmlElementProperties, [
'aria-label',
]);
var imageLoadError = this.state.imageLoadError;
var imageProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, this.props.imageProps), { onLoadingStateChange: this._onImageLoadingStateChange });
var ImageType = (imageLoadError && imageErrorAs) || _Image_Image__rspack_import_7.Image;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
var accessibleName = imageProps.alt || ariaLabel || this.props.title;
var hasName = !!(accessibleName ||
this.props['aria-labelledby'] ||
imageProps['aria-label'] ||
imageProps['aria-labelledby']);
var containerProps = hasName
? {
role: isImage || mergeImageProps ? undefined : 'img',
'aria-label': isImage || mergeImageProps ? undefined : accessibleName,
}
: {
'aria-hidden': true,
};
var finalIconContentChildren = iconContentChildren;
if (mergeImageProps && iconContentChildren && typeof iconContentChildren === 'object' && accessibleName) {
finalIconContentChildren = react__rspack_import_0.cloneElement(iconContentChildren, {
alt: accessibleName,
});
}
return (react__rspack_import_0.createElement(RootType, (0,tslib__rspack_import_2.__assign)({ "data-icon-name": iconName }, containerProps, nativeProps, (mergeImageProps
? {
title: undefined,
'aria-label': undefined,
}
: {}), { className: classNames.root }), isImage ? react__rspack_import_0.createElement(ImageType, (0,tslib__rspack_import_2.__assign)({}, imageProps)) : children || finalIconContentChildren));
};
return IconBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Icon.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/Icon.js":
/*!******************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/Icon.js ***!
\******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Icon: () => (Icon)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Icon_base__rspack_import_1 = __webpack_require__(/*! ./Icon.base */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.base.js");
/* import */ var _Icon_styles__rspack_import_2 = __webpack_require__(/*! ./Icon.styles */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.styles.js");
/**
* Legacy Icon component which can be targeted by customization. It's recommended to use `FontIcon`
* or `ImageIcon` instead, especially in scenarios where rendering performance is important.
* {@docCategory Icon}
*/
var Icon = (0,_Utilities__rspack_import_0.styled)(_Icon_base__rspack_import_1.IconBase, _Icon_styles__rspack_import_2.getStyles, undefined, {
scope: 'Icon',
}, true);
Icon.displayName = 'Icon';
//# sourceMappingURL=Icon.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/Icon.styles.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/Icon.styles.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MS_ICON: () => (MS_ICON),
classNames: () => (classNames),
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/** Class names used in themeable and non-themeable Icon components */
var classNames = (0,_Styling__rspack_import_0.mergeStyleSets)({
root: {
display: 'inline-block',
textDecoration: 'inherit',
},
placeholder: [
'ms-Icon-placeHolder',
{
width: '1em',
},
],
image: [
'ms-Icon-imageContainer',
{
overflow: 'hidden',
},
],
});
/** Class name used only in non-themeable Icon components */
var MS_ICON = 'ms-Icon';
var getStyles = function (props) {
var className = props.className, iconClassName = props.iconClassName, isPlaceholder = props.isPlaceholder, isImage = props.isImage, styles = props.styles;
return {
root: [
isPlaceholder && classNames.placeholder,
classNames.root,
isImage && classNames.image,
iconClassName,
className,
styles && styles.root,
// eslint-disable-next-line @typescript-eslint/no-deprecated
styles && styles.imageContainer,
],
};
};
//# sourceMappingURL=Icon.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/Icon.types.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/Icon.types.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
IconType: () => (IconType)
});
/**
* @deprecated Icon type is inferred based on presence of `IIconProps.imageProps`
* {@docCategory Icon}
*/
var IconType;
(function (IconType) {
/**
* Render using the fabric icon font.
* @deprecated Icon type is inferred based on presence of `IIconProps.imageProps`
*/
IconType[IconType["default"] = 0] = "default";
/**
* Render using an image, where imageProps would be used.
* @deprecated Icon type is inferred based on presence of `IIconProps.imageProps`
*/
IconType[IconType["image"] = 1] = "image";
/**
* @deprecated Icon type is inferred based on presence of `IIconProps.imageProps`
*/
IconType[IconType["Default"] = 100000] = "Default";
/**
* @deprecated Icon type is inferred based on presence of `IIconProps.imageProps`
*/
IconType[IconType["Image"] = 100001] = "Image";
})(IconType || (IconType = {}));
//# sourceMappingURL=Icon.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/Icon/ImageIcon.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Icon/ImageIcon.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ImageIcon: () => (ImageIcon)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Image_Image__rspack_import_5 = __webpack_require__(/*! ../Image/Image */ "./node_modules/@fluentui/react/lib/components/Image/Image.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Icon_styles__rspack_import_4 = __webpack_require__(/*! ./Icon.styles */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.styles.js");
/**
* Fast icon component which only supports images (not font glyphs) and can't be targeted by customizations.
* To style the icon, use `className` or reference `ms-Icon` in CSS.
* {@docCategory Icon}
*/
var ImageIcon = function (props) {
var className = props.className, imageProps = props.imageProps;
var nativeProps = (0,_Utilities__rspack_import_1.getNativeProps)(props, _Utilities__rspack_import_1.htmlElementProperties, [
'aria-label',
'aria-labelledby',
'title',
'aria-describedby',
]);
var altText = imageProps.alt || props['aria-label'];
var hasName = altText ||
props['aria-labelledby'] ||
props.title ||
imageProps['aria-label'] ||
imageProps['aria-labelledby'] ||
imageProps.title;
// move naming or describing attributes from the container (where they are invalid) to the image
var imageNameProps = {
'aria-labelledby': props['aria-labelledby'],
'aria-describedby': props['aria-describedby'],
title: props.title,
};
var containerProps = hasName
? {}
: {
'aria-hidden': true,
};
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_2.__assign)({}, containerProps, nativeProps, { className: (0,_Utilities__rspack_import_3.css)(_Icon_styles__rspack_import_4.MS_ICON, _Icon_styles__rspack_import_4.classNames.root, _Icon_styles__rspack_import_4.classNames.image, className) }),
react__rspack_import_0.createElement(_Image_Image__rspack_import_5.Image, (0,tslib__rspack_import_2.__assign)({}, imageNameProps, imageProps, { alt: hasName ? altText : '' }))));
};
//# sourceMappingURL=ImageIcon.js.map
}),
"./node_modules/@fluentui/react/lib/components/Image/Image.base.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Image/Image.base.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ImageBase: () => (ImageBase)
});
/* import */ var tslib__rspack_import_5 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Image_types__rspack_import_2 = __webpack_require__(/*! ./Image.types */ "./node_modules/@fluentui/react/lib/components/Image/Image.types.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js");
/* import */ var _fluentui_react_hooks__rspack_import_6 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var SVG_REGEX = /\.svg$/i;
var KEY_PREFIX = 'fabricImage';
function useLoadState(props, imageElement) {
var onLoadingStateChange = props.onLoadingStateChange, onLoad = props.onLoad, onError = props.onError, src = props.src;
var _a = react__rspack_import_0.useState(_Image_types__rspack_import_2.ImageLoadState.notLoaded), loadState = _a[0], setLoadState = _a[1];
(0,_fluentui_react_hooks__rspack_import_3.useIsomorphicLayoutEffect)(function () {
// If the src property changes, reset the load state
// (does nothing if the load state is already notLoaded)
setLoadState(_Image_types__rspack_import_2.ImageLoadState.notLoaded);
}, [src]);
// eslint-disable-next-line react-hooks/exhaustive-deps -- intended to run every render
react__rspack_import_0.useEffect(function () {
if (loadState === _Image_types__rspack_import_2.ImageLoadState.notLoaded) {
// testing if naturalWidth and naturalHeight are greater than zero is better than checking
// .complete, because .complete will also be set to true if the image breaks. However,
// for some browsers, SVG images do not have a naturalWidth or naturalHeight, so fall back
// to checking .complete for these images.
var isLoaded = imageElement.current
? (src && imageElement.current.naturalWidth > 0 && imageElement.current.naturalHeight > 0) ||
(imageElement.current.complete && SVG_REGEX.test(src))
: false;
if (isLoaded) {
setLoadState(_Image_types__rspack_import_2.ImageLoadState.loaded);
}
}
});
react__rspack_import_0.useEffect(function () {
onLoadingStateChange === null || onLoadingStateChange === void 0 ? void 0 : onLoadingStateChange(loadState);
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run when loadState changes
}, [loadState]);
var onImageLoaded = react__rspack_import_0.useCallback(function (ev) {
onLoad === null || onLoad === void 0 ? void 0 : onLoad(ev);
if (src) {
setLoadState(_Image_types__rspack_import_2.ImageLoadState.loaded);
}
}, [src, onLoad]);
var onImageError = react__rspack_import_0.useCallback(function (ev) {
onError === null || onError === void 0 ? void 0 : onError(ev);
setLoadState(_Image_types__rspack_import_2.ImageLoadState.error);
}, [onError]);
return [loadState, onImageLoaded, onImageError];
}
var ImageBase = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var frameElement = react__rspack_import_0.useRef(undefined);
var imageElement = react__rspack_import_0.useRef(undefined);
var _a = useLoadState(props, imageElement), loadState = _a[0], onImageLoaded = _a[1], onImageError = _a[2];
var imageProps = (0,_Utilities__rspack_import_4.getNativeProps)(props, _Utilities__rspack_import_4.imgProperties, [
'width',
'height',
]);
var src = props.src, alt = props.alt, width = props.width, height = props.height, _b = props.shouldFadeIn, shouldFadeIn = _b === void 0 ? true : _b, shouldStartVisible = props.shouldStartVisible, className = props.className, imageFit = props.imageFit, role = props.role, maximizeFrame = props.maximizeFrame, styles = props.styles, theme = props.theme, loading = props.loading;
var coverStyle = useCoverStyle(props, loadState, imageElement, frameElement);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
width: width,
height: height,
maximizeFrame: maximizeFrame,
shouldFadeIn: shouldFadeIn,
shouldStartVisible: shouldStartVisible,
isLoaded: loadState === _Image_types__rspack_import_2.ImageLoadState.loaded || (loadState === _Image_types__rspack_import_2.ImageLoadState.notLoaded && props.shouldStartVisible),
isLandscape: coverStyle === _Image_types__rspack_import_2.ImageCoverStyle.landscape,
isCenter: imageFit === _Image_types__rspack_import_2.ImageFit.center,
isCenterContain: imageFit === _Image_types__rspack_import_2.ImageFit.centerContain,
isCenterCover: imageFit === _Image_types__rspack_import_2.ImageFit.centerCover,
isContain: imageFit === _Image_types__rspack_import_2.ImageFit.contain,
isCover: imageFit === _Image_types__rspack_import_2.ImageFit.cover,
isNone: imageFit === _Image_types__rspack_import_2.ImageFit.none,
isError: loadState === _Image_types__rspack_import_2.ImageLoadState.error,
isNotImageFit: imageFit === undefined,
});
// If image dimensions aren't specified, the natural size of the image is used.
return (react__rspack_import_0.createElement("div", { className: classNames.root, style: { width: width, height: height }, ref: frameElement },
react__rspack_import_0.createElement("img", (0,tslib__rspack_import_5.__assign)({}, imageProps, { onLoad: onImageLoaded, onError: onImageError, key: KEY_PREFIX + props.src || '', className: classNames.image, ref: (0,_fluentui_react_hooks__rspack_import_6.useMergedRefs)(imageElement, forwardedRef), src: src, alt: alt, role: role, loading: loading }))));
});
ImageBase.displayName = 'ImageBase';
function useCoverStyle(props, loadState, imageElement, frameElement) {
var previousLoadState = react__rspack_import_0.useRef(loadState);
var coverStyle = react__rspack_import_0.useRef(undefined);
if (coverStyle === undefined ||
(previousLoadState.current === _Image_types__rspack_import_2.ImageLoadState.notLoaded && loadState === _Image_types__rspack_import_2.ImageLoadState.loaded)) {
coverStyle.current = computeCoverStyle(props, loadState, imageElement, frameElement);
}
previousLoadState.current = loadState;
return coverStyle.current;
}
function computeCoverStyle(props, loadState, imageElement, frameElement) {
var imageFit = props.imageFit, width = props.width, height = props.height;
// Do not compute cover style if it was already specified in props
if (props.coverStyle !== undefined) {
return props.coverStyle;
}
else if (loadState === _Image_types__rspack_import_2.ImageLoadState.loaded &&
(imageFit === _Image_types__rspack_import_2.ImageFit.cover ||
imageFit === _Image_types__rspack_import_2.ImageFit.contain ||
imageFit === _Image_types__rspack_import_2.ImageFit.centerContain ||
imageFit === _Image_types__rspack_import_2.ImageFit.centerCover) &&
imageElement.current &&
frameElement.current) {
// Determine the desired ratio using the width and height props.
// If those props aren't available, measure measure the frame.
var desiredRatio = void 0;
if (typeof width === 'number' &&
typeof height === 'number' &&
imageFit !== _Image_types__rspack_import_2.ImageFit.centerContain &&
imageFit !== _Image_types__rspack_import_2.ImageFit.centerCover) {
desiredRatio = width / height;
}
else {
desiredRatio = frameElement.current.clientWidth / frameElement.current.clientHeight;
}
// Examine the source image to determine its original ratio.
var naturalRatio = imageElement.current.naturalWidth / imageElement.current.naturalHeight;
// Should we crop from the top or the sides?
if (naturalRatio > desiredRatio) {
return _Image_types__rspack_import_2.ImageCoverStyle.landscape;
}
}
return _Image_types__rspack_import_2.ImageCoverStyle.portrait;
}
//# sourceMappingURL=Image.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Image/Image.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Image/Image.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Image: () => (Image)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Image_base__rspack_import_1 = __webpack_require__(/*! ./Image.base */ "./node_modules/@fluentui/react/lib/components/Image/Image.base.js");
/* import */ var _Image_styles__rspack_import_2 = __webpack_require__(/*! ./Image.styles */ "./node_modules/@fluentui/react/lib/components/Image/Image.styles.js");
var Image = (0,_Utilities__rspack_import_0.styled)(_Image_base__rspack_import_1.ImageBase, _Image_styles__rspack_import_2.getStyles, undefined, {
scope: 'Image',
}, true);
Image.displayName = 'Image';
//# sourceMappingURL=Image.js.map
}),
"./node_modules/@fluentui/react/lib/components/Image/Image.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Image/Image.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var GlobalClassNames = {
root: 'ms-Image',
rootMaximizeFrame: 'ms-Image--maximizeFrame',
image: 'ms-Image-image',
imageCenter: 'ms-Image-image--center',
imageContain: 'ms-Image-image--contain',
imageCover: 'ms-Image-image--cover',
imageCenterContain: 'ms-Image-image--centerContain',
imageCenterCover: 'ms-Image-image--centerCover',
imageNone: 'ms-Image-image--none',
imageLandscape: 'ms-Image-image--landscape',
imagePortrait: 'ms-Image-image--portrait',
};
var getStyles = function (props) {
var className = props.className, width = props.width, height = props.height, maximizeFrame = props.maximizeFrame, isLoaded = props.isLoaded, shouldFadeIn = props.shouldFadeIn, shouldStartVisible = props.shouldStartVisible, isLandscape = props.isLandscape, isCenter = props.isCenter, isContain = props.isContain, isCover = props.isCover, isCenterContain = props.isCenterContain, isCenterCover = props.isCenterCover, isNone = props.isNone, isError = props.isError, isNotImageFit = props.isNotImageFit, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
var ImageFitStyles = {
position: 'absolute',
left: '50% /* @noflip */',
top: '50%',
transform: 'translate(-50%,-50%)', // @todo test RTL renders transform: translate(50%,-50%);
};
// Cut the mustard using msMaxTouchPoints to detect IE11 which does not support CSS object-fit
var window = (0,_Utilities__rspack_import_1.getWindow)();
var supportsObjectFit = window !== undefined &&
// eslint-disable-next-line @fluentui/max-len
// cast needed as vendor prefixed `msMaxTouchPoints` api is no longer part of TS lib declaration - introduced with TS 4.4
window.navigator.msMaxTouchPoints === undefined;
var fallbackObjectFitStyles = (isContain && isLandscape) || (isCover && !isLandscape)
? { width: '100%', height: 'auto' }
: { width: 'auto', height: '100%' };
return {
root: [
classNames.root,
theme.fonts.medium,
{
overflow: 'hidden',
},
maximizeFrame && [
classNames.rootMaximizeFrame,
{
height: '100%',
width: '100%',
},
],
isLoaded && shouldFadeIn && !shouldStartVisible && _Styling__rspack_import_0.AnimationClassNames.fadeIn400,
(isCenter || isContain || isCover || isCenterContain || isCenterCover) && {
position: 'relative',
},
className,
],
image: [
classNames.image,
{
display: 'block',
opacity: 0,
},
isLoaded && [
'is-loaded',
{
opacity: 1,
},
],
isCenter && [classNames.imageCenter, ImageFitStyles],
isContain && [
classNames.imageContain,
supportsObjectFit && {
width: '100%',
height: '100%',
objectFit: 'contain',
},
!supportsObjectFit && fallbackObjectFitStyles,
!supportsObjectFit && ImageFitStyles,
],
isCover && [
classNames.imageCover,
supportsObjectFit && {
width: '100%',
height: '100%',
objectFit: 'cover',
},
!supportsObjectFit && fallbackObjectFitStyles,
!supportsObjectFit && ImageFitStyles,
],
isCenterContain && [
classNames.imageCenterContain,
isLandscape && {
maxWidth: '100%',
},
!isLandscape && {
maxHeight: '100%',
},
ImageFitStyles,
],
isCenterCover && [
classNames.imageCenterCover,
isLandscape && {
maxHeight: '100%',
},
!isLandscape && {
maxWidth: '100%',
},
ImageFitStyles,
],
isNone && [
classNames.imageNone,
{
width: 'auto',
height: 'auto',
},
],
isNotImageFit && [
!!width &&
!height && {
height: 'auto',
width: '100%',
},
!width &&
!!height && {
height: '100%',
width: 'auto',
},
!!width &&
!!height && {
height: '100%',
width: '100%',
},
],
isLandscape && classNames.imageLandscape,
!isLandscape && classNames.imagePortrait,
!isLoaded && 'is-notLoaded',
shouldFadeIn && 'is-fadeIn',
isError && 'is-error',
],
};
};
//# sourceMappingURL=Image.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Image/Image.types.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Image/Image.types.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ImageCoverStyle: () => (ImageCoverStyle),
ImageFit: () => (ImageFit),
ImageLoadState: () => (ImageLoadState)
});
/**
* The possible methods that can be used to fit the image.
* {@docCategory Image}
*/
var ImageFit;
(function (ImageFit) {
/**
* The image is not scaled. The image is centered and cropped within the content box.
*/
ImageFit[ImageFit["center"] = 0] = "center";
/**
* The image is scaled to maintain its aspect ratio while being fully contained within the frame. The image will
* be centered horizontally and vertically within the frame. The space in the top and bottom or in the sides of
* the frame will be empty depending on the difference in aspect ratio between the image and the frame.
*/
ImageFit[ImageFit["contain"] = 1] = "contain";
/**
* The image is scaled to maintain its aspect ratio while filling the frame. Portions of the image will be cropped
* from the top and bottom, or the sides, depending on the difference in aspect ratio between the image and the frame.
*/
ImageFit[ImageFit["cover"] = 2] = "cover";
/**
* Neither the image nor the frame are scaled. If their sizes do not match, the image will either be cropped or the
* frame will have empty space.
*/
ImageFit[ImageFit["none"] = 3] = "none";
/**
* The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will
* behave as ImageFit.center if the image's natural height or width is less than the Image frame's height or width,
* but if both natural height and width are larger than the frame it will behave as ImageFit.cover.
*/
ImageFit[ImageFit["centerCover"] = 4] = "centerCover";
/**
* The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will
* behave as ImageFit.center if the image's natural height and width is less than the Image frame's height and width,
* but if either natural height or width are larger than the frame it will behave as ImageFit.contain.
*/
ImageFit[ImageFit["centerContain"] = 5] = "centerContain";
})(ImageFit || (ImageFit = {}));
/**
* The cover style to be used on the image
* {@docCategory Image}
*/
var ImageCoverStyle;
(function (ImageCoverStyle) {
/**
* The image will be shown at 100% height of container and the width will be scaled accordingly
*/
ImageCoverStyle[ImageCoverStyle["landscape"] = 0] = "landscape";
/**
* The image will be shown at 100% width of container and the height will be scaled accordingly
*/
ImageCoverStyle[ImageCoverStyle["portrait"] = 1] = "portrait";
})(ImageCoverStyle || (ImageCoverStyle = {}));
/**
* {@docCategory Image}
*/
var ImageLoadState;
(function (ImageLoadState) {
/**
* The image has not yet been loaded, and there is no error yet.
*/
ImageLoadState[ImageLoadState["notLoaded"] = 0] = "notLoaded";
/**
* The image has been loaded successfully.
*/
ImageLoadState[ImageLoadState["loaded"] = 1] = "loaded";
/**
* An error has been encountered while loading the image.
*/
ImageLoadState[ImageLoadState["error"] = 2] = "error";
/**
* @deprecated Not used. Use `onLoadingStateChange` and re-render the Image with a different src.
*/
ImageLoadState[ImageLoadState["errorLoaded"] = 3] = "errorLoaded";
})(ImageLoadState || (ImageLoadState = {}));
//# sourceMappingURL=Image.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js":
/*!******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/KeytipData/KeytipData.js ***!
\******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
KeytipData: () => (KeytipData)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _utilities_keytips_index__rspack_import_2 = __webpack_require__(/*! ../../utilities/keytips/index */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js");
/* import */ var _useKeytipData__rspack_import_1 = __webpack_require__(/*! ./useKeytipData */ "./node_modules/@fluentui/react/lib/components/KeytipData/useKeytipData.js");
/**
* A small element to help the target component correctly read out its aria-describedby for its Keytip
* {@docCategory Keytips}
*/
var KeytipData = function (props) {
var _a;
var children = props.children, keytipDataProps = (0,tslib__rspack_import_0.__rest)(props, ["children"]);
var _b = (0,_useKeytipData__rspack_import_1.useKeytipData)(keytipDataProps), keytipId = _b.keytipId, ariaDescribedBy = _b.ariaDescribedBy;
return children((_a = {},
_a[_utilities_keytips_index__rspack_import_2.DATAKTP_TARGET] = keytipId,
_a[_utilities_keytips_index__rspack_import_2.DATAKTP_EXECUTE_TARGET] = keytipId,
_a['aria-describedby'] = ariaDescribedBy,
_a));
};
//# sourceMappingURL=KeytipData.js.map
}),
"./node_modules/@fluentui/react/lib/components/KeytipData/useKeytipData.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/KeytipData/useKeytipData.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useKeytipData: () => (useKeytipData)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_react_hooks__rspack_import_2 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_react_hooks__rspack_import_4 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/aria.js");
/* import */ var _utilities_keytips_index__rspack_import_3 = __webpack_require__(/*! ../../utilities/keytips/index */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js");
/* import */ var _utilities_keytips_index__rspack_import_7 = __webpack_require__(/*! ../../utilities/keytips/index */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipUtils.js");
/**
* Hook that creates attributes for components which are enabled with Keytip.
*/
function useKeytipData(options) {
var uniqueId = react__rspack_import_0.useRef(undefined);
var keytipProps = options.keytipProps
? (0,tslib__rspack_import_1.__assign)({ disabled: options.disabled }, options.keytipProps) : undefined;
var keytipManager = (0,_fluentui_react_hooks__rspack_import_2.useConst)(_utilities_keytips_index__rspack_import_3.KeytipManager.getInstance());
var prevOptions = (0,_fluentui_react_hooks__rspack_import_4.usePrevious)(options);
// useLayoutEffect used to strictly emulate didUpdate/didMount behavior
(0,_fluentui_react_hooks__rspack_import_5.useIsomorphicLayoutEffect)(function () {
if (uniqueId.current &&
keytipProps &&
((prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.keytipProps) !== options.keytipProps || (prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.disabled) !== options.disabled)) {
keytipManager.update(keytipProps, uniqueId.current);
}
});
(0,_fluentui_react_hooks__rspack_import_5.useIsomorphicLayoutEffect)(function () {
// Register Keytip in KeytipManager
if (keytipProps) {
uniqueId.current = keytipManager.register(keytipProps);
}
return function () {
// Unregister Keytip in KeytipManager
keytipProps && keytipManager.unregister(keytipProps, uniqueId.current);
};
// this is meant to run only at mount, and updates are handled separately
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
var nativeKeytipProps = {
ariaDescribedBy: options.ariaDescribedBy,
keytipId: undefined,
};
if (keytipProps) {
nativeKeytipProps = getKeytipData(keytipManager, keytipProps, options.ariaDescribedBy);
}
return nativeKeytipProps;
}
/**
* Gets the aria- and data- attributes to attach to the component
* @param keytipProps - options for Keytip
* @param describedByPrepend - ariaDescribedBy value to prepend
*/
function getKeytipData(keytipManager, keytipProps, describedByPrepend) {
// Add the parent overflow sequence if necessary
var newKeytipProps = keytipManager.addParentOverflow(keytipProps);
// Construct aria-describedby and data-ktp-id attributes
var ariaDescribedBy = (0,_Utilities__rspack_import_6.mergeAriaAttributeValues)(describedByPrepend, (0,_utilities_keytips_index__rspack_import_7.getAriaDescribedBy)(newKeytipProps.keySequences));
var keySequences = (0,tslib__rspack_import_1.__spreadArray)([], newKeytipProps.keySequences, true);
if (newKeytipProps.overflowSetSequence) {
keySequences = (0,_utilities_keytips_index__rspack_import_7.mergeOverflows)(keySequences, newKeytipProps.overflowSetSequence);
}
var keytipId = (0,_utilities_keytips_index__rspack_import_7.sequencesToID)(keySequences);
return {
ariaDescribedBy: ariaDescribedBy,
keytipId: keytipId,
};
}
//# sourceMappingURL=useKeytipData.js.map
}),
"./node_modules/@fluentui/react/lib/components/Label/Label.base.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Label/Label.base.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
LabelBase: () => (LabelBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)({
// Label is used a lot by other components.
// It's likely to see expected cases which pass different className to the Label.
// Therefore setting a larger cache size.
cacheSize: 100,
});
var LabelBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(LabelBase, _super);
function LabelBase() {
return _super !== null && _super.apply(this, arguments) || this;
}
LabelBase.prototype.render = function () {
var _a = this.props, _b = _a.as, RootType = _b === void 0 ? 'label' : _b, children = _a.children, className = _a.className, disabled = _a.disabled, styles = _a.styles, required = _a.required, theme = _a.theme;
var classNames = getClassNames(styles, {
className: className,
disabled: disabled,
required: required,
theme: theme,
});
return (react__rspack_import_0.createElement(RootType, (0,tslib__rspack_import_2.__assign)({}, (0,_Utilities__rspack_import_3.getNativeProps)(this.props, _Utilities__rspack_import_3.divProperties), { className: classNames.root }), children));
};
return LabelBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Label.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Label/Label.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Label/Label.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Label: () => (Label)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Label_base__rspack_import_1 = __webpack_require__(/*! ./Label.base */ "./node_modules/@fluentui/react/lib/components/Label/Label.base.js");
/* import */ var _Label_styles__rspack_import_2 = __webpack_require__(/*! ./Label.styles */ "./node_modules/@fluentui/react/lib/components/Label/Label.styles.js");
var Label = (0,_Utilities__rspack_import_0.styled)(_Label_base__rspack_import_1.LabelBase, _Label_styles__rspack_import_2.getStyles, undefined, {
scope: 'Label',
});
//# sourceMappingURL=Label.js.map
}),
"./node_modules/@fluentui/react/lib/components/Label/Label.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Label/Label.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var getStyles = function (props) {
var _a;
var theme = props.theme, className = props.className, disabled = props.disabled, required = props.required;
var semanticColors = theme.semanticColors;
// Tokens
var labelFontWeight = _Styling__rspack_import_0.FontWeights.semibold;
var labelColor = semanticColors.bodyText;
var labelDisabledColor = semanticColors.disabledBodyText;
var labelRequiredStarColor = semanticColors.errorText;
return {
root: [
'ms-Label',
theme.fonts.medium,
{
fontWeight: labelFontWeight,
color: labelColor,
boxSizing: 'border-box',
boxShadow: 'none',
margin: 0,
display: 'block',
padding: '5px 0',
wordWrap: 'break-word',
overflowWrap: 'break-word',
},
disabled && {
color: labelDisabledColor,
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ color: 'GrayText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_a),
},
required && {
selectors: {
'::after': {
content: "' *'",
color: labelRequiredStarColor,
paddingRight: 12,
},
},
},
className,
],
};
};
//# sourceMappingURL=Label.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Layer/Layer.base.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Layer/Layer.base.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
LayerBase: () => (LayerBase)
});
/* import */ var tslib__rspack_import_14 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_react_portal_compat_context__rspack_import_4 = __webpack_require__(/*! @fluentui/react-portal-compat-context */ "./node_modules/@fluentui/react-portal-compat-context/lib/PortalCompatContext.js");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var react_dom__rspack_import_1 = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
/* import */ var _Fabric__rspack_import_13 = __webpack_require__(/*! ../../Fabric */ "./node_modules/@fluentui/react/lib/components/Fabric/Fabric.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/setPortalAttribute.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/setVirtualParent.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/FocusRectsProvider.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Layer_notification__rspack_import_7 = __webpack_require__(/*! ./Layer.notification */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.notification.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_11 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js");
/* import */ var _fluentui_react_hooks__rspack_import_16 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore "react-portal-compat-context" uses v9 configs via path aliases
var getClassNames = (0,_Utilities__rspack_import_2.classNamesFunction)();
var getFocusVisibility = function (providerRef) {
if (providerRef === null || providerRef === void 0 ? void 0 : providerRef.current) {
return providerRef.current.classList.contains(_Utilities__rspack_import_3.IsFocusVisibleClassName);
}
return false;
};
var LayerBase = react__rspack_import_0.forwardRef(function (props, ref) {
var registerPortalEl = (0,_fluentui_react_portal_compat_context__rspack_import_4.usePortalCompat)();
var rootRef = react__rspack_import_0.useRef(null);
var mergedRef = (0,_fluentui_react_hooks__rspack_import_5.useMergedRefs)(rootRef, ref);
var layerRef = react__rspack_import_0.useRef(undefined);
var fabricElementRef = react__rspack_import_0.useRef(null);
var focusContext = react__rspack_import_0.useContext(_Utilities__rspack_import_6.FocusRectsContext);
// Tracks if the layer mount events need to be raised.
// Required to allow the DOM to render after the layer element is added.
var _a = react__rspack_import_0.useState(false), needRaiseLayerMount = _a[0], setNeedRaiseLayerMount = _a[1];
// Sets the focus visible className when the FocusRectsProvider for the layer is rendered
// This allows the current focus visibility style to be carried over to the layer content
var focusRectsRef = react__rspack_import_0.useCallback(function (el) {
var isFocusVisible = getFocusVisibility(focusContext === null || focusContext === void 0 ? void 0 : focusContext.providerRef);
if (el && isFocusVisible) {
el.classList.add(_Utilities__rspack_import_3.IsFocusVisibleClassName);
}
}, [focusContext]);
var children = props.children, className = props.className, eventBubblingEnabled = props.eventBubblingEnabled, fabricProps = props.fabricProps, hostId = props.hostId, insertFirst = props.insertFirst, _b = props.onLayerDidMount, onLayerDidMount = _b === void 0 ? function () { return undefined; } : _b,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_c = props.onLayerMounted,
// eslint-disable-next-line @typescript-eslint/no-deprecated
onLayerMounted = _c === void 0 ? function () { return undefined; } : _c, onLayerWillUnmount = props.onLayerWillUnmount, styles = props.styles, theme = props.theme;
var fabricRef = (0,_fluentui_react_hooks__rspack_import_5.useMergedRefs)(fabricElementRef, fabricProps === null || fabricProps === void 0 ? void 0 : fabricProps.ref, focusRectsRef);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
isNotHost: !hostId,
});
// Returns the user provided hostId props element, the default target selector,
// or undefined if document doesn't exist.
var getHost = function (doc, shadowRoot) {
var _a, _b;
if (shadowRoot === void 0) { shadowRoot = null; }
var root = shadowRoot !== null && shadowRoot !== void 0 ? shadowRoot : doc;
if (hostId) {
var layerHost = (0,_Layer_notification__rspack_import_7.getLayerHost)(hostId);
if (layerHost) {
return (_a = layerHost.rootRef.current) !== null && _a !== void 0 ? _a : null;
}
return (_b = root.getElementById(hostId)) !== null && _b !== void 0 ? _b : null;
}
else {
var defaultHostSelector = (0,_Layer_notification__rspack_import_7.getDefaultTarget)();
// Find the host.
var host = defaultHostSelector ? root.querySelector(defaultHostSelector) : null;
// If no host is available, create a container for injecting layers in.
// Having a container scopes layout computation.
if (!host) {
host = (0,_Layer_notification__rspack_import_7.createDefaultLayerHost)(doc, shadowRoot);
}
return host;
}
};
// Removes the current layer element's parentNode and runs onLayerWillUnmount prop if provided.
var removeLayerElement = function () {
onLayerWillUnmount === null || onLayerWillUnmount === void 0 ? void 0 : onLayerWillUnmount();
var elem = layerRef.current;
// Clear ref before removing from the DOM
layerRef.current = undefined;
if (elem && elem.parentNode) {
elem.parentNode.removeChild(elem);
}
};
// If a doc or host exists, it will remove and update layer parentNodes.
var createLayerElement = function () {
var _a, _b, _c, _d;
var doc = (0,_Utilities__rspack_import_8.getDocument)(rootRef.current);
var shadowRoot = ((_b = (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.getRootNode()) === null || _b === void 0 ? void 0 : _b.host)
? (_c = rootRef === null || rootRef === void 0 ? void 0 : rootRef.current) === null || _c === void 0 ? void 0 : _c.getRootNode()
: undefined;
if (!doc || (!doc && !shadowRoot)) {
return;
}
var host = getHost(doc, shadowRoot);
if (!host) {
return;
}
// Tabster in V9 sets aria-hidden on the elements outside of the modal dialog. And it doesn't set aria-hidden
// on the virtual children of the dialog. But the host element itself is not a virtual child of a dialog, it
// might contain virtual children. noDirectAriaHidden flag makes Tabster to poke inside the element and set
// aria-hidden on the children (if they are not virtual children of the active V9 dialog) not on the host element.
// To avoid importing Tabster as a dependency here, we just set a flag on the host element which is checked by
// Tabster.
if (!host.__tabsterElementFlags) {
host.__tabsterElementFlags = {};
}
host.__tabsterElementFlags.noDirectAriaHidden = true;
// Remove and re-create any previous existing layer elements.
removeLayerElement();
var el = ((_d = host.ownerDocument) !== null && _d !== void 0 ? _d : doc).createElement('div');
el.className = classNames.root;
(0,_Utilities__rspack_import_9.setPortalAttribute)(el);
(0,_Utilities__rspack_import_10.setVirtualParent)(el, rootRef.current);
insertFirst ? host.insertBefore(el, host.firstChild) : host.appendChild(el);
layerRef.current = el;
setNeedRaiseLayerMount(true);
};
(0,_fluentui_react_hooks__rspack_import_11.useIsomorphicLayoutEffect)(function () {
createLayerElement();
// Check if the user provided a hostId prop and register the layer with the ID.
if (hostId) {
(0,_Layer_notification__rspack_import_7.registerLayer)(hostId, createLayerElement);
}
var unregisterPortalEl = layerRef.current ? registerPortalEl(layerRef.current) : undefined;
return function () {
if (unregisterPortalEl) {
unregisterPortalEl();
}
removeLayerElement();
if (hostId) {
(0,_Layer_notification__rspack_import_7.unregisterLayer)(hostId, createLayerElement);
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps -- should run if the hostId updates.
}, [hostId]);
react__rspack_import_0.useEffect(function () {
if (layerRef.current && needRaiseLayerMount) {
onLayerMounted === null || onLayerMounted === void 0 ? void 0 : onLayerMounted();
onLayerDidMount === null || onLayerDidMount === void 0 ? void 0 : onLayerDidMount();
setNeedRaiseLayerMount(false);
}
}, [needRaiseLayerMount, onLayerMounted, onLayerDidMount]);
useDebugWarnings(props);
return (react__rspack_import_0.createElement("span", { className: "ms-layer", ref: mergedRef }, layerRef.current &&
react_dom__rspack_import_1.createPortal(react__rspack_import_0.createElement(_Utilities__rspack_import_12.FocusRectsProvider, { layerRoot: true, providerRef: fabricRef },
react__rspack_import_0.createElement(_Fabric__rspack_import_13.Fabric, (0,tslib__rspack_import_14.__assign)({}, (!eventBubblingEnabled && getFilteredEvents()), fabricProps, { className: (0,_Utilities__rspack_import_15.css)(classNames.content, fabricProps === null || fabricProps === void 0 ? void 0 : fabricProps.className), ref: fabricRef }), children)), layerRef.current)));
});
LayerBase.displayName = 'LayerBase';
var filteredEventProps;
var onFilterEvent = function (ev) {
// We should just be able to check ev.bubble here and only stop events that are bubbling up. However, even though
// mouseenter and mouseleave do NOT bubble up, they are showing up as bubbling. Therefore we stop events based on
// event name rather than ev.bubble.
if (ev.eventPhase === Event.BUBBLING_PHASE &&
ev.type !== 'mouseenter' &&
ev.type !== 'mouseleave' &&
ev.type !== 'touchstart' &&
ev.type !== 'touchend') {
ev.stopPropagation();
}
};
function getFilteredEvents() {
if (!filteredEventProps) {
filteredEventProps = {};
[
'onClick',
'onContextMenu',
'onDoubleClick',
'onDrag',
'onDragEnd',
'onDragEnter',
'onDragExit',
'onDragLeave',
'onDragOver',
'onDragStart',
'onDrop',
'onMouseDown',
'onMouseEnter',
'onMouseLeave',
'onMouseMove',
'onMouseOver',
'onMouseOut',
'onMouseUp',
'onTouchMove',
'onTouchStart',
'onTouchCancel',
'onTouchEnd',
'onKeyDown',
'onKeyPress',
'onKeyUp',
'onFocus',
'onBlur',
'onChange',
'onInput',
'onInvalid',
'onSubmit',
].forEach(function (name) { return (filteredEventProps[name] = onFilterEvent); });
}
return filteredEventProps;
}
function useDebugWarnings(props) {
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional
(0,_fluentui_react_hooks__rspack_import_16.useWarnings)({
name: 'Layer',
props: props,
deprecations: { onLayerMounted: 'onLayerDidMount' },
});
}
}
//# sourceMappingURL=Layer.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Layer/Layer.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Layer/Layer.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Layer: () => (Layer)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Layer_base__rspack_import_1 = __webpack_require__(/*! ./Layer.base */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.base.js");
/* import */ var _Layer_styles__rspack_import_2 = __webpack_require__(/*! ./Layer.styles */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.styles.js");
var Layer = (0,_Utilities__rspack_import_0.styled)(_Layer_base__rspack_import_1.LayerBase, _Layer_styles__rspack_import_2.getStyles, undefined, {
scope: 'Layer',
fields: ['hostId', 'theme', 'styles'],
});
//# sourceMappingURL=Layer.js.map
}),
"./node_modules/@fluentui/react/lib/components/Layer/Layer.notification.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Layer/Layer.notification.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
cleanupDefaultLayerHost: () => (cleanupDefaultLayerHost),
createDefaultLayerHost: () => (createDefaultLayerHost),
getDefaultTarget: () => (getDefaultTarget),
getLayerCount: () => (getLayerCount),
getLayerHost: () => (getLayerHost),
notifyHostChanged: () => (notifyHostChanged),
registerLayer: () => (registerLayer),
registerLayerHost: () => (registerLayerHost),
setDefaultTarget: () => (setDefaultTarget),
unregisterLayer: () => (unregisterLayer),
unregisterLayerHost: () => (unregisterLayerHost)
});
var _layersByHostId = {};
var _layerHostsById = {};
var defaultHostId = 'fluent-default-layer-host';
var _defaultHostSelector = "#".concat(defaultHostId);
/**
* Register a layer for a given host id
* @param hostId - Id of the layer host
* @param layer - Layer instance
*/
function registerLayer(hostId, callback) {
if (!_layersByHostId[hostId]) {
_layersByHostId[hostId] = [];
}
_layersByHostId[hostId].push(callback);
var layerHosts = _layerHostsById[hostId];
if (layerHosts) {
for (var _i = 0, layerHosts_1 = layerHosts; _i < layerHosts_1.length; _i++) {
var layerHost = layerHosts_1[_i];
layerHost.notifyLayersChanged();
}
}
}
/**
* Unregister a layer for a given host id
* @param hostId - Id of the layer host
* @param layer - Layer instance
*/
function unregisterLayer(hostId, callback) {
var layers = _layersByHostId[hostId];
if (layers) {
var idx = layers.indexOf(callback);
if (idx >= 0) {
layers.splice(idx, 1);
if (layers.length === 0) {
delete _layersByHostId[hostId];
}
}
}
var layerHosts = _layerHostsById[hostId];
if (layerHosts) {
for (var _i = 0, layerHosts_2 = layerHosts; _i < layerHosts_2.length; _i++) {
var layerHost = layerHosts_2[_i];
layerHost.notifyLayersChanged();
}
}
}
/**
* Gets the number of layers currently registered with a host id.
* @param hostId - Id of the layer host.
* @returns The number of layers currently registered with the host.
*/
function getLayerCount(hostId) {
var layers = _layerHostsById[hostId];
return layers ? layers.length : 0;
}
/**
* Gets the Layer Host instance associated with a hostId, if applicable.
* @param hostId - Id of the layer host
* @returns A component ref for the associated layer host.
*/
function getLayerHost(hostId) {
var layerHosts = _layerHostsById[hostId];
return (layerHosts && layerHosts[0]) || undefined;
}
/**
* Registers a Layer Host with an associated hostId.
* @param hostId - Id of the layer host
* @param layerHost - layer host instance
*/
function registerLayerHost(hostId, layerHost) {
var layerHosts = _layerHostsById[hostId] || (_layerHostsById[hostId] = []);
// Insert this at the start of an array to avoid race conditions between mount and unmount.
// If a LayerHost is re-mounted, and mount of the new instance may occur before the unmount of the old one.
// Putting the new instance at the start of this array ensures that calls to `getLayerHost` will immediately
// get the new one even if the old one is around briefly.
layerHosts.unshift(layerHost);
}
/**
* Unregisters a Layer Host from the associated hostId.
* @param hostId - Id of the layer host
* @param layerHost - layer host instance
*/
function unregisterLayerHost(hostId, layerHost) {
var layerHosts = _layerHostsById[hostId];
if (layerHosts) {
var idx = layerHosts.indexOf(layerHost);
if (idx >= 0) {
layerHosts.splice(idx, 1);
}
if (layerHosts.length === 0) {
delete _layerHostsById[hostId];
}
}
}
/**
* When no default layer host is provided, this function is executed to create the default host.
*/
function createDefaultLayerHost(doc, shadowRoot) {
if (shadowRoot === void 0) { shadowRoot = null; }
var host = doc.createElement('div');
host.setAttribute('id', defaultHostId);
host.style.cssText = 'position:fixed;z-index:1000000';
if (shadowRoot) {
shadowRoot.appendChild(host);
}
else {
doc === null || doc === void 0 ? void 0 : doc.body.appendChild(host);
}
// doc?.body.appendChild(host);
return host;
}
/**
* This function can be optionally called to clean up the default layer host as needed.
*/
function cleanupDefaultLayerHost(doc, shadowRoot) {
if (shadowRoot === void 0) { shadowRoot = null; }
var root = shadowRoot !== null && shadowRoot !== void 0 ? shadowRoot : doc;
var host = root.querySelector("#".concat(defaultHostId));
if (host) {
root.removeChild(host);
}
}
/**
* Used for notifying applicable Layers that a host is available/unavailable and to re-evaluate Layers that
* care about the specific host.
*/
function notifyHostChanged(id) {
if (_layersByHostId[id]) {
_layersByHostId[id].forEach(function (callback) { return callback(); });
}
}
/**
* Sets the default target selector to use when determining the host in which
* Layered content will be injected into. If not provided, an element will be
* created at the end of the document body.
*
* Passing in a falsy value will clear the default target and reset back to
* using a created element at the end of document body.
*/
function setDefaultTarget(selector) {
_defaultHostSelector = selector;
}
/**
* Get the default target selector when determining a host
*/
function getDefaultTarget() {
return _defaultHostSelector;
}
//# sourceMappingURL=Layer.notification.js.map
}),
"./node_modules/@fluentui/react/lib/components/Layer/Layer.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Layer/Layer.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-Layer',
rootNoHost: 'ms-Layer--fixed',
content: 'ms-Layer-content',
};
var getStyles = function (props) {
var className = props.className, isNotHost = props.isNotHost, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
theme.fonts.medium,
isNotHost && [
classNames.rootNoHost,
{
position: 'fixed',
zIndex: _Styling__rspack_import_0.ZIndexes.Layer,
top: 0,
left: 0,
bottom: 0,
right: 0,
visibility: 'hidden',
},
],
className,
],
content: [
classNames.content,
{
visibility: 'visible',
},
],
};
};
//# sourceMappingURL=Layer.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Modal/Modal.base.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Modal/Modal.base.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ModalBase: () => (ModalBase)
});
/* import */ var tslib__rspack_import_11 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/scroll.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _Utilities__rspack_import_18 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _FocusTrapZone__rspack_import_17 = __webpack_require__(/*! ../../FocusTrapZone */ "./node_modules/@fluentui/react/lib/components/FocusTrapZone/FocusTrapZone.js");
/* import */ var _Modal_styles__rspack_import_15 = __webpack_require__(/*! ./Modal.styles */ "./node_modules/@fluentui/react/lib/components/Modal/Modal.styles.js");
/* import */ var _Overlay__rspack_import_24 = __webpack_require__(/*! ../../Overlay */ "./node_modules/@fluentui/react/lib/components/Overlay/Overlay.js");
/* import */ var _Layer__rspack_import_22 = __webpack_require__(/*! ../../Layer */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.js");
/* import */ var _Popup__rspack_import_23 = __webpack_require__(/*! ../../Popup */ "./node_modules/@fluentui/react/lib/components/Popup/Popup.js");
/* import */ var _ResponsiveMode__rspack_import_4 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js");
/* import */ var _ResponsiveMode__rspack_import_21 = __webpack_require__(/*! ../../ResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
/* import */ var _common_DirectionalHint__rspack_import_20 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _Icon__rspack_import_19 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
/* import */ var _utilities_DraggableZone_index__rspack_import_25 = __webpack_require__(/*! ../../utilities/DraggableZone/index */ "./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.js");
/* import */ var _fluentui_react_window_provider__rspack_import_6 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _fluentui_react_hooks__rspack_import_7 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useSetTimeout.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useBoolean.js");
/* import */ var _fluentui_react_hooks__rspack_import_9 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_react_hooks__rspack_import_16 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useUnmount.js");
/* import */ var _fluentui_react_hooks__rspack_import_26 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
var ZERO = { x: 0, y: 0 };
var DEFAULT_PROPS = {
isOpen: false,
isDarkOverlay: true,
className: '',
containerClassName: '',
enableAriaHiddenSiblings: true,
};
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var getMoveDelta = function (ev) {
var delta = 10;
if (ev.shiftKey) {
if (!ev.ctrlKey) {
delta = 50;
}
}
else if (ev.ctrlKey) {
delta = 1;
}
return delta;
};
var useComponentRef = function (props, focusTrapZone) {
react__rspack_import_0.useImperativeHandle(props.componentRef, function () { return ({
focus: function () {
if (focusTrapZone.current) {
focusTrapZone.current.focus();
}
},
}); }, [focusTrapZone]);
};
var ModalBase = react__rspack_import_0.forwardRef(function (propsWithoutDefaults, ref) {
var _a, _b, _c, _d, _e;
var props = (0,_Utilities__rspack_import_2.getPropsWithDefaults)(DEFAULT_PROPS, propsWithoutDefaults);
var allowTouchBodyScroll = props.allowTouchBodyScroll, className = props.className, children = props.children, containerClassName = props.containerClassName, scrollableContentClassName = props.scrollableContentClassName, elementToFocusOnDismiss = props.elementToFocusOnDismiss, firstFocusableSelector = props.firstFocusableSelector, focusTrapZoneProps = props.focusTrapZoneProps, forceFocusInsideTrap = props.forceFocusInsideTrap,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_f = props.disableRestoreFocus,
// eslint-disable-next-line @typescript-eslint/no-deprecated
disableRestoreFocus = _f === void 0 ? props.ignoreExternalFocusing : _f, isBlocking = props.isBlocking, isAlert = props.isAlert, isClickableOutsideFocusTrap = props.isClickableOutsideFocusTrap, isDarkOverlay = props.isDarkOverlay, onDismiss = props.onDismiss, layerProps = props.layerProps, overlay = props.overlay, isOpen = props.isOpen, titleAriaId = props.titleAriaId, styles = props.styles, subtitleAriaId = props.subtitleAriaId, theme = props.theme, topOffsetFixed = props.topOffsetFixed, responsiveMode = props.responsiveMode,
// eslint-disable-next-line @typescript-eslint/no-deprecated
onLayerDidMount = props.onLayerDidMount, isModeless = props.isModeless, dragOptions = props.dragOptions, onDismissed = props.onDismissed,
// eslint-disable-next-line @typescript-eslint/no-deprecated
enableAriaHiddenSiblings = props.enableAriaHiddenSiblings, popupProps = props.popupProps;
var rootRef = react__rspack_import_0.useRef(null);
var focusTrapZone = react__rspack_import_0.useRef(null);
var focusTrapZoneRef = (0,_fluentui_react_hooks__rspack_import_3.useMergedRefs)(focusTrapZone, focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.componentRef);
var focusTrapZoneElm = react__rspack_import_0.useRef(null);
var mergedRef = (0,_fluentui_react_hooks__rspack_import_3.useMergedRefs)(rootRef, ref);
var modalResponsiveMode = (0,_ResponsiveMode__rspack_import_4.useResponsiveMode)(mergedRef);
var focusTrapZoneId = (0,_fluentui_react_hooks__rspack_import_5.useId)('ModalFocusTrapZone', focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.id);
var win = (0,_fluentui_react_window_provider__rspack_import_6.useWindow)();
var _g = (0,_fluentui_react_hooks__rspack_import_7.useSetTimeout)(), setTimeout = _g.setTimeout, clearTimeout = _g.clearTimeout;
var _h = react__rspack_import_0.useState(isOpen), isModalOpen = _h[0], setIsModalOpen = _h[1];
var _j = react__rspack_import_0.useState(isOpen), isVisible = _j[0], setIsVisible = _j[1];
var _k = react__rspack_import_0.useState(ZERO), coordinates = _k[0], setCoordinates = _k[1];
var _l = react__rspack_import_0.useState(), modalRectangleTop = _l[0], setModalRectangleTop = _l[1];
var _m = (0,_fluentui_react_hooks__rspack_import_8.useBoolean)(false), isModalMenuOpen = _m[0], _o = _m[1], toggleModalMenuOpen = _o.toggle, setModalMenuClose = _o.setFalse;
var internalState = (0,_fluentui_react_hooks__rspack_import_9.useConst)(function () { return ({
onModalCloseTimer: 0,
allowTouchBodyScroll: allowTouchBodyScroll,
scrollableContent: null,
lastSetCoordinates: ZERO,
events: new _Utilities__rspack_import_10.EventGroup({}),
}); });
var keepInBounds = (dragOptions || {}).keepInBounds;
var isAlertRole = isAlert !== null && isAlert !== void 0 ? isAlert : (isBlocking && !isModeless);
var layerClassName = layerProps === undefined ? '' : layerProps.className;
var classNames = getClassNames(styles, {
theme: theme,
className: className,
containerClassName: containerClassName,
scrollableContentClassName: scrollableContentClassName,
isOpen: isOpen,
isVisible: isVisible,
hasBeenOpened: internalState.hasBeenOpened,
modalRectangleTop: modalRectangleTop,
topOffsetFixed: topOffsetFixed,
isModeless: isModeless,
layerClassName: layerClassName,
windowInnerHeight: win === null || win === void 0 ? void 0 : win.innerHeight,
isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector,
});
var mergedLayerProps = (0,tslib__rspack_import_11.__assign)((0,tslib__rspack_import_11.__assign)({ eventBubblingEnabled: false }, layerProps), { onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount, insertFirst: (layerProps === null || layerProps === void 0 ? void 0 : layerProps.insertFirst) || isModeless, className: classNames.layer });
// Allow the user to scroll within the modal but not on the body
var allowScrollOnModal = react__rspack_import_0.useCallback(function (elt) {
if (elt) {
if (internalState.allowTouchBodyScroll) {
(0,_Utilities__rspack_import_12.allowOverscrollOnElement)(elt, internalState.events);
}
else {
(0,_Utilities__rspack_import_12.allowScrollOnElement)(elt, internalState.events);
}
}
else {
internalState.events.off(internalState.scrollableContent);
}
internalState.scrollableContent = elt;
}, [internalState]);
var registerInitialModalPosition = function () {
var dialogMain = focusTrapZoneElm.current;
var modalRectangle = dialogMain === null || dialogMain === void 0 ? void 0 : dialogMain.getBoundingClientRect();
if (modalRectangle) {
if (topOffsetFixed) {
setModalRectangleTop(modalRectangle.top);
}
if (keepInBounds) {
// x/y are unavailable in IE, so use the equivalent left/top
internalState.minPosition = { x: -modalRectangle.left, y: -modalRectangle.top };
internalState.maxPosition = { x: modalRectangle.left, y: modalRectangle.top };
}
}
};
/**
* Clamps an axis to a specified min and max position.
*
* @param axis A string that represents the axis (x/y).
* @param position The position on the axis.
*/
var getClampedAxis = react__rspack_import_0.useCallback(function (axis, position) {
var minPosition = internalState.minPosition, maxPosition = internalState.maxPosition;
if (keepInBounds && minPosition && maxPosition) {
position = Math.max(minPosition[axis], position);
position = Math.min(maxPosition[axis], position);
}
return position;
}, [keepInBounds, internalState]);
var handleModalClose = function () {
var _a;
internalState.lastSetCoordinates = ZERO;
setModalMenuClose();
internalState.isInKeyboardMoveMode = false;
setIsModalOpen(false);
setCoordinates(ZERO);
(_a = internalState.disposeOnKeyUp) === null || _a === void 0 ? void 0 : _a.call(internalState);
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
};
var handleDragStart = react__rspack_import_0.useCallback(function () {
setModalMenuClose();
internalState.isInKeyboardMoveMode = false;
}, [internalState, setModalMenuClose]);
var handleDrag = react__rspack_import_0.useCallback(function (ev, dragData) {
setCoordinates(function (prevValue) { return ({
x: getClampedAxis('x', prevValue.x + dragData.delta.x),
y: getClampedAxis('y', prevValue.y + dragData.delta.y),
}); });
}, [getClampedAxis]);
var handleDragStop = react__rspack_import_0.useCallback(function () {
if (focusTrapZone.current) {
focusTrapZone.current.focus();
}
}, []);
var handleEnterKeyboardMoveMode = function () {
// We need a global handleKeyDown event when we are in the move mode so that we can
// handle the key presses and the components inside the modal do not get the events
var handleKeyDown = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.altKey && ev.ctrlKey && ev.keyCode === _Utilities__rspack_import_13.KeyCodes.space) {
// CTRL + ALT + SPACE is handled during keyUp
ev.preventDefault();
ev.stopPropagation();
return;
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
var newLocal = ev.altKey || ev.keyCode === _Utilities__rspack_import_13.KeyCodes.escape;
if (isModalMenuOpen && newLocal) {
setModalMenuClose();
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (internalState.isInKeyboardMoveMode && (ev.keyCode === _Utilities__rspack_import_13.KeyCodes.escape || ev.keyCode === _Utilities__rspack_import_13.KeyCodes.enter)) {
internalState.isInKeyboardMoveMode = false;
ev.preventDefault();
ev.stopPropagation();
}
if (internalState.isInKeyboardMoveMode) {
var handledEvent = true;
var delta_1 = getMoveDelta(ev);
// eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.keyCode) {
/* eslint-disable no-fallthrough */
case _Utilities__rspack_import_13.KeyCodes.escape:
setCoordinates(internalState.lastSetCoordinates);
case _Utilities__rspack_import_13.KeyCodes.enter: {
// TODO: determine if fallthrough was intentional
/* eslint-enable no-fallthrough */
internalState.lastSetCoordinates = ZERO;
// setIsInKeyboardMoveMode(false);
break;
}
case _Utilities__rspack_import_13.KeyCodes.up: {
setCoordinates(function (prevValue) { return ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta_1) }); });
break;
}
case _Utilities__rspack_import_13.KeyCodes.down: {
setCoordinates(function (prevValue) { return ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta_1) }); });
break;
}
case _Utilities__rspack_import_13.KeyCodes.left: {
setCoordinates(function (prevValue) { return ({ x: getClampedAxis('x', prevValue.x - delta_1), y: prevValue.y }); });
break;
}
case _Utilities__rspack_import_13.KeyCodes.right: {
setCoordinates(function (prevValue) { return ({ x: getClampedAxis('x', prevValue.x + delta_1), y: prevValue.y }); });
break;
}
default: {
handledEvent = false;
}
}
if (handledEvent) {
ev.preventDefault();
ev.stopPropagation();
}
}
};
internalState.lastSetCoordinates = coordinates;
setModalMenuClose();
internalState.isInKeyboardMoveMode = true;
internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);
internalState.disposeOnKeyDown = function () {
internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);
internalState.disposeOnKeyDown = undefined;
};
};
var handleExitKeyboardMoveMode = function (ev) {
var _a, _b;
(_a = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(focusTrapZoneProps, ev);
internalState.lastSetCoordinates = ZERO;
internalState.isInKeyboardMoveMode = false;
(_b = internalState.disposeOnKeyDown) === null || _b === void 0 ? void 0 : _b.call(internalState);
};
var registerForKeyUp = function () {
var handleKeyUp = function (ev) {
// Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1220143
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.altKey && ev.ctrlKey && ev.keyCode === _Utilities__rspack_import_13.KeyCodes.space) {
if ((0,_Utilities__rspack_import_14.elementContains)(internalState.scrollableContent, ev.target)) {
toggleModalMenuOpen();
ev.preventDefault();
ev.stopPropagation();
}
}
};
if (!internalState.disposeOnKeyUp) {
internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);
internalState.disposeOnKeyUp = function () {
internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);
internalState.disposeOnKeyUp = undefined;
};
}
};
react__rspack_import_0.useEffect(function () {
clearTimeout(internalState.onModalCloseTimer);
// Opening the dialog
if (isOpen) {
// This must be done after the modal content has rendered
requestAnimationFrame(function () { return setTimeout(registerInitialModalPosition, 0); });
setIsModalOpen(true);
// Add a keyUp handler for all key up events once the dialog is open.
if (dragOptions) {
registerForKeyUp();
}
internalState.hasBeenOpened = true;
setIsVisible(true);
}
// Closing the dialog
if (!isOpen && isModalOpen) {
internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(_Modal_styles__rspack_import_15.animationDuration) * 1000);
setIsVisible(false);
}
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates.
}, [isModalOpen, isOpen]);
(0,_fluentui_react_hooks__rspack_import_16.useUnmount)(function () {
internalState.events.dispose();
if (internalState.onModalCloseTimer) {
clearTimeout(internalState.onModalCloseTimer);
internalState.onModalCloseTimer = 0;
}
});
useComponentRef(props, focusTrapZone);
useDebugWarnings(props);
var modalContent = (react__rspack_import_0.createElement(_FocusTrapZone__rspack_import_17.FocusTrapZone, (0,tslib__rspack_import_11.__assign)({}, focusTrapZoneProps, { id: focusTrapZoneId, ref: focusTrapZoneElm, componentRef: focusTrapZoneRef, className: (0,_Utilities__rspack_import_18.css)(classNames.main, focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.className), elementToFocusOnDismiss: (_a = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.elementToFocusOnDismiss) !== null && _a !== void 0 ? _a : elementToFocusOnDismiss, isClickableOutsideFocusTrap: (_b = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.isClickableOutsideFocusTrap) !== null && _b !== void 0 ? _b : (isModeless || isClickableOutsideFocusTrap || !isBlocking), disableRestoreFocus: (_c = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.disableRestoreFocus) !== null && _c !== void 0 ? _c : disableRestoreFocus, forceFocusInsideTrap: ((_d = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.forceFocusInsideTrap) !== null && _d !== void 0 ? _d : forceFocusInsideTrap) && !isModeless,
// eslint-disable-next-line @typescript-eslint/no-deprecated
firstFocusableSelector: (focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.firstFocusableSelector) || firstFocusableSelector, focusPreviouslyFocusedInnerElement: (_e = focusTrapZoneProps === null || focusTrapZoneProps === void 0 ? void 0 : focusTrapZoneProps.focusPreviouslyFocusedInnerElement) !== null && _e !== void 0 ? _e : true, onBlur: internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined }),
dragOptions && internalState.isInKeyboardMoveMode && (react__rspack_import_0.createElement("div", { className: classNames.keyboardMoveIconContainer }, dragOptions.keyboardMoveIconProps ? (react__rspack_import_0.createElement(_Icon__rspack_import_19.Icon, (0,tslib__rspack_import_11.__assign)({}, dragOptions.keyboardMoveIconProps))) : (react__rspack_import_0.createElement(_Icon__rspack_import_19.Icon, { iconName: "move", className: classNames.keyboardMoveIcon })))),
react__rspack_import_0.createElement("div", { ref: allowScrollOnModal, className: classNames.scrollableContent, "data-is-scrollable": true },
dragOptions && isModalMenuOpen && (react__rspack_import_0.createElement(dragOptions.menu, { items: [
{ key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },
{ key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose },
], onDismiss: setModalMenuClose, alignTargetEdge: true, coverTarget: true, directionalHint: _common_DirectionalHint__rspack_import_20.DirectionalHint.topLeftEdge, directionalHintFixed: true, shouldFocusOnMount: true, target: internalState.scrollableContent })),
children)));
return ((isModalOpen && modalResponsiveMode >= (responsiveMode || _ResponsiveMode__rspack_import_21.ResponsiveMode.small) && (react__rspack_import_0.createElement(_Layer__rspack_import_22.Layer, (0,tslib__rspack_import_11.__assign)({ ref: mergedRef }, mergedLayerProps),
react__rspack_import_0.createElement(_Popup__rspack_import_23.Popup, (0,tslib__rspack_import_11.__assign)({ role: isAlertRole ? 'alertdialog' : 'dialog', ariaLabelledBy: titleAriaId, ariaDescribedBy: subtitleAriaId, onDismiss: onDismiss,
// eslint-disable-next-line @typescript-eslint/no-deprecated
shouldRestoreFocus: !disableRestoreFocus,
// Modeless modals shouldn't hide siblings.
// Popup will automatically handle this based on the aria-modal setting.
// eslint-disable-next-line @typescript-eslint/no-deprecated
enableAriaHiddenSiblings: enableAriaHiddenSiblings, "aria-modal": !isModeless }, popupProps),
react__rspack_import_0.createElement("div", { className: classNames.root, role: !isModeless ? 'document' : undefined },
!isModeless && (react__rspack_import_0.createElement(_Overlay__rspack_import_24.Overlay, (0,tslib__rspack_import_11.__assign)({ "aria-hidden": true, isDarkThemed: isDarkOverlay, onClick: isBlocking ? undefined : onDismiss, allowTouchBodyScroll: allowTouchBodyScroll }, overlay))),
dragOptions ? (react__rspack_import_0.createElement(_utilities_DraggableZone_index__rspack_import_25.DraggableZone, { handleSelector: dragOptions.dragHandleSelector || "#".concat(focusTrapZoneId), preventDragSelector: "button", onStart: handleDragStart, onDragChange: handleDrag, onStop: handleDragStop, position: coordinates }, modalContent)) : (modalContent)))))) ||
null);
});
ModalBase.displayName = 'Modal';
function useDebugWarnings(props) {
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional
(0,_fluentui_react_hooks__rspack_import_26.useWarnings)({
name: 'Modal',
props: props,
deprecations: { onLayerDidMount: 'layerProps.onLayerDidMount' },
});
}
}
//# sourceMappingURL=Modal.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Modal/Modal.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Modal/Modal.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Modal: () => (Modal)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Modal_base__rspack_import_1 = __webpack_require__(/*! ./Modal.base */ "./node_modules/@fluentui/react/lib/components/Modal/Modal.base.js");
/* import */ var _Modal_styles__rspack_import_2 = __webpack_require__(/*! ./Modal.styles */ "./node_modules/@fluentui/react/lib/components/Modal/Modal.styles.js");
var Modal = (0,_Utilities__rspack_import_0.styled)(_Modal_base__rspack_import_1.ModalBase, _Modal_styles__rspack_import_2.getStyles, undefined, {
scope: 'Modal',
fields: ['theme', 'styles', 'enableAriaHiddenSiblings'],
});
Modal.displayName = 'Modal';
//# sourceMappingURL=Modal.js.map
}),
"./node_modules/@fluentui/react/lib/components/Modal/Modal.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Modal/Modal.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
animationDuration: () => (animationDuration),
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var animationDuration = _Styling__rspack_import_0.AnimationVariables.durationValue2;
var globalClassNames = {
root: 'ms-Modal',
main: 'ms-Dialog-main',
scrollableContent: 'ms-Modal-scrollableContent',
isOpen: 'is-open',
layer: 'ms-Modal-Layer',
};
var getStyles = function (props) {
var _a;
var className = props.className, containerClassName = props.containerClassName, scrollableContentClassName = props.scrollableContentClassName, isOpen = props.isOpen, isVisible = props.isVisible, hasBeenOpened = props.hasBeenOpened, modalRectangleTop = props.modalRectangleTop, theme = props.theme, topOffsetFixed = props.topOffsetFixed, isModeless = props.isModeless, layerClassName = props.layerClassName, isDefaultDragHandle = props.isDefaultDragHandle, windowInnerHeight = props.windowInnerHeight;
var palette = theme.palette, effects = theme.effects, fonts = theme.fonts;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(globalClassNames, theme);
return {
root: [
classNames.root,
fonts.medium,
{
backgroundColor: 'transparent',
position: 'fixed',
height: '100%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
opacity: 0,
pointerEvents: 'none',
transition: "opacity ".concat(animationDuration),
},
topOffsetFixed &&
typeof modalRectangleTop === 'number' &&
hasBeenOpened && {
alignItems: 'flex-start',
},
isOpen && classNames.isOpen,
isVisible && {
opacity: 1,
},
isVisible &&
!isModeless && {
pointerEvents: 'auto',
},
className,
],
main: [
classNames.main,
{
boxShadow: effects.elevation64,
borderRadius: effects.roundedCorner2,
backgroundColor: palette.white,
boxSizing: 'border-box',
position: 'relative',
textAlign: 'left',
outline: '3px solid transparent',
maxHeight: 'calc(100% - 32px)',
maxWidth: 'calc(100% - 32px)',
minHeight: '176px',
minWidth: '288px',
overflowY: 'auto',
zIndex: isModeless ? _Styling__rspack_import_0.ZIndexes.Layer : undefined,
},
isModeless && {
pointerEvents: 'auto',
},
topOffsetFixed &&
typeof modalRectangleTop === 'number' &&
hasBeenOpened && {
top: modalRectangleTop,
},
isDefaultDragHandle && {
cursor: 'move',
},
containerClassName,
],
scrollableContent: [
classNames.scrollableContent,
{
overflowY: 'auto',
flexGrow: 1,
maxHeight: '100vh',
selectors: (_a = {},
_a['@supports (-webkit-overflow-scrolling: touch)'] = {
maxHeight: windowInnerHeight,
},
_a),
},
scrollableContentClassName,
],
layer: isModeless && [layerClassName, classNames.layer, { pointerEvents: 'none' }],
keyboardMoveIconContainer: {
position: 'absolute',
display: 'flex',
justifyContent: 'center',
width: '100%',
padding: '3px 0px',
},
keyboardMoveIcon: {
// eslint-disable-next-line @typescript-eslint/no-deprecated
fontSize: fonts.xLargePlus.fontSize,
width: '24px',
},
};
};
//# sourceMappingURL=Modal.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowButton.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowButton.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
OverflowButton: () => (OverflowButton)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _utilities_keytips_KeytipManager__rspack_import_2 = __webpack_require__(/*! ../../utilities/keytips/KeytipManager */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js");
/* import */ var _fluentui_react_hooks__rspack_import_1 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/usePrevious.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
var registerPersistedKeytips = function (keytipsToRegister, keytipManager, registeredPersistedKeytips) {
for (var _i = 0, keytipsToRegister_1 = keytipsToRegister; _i < keytipsToRegister_1.length; _i++) {
var keytip = keytipsToRegister_1[_i];
var uniqueID = keytipManager.register(keytip, true);
// Update map
registeredPersistedKeytips[uniqueID] = keytip;
}
};
var unregisterPersistedKeytips = function (keytipManager, registeredPersistedKeytips) {
for (var _i = 0, _a = Object.keys(registeredPersistedKeytips); _i < _a.length; _i++) {
var uniqueID = _a[_i];
keytipManager.unregister(registeredPersistedKeytips[uniqueID], uniqueID, true);
delete registeredPersistedKeytips[uniqueID];
}
};
var useKeytipRegistrations = function (registeredPersistedKeytips, keytipsToRegister, keytipManager) {
var prevPersistedKeytips = (0,_fluentui_react_hooks__rspack_import_1.usePrevious)(registeredPersistedKeytips);
// Update
react__rspack_import_0.useEffect(function () {
if (prevPersistedKeytips) {
// Unregister old keytips
unregisterPersistedKeytips(keytipManager, prevPersistedKeytips);
// Register new keytips
registerPersistedKeytips(keytipsToRegister, keytipManager, registeredPersistedKeytips);
}
});
// Mount/Unmount
react__rspack_import_0.useEffect(function () {
// Register on mount
registerPersistedKeytips(keytipsToRegister, keytipManager, registeredPersistedKeytips);
return function () {
// Unregister on unmount
unregisterPersistedKeytips(keytipManager, registeredPersistedKeytips);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
};
var OverflowButton = function (props) {
var keytipManager = _utilities_keytips_KeytipManager__rspack_import_2.KeytipManager.getInstance();
var className = props.className, overflowItems = props.overflowItems, keytipSequences = props.keytipSequences, itemSubMenuProvider = props.itemSubMenuProvider, onRenderOverflowButton = props.onRenderOverflowButton;
var persistedKeytips = (0,_fluentui_react_hooks__rspack_import_3.useConst)({});
// Gets the subMenu for an overflow item
var getSubMenuForItem = react__rspack_import_0.useCallback(function (item) {
// Checks if itemSubMenuProvider has been defined, if not defaults to subMenuProps
if (itemSubMenuProvider) {
return itemSubMenuProvider(item);
}
if (item.subMenuProps) {
return item.subMenuProps.items;
}
return undefined;
}, [itemSubMenuProvider]);
var _a = react__rspack_import_0.useMemo(function () {
var newKeytipsToRegister = [];
var newOverflowItems = [];
if (keytipSequences) {
overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.forEach(function (overflowItem) {
var _a;
var keytip = overflowItem.keytipProps;
if (keytip) {
// Create persisted keytip
var persistedKeytip = {
content: keytip.content,
keySequences: keytip.keySequences,
disabled: keytip.disabled || !!(overflowItem.disabled || overflowItem.isDisabled),
hasDynamicChildren: keytip.hasDynamicChildren,
hasMenu: keytip.hasMenu,
};
if (keytip.hasDynamicChildren || getSubMenuForItem(overflowItem)) {
// If the keytip has a submenu or children nodes, change onExecute to persistedKeytipExecute
persistedKeytip.onExecute = keytipManager.menuExecute.bind(keytipManager, keytipSequences, (_a = overflowItem === null || overflowItem === void 0 ? void 0 : overflowItem.keytipProps) === null || _a === void 0 ? void 0 : _a.keySequences);
persistedKeytip.hasOverflowSubMenu = true;
}
else {
// If the keytip doesn't have a submenu, just execute the original function
persistedKeytip.onExecute = keytip.onExecute;
}
newKeytipsToRegister.push(persistedKeytip);
// Add the overflow sequence to this item
var newOverflowItem = (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, overflowItem), { keytipProps: (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, keytip), { overflowSetSequence: keytipSequences }) });
newOverflowItems === null || newOverflowItems === void 0 ? void 0 : newOverflowItems.push(newOverflowItem);
}
else {
// Nothing to change, add overflowItem to list
newOverflowItems === null || newOverflowItems === void 0 ? void 0 : newOverflowItems.push(overflowItem);
}
});
}
else {
newOverflowItems = overflowItems;
}
return { modifiedOverflowItems: newOverflowItems, keytipsToRegister: newKeytipsToRegister };
}, [overflowItems, getSubMenuForItem, keytipManager, keytipSequences]), modifiedOverflowItems = _a.modifiedOverflowItems, keytipsToRegister = _a.keytipsToRegister;
useKeytipRegistrations(persistedKeytips, keytipsToRegister, keytipManager);
return react__rspack_import_0.createElement("div", { className: className }, onRenderOverflowButton(modifiedOverflowItems));
};
//# sourceMappingURL=OverflowButton.js.map
}),
"./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.base.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.base.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
OverflowSetBase: () => (OverflowSetBase)
});
/* import */ var tslib__rspack_import_6 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _OverflowButton__rspack_import_8 = __webpack_require__(/*! ./OverflowButton */ "./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowButton.js");
/* import */ var _utilities_dom__rspack_import_2 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var COMPONENT_NAME = 'OverflowSet';
var useComponentRef = function (props, divContainer) {
var doc = (0,_utilities_dom__rspack_import_2.useDocumentEx)();
react__rspack_import_0.useImperativeHandle(props.componentRef, function () { return ({
focus: function (_forceIntoFirstElement, bypassHiddenElements) {
var focusSucceeded = false;
if (divContainer.current) {
focusSucceeded = (0,_Utilities__rspack_import_3.focusFirstChild)(divContainer.current, bypassHiddenElements);
}
return focusSucceeded;
},
focusElement: function (childElement) {
var focusSucceeded = false;
if (!childElement) {
return false;
}
if (divContainer.current && (0,_Utilities__rspack_import_4.elementContains)(divContainer.current, childElement)) {
childElement.focus();
focusSucceeded = (doc === null || doc === void 0 ? void 0 : doc.activeElement) === childElement;
}
return focusSucceeded;
},
}); }, [divContainer, doc]);
};
var OverflowSetBase = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var divContainer = react__rspack_import_0.useRef(null);
var mergedRef = (0,_fluentui_react_hooks__rspack_import_5.useMergedRefs)(divContainer, forwardedRef);
useComponentRef(props, divContainer);
var items = props.items, overflowItems = props.overflowItems, className = props.className, styles = props.styles, vertical = props.vertical, role = props.role, _a = props.overflowSide, overflowSide = _a === void 0 ? 'end' : _a, onRenderItem = props.onRenderItem;
var classNames = getClassNames(styles, { className: className, vertical: vertical });
var showOverflow = !!overflowItems && overflowItems.length > 0;
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_6.__assign)({}, (0,_Utilities__rspack_import_7.getNativeProps)(props, _Utilities__rspack_import_7.divProperties), { role: role || 'group', "aria-orientation": role === 'menubar' ? (vertical === true ? 'vertical' : 'horizontal') : undefined, className: classNames.root, ref: mergedRef }),
overflowSide === 'start' && showOverflow && react__rspack_import_0.createElement(_OverflowButton__rspack_import_8.OverflowButton, (0,tslib__rspack_import_6.__assign)({}, props, { className: classNames.overflowButton })),
items &&
items.map(function (item, i) { return (react__rspack_import_0.createElement("div", { className: classNames.item, key: item.key, role: "none" }, onRenderItem(item))); }),
overflowSide === 'end' && showOverflow && react__rspack_import_0.createElement(_OverflowButton__rspack_import_8.OverflowButton, (0,tslib__rspack_import_6.__assign)({}, props, { className: classNames.overflowButton }))));
});
OverflowSetBase.displayName = COMPONENT_NAME;
//# sourceMappingURL=OverflowSet.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
OverflowSet: () => (OverflowSet)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _OverflowSet_base__rspack_import_1 = __webpack_require__(/*! ./OverflowSet.base */ "./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.base.js");
/* import */ var _OverflowSet_styles__rspack_import_2 = __webpack_require__(/*! ./OverflowSet.styles */ "./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.styles.js");
var OverflowSet = (0,_Utilities__rspack_import_0.styled)(_OverflowSet_base__rspack_import_1.OverflowSetBase, _OverflowSet_styles__rspack_import_2.getStyles, undefined, {
scope: 'OverflowSet',
});
//# sourceMappingURL=OverflowSet.js.map
}),
"./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.styles.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/OverflowSet/OverflowSet.styles.js ***!
\***************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
var overflowItemStyle = {
flexShrink: 0,
display: 'inherit',
};
var getStyles = function (props) {
var className = props.className, vertical = props.vertical;
return {
root: [
'ms-OverflowSet',
{
position: 'relative',
display: 'flex',
flexWrap: 'nowrap',
},
vertical && { flexDirection: 'column' },
className,
],
item: ['ms-OverflowSet-item', overflowItemStyle],
overflowButton: ['ms-OverflowSet-overflowButton', overflowItemStyle],
};
};
//# sourceMappingURL=OverflowSet.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Overlay/Overlay.base.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Overlay/Overlay.base.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
OverlayBase: () => (OverlayBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/scroll.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var OverlayBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(OverlayBase, _super);
function OverlayBase(props) {
var _this = _super.call(this, props) || this;
(0,_Utilities__rspack_import_3.initializeComponentRef)(_this);
var _a = _this.props.allowTouchBodyScroll, allowTouchBodyScroll = _a === void 0 ? false : _a;
_this._allowTouchBodyScroll = allowTouchBodyScroll;
return _this;
}
OverlayBase.prototype.componentDidMount = function () {
!this._allowTouchBodyScroll && (0,_Utilities__rspack_import_4.disableBodyScroll)();
};
OverlayBase.prototype.componentWillUnmount = function () {
!this._allowTouchBodyScroll && (0,_Utilities__rspack_import_4.enableBodyScroll)();
};
OverlayBase.prototype.render = function () {
var _a = this.props, isDark = _a.isDarkThemed, className = _a.className, theme = _a.theme, styles = _a.styles;
var divProps = (0,_Utilities__rspack_import_5.getNativeProps)(this.props, _Utilities__rspack_import_5.divProperties);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
isDark: isDark,
});
return react__rspack_import_0.createElement("div", (0,tslib__rspack_import_2.__assign)({}, divProps, { className: classNames.root }));
};
return OverlayBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Overlay.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Overlay/Overlay.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Overlay/Overlay.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Overlay: () => (Overlay)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Overlay_base__rspack_import_1 = __webpack_require__(/*! ./Overlay.base */ "./node_modules/@fluentui/react/lib/components/Overlay/Overlay.base.js");
/* import */ var _Overlay_styles__rspack_import_2 = __webpack_require__(/*! ./Overlay.styles */ "./node_modules/@fluentui/react/lib/components/Overlay/Overlay.styles.js");
var Overlay = (0,_Utilities__rspack_import_0.styled)(_Overlay_base__rspack_import_1.OverlayBase, _Overlay_styles__rspack_import_2.getStyles, undefined, {
scope: 'Overlay',
});
//# sourceMappingURL=Overlay.js.map
}),
"./node_modules/@fluentui/react/lib/components/Overlay/Overlay.styles.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Overlay/Overlay.styles.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-Overlay',
rootDark: 'ms-Overlay--dark',
};
var getStyles = function (props) {
var _a;
var className = props.className, theme = props.theme, isNone = props.isNone, isDark = props.isDark;
var palette = theme.palette;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
theme.fonts.medium,
{
backgroundColor: palette.whiteTranslucent40,
top: 0,
right: 0,
bottom: 0,
left: 0,
position: 'absolute',
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
border: '1px solid WindowText',
opacity: 0,
},
_a),
},
isNone && {
visibility: 'hidden',
},
isDark && [
classNames.rootDark,
{
backgroundColor: palette.blackTranslucent40,
},
],
className,
],
};
};
//# sourceMappingURL=Overlay.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Panel/Panel.base.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Panel/Panel.base.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PanelBase: () => (PanelBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Button__rspack_import_4 = __webpack_require__(/*! ../../Button */ "./node_modules/@fluentui/react/lib/components/Button/IconButton/IconButton.js");
/* import */ var _Layer__rspack_import_16 = __webpack_require__(/*! ../../Layer */ "./node_modules/@fluentui/react/lib/components/Layer/Layer.js");
/* import */ var _Overlay__rspack_import_15 = __webpack_require__(/*! ../../Overlay */ "./node_modules/@fluentui/react/lib/components/Overlay/Overlay.js");
/* import */ var _Popup__rspack_import_17 = __webpack_require__(/*! ../../Popup */ "./node_modules/@fluentui/react/lib/components/Popup/Popup.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/scroll.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _Utilities__rspack_import_8 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_19 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _FocusTrapZone_index__rspack_import_18 = __webpack_require__(/*! ../FocusTrapZone/index */ "./node_modules/@fluentui/react/lib/components/FocusTrapZone/FocusTrapZone.js");
/* import */ var _Panel_types__rspack_import_12 = __webpack_require__(/*! ./Panel.types */ "./node_modules/@fluentui/react/lib/components/Panel/Panel.types.js");
/* import */ var _fluentui_react_window_provider__rspack_import_20 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _utilities_dom__rspack_import_11 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var COMPONENT_NAME = 'Panel';
var PanelVisibilityState;
(function (PanelVisibilityState) {
PanelVisibilityState[PanelVisibilityState["closed"] = 0] = "closed";
PanelVisibilityState[PanelVisibilityState["animatingOpen"] = 1] = "animatingOpen";
PanelVisibilityState[PanelVisibilityState["open"] = 2] = "open";
PanelVisibilityState[PanelVisibilityState["animatingClosed"] = 3] = "animatingClosed";
})(PanelVisibilityState || (PanelVisibilityState = {}));
var PanelBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(PanelBase, _super);
function PanelBase(props) {
var _this = _super.call(this, props) || this;
_this._panel = react__rspack_import_0.createRef();
_this._animationCallback = null;
_this._hasCustomNavigation = !!(_this.props.onRenderNavigation || _this.props.onRenderNavigationContent);
_this.dismiss = function (ev) {
if (_this.props.onDismiss && _this.isActive) {
_this.props.onDismiss(ev);
}
if (!ev || (ev && !ev.defaultPrevented)) {
_this.close();
}
};
// Allow the user to scroll within the panel but not on the body
_this._allowScrollOnPanel = function (elt) {
var _a;
_this._resizeObserver = _this._createResizeObserver(function (entries) {
if (entries.length > 0 && entries[0].target === elt) {
_this._updateFooterPosition();
}
});
if (elt) {
(_a = _this._resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(elt);
if (_this._allowTouchBodyScroll) {
(0,_Utilities__rspack_import_3.allowOverscrollOnElement)(elt, _this._events);
}
else {
(0,_Utilities__rspack_import_3.allowScrollOnElement)(elt, _this._events);
}
}
else {
_this._events.off(_this._scrollableContent);
}
_this._scrollableContent = elt;
};
_this._onRenderNavigation = function (props) {
if (!_this.props.onRenderNavigationContent && !_this.props.onRenderNavigation && !_this.props.hasCloseButton) {
return null;
}
var _a = _this.props.onRenderNavigationContent, onRenderNavigationContent = _a === void 0 ? _this._onRenderNavigationContent : _a;
return (react__rspack_import_0.createElement("div", { className: _this._classNames.navigation }, onRenderNavigationContent(props, _this._onRenderNavigationContent)));
};
_this._onRenderNavigationContent = function (props) {
var _a;
var closeButtonAriaLabel = props.closeButtonAriaLabel, hasCloseButton = props.hasCloseButton, _b = props.onRenderHeader, onRenderHeader = _b === void 0 ? _this._onRenderHeader : _b;
if (hasCloseButton) {
var iconButtonStyles = (_a = _this._classNames.subComponentStyles) === null || _a === void 0 ? void 0 : _a.closeButton();
return (react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null,
!_this._hasCustomNavigation && onRenderHeader(_this.props, _this._onRenderHeader, _this._headerTextId),
react__rspack_import_0.createElement(_Button__rspack_import_4.IconButton, { styles: iconButtonStyles, className: _this._classNames.closeButton, onClick: _this._onPanelClick, ariaLabel: closeButtonAriaLabel, title: closeButtonAriaLabel, "data-is-visible": true, iconProps: { iconName: 'Cancel' } })));
}
return null;
};
_this._onRenderHeader = function (props, defaultRender, headerTextId) {
var headerText = props.headerText, _a = props.headerTextProps, headerTextProps = _a === void 0 ? {} : _a;
if (headerText) {
return (react__rspack_import_0.createElement("div", { className: _this._classNames.header },
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_2.__assign)({ id: headerTextId, role: "heading", "aria-level": 1 }, headerTextProps, { className: (0,_Utilities__rspack_import_5.css)(_this._classNames.headerText, headerTextProps.className) }), headerText)));
}
return null;
};
_this._onRenderBody = function (props) {
return react__rspack_import_0.createElement("div", { className: _this._classNames.content }, props.children);
};
_this._onRenderFooter = function (props) {
var _a = _this.props.onRenderFooterContent, onRenderFooterContent = _a === void 0 ? null : _a;
if (onRenderFooterContent) {
return (react__rspack_import_0.createElement("div", { className: _this._classNames.footer },
react__rspack_import_0.createElement("div", { className: _this._classNames.footerInner }, onRenderFooterContent())));
}
return null;
};
_this._animateTo = function (newVisibilityState) {
if (newVisibilityState === PanelVisibilityState.open && _this.props.onOpen) {
_this.props.onOpen();
}
_this._animationCallback = _this._async.setTimeout(function () {
_this.setState({ visibility: newVisibilityState });
_this._onTransitionComplete(newVisibilityState);
}, 200);
};
_this._clearExistingAnimationTimer = function () {
if (_this._animationCallback !== null) {
_this._async.clearTimeout(_this._animationCallback);
}
};
_this._onPanelClick = function (ev) {
_this.dismiss(ev);
};
_this._onTransitionComplete = function (newVisibilityState) {
_this._updateFooterPosition();
if (newVisibilityState === PanelVisibilityState.open && _this.props.onOpened) {
_this.props.onOpened();
}
if (newVisibilityState === PanelVisibilityState.closed && _this.props.onDismissed) {
_this.props.onDismissed();
}
};
var _a = _this.props.allowTouchBodyScroll, allowTouchBodyScroll = _a === void 0 ? false : _a;
_this._allowTouchBodyScroll = allowTouchBodyScroll;
(0,_Utilities__rspack_import_6.initializeComponentRef)(_this);
(0,_Utilities__rspack_import_7.warnDeprecations)(COMPONENT_NAME, props, {
ignoreExternalFocusing: 'focusTrapZoneProps',
forceFocusInsideTrap: 'focusTrapZoneProps',
firstFocusableSelector: 'focusTrapZoneProps',
});
_this.state = {
isFooterSticky: false,
// intentionally ignore props so animation takes place during componentDidMount
visibility: PanelVisibilityState.closed,
id: (0,_Utilities__rspack_import_8.getId)('Panel'),
};
return _this;
}
PanelBase.getDerivedStateFromProps = function (nextProps, prevState) {
if (nextProps.isOpen === undefined) {
return null; // no state update
}
if (nextProps.isOpen &&
(prevState.visibility === PanelVisibilityState.closed ||
prevState.visibility === PanelVisibilityState.animatingClosed)) {
return { visibility: PanelVisibilityState.animatingOpen };
}
if (!nextProps.isOpen &&
(prevState.visibility === PanelVisibilityState.open ||
prevState.visibility === PanelVisibilityState.animatingOpen)) {
return { visibility: PanelVisibilityState.animatingClosed };
}
return null;
};
PanelBase.prototype.componentDidMount = function () {
this._async = new _Utilities__rspack_import_9.Async(this);
this._events = new _Utilities__rspack_import_10.EventGroup(this);
var win = (0,_utilities_dom__rspack_import_11.getWindowEx)(this.context);
var doc = (0,_utilities_dom__rspack_import_11.getDocumentEx)(this.context);
this._events.on(win, 'resize', this._updateFooterPosition);
if (this._shouldListenForOuterClick(this.props)) {
this._events.on(doc === null || doc === void 0 ? void 0 : doc.body, 'mousedown', this._dismissOnOuterClick, true);
}
if (this.props.isOpen) {
this.setState({ visibility: PanelVisibilityState.animatingOpen });
}
};
PanelBase.prototype.componentDidUpdate = function (previousProps, previousState) {
var shouldListenOnOuterClick = this._shouldListenForOuterClick(this.props);
var previousShouldListenOnOuterClick = this._shouldListenForOuterClick(previousProps);
if (this.state.visibility !== previousState.visibility) {
this._clearExistingAnimationTimer();
if (this.state.visibility === PanelVisibilityState.animatingOpen) {
this._animateTo(PanelVisibilityState.open);
}
else if (this.state.visibility === PanelVisibilityState.animatingClosed) {
this._animateTo(PanelVisibilityState.closed);
}
}
var doc = (0,_utilities_dom__rspack_import_11.getDocumentEx)(this.context);
if (shouldListenOnOuterClick && !previousShouldListenOnOuterClick) {
this._events.on(doc === null || doc === void 0 ? void 0 : doc.body, 'mousedown', this._dismissOnOuterClick, true);
}
else if (!shouldListenOnOuterClick && previousShouldListenOnOuterClick) {
this._events.off(doc === null || doc === void 0 ? void 0 : doc.body, 'mousedown', this._dismissOnOuterClick, true);
}
};
PanelBase.prototype.componentWillUnmount = function () {
var _a;
this._async.dispose();
this._events.dispose();
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
};
PanelBase.prototype.render = function () {
var _a = this.props, _b = _a.className, className = _b === void 0 ? '' : _b, elementToFocusOnDismiss = _a.elementToFocusOnDismiss,
/* eslint-disable @typescript-eslint/no-deprecated */
firstFocusableSelector = _a.firstFocusableSelector, focusTrapZoneProps = _a.focusTrapZoneProps, forceFocusInsideTrap = _a.forceFocusInsideTrap, hasCloseButton = _a.hasCloseButton, headerText = _a.headerText, _c = _a.headerClassName, headerClassName = _c === void 0 ? '' : _c, ignoreExternalFocusing = _a.ignoreExternalFocusing, isBlocking = _a.isBlocking, isFooterAtBottom = _a.isFooterAtBottom, isLightDismiss = _a.isLightDismiss, isHiddenOnDismiss = _a.isHiddenOnDismiss, layerProps = _a.layerProps, overlayProps = _a.overlayProps, popupProps = _a.popupProps, type = _a.type, styles = _a.styles, theme = _a.theme, customWidth = _a.customWidth, _d = _a.onLightDismissClick, onLightDismissClick = _d === void 0 ? this._onPanelClick : _d, _e = _a.onRenderNavigation, onRenderNavigation = _e === void 0 ? this._onRenderNavigation : _e, _f = _a.onRenderHeader, onRenderHeader = _f === void 0 ? this._onRenderHeader : _f, _g = _a.onRenderBody, onRenderBody = _g === void 0 ? this._onRenderBody : _g, _h = _a.onRenderFooter, onRenderFooter = _h === void 0 ? this._onRenderFooter : _h;
var _j = this.state, isFooterSticky = _j.isFooterSticky, visibility = _j.visibility, id = _j.id;
var isLeft = type === _Panel_types__rspack_import_12.PanelType.smallFixedNear || type === _Panel_types__rspack_import_12.PanelType.customNear ? true : false;
var isRTL = (0,_Utilities__rspack_import_13.getRTL)(theme);
var isOnRightSide = isRTL ? isLeft : !isLeft;
var customWidthStyles = type === _Panel_types__rspack_import_12.PanelType.custom || type === _Panel_types__rspack_import_12.PanelType.customNear ? { width: customWidth } : {};
var nativeProps = (0,_Utilities__rspack_import_14.getNativeProps)(this.props, _Utilities__rspack_import_14.divProperties);
var isOpen = this.isActive;
var isAnimating = visibility === PanelVisibilityState.animatingClosed || visibility === PanelVisibilityState.animatingOpen;
this._headerTextId = headerText && id + '-headerText';
if (!isOpen && !isAnimating && !isHiddenOnDismiss) {
return null;
}
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
focusTrapZoneClassName: focusTrapZoneProps ? focusTrapZoneProps.className : undefined,
hasCloseButton: hasCloseButton,
headerClassName: headerClassName,
isAnimating: isAnimating,
isFooterSticky: isFooterSticky,
isFooterAtBottom: isFooterAtBottom,
isOnRightSide: isOnRightSide,
isOpen: isOpen,
isHiddenOnDismiss: isHiddenOnDismiss,
type: type,
hasCustomNavigation: this._hasCustomNavigation,
});
var _k = this, _classNames = _k._classNames, _allowTouchBodyScroll = _k._allowTouchBodyScroll;
var overlay;
if (isBlocking && isOpen) {
overlay = (react__rspack_import_0.createElement(_Overlay__rspack_import_15.Overlay, (0,tslib__rspack_import_2.__assign)({ className: _classNames.overlay, isDarkThemed: false, onClick: isLightDismiss ? onLightDismissClick : undefined, allowTouchBodyScroll: _allowTouchBodyScroll }, overlayProps)));
}
return (react__rspack_import_0.createElement(_Layer__rspack_import_16.Layer, (0,tslib__rspack_import_2.__assign)({}, layerProps),
react__rspack_import_0.createElement(_Popup__rspack_import_17.Popup, (0,tslib__rspack_import_2.__assign)({ role: "dialog", "aria-modal": isBlocking ? 'true' : undefined, ariaLabelledBy: this._headerTextId ? this._headerTextId : undefined, onDismiss: this.dismiss, className: _classNames.hiddenPanel, enableAriaHiddenSiblings: isOpen ? true : false }, popupProps),
react__rspack_import_0.createElement("div", (0,tslib__rspack_import_2.__assign)({ "aria-hidden": !isOpen && isAnimating }, nativeProps, { ref: this._panel, className: _classNames.root }),
overlay,
react__rspack_import_0.createElement(_FocusTrapZone_index__rspack_import_18.FocusTrapZone, (0,tslib__rspack_import_2.__assign)({ ignoreExternalFocusing: ignoreExternalFocusing, forceFocusInsideTrap: !isBlocking || (isHiddenOnDismiss && !isOpen) ? false : forceFocusInsideTrap, firstFocusableSelector: firstFocusableSelector, isClickableOutsideFocusTrap: true }, focusTrapZoneProps, { className: _classNames.main, style: customWidthStyles, elementToFocusOnDismiss: elementToFocusOnDismiss }),
react__rspack_import_0.createElement("div", { className: _classNames.contentInner },
react__rspack_import_0.createElement("div", { ref: this._allowScrollOnPanel, className: _classNames.scrollableContent, "data-is-scrollable": true },
react__rspack_import_0.createElement("div", { className: _classNames.commands, "data-is-visible": true }, onRenderNavigation(this.props, this._onRenderNavigation)),
(this._hasCustomNavigation || !hasCloseButton) &&
onRenderHeader(this.props, this._onRenderHeader, this._headerTextId),
onRenderBody(this.props, this._onRenderBody),
onRenderFooter(this.props, this._onRenderFooter))))))));
};
PanelBase.prototype.open = function () {
if (this.props.isOpen !== undefined) {
return;
}
if (this.isActive) {
return;
}
this.setState({ visibility: PanelVisibilityState.animatingOpen });
};
PanelBase.prototype.close = function () {
if (this.props.isOpen !== undefined) {
return;
}
if (!this.isActive) {
return;
}
this.setState({ visibility: PanelVisibilityState.animatingClosed });
};
Object.defineProperty(PanelBase.prototype, "isActive", {
/** isActive is true when panel is open or opening. */
get: function () {
return (this.state.visibility === PanelVisibilityState.open ||
this.state.visibility === PanelVisibilityState.animatingOpen);
},
enumerable: false,
configurable: true
});
PanelBase.prototype._createResizeObserver = function (callback) {
var _a;
var doc = (0,_utilities_dom__rspack_import_11.getDocumentEx)(this.context);
var resizeObserver = null;
if ((_a = doc === null || doc === void 0 ? void 0 : doc.defaultView) === null || _a === void 0 ? void 0 : _a.ResizeObserver) {
resizeObserver = new doc.defaultView.ResizeObserver(callback);
}
return resizeObserver;
};
PanelBase.prototype._shouldListenForOuterClick = function (props) {
return !!props.isBlocking && !!props.isOpen;
};
PanelBase.prototype._updateFooterPosition = function () {
var scrollableContent = this._scrollableContent;
if (scrollableContent) {
var height = scrollableContent.clientHeight;
var innerHeight_1 = scrollableContent.scrollHeight;
this.setState({
isFooterSticky: height < innerHeight_1 ? true : false,
});
}
};
PanelBase.prototype._dismissOnOuterClick = function (ev) {
var panel = this._panel.current;
if (this.isActive && panel && !ev.defaultPrevented) {
if (!(0,_Utilities__rspack_import_19.elementContains)(panel, ev.target)) {
if (this.props.onOuterClick) {
this.props.onOuterClick(ev);
}
else {
this.dismiss(ev);
}
}
}
};
PanelBase.defaultProps = {
isHiddenOnDismiss: false,
isOpen: undefined,
isBlocking: true,
hasCloseButton: true,
type: _Panel_types__rspack_import_12.PanelType.smallFixedFar,
};
PanelBase.contextType = _fluentui_react_window_provider__rspack_import_20.WindowContext;
return PanelBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Panel.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Panel/Panel.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Panel/Panel.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Panel: () => (Panel)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Panel_base__rspack_import_1 = __webpack_require__(/*! ./Panel.base */ "./node_modules/@fluentui/react/lib/components/Panel/Panel.base.js");
/* import */ var _Panel_styles__rspack_import_2 = __webpack_require__(/*! ./Panel.styles */ "./node_modules/@fluentui/react/lib/components/Panel/Panel.styles.js");
/**
* Panel description
*/
var Panel = (0,_Utilities__rspack_import_0.styled)(_Panel_base__rspack_import_1.PanelBase, _Panel_styles__rspack_import_2.getStyles, undefined, {
scope: 'Panel',
});
//# sourceMappingURL=Panel.js.map
}),
"./node_modules/@fluentui/react/lib/components/Panel/Panel.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Panel/Panel.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Panel_types__rspack_import_1 = __webpack_require__(/*! ./Panel.types */ "./node_modules/@fluentui/react/lib/components/Panel/Panel.types.js");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var _a, _b, _c, _d, _e;
var GlobalClassNames = {
root: 'ms-Panel',
main: 'ms-Panel-main',
commands: 'ms-Panel-commands',
contentInner: 'ms-Panel-contentInner',
scrollableContent: 'ms-Panel-scrollableContent',
navigation: 'ms-Panel-navigation',
closeButton: 'ms-Panel-closeButton ms-PanelAction-close',
header: 'ms-Panel-header',
headerText: 'ms-Panel-headerText',
content: 'ms-Panel-content',
footer: 'ms-Panel-footer',
footerInner: 'ms-Panel-footerInner',
isOpen: 'is-open',
hasCloseButton: 'ms-Panel--hasCloseButton',
smallFluid: 'ms-Panel--smFluid',
smallFixedNear: 'ms-Panel--smLeft',
smallFixedFar: 'ms-Panel--sm',
medium: 'ms-Panel--md',
large: 'ms-Panel--lg',
largeFixed: 'ms-Panel--fixed',
extraLarge: 'ms-Panel--xl',
custom: 'ms-Panel--custom',
customNear: 'ms-Panel--customLeft',
};
var panelWidth = {
full: '100%',
auto: 'auto',
xs: 272,
sm: 340,
md1: 592,
md2: 644,
lg: 940,
};
var panelMargin = {
auto: 'auto',
none: 0,
md: 48,
lg: 428,
xl: 176,
};
// Following consts are used below in `getPanelBreakpoints()` function to provide
// necessary fallbacks for different types of Panel in different breakpoints.
var smallPanelSelectors = (_a = {},
_a["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinMedium, "px)")] = {
width: panelWidth.sm,
},
_a);
var mediumPanelSelectors = (_b = {},
_b["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinLarge, "px)")] = {
width: panelWidth.md1,
},
_b["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinXLarge, "px)")] = {
width: panelWidth.md2,
},
_b);
var largePanelSelectors = (_c = {},
_c["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinUhfMobile, "px)")] = {
left: panelMargin.md,
width: panelWidth.auto,
},
_c["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinXXLarge, "px)")] = {
left: panelMargin.lg,
},
_c);
var largeFixedPanelSelectors = (_d = {},
_d["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinXXLarge, "px)")] = {
left: panelMargin.auto,
width: panelWidth.lg,
},
_d);
var extraLargePanelSelectors = (_e = {},
_e["@media (min-width: ".concat(_Styling__rspack_import_0.ScreenWidthMinXXLarge, "px)")] = {
left: panelMargin.xl,
},
_e);
// Make sure Panels have fallbacks to different breakpoints by reusing same selectors.
// This is done in the effort to follow design redlines.
var getPanelBreakpoints = function (type) {
var selectors;
// Panel types `smallFluid`, `smallFixedNear`, `custom` and `customNear`
// are not checked in here because they render the same in all the breakpoints
// and have the checks done separately in the `getStyles` function below.
switch (type) {
case _Panel_types__rspack_import_1.PanelType.smallFixedFar:
selectors = (0,tslib__rspack_import_2.__assign)({}, smallPanelSelectors);
break;
case _Panel_types__rspack_import_1.PanelType.medium:
selectors = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, smallPanelSelectors), mediumPanelSelectors);
break;
case _Panel_types__rspack_import_1.PanelType.large:
selectors = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, smallPanelSelectors), mediumPanelSelectors), largePanelSelectors);
break;
case _Panel_types__rspack_import_1.PanelType.largeFixed:
selectors = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, smallPanelSelectors), mediumPanelSelectors), largePanelSelectors), largeFixedPanelSelectors);
break;
case _Panel_types__rspack_import_1.PanelType.extraLarge:
selectors = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, smallPanelSelectors), mediumPanelSelectors), largePanelSelectors), extraLargePanelSelectors);
break;
default:
break;
}
return selectors;
};
var commandBarHeight = '44px';
var sharedPaddingStyles = {
paddingLeft: '24px',
paddingRight: '24px',
};
var getStyles = function (props) {
var _a, _b, _c, _d;
var className = props.className, focusTrapZoneClassName = props.focusTrapZoneClassName, hasCloseButton = props.hasCloseButton, headerClassName = props.headerClassName, isAnimating = props.isAnimating, isFooterSticky = props.isFooterSticky, isFooterAtBottom = props.isFooterAtBottom, isOnRightSide = props.isOnRightSide, isOpen = props.isOpen, isHiddenOnDismiss = props.isHiddenOnDismiss, hasCustomNavigation = props.hasCustomNavigation, theme = props.theme, _e = props.type, type = _e === void 0 ? _Panel_types__rspack_import_1.PanelType.smallFixedFar : _e;
var effects = theme.effects, fonts = theme.fonts, semanticColors = theme.semanticColors;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
var isCustomPanel = type === _Panel_types__rspack_import_1.PanelType.custom || type === _Panel_types__rspack_import_1.PanelType.customNear;
return {
root: [
classNames.root,
theme.fonts.medium,
isOpen && classNames.isOpen,
hasCloseButton && classNames.hasCloseButton,
{
pointerEvents: 'none',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
isCustomPanel && isOnRightSide && classNames.custom,
isCustomPanel && !isOnRightSide && classNames.customNear,
className,
],
overlay: [
{
pointerEvents: 'auto',
cursor: 'pointer',
},
isOpen && isAnimating && _Styling__rspack_import_0.AnimationClassNames.fadeIn100,
!isOpen && isAnimating && _Styling__rspack_import_0.AnimationClassNames.fadeOut100,
],
hiddenPanel: [
!isOpen &&
!isAnimating &&
isHiddenOnDismiss && {
visibility: 'hidden',
},
],
main: [
classNames.main,
{
backgroundColor: semanticColors.bodyBackground,
boxShadow: effects.elevation64,
pointerEvents: 'auto',
position: 'absolute',
display: 'flex',
flexDirection: 'column',
overflowX: 'hidden',
overflowY: 'auto',
WebkitOverflowScrolling: 'touch',
bottom: 0,
top: 0,
// left, right, width are overridden depending on the type of the Panel and the screen breakpoint.
left: panelMargin.auto,
right: panelMargin.none,
width: panelWidth.full,
selectors: (0,tslib__rspack_import_2.__assign)((_a = {}, _a[_Styling__rspack_import_0.HighContrastSelector] = {
borderLeft: "3px solid ".concat(semanticColors.variantBorder),
borderRight: "3px solid ".concat(semanticColors.variantBorder),
}, _a), getPanelBreakpoints(type)),
},
type === _Panel_types__rspack_import_1.PanelType.smallFluid && {
left: panelMargin.none,
},
type === _Panel_types__rspack_import_1.PanelType.smallFixedNear && {
left: panelMargin.none,
right: panelMargin.auto,
width: panelWidth.xs,
},
type === _Panel_types__rspack_import_1.PanelType.customNear && {
right: 'auto',
left: 0,
},
isCustomPanel && {
maxWidth: '100vw',
},
isOpen && isAnimating && !isOnRightSide && _Styling__rspack_import_0.AnimationClassNames.slideRightIn40,
isOpen && isAnimating && isOnRightSide && _Styling__rspack_import_0.AnimationClassNames.slideLeftIn40,
!isOpen && isAnimating && !isOnRightSide && _Styling__rspack_import_0.AnimationClassNames.slideLeftOut40,
!isOpen && isAnimating && isOnRightSide && _Styling__rspack_import_0.AnimationClassNames.slideRightOut40,
focusTrapZoneClassName,
],
commands: [
classNames.commands,
{
// Ensures that the sticky header always has a background to prevent overlaps on scroll.
backgroundColor: semanticColors.bodyBackground,
paddingTop: 18,
selectors: (_b = {},
_b["@media (min-height: ".concat(_Styling__rspack_import_0.ScreenWidthMinMedium, "px)")] = {
position: 'sticky',
top: 0,
zIndex: 1,
},
_b),
},
hasCustomNavigation && {
paddingTop: 'inherit',
},
],
navigation: [
classNames.navigation,
{
display: 'flex',
justifyContent: 'flex-end',
},
hasCustomNavigation && {
height: commandBarHeight,
},
],
contentInner: [
classNames.contentInner,
{
display: 'flex',
flexDirection: 'column',
flexGrow: 1,
overflowY: 'hidden',
},
],
header: [
classNames.header,
sharedPaddingStyles,
{
alignSelf: 'flex-start',
},
hasCloseButton &&
!hasCustomNavigation && {
flexGrow: 1,
},
hasCustomNavigation && {
// Ensure that title doesn't shrink if screen is too small
flexShrink: 0,
},
],
headerText: [
classNames.headerText,
fonts.xLarge,
{
color: semanticColors.bodyText,
lineHeight: '27px',
overflowWrap: 'break-word',
wordWrap: 'break-word',
wordBreak: 'break-word',
hyphens: 'auto',
},
headerClassName,
],
scrollableContent: [
classNames.scrollableContent,
{
overflowY: 'auto',
},
isFooterAtBottom && {
flexGrow: 1,
display: 'inherit',
flexDirection: 'inherit',
},
],
content: [
classNames.content,
sharedPaddingStyles,
{
paddingBottom: 20,
},
isFooterAtBottom && {
selectors: (_c = {},
_c["@media (min-height: ".concat(_Styling__rspack_import_0.ScreenWidthMinMedium, "px)")] = {
flexGrow: 1,
},
_c),
},
],
footer: [
classNames.footer,
{
// Ensure that footer doesn't shrink if screen is too small
flexShrink: 0,
borderTop: '1px solid transparent',
transition: "opacity ".concat(_Styling__rspack_import_0.AnimationVariables.durationValue3, " ").concat(_Styling__rspack_import_0.AnimationVariables.easeFunction2),
selectors: (_d = {},
_d["@media (min-height: ".concat(_Styling__rspack_import_0.ScreenWidthMinMedium, "px)")] = {
position: 'sticky',
bottom: 0,
},
_d),
},
isFooterSticky && {
backgroundColor: semanticColors.bodyBackground,
borderTopColor: semanticColors.variantBorder,
},
],
footerInner: [
classNames.footerInner,
sharedPaddingStyles,
{
paddingBottom: 16,
paddingTop: 16,
},
],
subComponentStyles: {
closeButton: {
root: [
classNames.closeButton,
{
marginRight: 14,
color: theme.palette.neutralSecondary,
fontSize: _Styling__rspack_import_0.IconFontSizes.large,
},
hasCustomNavigation && {
marginRight: 0,
height: 'auto',
width: '44px',
},
],
rootHovered: {
color: theme.palette.neutralPrimary,
},
},
},
};
};
//# sourceMappingURL=Panel.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Panel/Panel.types.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Panel/Panel.types.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PanelType: () => (PanelType)
});
/**
* {@docCategory Panel}
*/
var PanelType;
(function (PanelType) {
/**
* Renders the Panel with a `fluid` (full screen) width.
* Recommended for use on small screen breakpoints.
* - Small (320-479): full screen width, 16px left/right padding
* - Medium (480-639): full screen width, 16px left/right padding
* - Large (640-1023): full screen width, 32px left/right padding
* - XLarge (1024-1365): full screen width, 32px left/right padding
* - XXLarge (1366-up): full screen width, 40px left/right padding
*/
PanelType[PanelType["smallFluid"] = 0] = "smallFluid";
/**
* Renders the Panel in fixed-width `small` size, anchored to the far side (right in LTR mode).
* - Small (320-479): adapts to `PanelType.smallFluid` at this breakpoint
* - Medium (480-639): 340px width, 16px left/right padding
* - Large (640-1023): 340px width, 32px left/right padding
* - XLarge (1024-1365): 340px width, 32px left/right padding
* - XXLarge (1366-up): 340px width, 40px left/right padding
*/
PanelType[PanelType["smallFixedFar"] = 1] = "smallFixedFar";
/**
* Renders the Panel in fixed-width `small` size, anchored to the near side (left in LTR mode).
* - Small (320-479): 272px width, 16px left/right padding
* - Medium (480-639): 272px width, 16px left/right padding
* - Large (640-1023): 272px width, 32px left/right padding
* - XLarge (1024-1365): 272px width, 32px left/right padding
* - XXLarge (1366-up): 272px width, 40px left/right padding
*/
PanelType[PanelType["smallFixedNear"] = 2] = "smallFixedNear";
/**
* Renders the Panel in `medium` size, anchored to the far side (right in LTR mode).
* - Small (320-479): adapts to `PanelType.smallFluid` at this breakpoint
* - Medium (480-639): adapts to `PanelType.smallFixedFar` at this breakpoint
* - Large (640-1023): 592px width, 32px left/right padding
* - XLarge (1024-1365): 644px width, 32px left/right padding
* - XXLarge (1366-up): 644px width, 40px left/right padding
*/
PanelType[PanelType["medium"] = 3] = "medium";
/**
* Renders the Panel in `large` size, anchored to the far side (right in LTR mode).
* - Small (320-479): adapts to `PanelType.smallFluid` at this breakpoint
* - Medium (480-639): adapts to `PanelType.smallFixedFar` at this breakpoint
* - Large (640-1023): adapts to `PanelType.medium` at this breakpoint
* - XLarge (1024-1365): 48px fixed left margin, fluid width, 32px left/right padding
* - XXLarge (1366-up): 428px fixed left margin, fluid width, 40px left/right padding
*/
PanelType[PanelType["large"] = 4] = "large";
/**
* Renders the Panel in `large` size, anchored to the far side (right in LTR mode), with a fixed width at
* XX-Large breakpoint.
* - Small (320-479): adapts to `PanelType.smallFluid` at this breakpoint
* - Medium (480-639): adapts to `PanelType.smallFixedFar` at this breakpoint
* - Large (640-1023): adapts to `PanelType.medium` at this breakpoint
* - XLarge (1024-1365): 48px fixed left margin, fluid width, 32px left/right padding
* - XXLarge (1366-up): 940px width, 40px left/right padding
*/
PanelType[PanelType["largeFixed"] = 5] = "largeFixed";
/**
* Renders the Panel in `extra large` size, anchored to the far side (right in LTR mode).
* - Small (320-479): adapts to `PanelType.smallFluid` at this breakpoint
* - Medium (480-639): adapts to `PanelType.smallFixedFar` at this breakpoint
* - Large (640-1023): adapts to `PanelType.medium` at this breakpoint
* - XLarge (1024-1365): adapts to `PanelType.large` at this breakpoint
* - XXLarge (1366-1919): 176px fixed left margin, fluid width, 40px left/right padding
* - XXXLarge (1920-up): 176px fixed left margin, fluid width, 40px left/right padding
*/
PanelType[PanelType["extraLarge"] = 6] = "extraLarge";
/**
* Renders the Panel in `custom` size using `customWidth`, anchored to the far side (right in LTR mode).
* - Has a fixed width provided by the `customWidth` prop
* - When screen width reaches the `customWidth` value it will behave like a fluid width Panel
* taking up 100% of the viewport width
*/
PanelType[PanelType["custom"] = 7] = "custom";
/**
* Renders the Panel in `custom` size using `customWidth`, anchored to the near side (left in LTR mode).
* - Has a fixed width provided by the `customWidth` prop
* - When screen width reaches the `customWidth` value it will behave like a fluid width Panel
* taking up 100% of the viewport width
*/
PanelType[PanelType["customNear"] = 8] = "customNear";
})(PanelType || (PanelType = {}));
//# sourceMappingURL=Panel.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/Popup/Popup.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Popup/Popup.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Popup: () => (Popup)
});
/* import */ var tslib__rspack_import_11 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/focus.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/modalize.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _fluentui_react_hooks__rspack_import_1 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useAsync.js");
/* import */ var _fluentui_react_hooks__rspack_import_5 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useOnEvent.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _fluentui_react_window_provider__rspack_import_10 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
function useScrollbarAsync(props, root) {
var async = (0,_fluentui_react_hooks__rspack_import_1.useAsync)();
var _a = react__rspack_import_0.useState(false), needsVerticalScrollBarState = _a[0], setNeedsVerticalScrollBar = _a[1];
react__rspack_import_0.useEffect(function () {
async.requestAnimationFrame(function () {
var _a;
// If overflowY is overridden, don't waste time calculating whether the scrollbar is necessary.
if (props.style && props.style.overflowY) {
return;
}
var needsVerticalScrollBar = false;
if (root && root.current && ((_a = root.current) === null || _a === void 0 ? void 0 : _a.firstElementChild)) {
// ClientHeight returns the client height of an element rounded to an
// integer. On some browsers at different zoom levels this rounding
// can generate different results for the root container and child even
// though they are the same height. This causes us to show a scroll bar
// when not needed. Ideally we would use BoundingClientRect().height
// instead however seems that the API is 90% slower than using ClientHeight.
// Therefore instead we will calculate the difference between heights and
// allow for a 1px difference to still be considered ok and not show the
// scroll bar.
var rootHeight = root.current.clientHeight;
var firstChildHeight = root.current.firstElementChild.clientHeight;
if (rootHeight > 0 && firstChildHeight > rootHeight) {
needsVerticalScrollBar = firstChildHeight - rootHeight > 1;
}
}
if (needsVerticalScrollBarState !== needsVerticalScrollBar) {
setNeedsVerticalScrollBar(needsVerticalScrollBar);
}
});
return function () { return async.dispose(); };
});
return needsVerticalScrollBarState;
}
function defaultFocusRestorer(options) {
var originalElement = options.originalElement, containsFocus = options.containsFocus;
if (originalElement && containsFocus && originalElement !== (0,_Utilities__rspack_import_2.getWindow)()) {
// Make sure that the focus method actually exists
// In some cases the object might exist but not be a real element.
// This is primarily for IE 11 and should be removed once IE 11 is no longer in use.
// This is wrapped in a setTimeout because of a React 16 bug that is resolved in 17.
// Once we move to 17, the setTimeout should be removed (ref: https://github.com/facebook/react/issues/17894#issuecomment-656094405)
setTimeout(function () {
var _a;
(_a = originalElement.focus) === null || _a === void 0 ? void 0 : _a.call(originalElement);
}, 0);
}
}
function useRestoreFocus(props, root) {
var _a = props.onRestoreFocus, onRestoreFocus = _a === void 0 ? defaultFocusRestorer : _a;
var originalFocusedElement = react__rspack_import_0.useRef(undefined);
var containsFocus = react__rspack_import_0.useRef(false);
react__rspack_import_0.useEffect(function () {
originalFocusedElement.current = (0,_Utilities__rspack_import_3.getDocument)().activeElement;
if ((0,_Utilities__rspack_import_4.doesElementContainFocus)(root.current)) {
containsFocus.current = true;
}
return function () {
var _a;
onRestoreFocus === null || onRestoreFocus === void 0 ? void 0 : onRestoreFocus({
originalElement: originalFocusedElement.current,
containsFocus: containsFocus.current,
documentContainsFocus: ((_a = (0,_Utilities__rspack_import_3.getDocument)()) === null || _a === void 0 ? void 0 : _a.hasFocus()) || false,
});
// De-reference DOM Node to avoid retainment via transpiled closure of _onKeyDown
originalFocusedElement.current = undefined;
};
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run on first render
}, []);
(0,_fluentui_react_hooks__rspack_import_5.useOnEvent)(root, 'focus', react__rspack_import_0.useCallback(function () {
containsFocus.current = true;
}, []), true);
(0,_fluentui_react_hooks__rspack_import_5.useOnEvent)(root, 'blur', react__rspack_import_0.useCallback(function (ev) {
/** The popup should update this._containsFocus when:
* relatedTarget exists AND
* the relatedTarget is not contained within the popup.
* If the relatedTarget is within the popup, that means the popup still has focus
* and focused moved from one element to another within the popup.
* If relatedTarget is undefined or null that usually means that a
* keyboard event occurred and focus didn't change
*/
if (root.current && ev.relatedTarget && !root.current.contains(ev.relatedTarget)) {
containsFocus.current = false;
}
// eslint-disable-next-line react-hooks/exhaustive-deps -- should only run on first render
}, []), true);
}
function useHideSiblingNodes(props, root) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var shouldHideSiblings = String(props['aria-modal']).toLowerCase() === 'true' && props.enableAriaHiddenSiblings;
react__rspack_import_0.useEffect(function () {
if (!(shouldHideSiblings && root.current)) {
return;
}
var unmodalize = (0,_Utilities__rspack_import_6.modalize)(root.current);
return unmodalize;
}, [root, shouldHideSiblings]);
}
/**
* This adds accessibility to Dialog and Panel controls
*/
var Popup = react__rspack_import_0.forwardRef(function (propsWithoutDefaults, forwardedRef) {
var props = (0,_Utilities__rspack_import_7.getPropsWithDefaults)({ shouldRestoreFocus: true, enableAriaHiddenSiblings: true }, propsWithoutDefaults);
var root = react__rspack_import_0.useRef(undefined);
var mergedRootRef = (0,_fluentui_react_hooks__rspack_import_8.useMergedRefs)(root, forwardedRef);
useHideSiblingNodes(props, root);
useRestoreFocus(props, root);
var role = props.role, className = props.className, ariaLabel = props.ariaLabel, ariaLabelledBy = props.ariaLabelledBy, ariaDescribedBy = props.ariaDescribedBy, style = props.style, children = props.children, onDismiss = props.onDismiss;
var needsVerticalScrollBar = useScrollbarAsync(props, root);
var onKeyDown = react__rspack_import_0.useCallback(function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case _Utilities__rspack_import_9.KeyCodes.escape:
if (onDismiss) {
onDismiss(ev);
ev.preventDefault();
ev.stopPropagation();
}
break;
}
}, [onDismiss]);
var win = (0,_fluentui_react_window_provider__rspack_import_10.useWindow)();
(0,_fluentui_react_hooks__rspack_import_5.useOnEvent)(win, 'keydown', onKeyDown);
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_11.__assign)({ ref: mergedRootRef }, (0,_Utilities__rspack_import_12.getNativeProps)(props, _Utilities__rspack_import_12.divProperties), { className: className, role: role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onKeyDown: onKeyDown, style: (0,tslib__rspack_import_11.__assign)({ overflowY: needsVerticalScrollBar ? 'scroll' : undefined, outline: 'none' }, style) }), children));
});
Popup.displayName = 'Popup';
//# sourceMappingURL=Popup.js.map
}),
"./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.base.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.base.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MeasuredContext: () => (MeasuredContext),
ResizeGroupBase: () => (ResizeGroupBase),
getMeasurementCache: () => (getMeasurementCache),
getNextResizeGroupStateProvider: () => (getNextResizeGroupStateProvider)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _ResizeGroup_types__rspack_import_4 = __webpack_require__(/*! ./ResizeGroup.types */ "./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.types.js");
/* import */ var _fluentui_react_hooks__rspack_import_2 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useConst.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useAsync.js");
/* import */ var _fluentui_react_hooks__rspack_import_6 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useOnEvent.js");
/* import */ var _fluentui_react_hooks__rspack_import_7 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useWarnings.js");
/* import */ var _fluentui_react_hooks__rspack_import_8 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useMergedRefs.js");
/* import */ var _WindowProvider__rspack_import_5 = __webpack_require__(/*! ../../WindowProvider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
var RESIZE_DELAY = 16;
/**
* Returns a simple object is able to store measurements with a given key.
*/
var getMeasurementCache = function () {
var measurementsCache = {};
return {
/**
* Checks if the provided data has a cacheKey. If it has a cacheKey and there is a
* corresponding entry in the measurementsCache, then it will return that value.
* Returns undefined otherwise.
*/
getCachedMeasurement: function (data) {
if (data && data.cacheKey && measurementsCache.hasOwnProperty(data.cacheKey)) {
return measurementsCache[data.cacheKey];
}
return undefined;
},
/**
* Should be called whenever there is a new measurement associated with a given data object.
* If the data has a cacheKey, store that measurement in the measurementsCache.
*/
addMeasurementToCache: function (data, measurement) {
if (data.cacheKey) {
measurementsCache[data.cacheKey] = measurement;
}
},
};
};
/**
* Returns a function that is able to compute the next state for the ResizeGroup given the current
* state and any measurement updates.
*/
var getNextResizeGroupStateProvider = function (measurementCache) {
if (measurementCache === void 0) { measurementCache = getMeasurementCache(); }
var _measurementCache = measurementCache;
var _containerDimension;
/**
* Gets the width/height of the data rendered in a hidden div.
* @param measuredData - The data corresponding to the measurement we wish to take.
* @param getElementToMeasureDimension - A function that returns the measurement of the rendered data.
* Only called when the measurement is not in the cache.
*/
function _getMeasuredDimension(measuredData, getElementToMeasureDimension) {
var cachedDimension = _measurementCache.getCachedMeasurement(measuredData);
if (cachedDimension !== undefined) {
return cachedDimension;
}
var measuredDimension = getElementToMeasureDimension();
_measurementCache.addMeasurementToCache(measuredData, measuredDimension);
return measuredDimension;
}
/**
* Will get the next IResizeGroupState based on the current data while trying to shrink contents
* to fit in the container.
* @param data - The initial data point to start measuring.
* @param onReduceData - Function that transforms the data into something that should render with less width/height.
* @param getElementToMeasureDimension - A function that returns the measurement of the rendered data.
* Only called when the measurement is not in the cache.
*/
function _shrinkContentsUntilTheyFit(data, onReduceData, getElementToMeasureDimension) {
var dataToMeasure = data;
var measuredDimension = _getMeasuredDimension(data, getElementToMeasureDimension);
while (measuredDimension > _containerDimension) {
var nextMeasuredData = onReduceData(dataToMeasure);
// We don't want to get stuck in an infinite render loop when there are no more
// scaling steps, so implementations of onReduceData should return undefined when
// there are no more scaling states to apply.
if (nextMeasuredData === undefined) {
return {
renderedData: dataToMeasure,
resizeDirection: undefined,
dataToMeasure: undefined,
};
}
measuredDimension = _measurementCache.getCachedMeasurement(nextMeasuredData);
// If the measurement isn't in the cache, we need to re-render with some data in a hidden div
if (measuredDimension === undefined) {
return {
dataToMeasure: nextMeasuredData,
resizeDirection: 'shrink',
};
}
dataToMeasure = nextMeasuredData;
}
return {
renderedData: dataToMeasure,
resizeDirection: undefined,
dataToMeasure: undefined,
};
}
/**
* This function should be called when the state changes in a manner that might allow for more content to fit
* on the screen, such as the window width/height growing.
* @param data - The initial data point to start measuring.
* @param onGrowData - Function that transforms the data into something that may take up more space when rendering.
* @param getElementToMeasureDimension - A function that returns the measurement of the rendered data.
* Only called when the measurement is not in the cache.
*/
function _growDataUntilItDoesNotFit(data, onGrowData, getElementToMeasureDimension, onReduceData) {
var dataToMeasure = data;
var measuredDimension = _getMeasuredDimension(data, getElementToMeasureDimension);
while (measuredDimension < _containerDimension) {
var nextMeasuredData = onGrowData(dataToMeasure);
// We don't want to get stuck in an infinite render loop when there are no more
// scaling steps, so implementations of onGrowData should return undefined when
// there are no more scaling states to apply.
if (nextMeasuredData === undefined) {
return {
renderedData: dataToMeasure,
resizeDirection: undefined,
dataToMeasure: undefined,
};
}
measuredDimension = _measurementCache.getCachedMeasurement(nextMeasuredData);
// If the measurement isn't in the cache, we need to re-render with some data in a hidden div
if (measuredDimension === undefined) {
return {
dataToMeasure: nextMeasuredData,
};
}
dataToMeasure = nextMeasuredData;
}
// Once the loop is done, we should now shrink until the contents fit.
return (0,tslib__rspack_import_1.__assign)({ resizeDirection: 'shrink' }, _shrinkContentsUntilTheyFit(dataToMeasure, onReduceData, getElementToMeasureDimension));
}
/**
* Handles an update to the container width/height.
* Should only be called when we knew the previous container width/height.
* @param newDimension - The new width/height of the container.
* @param fullDimensionData - The initial data passed in as a prop to resizeGroup.
* @param renderedData - The data that was rendered prior to the container size changing.
* @param onGrowData - Set to true if the Resize group has an onGrowData function.
*/
function _updateContainerDimension(newDimension, fullDimensionData, renderedData, onGrowData) {
var nextState;
if (newDimension > _containerDimension) {
if (onGrowData) {
nextState = {
resizeDirection: 'grow',
dataToMeasure: onGrowData(renderedData),
};
}
else {
nextState = {
resizeDirection: 'shrink',
dataToMeasure: fullDimensionData,
};
}
}
else {
nextState = {
resizeDirection: 'shrink',
dataToMeasure: renderedData,
};
}
_containerDimension = newDimension;
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, nextState), { measureContainer: false });
}
function getNextState(props, currentState, getElementToMeasureDimension, newContainerDimension) {
// If there is no new container width/height or data to measure, there is no need for a new state update
if (newContainerDimension === undefined && currentState.dataToMeasure === undefined) {
return undefined;
}
if (newContainerDimension) {
// If we know the last container size and we rendered data at that width/height, we can do an optimized render
if (_containerDimension && currentState.renderedData && !currentState.dataToMeasure) {
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, currentState), _updateContainerDimension(newContainerDimension, props.data, currentState.renderedData, props.onGrowData));
}
// If we are just setting the container width/height for the first time, we can't do any optimizations
_containerDimension = newContainerDimension;
}
var nextState = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, currentState), { measureContainer: false });
if (currentState.dataToMeasure) {
if (currentState.resizeDirection === 'grow' && props.onGrowData) {
nextState = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, nextState), _growDataUntilItDoesNotFit(currentState.dataToMeasure, props.onGrowData, getElementToMeasureDimension, props.onReduceData));
}
else {
nextState = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, nextState), _shrinkContentsUntilTheyFit(currentState.dataToMeasure, props.onReduceData, getElementToMeasureDimension));
}
}
return nextState;
}
/** Function that determines if we need to render content for measurement based on the measurement cache contents. */
function shouldRenderDataForMeasurement(dataToMeasure) {
if (!dataToMeasure || _measurementCache.getCachedMeasurement(dataToMeasure) !== undefined) {
return false;
}
return true;
}
function getInitialResizeGroupState(data) {
return {
dataToMeasure: (0,tslib__rspack_import_1.__assign)({}, data),
resizeDirection: 'grow',
measureContainer: true,
};
}
return {
getNextState: getNextState,
shouldRenderDataForMeasurement: shouldRenderDataForMeasurement,
getInitialResizeGroupState: getInitialResizeGroupState,
};
};
// Provides a context property that (if true) tells any child components that
// they are only being used for measurement purposes and will not be visible.
var MeasuredContext = react__rspack_import_0.createContext({ isMeasured: false });
// Styles for the hidden div used for measurement
var hiddenDivStyles = { position: 'fixed', visibility: 'hidden' };
var hiddenParentStyles = { position: 'relative' };
var COMPONENT_NAME = 'ResizeGroup';
/**
* Use useReducer instead of userState because React is not batching the state updates
* when state is set in callbacks of setTimeout or requestAnimationFrame.
* See issue: https://github.com/facebook/react/issues/14259
*/
function resizeDataReducer(state, action) {
var _a;
switch (action.type) {
case 'resizeData':
return (0,tslib__rspack_import_1.__assign)({}, action.value);
case 'dataToMeasure':
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, state), { dataToMeasure: action.value, resizeDirection: 'grow', measureContainer: true });
default:
return (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, state), (_a = {}, _a[action.type] = action.value, _a));
}
}
function useResizeState(props, nextResizeGroupStateProvider, rootRef) {
var initialStateData = (0,_fluentui_react_hooks__rspack_import_2.useConst)(function () { return nextResizeGroupStateProvider.getInitialResizeGroupState(props.data); });
var _a = react__rspack_import_0.useReducer(resizeDataReducer, initialStateData), resizeData = _a[0], dispatchResizeDataAction = _a[1];
// Reset state when new data is provided
react__rspack_import_0.useEffect(function () {
dispatchResizeDataAction({
type: 'dataToMeasure',
value: props.data,
});
}, [props.data]);
// Because it's possible that we may force more than one re-render per animation frame, we
// want to make sure that the RAF request is using the most recent data.
var stateRef = react__rspack_import_0.useRef(initialStateData);
stateRef.current = (0,tslib__rspack_import_1.__assign)({}, resizeData);
var updateResizeState = react__rspack_import_0.useCallback(function (nextState) {
if (nextState) {
dispatchResizeDataAction({
type: 'resizeData',
value: nextState,
});
}
}, []);
var remeasure = react__rspack_import_0.useCallback(function () {
if (rootRef.current) {
dispatchResizeDataAction({
type: 'measureContainer',
value: true,
});
}
}, [rootRef]);
return [stateRef, updateResizeState, remeasure];
}
function useResizingBehavior(props, rootRef) {
var nextResizeGroupStateProvider = (0,_fluentui_react_hooks__rspack_import_2.useConst)(getNextResizeGroupStateProvider);
// A div that can be used for the initial measurement so that we can avoid mounting a second instance
// of the component being measured for the initial render.
var initialHiddenDiv = react__rspack_import_0.useRef(null);
// A hidden div that is used for mounting a new instance of the component for measurement in a hidden
// div without unmounting the currently visible content.
var updateHiddenDiv = react__rspack_import_0.useRef(null);
// Tracks if any content has been rendered to the user. This enables us to do some performance optimizations
// for the initial render.
var hasRenderedContent = react__rspack_import_0.useRef(false);
var async = (0,_fluentui_react_hooks__rspack_import_3.useAsync)();
var _a = useResizeState(props, nextResizeGroupStateProvider, rootRef), stateRef = _a[0], updateResizeState = _a[1], remeasure = _a[2];
react__rspack_import_0.useEffect(function () {
var _a;
if (stateRef.current.renderedData) {
hasRenderedContent.current = true;
(_a = props.dataDidRender) === null || _a === void 0 ? void 0 : _a.call(props, stateRef.current.renderedData);
}
});
react__rspack_import_0.useEffect(function () {
async.requestAnimationFrame(function () {
var containerDimension = undefined;
if (stateRef.current.measureContainer && rootRef.current) {
var boundingRect = rootRef.current.getBoundingClientRect();
containerDimension =
props.direction === _ResizeGroup_types__rspack_import_4.ResizeGroupDirection.vertical ? boundingRect.height : boundingRect.width;
}
var nextState = nextResizeGroupStateProvider.getNextState(props, stateRef.current, function () {
var refToMeasure = !hasRenderedContent.current ? initialHiddenDiv : updateHiddenDiv;
if (!refToMeasure.current) {
return 0;
}
var measuredBoundingRect = refToMeasure.current.getBoundingClientRect();
return props.direction === _ResizeGroup_types__rspack_import_4.ResizeGroupDirection.vertical
? measuredBoundingRect.height
: measuredBoundingRect.width;
}, containerDimension);
updateResizeState(nextState);
}, rootRef.current);
});
var win = (0,_WindowProvider__rspack_import_5.useWindow)();
(0,_fluentui_react_hooks__rspack_import_6.useOnEvent)(win, 'resize', async.debounce(remeasure, RESIZE_DELAY, { leading: true }));
var dataNeedsMeasuring = nextResizeGroupStateProvider.shouldRenderDataForMeasurement(stateRef.current.dataToMeasure);
var isInitialMeasure = !hasRenderedContent.current && dataNeedsMeasuring;
return [
stateRef.current.dataToMeasure,
stateRef.current.renderedData,
remeasure,
initialHiddenDiv,
updateHiddenDiv,
dataNeedsMeasuring,
isInitialMeasure,
];
}
function useDebugWarnings(props) {
if (true) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional
(0,_fluentui_react_hooks__rspack_import_7.useWarnings)({
name: COMPONENT_NAME,
props: props,
deprecations: { styles: 'className' },
});
}
}
var measuredContextValue = { isMeasured: true };
var ResizeGroupBase = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var rootRef = react__rspack_import_0.useRef(null);
// The root div which is the container inside of which we are trying to fit content.
var mergedRootRef = (0,_fluentui_react_hooks__rspack_import_8.useMergedRefs)(rootRef, forwardedRef);
var _a = useResizingBehavior(props, rootRef), dataToMeasure = _a[0], renderedData = _a[1], remeasure = _a[2], initialHiddenDiv = _a[3], updateHiddenDiv = _a[4], dataNeedsMeasuring = _a[5], isInitialMeasure = _a[6];
react__rspack_import_0.useImperativeHandle(props.componentRef, function () { return ({ remeasure: remeasure }); }, [remeasure]);
useDebugWarnings(props);
var className = props.className, onRenderData = props.onRenderData;
var divProps = (0,_Utilities__rspack_import_9.getNativeProps)(props, _Utilities__rspack_import_9.divProperties, ['data']);
// We only ever render the final content to the user. All measurements are done in a hidden div.
// For the initial render, we want this to be as fast as possible, so we need to make sure that we only mount one
// version of the component for measurement and the final render. For renders that update what is on screen, we
// want to make sure that there are no jarring effects such as the screen flashing as we apply scaling steps for
// measurement. In the update case, we mount a second version of the component just for measurement purposes and
// leave the rendered content untouched until we know the next state to show to the user.
return (react__rspack_import_0.createElement("div", (0,tslib__rspack_import_1.__assign)({}, divProps, { className: className, ref: mergedRootRef }),
react__rspack_import_0.createElement("div", { style: hiddenParentStyles },
dataNeedsMeasuring && !isInitialMeasure && (react__rspack_import_0.createElement("div", { style: hiddenDivStyles, ref: updateHiddenDiv },
react__rspack_import_0.createElement(MeasuredContext.Provider, { value: measuredContextValue }, onRenderData(dataToMeasure)))),
react__rspack_import_0.createElement("div", { ref: initialHiddenDiv, style: isInitialMeasure ? hiddenDivStyles : undefined, "data-automation-id": "visibleContent" }, isInitialMeasure ? onRenderData(dataToMeasure) : renderedData && onRenderData(renderedData)))));
});
ResizeGroupBase.displayName = 'ResizeGroupBase';
//# sourceMappingURL=ResizeGroup.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ResizeGroup: () => (ResizeGroup)
});
/* import */ var _ResizeGroup_base__rspack_import_0 = __webpack_require__(/*! ./ResizeGroup.base */ "./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.base.js");
var ResizeGroup = _ResizeGroup_base__rspack_import_0.ResizeGroupBase;
//# sourceMappingURL=ResizeGroup.js.map
}),
"./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.types.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/ResizeGroup/ResizeGroup.types.js ***!
\**************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ResizeGroupDirection: () => (ResizeGroupDirection)
});
/**
* {@docCategory ResizeGroup}
*/
var ResizeGroupDirection;
(function (ResizeGroupDirection) {
ResizeGroupDirection[ResizeGroupDirection["horizontal"] = 0] = "horizontal";
ResizeGroupDirection[ResizeGroupDirection["vertical"] = 1] = "vertical";
})(ResizeGroupDirection || (ResizeGroupDirection = {}));
//# sourceMappingURL=ResizeGroup.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/Stack/Stack.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Stack/Stack.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Stack: () => (Stack),
"default": () => (__rspack_default_export)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_foundation_legacy__rspack_import_5 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/slots.js");
/* import */ var _fluentui_foundation_legacy__rspack_import_9 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/createComponent.js");
/* import */ var _fluentui_react_hooks__rspack_import_3 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useId.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/css.js");
/* import */ var _Stack_styles__rspack_import_7 = __webpack_require__(/*! ./Stack.styles */ "./node_modules/@fluentui/react/lib/components/Stack/Stack.styles.js");
/* import */ var _StackItem_StackItem__rspack_import_8 = __webpack_require__(/*! ./StackItem/StackItem */ "./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.js");
/** @jsxRuntime classic */
/** @jsx withSlots */
var StackView = function (props) {
var _a = props.as, RootType = _a === void 0 ? 'div' : _a, _b = props.disableShrink, disableShrink = _b === void 0 ? false : _b,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_c = props.doNotRenderFalsyValues,
// eslint-disable-next-line @typescript-eslint/no-deprecated
doNotRenderFalsyValues = _c === void 0 ? false : _c, _d = props.enableScopedSelectors, enableScopedSelectors = _d === void 0 ? false : _d, wrap = props.wrap, rest = (0,tslib__rspack_import_1.__rest)(props, ["as", "disableShrink", "doNotRenderFalsyValues", "enableScopedSelectors", "wrap"]);
(0,_Utilities__rspack_import_2.warnDeprecations)('Stack', props, {
gap: 'tokens.childrenGap',
maxHeight: 'tokens.maxHeight',
maxWidth: 'tokens.maxWidth',
padding: 'tokens.padding',
});
var stackInnerId = (0,_fluentui_react_hooks__rspack_import_3.useId)('stack-inner');
var stackChildren = _processStackChildren(props.children, {
disableShrink: disableShrink,
enableScopedSelectors: enableScopedSelectors,
doNotRenderFalsyValues: doNotRenderFalsyValues,
});
var nativeProps = (0,_Utilities__rspack_import_4.getNativeProps)(rest, _Utilities__rspack_import_4.htmlElementProperties);
var Slots = (0,_fluentui_foundation_legacy__rspack_import_5.getSlots)(props, {
root: RootType,
inner: 'div',
});
if (wrap) {
return ((0,_fluentui_foundation_legacy__rspack_import_5.withSlots)(Slots.root, (0,tslib__rspack_import_1.__assign)({}, nativeProps),
(0,_fluentui_foundation_legacy__rspack_import_5.withSlots)(Slots.inner, { key: stackInnerId }, stackChildren)));
}
return (0,_fluentui_foundation_legacy__rspack_import_5.withSlots)(Slots.root, (0,tslib__rspack_import_1.__assign)({}, nativeProps), stackChildren);
};
function _processStackChildren(children, _a) {
var disableShrink = _a.disableShrink, enableScopedSelectors = _a.enableScopedSelectors, doNotRenderFalsyValues = _a.doNotRenderFalsyValues;
var childrenArray = react__rspack_import_0.Children.toArray(children);
childrenArray = react__rspack_import_0.Children.map(childrenArray, function (child) {
if (!child) {
return doNotRenderFalsyValues ? null : child;
}
// We need to allow children that aren't falsy values, but not valid elements since they could be
// a string like {'sample string'}
if (!react__rspack_import_0.isValidElement(child)) {
return child;
}
if (child.type === react__rspack_import_0.Fragment) {
var fragmentChild = child;
return fragmentChild.props.children
? _processStackChildren(fragmentChild.props.children, {
disableShrink: disableShrink,
enableScopedSelectors: enableScopedSelectors,
doNotRenderFalsyValues: doNotRenderFalsyValues,
})
: null;
}
var childAsReactElement = child;
var defaultItemProps = {};
if (_isStackItem(child)) {
defaultItemProps = { shrink: !disableShrink };
}
var childClassName = childAsReactElement.props.className;
return react__rspack_import_0.cloneElement(childAsReactElement, (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, defaultItemProps), childAsReactElement.props), (childClassName && { className: childClassName })), (enableScopedSelectors && { className: (0,_Utilities__rspack_import_6.css)(_Stack_styles__rspack_import_7.GlobalClassNames.child, childClassName) })));
});
return childrenArray;
}
function _isStackItem(item) {
// In theory, we should be able to just check item.type === StackItem.
// However, under certain unclear circumstances (see https://github.com/microsoft/fluentui/issues/10785),
// the object identity is different despite the function implementation being the same.
return (!!item &&
typeof item === 'object' &&
!!item.type &&
// StackItem is generated by createComponent, so we need to check its displayName instead of name
item.type.displayName === _StackItem_StackItem__rspack_import_8.StackItem.displayName);
}
var StackStatics = {
Item: _StackItem_StackItem__rspack_import_8.StackItem,
};
var Stack = (0,_fluentui_foundation_legacy__rspack_import_9.createComponent)(StackView, {
displayName: 'Stack',
styles: _Stack_styles__rspack_import_7.styles,
statics: StackStatics,
});
/* export default */ const __rspack_default_export = (Stack);
//# sourceMappingURL=Stack.js.map
}),
"./node_modules/@fluentui/react/lib/components/Stack/Stack.styles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Stack/Stack.styles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
GlobalClassNames: () => (GlobalClassNames),
styles: () => (styles)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _StackItem_StackItem_styles__rspack_import_2 = __webpack_require__(/*! ./StackItem/StackItem.styles */ "./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.styles.js");
/* import */ var _StackUtils__rspack_import_1 = __webpack_require__(/*! ./StackUtils */ "./node_modules/@fluentui/react/lib/components/Stack/StackUtils.js");
var nameMap = {
start: 'flex-start',
end: 'flex-end',
};
var GlobalClassNames = {
root: 'ms-Stack',
inner: 'ms-Stack-inner',
child: 'ms-Stack-child',
};
var styles = function (props, theme, tokens) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
var className = props.className, disableShrink = props.disableShrink, enableScopedSelectors = props.enableScopedSelectors, grow = props.grow, horizontal = props.horizontal, horizontalAlign = props.horizontalAlign, reversed = props.reversed, verticalAlign = props.verticalAlign, verticalFill = props.verticalFill, wrap = props.wrap;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
/* eslint-disable @typescript-eslint/no-deprecated */
var childrenGap = tokens && tokens.childrenGap ? tokens.childrenGap : props.gap;
var maxHeight = tokens && tokens.maxHeight ? tokens.maxHeight : props.maxHeight;
var maxWidth = tokens && tokens.maxWidth ? tokens.maxWidth : props.maxWidth;
var padding = tokens && tokens.padding ? tokens.padding : props.padding;
/* eslint-enable @typescript-eslint/no-deprecated */
var _p = (0,_StackUtils__rspack_import_1.parseGap)(childrenGap, theme), rowGap = _p.rowGap, columnGap = _p.columnGap;
var horizontalMargin = "".concat(-0.5 * columnGap.value).concat(columnGap.unit);
var verticalMargin = "".concat(-0.5 * rowGap.value).concat(rowGap.unit);
// styles to be applied to all direct children regardless of wrap or direction
var childStyles = {
textOverflow: 'ellipsis',
};
var childSelector = '> ' + (enableScopedSelectors ? '.' + GlobalClassNames.child : '*');
var disableShrinkStyles = (_a = {},
// flexShrink styles are applied by the StackItem
_a["".concat(childSelector, ":not(.").concat(_StackItem_StackItem_styles__rspack_import_2.GlobalClassNames.root, ")")] = {
flexShrink: 0,
},
_a);
if (wrap) {
return {
root: [
classNames.root,
{
flexWrap: 'wrap',
maxWidth: maxWidth,
maxHeight: maxHeight,
width: 'auto',
overflow: 'visible',
height: '100%',
},
horizontalAlign && (_b = {},
_b[horizontal ? 'justifyContent' : 'alignItems'] = nameMap[horizontalAlign] || horizontalAlign,
_b),
verticalAlign && (_c = {},
_c[horizontal ? 'alignItems' : 'justifyContent'] = nameMap[verticalAlign] || verticalAlign,
_c),
className,
{
// not allowed to be overridden by className
// since this is necessary in order to prevent collapsing margins
display: 'flex',
},
horizontal && {
height: verticalFill ? '100%' : 'auto',
},
],
inner: [
classNames.inner,
(_d = {
display: 'flex',
flexWrap: 'wrap',
marginLeft: horizontalMargin,
marginRight: horizontalMargin,
marginTop: verticalMargin,
marginBottom: verticalMargin,
overflow: 'visible',
boxSizing: 'border-box',
padding: (0,_StackUtils__rspack_import_1.parsePadding)(padding, theme),
// avoid unnecessary calc() calls if horizontal gap is 0
width: columnGap.value === 0 ? '100%' : "calc(100% + ".concat(columnGap.value).concat(columnGap.unit, ")"),
maxWidth: '100vw'
},
_d[childSelector] = (0,tslib__rspack_import_3.__assign)({ margin: "".concat(0.5 * rowGap.value).concat(rowGap.unit, " ").concat(0.5 * columnGap.value).concat(columnGap.unit) }, childStyles),
_d),
disableShrink && disableShrinkStyles,
horizontalAlign && (_e = {},
_e[horizontal ? 'justifyContent' : 'alignItems'] = nameMap[horizontalAlign] || horizontalAlign,
_e),
verticalAlign && (_f = {},
_f[horizontal ? 'alignItems' : 'justifyContent'] = nameMap[verticalAlign] || verticalAlign,
_f),
horizontal && (_g = {
flexDirection: reversed ? 'row-reverse' : 'row',
// avoid unnecessary calc() calls if vertical gap is 0
height: rowGap.value === 0 ? '100%' : "calc(100% + ".concat(rowGap.value).concat(rowGap.unit, ")")
},
_g[childSelector] = {
maxWidth: columnGap.value === 0 ? '100%' : "calc(100% - ".concat(columnGap.value).concat(columnGap.unit, ")"),
},
_g),
!horizontal && (_h = {
flexDirection: reversed ? 'column-reverse' : 'column',
height: "calc(100% + ".concat(rowGap.value).concat(rowGap.unit, ")")
},
_h[childSelector] = {
maxHeight: rowGap.value === 0 ? '100%' : "calc(100% - ".concat(rowGap.value).concat(rowGap.unit, ")"),
},
_h),
],
};
}
return {
root: [
classNames.root,
(_j = {
display: 'flex',
flexDirection: horizontal ? (reversed ? 'row-reverse' : 'row') : reversed ? 'column-reverse' : 'column',
flexWrap: 'nowrap',
width: 'auto',
height: verticalFill ? '100%' : 'auto',
maxWidth: maxWidth,
maxHeight: maxHeight,
padding: (0,_StackUtils__rspack_import_1.parsePadding)(padding, theme),
boxSizing: 'border-box'
},
_j[childSelector] = childStyles,
_j),
disableShrink && disableShrinkStyles,
grow && {
flexGrow: grow === true ? 1 : grow,
},
horizontalAlign && (_k = {},
_k[horizontal ? 'justifyContent' : 'alignItems'] = nameMap[horizontalAlign] || horizontalAlign,
_k),
verticalAlign && (_l = {},
_l[horizontal ? 'alignItems' : 'justifyContent'] = nameMap[verticalAlign] || verticalAlign,
_l),
horizontal &&
columnGap.value > 0 && (_m = {},
// apply gap margin to every direct child except the first direct child if the direction is not reversed,
// and the last direct one if it is
_m[reversed ? "".concat(childSelector, ":not(:last-child)") : "".concat(childSelector, ":not(:first-child)")] = {
marginLeft: "".concat(columnGap.value).concat(columnGap.unit),
},
_m),
!horizontal &&
rowGap.value > 0 && (_o = {},
// apply gap margin to every direct child except the first direct child if the direction is not reversed,
// and the last direct one if it is
_o[reversed ? "".concat(childSelector, ":not(:last-child)") : "".concat(childSelector, ":not(:first-child)")] = {
marginTop: "".concat(rowGap.value).concat(rowGap.unit),
},
_o),
className,
],
// TODO: this cast may be hiding some potential issues with styling and name
// lookups and should be removed
};
};
//# sourceMappingURL=Stack.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
StackItem: () => (StackItem),
"default": () => (__rspack_default_export)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_foundation_legacy__rspack_import_1 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/slots.js");
/* import */ var _fluentui_foundation_legacy__rspack_import_3 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/createComponent.js");
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _StackItem_styles__rspack_import_4 = __webpack_require__(/*! ./StackItem.styles */ "./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.styles.js");
var StackItemView = function (props) {
var children = props.children;
var nativeProps = (0,_Utilities__rspack_import_0.getNativeProps)(props, _Utilities__rspack_import_0.htmlElementProperties);
// eslint-disable-next-line eqeqeq
if (children == null) {
return null;
}
var Slots = (0,_fluentui_foundation_legacy__rspack_import_1.getSlots)(props, {
root: 'div',
});
return (0,_fluentui_foundation_legacy__rspack_import_1.withSlots)(Slots.root, (0,tslib__rspack_import_2.__assign)({}, nativeProps), children);
};
var StackItem = (0,_fluentui_foundation_legacy__rspack_import_3.createComponent)(StackItemView, {
displayName: 'StackItem',
styles: _StackItem_styles__rspack_import_4.StackItemStyles,
});
/* export default */ const __rspack_default_export = (StackItem);
//# sourceMappingURL=StackItem.js.map
}),
"./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.styles.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Stack/StackItem/StackItem.styles.js ***!
\*****************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
GlobalClassNames: () => (GlobalClassNames),
StackItemStyles: () => (StackItemStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-StackItem',
};
var alignMap = {
start: 'flex-start',
end: 'flex-end',
};
var StackItemStyles = function (props, theme, tokens) {
var grow = props.grow, shrink = props.shrink, disableShrink = props.disableShrink, align = props.align, verticalFill = props.verticalFill, order = props.order, className = props.className, _a = props.basis, basis = _a === void 0 ? 'auto' : _a;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
theme.fonts.medium,
classNames.root,
{
flexBasis: basis,
margin: tokens.margin,
padding: tokens.padding,
height: verticalFill ? '100%' : 'auto',
width: 'auto',
},
grow && {
flexGrow: grow === true ? 1 : grow,
},
(disableShrink || (!grow && !shrink)) && {
flexShrink: 0,
},
shrink &&
!disableShrink && {
flexShrink: 1,
},
align && {
alignSelf: alignMap[align] || align,
},
order && {
order: order,
},
className,
],
// TODO: this cast may be hiding some potential issues with styling and name
// lookups and should be removed
};
};
//# sourceMappingURL=StackItem.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Stack/StackUtils.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Stack/StackUtils.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
parseGap: () => (parseGap),
parsePadding: () => (parsePadding)
});
// Helper function that converts a themed spacing key (if given) to the corresponding themed spacing value.
var _getThemedSpacing = function (space, theme) {
if (theme.spacing.hasOwnProperty(space)) {
return theme.spacing[space];
}
return space;
};
// Helper function that takes a gap as a string and converts it into a { value, unit } representation.
var _getValueUnitGap = function (gap) {
var numericalPart = parseFloat(gap);
var numericalValue = isNaN(numericalPart) ? 0 : numericalPart;
var numericalString = isNaN(numericalPart) ? '' : numericalPart.toString();
var unitPart = gap.substring(numericalString.toString().length);
return {
value: numericalValue,
unit: unitPart || 'px',
};
};
/**
* Takes in a gap size in either a CSS-style format (e.g. 10 or "10px")
* or a key of a themed spacing value (e.g. "s1").
* Returns the separate numerical value of the padding (e.g. 10)
* and the CSS unit (e.g. "px").
*/
var parseGap = function (gap, theme) {
if (gap === undefined || gap === '') {
return {
rowGap: {
value: 0,
unit: 'px',
},
columnGap: {
value: 0,
unit: 'px',
},
};
}
if (typeof gap === 'number') {
return {
rowGap: {
value: gap,
unit: 'px',
},
columnGap: {
value: gap,
unit: 'px',
},
};
}
var splitGap = gap.split(' ');
// If the array has more than two values, then return 0px.
if (splitGap.length > 2) {
return {
rowGap: {
value: 0,
unit: 'px',
},
columnGap: {
value: 0,
unit: 'px',
},
};
}
// If the array has two values, then parse each one.
if (splitGap.length === 2) {
return {
rowGap: _getValueUnitGap(_getThemedSpacing(splitGap[0], theme)),
columnGap: _getValueUnitGap(_getThemedSpacing(splitGap[1], theme)),
};
}
// Else, parse the numerical value and pass it as both the vertical and horizontal gap.
var calculatedGap = _getValueUnitGap(_getThemedSpacing(gap, theme));
return {
rowGap: calculatedGap,
columnGap: calculatedGap,
};
};
/**
* Takes in a padding in a CSS-style format (e.g. 10, "10px", "10px 10px", etc.)
* where the separate padding values can also be the key of a themed spacing value
* (e.g. "s1 m", "10px l1 20px l2", etc.).
* Returns a CSS-style padding.
*/
var parsePadding = function (padding, theme) {
if (padding === undefined || typeof padding === 'number' || padding === '') {
return padding;
}
var paddingValues = padding.split(' ');
if (paddingValues.length < 2) {
return _getThemedSpacing(padding, theme);
}
return paddingValues.reduce(function (padding1, padding2) {
return _getThemedSpacing(padding1, theme) + ' ' + _getThemedSpacing(padding2, theme);
});
};
//# sourceMappingURL=StackUtils.js.map
}),
"./node_modules/@fluentui/react/lib/components/Text/Text.js":
/*!******************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Text/Text.js ***!
\******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Text: () => (Text),
"default": () => (__rspack_default_export)
});
/* import */ var _fluentui_foundation_legacy__rspack_import_0 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/createComponent.js");
/* import */ var _Text_view__rspack_import_1 = __webpack_require__(/*! ./Text.view */ "./node_modules/@fluentui/react/lib/components/Text/Text.view.js");
/* import */ var _Text_styles__rspack_import_2 = __webpack_require__(/*! ./Text.styles */ "./node_modules/@fluentui/react/lib/components/Text/Text.styles.js");
var Text = (0,_fluentui_foundation_legacy__rspack_import_0.createComponent)(_Text_view__rspack_import_1.TextView, {
displayName: 'Text',
styles: _Text_styles__rspack_import_2.TextStyles,
});
/* export default */ const __rspack_default_export = (Text);
//# sourceMappingURL=Text.js.map
}),
"./node_modules/@fluentui/react/lib/components/Text/Text.styles.js":
/*!*************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Text/Text.styles.js ***!
\*************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TextStyles: () => (TextStyles)
});
var TextStyles = function (props, theme) {
var as = props.as, className = props.className, block = props.block, nowrap = props.nowrap, variant = props.variant;
var fonts = theme.fonts, semanticColors = theme.semanticColors;
var variantObject = fonts[variant || 'medium'];
return {
root: [
variantObject,
{
color: variantObject.color || semanticColors.bodyText,
display: block ? (as === 'td' ? 'table-cell' : 'block') : 'inline',
mozOsxFontSmoothing: variantObject.MozOsxFontSmoothing,
webkitFontSmoothing: variantObject.WebkitFontSmoothing,
},
nowrap && {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
className,
],
};
};
//# sourceMappingURL=Text.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Text/Text.view.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Text/Text.view.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TextView: () => (TextView)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_foundation_legacy__rspack_import_1 = __webpack_require__(/*! @fluentui/foundation-legacy */ "./node_modules/@fluentui/foundation-legacy/lib/slots.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/** @jsxRuntime classic */
/** @jsx withSlots */
var TextView = function (props) {
// eslint-disable-next-line eqeqeq
if (props.children == null) {
return null;
}
var block = props.block, className = props.className, _a = props.as, RootType = _a === void 0 ? 'span' : _a, variant = props.variant, nowrap = props.nowrap, rest = (0,tslib__rspack_import_0.__rest)(props, ["block", "className", "as", "variant", "nowrap"]);
var Slots = (0,_fluentui_foundation_legacy__rspack_import_1.getSlots)(props, {
root: RootType,
});
return (0,_fluentui_foundation_legacy__rspack_import_1.withSlots)(Slots.root, (0,tslib__rspack_import_0.__assign)({}, (0,_Utilities__rspack_import_2.getNativeProps)(rest, _Utilities__rspack_import_2.htmlElementProperties)));
};
//# sourceMappingURL=Text.view.js.map
}),
"./node_modules/@fluentui/react/lib/components/TextField/TextField.base.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/TextField/TextField.base.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TextFieldBase: () => (TextFieldBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Label__rspack_import_3 = __webpack_require__(/*! ../../Label */ "./node_modules/@fluentui/react/lib/components/Label/Label.js");
/* import */ var _Icon__rspack_import_8 = __webpack_require__(/*! ../../Icon */ "./node_modules/@fluentui/react/lib/components/Icon/Icon.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/DelayedRender.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warnControlledUsage.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/controlled.js");
/* import */ var _Utilities__rspack_import_13 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_14 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/ie11Detector.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var DEFAULT_STATE_VALUE = '';
var COMPONENT_NAME = 'TextField';
var REVEAL_ICON_NAME = 'RedEye';
var HIDE_ICON_NAME = 'Hide';
var TextFieldBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(TextFieldBase, _super);
function TextFieldBase(props) {
var _this = _super.call(this, props) || this;
_this._textElement = react__rspack_import_0.createRef();
_this._onFocus = function (ev) {
if (_this.props.onFocus) {
_this.props.onFocus(ev);
}
_this.setState({ isFocused: true }, function () {
if (_this.props.validateOnFocusIn) {
_this._validate(_this.value);
}
});
};
_this._onBlur = function (ev) {
if (_this.props.onBlur) {
_this.props.onBlur(ev);
}
_this.setState({ isFocused: false }, function () {
if (_this.props.validateOnFocusOut) {
_this._validate(_this.value);
}
});
};
_this._onRenderLabel = function (props) {
var label = props.label, required = props.required;
// IProcessedStyleSet definition requires casting for what Label expects as its styles prop
var labelStyles = _this._classNames.subComponentStyles
? _this._classNames.subComponentStyles.label
: undefined;
if (label) {
return (react__rspack_import_0.createElement(_Label__rspack_import_3.Label, { required: required, htmlFor: _this._id, styles: labelStyles, disabled: props.disabled, id: _this._labelId }, props.label));
}
return null;
};
_this._onRenderDescription = function (props) {
if (props.description) {
return react__rspack_import_0.createElement("span", { className: _this._classNames.description }, props.description);
}
return null;
};
_this._onRevealButtonClick = function (event) {
_this.setState(function (prevState) { return ({ isRevealingPassword: !prevState.isRevealingPassword }); });
};
_this._onInputChange = function (event) {
// Previously, we needed to call both onInput and onChange due to some weird IE/React issues,
// which have *probably* been fixed now:
// - https://github.com/microsoft/fluentui/issues/744 (likely fixed)
// - https://github.com/microsoft/fluentui/issues/824 (confirmed fixed)
var _a, _b;
// TODO (Fabric 8?) - Switch to calling only onChange. This switch is pretty disruptive for
// tests (ours and maybe consumers' too), so it seemed best to do the switch in a major bump.
var element = event.target;
var value = element.value;
// Ignore this event if any of the following are true:
// - the value is undefined (in case one of the IE bugs comes back)
// - it's a duplicate event (important since onInputChange is called twice per actual user event)
// - it's the same as the previous value
var previousValue = _getValue(_this.props, _this.state) || '';
if (value === undefined || value === _this._lastChangeValue || value === previousValue) {
_this._lastChangeValue = undefined;
return;
}
_this._lastChangeValue = value;
(_b = (_a = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, event, value);
if (!_this._isControlled) {
// ONLY if this is an uncontrolled component, update the displayed value.
// (Controlled components must update the `value` prop from `onChange`.)
_this.setState({ uncontrolledValue: value });
}
};
(0,_Utilities__rspack_import_4.initializeComponentRef)(_this);
_this._async = new _Utilities__rspack_import_5.Async(_this);
if (true) {
(0,_Utilities__rspack_import_6.warnMutuallyExclusive)(COMPONENT_NAME, props, {
errorMessage: 'onGetErrorMessage',
});
}
_this._fallbackId = (0,_Utilities__rspack_import_7.getId)(COMPONENT_NAME);
_this._descriptionId = (0,_Utilities__rspack_import_7.getId)(COMPONENT_NAME + 'Description');
_this._labelId = (0,_Utilities__rspack_import_7.getId)(COMPONENT_NAME + 'Label');
_this._prefixId = (0,_Utilities__rspack_import_7.getId)(COMPONENT_NAME + 'Prefix');
_this._suffixId = (0,_Utilities__rspack_import_7.getId)(COMPONENT_NAME + 'Suffix');
_this._warnControlledUsage();
var _a = props.defaultValue, defaultValue = _a === void 0 ? DEFAULT_STATE_VALUE : _a;
if (typeof defaultValue === 'number') {
// This isn't allowed per the props, but happens anyway.
defaultValue = String(defaultValue);
}
_this.state = {
uncontrolledValue: _this._isControlled ? undefined : defaultValue,
isFocused: false,
errorMessage: '',
};
_this._delayedValidate = _this._async.debounce(_this._validate, _this.props.deferredValidationTime);
_this._lastValidation = 0;
return _this;
}
Object.defineProperty(TextFieldBase.prototype, "value", {
/**
* Gets the current value of the text field.
*/
get: function () {
return _getValue(this.props, this.state);
},
enumerable: false,
configurable: true
});
TextFieldBase.prototype.componentDidMount = function () {
this._adjustInputHeight();
if (this.props.validateOnLoad) {
this._validate(this.value);
}
};
TextFieldBase.prototype.componentWillUnmount = function () {
this._async.dispose();
};
TextFieldBase.prototype.getSnapshotBeforeUpdate = function (prevProps, prevState) {
return {
selection: [this.selectionStart, this.selectionEnd],
};
};
TextFieldBase.prototype.componentDidUpdate = function (prevProps, prevState, snapshot) {
var props = this.props;
var _a = (snapshot || {}).selection, selection = _a === void 0 ? [null, null] : _a;
var start = selection[0], end = selection[1];
if (!!prevProps.multiline !== !!props.multiline && prevState.isFocused) {
// The text field has just changed between single- and multi-line, so we need to reset focus
// and selection/cursor.
this.focus();
if (start !== null && end !== null && start >= 0 && end >= 0) {
this.setSelectionRange(start, end);
}
}
if (prevProps.value !== props.value) {
// Only if the value in props changed, reset the record of the last value seen by a
// change/input event (don't do this if the value in state changed, since at least in tests
// the state update may happen before the second event in a series)
this._lastChangeValue = undefined;
}
var prevValue = _getValue(prevProps, prevState);
var value = this.value;
if (prevValue !== value) {
// Handle controlled/uncontrolled warnings and status
this._warnControlledUsage(prevProps);
// Clear error message if needed
// TODO: is there any way to do this without an extra render?
if (this.state.errorMessage && !props.errorMessage) {
this.setState({ errorMessage: '' });
}
// Adjust height if needed based on new value
this._adjustInputHeight();
// TODO: #5875 added logic to trigger validation in componentWillReceiveProps and other places.
// This seems a bit odd and hard to integrate with the new approach.
// (Starting to think we should just put the validation logic in a separate wrapper component...?)
if (_shouldValidateAllChanges(props)) {
this._delayedValidate(value);
}
}
};
TextFieldBase.prototype.render = function () {
var _a = this.props, borderless = _a.borderless, className = _a.className, disabled = _a.disabled, invalid = _a.invalid, iconProps = _a.iconProps, inputClassName = _a.inputClassName, label = _a.label, multiline = _a.multiline, required = _a.required, underlined = _a.underlined, prefix = _a.prefix, resizable = _a.resizable, suffix = _a.suffix, theme = _a.theme, styles = _a.styles, autoAdjustHeight = _a.autoAdjustHeight, canRevealPassword = _a.canRevealPassword, revealPasswordAriaLabel = _a.revealPasswordAriaLabel, type = _a.type, _b = _a.onRenderPrefix, onRenderPrefix = _b === void 0 ? this._onRenderPrefix : _b, _c = _a.onRenderSuffix, onRenderSuffix = _c === void 0 ? this._onRenderSuffix : _c, _d = _a.onRenderLabel, onRenderLabel = _d === void 0 ? this._onRenderLabel : _d, _e = _a.onRenderDescription, onRenderDescription = _e === void 0 ? this._onRenderDescription : _e;
var _f = this.state, isFocused = _f.isFocused, isRevealingPassword = _f.isRevealingPassword;
var errorMessage = this._errorMessage;
var isInvalid = typeof invalid === 'boolean' ? invalid : !!errorMessage;
var hasRevealButton = !!canRevealPassword && type === 'password' && _browserNeedsRevealButton();
var classNames = (this._classNames = getClassNames(styles, {
theme: theme,
className: className,
disabled: disabled,
focused: isFocused,
required: required,
multiline: multiline,
hasLabel: !!label,
hasErrorMessage: isInvalid,
borderless: borderless,
resizable: resizable,
hasIcon: !!iconProps,
underlined: underlined,
inputClassName: inputClassName,
autoAdjustHeight: autoAdjustHeight,
hasRevealButton: hasRevealButton,
}));
return (
// eslint-disable-next-line @typescript-eslint/no-deprecated
react__rspack_import_0.createElement("div", { ref: this.props.elementRef, className: classNames.root },
react__rspack_import_0.createElement("div", { className: classNames.wrapper },
onRenderLabel(this.props, this._onRenderLabel),
react__rspack_import_0.createElement("div", { className: classNames.fieldGroup },
(prefix !== undefined || this.props.onRenderPrefix) && (react__rspack_import_0.createElement("div", { className: classNames.prefix, id: this._prefixId }, onRenderPrefix(this.props, this._onRenderPrefix))),
multiline ? this._renderTextArea() : this._renderInput(),
iconProps && react__rspack_import_0.createElement(_Icon__rspack_import_8.Icon, (0,tslib__rspack_import_2.__assign)({ className: classNames.icon }, iconProps)),
hasRevealButton && (
// Explicitly set type="button" since the default button type within a form is "submit"
react__rspack_import_0.createElement("button", { "aria-label": revealPasswordAriaLabel, className: classNames.revealButton, onClick: this._onRevealButtonClick, "aria-pressed": !!isRevealingPassword, type: "button" },
react__rspack_import_0.createElement("span", { className: classNames.revealSpan },
react__rspack_import_0.createElement(_Icon__rspack_import_8.Icon, { className: classNames.revealIcon, iconName: isRevealingPassword ? HIDE_ICON_NAME : REVEAL_ICON_NAME })))),
(suffix !== undefined || this.props.onRenderSuffix) && (react__rspack_import_0.createElement("div", { className: classNames.suffix, id: this._suffixId }, onRenderSuffix(this.props, this._onRenderSuffix))))),
this._isDescriptionAvailable && (react__rspack_import_0.createElement("span", { id: this._descriptionId },
onRenderDescription(this.props, this._onRenderDescription),
errorMessage && (react__rspack_import_0.createElement("div", { role: "alert" },
react__rspack_import_0.createElement(_Utilities__rspack_import_9.DelayedRender, null, this._renderErrorMessage())))))));
};
/**
* Sets focus on the text field
*/
TextFieldBase.prototype.focus = function () {
if (this._textElement.current) {
this._textElement.current.focus();
}
};
/**
* Blurs the text field.
*/
TextFieldBase.prototype.blur = function () {
if (this._textElement.current) {
this._textElement.current.blur();
}
};
/**
* Selects the text field
*/
TextFieldBase.prototype.select = function () {
if (this._textElement.current) {
this._textElement.current.select();
}
};
/**
* Sets the selection start of the text field to a specified value
*/
TextFieldBase.prototype.setSelectionStart = function (value) {
if (this._textElement.current) {
this._textElement.current.selectionStart = value;
}
};
/**
* Sets the selection end of the text field to a specified value
*/
TextFieldBase.prototype.setSelectionEnd = function (value) {
if (this._textElement.current) {
this._textElement.current.selectionEnd = value;
}
};
Object.defineProperty(TextFieldBase.prototype, "selectionStart", {
/**
* Gets the selection start of the text field
*/
get: function () {
return this._textElement.current ? this._textElement.current.selectionStart : -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TextFieldBase.prototype, "selectionEnd", {
/**
* Gets the selection end of the text field
*/
get: function () {
return this._textElement.current ? this._textElement.current.selectionEnd : -1;
},
enumerable: false,
configurable: true
});
/**
* Sets the start and end positions of a selection in a text field.
* @param start - Index of the start of the selection.
* @param end - Index of the end of the selection.
*/
TextFieldBase.prototype.setSelectionRange = function (start, end) {
if (this._textElement.current) {
this._textElement.current.setSelectionRange(start, end);
}
};
TextFieldBase.prototype._warnControlledUsage = function (prevProps) {
// Show warnings if props are being used in an invalid way
(0,_Utilities__rspack_import_10.warnControlledUsage)({
componentId: this._id,
componentName: COMPONENT_NAME,
props: this.props,
oldProps: prevProps,
valueProp: 'value',
defaultValueProp: 'defaultValue',
onChangeProp: 'onChange',
readOnlyProp: 'readOnly',
});
if (this.props.value === null && !this._hasWarnedNullValue) {
this._hasWarnedNullValue = true;
(0,_Utilities__rspack_import_11.warn)("Warning: 'value' prop on '".concat(COMPONENT_NAME, "' should not be null. Consider using an ") +
'empty string to clear the component or undefined to indicate an uncontrolled component.');
}
};
Object.defineProperty(TextFieldBase.prototype, "_id", {
/** Returns `props.id` if available, or a fallback if not. */
get: function () {
return this.props.id || this._fallbackId;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TextFieldBase.prototype, "_isControlled", {
get: function () {
return (0,_Utilities__rspack_import_12.isControlled)(this.props, 'value');
},
enumerable: false,
configurable: true
});
TextFieldBase.prototype._onRenderPrefix = function (props) {
var prefix = props.prefix;
return react__rspack_import_0.createElement("span", { style: { paddingBottom: '1px' } }, prefix);
};
TextFieldBase.prototype._onRenderSuffix = function (props) {
var suffix = props.suffix;
return react__rspack_import_0.createElement("span", { style: { paddingBottom: '1px' } }, suffix);
};
Object.defineProperty(TextFieldBase.prototype, "_errorMessage", {
/**
* Current error message from either `props.errorMessage` or the result of `props.onGetErrorMessage`.
*
* - If there is no validation error or we have not validated the input value, errorMessage is an empty string.
* - If we have done the validation and there is validation error, errorMessage is the validation error message.
*/
get: function () {
var _a = this.props.errorMessage, errorMessage = _a === void 0 ? this.state.errorMessage : _a;
return errorMessage || '';
},
enumerable: false,
configurable: true
});
/**
* Renders error message based on the type of the message.
*
* - If error message is string, it will render using the built in styles.
* - If error message is an element, user has full control over how it's rendered.
*/
TextFieldBase.prototype._renderErrorMessage = function () {
var errorMessage = this._errorMessage;
return errorMessage ? (typeof errorMessage === 'string' ? (react__rspack_import_0.createElement("p", { className: this._classNames.errorMessage },
react__rspack_import_0.createElement("span", { "data-automation-id": "error-message" }, errorMessage))) : (react__rspack_import_0.createElement("div", { className: this._classNames.errorMessage, "data-automation-id": "error-message" }, errorMessage))) : null;
};
Object.defineProperty(TextFieldBase.prototype, "_isDescriptionAvailable", {
/**
* If a custom description render function is supplied then treat description as always available.
* Otherwise defer to the presence of description or error message text.
*/
get: function () {
var props = this.props;
return !!(props.onRenderDescription || props.description || this._errorMessage);
},
enumerable: false,
configurable: true
});
TextFieldBase.prototype._renderTextArea = function () {
var _a = this.props.invalid, invalid = _a === void 0 ? !!this._errorMessage : _a;
var textAreaProps = (0,_Utilities__rspack_import_13.getNativeProps)(this.props, _Utilities__rspack_import_13.textAreaProperties, ['defaultValue']);
var ariaLabelledBy = this.props['aria-labelledby'] || (this.props.label ? this._labelId : undefined);
return (react__rspack_import_0.createElement("textarea", (0,tslib__rspack_import_2.__assign)({ id: this._id }, textAreaProps, { ref: this._textElement, value: this.value || '', onInput: this._onInputChange, onChange: this._onInputChange, className: this._classNames.field, "aria-labelledby": ariaLabelledBy, "aria-describedby": this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby'], "aria-invalid": invalid, "aria-label": this.props.ariaLabel, readOnly: this.props.readOnly, onFocus: this._onFocus, onBlur: this._onBlur })));
};
TextFieldBase.prototype._renderInput = function () {
var _a = this.props, ariaLabel = _a.ariaLabel, _b = _a.invalid, invalid = _b === void 0 ? !!this._errorMessage : _b, onRenderPrefix = _a.onRenderPrefix, onRenderSuffix = _a.onRenderSuffix, prefix = _a.prefix, suffix = _a.suffix, _c = _a.type, type = _c === void 0 ? 'text' : _c, label = _a.label;
// build aria-labelledby list from label, prefix, and suffix
var labelIds = [];
label && labelIds.push(this._labelId);
(prefix !== undefined || onRenderPrefix) && labelIds.push(this._prefixId);
(suffix !== undefined || onRenderSuffix) && labelIds.push(this._suffixId);
var inputProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ type: this.state.isRevealingPassword ? 'text' : type, id: this._id }, (0,_Utilities__rspack_import_13.getNativeProps)(this.props, _Utilities__rspack_import_13.inputProperties, ['defaultValue', 'type'])), { 'aria-labelledby': this.props['aria-labelledby'] || (labelIds.length > 0 ? labelIds.join(' ') : undefined), ref: this._textElement, value: this.value || '', onInput: this._onInputChange, onChange: this._onInputChange, className: this._classNames.field, 'aria-label': ariaLabel, 'aria-describedby': this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby'], 'aria-invalid': invalid, onFocus: this._onFocus, onBlur: this._onBlur });
var defaultRender = function (updatedInputProps) {
return react__rspack_import_0.createElement("input", (0,tslib__rspack_import_2.__assign)({}, updatedInputProps));
};
var onRenderInput = this.props.onRenderInput || defaultRender;
return onRenderInput(inputProps, defaultRender);
};
TextFieldBase.prototype._validate = function (value) {
var _this = this;
// In case _validate is called again while validation promise is executing
if (this._latestValidateValue === value && _shouldValidateAllChanges(this.props)) {
return;
}
this._latestValidateValue = value;
var onGetErrorMessage = this.props.onGetErrorMessage;
var result = onGetErrorMessage && onGetErrorMessage(value || '');
if (result !== undefined) {
if (typeof result === 'string' || !('then' in result)) {
this.setState({ errorMessage: result });
this._notifyAfterValidate(value, result);
}
else {
var currentValidation_1 = ++this._lastValidation;
result.then(function (errorMessage) {
if (currentValidation_1 === _this._lastValidation) {
_this.setState({ errorMessage: errorMessage });
}
_this._notifyAfterValidate(value, errorMessage);
});
}
}
else {
this._notifyAfterValidate(value, '');
}
};
TextFieldBase.prototype._notifyAfterValidate = function (value, errorMessage) {
if (value === this.value && this.props.onNotifyValidationResult) {
this.props.onNotifyValidationResult(errorMessage, value);
}
};
TextFieldBase.prototype._adjustInputHeight = function () {
var _a, _b;
if (this._textElement.current && this.props.autoAdjustHeight && this.props.multiline) {
var scrollTop = (_b = (_a = this.props.scrollContainerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.scrollTop;
var textField = this._textElement.current;
textField.style.height = '';
textField.style.height = textField.scrollHeight + 'px';
if (scrollTop) {
// Safe to assert not null, otherwise we wouldn't have a scrollTop;
this.props.scrollContainerRef.current.scrollTop = scrollTop;
}
}
};
TextFieldBase.defaultProps = {
resizable: true,
deferredValidationTime: 200,
validateOnLoad: true,
};
return TextFieldBase;
}(react__rspack_import_0.Component));
/** Get the value from the given state and props (converting from number to string if needed) */
function _getValue(props, state) {
var _a = props.value, value = _a === void 0 ? state.uncontrolledValue : _a;
if (typeof value === 'number') {
// not allowed per typings, but happens anyway
return String(value);
}
return value;
}
/**
* If `validateOnFocusIn` or `validateOnFocusOut` is true, validation should run **only** on that event.
* Otherwise, validation should run on every change.
*/
function _shouldValidateAllChanges(props) {
return !(props.validateOnFocusIn || props.validateOnFocusOut);
}
// Only calculate this once across all TextFields, since will stay the same
var __browserNeedsRevealButton;
function _browserNeedsRevealButton() {
if (typeof __browserNeedsRevealButton !== 'boolean') {
var win = (0,_Utilities__rspack_import_14.getWindow)();
if (win === null || win === void 0 ? void 0 : win.navigator) {
// Edge, Chromium Edge
var isEdge = /Edg/.test(win.navigator.userAgent || '');
__browserNeedsRevealButton = !((0,_Utilities__rspack_import_15.isIE11)() || isEdge);
}
else {
__browserNeedsRevealButton = true;
}
}
return __browserNeedsRevealButton;
}
//# sourceMappingURL=TextField.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/TextField/TextField.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/TextField/TextField.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TextField: () => (TextField)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _TextField_base__rspack_import_1 = __webpack_require__(/*! ./TextField.base */ "./node_modules/@fluentui/react/lib/components/TextField/TextField.base.js");
/* import */ var _TextField_styles__rspack_import_2 = __webpack_require__(/*! ./TextField.styles */ "./node_modules/@fluentui/react/lib/components/TextField/TextField.styles.js");
var TextField = (0,_Utilities__rspack_import_0.styled)(_TextField_base__rspack_import_1.TextFieldBase, _TextField_styles__rspack_import_2.getStyles, undefined, {
scope: 'TextField',
});
//# sourceMappingURL=TextField.js.map
}),
"./node_modules/@fluentui/react/lib/components/TextField/TextField.styles.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/TextField/TextField.styles.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var globalClassNames = {
root: 'ms-TextField',
description: 'ms-TextField-description',
errorMessage: 'ms-TextField-errorMessage',
field: 'ms-TextField-field',
fieldGroup: 'ms-TextField-fieldGroup',
prefix: 'ms-TextField-prefix',
suffix: 'ms-TextField-suffix',
wrapper: 'ms-TextField-wrapper',
revealButton: 'ms-TextField-reveal',
multiline: 'ms-TextField--multiline',
borderless: 'ms-TextField--borderless',
underlined: 'ms-TextField--underlined',
unresizable: 'ms-TextField--unresizable',
required: 'is-required',
disabled: 'is-disabled',
active: 'is-active',
};
function getLabelStyles(props) {
var underlined = props.underlined, disabled = props.disabled, focused = props.focused, theme = props.theme;
var palette = theme.palette, fonts = theme.fonts;
return function () {
var _a;
return ({
root: [
underlined &&
disabled && {
color: palette.neutralTertiary,
},
underlined && {
fontSize: fonts.medium.fontSize,
marginRight: 8,
paddingLeft: 12,
paddingRight: 0,
lineHeight: '22px',
height: 32,
},
underlined &&
focused && {
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
height: 31, // -1px to prevent jumpiness in HC with the increased border-width to 2px
},
_a),
},
],
});
};
}
function getStyles(props) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
var theme = props.theme, className = props.className, disabled = props.disabled, focused = props.focused, required = props.required, multiline = props.multiline, hasLabel = props.hasLabel, borderless = props.borderless, underlined = props.underlined, hasIcon = props.hasIcon, resizable = props.resizable, hasErrorMessage = props.hasErrorMessage, inputClassName = props.inputClassName, autoAdjustHeight = props.autoAdjustHeight, hasRevealButton = props.hasRevealButton;
var semanticColors = theme.semanticColors, effects = theme.effects, fonts = theme.fonts;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(globalClassNames, theme);
var fieldPrefixSuffix = {
// Suffix/Prefix are not editable so the disabled slot perfectly fits.
background: semanticColors.disabledBackground,
color: !disabled ? semanticColors.inputPlaceholderText : semanticColors.disabledText,
display: 'flex',
alignItems: 'center',
padding: '0 10px',
lineHeight: 1,
whiteSpace: 'nowrap',
flexShrink: 0,
selectors: (_a = {},
_a[_Styling__rspack_import_0.HighContrastSelector] = {
background: 'Window',
color: disabled ? 'GrayText' : 'WindowText',
},
_a),
};
// placeholder style constants
var placeholderStyles = [
{
color: semanticColors.inputPlaceholderText,
opacity: 1,
selectors: (_b = {},
_b[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
},
_b),
},
];
var disabledPlaceholderStyles = {
color: semanticColors.disabledText,
selectors: (_c = {},
_c[_Styling__rspack_import_0.HighContrastSelector] = {
color: 'GrayText',
},
_c),
};
return {
root: [
classNames.root,
fonts.medium,
required && classNames.required,
disabled && classNames.disabled,
focused && classNames.active,
multiline && classNames.multiline,
borderless && classNames.borderless,
underlined && classNames.underlined,
_Styling__rspack_import_0.normalize,
{
position: 'relative',
},
className,
],
wrapper: [
classNames.wrapper,
underlined && [
{
display: 'flex',
borderBottom: "1px solid ".concat(!hasErrorMessage ? semanticColors.inputBorder : semanticColors.errorText),
width: '100%',
},
disabled && {
borderBottomColor: semanticColors.disabledBackground,
selectors: (_d = {},
_d[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ borderColor: 'GrayText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_d),
},
!disabled && {
selectors: {
':hover': {
borderBottomColor: !hasErrorMessage ? semanticColors.inputBorderHovered : semanticColors.errorText,
selectors: (_e = {},
_e[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ borderBottomColor: 'Highlight' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_e),
},
},
},
focused && [
{
position: 'relative',
},
(0,_Styling__rspack_import_0.getInputFocusStyle)(!hasErrorMessage ? semanticColors.inputFocusBorderAlt : semanticColors.errorText, 0, 'borderBottom'),
],
],
],
fieldGroup: [
classNames.fieldGroup,
_Styling__rspack_import_0.normalize,
{
border: "1px solid ".concat(semanticColors.inputBorder),
borderRadius: effects.roundedCorner2,
background: semanticColors.inputBackground,
cursor: 'text',
height: 32,
display: 'flex',
flexDirection: 'row',
alignItems: 'stretch',
position: 'relative',
},
multiline && {
minHeight: '60px',
height: 'auto',
display: 'flex',
},
!focused &&
!disabled && {
selectors: {
':hover': {
borderColor: semanticColors.inputBorderHovered,
selectors: (_f = {},
_f[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ borderColor: 'Highlight' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_f),
},
},
},
focused &&
!underlined &&
(0,_Styling__rspack_import_0.getInputFocusStyle)(!hasErrorMessage ? semanticColors.inputFocusBorderAlt : semanticColors.errorText, effects.roundedCorner2),
disabled && {
borderColor: semanticColors.disabledBackground,
selectors: (_g = {},
_g[_Styling__rspack_import_0.HighContrastSelector] = (0,tslib__rspack_import_1.__assign)({ borderColor: 'GrayText' }, (0,_Styling__rspack_import_0.getHighContrastNoAdjustStyle)()),
_g),
cursor: 'default',
},
borderless && {
border: 'none',
},
borderless &&
focused && {
border: 'none',
selectors: {
':after': {
border: 'none',
},
},
},
underlined && {
flex: '1 1 0px',
border: 'none',
textAlign: 'left',
},
underlined &&
disabled && {
backgroundColor: 'transparent',
},
hasErrorMessage &&
!underlined && {
borderColor: semanticColors.errorText,
selectors: {
'&:hover': {
borderColor: semanticColors.errorText,
},
},
},
!hasLabel &&
required && {
selectors: (_h = {
':before': {
content: "'*'",
color: semanticColors.errorText,
position: 'absolute',
top: -5,
right: -10,
}
},
_h[_Styling__rspack_import_0.HighContrastSelector] = {
selectors: {
':before': {
color: 'WindowText',
right: -14, // moving the * 4 pixel to right to alleviate border clipping in HC mode.
},
},
},
_h),
},
],
field: [
fonts.medium,
classNames.field,
_Styling__rspack_import_0.normalize,
{
borderRadius: 0,
border: 'none',
background: 'none',
backgroundColor: 'transparent',
color: semanticColors.inputText,
padding: '0 8px',
width: '100%',
minWidth: 0,
textOverflow: 'ellipsis',
outline: 0,
selectors: (_j = {
'&:active, &:focus, &:hover': { outline: 0 },
'::-ms-clear': {
display: 'none',
}
},
_j[_Styling__rspack_import_0.HighContrastSelector] = {
background: 'Window',
color: disabled ? 'GrayText' : 'WindowText',
},
_j),
},
(0,_Styling__rspack_import_0.getPlaceholderStyles)(placeholderStyles),
multiline &&
!resizable && [
classNames.unresizable,
{
resize: 'none',
},
],
multiline && {
minHeight: 'inherit',
lineHeight: 17,
flexGrow: 1,
paddingTop: 6,
paddingBottom: 6,
overflow: 'auto',
width: '100%',
},
multiline &&
autoAdjustHeight && {
overflow: 'hidden',
},
hasIcon &&
!hasRevealButton && {
paddingRight: 24,
},
multiline &&
hasIcon && {
paddingRight: 40,
},
disabled && [
{
backgroundColor: semanticColors.disabledBackground,
color: semanticColors.disabledText,
borderColor: semanticColors.disabledBackground,
},
(0,_Styling__rspack_import_0.getPlaceholderStyles)(disabledPlaceholderStyles),
],
underlined && {
textAlign: 'left',
},
focused &&
!borderless && {
selectors: (_k = {},
_k[_Styling__rspack_import_0.HighContrastSelector] = {
paddingLeft: 11,
paddingRight: 11,
},
_k),
},
focused &&
multiline &&
!borderless && {
selectors: (_l = {},
_l[_Styling__rspack_import_0.HighContrastSelector] = {
paddingTop: 4, // take into consideration the 2px increased border-width (not when borderless).
},
_l),
},
inputClassName,
],
icon: [
multiline && {
paddingRight: 24,
alignItems: 'flex-end',
},
{
pointerEvents: 'none',
position: 'absolute',
bottom: 6,
right: 8,
top: 'auto',
fontSize: _Styling__rspack_import_0.IconFontSizes.medium,
lineHeight: 18,
},
disabled && {
color: semanticColors.disabledText,
},
],
description: [
classNames.description,
{
color: semanticColors.bodySubtext,
fontSize: fonts.xSmall.fontSize,
},
],
errorMessage: [
classNames.errorMessage,
_Styling__rspack_import_0.AnimationClassNames.slideDownIn20,
fonts.small,
{
color: semanticColors.errorText,
margin: 0,
paddingTop: 5,
display: 'flex',
alignItems: 'center',
},
],
prefix: [classNames.prefix, fieldPrefixSuffix],
suffix: [classNames.suffix, fieldPrefixSuffix],
revealButton: [
classNames.revealButton,
'ms-Button',
'ms-Button--icon',
(0,_Styling__rspack_import_0.getFocusStyle)(theme, { inset: 1 }),
{
height: 30,
width: 32,
border: 'none',
padding: '0px 4px',
backgroundColor: 'transparent',
color: semanticColors.link,
selectors: {
':hover': {
outline: 0,
color: semanticColors.primaryButtonBackgroundHovered,
backgroundColor: semanticColors.buttonBackgroundHovered,
selectors: (_m = {},
_m[_Styling__rspack_import_0.HighContrastSelector] = {
borderColor: 'Highlight',
color: 'Highlight',
},
_m),
},
':focus': { outline: 0 },
},
},
hasIcon && {
marginRight: 28,
},
],
revealSpan: {
display: 'flex',
height: '100%',
alignItems: 'center',
},
revealIcon: {
margin: '0px 4px',
pointerEvents: 'none',
bottom: 6,
right: 8,
top: 'auto',
fontSize: _Styling__rspack_import_0.IconFontSizes.medium,
lineHeight: 18,
},
subComponentStyles: {
label: getLabelStyles(props),
},
};
}
//# sourceMappingURL=TextField.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.base.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.base.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TooltipBase: () => (TooltipBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Callout__rspack_import_3 = __webpack_require__(/*! ../../Callout */ "./node_modules/@fluentui/react/lib/components/Callout/Callout.js");
/* import */ var _common_DirectionalHint__rspack_import_5 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var TooltipBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(TooltipBase, _super);
function TooltipBase() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._onRenderContent = function (props) {
if (typeof props.content === 'string') {
return react__rspack_import_0.createElement("p", { className: _this._classNames.subText }, props.content);
}
else {
return react__rspack_import_0.createElement("div", { className: _this._classNames.subText }, props.content);
}
};
return _this;
}
TooltipBase.prototype.render = function () {
var _a = this.props, className = _a.className, calloutProps = _a.calloutProps, directionalHint = _a.directionalHint, directionalHintForRTL = _a.directionalHintForRTL, styles = _a.styles, id = _a.id, maxWidth = _a.maxWidth, _b = _a.onRenderContent, onRenderContent = _b === void 0 ? this._onRenderContent : _b, targetElement = _a.targetElement, theme = _a.theme;
this._classNames = getClassNames(styles, {
theme: theme,
className: className || (calloutProps && calloutProps.className),
beakWidth: calloutProps && calloutProps.isBeakVisible ? calloutProps.beakWidth : 0,
gapSpace: calloutProps && calloutProps.gapSpace,
maxWidth: maxWidth,
});
return (react__rspack_import_0.createElement(_Callout__rspack_import_3.Callout, (0,tslib__rspack_import_2.__assign)({ target: targetElement, directionalHint: directionalHint, directionalHintForRTL: directionalHintForRTL }, calloutProps, (0,_Utilities__rspack_import_4.getNativeProps)(this.props, _Utilities__rspack_import_4.divProperties, ['id']), { className: this._classNames.root }),
react__rspack_import_0.createElement("div", { className: this._classNames.content, id: id, onFocus: this.props.onFocus, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave }, onRenderContent(this.props, this._onRenderContent))));
};
// Specify default props values
TooltipBase.defaultProps = {
directionalHint: _common_DirectionalHint__rspack_import_5.DirectionalHint.topCenter,
maxWidth: '364px',
calloutProps: {
isBeakVisible: true,
beakWidth: 16,
gapSpace: 0,
setInitialFocus: true,
doNotLayer: false,
},
};
return TooltipBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Tooltip.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Tooltip: () => (Tooltip)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _Tooltip_base__rspack_import_1 = __webpack_require__(/*! ./Tooltip.base */ "./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.base.js");
/* import */ var _Tooltip_styles__rspack_import_2 = __webpack_require__(/*! ./Tooltip.styles */ "./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.styles.js");
var Tooltip = (0,_Utilities__rspack_import_0.styled)(_Tooltip_base__rspack_import_1.TooltipBase, _Tooltip_styles__rspack_import_2.getStyles, undefined, {
scope: 'Tooltip',
});
//# sourceMappingURL=Tooltip.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.styles.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.styles.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var getStyles = function (props) {
var className = props.className, _a = props.beakWidth, beakWidth = _a === void 0 ? 16 : _a, _b = props.gapSpace, gapSpace = _b === void 0 ? 0 : _b, maxWidth = props.maxWidth, theme = props.theme;
var semanticColors = theme.semanticColors, fonts = theme.fonts, effects = theme.effects;
// The math here is done to account for the 45 degree rotation of the beak
// and sub-pixel rounding that differs across browsers, which is more noticeable when
// the device pixel ratio is larger
var tooltipGapSpace = -(Math.sqrt((beakWidth * beakWidth) / 2) + gapSpace) +
1 /
// There isn't really a great way to pass in a `window` reference here so disabling the line rule
// eslint-disable-next-line no-restricted-globals
window.devicePixelRatio;
return {
root: [
'ms-Tooltip',
theme.fonts.medium,
_Styling__rspack_import_0.AnimationClassNames.fadeIn200,
{
background: semanticColors.menuBackground,
boxShadow: effects.elevation8,
padding: '8px',
maxWidth: maxWidth,
selectors: {
':after': {
content: "''",
position: 'absolute',
bottom: tooltipGapSpace,
left: tooltipGapSpace,
right: tooltipGapSpace,
top: tooltipGapSpace,
zIndex: 0,
},
},
},
className,
],
content: [
'ms-Tooltip-content',
fonts.small,
{
position: 'relative',
zIndex: 1,
color: semanticColors.menuItemText,
wordWrap: 'break-word',
overflowWrap: 'break-word',
overflow: 'hidden',
},
],
subText: [
'ms-Tooltip-subtext',
{
// Using inherit here to avoid unintentional global overrides of the
tag.
fontSize: 'inherit',
fontWeight: 'inherit',
color: 'inherit',
margin: 0,
},
],
};
};
//# sourceMappingURL=Tooltip.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.types.js":
/*!******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.types.js ***!
\******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TooltipDelay: () => (TooltipDelay)
});
/**
* {@docCategory Tooltip}
*/
var TooltipDelay;
(function (TooltipDelay) {
TooltipDelay[TooltipDelay["zero"] = 0] = "zero";
/** 300 ms delay before showing the tooltip */
TooltipDelay[TooltipDelay["medium"] = 1] = "medium";
/** 500 ms delay before showing the tooltip */
TooltipDelay[TooltipDelay["long"] = 2] = "long";
})(TooltipDelay || (TooltipDelay = {}));
//# sourceMappingURL=Tooltip.types.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.base.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.base.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TooltipHostBase: () => (TooltipHostBase)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Styling__rspack_import_14 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/classNamesFunction.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/overflow.js");
/* import */ var _Utilities__rspack_import_7 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/dom-utilities/lib/portalContainsElement.js");
/* import */ var _Utilities__rspack_import_9 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _Utilities__rspack_import_10 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/initializeComponentRef.js");
/* import */ var _Utilities__rspack_import_11 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/object.js");
/* import */ var _Utilities__rspack_import_12 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/properties.js");
/* import */ var _Utilities__rspack_import_15 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _TooltipHost_types__rspack_import_4 = __webpack_require__(/*! ./TooltipHost.types */ "./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.types.js");
/* import */ var _Tooltip__rspack_import_13 = __webpack_require__(/*! ./Tooltip */ "./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.js");
/* import */ var _Tooltip_types__rspack_import_8 = __webpack_require__(/*! ./Tooltip.types */ "./node_modules/@fluentui/react/lib/components/Tooltip/Tooltip.types.js");
/* import */ var _fluentui_react_window_provider__rspack_import_16 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _utilities_dom__rspack_import_5 = __webpack_require__(/*! ../../utilities/dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var getClassNames = (0,_Utilities__rspack_import_1.classNamesFunction)();
var TooltipHostBase = /** @class */ (function (_super) {
(0,tslib__rspack_import_2.__extends)(TooltipHostBase, _super);
// Constructor
function TooltipHostBase(props) {
var _this = _super.call(this, props) || this;
// The wrapping div that gets the hover events
_this._tooltipHost = react__rspack_import_0.createRef();
_this._defaultTooltipId = (0,_Utilities__rspack_import_3.getId)('tooltip');
_this.show = function () {
_this._toggleTooltip(true);
};
_this.dismiss = function () {
_this._hideTooltip();
};
_this._getTargetElement = function () {
if (!_this._tooltipHost.current) {
return undefined;
}
var overflowMode = _this.props.overflowMode;
// Select target element based on overflow mode. For parent mode, you want to position the tooltip relative
// to the parent element, otherwise it might look off.
if (overflowMode !== undefined) {
switch (overflowMode) {
case _TooltipHost_types__rspack_import_4.TooltipOverflowMode.Parent:
return _this._tooltipHost.current.parentElement;
case _TooltipHost_types__rspack_import_4.TooltipOverflowMode.Self:
return _this._tooltipHost.current;
}
}
return _this._tooltipHost.current;
};
_this._onTooltipFocus = function (ev) {
if (_this._ignoreNextFocusEvent) {
_this._ignoreNextFocusEvent = false;
return;
}
_this._onTooltipMouseEnter(ev);
};
_this._onTooltipContentFocus = function (ev) {
if (TooltipHostBase._currentVisibleTooltip && TooltipHostBase._currentVisibleTooltip !== _this) {
TooltipHostBase._currentVisibleTooltip.dismiss();
}
TooltipHostBase._currentVisibleTooltip = _this;
_this._clearDismissTimer();
_this._clearOpenTimer();
};
_this._onTooltipBlur = function (ev) {
var _a;
// The focused element gets a blur event when the document loses focus
// (e.g. switching tabs in the browser), but we don't want to show the
// tooltip again when the document gets focus back. Handle this case by
// checking if the blurred element is still the document's activeElement,
// and ignoring when it next gets focus back.
// See https://github.com/microsoft/fluentui/issues/13541
_this._ignoreNextFocusEvent = ((_a = (0,_utilities_dom__rspack_import_5.getDocumentEx)(_this.context)) === null || _a === void 0 ? void 0 : _a.activeElement) === ev.target;
_this._dismissTimerId = _this._async.setTimeout(function () {
_this._hideTooltip();
}, 0);
};
// Show Tooltip
_this._onTooltipMouseEnter = function (ev) {
var _a = _this.props, overflowMode = _a.overflowMode, delay = _a.delay;
var doc = (0,_utilities_dom__rspack_import_5.getDocumentEx)(_this.context);
if (TooltipHostBase._currentVisibleTooltip && TooltipHostBase._currentVisibleTooltip !== _this) {
TooltipHostBase._currentVisibleTooltip.dismiss();
}
TooltipHostBase._currentVisibleTooltip = _this;
if (overflowMode !== undefined) {
var overflowElement = _this._getTargetElement();
if (overflowElement && !(0,_Utilities__rspack_import_6.hasOverflow)(overflowElement)) {
return;
}
}
if (ev.target && (0,_Utilities__rspack_import_7.portalContainsElement)(ev.target, _this._getTargetElement(), doc)) {
// Do not show tooltip when target is inside a portal relative to TooltipHost.
return;
}
_this._clearDismissTimer();
_this._clearOpenTimer();
if (delay !== _Tooltip_types__rspack_import_8.TooltipDelay.zero) {
var delayTime = _this._getDelayTime(delay); // non-null assertion because we set it in `defaultProps`
_this._openTimerId = _this._async.setTimeout(function () {
_this._toggleTooltip(true);
}, delayTime);
}
else {
_this._toggleTooltip(true);
}
};
// Hide Tooltip
_this._onTooltipMouseLeave = function (ev) {
var closeDelay = _this.props.closeDelay;
_this._clearDismissTimer();
_this._clearOpenTimer();
if (closeDelay) {
_this._dismissTimerId = _this._async.setTimeout(function () {
_this._toggleTooltip(false);
}, closeDelay);
}
else {
_this._toggleTooltip(false);
}
if (TooltipHostBase._currentVisibleTooltip === _this) {
TooltipHostBase._currentVisibleTooltip = undefined;
}
};
_this._onTooltipKeyDown = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if ((ev.which === _Utilities__rspack_import_9.KeyCodes.escape || ev.ctrlKey) && _this.state.isTooltipVisible) {
_this._hideTooltip();
ev.stopPropagation();
}
};
_this._clearDismissTimer = function () {
_this._async.clearTimeout(_this._dismissTimerId);
};
_this._clearOpenTimer = function () {
_this._async.clearTimeout(_this._openTimerId);
};
// Hide Tooltip
_this._hideTooltip = function () {
_this._clearOpenTimer();
_this._clearDismissTimer();
_this._toggleTooltip(false);
};
_this._toggleTooltip = function (isTooltipVisible) {
if (_this.state.isTooltipVisible !== isTooltipVisible) {
_this.setState({ isTooltipVisible: isTooltipVisible }, function () { return _this.props.onTooltipToggle && _this.props.onTooltipToggle(isTooltipVisible); });
}
};
_this._getDelayTime = function (delay) {
switch (delay) {
case _Tooltip_types__rspack_import_8.TooltipDelay.medium:
return 300;
case _Tooltip_types__rspack_import_8.TooltipDelay.long:
return 500;
default:
return 0;
}
};
(0,_Utilities__rspack_import_10.initializeComponentRef)(_this);
_this.state = {
isAriaPlaceholderRendered: false,
isTooltipVisible: false,
};
return _this;
}
// Render
TooltipHostBase.prototype.render = function () {
var _a = this.props, calloutProps = _a.calloutProps, children = _a.children, content = _a.content, directionalHint = _a.directionalHint, directionalHintForRTL = _a.directionalHintForRTL, className = _a.hostClassName, id = _a.id,
// eslint-disable-next-line @typescript-eslint/no-deprecated
_b = _a.setAriaDescribedBy,
// eslint-disable-next-line @typescript-eslint/no-deprecated
setAriaDescribedBy = _b === void 0 ? true : _b, tooltipProps = _a.tooltipProps, styles = _a.styles, theme = _a.theme;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
var isTooltipVisible = this.state.isTooltipVisible;
var tooltipId = id || this._defaultTooltipId;
var tooltipRenderProps = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({ id: "".concat(tooltipId, "--tooltip"), content: content, targetElement: this._getTargetElement(), directionalHint: directionalHint, directionalHintForRTL: directionalHintForRTL, calloutProps: (0,_Utilities__rspack_import_11.assign)({}, calloutProps, {
onDismiss: this._hideTooltip,
onFocus: this._onTooltipContentFocus,
onMouseEnter: this._onTooltipMouseEnter,
onMouseLeave: this._onTooltipMouseLeave,
}), onMouseEnter: this._onTooltipMouseEnter, onMouseLeave: this._onTooltipMouseLeave }, (0,_Utilities__rspack_import_12.getNativeProps)(this.props, _Utilities__rspack_import_12.divProperties, ['id'])), tooltipProps);
// Get the content of the tooltip for use in the hidden div used for screen readers
var tooltipContent = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.onRenderContent)
? tooltipProps.onRenderContent(tooltipRenderProps, function (props) { return ((props === null || props === void 0 ? void 0 : props.content) ? react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, props.content) : null); })
: content;
var showTooltip = isTooltipVisible && !!tooltipContent;
var ariaDescribedBy = setAriaDescribedBy && isTooltipVisible && !!tooltipContent ? tooltipId : undefined;
return (react__rspack_import_0.createElement("div", { className: this._classNames.root, ref: this._tooltipHost, onFocusCapture: this._onTooltipFocus, onBlurCapture: this._onTooltipBlur, onMouseEnter: this._onTooltipMouseEnter, onMouseLeave: this._onTooltipMouseLeave, onKeyDown: this._onTooltipKeyDown, role: "none", "aria-describedby": ariaDescribedBy },
children,
showTooltip && react__rspack_import_0.createElement(_Tooltip__rspack_import_13.Tooltip, (0,tslib__rspack_import_2.__assign)({}, tooltipRenderProps)),
react__rspack_import_0.createElement("div", { hidden: true, id: tooltipId, style: _Styling__rspack_import_14.hiddenContentStyle }, tooltipContent)));
};
TooltipHostBase.prototype.componentDidMount = function () {
this._async = new _Utilities__rspack_import_15.Async(this);
};
TooltipHostBase.prototype.componentWillUnmount = function () {
if (TooltipHostBase._currentVisibleTooltip && TooltipHostBase._currentVisibleTooltip === this) {
TooltipHostBase._currentVisibleTooltip = undefined;
}
this._async.dispose();
};
TooltipHostBase.defaultProps = {
delay: _Tooltip_types__rspack_import_8.TooltipDelay.medium,
};
TooltipHostBase.contextType = _fluentui_react_window_provider__rspack_import_16.WindowContext;
return TooltipHostBase;
}(react__rspack_import_0.Component));
//# sourceMappingURL=TooltipHost.base.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TooltipHost: () => (TooltipHost)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/styled.js");
/* import */ var _TooltipHost_base__rspack_import_1 = __webpack_require__(/*! ./TooltipHost.base */ "./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.base.js");
/* import */ var _TooltipHost_styles__rspack_import_2 = __webpack_require__(/*! ./TooltipHost.styles */ "./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.styles.js");
var TooltipHost = (0,_Utilities__rspack_import_0.styled)(_TooltipHost_base__rspack_import_1.TooltipHostBase, _TooltipHost_styles__rspack_import_2.getStyles, undefined, {
scope: 'TooltipHost',
});
//# sourceMappingURL=TooltipHost.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.styles.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.styles.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getStyles: () => (getStyles)
});
/* import */ var _Styling__rspack_import_0 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var GlobalClassNames = {
root: 'ms-TooltipHost',
ariaPlaceholder: 'ms-TooltipHost-aria-placeholder',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = (0,_Styling__rspack_import_0.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
{
display: 'inline',
},
className,
],
};
};
//# sourceMappingURL=TooltipHost.styles.js.map
}),
"./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.types.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/components/Tooltip/TooltipHost.types.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
TooltipOverflowMode: () => (TooltipOverflowMode)
});
/**
* {@docCategory Tooltip}
*/
var TooltipOverflowMode;
(function (TooltipOverflowMode) {
/** Only show tooltip if parent DOM element is overflowing */
TooltipOverflowMode[TooltipOverflowMode["Parent"] = 0] = "Parent";
/**
* Only show tooltip if tooltip host's content is overflowing.
* Note that this does not check the children for overflow, only the TooltipHost root.
*/
TooltipOverflowMode[TooltipOverflowMode["Self"] = 1] = "Self";
})(TooltipOverflowMode || (TooltipOverflowMode = {}));
//# sourceMappingURL=TooltipHost.types.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DraggableZone: () => (DraggableZone)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _DraggableZone_styles__rspack_import_4 = __webpack_require__(/*! ./DraggableZone.styles */ "./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.styles.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/on.js");
/* import */ var _fluentui_react_window_provider__rspack_import_5 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _dom__rspack_import_2 = __webpack_require__(/*! ../dom */ "./node_modules/@fluentui/react/lib/utilities/dom.js");
var eventMapping = {
touch: {
start: 'touchstart',
move: 'touchmove',
stop: 'touchend',
},
mouse: {
start: 'mousedown',
move: 'mousemove',
stop: 'mouseup',
},
};
var DraggableZone = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(DraggableZone, _super);
function DraggableZone(props) {
var _this = _super.call(this, props) || this;
_this._currentEventType = eventMapping.mouse;
_this._events = [];
_this._onMouseDown = function (event) {
var onMouseDown = react__rspack_import_0.Children.only(_this.props.children).props.onMouseDown;
if (onMouseDown) {
onMouseDown(event);
}
_this._currentEventType = eventMapping.mouse;
return _this._onDragStart(event);
};
_this._onMouseUp = function (event) {
var onMouseUp = react__rspack_import_0.Children.only(_this.props.children).props.onMouseUp;
if (onMouseUp) {
onMouseUp(event);
}
_this._currentEventType = eventMapping.mouse;
return _this._onDragStop(event);
};
_this._onTouchStart = function (event) {
var onTouchStart = react__rspack_import_0.Children.only(_this.props.children).props.onTouchStart;
if (onTouchStart) {
onTouchStart(event);
}
_this._currentEventType = eventMapping.touch;
return _this._onDragStart(event);
};
_this._onTouchEnd = function (event) {
var onTouchEnd = react__rspack_import_0.Children.only(_this.props.children).props.onTouchEnd;
if (onTouchEnd) {
onTouchEnd(event);
}
_this._currentEventType = eventMapping.touch;
_this._onDragStop(event);
};
_this._onDragStart = function (event) {
// Only handle left click for dragging
if (typeof event.button === 'number' && event.button !== 0) {
return false;
}
// If the target doesn't match the handleSelector OR
// if the target does match the preventDragSelector, bail out
if ((_this.props.handleSelector && !_this._matchesSelector(event.target, _this.props.handleSelector)) ||
(_this.props.preventDragSelector &&
_this._matchesSelector(event.target, _this.props.preventDragSelector))) {
return;
}
// Remember the touch identifier if this is a touch event so we can
// distinguish between individual touches in multitouch scenarios
// by remembering which touch point we were given
_this._touchId = _this._getTouchId(event);
var position = _this._getControlPosition(event);
if (position === undefined) {
return;
}
var dragData = _this._createDragDataFromPosition(position);
_this.props.onStart && _this.props.onStart(event, dragData);
_this.setState({
isDragging: true,
lastPosition: position,
});
// hook up the appropriate mouse/touch events to the body to ensure
// smooth dragging
var doc = (0,_dom__rspack_import_2.getDocumentEx)(_this.context);
_this._events = [
(0,_Utilities__rspack_import_3.on)(doc.body, _this._currentEventType.move, _this._onDrag, true /* use capture phase */),
(0,_Utilities__rspack_import_3.on)(doc.body, _this._currentEventType.stop, _this._onDragStop, true /* use capture phase */),
];
};
_this._onDrag = function (event) {
// Prevent scrolling on mobile devices
if (event.type === 'touchmove') {
event.preventDefault();
}
var position = _this._getControlPosition(event);
if (!position) {
return;
}
// create the updated drag data from the position data
var updatedData = _this._createUpdatedDragData(_this._createDragDataFromPosition(position));
var updatedPosition = updatedData.position;
_this.props.onDragChange && _this.props.onDragChange(event, updatedData);
_this.setState({
position: updatedPosition,
lastPosition: position,
});
};
_this._onDragStop = function (event) {
if (!_this.state.isDragging) {
return;
}
var position = _this._getControlPosition(event);
if (!position) {
return;
}
var baseDragData = _this._createDragDataFromPosition(position);
// Set dragging to false and reset the lastPosition
_this.setState({
isDragging: false,
lastPosition: undefined,
});
_this.props.onStop && _this.props.onStop(event, baseDragData);
if (_this.props.position) {
_this.setState({
position: _this.props.position,
});
}
// Remove event handlers
_this._events.forEach(function (dispose) { return dispose(); });
};
_this.state = {
isDragging: false,
position: _this.props.position || { x: 0, y: 0 },
lastPosition: undefined,
};
return _this;
}
DraggableZone.prototype.componentDidUpdate = function (prevProps) {
if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {
this.setState({ position: this.props.position });
}
};
DraggableZone.prototype.componentWillUnmount = function () {
this._events.forEach(function (dispose) { return dispose(); });
};
DraggableZone.prototype.render = function () {
var child = react__rspack_import_0.Children.only(this.props.children);
var props = child.props;
var position = this.props.position;
var _a = this.state, statePosition = _a.position, isDragging = _a.isDragging;
var x = statePosition.x;
var y = statePosition.y;
if (position && !isDragging) {
x = position.x;
y = position.y;
}
return react__rspack_import_0.cloneElement(child, {
style: (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, props.style), { transform: "translate(".concat(x, "px, ").concat(y, "px)") }),
className: (0,_DraggableZone_styles__rspack_import_4.getClassNames)(props.className, this.state.isDragging).root,
onMouseDown: this._onMouseDown,
onMouseUp: this._onMouseUp,
onTouchStart: this._onTouchStart,
onTouchEnd: this._onTouchEnd,
});
};
/**
* Get the control position based off the event that fired
* @param event - The event to get offsets from
*/
DraggableZone.prototype._getControlPosition = function (event) {
var touchObj = this._getActiveTouch(event);
// did we get the right touch?
if (this._touchId !== undefined && !touchObj) {
return undefined;
}
var eventToGetOffset = touchObj || event;
return {
x: eventToGetOffset.clientX,
y: eventToGetOffset.clientY,
};
};
/**
* Get the active touch point that we have saved from the event's TouchList
* @param event - The event used to get the TouchList for the active touch point
*/
DraggableZone.prototype._getActiveTouch = function (event) {
return ((event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||
(event.changedTouches && this._findTouchInTouchList(event.changedTouches)));
};
/**
* Get the initial touch identifier associated with the given event
* @param event - The event that contains the TouchList
*/
DraggableZone.prototype._getTouchId = function (event) {
var touch = (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);
if (touch) {
return touch.identifier;
}
};
/**
* Returns if an element (or any of the element's parents) match the given selector
*/
DraggableZone.prototype._matchesSelector = function (element, selector) {
var _a;
if (!element || element === ((_a = (0,_dom__rspack_import_2.getDocumentEx)(this.context)) === null || _a === void 0 ? void 0 : _a.body)) {
return false;
}
var matchesSelectorFn =
// eslint-disable-next-line @typescript-eslint/no-deprecated
element.matches || element.webkitMatchesSelector || element.msMatchesSelector; /* for IE */
if (!matchesSelectorFn) {
return false;
}
return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);
};
/**
* Attempts to find the Touch that matches the identifier we stored in dragStart
* @param touchList The TouchList to look for the stored identifier from dragStart
*/
DraggableZone.prototype._findTouchInTouchList = function (touchList) {
if (this._touchId === undefined) {
return;
}
for (var i = 0; i < touchList.length; i++) {
if (touchList[i].identifier === this._touchId) {
return touchList[i];
}
}
return undefined;
};
/**
* Create DragData based off of the last known position and the new position passed in
* @param position The new position as part of the drag
*/
DraggableZone.prototype._createDragDataFromPosition = function (position) {
var lastPosition = this.state.lastPosition;
// If we have no lastPosition, use the given position
// for last position
if (lastPosition === undefined) {
return {
delta: { x: 0, y: 0 },
lastPosition: position,
position: position,
};
}
return {
delta: {
x: position.x - lastPosition.x,
y: position.y - lastPosition.y,
},
lastPosition: lastPosition,
position: position,
};
};
/**
* Creates an updated DragData based off the current position and given baseDragData
* @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions
*/
DraggableZone.prototype._createUpdatedDragData = function (baseDragData) {
var position = this.state.position;
return {
position: {
x: position.x + baseDragData.delta.x,
y: position.y + baseDragData.delta.y,
},
delta: baseDragData.delta,
lastPosition: position,
};
};
DraggableZone.contextType = _fluentui_react_window_provider__rspack_import_5.WindowContext;
return DraggableZone;
}(react__rspack_import_0.Component));
//# sourceMappingURL=DraggableZone.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.styles.js":
/*!******************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.styles.js ***!
\******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getClassNames: () => (getClassNames)
});
/* import */ var _Utilities__rspack_import_0 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/* import */ var _Styling__rspack_import_1 = __webpack_require__(/*! ../../Styling */ "./node_modules/@fluentui/style-utilities/lib/index.js");
var getClassNames = (0,_Utilities__rspack_import_0.memoizeFunction)(function (className, isDragging) {
return {
root: (0,_Styling__rspack_import_1.mergeStyles)(className, isDragging && {
touchAction: 'none',
selectors: {
'& *': {
userSelect: 'none',
},
},
}),
};
});
//# sourceMappingURL=DraggableZone.styles.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/MenuContext/MenuContext.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/MenuContext/MenuContext.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MenuContext: () => (MenuContext),
useMenuContext: () => (useMenuContext)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
var MenuContext = react__rspack_import_0.createContext({});
var useMenuContext = function () {
return react__rspack_import_0.useContext(MenuContext);
};
//# sourceMappingURL=MenuContext.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js":
/*!********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js ***!
\********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getIsChecked: () => (getIsChecked),
getMenuItemAriaRole: () => (getMenuItemAriaRole),
hasSubmenu: () => (hasSubmenu),
isItemDisabled: () => (isItemDisabled)
});
/**
* Determines the effective checked state of a menu item.
*
* @param item {IContextualMenuItem} to get the check state of.
* @returns {true} if the item is checked.
* @returns {false} if the item is unchecked.
* @returns {null} if the item is not checkable.
*/
function getIsChecked(item) {
if (item.canCheck) {
return !!(item.isChecked || item.checked);
}
if (typeof item.isChecked === 'boolean') {
return item.isChecked;
}
if (typeof item.checked === 'boolean') {
return item.checked;
}
// Item is not checkable.
return null;
}
function hasSubmenu(item) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return !!(item.subMenuProps || item.items);
}
function isItemDisabled(item) {
return !!(item.isDisabled || item.disabled);
}
function getMenuItemAriaRole(item) {
var isChecked = getIsChecked(item);
var canCheck = isChecked !== null;
return canCheck ? 'menuitemcheckbox' : 'menuitem';
}
//# sourceMappingURL=contextualMenuUtility.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/decorators/BaseDecorator.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/decorators/BaseDecorator.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
BaseDecorator: () => (BaseDecorator)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/hoist.js");
var BaseDecorator = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(BaseDecorator, _super);
function BaseDecorator(props) {
var _this = _super.call(this, props) || this;
_this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);
return _this;
}
/**
* Updates the ref to the component composed by the decorator, which will also take care of hoisting
* (and unhoisting as appropriate) methods from said component.
*
* Pass this method as the argument to the 'ref' property of the composed component.
*/
BaseDecorator.prototype._updateComposedComponentRef = function (composedComponentInstance) {
this._composedComponentInstance = composedComponentInstance;
if (composedComponentInstance) {
this._hoisted = (0,_Utilities__rspack_import_2.hoistMethods)(this, composedComponentInstance);
}
else if (this._hoisted) {
(0,_Utilities__rspack_import_2.unhoistMethods)(this, this._hoisted);
}
};
return BaseDecorator;
}(react__rspack_import_0.Component));
//# sourceMappingURL=BaseDecorator.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ResponsiveMode: () => (ResponsiveMode),
getInitialResponsiveMode: () => (getInitialResponsiveMode),
getResponsiveMode: () => (getResponsiveMode),
initializeResponsiveMode: () => (initializeResponsiveMode),
setResponsiveMode: () => (setResponsiveMode),
withResponsiveMode: () => (withResponsiveMode)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _BaseDecorator__rspack_import_2 = __webpack_require__(/*! ./BaseDecorator */ "./node_modules/@fluentui/react/lib/utilities/decorators/BaseDecorator.js");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _Utilities__rspack_import_4 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/hoistStatics.js");
/* import */ var _WindowProvider__rspack_import_5 = __webpack_require__(/*! ../../WindowProvider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
var ResponsiveMode;
(function (ResponsiveMode) {
/** Width \<= 479px */
ResponsiveMode[ResponsiveMode["small"] = 0] = "small";
/** Width \> 479px and \<= 639px */
ResponsiveMode[ResponsiveMode["medium"] = 1] = "medium";
/** Width \> 639px and \<= 1023px */
ResponsiveMode[ResponsiveMode["large"] = 2] = "large";
/** Width \> 1023px and \<= 1365px */
ResponsiveMode[ResponsiveMode["xLarge"] = 3] = "xLarge";
/** Width \> 1365px and \<= 1919px */
ResponsiveMode[ResponsiveMode["xxLarge"] = 4] = "xxLarge";
/** Width \> 1919px */
ResponsiveMode[ResponsiveMode["xxxLarge"] = 5] = "xxxLarge";
ResponsiveMode[ResponsiveMode["unknown"] = 999] = "unknown";
})(ResponsiveMode || (ResponsiveMode = {}));
var RESPONSIVE_MAX_CONSTRAINT = [479, 639, 1023, 1365, 1919, 99999999];
/**
* User specified mode to default to, useful for server side rendering scenarios.
*/
var _defaultMode;
/**
* Tracking the last mode we successfully rendered, which allows us to
* paint initial renders with the correct size.
*/
var _lastMode;
/**
* Allows a server rendered scenario to provide a **default** responsive mode.
* This WILL NOT trigger any updates to components that have already consumed the responsive mode!
*/
function setResponsiveMode(responsiveMode) {
_defaultMode = responsiveMode;
}
/**
* Initializes the responsive mode to the current window size. This can be used to avoid
* a re-render during first component mount since the window would otherwise not be measured
* until after mounting.
*
* This WILL NOT trigger any updates to components that have already consumed the responsive mode!
*/
function initializeResponsiveMode(element) {
var currentWindow = (0,_Utilities__rspack_import_1.getWindow)(element);
if (currentWindow) {
getResponsiveMode(currentWindow);
}
}
function getInitialResponsiveMode() {
var _a;
return (_a = _defaultMode !== null && _defaultMode !== void 0 ? _defaultMode : _lastMode) !== null && _a !== void 0 ? _a : ResponsiveMode.large;
}
/**
* @deprecated Decorator usage is deprecated. Either call `getResponsiveMode` manually, or
* use the `useResponsiveMode` hook within a function component.
*/
function withResponsiveMode(ComposedComponent) {
var _a;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var resultClass = (_a = /** @class */ (function (_super) {
(0,tslib__rspack_import_3.__extends)(WithResponsiveMode, _super);
function WithResponsiveMode(props) {
var _this = _super.call(this, props) || this;
_this._onResize = function () {
var responsiveMode = getResponsiveMode(_this.context.window);
if (responsiveMode !== _this.state.responsiveMode) {
_this.setState({
responsiveMode: responsiveMode,
});
}
};
_this._events = new _Utilities__rspack_import_4.EventGroup(_this);
_this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);
_this.state = {
responsiveMode: getInitialResponsiveMode(),
};
return _this;
}
WithResponsiveMode.prototype.componentDidMount = function () {
this._events.on(this.context.window, 'resize', this._onResize);
this._onResize();
};
WithResponsiveMode.prototype.componentWillUnmount = function () {
this._events.dispose();
};
WithResponsiveMode.prototype.render = function () {
var responsiveMode = this.state.responsiveMode;
return responsiveMode === ResponsiveMode.unknown ? null : (react__rspack_import_0.createElement(ComposedComponent, (0,tslib__rspack_import_3.__assign)({ ref: this._updateComposedComponentRef, responsiveMode: responsiveMode }, this.props)));
};
return WithResponsiveMode;
}(_BaseDecorator__rspack_import_2.BaseDecorator)),
_a.contextType = _WindowProvider__rspack_import_5.WindowContext,
_a);
return (0,_Utilities__rspack_import_6.hoistStatics)(ComposedComponent, resultClass);
}
function getWidthOfCurrentWindow(currentWindow) {
try {
return currentWindow.document.documentElement.clientWidth;
}
catch (e) {
return currentWindow.innerWidth;
}
}
/**
* Hook to get the current responsive mode (window size category).
* @param currentWindow - Use this window when determining the responsive mode.
*/
function getResponsiveMode(currentWindow) {
var responsiveMode = ResponsiveMode.small;
if (currentWindow) {
try {
while (getWidthOfCurrentWindow(currentWindow) > RESPONSIVE_MAX_CONSTRAINT[responsiveMode]) {
responsiveMode++;
}
}
catch (e) {
// Return a best effort result in cases where we're in the browser but it throws on getting innerWidth.
responsiveMode = getInitialResponsiveMode();
}
// Tracking last mode just gives us a better default in future renders,
// which avoids starting with the wrong value if we've measured once.
_lastMode = responsiveMode;
}
else {
if (_defaultMode !== undefined) {
responsiveMode = _defaultMode;
}
else {
throw new Error('Content was rendered in a server environment without providing a default responsive mode. ' +
'Call setResponsiveMode to define what the responsive mode is.');
}
}
return responsiveMode;
}
//# sourceMappingURL=withResponsiveMode.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/dom.js":
/*!***********************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/dom.js ***!
\***********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getDocumentEx: () => (getDocumentEx),
getWindowEx: () => (getWindowEx),
useDocumentEx: () => (useDocumentEx),
useWindowEx: () => (useWindowEx)
});
/* import */ var _fluentui_react_window_provider__rspack_import_0 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/**
* NOTE: the check for `window`/`document` is a bit verbose and perhaps
* overkill but it ensures the prior assumbed behavior of directly
* calling `window`/`document` is preserved.
*
* It is possible to set `window` to undefined on `WindowProvider` so
* we'll fallback to directly accessing the global in that (hopefully unlikely)
* case.
*/
/**
* Get a reference to the `document` object.
* Use this in place of the global `document` in React function components.
* @returns Document | undefined
*/
var useDocumentEx = function () {
var _a;
// eslint-disable-next-line no-restricted-globals
return (_a = (0,_fluentui_react_window_provider__rspack_import_0.useDocument)()) !== null && _a !== void 0 ? _a : (typeof document !== 'undefined' ? document : undefined);
};
/**
* Get a reference to the `window` object.
* Use this in place of the global `window` in React function components.
* @returns Window | undefined
*/
var useWindowEx = function () {
var _a;
// eslint-disable-next-line no-restricted-globals
return (_a = (0,_fluentui_react_window_provider__rspack_import_0.useWindow)()) !== null && _a !== void 0 ? _a : (typeof window !== 'undefined' ? window : undefined);
};
/**
* Get a reference to the `document` object.
* Use this in place of the global `document` in React class components.
*
* @param ctx - Class component WindowContext
* @returns Document | undefined
*/
var getDocumentEx = function (ctx) {
var _a, _b;
// eslint-disable-next-line no-restricted-globals
return (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.window) === null || _a === void 0 ? void 0 : _a.document) !== null && _b !== void 0 ? _b : (typeof document !== 'undefined' ? document : undefined);
};
/**
* Get a reference to the `window` object.
* Use this in place of the global `window` in React class components.
*
* @param ctx - Class component WindowContext
* @returns Window | undefined
*/
var getWindowEx = function (ctx) {
var _a;
// eslint-disable-next-line no-restricted-globals
return (_a = ctx === null || ctx === void 0 ? void 0 : ctx.window) !== null && _a !== void 0 ? _a : (typeof window !== 'undefined' ? window : undefined);
};
//# sourceMappingURL=dom.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useResponsiveMode: () => (useResponsiveMode)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _fluentui_react_hooks__rspack_import_4 = __webpack_require__(/*! @fluentui/react-hooks */ "./node_modules/@fluentui/react-hooks/lib/useOnEvent.js");
/* import */ var _decorators_withResponsiveMode__rspack_import_1 = __webpack_require__(/*! ../decorators/withResponsiveMode */ "./node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js");
/* import */ var _WindowProvider__rspack_import_3 = __webpack_require__(/*! ../../WindowProvider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/**
* Hook to get the current responsive mode (window size category).
* @param elementRef - Use this element's parent window when determining the responsive mode.
* @param overrideResponsiveMode - Override the responsive mode. If this param is present, it's always returned.
*/
var useResponsiveMode = function (elementRef, overrideResponsiveMode) {
var _a = react__rspack_import_0.useState((0,_decorators_withResponsiveMode__rspack_import_1.getInitialResponsiveMode)()), lastResponsiveMode = _a[0], setLastResponsiveMode = _a[1];
var onResize = react__rspack_import_0.useCallback(function () {
var newResponsiveMode = (0,_decorators_withResponsiveMode__rspack_import_1.getResponsiveMode)((0,_fluentui_utilities__rspack_import_2.getWindow)(elementRef.current));
// Setting the same value should not cause a re-render.
if (lastResponsiveMode !== newResponsiveMode) {
setLastResponsiveMode(newResponsiveMode);
}
}, [elementRef, lastResponsiveMode]);
var win = (0,_WindowProvider__rspack_import_3.useWindow)();
(0,_fluentui_react_hooks__rspack_import_4.useOnEvent)(win, 'resize', onResize);
// Call resize function initially on mount, or if the override changes from defined to undefined
// (the effect will run on all override changes, but onResize will only be called if it changed to undefined)
react__rspack_import_0.useEffect(function () {
if (overrideResponsiveMode === undefined) {
onResize();
}
// eslint-disable-next-line react-hooks/exhaustive-deps -- only meant to run on mount or when override changes
}, [overrideResponsiveMode]);
return overrideResponsiveMode !== null && overrideResponsiveMode !== void 0 ? overrideResponsiveMode : lastResponsiveMode;
};
//# sourceMappingURL=useResponsiveMode.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DATAKTP_ARIA_TARGET: () => (DATAKTP_ARIA_TARGET),
DATAKTP_EXECUTE_TARGET: () => (DATAKTP_EXECUTE_TARGET),
DATAKTP_TARGET: () => (DATAKTP_TARGET),
KTP_ARIA_SEPARATOR: () => (KTP_ARIA_SEPARATOR),
KTP_FULL_PREFIX: () => (KTP_FULL_PREFIX),
KTP_LAYER_ID: () => (KTP_LAYER_ID),
KTP_PREFIX: () => (KTP_PREFIX),
KTP_SEPARATOR: () => (KTP_SEPARATOR),
KeytipEvents: () => (KeytipEvents)
});
var KTP_PREFIX = 'ktp';
var KTP_SEPARATOR = '-';
var KTP_FULL_PREFIX = KTP_PREFIX + KTP_SEPARATOR;
var DATAKTP_TARGET = 'data-ktp-target';
var DATAKTP_EXECUTE_TARGET = 'data-ktp-execute-target';
var DATAKTP_ARIA_TARGET = 'data-ktp-aria-target';
var KTP_LAYER_ID = 'ktp-layer-id';
var KTP_ARIA_SEPARATOR = ', ';
// Events
var KeytipEvents;
(function (KeytipEvents) {
KeytipEvents.KEYTIP_ADDED = 'keytipAdded';
KeytipEvents.KEYTIP_REMOVED = 'keytipRemoved';
KeytipEvents.KEYTIP_UPDATED = 'keytipUpdated';
KeytipEvents.PERSISTED_KEYTIP_ADDED = 'persistedKeytipAdded';
KeytipEvents.PERSISTED_KEYTIP_REMOVED = 'persistedKeytipRemoved';
KeytipEvents.PERSISTED_KEYTIP_EXECUTE = 'persistedKeytipExecute';
KeytipEvents.ENTER_KEYTIP_MODE = 'enterKeytipMode';
KeytipEvents.EXIT_KEYTIP_MODE = 'exitKeytipMode';
})(KeytipEvents || (KeytipEvents = {}));
//# sourceMappingURL=KeytipConstants.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
KeytipManager: () => (KeytipManager)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _Utilities__rspack_import_1 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/getId.js");
/* import */ var _utilities_keytips_KeytipConstants__rspack_import_0 = __webpack_require__(/*! ../../utilities/keytips/KeytipConstants */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js");
/**
* This class is responsible for handling registering, updating, and unregistering of keytips
*/
var KeytipManager = /** @class */ (function () {
function KeytipManager() {
this.keytips = {};
this.persistedKeytips = {};
this.sequenceMapping = {};
// This is (and should be) updated and kept in sync
// with the inKeytipMode in KeytipLayer.
this.inKeytipMode = false;
// Boolean that gets checked before entering keytip mode by the KeytipLayer
// Used for an override in special cases (e.g. Disable entering keytip mode when a modal is shown)
this.shouldEnterKeytipMode = true;
// Boolean to indicate whether to delay firing an event to update subscribers of
// keytip data changed.
this.delayUpdatingKeytipChange = false;
}
/**
* Static function to get singleton KeytipManager instance
*
* @returns Singleton KeytipManager instance
*/
KeytipManager.getInstance = function () {
return this._instance;
};
/**
* Initialization code to set set parameters to define
* how the KeytipManager handles keytip data.
*
* @param delayUpdatingKeytipChange - T/F if we should delay notifiying keytip subscribers
* of keytip changes
*/
KeytipManager.prototype.init = function (delayUpdatingKeytipChange) {
this.delayUpdatingKeytipChange = delayUpdatingKeytipChange;
};
/**
* Registers a keytip
*
* @param keytipProps - Keytip to register
* @param persisted - T/F if this keytip should be persisted, default is false
* @returns Unique ID for this keytip
*/
KeytipManager.prototype.register = function (keytipProps, persisted) {
if (persisted === void 0) { persisted = false; }
var props = keytipProps;
if (!persisted) {
// Add the overflowSetSequence if necessary
props = this.addParentOverflow(keytipProps);
this.sequenceMapping[props.keySequences.toString()] = props;
}
// Create a unique keytip
var uniqueKeytip = this._getUniqueKtp(props);
// Add to dictionary
persisted
? (this.persistedKeytips[uniqueKeytip.uniqueID] = uniqueKeytip)
: (this.keytips[uniqueKeytip.uniqueID] = uniqueKeytip);
// We only want to add something new if we are currently showing keytip mode
if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {
var event_1 = persisted ? _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.PERSISTED_KEYTIP_ADDED : _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.KEYTIP_ADDED;
_Utilities__rspack_import_1.EventGroup.raise(this, event_1, {
keytip: props,
uniqueID: uniqueKeytip.uniqueID,
});
}
return uniqueKeytip.uniqueID;
};
/**
* Update a keytip
*
* @param keytipProps - Keytip to update
* @param uniqueID - Unique ID of this keytip
*/
KeytipManager.prototype.update = function (keytipProps, uniqueID) {
var newKeytipProps = this.addParentOverflow(keytipProps);
var uniqueKeytip = this._getUniqueKtp(newKeytipProps, uniqueID);
var oldKeyTip = this.keytips[uniqueID];
if (oldKeyTip) {
// Update everything except 'visible'
uniqueKeytip.keytip.visible = oldKeyTip.keytip.visible;
// Update keytip in this.keytips
this.keytips[uniqueID] = uniqueKeytip;
// Update the sequence to be up to date
delete this.sequenceMapping[oldKeyTip.keytip.keySequences.toString()];
this.sequenceMapping[uniqueKeytip.keytip.keySequences.toString()] = uniqueKeytip.keytip;
// Raise event only if we are currently in keytip mode
if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {
_Utilities__rspack_import_1.EventGroup.raise(this, _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.KEYTIP_UPDATED, {
keytip: uniqueKeytip.keytip,
uniqueID: uniqueKeytip.uniqueID,
});
}
}
};
/**
* Unregisters a keytip
*
* @param keytipToRemove - IKeytipProps of the keytip to remove
* @param uniqueID - Unique ID of this keytip
* @param persisted - T/F if this keytip should be persisted, default is false
*/
KeytipManager.prototype.unregister = function (keytipToRemove, uniqueID, persisted) {
if (persisted === void 0) { persisted = false; }
persisted ? delete this.persistedKeytips[uniqueID] : delete this.keytips[uniqueID];
!persisted && delete this.sequenceMapping[keytipToRemove.keySequences.toString()];
var event = persisted ? _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.PERSISTED_KEYTIP_REMOVED : _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.KEYTIP_REMOVED;
// Update keytips only if we're in keytip mode
if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {
_Utilities__rspack_import_1.EventGroup.raise(this, event, {
keytip: keytipToRemove,
uniqueID: uniqueID,
});
}
};
/**
* Manual call to enter keytip mode
*/
KeytipManager.prototype.enterKeytipMode = function () {
_Utilities__rspack_import_1.EventGroup.raise(this, _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.ENTER_KEYTIP_MODE);
};
/**
* Manual call to exit keytip mode
*/
KeytipManager.prototype.exitKeytipMode = function () {
_Utilities__rspack_import_1.EventGroup.raise(this, _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.EXIT_KEYTIP_MODE);
};
/**
* Gets all IKeytipProps from this.keytips
*
* @returns All keytips stored in the manager
*/
KeytipManager.prototype.getKeytips = function () {
var _this = this;
return Object.keys(this.keytips).map(function (key) { return _this.keytips[key].keytip; });
};
/**
* Adds the overflowSetSequence to the keytipProps if its parent keytip also has it
*
* @param keytipProps - Keytip props to add overflowSetSequence to if necessary
* @returns - Modified keytip props, if needed to be modified
*/
KeytipManager.prototype.addParentOverflow = function (keytipProps) {
var fullSequence = (0,tslib__rspack_import_2.__spreadArray)([], keytipProps.keySequences, true);
fullSequence.pop();
if (fullSequence.length !== 0) {
var parentKeytip = this.sequenceMapping[fullSequence.toString()];
if (parentKeytip && parentKeytip.overflowSetSequence) {
return (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, keytipProps), { overflowSetSequence: parentKeytip.overflowSetSequence });
}
}
return keytipProps;
};
/**
* Public function to bind for overflow items that have a submenu
*/
KeytipManager.prototype.menuExecute = function (overflowButtonSequences, keytipSequences) {
_Utilities__rspack_import_1.EventGroup.raise(this, _utilities_keytips_KeytipConstants__rspack_import_0.KeytipEvents.PERSISTED_KEYTIP_EXECUTE, {
overflowButtonSequences: overflowButtonSequences,
keytipSequences: keytipSequences,
});
};
/**
* Creates an IUniqueKeytip object
*
* @param keytipProps - IKeytipProps
* @param uniqueID - Unique ID, will default to the next unique ID if not passed
* @returns IUniqueKeytip object
*/
KeytipManager.prototype._getUniqueKtp = function (keytipProps, uniqueID) {
if (uniqueID === void 0) { uniqueID = (0,_Utilities__rspack_import_3.getId)(); }
return { keytip: (0,tslib__rspack_import_2.__assign)({}, keytipProps), uniqueID: uniqueID };
};
KeytipManager._instance = new KeytipManager();
return KeytipManager;
}());
//# sourceMappingURL=KeytipManager.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/keytips/KeytipUtils.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/keytips/KeytipUtils.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getAriaDescribedBy: () => (getAriaDescribedBy),
ktpTargetFromId: () => (ktpTargetFromId),
ktpTargetFromSequences: () => (ktpTargetFromSequences),
mergeOverflows: () => (mergeOverflows),
sequencesToID: () => (sequencesToID)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _KeytipConstants__rspack_import_0 = __webpack_require__(/*! ./KeytipConstants */ "./node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/array.js");
/**
* Converts a whole set of KeySequences into one keytip ID, which will be the ID for the last keytip sequence specified
* keySequences should not include the initial keytip 'start' sequence.
*
* @param keySequences - Full path of IKeySequences for one keytip.
* @returns String to use for the keytip ID.
*/
function sequencesToID(keySequences) {
return keySequences.reduce(function (prevValue, keySequence) {
return prevValue + _KeytipConstants__rspack_import_0.KTP_SEPARATOR + keySequence.split('').join(_KeytipConstants__rspack_import_0.KTP_SEPARATOR);
}, _KeytipConstants__rspack_import_0.KTP_PREFIX);
}
/**
* Merges an overflow sequence with a key sequence.
*
* @param keySequences - Full sequence for one keytip.
* @param overflowKeySequences - Full overflow keytip sequence.
* @returns Sequence that will be used by the keytip when in the overflow.
*/
function mergeOverflows(keySequences, overflowKeySequences) {
var overflowSequenceLen = overflowKeySequences.length;
var overflowSequence = (0,tslib__rspack_import_1.__spreadArray)([], overflowKeySequences, true).pop();
var newKeySequences = (0,tslib__rspack_import_1.__spreadArray)([], keySequences, true);
return (0,_Utilities__rspack_import_2.addElementAtIndex)(newKeySequences, overflowSequenceLen - 1, overflowSequence);
}
/**
* Constructs the data-ktp-target attribute selector from a full key sequence.
*
* @param keySequences - Full string[] for a Keytip.
* @returns String selector to use to query for the keytip target.
*/
function ktpTargetFromSequences(keySequences) {
return '[' + _KeytipConstants__rspack_import_0.DATAKTP_TARGET + '="' + sequencesToID(keySequences) + '"]';
}
/**
* Constructs the data-ktp-execute-target attribute selector from a keytip ID.
*
* @param keytipId - ID of the Keytip.
* @returns String selector to use to query for the keytip execute target.
*/
function ktpTargetFromId(keytipId) {
return '[' + _KeytipConstants__rspack_import_0.DATAKTP_EXECUTE_TARGET + '="' + keytipId + '"]';
}
/**
* Gets the aria-describedby value to put on the component with this keytip.
*
* @param keySequences - KeySequences of the keytip.
* @returns The aria-describedby value to set on the component with this keytip.
*/
function getAriaDescribedBy(keySequences) {
var describedby = ' ' + _KeytipConstants__rspack_import_0.KTP_LAYER_ID;
if (!keySequences.length) {
// Return just the layer ID
return describedby;
}
return describedby + ' ' + sequencesToID(keySequences);
}
//# sourceMappingURL=KeytipUtils.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/positioning/positioning.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/positioning/positioning.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
__positioningTestPackage: () => (__positioningTestPackage),
calculateGapSpace: () => (calculateGapSpace),
getBoundsFromTargetWindow: () => (getBoundsFromTargetWindow),
getMaxHeight: () => (getMaxHeight),
getOppositeEdge: () => (getOppositeEdge),
getRectangleFromTarget: () => (getRectangleFromTarget),
positionCallout: () => (positionCallout),
positionCard: () => (positionCard),
positionElement: () => (positionElement)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _common_DirectionalHint__rspack_import_1 = __webpack_require__(/*! ../../common/DirectionalHint */ "./node_modules/@fluentui/react/lib/common/DirectionalHint.js");
/* import */ var _Utilities__rspack_import_2 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _Utilities__rspack_import_5 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _Utilities__rspack_import_6 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/scroll.js");
/* import */ var _positioning_types__rspack_import_0 = __webpack_require__(/*! ./positioning.types */ "./node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js");
/* import */ var _Utilities__rspack_import_3 = __webpack_require__(/*! ../../Utilities */ "./node_modules/@fluentui/utilities/lib/Rectangle.js");
var _a;
function _createPositionData(targetEdge, alignmentEdge, isAuto) {
return {
targetEdge: targetEdge,
alignmentEdge: alignmentEdge,
isAuto: isAuto,
};
}
// Currently the beakPercent is set to 50 for all positions meaning that it should tend to the center of the target
var DirectionalDictionary = (_a = {},
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.topLeftEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.top, _positioning_types__rspack_import_0.RectangleEdge.left),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.topCenter] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.top),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.topRightEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.top, _positioning_types__rspack_import_0.RectangleEdge.right),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.topAutoEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.top, undefined, true),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.bottomLeftEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.bottom, _positioning_types__rspack_import_0.RectangleEdge.left),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.bottomCenter] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.bottom),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.bottomRightEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.bottom, _positioning_types__rspack_import_0.RectangleEdge.right),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.bottomAutoEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.bottom, undefined, true),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.leftTopEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.left, _positioning_types__rspack_import_0.RectangleEdge.top),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.leftCenter] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.left),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.leftBottomEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.left, _positioning_types__rspack_import_0.RectangleEdge.bottom),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.rightTopEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.right, _positioning_types__rspack_import_0.RectangleEdge.top),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.rightCenter] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.right),
_a[_common_DirectionalHint__rspack_import_1.DirectionalHint.rightBottomEdge] = _createPositionData(_positioning_types__rspack_import_0.RectangleEdge.right, _positioning_types__rspack_import_0.RectangleEdge.bottom),
_a);
function _isRectangleWithinBounds(rect, boundingRect) {
if (rect.top < boundingRect.top) {
return false;
}
if (rect.bottom > boundingRect.bottom) {
return false;
}
if (rect.left < boundingRect.left) {
return false;
}
if (rect.right > boundingRect.right) {
return false;
}
return true;
}
/**
* Gets all of the edges of a rectangle that are outside of the given bounds.
* If there are no out of bounds edges it returns an empty array.
*/
function _getOutOfBoundsEdges(rect, boundingRect) {
var outOfBounds = [];
if (rect.top < boundingRect.top) {
outOfBounds.push(_positioning_types__rspack_import_0.RectangleEdge.top);
}
if (rect.bottom > boundingRect.bottom) {
outOfBounds.push(_positioning_types__rspack_import_0.RectangleEdge.bottom);
}
if (rect.left < boundingRect.left) {
outOfBounds.push(_positioning_types__rspack_import_0.RectangleEdge.left);
}
if (rect.right > boundingRect.right) {
outOfBounds.push(_positioning_types__rspack_import_0.RectangleEdge.right);
}
return outOfBounds;
}
function _getEdgeValue(rect, edge) {
return rect[_positioning_types__rspack_import_0.RectangleEdge[edge]];
}
function _setEdgeValue(rect, edge, value) {
rect[_positioning_types__rspack_import_0.RectangleEdge[edge]] = value;
return rect;
}
/**
* Returns the middle value of an edge. Only returns 1 value rather than xy coordinates as
* the itself already contains the other coordinate.
* For instance, a bottom edge's current value is it's y coordinate, so the number returned is the x.
*/
function _getCenterValue(rect, edge) {
var edges = _getFlankingEdges(edge);
return (_getEdgeValue(rect, edges.positiveEdge) + _getEdgeValue(rect, edges.negativeEdge)) / 2;
}
/**
* Flips the value depending on the edge.
* If the edge is a "positive" edge, Top or Left, then the value should stay as it is.
* If the edge is a "negative" edge, Bottom or Right, then the value should be flipped.
* This is to account for the fact that the coordinates are effectively reserved in certain cases for the
* "negative" edges.
*
* For example, when testing to see if a bottom edge 1 is within the bounds of another bottom edge 2:
* If edge 1 is greater than edge 2 then it is out of bounds. This is reversed for top edge 1 and top edge 2.
* If top edge 1 is less than edge 2 then it is out of bounds.
*/
function _getRelativeEdgeValue(edge, value) {
if (edge > 0) {
return value;
}
else {
return value * -1;
}
}
function _getRelativeRectEdgeValue(edge, rect) {
return _getRelativeEdgeValue(edge, _getEdgeValue(rect, edge));
}
function _getRelativeEdgeDifference(rect, hostRect, edge) {
var edgeDifference = _getEdgeValue(rect, edge) - _getEdgeValue(hostRect, edge);
return _getRelativeEdgeValue(edge, edgeDifference);
}
/**
* Moves the edge of a rectangle to the value given. It only moves the edge in a linear direction based on that edge.
* For example, if it's a bottom edge it will only change y coordinates.
* if maintainSize is set to false, it will only adjust the specified edge value
*/
function _moveEdge(rect, edge, newValue, maintainSize) {
if (maintainSize === void 0) { maintainSize = true; }
var difference = _getEdgeValue(rect, edge) - newValue;
var returnRect = _setEdgeValue(rect, edge, newValue);
if (maintainSize) {
returnRect = _setEdgeValue(rect, edge * -1, _getEdgeValue(rect, edge * -1) - difference);
}
return returnRect;
}
/**
* Aligns the edge on the passed in rect to the target. If there is a gap then it will have that space between the two.
*/
function _alignEdges(rect, target, edge, gap) {
if (gap === void 0) { gap = 0; }
return _moveEdge(rect, edge, _getEdgeValue(target, edge) + _getRelativeEdgeValue(edge, gap));
}
/**
* Aligns the targetEdge on the passed in target to the rects corresponding opposite edge.
* For instance if targetEdge is bottom, then the rects top will be moved to match it.
*/
function _alignOppositeEdges(rect, target, targetEdge, gap) {
if (gap === void 0) { gap = 0; }
var oppositeEdge = targetEdge * -1;
var adjustedGap = _getRelativeEdgeValue(oppositeEdge, gap);
return _moveEdge(rect, targetEdge * -1, _getEdgeValue(target, targetEdge) + adjustedGap);
}
/**
* Tests to see if the given edge is within the bounds of the given rectangle.
*/
function _isEdgeInBounds(rect, bounds, edge) {
var adjustedRectValue = _getRelativeRectEdgeValue(edge, rect);
return adjustedRectValue > _getRelativeRectEdgeValue(edge, bounds);
}
/**
* Returns a measure of how much a rectangle is out of bounds for a given alignment;
* this can be used to compare which rectangle is more or less out of bounds.
* A value of 0 means the rectangle is entirely in bounds
*/
function _getOutOfBoundsDegree(rect, bounds) {
var breakingEdges = _getOutOfBoundsEdges(rect, bounds);
var total = 0;
for (var _i = 0, breakingEdges_1 = breakingEdges; _i < breakingEdges_1.length; _i++) {
var edge = breakingEdges_1[_i];
total += Math.pow(_getRelativeEdgeDifference(rect, bounds, edge), 2);
}
return total;
}
/**
* Returns true if scroll-resizing will move the target edge within the bounding rectangle,
* and there is room between the target edge and the bounding edge for scrolled content.
* Returns false otherwise.
*/
function _canScrollResizeToFitEdge(target, bounding, targetEdge, minimumScrollResizeHeight) {
if (minimumScrollResizeHeight === void 0) { minimumScrollResizeHeight = 200; }
// Only scroll vertically to fit - cannot scroll to fit right or left edges
if (targetEdge !== _positioning_types__rspack_import_0.RectangleEdge.bottom && targetEdge !== _positioning_types__rspack_import_0.RectangleEdge.top) {
return false;
}
return _getRelativeEdgeDifference(target, bounding, targetEdge) >= minimumScrollResizeHeight;
}
/**
* Attempts to move the rectangle through various sides of the target to find a place to fit.
* If no fit is found, the least bad option should be returned.
*/
function _flipToFit(rect, target, bounding, positionData, shouldScroll, minimumScrollResizeHeight, gap) {
if (shouldScroll === void 0) { shouldScroll = false; }
if (gap === void 0) { gap = 0; }
var directions = [
_positioning_types__rspack_import_0.RectangleEdge.left,
_positioning_types__rspack_import_0.RectangleEdge.right,
_positioning_types__rspack_import_0.RectangleEdge.bottom,
_positioning_types__rspack_import_0.RectangleEdge.top,
];
// In RTL page, RectangleEdge.right has a higher priority than RectangleEdge.left, so the order should be updated.
if ((0,_Utilities__rspack_import_2.getRTL)()) {
directions[0] *= -1;
directions[1] *= -1;
}
var currentEstimate = rect;
var currentEdge = positionData.targetEdge;
var currentAlignment = positionData.alignmentEdge;
// keep track of least bad option, in case no sides fit
var oobDegree;
var bestEdge = currentEdge;
var bestAlignment = currentAlignment;
// Keep switching sides until one is found with enough space.
// If all sides don't fit then return the unmodified element.
for (var i = 0; i < 4; i++) {
if (_isEdgeInBounds(currentEstimate, bounding, currentEdge)) {
// Edge is in bounds, return current estimate
return {
elementRectangle: currentEstimate,
targetEdge: currentEdge,
alignmentEdge: currentAlignment,
};
}
else if (shouldScroll && _canScrollResizeToFitEdge(target, bounding, currentEdge, minimumScrollResizeHeight)) {
// Scrolling will allow edge to fit, move the estimate currentEdge inside the bounds and return
switch (currentEdge) {
case _positioning_types__rspack_import_0.RectangleEdge.bottom:
currentEstimate.bottom = bounding.bottom;
break;
case _positioning_types__rspack_import_0.RectangleEdge.top:
currentEstimate.top = bounding.top;
break;
}
return {
elementRectangle: currentEstimate,
targetEdge: currentEdge,
alignmentEdge: currentAlignment,
forcedInBounds: true,
};
}
else {
// update least-bad edges
var currentOOBDegree = _getOutOfBoundsDegree(currentEstimate, bounding);
if (!oobDegree || currentOOBDegree < oobDegree) {
oobDegree = currentOOBDegree;
bestEdge = currentEdge;
bestAlignment = currentAlignment;
}
directions.splice(directions.indexOf(currentEdge), 1);
if (directions.length > 0) {
if (directions.indexOf(currentEdge * -1) > -1) {
currentEdge = currentEdge * -1;
}
else {
currentAlignment = currentEdge;
currentEdge = directions.slice(-1)[0];
}
currentEstimate = _estimatePosition(rect, target, { targetEdge: currentEdge, alignmentEdge: currentAlignment }, gap);
}
}
}
// nothing fits, use least-bad option
currentEstimate = _estimatePosition(rect, target, { targetEdge: bestEdge, alignmentEdge: bestAlignment }, gap);
return {
elementRectangle: currentEstimate,
targetEdge: bestEdge,
alignmentEdge: bestAlignment,
};
}
/**
* Flips only the alignment edge of an element rectangle. This is used instead of nudging the alignment edges
* into position, when `alignTargetEdge` is specified.
*/
function _flipAlignmentEdge(elementEstimate, target, gap, coverTarget) {
var alignmentEdge = elementEstimate.alignmentEdge, targetEdge = elementEstimate.targetEdge, elementRectangle = elementEstimate.elementRectangle;
var oppositeEdge = alignmentEdge * -1;
var newEstimate = _estimatePosition(elementRectangle, target, { targetEdge: targetEdge, alignmentEdge: oppositeEdge }, gap, coverTarget);
return {
elementRectangle: newEstimate,
targetEdge: targetEdge,
alignmentEdge: oppositeEdge,
};
}
/**
* Adjusts a element rectangle to fit within the bounds given. If directionalHintFixed or covertarget is passed in
* then the element will not flip sides on the target. They will, however, be nudged to fit within the bounds given.
*/
function _adjustFitWithinBounds(element, target, bounding, positionData, shouldScroll, minimumScrollResizeHeight, gap, directionalHintFixed, coverTarget) {
if (shouldScroll === void 0) { shouldScroll = false; }
if (gap === void 0) { gap = 0; }
var alignmentEdge = positionData.alignmentEdge, alignTargetEdge = positionData.alignTargetEdge;
var elementEstimate = {
elementRectangle: element,
targetEdge: positionData.targetEdge,
alignmentEdge: alignmentEdge,
};
if (!directionalHintFixed && !coverTarget) {
elementEstimate = _flipToFit(element, target, bounding, positionData, shouldScroll, minimumScrollResizeHeight, gap);
}
var outOfBounds = _getOutOfBoundsEdges(elementEstimate.elementRectangle, bounding);
// if directionalHintFixed is specified, we need to force the target edge to not change
// we need *-1 because targetEdge refers to the target's edge; the callout edge is the opposite
var fixedEdge = directionalHintFixed ? -elementEstimate.targetEdge : undefined;
if (outOfBounds.length > 0) {
if (alignTargetEdge) {
// The edge opposite to the alignment edge might be out of bounds.
// Flip alignment to see if we can get it within bounds.
if (elementEstimate.alignmentEdge && outOfBounds.indexOf(elementEstimate.alignmentEdge * -1) > -1) {
var flippedElementEstimate = _flipAlignmentEdge(elementEstimate, target, gap, coverTarget);
if (_isRectangleWithinBounds(flippedElementEstimate.elementRectangle, bounding)) {
return flippedElementEstimate;
}
else {
// If the flipped elements edges are still out of bounds, try nudging it.
elementEstimate = _alignOutOfBoundsEdges(_getOutOfBoundsEdges(flippedElementEstimate.elementRectangle, bounding), elementEstimate, bounding, fixedEdge);
}
}
else {
elementEstimate = _alignOutOfBoundsEdges(outOfBounds, elementEstimate, bounding, fixedEdge);
}
}
else {
elementEstimate = _alignOutOfBoundsEdges(outOfBounds, elementEstimate, bounding, fixedEdge);
}
}
return elementEstimate;
}
/**
* Iterates through a list of out of bounds edges and tries to nudge and align them.
* @param outOfBoundsEdges - Array of edges that are out of bounds
* @param elementEstimate - The current element positioning estimate
* @param bounding - The current bounds
* @param preserveEdge - Specify an edge that should not be modified
*/
function _alignOutOfBoundsEdges(outOfBoundsEdges, elementEstimate, bounding, preserveEdge) {
for (var _i = 0, outOfBoundsEdges_1 = outOfBoundsEdges; _i < outOfBoundsEdges_1.length; _i++) {
var direction = outOfBoundsEdges_1[_i];
var edgeAttempt = void 0;
// if preserveEdge is specified, do not call _alignEdges, skip directly to _moveEdge
// this is because _alignEdges will move the opposite edge
if (preserveEdge && preserveEdge === direction * -1) {
edgeAttempt = _moveEdge(elementEstimate.elementRectangle, direction, _getEdgeValue(bounding, direction), false);
elementEstimate.forcedInBounds = true;
}
else {
edgeAttempt = _alignEdges(elementEstimate.elementRectangle, bounding, direction);
var inBounds = _isEdgeInBounds(edgeAttempt, bounding, direction * -1);
// only update estimate if the attempt didn't break out of the opposite bounding edge
if (!inBounds) {
edgeAttempt = _moveEdge(edgeAttempt, direction * -1, _getEdgeValue(bounding, direction * -1), false);
elementEstimate.forcedInBounds = true;
}
}
elementEstimate.elementRectangle = edgeAttempt;
}
return elementEstimate;
}
/**
* Moves the middle point on an edge to the point given.
* Only moves in one direction. For instance if a bottom edge is passed in, then
* the bottom edge will be moved in the x axis to match the point.
*/
function _centerEdgeToPoint(rect, edge, point) {
var positiveEdge = _getFlankingEdges(edge).positiveEdge;
var elementMiddle = _getCenterValue(rect, edge);
var distanceToMiddle = elementMiddle - _getEdgeValue(rect, positiveEdge);
return _moveEdge(rect, positiveEdge, point - distanceToMiddle);
}
/**
* Moves the element rectangle to be appropriately positioned relative to a given target.
* Does not flip or adjust the element.
*/
function _estimatePosition(elementToPosition, target, positionData, gap, coverTarget) {
if (gap === void 0) { gap = 0; }
var estimatedElementPosition = new _Utilities__rspack_import_3.Rectangle(elementToPosition.left, elementToPosition.right, elementToPosition.top, elementToPosition.bottom);
var alignmentEdge = positionData.alignmentEdge, targetEdge = positionData.targetEdge;
var elementEdge = coverTarget ? targetEdge : targetEdge * -1;
estimatedElementPosition = coverTarget
? _alignEdges(estimatedElementPosition, target, targetEdge, gap)
: _alignOppositeEdges(estimatedElementPosition, target, targetEdge, gap);
// if no alignment edge is provided it's supposed to be centered.
if (!alignmentEdge) {
var targetMiddlePoint = _getCenterValue(target, targetEdge);
estimatedElementPosition = _centerEdgeToPoint(estimatedElementPosition, elementEdge, targetMiddlePoint);
}
else {
estimatedElementPosition = _alignEdges(estimatedElementPosition, target, alignmentEdge);
}
return estimatedElementPosition;
}
/**
* Returns the non-opposite edges of the target edge.
* For instance if bottom is passed in then left and right will be returned.
*/
function _getFlankingEdges(edge) {
if (edge === _positioning_types__rspack_import_0.RectangleEdge.top || edge === _positioning_types__rspack_import_0.RectangleEdge.bottom) {
return {
positiveEdge: _positioning_types__rspack_import_0.RectangleEdge.left,
negativeEdge: _positioning_types__rspack_import_0.RectangleEdge.right,
};
}
else {
return {
positiveEdge: _positioning_types__rspack_import_0.RectangleEdge.top,
negativeEdge: _positioning_types__rspack_import_0.RectangleEdge.bottom,
};
}
}
/**
* Retrieve the final value for the return edge of `elementRectangle`. If the `elementRectangle` is closer to one side
* of the bounds versus the other, the return edge is flipped to grow inward.
*/
function _finalizeReturnEdge(elementRectangle, returnEdge, bounds) {
if (bounds &&
Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge)) >
Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge * -1))) {
return returnEdge * -1;
}
return returnEdge;
}
/**
* Whether or not the considered edge of the elementRectangle is lying on the edge of the bounds
* @param elementRectangle The rectangle whose edge we are considering
* @param bounds The rectangle marking the bounds
* @param edge The target edge we're considering
* @returns If the target edge of the elementRectangle is in the same location as that edge of the bounds
*/
function _isEdgeOnBounds(elementRectangle, edge, bounds) {
return bounds !== undefined && _getEdgeValue(elementRectangle, edge) === _getEdgeValue(bounds, edge);
}
/**
* Finalizes the element position based on the hostElement. Only returns the
* rectangle values to position such that they are anchored to the target.
* This helps prevent resizing from looking very strange.
* For instance, if the target edge is top and aligned with the left side then
* the bottom and left values are returned so as the Callout shrinks it shrinks towards that corner.
*/
function _finalizeElementPosition(elementRectangle, hostElement, targetEdge, bounds, alignmentEdge, coverTarget, doNotFinalizeReturnEdge, forceWithinBounds) {
var returnValue = {};
var hostRect = _getRectangleFromElement(hostElement);
var elementEdge = coverTarget ? targetEdge : targetEdge * -1;
var returnEdge = alignmentEdge ? alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge;
// If we are finalizing the return edge, choose the edge such that we grow away from the bounds
// If we are not finalizing the return edge but the opposite edge is flush against the bounds,
// choose that as the anchor edge so the element rect can grow away from the bounds' edge
// In this case there will not be a visual difference because there is no more room for the elementRectangle to grow
// in the usual direction
if (!doNotFinalizeReturnEdge || _isEdgeOnBounds(elementRectangle, getOppositeEdge(returnEdge), bounds)) {
returnEdge = _finalizeReturnEdge(elementRectangle, returnEdge, bounds);
}
returnValue[_positioning_types__rspack_import_0.RectangleEdge[elementEdge]] = _getRelativeEdgeDifference(elementRectangle, hostRect, elementEdge);
returnValue[_positioning_types__rspack_import_0.RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(elementRectangle, hostRect, returnEdge);
// if the positioned element will still overflow, return all four edges with in-bounds values
if (forceWithinBounds) {
returnValue[_positioning_types__rspack_import_0.RectangleEdge[elementEdge * -1]] = _getRelativeEdgeDifference(elementRectangle, hostRect, elementEdge * -1);
returnValue[_positioning_types__rspack_import_0.RectangleEdge[returnEdge * -1]] = _getRelativeEdgeDifference(elementRectangle, hostRect, returnEdge * -1);
}
return returnValue;
}
// Since the beak is rotated 45 degrees the actual height/width is the length of the diagonal.
// We still want to position the beak based on it's midpoint which does not change. It will
// be at (beakwidth / 2, beakwidth / 2)
function _calculateActualBeakWidthInPixels(beakWidth) {
return Math.sqrt(beakWidth * beakWidth * 2);
}
/**
* Returns the appropriate IPositionData based on the props altered for RTL.
* If directionalHintForRTL is passed in that is used if the page is RTL.
* If directionalHint is specified, no directionalHintForRTL is available, and the page is RTL, the hint will be
* flipped (e.g. bottomLeftEdge would become bottomRightEdge).
*
* If there is no directionalHint passed in, bottomAutoEdge is chosen automatically.
*/
function _getPositionData(directionalHint, directionalHintForRTL, previousPositions) {
if (directionalHint === void 0) { directionalHint = _common_DirectionalHint__rspack_import_1.DirectionalHint.bottomAutoEdge; }
if (previousPositions) {
return {
alignmentEdge: previousPositions.alignmentEdge,
isAuto: previousPositions.isAuto,
targetEdge: previousPositions.targetEdge,
};
}
var positionInformation = (0,tslib__rspack_import_4.__assign)({}, DirectionalDictionary[directionalHint]);
if ((0,_Utilities__rspack_import_2.getRTL)()) {
// If alignment edge exists and that alignment edge is -2 or 2, right or left, then flip it.
if (positionInformation.alignmentEdge && positionInformation.alignmentEdge % 2 === 0) {
positionInformation.alignmentEdge = positionInformation.alignmentEdge * -1;
}
return directionalHintForRTL !== undefined ? DirectionalDictionary[directionalHintForRTL] : positionInformation;
}
return positionInformation;
}
/**
* Gets the alignment data for the given information. This only really matters if the positioning is Auto.
* If it is auto then the alignmentEdge should be chosen based on the target edge's position relative to
* the center of the page.
*/
function _getAlignmentData(positionData, target, boundingRect, coverTarget, alignTargetEdge) {
if (positionData.isAuto) {
positionData.alignmentEdge = getClosestEdge(positionData.targetEdge, target, boundingRect);
}
positionData.alignTargetEdge = alignTargetEdge;
return positionData;
}
function getClosestEdge(targetEdge, target, boundingRect) {
var targetCenter = _getCenterValue(target, targetEdge);
var boundingCenter = _getCenterValue(boundingRect, targetEdge);
var _a = _getFlankingEdges(targetEdge), positiveEdge = _a.positiveEdge, negativeEdge = _a.negativeEdge;
if (targetCenter <= boundingCenter) {
return positiveEdge;
}
else {
return negativeEdge;
}
}
function _positionElementWithinBounds(elementToPosition, target, bounding, positionData, gap, shouldScroll, minimumScrollResizeHeight, directionalHintFixed, coverTarget) {
if (shouldScroll === void 0) { shouldScroll = false; }
var estimatedElementPosition = _estimatePosition(elementToPosition, target, positionData, gap, coverTarget);
if (_isRectangleWithinBounds(estimatedElementPosition, bounding)) {
return {
elementRectangle: estimatedElementPosition,
targetEdge: positionData.targetEdge,
alignmentEdge: positionData.alignmentEdge,
};
}
else {
return _adjustFitWithinBounds(estimatedElementPosition, target, bounding, positionData, shouldScroll, minimumScrollResizeHeight, gap, directionalHintFixed, coverTarget);
}
}
function _finalizeBeakPosition(elementPosition, positionedBeak, bounds) {
var targetEdge = elementPosition.targetEdge * -1;
// The "host" element that we will use to help position the beak.
var actualElement = new _Utilities__rspack_import_3.Rectangle(0, elementPosition.elementRectangle.width, 0, elementPosition.elementRectangle.height);
var returnValue = {};
var returnEdge = _finalizeReturnEdge(elementPosition.elementRectangle, elementPosition.alignmentEdge ? elementPosition.alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge, bounds);
// only show the beak if the callout is not fully covering the target
var beakEdgeDifference = _getRelativeEdgeDifference(elementPosition.elementRectangle, elementPosition.targetRectangle, targetEdge);
var showBeak = beakEdgeDifference > Math.abs(_getEdgeValue(positionedBeak, targetEdge));
returnValue[_positioning_types__rspack_import_0.RectangleEdge[targetEdge]] = _getEdgeValue(positionedBeak, targetEdge);
returnValue[_positioning_types__rspack_import_0.RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(positionedBeak, actualElement, returnEdge);
return {
elementPosition: (0,tslib__rspack_import_4.__assign)({}, returnValue),
closestEdge: getClosestEdge(elementPosition.targetEdge, positionedBeak, actualElement),
targetEdge: targetEdge,
hideBeak: !showBeak,
};
}
function _positionBeak(beakWidth, elementPosition) {
var target = elementPosition.targetRectangle;
/**
* Note about beak positioning: The actual beak width only matters for getting the gap between the callout and
* target, it does not impact the beak placement within the callout. For example example, if the beakWidth is 8,
* then the actual beakWidth is sqrroot(8^2 + 8^2) = 11.31x11.31. So the callout will need to be an extra 3 pixels
* away from its target. While the beak is being positioned in the callout it still acts as though it were 8x8.
*/
var _a = _getFlankingEdges(elementPosition.targetEdge), positiveEdge = _a.positiveEdge, negativeEdge = _a.negativeEdge;
var beakTargetPoint = _getCenterValue(target, elementPosition.targetEdge);
var elementBounds = new _Utilities__rspack_import_3.Rectangle(beakWidth / 2, elementPosition.elementRectangle.width - beakWidth / 2, beakWidth / 2, elementPosition.elementRectangle.height - beakWidth / 2);
var beakPosition = new _Utilities__rspack_import_3.Rectangle(0, beakWidth, 0, beakWidth);
beakPosition = _moveEdge(beakPosition, elementPosition.targetEdge * -1, -beakWidth / 2);
beakPosition = _centerEdgeToPoint(beakPosition, elementPosition.targetEdge * -1, beakTargetPoint - _getRelativeRectEdgeValue(positiveEdge, elementPosition.elementRectangle));
if (!_isEdgeInBounds(beakPosition, elementBounds, positiveEdge)) {
beakPosition = _alignEdges(beakPosition, elementBounds, positiveEdge);
}
else if (!_isEdgeInBounds(beakPosition, elementBounds, negativeEdge)) {
beakPosition = _alignEdges(beakPosition, elementBounds, negativeEdge);
}
return beakPosition;
}
function _getRectangleFromElement(element) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var clientRect = element.getBoundingClientRect();
return new _Utilities__rspack_import_3.Rectangle(clientRect.left, clientRect.right, clientRect.top, clientRect.bottom);
}
function _getRectangleFromIRect(rect) {
return new _Utilities__rspack_import_3.Rectangle(rect.left, rect.right, rect.top, rect.bottom);
}
function _getTargetRect(bounds, target) {
var targetRectangle;
if (target) {
// eslint-disable-next-line no-extra-boolean-cast
if (!!target.preventDefault) {
var ev = target;
targetRectangle = new _Utilities__rspack_import_3.Rectangle(ev.clientX, ev.clientX, ev.clientY, ev.clientY);
// eslint-disable-next-line no-extra-boolean-cast
}
else if (!!target.getBoundingClientRect) {
targetRectangle = _getRectangleFromElement(target);
// HTMLImgElements can have x and y values. The check for it being a point must go last.
}
else {
var rectOrPoint = target;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var left = rectOrPoint.left || rectOrPoint.x;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var top_1 = rectOrPoint.top || rectOrPoint.y;
var right = rectOrPoint.right || left;
var bottom = rectOrPoint.bottom || top_1;
targetRectangle = new _Utilities__rspack_import_3.Rectangle(left, right, top_1, bottom);
}
if (!_isRectangleWithinBounds(targetRectangle, bounds)) {
var outOfBounds = _getOutOfBoundsEdges(targetRectangle, bounds);
for (var _i = 0, outOfBounds_1 = outOfBounds; _i < outOfBounds_1.length; _i++) {
var direction = outOfBounds_1[_i];
targetRectangle[_positioning_types__rspack_import_0.RectangleEdge[direction]] = bounds[_positioning_types__rspack_import_0.RectangleEdge[direction]];
}
}
}
else {
targetRectangle = new _Utilities__rspack_import_3.Rectangle(0, 0, 0, 0);
}
return targetRectangle;
}
/**
* If max height is less than zero it returns the bounds height instead.
*/
function _getMaxHeightFromTargetRectangle(targetRectangle, targetEdge, gapSpace, bounds, coverTarget) {
var maxHeight = 0;
var directionalHint = DirectionalDictionary[targetEdge];
// If cover target is set, then the max height should be calculated using the opposite of the target edge since
// that's the direction that the callout will expand in.
// For instance, if the directionalhint is bottomLeftEdge then the callout will position so it's bottom edge
// is aligned with the bottom of the target and expand up towards the top of the screen and the calculated max height
// is (bottom of target) - (top of screen) - gapSpace.
var target = coverTarget ? directionalHint.targetEdge * -1 : directionalHint.targetEdge;
if (target === _positioning_types__rspack_import_0.RectangleEdge.top) {
maxHeight = _getEdgeValue(targetRectangle, directionalHint.targetEdge) - bounds.top - gapSpace;
}
else if (target === _positioning_types__rspack_import_0.RectangleEdge.bottom) {
maxHeight = bounds.bottom - _getEdgeValue(targetRectangle, directionalHint.targetEdge) - gapSpace;
}
else {
maxHeight = bounds.bottom - targetRectangle.top - gapSpace;
}
return maxHeight > 0 ? maxHeight : bounds.height;
}
function _positionElementRelative(props, elementToPosition, boundingRect, previousPositions, shouldScroll, minimumScrollResizeHeight) {
if (shouldScroll === void 0) { shouldScroll = false; }
var gap = props.gapSpace ? props.gapSpace : 0;
var targetRect = _getTargetRect(boundingRect, props.target);
var positionData = _getAlignmentData(_getPositionData(props.directionalHint, props.directionalHintForRTL, previousPositions), targetRect, boundingRect, props.coverTarget, props.alignTargetEdge);
var positionedElement = _positionElementWithinBounds(_getRectangleFromElement(elementToPosition), targetRect, boundingRect, positionData, gap, shouldScroll, minimumScrollResizeHeight, props.directionalHintFixed, props.coverTarget);
return (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, positionedElement), { targetRectangle: targetRect });
}
function _finalizePositionData(positionedElement, hostElement, bounds, coverTarget, doNotFinalizeReturnEdge) {
var finalizedElement = _finalizeElementPosition(positionedElement.elementRectangle, hostElement, positionedElement.targetEdge, bounds, positionedElement.alignmentEdge, coverTarget, doNotFinalizeReturnEdge, positionedElement.forcedInBounds);
return {
elementPosition: finalizedElement,
targetEdge: positionedElement.targetEdge,
alignmentEdge: positionedElement.alignmentEdge,
};
}
function _positionElement(props, hostElement, elementToPosition, previousPositions, win) {
var theWin = win !== null && win !== void 0 ? win : (0,_Utilities__rspack_import_5.getWindow)();
var boundingRect = props.bounds
? _getRectangleFromIRect(props.bounds)
: new _Utilities__rspack_import_3.Rectangle(0, theWin.innerWidth - (0,_Utilities__rspack_import_6.getScrollbarWidth)(), 0, theWin.innerHeight);
var positionedElement = _positionElementRelative(props, elementToPosition, boundingRect, previousPositions);
return _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget);
}
function _calculateGapSpace(isBeakVisible, beakWidth, gapSpace) {
if (beakWidth === void 0) { beakWidth = 0; }
if (gapSpace === void 0) { gapSpace = 0; }
return _calculateActualBeakWidthInPixels(isBeakVisible ? beakWidth : 0) / 2 + gapSpace;
}
function _positionCallout(props, hostElement, callout, previousPositions, shouldScroll, minimumScrollResizeHeight, doNotFinalizeReturnEdge, win) {
if (shouldScroll === void 0) { shouldScroll = false; }
var theWin = win !== null && win !== void 0 ? win : (0,_Utilities__rspack_import_5.getWindow)();
var beakWidth = props.isBeakVisible ? props.beakWidth || 0 : 0;
var gap = _calculateGapSpace(props.isBeakVisible, props.beakWidth, props.gapSpace);
var positionProps = props;
positionProps.gapSpace = gap;
var boundingRect = props.bounds
? _getRectangleFromIRect(props.bounds)
: new _Utilities__rspack_import_3.Rectangle(0, theWin.innerWidth - (0,_Utilities__rspack_import_6.getScrollbarWidth)(), 0, theWin.innerHeight);
var positionedElement = _positionElementRelative(positionProps, callout, boundingRect, previousPositions, shouldScroll, minimumScrollResizeHeight);
var beakPositioned = _positionBeak(beakWidth, positionedElement);
var finalizedBeakPosition = _finalizeBeakPosition(positionedElement, beakPositioned, boundingRect);
return (0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget, doNotFinalizeReturnEdge)), { beakPosition: finalizedBeakPosition });
}
function _positionCard(props, hostElement, callout, previousPositions, win) {
var theWin = win !== null && win !== void 0 ? win : (0,_Utilities__rspack_import_5.getWindow)();
return _positionCallout(props, hostElement, callout, previousPositions, false, undefined, true, theWin);
}
function _getRectangleFromTarget(target) {
var _a, _b, _c, _d;
var mouseTarget = target;
var elementTarget = target;
var rectOrPointTarget = target;
var targetRect;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var left = (_a = rectOrPointTarget.left) !== null && _a !== void 0 ? _a : rectOrPointTarget.x;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var top = (_b = rectOrPointTarget.top) !== null && _b !== void 0 ? _b : rectOrPointTarget.y;
var right = (_c = rectOrPointTarget.right) !== null && _c !== void 0 ? _c : left;
var bottom = (_d = rectOrPointTarget.bottom) !== null && _d !== void 0 ? _d : top;
// eslint-disable-next-line no-extra-boolean-cast -- may not actually be a MouseEvent
if (!!mouseTarget.stopPropagation) {
targetRect = new _Utilities__rspack_import_3.Rectangle(mouseTarget.clientX, mouseTarget.clientX, mouseTarget.clientY, mouseTarget.clientY);
}
else if (left !== undefined && top !== undefined) {
targetRect = new _Utilities__rspack_import_3.Rectangle(left, right, top, bottom);
}
else {
targetRect = _getRectangleFromElement(elementTarget);
}
return targetRect;
}
// END PRIVATE FUNCTIONS
var __positioningTestPackage = {
_finalizePositionData: _finalizePositionData,
_finalizeBeakPosition: _finalizeBeakPosition,
_calculateActualBeakWidthInPixels: _calculateActualBeakWidthInPixels,
_positionElementWithinBounds: _positionElementWithinBounds,
_positionBeak: _positionBeak,
_getPositionData: _getPositionData,
_getMaxHeightFromTargetRectangle: _getMaxHeightFromTargetRectangle,
};
/**
* Used to position an element relative to the given positioning props.
* If positioning has been completed before, previousPositions can be passed to ensure that the positioning element
* repositions based on its previous targets rather than starting with directionalhint.
*/
function positionElement(props, hostElement, elementToPosition, previousPositions, win) {
return _positionElement(props, hostElement, elementToPosition, previousPositions, win);
}
function positionCallout(props, hostElement, elementToPosition, previousPositions, shouldScroll, minimumScrollResizeHeight, win) {
return _positionCallout(props, hostElement, elementToPosition, previousPositions, shouldScroll, minimumScrollResizeHeight, undefined, win);
}
function positionCard(props, hostElement, elementToPosition, previousPositions, win) {
return _positionCard(props, hostElement, elementToPosition, previousPositions, win);
}
/**
* Gets the maximum height that a rectangle can have in order to fit below or above a target.
* If the directional hint specifies a left or right edge (i.e. leftCenter) it will limit the height to the topBorder
* of the target given.
* If no bounds are provided then the window is treated as the bounds.
*/
function getMaxHeight(target, targetEdge, gapSpace, bounds, coverTarget, win) {
if (gapSpace === void 0) { gapSpace = 0; }
var theWin = win !== null && win !== void 0 ? win : (0,_Utilities__rspack_import_5.getWindow)();
var targetRect = _getRectangleFromTarget(target);
var boundingRectangle = bounds
? _getRectangleFromIRect(bounds)
: new _Utilities__rspack_import_3.Rectangle(0, theWin.innerWidth - (0,_Utilities__rspack_import_6.getScrollbarWidth)(), 0, theWin.innerHeight);
return _getMaxHeightFromTargetRectangle(targetRect, targetEdge, gapSpace, boundingRectangle, coverTarget);
}
/**
* Returns the opposite edge of the given RectangleEdge.
*/
function getOppositeEdge(edge) {
return edge * -1;
}
function _getBoundsFromTargetWindow(target, targetWindow) {
var segments = undefined;
if (targetWindow.getWindowSegments) {
segments = targetWindow.getWindowSegments();
}
// Identify if we're dealing with single screen scenarios.
if (segments === undefined || segments.length <= 1) {
return {
top: 0,
left: 0,
right: targetWindow.innerWidth,
bottom: targetWindow.innerHeight,
width: targetWindow.innerWidth,
height: targetWindow.innerHeight,
};
}
// Logic for determining dual screen scenarios.
var x = 0;
var y = 0;
// If the target is an Element get coordinates for its center.
if (target !== null && !!target.getBoundingClientRect) {
var clientRect = target.getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
}
// If the target is not null get x-axis and y-axis coordinates directly.
else if (target !== null) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
x = target.left || target.x;
// eslint-disable-next-line @typescript-eslint/no-deprecated
y = target.top || target.y;
}
var bounds = { top: 0, left: 0, right: 0, bottom: 0, width: 0, height: 0 };
// Define which window segment are the coordinates in and calculate bounds based on that.
for (var _i = 0, segments_1 = segments; _i < segments_1.length; _i++) {
var segment = segments_1[_i];
if (x && segment.left <= x && segment.right >= x && y && segment.top <= y && segment.bottom >= y) {
bounds = {
top: segment.top,
left: segment.left,
right: segment.right,
bottom: segment.bottom,
width: segment.width,
height: segment.height,
};
}
}
return bounds;
}
function getBoundsFromTargetWindow(target, targetWindow) {
return _getBoundsFromTargetWindow(target, targetWindow);
}
function calculateGapSpace(isBeakVisible, beakWidth, gapSpace) {
return _calculateGapSpace(isBeakVisible, beakWidth, gapSpace);
}
function getRectangleFromTarget(target) {
return _getRectangleFromTarget(target);
}
//# sourceMappingURL=positioning.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Position: () => (Position),
RectangleEdge: () => (RectangleEdge)
});
var RectangleEdge;
(function (RectangleEdge) {
RectangleEdge[RectangleEdge["top"] = 1] = "top";
RectangleEdge[RectangleEdge["bottom"] = -1] = "bottom";
RectangleEdge[RectangleEdge["left"] = 2] = "left";
RectangleEdge[RectangleEdge["right"] = -2] = "right";
})(RectangleEdge || (RectangleEdge = {}));
var Position;
(function (Position) {
Position[Position["top"] = 0] = "top";
Position[Position["bottom"] = 1] = "bottom";
Position[Position["start"] = 2] = "start";
Position[Position["end"] = 3] = "end";
})(Position || (Position = {}));
//# sourceMappingURL=positioning.types.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.js ***!
\*****************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getAllSelectedOptions: () => (getAllSelectedOptions)
});
function getAllSelectedOptions(options, selectedIndices) {
var selectedOptions = [];
for (var _i = 0, selectedIndices_1 = selectedIndices; _i < selectedIndices_1.length; _i++) {
var index = selectedIndices_1[_i];
var option = options[index];
if (option) {
selectedOptions.push(option);
}
}
return selectedOptions;
}
//# sourceMappingURL=SelectableOption.js.map
}),
"./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js ***!
\***********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
SelectableOptionMenuItemType: () => (SelectableOptionMenuItemType)
});
var SelectableOptionMenuItemType;
(function (SelectableOptionMenuItemType) {
SelectableOptionMenuItemType[SelectableOptionMenuItemType["Normal"] = 0] = "Normal";
SelectableOptionMenuItemType[SelectableOptionMenuItemType["Divider"] = 1] = "Divider";
SelectableOptionMenuItemType[SelectableOptionMenuItemType["Header"] = 2] = "Header";
SelectableOptionMenuItemType[SelectableOptionMenuItemType["SelectAll"] = 3] = "SelectAll";
})(SelectableOptionMenuItemType || (SelectableOptionMenuItemType = {}));
//# sourceMappingURL=SelectableOption.types.js.map
}),
"./node_modules/@fluentui/set-version/lib/index.js":
/*!*********************************************************!*\
!*** ./node_modules/@fluentui/set-version/lib/index.js ***!
\*********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
setVersion: () => (/* reexport safe */ _setVersion__rspack_import_0.setVersion)
});
/* import */ var _setVersion__rspack_import_0 = __webpack_require__(/*! ./setVersion */ "./node_modules/@fluentui/set-version/lib/setVersion.js");
(0,_setVersion__rspack_import_0.setVersion)('@fluentui/set-version', '6.0.0');
//# sourceMappingURL=index.js.map
}),
"./node_modules/@fluentui/set-version/lib/setVersion.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/set-version/lib/setVersion.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
setVersion: () => (setVersion)
});
// A packages cache that makes sure that we don't inject the same packageName twice in the same bundle -
// this cache is local to the module closure inside this bundle
var packagesCache = {};
// Cache access to window to avoid IE11 memory leak.
var _win = undefined;
try {
_win = window;
}
catch (e) {
/* no-op */
}
function setVersion(packageName, packageVersion) {
if (typeof _win !== 'undefined') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var packages = (_win.__packages__ = _win.__packages__ || {});
// We allow either the global packages or local packages caches to invalidate so testing can
// just clear the global to set this state
if (!packages[packageName] || !packagesCache[packageName]) {
packagesCache[packageName] = packageVersion;
var versions = (packages[packageName] = packages[packageName] || []);
versions.push(packageVersion);
}
}
}
//# sourceMappingURL=setVersion.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/cdn.js":
/*!***********************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/cdn.js ***!
\***********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FLUENT_CDN_BASE_URL: () => (FLUENT_CDN_BASE_URL)
});
var FLUENT_CDN_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20251107.003';
//# sourceMappingURL=cdn.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/classNames/AnimationClassNames.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/classNames/AnimationClassNames.js ***!
\**************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
AnimationClassNames: () => (AnimationClassNames)
});
/* import */ var _utilities_index__rspack_import_0 = __webpack_require__(/*! ../utilities/index */ "./node_modules/@fluentui/style-utilities/lib/utilities/buildClassMap.js");
/* import */ var _styles_index__rspack_import_1 = __webpack_require__(/*! ../styles/index */ "./node_modules/@fluentui/theme/lib/motion/AnimationStyles.js");
/**
* {@docCategory AnimationClassNames}
*/
var AnimationClassNames = (0,_utilities_index__rspack_import_0.buildClassMap)(_styles_index__rspack_import_1.AnimationStyles);
//# sourceMappingURL=AnimationClassNames.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/classNames/ColorClassNames.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/classNames/ColorClassNames.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ColorClassNames: () => (ColorClassNames)
});
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _styles_DefaultPalette__rspack_import_0 = __webpack_require__(/*! ../styles/DefaultPalette */ "./node_modules/@fluentui/theme/lib/colors/DefaultPalette.js");
/* import */ var _styles_index__rspack_import_1 = __webpack_require__(/*! ../styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/theme.js");
var ColorClassNames = {};
for (var colorName in _styles_DefaultPalette__rspack_import_0.DefaultPalette) {
if (_styles_DefaultPalette__rspack_import_0.DefaultPalette.hasOwnProperty(colorName)) {
// Foreground color
_defineGetter(ColorClassNames, colorName, '', false, 'color');
// Hover color
_defineGetter(ColorClassNames, colorName, 'Hover', true, 'color');
// Background color
_defineGetter(ColorClassNames, colorName, 'Background', false, 'background');
// Background hover
_defineGetter(ColorClassNames, colorName, 'BackgroundHover', true, 'background');
// Border color
_defineGetter(ColorClassNames, colorName, 'Border', false, 'borderColor');
// Border hover color
_defineGetter(ColorClassNames, colorName, 'BorderHover', true, 'borderColor');
}
}
/**
* Defines a getter for the given class configuration.
*/
function _defineGetter(obj, colorName, suffix, isHover, cssProperty) {
Object.defineProperty(obj, colorName + suffix, {
get: function () {
var _a;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var style = (_a = {}, _a[cssProperty] = (0,_styles_index__rspack_import_1.getTheme)().palette[colorName], _a);
return (0,_fluentui_merge_styles__rspack_import_2.mergeStyles)(isHover ? { selectors: { ':hover': style } } : style).toString();
},
enumerable: true,
configurable: true,
});
}
//# sourceMappingURL=ColorClassNames.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/classNames/FontClassNames.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/classNames/FontClassNames.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FontClassNames: () => (FontClassNames)
});
/* import */ var _utilities_buildClassMap__rspack_import_0 = __webpack_require__(/*! ../utilities/buildClassMap */ "./node_modules/@fluentui/style-utilities/lib/utilities/buildClassMap.js");
/* import */ var _styles_DefaultFontStyles__rspack_import_1 = __webpack_require__(/*! ../styles/DefaultFontStyles */ "./node_modules/@fluentui/theme/lib/fonts/DefaultFontStyles.js");
/**
* {@docCategory FontClassNames}
*/
var FontClassNames = (0,_utilities_buildClassMap__rspack_import_0.buildClassMap)(_styles_DefaultFontStyles__rspack_import_1.DefaultFontStyles);
//# sourceMappingURL=FontClassNames.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/index.js":
/*!*************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/index.js ***!
\*************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
AnimationClassNames: () => (/* reexport safe */ _classNames_index__rspack_import_0.AnimationClassNames),
AnimationStyles: () => (/* reexport safe */ _styles_index__rspack_import_3.AnimationStyles),
AnimationVariables: () => (/* reexport safe */ _styles_index__rspack_import_3.AnimationVariables),
ColorClassNames: () => (/* reexport safe */ _classNames_index__rspack_import_2.ColorClassNames),
DefaultEffects: () => (/* reexport safe */ _styles_index__rspack_import_5.DefaultEffects),
DefaultFontStyles: () => (/* reexport safe */ _styles_index__rspack_import_6.DefaultFontStyles),
DefaultPalette: () => (/* reexport safe */ _styles_index__rspack_import_4.DefaultPalette),
EdgeChromiumHighContrastSelector: () => (/* reexport safe */ _styles_index__rspack_import_16.EdgeChromiumHighContrastSelector),
FLUENT_CDN_BASE_URL: () => (/* reexport safe */ _cdn__rspack_import_31.FLUENT_CDN_BASE_URL),
FontClassNames: () => (/* reexport safe */ _classNames_index__rspack_import_1.FontClassNames),
FontSizes: () => (/* reexport safe */ _styles_index__rspack_import_7.FontSizes),
FontWeights: () => (/* reexport safe */ _styles_index__rspack_import_7.FontWeights),
HighContrastSelector: () => (/* reexport safe */ _styles_index__rspack_import_16.HighContrastSelector),
HighContrastSelectorBlack: () => (/* reexport safe */ _styles_index__rspack_import_16.HighContrastSelectorBlack),
HighContrastSelectorWhite: () => (/* reexport safe */ _styles_index__rspack_import_16.HighContrastSelectorWhite),
IconFontSizes: () => (/* reexport safe */ _styles_index__rspack_import_7.IconFontSizes),
InjectionMode: () => (/* reexport safe */ _MergeStyles__rspack_import_24.InjectionMode),
PulsingBeaconAnimationStyles: () => (/* reexport safe */ _styles_index__rspack_import_10.PulsingBeaconAnimationStyles),
ScreenWidthMaxLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMaxLarge),
ScreenWidthMaxMedium: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMaxMedium),
ScreenWidthMaxSmall: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMaxSmall),
ScreenWidthMaxXLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMaxXLarge),
ScreenWidthMaxXXLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMaxXXLarge),
ScreenWidthMinLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinLarge),
ScreenWidthMinMedium: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinMedium),
ScreenWidthMinSmall: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinSmall),
ScreenWidthMinUhfMobile: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinUhfMobile),
ScreenWidthMinXLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinXLarge),
ScreenWidthMinXXLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinXXLarge),
ScreenWidthMinXXXLarge: () => (/* reexport safe */ _styles_index__rspack_import_16.ScreenWidthMinXXXLarge),
Stylesheet: () => (/* reexport safe */ _MergeStyles__rspack_import_24.Stylesheet),
ThemeSettingName: () => (/* reexport safe */ _styles_index__rspack_import_14.ThemeSettingName),
ZIndexes: () => (/* reexport safe */ _styles_index__rspack_import_20.ZIndexes),
buildClassMap: () => (/* reexport safe */ _utilities_index__rspack_import_21.buildClassMap),
concatStyleSets: () => (/* reexport safe */ _MergeStyles__rspack_import_25.concatStyleSets),
concatStyleSetsWithProps: () => (/* reexport safe */ _MergeStyles__rspack_import_26.concatStyleSetsWithProps),
createFontStyles: () => (/* reexport safe */ _styles_index__rspack_import_8.createFontStyles),
createTheme: () => (/* reexport safe */ _styles_index__rspack_import_15.createTheme),
focusClear: () => (/* reexport safe */ _styles_index__rspack_import_12.focusClear),
fontFace: () => (/* reexport safe */ _MergeStyles__rspack_import_27.fontFace),
getEdgeChromiumNoHighContrastAdjustSelector: () => (/* reexport safe */ _styles_index__rspack_import_16.getEdgeChromiumNoHighContrastAdjustSelector),
getFadedOverflowStyle: () => (/* reexport safe */ _styles_index__rspack_import_18.getFadedOverflowStyle),
getFocusOutlineStyle: () => (/* reexport safe */ _styles_index__rspack_import_12.getFocusOutlineStyle),
getFocusStyle: () => (/* reexport safe */ _styles_index__rspack_import_12.getFocusStyle),
getGlobalClassNames: () => (/* reexport safe */ _styles_index__rspack_import_11.getGlobalClassNames),
getHighContrastNoAdjustStyle: () => (/* reexport safe */ _styles_index__rspack_import_16.getHighContrastNoAdjustStyle),
getIcon: () => (/* reexport safe */ _utilities_index__rspack_import_22.getIcon),
getIconClassName: () => (/* reexport safe */ _utilities_index__rspack_import_23.getIconClassName),
getInputFocusStyle: () => (/* reexport safe */ _styles_index__rspack_import_12.getInputFocusStyle),
getPlaceholderStyles: () => (/* reexport safe */ _styles_index__rspack_import_19.getPlaceholderStyles),
getScreenSelector: () => (/* reexport safe */ _styles_index__rspack_import_16.getScreenSelector),
getTheme: () => (/* reexport safe */ _styles_index__rspack_import_14.getTheme),
getThemedContext: () => (/* reexport safe */ _styles_index__rspack_import_13.getThemedContext),
hiddenContentStyle: () => (/* reexport safe */ _styles_index__rspack_import_9.hiddenContentStyle),
keyframes: () => (/* reexport safe */ _MergeStyles__rspack_import_28.keyframes),
loadTheme: () => (/* reexport safe */ _styles_index__rspack_import_14.loadTheme),
mergeStyleSets: () => (/* reexport safe */ _MergeStyles__rspack_import_29.mergeStyleSets),
mergeStyles: () => (/* reexport safe */ _MergeStyles__rspack_import_30.mergeStyles),
noWrap: () => (/* reexport safe */ _styles_index__rspack_import_17.noWrap),
normalize: () => (/* reexport safe */ _styles_index__rspack_import_17.normalize),
registerDefaultFontFaces: () => (/* reexport safe */ _styles_index__rspack_import_6.registerDefaultFontFaces),
registerIconAlias: () => (/* reexport safe */ _utilities_index__rspack_import_22.registerIconAlias),
registerIcons: () => (/* reexport safe */ _utilities_index__rspack_import_22.registerIcons),
registerOnThemeChangeCallback: () => (/* reexport safe */ _styles_index__rspack_import_14.registerOnThemeChangeCallback),
removeOnThemeChangeCallback: () => (/* reexport safe */ _styles_index__rspack_import_14.removeOnThemeChangeCallback),
setIconOptions: () => (/* reexport safe */ _utilities_index__rspack_import_22.setIconOptions),
unregisterIcons: () => (/* reexport safe */ _utilities_index__rspack_import_22.unregisterIcons)
});
/* import */ var _classNames_index__rspack_import_0 = __webpack_require__(/*! ./classNames/index */ "./node_modules/@fluentui/style-utilities/lib/classNames/AnimationClassNames.js");
/* import */ var _classNames_index__rspack_import_1 = __webpack_require__(/*! ./classNames/index */ "./node_modules/@fluentui/style-utilities/lib/classNames/FontClassNames.js");
/* import */ var _classNames_index__rspack_import_2 = __webpack_require__(/*! ./classNames/index */ "./node_modules/@fluentui/style-utilities/lib/classNames/ColorClassNames.js");
/* import */ var _styles_index__rspack_import_3 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/motion/AnimationStyles.js");
/* import */ var _styles_index__rspack_import_4 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/colors/DefaultPalette.js");
/* import */ var _styles_index__rspack_import_5 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/effects/DefaultEffects.js");
/* import */ var _styles_index__rspack_import_6 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/fonts/DefaultFontStyles.js");
/* import */ var _styles_index__rspack_import_7 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/fonts/FluentFonts.js");
/* import */ var _styles_index__rspack_import_8 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/fonts/createFontStyles.js");
/* import */ var _styles_index__rspack_import_9 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/hiddenContentStyle.js");
/* import */ var _styles_index__rspack_import_10 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/PulsingBeaconAnimationStyles.js");
/* import */ var _styles_index__rspack_import_11 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/getGlobalClassNames.js");
/* import */ var _styles_index__rspack_import_12 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/getFocusStyle.js");
/* import */ var _styles_index__rspack_import_13 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/scheme.js");
/* import */ var _styles_index__rspack_import_14 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/theme.js");
/* import */ var _styles_index__rspack_import_15 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/theme/lib/createTheme.js");
/* import */ var _styles_index__rspack_import_16 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/CommonStyles.js");
/* import */ var _styles_index__rspack_import_17 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/GeneralStyles.js");
/* import */ var _styles_index__rspack_import_18 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/getFadedOverflowStyle.js");
/* import */ var _styles_index__rspack_import_19 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/getPlaceholderStyles.js");
/* import */ var _styles_index__rspack_import_20 = __webpack_require__(/*! ./styles/index */ "./node_modules/@fluentui/style-utilities/lib/styles/zIndexes.js");
/* import */ var _utilities_index__rspack_import_21 = __webpack_require__(/*! ./utilities/index */ "./node_modules/@fluentui/style-utilities/lib/utilities/buildClassMap.js");
/* import */ var _utilities_index__rspack_import_22 = __webpack_require__(/*! ./utilities/index */ "./node_modules/@fluentui/style-utilities/lib/utilities/icons.js");
/* import */ var _utilities_index__rspack_import_23 = __webpack_require__(/*! ./utilities/index */ "./node_modules/@fluentui/style-utilities/lib/utilities/getIconClassName.js");
/* import */ var _MergeStyles__rspack_import_24 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _MergeStyles__rspack_import_25 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js");
/* import */ var _MergeStyles__rspack_import_26 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSetsWithProps.js");
/* import */ var _MergeStyles__rspack_import_27 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/fontFace.js");
/* import */ var _MergeStyles__rspack_import_28 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/keyframes.js");
/* import */ var _MergeStyles__rspack_import_29 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyleSets.js");
/* import */ var _MergeStyles__rspack_import_30 = __webpack_require__(/*! ./MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _cdn__rspack_import_31 = __webpack_require__(/*! ./cdn */ "./node_modules/@fluentui/style-utilities/lib/cdn.js");
/* import */ var _version__rspack_import_32 = __webpack_require__(/*! ./version */ "./node_modules/@fluentui/style-utilities/lib/version.js");
// Ensure theme is initialized when this package is referenced.
(0,_styles_index__rspack_import_14.initializeThemeInCustomizations)();
//# sourceMappingURL=index.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/CommonStyles.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/CommonStyles.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
EdgeChromiumHighContrastSelector: () => (EdgeChromiumHighContrastSelector),
HighContrastSelector: () => (HighContrastSelector),
HighContrastSelectorBlack: () => (HighContrastSelectorBlack),
HighContrastSelectorWhite: () => (HighContrastSelectorWhite),
ScreenWidthMaxLarge: () => (ScreenWidthMaxLarge),
ScreenWidthMaxMedium: () => (ScreenWidthMaxMedium),
ScreenWidthMaxSmall: () => (ScreenWidthMaxSmall),
ScreenWidthMaxXLarge: () => (ScreenWidthMaxXLarge),
ScreenWidthMaxXXLarge: () => (ScreenWidthMaxXXLarge),
ScreenWidthMinLarge: () => (ScreenWidthMinLarge),
ScreenWidthMinMedium: () => (ScreenWidthMinMedium),
ScreenWidthMinSmall: () => (ScreenWidthMinSmall),
ScreenWidthMinUhfMobile: () => (ScreenWidthMinUhfMobile),
ScreenWidthMinXLarge: () => (ScreenWidthMinXLarge),
ScreenWidthMinXXLarge: () => (ScreenWidthMinXXLarge),
ScreenWidthMinXXXLarge: () => (ScreenWidthMinXXXLarge),
getEdgeChromiumNoHighContrastAdjustSelector: () => (getEdgeChromiumNoHighContrastAdjustSelector),
getHighContrastNoAdjustStyle: () => (getHighContrastNoAdjustStyle),
getScreenSelector: () => (getScreenSelector)
});
var HighContrastSelector = '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';
var HighContrastSelectorWhite =
// eslint-disable-next-line @fluentui/max-len
'@media screen and (-ms-high-contrast: black-on-white), screen and (forced-colors: active) and (prefers-color-scheme: light)';
var HighContrastSelectorBlack =
// eslint-disable-next-line @fluentui/max-len
'@media screen and (-ms-high-contrast: white-on-black), screen and (forced-colors: active) and (prefers-color-scheme: dark)';
/**
* @deprecated Use `HighContrastSelector`
*/
var EdgeChromiumHighContrastSelector = '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';
var ScreenWidthMinSmall = 320;
var ScreenWidthMinMedium = 480;
var ScreenWidthMinLarge = 640;
var ScreenWidthMinXLarge = 1024;
var ScreenWidthMinXXLarge = 1366;
var ScreenWidthMinXXXLarge = 1920;
var ScreenWidthMaxSmall = ScreenWidthMinMedium - 1;
var ScreenWidthMaxMedium = ScreenWidthMinLarge - 1;
var ScreenWidthMaxLarge = ScreenWidthMinXLarge - 1;
var ScreenWidthMaxXLarge = ScreenWidthMinXXLarge - 1;
var ScreenWidthMaxXXLarge = ScreenWidthMinXXXLarge - 1;
var ScreenWidthMinUhfMobile = 768;
function getScreenSelector(min, max) {
var minSelector = typeof min === 'number' ? " and (min-width: ".concat(min, "px)") : '';
var maxSelector = typeof max === 'number' ? " and (max-width: ".concat(max, "px)") : '';
return "@media only screen".concat(minSelector).concat(maxSelector);
}
/**
* The style which turns off high contrast adjustment in browsers.
*/
function getHighContrastNoAdjustStyle() {
return {
forcedColorAdjust: 'none',
MsHighContrastAdjust: 'none',
};
}
/**
* The style which turns off high contrast adjustment in (only) Edge Chromium browser.
* @deprecated Use `getHighContrastNoAdjustStyle`
*/
// eslint-disable-next-line @typescript-eslint/no-deprecated
function getEdgeChromiumNoHighContrastAdjustSelector() {
var _a;
return _a = {},
// eslint-disable-next-line @typescript-eslint/no-deprecated
_a[EdgeChromiumHighContrastSelector] = {
forcedColorAdjust: 'none',
MsHighContrastAdjust: 'none',
},
_a;
}
//# sourceMappingURL=CommonStyles.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/GeneralStyles.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/GeneralStyles.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
noWrap: () => (noWrap),
normalize: () => (normalize)
});
// This file mimics styles and mixins from _General.Mixins.scss
var normalize = {
boxShadow: 'none',
margin: 0,
padding: 0,
boxSizing: 'border-box',
};
var noWrap = {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
};
//# sourceMappingURL=GeneralStyles.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/PulsingBeaconAnimationStyles.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/PulsingBeaconAnimationStyles.js ***!
\*******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PulsingBeaconAnimationStyles: () => (PulsingBeaconAnimationStyles)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/keyframes.js");
var DEFAULT_DURATION = '14s';
var DEFAULT_DELAY = '2s';
var DEFAULT_ITERATION_COUNT = '1';
function _continuousPulseStepOne(beaconColorOne, innerDimension) {
return {
borderColor: beaconColorOne,
borderWidth: '0px',
width: innerDimension,
height: innerDimension,
};
}
function _continuousPulseStepTwo(borderWidth) {
return {
opacity: 1,
borderWidth: borderWidth,
};
}
function _continuousPulseStepThree() {
return {
opacity: 1,
};
}
function _continuousPulseStepFour(beaconColorTwo, outerDimension) {
return {
borderWidth: '0',
width: outerDimension,
height: outerDimension,
opacity: 0,
borderColor: beaconColorTwo,
};
}
function _continuousPulseStepFive(beaconColorOne, innerDimension) {
return (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, _continuousPulseStepOne(beaconColorOne, innerDimension)), {
opacity: 0,
});
}
function _continuousPulseAnimationDouble(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) {
return (0,_fluentui_merge_styles__rspack_import_1.keyframes)({
'0%': _continuousPulseStepOne(beaconColorOne, innerDimension),
'1.42%': _continuousPulseStepTwo(borderWidth),
'3.57%': _continuousPulseStepThree(),
'7.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension),
'8%': _continuousPulseStepFive(beaconColorOne, innerDimension),
'29.99%': _continuousPulseStepFive(beaconColorOne, innerDimension),
'30%': _continuousPulseStepOne(beaconColorOne, innerDimension),
'31.42%': _continuousPulseStepTwo(borderWidth),
'33.57%': _continuousPulseStepThree(),
'37.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension),
'38%': _continuousPulseStepFive(beaconColorOne, innerDimension),
'79.42%': _continuousPulseStepFive(beaconColorOne, innerDimension),
'79.43': _continuousPulseStepOne(beaconColorOne, innerDimension),
'81.85': _continuousPulseStepTwo(borderWidth),
'83.42': _continuousPulseStepThree(),
'87%': _continuousPulseStepFour(beaconColorTwo, outerDimension),
'100%': {},
});
}
function _continuousPulseAnimationSingle(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) {
return (0,_fluentui_merge_styles__rspack_import_1.keyframes)({
'0%': _continuousPulseStepOne(beaconColorOne, innerDimension),
'14.2%': _continuousPulseStepTwo(borderWidth),
'35.7%': _continuousPulseStepThree(),
'71.4%': _continuousPulseStepFour(beaconColorTwo, outerDimension),
'100%': {},
});
}
function _createDefaultAnimation(animationName, delayLength) {
return {
animationName: animationName,
animationIterationCount: DEFAULT_ITERATION_COUNT,
animationDuration: DEFAULT_DURATION,
animationDelay: delayLength || DEFAULT_DELAY,
};
}
var PulsingBeaconAnimationStyles = {
continuousPulseAnimationDouble: _continuousPulseAnimationDouble,
continuousPulseAnimationSingle: _continuousPulseAnimationSingle,
createDefaultAnimation: _createDefaultAnimation,
};
//# sourceMappingURL=PulsingBeaconAnimationStyles.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/getFadedOverflowStyle.js":
/*!************************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/getFadedOverflowStyle.js ***!
\************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getFadedOverflowStyle: () => (getFadedOverflowStyle)
});
var DEFAULT_HEIGHT = '50%';
var DEFAULT_WIDTH = 20;
/**
* - Generates a style used to fade out an overflowing content by defining a style for an :after pseudo element.
* - Apply it to the :after selector for all combination of states the parent of content might have (normal, hover,
* selected, focus).
* - Requires the target to have position set to relative and overflow set to hidden.
*
* @example
* ```tsx
* // Assuming the following DOM structure and the different background colors coming from
* // the parent holding the content.
*
* Overflown Content
*
* ```
* ```ts
* // This is how the style set would look in Component.styles.ts
* const { bodyBackground } = theme.semanticColors;
* const { neutralLighter } = theme.palette;
*
* // The second argument of getFadedOverflowStyle function is a string representing a key of
* // ISemanticColors or IPalette.
*
* const styles = {
* parent: [
* backgroundColor: bodyBackground,
* selectors: {
* '&:hover: {
* backgroundColor: neutralLighter
* },
* '$content:after': {
* ...getFadedOverflowStyle(theme, 'bodyBackground')
* },
* '&:hover $content:after': {
* ...getFadedOverflowStyle(theme, 'neutralLighter')
* }
* }
* ],
* content: [
* width: '100%',
* display: 'inline-block',
* position: 'relative',
* overflow: 'hidden'
* ]
* }
* ```
* @param theme - The theme object to use.
* @param color - The background color to fade out to. Accepts only keys of ISemanticColors or IPalette.
* Defaults to 'bodyBackground'.
* @param direction - The direction of the overflow. Defaults to horizontal.
* @param width - The width of the fading overflow. Vertical direction defaults it to 100% vs 20px when horizontal.
* @param height - The Height of the fading overflow. Vertical direction defaults it to 50% vs 100% when horizontal.
* @returns The style object.
*/
function getFadedOverflowStyle(theme, color, direction, width, height) {
if (color === void 0) { color = 'bodyBackground'; }
if (direction === void 0) { direction = 'horizontal'; }
if (width === void 0) { width = getDefaultValue('width', direction); }
if (height === void 0) { height = getDefaultValue('height', direction); }
// Get the color value string from the theme semanticColors or palette.
var colorValue = theme.semanticColors[color] || theme.palette[color];
// Get the red, green, blue values of the colorValue.
var rgbColor = color2rgb(colorValue);
// Apply opacity 0 to serve as a start color of the gradient.
var rgba = "rgba(".concat(rgbColor.r, ", ").concat(rgbColor.g, ", ").concat(rgbColor.b, ", 0)");
// Get the direction of the gradient. (mergeStyles takes care of RTL direction)
var gradientDirection = direction === 'vertical' ? 'to bottom' : 'to right';
return {
content: '""',
position: 'absolute',
right: 0,
bottom: 0,
width: width,
height: height,
pointerEvents: 'none',
backgroundImage: "linear-gradient(".concat(gradientDirection, ", ").concat(rgba, " 0%, ").concat(colorValue, " 100%)"),
};
}
// TODO consider moving this to a separate module along with some more color functions from OUFR/utilities.
/**
* Helper function to convert a string hex color to an RGB object.
*
* @param colorValue - Color to be converted from hex to rgba.
*/
function color2rgb(colorValue) {
if (colorValue[0] === '#') {
// If it's a hex code
return {
r: parseInt(colorValue.slice(1, 3), 16),
g: parseInt(colorValue.slice(3, 5), 16),
b: parseInt(colorValue.slice(5, 7), 16),
};
}
else if (colorValue.indexOf('rgba(') === 0) {
// If it's an rgba color string
colorValue = colorValue.match(/rgba\(([^)]+)\)/)[1];
var parts = colorValue.split(/ *, */).map(Number);
return {
r: parts[0],
g: parts[1],
b: parts[2],
};
}
// The only remaining possibility is transparent.
return {
r: 255,
g: 255,
b: 255,
};
}
/**
* Helper function to get the default values for parameters of main function.
*
* @param style - Which style to get the default value for.
* @param direction - What direction to take into consideration.
*/
function getDefaultValue(style, direction) {
if (style === 'width') {
return direction === 'horizontal' ? DEFAULT_WIDTH : '100%';
}
else {
return direction === 'vertical' ? DEFAULT_HEIGHT : '100%';
}
}
//# sourceMappingURL=getFadedOverflowStyle.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/getFocusStyle.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/getFocusStyle.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
focusClear: () => (focusClear),
getFocusOutlineStyle: () => (getFocusOutlineStyle),
getFocusStyle: () => (getFocusStyle),
getInputFocusStyle: () => (getInputFocusStyle)
});
/* import */ var _CommonStyles__rspack_import_1 = __webpack_require__(/*! ./CommonStyles */ "./node_modules/@fluentui/style-utilities/lib/styles/CommonStyles.js");
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
/* import */ var _zIndexes__rspack_import_0 = __webpack_require__(/*! ./zIndexes */ "./node_modules/@fluentui/style-utilities/lib/styles/zIndexes.js");
function getFocusStyle(theme, insetOrOptions, position, highContrastStyle, borderColor, outlineColor, isFocusedOnly, borderRadius) {
if (typeof insetOrOptions === 'number' || !insetOrOptions) {
return _getFocusStyleInternal(theme, {
inset: insetOrOptions,
position: position,
highContrastStyle: highContrastStyle,
borderColor: borderColor,
outlineColor: outlineColor,
isFocusedOnly: isFocusedOnly,
borderRadius: borderRadius,
});
}
else {
return _getFocusStyleInternal(theme, insetOrOptions);
}
}
function _getFocusStyleInternal(theme, options) {
var _a, _b;
if (options === void 0) { options = {}; }
var borderRadius = options.borderRadius, _c = options.inset, inset = _c === void 0 ? 0 : _c, _d = options.width, width = _d === void 0 ? 1 : _d, _e = options.position, position = _e === void 0 ? 'relative' : _e, highContrastStyle = options.highContrastStyle, _f = options.borderColor, borderColor = _f === void 0 ? theme.palette.white : _f, _g = options.outlineColor, outlineColor = _g === void 0 ? theme.palette.neutralSecondary : _g, _h = options.isFocusedOnly, isFocusedOnly = _h === void 0 ? true : _h, pointerEvents = options.pointerEvents;
return {
// Clear browser-specific focus styles and use 'transparent' as placeholder for focus style.
outline: 'transparent',
// Requirement because pseudo-element is absolutely positioned.
position: position,
selectors: (_a = {
// Clear the focus border in Firefox.
// Reference: http://stackoverflow.com/a/199319/1436671
'::-moz-focus-inner': {
border: '0',
}
},
// When the element that uses this mixin is in a :focus state, add a pseudo-element to
// create a border.
_a[".".concat(_fluentui_utilities__rspack_import_2.IsFocusVisibleClassName, " &").concat(isFocusedOnly ? ':focus' : '', ":after, :host(.").concat(_fluentui_utilities__rspack_import_2.IsFocusVisibleClassName, ") &").concat(isFocusedOnly ? ':focus' : '', ":after")] = {
content: '""',
position: 'absolute',
pointerEvents: pointerEvents,
left: inset + 1,
top: inset + 1,
bottom: inset + 1,
right: inset + 1,
border: "".concat(width, "px solid ").concat(borderColor),
outline: "".concat(width, "px solid ").concat(outlineColor),
zIndex: _zIndexes__rspack_import_0.ZIndexes.FocusStyle,
borderRadius: borderRadius,
selectors: (_b = {},
_b[_CommonStyles__rspack_import_1.HighContrastSelector] = highContrastStyle,
_b),
},
_a),
};
}
/**
* Generates style to clear browser specific focus styles.
*/
function focusClear() {
return {
selectors: {
'&::-moz-focus-inner': {
// Clear the focus border in Firefox. Reference: http://stackoverflow.com/a/199319/1436671
border: 0,
},
'&': {
// Clear browser specific focus styles and use transparent as placeholder for focus style
outline: 'transparent',
},
},
};
}
/**
* Generates a style which can be used to set a border on focus.
*
* @param theme - The theme object to use.
* @param inset - The number of pixels to inset the border (default 0)
* @param width - The border width in pixels (default 1)
* @param color - Color of the outline (default `theme.palette.neutralSecondary`)
* @returns The style object.
*/
function getFocusOutlineStyle(theme, inset, width, color) {
var _a;
if (inset === void 0) { inset = 0; }
if (width === void 0) { width = 1; }
return {
selectors: (_a = {},
_a[":global(".concat(_fluentui_utilities__rspack_import_2.IsFocusVisibleClassName, ") &:focus")] = {
outline: "".concat(width, " solid ").concat(color || theme.palette.neutralSecondary),
outlineOffset: "".concat(-inset, "px"),
},
_a),
};
}
/**
* Generates text input border styles on focus.
*
* @param borderColor - Color of the border.
* @param borderRadius - Radius of the border.
* @param borderType - Type of the border.
* @param borderPosition - Position of the border relative to the input element (default to -1
* as it's the most common border width of the input element)
* @returns The style object.
*/
var getInputFocusStyle = function (borderColor, borderRadius, borderType, borderPosition) {
var _a, _b, _c;
if (borderType === void 0) { borderType = 'border'; }
if (borderPosition === void 0) { borderPosition = -1; }
var isBorderBottom = borderType === 'borderBottom';
return {
borderColor: borderColor,
selectors: {
':after': (_a = {
pointerEvents: 'none',
content: "''",
position: 'absolute',
left: isBorderBottom ? 0 : borderPosition,
top: borderPosition,
bottom: borderPosition,
right: isBorderBottom ? 0 : borderPosition
},
_a[borderType] = "2px solid ".concat(borderColor),
_a.borderRadius = borderRadius,
_a.width = borderType === 'borderBottom' ? '100%' : undefined,
_a.selectors = (_b = {},
_b[_CommonStyles__rspack_import_1.HighContrastSelector] = (_c = {},
_c[borderType === 'border' ? 'borderColor' : 'borderBottomColor'] = 'Highlight',
_c),
_b),
_a),
},
};
};
//# sourceMappingURL=getFocusStyle.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/getGlobalClassNames.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/getGlobalClassNames.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getGlobalClassNames: () => (getGlobalClassNames)
});
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _fluentui_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/memoize.js");
/**
* Internal memoized function which simply takes in the class map and the
* disable boolean. These immutable values can be memoized.
*/
var _getGlobalClassNames = (0,_fluentui_utilities__rspack_import_0.memoizeFunction)(function (classNames, disableGlobalClassNames) {
var styleSheet = _fluentui_merge_styles__rspack_import_1.Stylesheet.getInstance();
if (disableGlobalClassNames) {
// disable global classnames
return Object.keys(classNames).reduce(function (acc, className) {
acc[className] = styleSheet.getClassName(classNames[className]);
return acc;
}, {});
}
// use global classnames
return classNames;
});
/**
* Checks for the `disableGlobalClassNames` property on the `theme` to determine if it should return `classNames`
* Note that calls to this function are memoized.
*
* @param classNames - The collection of global class names that apply when the flag is false. Make sure to pass in
* the same instance on each call to benefit from memoization.
* @param theme - The theme to check the flag on
* @param disableGlobalClassNames - Optional. Explicitly opt in/out of disabling global classnames. Defaults to false.
*/
function getGlobalClassNames(classNames, theme, disableGlobalClassNames) {
return _getGlobalClassNames(classNames, disableGlobalClassNames !== undefined ? disableGlobalClassNames : theme.disableGlobalClassNames);
}
//# sourceMappingURL=getGlobalClassNames.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/getPlaceholderStyles.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/getPlaceholderStyles.js ***!
\***********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getPlaceholderStyles: () => (getPlaceholderStyles)
});
/**
* Generates placeholder style for each of the browsers supported by `@fluentui/react`.
* @param styles - The style to use.
* @returns The placeholder style object for each browser depending on the placeholder directive it uses.
*/
function getPlaceholderStyles(styles) {
return {
selectors: {
'::placeholder': styles, // Chrome, Safari, Opera, Firefox
':-ms-input-placeholder': styles, // IE 10+
'::-ms-input-placeholder': styles, // Edge
},
};
}
//# sourceMappingURL=getPlaceholderStyles.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/hiddenContentStyle.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/hiddenContentStyle.js ***!
\*********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
hiddenContentStyle: () => (hiddenContentStyle)
});
var hiddenContentStyle = {
position: 'absolute',
width: 1,
height: 1,
margin: -1,
padding: 0,
border: 0,
overflow: 'hidden',
whiteSpace: 'nowrap',
};
//# sourceMappingURL=hiddenContentStyle.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/scheme.js":
/*!*********************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/scheme.js ***!
\*********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getThemedContext: () => (getThemedContext)
});
/* import */ var _fluentui_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/customizations/mergeSettings.js");
/**
* @internal
* This function is still in experimental phase in support of Foundation experimental development.
* Its API signature and existence are subject to change.
*
* Modify context to activate the specified scheme or theme. For schemes, look in context (if available) and fall back
* to global Customizations. If both scheme and theme are specified, scheme will be looked up in theme. In this case,
* scheme must be present in theme arg, otherwise new context will default to theme arg (there is no fallback to
* settings to look up scheme.)
*
* @param context - Context in which to get schemed customizations.
* @param scheme - Scheme to get customizations for from theme arg (if supplied) OR from context and global settings.
* @param theme - Theme to merge into context.
* @returns modified schemed context if scheme is valid and not already applied, unmodified context otherwise.
*/
function getThemedContext(context, scheme, theme) {
var newContext = context;
var newSettings;
// Only fall back to context and customizations when theme arg is not provided.
var schemeSource = theme || _fluentui_utilities__rspack_import_0.Customizations.getSettings(['theme'], undefined, context.customizations).theme;
if (theme) {
newSettings = { theme: theme };
}
var schemeTheme = scheme && schemeSource && schemeSource.schemes && schemeSource.schemes[scheme];
// These first two checks are logically redundant but TS doesn't infer schemeSource.schemes is defined
// when schemeTheme is defined.
if (schemeSource && schemeTheme && schemeSource !== schemeTheme) {
newSettings = { theme: schemeTheme };
newSettings.theme.schemes = schemeSource.schemes;
}
if (newSettings) {
newContext = {
customizations: {
settings: (0,_fluentui_utilities__rspack_import_1.mergeSettings)(context.customizations.settings, newSettings),
scopedSettings: context.customizations.scopedSettings,
},
};
}
return newContext;
}
//# sourceMappingURL=scheme.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/theme.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/theme.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ThemeSettingName: () => (ThemeSettingName),
createTheme: () => (/* reexport safe */ _fluentui_theme__rspack_import_1.createTheme),
getTheme: () => (getTheme),
initializeThemeInCustomizations: () => (initializeThemeInCustomizations),
loadTheme: () => (loadTheme),
registerOnThemeChangeCallback: () => (registerOnThemeChangeCallback),
removeOnThemeChangeCallback: () => (removeOnThemeChangeCallback)
});
/* import */ var tslib__rspack_import_4 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_utilities__rspack_import_2 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _fluentui_utilities__rspack_import_3 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _microsoft_load_themed_styles__rspack_import_0 = __webpack_require__(/*! @microsoft/load-themed-styles */ "./node_modules/@microsoft/load-themed-styles/lib-es6/index.js");
/* import */ var _fluentui_theme__rspack_import_1 = __webpack_require__(/*! @fluentui/theme */ "./node_modules/@fluentui/theme/lib/createTheme.js");
var _theme = (0,_fluentui_theme__rspack_import_1.createTheme)({});
var _onThemeChangeCallbacks = [];
var ThemeSettingName = 'theme';
function initializeThemeInCustomizations() {
var _a;
var _b, _c;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var win = (0,_fluentui_utilities__rspack_import_2.getWindow)();
if ((_b = win === null || win === void 0 ? void 0 : win.FabricConfig) === null || _b === void 0 ? void 0 : _b.legacyTheme) {
// does everything the `else` clause does and more, such as invoke legacy theming
loadTheme(win.FabricConfig.legacyTheme);
}
else if (!_fluentui_utilities__rspack_import_3.Customizations.getSettings([ThemeSettingName]).theme) {
if ((_c = win === null || win === void 0 ? void 0 : win.FabricConfig) === null || _c === void 0 ? void 0 : _c.theme) {
_theme = (0,_fluentui_theme__rspack_import_1.createTheme)(win.FabricConfig.theme);
}
// Set the default theme.
_fluentui_utilities__rspack_import_3.Customizations.applySettings((_a = {}, _a[ThemeSettingName] = _theme, _a));
}
}
initializeThemeInCustomizations();
/**
* Gets the theme object
* @param depComments - Whether to include deprecated tags as comments for deprecated slots.
*/
function getTheme(depComments) {
if (depComments === void 0) { depComments = false; }
if (depComments === true) {
_theme = (0,_fluentui_theme__rspack_import_1.createTheme)({}, depComments);
}
return _theme;
}
/**
* Registers a callback that gets called whenever the theme changes.
* This should only be used when the component cannot automatically get theme changes through its state.
* This will not register duplicate callbacks.
*/
function registerOnThemeChangeCallback(callback) {
if (_onThemeChangeCallbacks.indexOf(callback) === -1) {
_onThemeChangeCallbacks.push(callback);
}
}
/**
* See registerOnThemeChangeCallback().
* Removes previously registered callbacks.
*/
function removeOnThemeChangeCallback(callback) {
var i = _onThemeChangeCallbacks.indexOf(callback);
if (i === -1) {
return;
}
_onThemeChangeCallbacks.splice(i, 1);
}
/**
* Applies the theme, while filling in missing slots.
* @param theme - Partial theme object.
* @param depComments - Whether to include deprecated tags as comments for deprecated slots.
*/
function loadTheme(theme, depComments) {
var _a;
if (depComments === void 0) { depComments = false; }
_theme = (0,_fluentui_theme__rspack_import_1.createTheme)(theme, depComments);
// Invoke the legacy method of theming the page as well.
(0,_microsoft_load_themed_styles__rspack_import_0.loadTheme)((0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)((0,tslib__rspack_import_4.__assign)({}, _theme.palette), _theme.semanticColors), _theme.effects), _loadFonts(_theme)));
_fluentui_utilities__rspack_import_3.Customizations.applySettings((_a = {}, _a[ThemeSettingName] = _theme, _a));
_onThemeChangeCallbacks.forEach(function (callback) {
try {
callback(_theme);
}
catch (e) {
// don't let a bad callback break everything else
}
});
return _theme;
}
/**
* Loads font variables into a JSON object.
* @param theme - The theme object
*/
function _loadFonts(theme) {
var lines = {};
for (var _i = 0, _a = Object.keys(theme.fonts); _i < _a.length; _i++) {
var fontName = _a[_i];
var font = theme.fonts[fontName];
for (var _b = 0, _c = Object.keys(font); _b < _c.length; _b++) {
var propName = _c[_b];
var name_1 = fontName + propName.charAt(0).toUpperCase() + propName.slice(1);
var value = font[propName];
if (propName === 'fontSize' && typeof value === 'number') {
// if it's a number, convert it to px by default like our theming system does
value = value + 'px';
}
lines[name_1] = value;
}
}
return lines;
}
//# sourceMappingURL=theme.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/styles/zIndexes.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/styles/zIndexes.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ZIndexes: () => (ZIndexes)
});
var ZIndexes;
(function (ZIndexes) {
ZIndexes.Nav = 1;
/**
* @deprecated Do not use
*/
ZIndexes.ScrollablePane = 1;
ZIndexes.FocusStyle = 1;
ZIndexes.Coachmark = 1000;
ZIndexes.Layer = 1000000;
ZIndexes.KeytipLayer = 1000001;
})(ZIndexes || (ZIndexes = {}));
//# sourceMappingURL=zIndexes.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/utilities/buildClassMap.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/utilities/buildClassMap.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
buildClassMap: () => (buildClassMap)
});
/* import */ var _MergeStyles__rspack_import_0 = __webpack_require__(/*! ../MergeStyles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/**
* Builds a class names object from a given map.
*
* @param styles - Map of unprocessed styles.
* @returns Map of property name to class name.
*/
function buildClassMap(styles) {
var classes = {};
var _loop_1 = function (styleName) {
if (styles.hasOwnProperty(styleName)) {
var className_1;
Object.defineProperty(classes, styleName, {
get: function () {
if (className_1 === undefined) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
className_1 = (0,_MergeStyles__rspack_import_0.mergeStyles)(styles[styleName]).toString();
}
return className_1;
},
enumerable: true,
configurable: true,
});
}
};
for (var styleName in styles) {
_loop_1(styleName);
}
return classes;
}
//# sourceMappingURL=buildClassMap.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/utilities/getIconClassName.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/utilities/getIconClassName.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getIconClassName: () => (getIconClassName)
});
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _icons__rspack_import_0 = __webpack_require__(/*! ./icons */ "./node_modules/@fluentui/style-utilities/lib/utilities/icons.js");
var defaultIconStyles = {
display: 'inline-block',
};
/**
* Gets an icon classname. You should be able to add this classname to an I tag with no
* additional classnames, and render the icon.
*
* @public
*/
function getIconClassName(name) {
var className = '';
var icon = (0,_icons__rspack_import_0.getIcon)(name);
if (icon) {
className = (0,_fluentui_merge_styles__rspack_import_1.mergeStyles)(icon.subset.className, defaultIconStyles, {
selectors: {
'::before': {
content: "\"".concat(icon.code, "\""),
},
},
});
}
return className;
}
//# sourceMappingURL=getIconClassName.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/utilities/icons.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/utilities/icons.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getIcon: () => (getIcon),
registerIconAlias: () => (registerIconAlias),
registerIcons: () => (registerIcons),
setIconOptions: () => (setIconOptions),
unregisterIcons: () => (unregisterIcons)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _fluentui_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/GlobalSettings.js");
/* import */ var _fluentui_utilities__rspack_import_3 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _fluentui_merge_styles__rspack_import_4 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/fontFace.js");
/* import */ var _fluentui_merge_styles__rspack_import_5 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
var ICON_SETTING_NAME = 'icons';
var _iconSettings = _fluentui_utilities__rspack_import_0.GlobalSettings.getValue(ICON_SETTING_NAME, {
__options: {
disableWarnings: false,
warnOnMissingIcons: true,
},
__remapped: {},
});
// Reset icon registration on stylesheet resets.
var stylesheet = _fluentui_merge_styles__rspack_import_1.Stylesheet.getInstance();
if (stylesheet && stylesheet.onReset) {
stylesheet.onReset(function () {
for (var name_1 in _iconSettings) {
if (_iconSettings.hasOwnProperty(name_1) && !!_iconSettings[name_1].subset) {
_iconSettings[name_1].subset.className = undefined;
}
}
});
}
/**
* Normalizes an icon name for consistent mapping.
* Current implementation is to convert the icon name to lower case.
*
* @param name - Icon name to normalize.
* @returns {string} Normalized icon name to use for indexing and mapping.
*/
var normalizeIconName = function (name) { return name.toLowerCase(); };
/**
* Registers a given subset of icons.
*
* @param iconSubset - the icon subset definition.
*/
function registerIcons(iconSubset, options) {
var subset = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, iconSubset), { isRegistered: false, className: undefined });
var icons = iconSubset.icons;
// Grab options, optionally mix user provided ones on top.
options = options ? (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, _iconSettings.__options), options) : _iconSettings.__options;
for (var iconName in icons) {
if (icons.hasOwnProperty(iconName)) {
var code = icons[iconName];
var normalizedIconName = normalizeIconName(iconName);
if (_iconSettings[normalizedIconName]) {
_warnDuplicateIcon(iconName);
}
else {
_iconSettings[normalizedIconName] = {
code: code,
subset: subset,
};
}
}
}
}
/**
* Unregisters icons by name.
*
* @param iconNames - List of icons to unregister.
*/
function unregisterIcons(iconNames) {
var options = _iconSettings.__options;
var _loop_1 = function (iconName) {
var normalizedIconName = normalizeIconName(iconName);
if (_iconSettings[normalizedIconName]) {
delete _iconSettings[normalizedIconName];
}
else {
// Warn that we are trying to delete an icon that doesn't exist
if (!options.disableWarnings) {
(0,_fluentui_utilities__rspack_import_3.warn)("The icon \"".concat(iconName, "\" tried to unregister but was not registered."));
}
}
// Delete any aliases for this iconName
if (_iconSettings.__remapped[normalizedIconName]) {
delete _iconSettings.__remapped[normalizedIconName];
}
// Delete any items that were an alias for this iconName
Object.keys(_iconSettings.__remapped).forEach(function (key) {
if (_iconSettings.__remapped[key] === normalizedIconName) {
delete _iconSettings.__remapped[key];
}
});
};
for (var _i = 0, iconNames_1 = iconNames; _i < iconNames_1.length; _i++) {
var iconName = iconNames_1[_i];
_loop_1(iconName);
}
}
/**
* Remaps one icon name to another.
*/
function registerIconAlias(iconName, mappedToName) {
_iconSettings.__remapped[normalizeIconName(iconName)] = normalizeIconName(mappedToName);
}
/**
* Gets an icon definition. If an icon is requested but the subset has yet to be registered,
* it will get registered immediately.
*
* @public
* @param name - Name of icon.
*/
function getIcon(name) {
var icon = undefined;
var options = _iconSettings.__options;
name = name ? normalizeIconName(name) : '';
name = _iconSettings.__remapped[name] || name;
if (name) {
icon = _iconSettings[name];
if (icon) {
var subset = icon.subset;
if (subset && subset.fontFace) {
if (!subset.isRegistered) {
(0,_fluentui_merge_styles__rspack_import_4.fontFace)(subset.fontFace);
subset.isRegistered = true;
}
if (!subset.className) {
subset.className = (0,_fluentui_merge_styles__rspack_import_5.mergeStyles)(subset.style, {
fontFamily: subset.fontFace.fontFamily,
fontWeight: subset.fontFace.fontWeight || 'normal',
fontStyle: subset.fontFace.fontStyle || 'normal',
});
}
}
}
else {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (!options.disableWarnings && options.warnOnMissingIcons) {
(0,_fluentui_utilities__rspack_import_3.warn)("The icon \"".concat(name, "\" was used but not registered. See https://github.com/microsoft/fluentui/wiki/Using-icons for more information."));
}
}
}
return icon;
}
/**
* Sets the icon options.
*
* @public
*/
function setIconOptions(options) {
_iconSettings.__options = (0,tslib__rspack_import_2.__assign)((0,tslib__rspack_import_2.__assign)({}, _iconSettings.__options), options);
}
var _missingIcons = [];
var _missingIconsTimer = undefined;
function _warnDuplicateIcon(iconName) {
var options = _iconSettings.__options;
var warningDelay = 2000;
var maxIconsInMessage = 10;
if (!options.disableWarnings) {
_missingIcons.push(iconName);
if (_missingIconsTimer === undefined) {
_missingIconsTimer = setTimeout(function () {
(0,_fluentui_utilities__rspack_import_3.warn)("Some icons were re-registered. Applications should only call registerIcons for any given " +
"icon once. Redefining what an icon is may have unintended consequences. Duplicates " +
"include: \n" +
_missingIcons.slice(0, maxIconsInMessage).join(', ') +
(_missingIcons.length > maxIconsInMessage ? " (+ ".concat(_missingIcons.length - maxIconsInMessage, " more)") : ''));
_missingIconsTimer = undefined;
_missingIcons = [];
}, warningDelay);
}
}
}
//# sourceMappingURL=icons.js.map
}),
"./node_modules/@fluentui/style-utilities/lib/version.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/style-utilities/lib/version.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* import */ var _fluentui_set_version__rspack_import_0 = __webpack_require__(/*! @fluentui/set-version */ "./node_modules/@fluentui/set-version/lib/index.js");
// Do not modify this file; it is generated as part of publish.
// The checked in version is a placeholder only and will not be updated.
(0,_fluentui_set_version__rspack_import_0.setVersion)('@fluentui/style-utilities', '8.13.5');
//# sourceMappingURL=version.js.map
}),
"./node_modules/@fluentui/theme/lib/colors/DefaultPalette.js":
/*!*******************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/colors/DefaultPalette.js ***!
\*******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DefaultPalette: () => (DefaultPalette)
});
// When adding or removing a color, make sure you keep this consistent with IColorClassNames
// by adding the color variants.
var DefaultPalette = {
themeDarker: '#004578',
themeDark: '#005a9e',
themeDarkAlt: '#106ebe',
themePrimary: '#0078d4',
themeSecondary: '#2b88d8',
themeTertiary: '#71afe5',
themeLight: '#c7e0f4',
themeLighter: '#deecf9',
themeLighterAlt: '#eff6fc',
black: '#000000',
blackTranslucent40: 'rgba(0,0,0,.4)',
neutralDark: '#201f1e',
neutralPrimary: '#323130',
neutralPrimaryAlt: '#3b3a39',
neutralSecondary: '#605e5c',
neutralSecondaryAlt: '#8a8886',
neutralTertiary: '#a19f9d',
neutralTertiaryAlt: '#c8c6c4',
neutralQuaternary: '#d2d0ce',
neutralQuaternaryAlt: '#e1dfdd',
neutralLight: '#edebe9',
neutralLighter: '#f3f2f1',
neutralLighterAlt: '#faf9f8',
accent: '#0078d4',
white: '#ffffff',
whiteTranslucent40: 'rgba(255,255,255,.4)',
yellowDark: '#d29200',
yellow: '#ffb900',
yellowLight: '#fff100',
orange: '#d83b01',
orangeLight: '#ea4300',
orangeLighter: '#ff8c00',
redDark: '#a4262c',
red: '#e81123',
magentaDark: '#5c005c',
magenta: '#b4009e',
magentaLight: '#e3008c',
purpleDark: '#32145a',
purple: '#5c2d91',
purpleLight: '#b4a0ff',
blueDark: '#002050',
blueMid: '#00188f',
blue: '#0078d4',
blueLight: '#00bcf2',
tealDark: '#004b50',
teal: '#008272',
tealLight: '#00b294',
greenDark: '#004b1c',
green: '#107c10',
greenLight: '#bad80a',
};
//# sourceMappingURL=DefaultPalette.js.map
}),
"./node_modules/@fluentui/theme/lib/createTheme.js":
/*!*********************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/createTheme.js ***!
\*********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createTheme: () => (createTheme)
});
/* import */ var _colors_index__rspack_import_0 = __webpack_require__(/*! ./colors/index */ "./node_modules/@fluentui/theme/lib/colors/DefaultPalette.js");
/* import */ var _effects_index__rspack_import_1 = __webpack_require__(/*! ./effects/index */ "./node_modules/@fluentui/theme/lib/effects/DefaultEffects.js");
/* import */ var _fonts_index__rspack_import_2 = __webpack_require__(/*! ./fonts/index */ "./node_modules/@fluentui/theme/lib/fonts/DefaultFontStyles.js");
/* import */ var _mergeThemes__rspack_import_5 = __webpack_require__(/*! ./mergeThemes */ "./node_modules/@fluentui/theme/lib/mergeThemes.js");
/* import */ var _spacing_index__rspack_import_3 = __webpack_require__(/*! ./spacing/index */ "./node_modules/@fluentui/theme/lib/spacing/DefaultSpacing.js");
/* import */ var _utilities_makeSemanticColors__rspack_import_4 = __webpack_require__(/*! ./utilities/makeSemanticColors */ "./node_modules/@fluentui/theme/lib/utilities/makeSemanticColors.js");
/**
* Creates a custom theme definition.
* @param theme - Partial theme object.
* @param depComments - Whether to include deprecated tags as comments for deprecated slots.
*/
function createTheme(theme, depComments) {
if (theme === void 0) { theme = {}; }
if (depComments === void 0) { depComments = false; }
var isInverted = !!theme.isInverted;
var baseTheme = {
palette: _colors_index__rspack_import_0.DefaultPalette,
effects: _effects_index__rspack_import_1.DefaultEffects,
fonts: _fonts_index__rspack_import_2.DefaultFontStyles,
spacing: _spacing_index__rspack_import_3.DefaultSpacing,
isInverted: isInverted,
disableGlobalClassNames: false,
semanticColors: (0,_utilities_makeSemanticColors__rspack_import_4.makeSemanticColors)(_colors_index__rspack_import_0.DefaultPalette, _effects_index__rspack_import_1.DefaultEffects, undefined, isInverted, depComments),
rtl: undefined,
};
return (0,_mergeThemes__rspack_import_5.mergeThemes)(baseTheme, theme);
}
//# sourceMappingURL=createTheme.js.map
}),
"./node_modules/@fluentui/theme/lib/effects/DefaultEffects.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/effects/DefaultEffects.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DefaultEffects: () => (DefaultEffects)
});
/* import */ var _FluentDepths__rspack_import_0 = __webpack_require__(/*! ./FluentDepths */ "./node_modules/@fluentui/theme/lib/effects/FluentDepths.js");
var DefaultEffects = {
elevation4: _FluentDepths__rspack_import_0.Depths.depth4,
elevation8: _FluentDepths__rspack_import_0.Depths.depth8,
elevation16: _FluentDepths__rspack_import_0.Depths.depth16,
elevation64: _FluentDepths__rspack_import_0.Depths.depth64,
roundedCorner2: '2px',
roundedCorner4: '4px',
roundedCorner6: '6px',
};
//# sourceMappingURL=DefaultEffects.js.map
}),
"./node_modules/@fluentui/theme/lib/effects/FluentDepths.js":
/*!******************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/effects/FluentDepths.js ***!
\******************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Depths: () => (Depths)
});
var Depths;
(function (Depths) {
Depths.depth0 = '0 0 0 0 transparent';
Depths.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)';
Depths.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)';
Depths.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)';
Depths.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)';
})(Depths || (Depths = {}));
//# sourceMappingURL=FluentDepths.js.map
}),
"./node_modules/@fluentui/theme/lib/fonts/DefaultFontStyles.js":
/*!*********************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/fonts/DefaultFontStyles.js ***!
\*********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DefaultFontStyles: () => (DefaultFontStyles),
registerDefaultFontFaces: () => (registerDefaultFontFaces)
});
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/fontFace.js");
/* import */ var _FluentFonts__rspack_import_3 = __webpack_require__(/*! ./FluentFonts */ "./node_modules/@fluentui/theme/lib/fonts/FluentFonts.js");
/* import */ var _createFontStyles__rspack_import_0 = __webpack_require__(/*! ./createFontStyles */ "./node_modules/@fluentui/theme/lib/fonts/createFontStyles.js");
/* import */ var _fluentui_utilities__rspack_import_1 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/language.js");
/* import */ var _fluentui_utilities__rspack_import_4 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
// Default urls.
var DefaultBaseUrl = 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets';
// Standard font styling.
var DefaultFontStyles = (0,_createFontStyles__rspack_import_0.createFontStyles)((0,_fluentui_utilities__rspack_import_1.getLanguage)());
function _registerFontFace(fontFamily, url, fontWeight, localFontName) {
fontFamily = "'".concat(fontFamily, "'");
var localFontSrc = localFontName !== undefined ? "local('".concat(localFontName, "'),") : '';
(0,_fluentui_merge_styles__rspack_import_2.fontFace)({
fontFamily: fontFamily,
src: localFontSrc + "url('".concat(url, ".woff2') format('woff2'),") + "url('".concat(url, ".woff') format('woff')"),
fontWeight: fontWeight,
fontStyle: 'normal',
fontDisplay: 'swap',
});
}
function _registerFontFaceSet(baseUrl, fontFamily, cdnFolder, cdnFontName, localFontName) {
if (cdnFontName === void 0) { cdnFontName = 'segoeui'; }
var urlBase = "".concat(baseUrl, "/").concat(cdnFolder, "/").concat(cdnFontName);
_registerFontFace(fontFamily, urlBase + '-light', _FluentFonts__rspack_import_3.FontWeights.light, localFontName && localFontName + ' Light');
_registerFontFace(fontFamily, urlBase + '-semilight', _FluentFonts__rspack_import_3.FontWeights.semilight, localFontName && localFontName + ' SemiLight');
_registerFontFace(fontFamily, urlBase + '-regular', _FluentFonts__rspack_import_3.FontWeights.regular, localFontName);
_registerFontFace(fontFamily, urlBase + '-semibold', _FluentFonts__rspack_import_3.FontWeights.semibold, localFontName && localFontName + ' SemiBold');
_registerFontFace(fontFamily, urlBase + '-bold', _FluentFonts__rspack_import_3.FontWeights.bold, localFontName && localFontName + ' Bold');
}
function registerDefaultFontFaces(baseUrl) {
if (baseUrl) {
var fontUrl = "".concat(baseUrl, "/fonts");
// Produce @font-face definitions for all supported web fonts.
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Thai, 'leelawadeeui-thai', 'leelawadeeui');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Arabic, 'segoeui-arabic');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Cyrillic, 'segoeui-cyrillic');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.EastEuropean, 'segoeui-easteuropean');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Greek, 'segoeui-greek');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Hebrew, 'segoeui-hebrew');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Vietnamese, 'segoeui-vietnamese');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.WestEuropean, 'segoeui-westeuropean', 'segoeui', 'Segoe UI');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontFamilies.Selawik, 'selawik', 'selawik');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Armenian, 'segoeui-armenian');
_registerFontFaceSet(fontUrl, _FluentFonts__rspack_import_3.LocalizedFontNames.Georgian, 'segoeui-georgian');
// Leelawadee UI (Thai) does not have a 'light' weight, so we override
// the font-face generated above to use the 'semilight' weight instead.
_registerFontFace('Leelawadee UI Web', "".concat(fontUrl, "/leelawadeeui-thai/leelawadeeui-semilight"), _FluentFonts__rspack_import_3.FontWeights.light);
// Leelawadee UI (Thai) does not have a 'semibold' weight, so we override
// the font-face generated above to use the 'bold' weight instead.
_registerFontFace('Leelawadee UI Web', "".concat(fontUrl, "/leelawadeeui-thai/leelawadeeui-bold"), _FluentFonts__rspack_import_3.FontWeights.semibold);
}
}
/**
* Reads the fontBaseUrl from window.FabricConfig.fontBaseUrl or falls back to a default.
*/
function _getFontBaseUrl() {
var _a, _b;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var fabricConfig = (_a = (0,_fluentui_utilities__rspack_import_4.getWindow)()) === null || _a === void 0 ? void 0 : _a.FabricConfig;
return (_b = fabricConfig === null || fabricConfig === void 0 ? void 0 : fabricConfig.fontBaseUrl) !== null && _b !== void 0 ? _b : DefaultBaseUrl;
}
/**
* Register the font faces.
*/
registerDefaultFontFaces(_getFontBaseUrl());
//# sourceMappingURL=DefaultFontStyles.js.map
}),
"./node_modules/@fluentui/theme/lib/fonts/FluentFonts.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/fonts/FluentFonts.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FontSizes: () => (FontSizes),
FontWeights: () => (FontWeights),
IconFontSizes: () => (IconFontSizes),
LocalizedFontFamilies: () => (LocalizedFontFamilies),
LocalizedFontNames: () => (LocalizedFontNames)
});
// Font face names to be registered.
var LocalizedFontNames;
(function (LocalizedFontNames) {
LocalizedFontNames.Arabic = 'Segoe UI Web (Arabic)';
LocalizedFontNames.Cyrillic = 'Segoe UI Web (Cyrillic)';
LocalizedFontNames.EastEuropean = 'Segoe UI Web (East European)';
LocalizedFontNames.Greek = 'Segoe UI Web (Greek)';
LocalizedFontNames.Hebrew = 'Segoe UI Web (Hebrew)';
LocalizedFontNames.Thai = 'Leelawadee UI Web';
LocalizedFontNames.Vietnamese = 'Segoe UI Web (Vietnamese)';
LocalizedFontNames.WestEuropean = 'Segoe UI Web (West European)';
LocalizedFontNames.Selawik = 'Selawik Web';
LocalizedFontNames.Armenian = 'Segoe UI Web (Armenian)';
LocalizedFontNames.Georgian = 'Segoe UI Web (Georgian)';
})(LocalizedFontNames || (LocalizedFontNames = {}));
// Font families with fallbacks, for the general regions.
var LocalizedFontFamilies;
(function (LocalizedFontFamilies) {
LocalizedFontFamilies.Arabic = "'".concat(LocalizedFontNames.Arabic, "'");
LocalizedFontFamilies.ChineseSimplified = "'Microsoft Yahei UI', Verdana, Simsun";
LocalizedFontFamilies.ChineseTraditional = "'Microsoft Jhenghei UI', Pmingliu";
LocalizedFontFamilies.Cyrillic = "'".concat(LocalizedFontNames.Cyrillic, "'");
LocalizedFontFamilies.EastEuropean = "'".concat(LocalizedFontNames.EastEuropean, "'");
LocalizedFontFamilies.Greek = "'".concat(LocalizedFontNames.Greek, "'");
LocalizedFontFamilies.Hebrew = "'".concat(LocalizedFontNames.Hebrew, "'");
LocalizedFontFamilies.Hindi = "'Nirmala UI'";
LocalizedFontFamilies.Japanese = "'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka";
LocalizedFontFamilies.Korean = "'Malgun Gothic', Gulim";
LocalizedFontFamilies.Selawik = "'".concat(LocalizedFontNames.Selawik, "'");
LocalizedFontFamilies.Thai = "'Leelawadee UI Web', 'Kmer UI'";
LocalizedFontFamilies.Vietnamese = "'".concat(LocalizedFontNames.Vietnamese, "'");
LocalizedFontFamilies.WestEuropean = "'".concat(LocalizedFontNames.WestEuropean, "'");
LocalizedFontFamilies.Armenian = "'".concat(LocalizedFontNames.Armenian, "'");
LocalizedFontFamilies.Georgian = "'".concat(LocalizedFontNames.Georgian, "'");
})(LocalizedFontFamilies || (LocalizedFontFamilies = {}));
// Standard font sizes.
var FontSizes;
(function (FontSizes) {
FontSizes.size10 = '10px';
FontSizes.size12 = '12px';
FontSizes.size14 = '14px';
FontSizes.size16 = '16px';
FontSizes.size18 = '18px';
FontSizes.size20 = '20px';
FontSizes.size24 = '24px';
FontSizes.size28 = '28px';
FontSizes.size32 = '32px';
FontSizes.size42 = '42px';
FontSizes.size68 = '68px';
FontSizes.mini = '10px';
FontSizes.xSmall = '10px';
FontSizes.small = '12px';
FontSizes.smallPlus = '12px';
FontSizes.medium = '14px';
FontSizes.mediumPlus = '16px';
FontSizes.icon = '16px';
FontSizes.large = '18px';
FontSizes.xLarge = '20px';
FontSizes.xLargePlus = '24px';
FontSizes.xxLarge = '28px';
FontSizes.xxLargePlus = '32px';
FontSizes.superLarge = '42px';
FontSizes.mega = '68px';
})(FontSizes || (FontSizes = {}));
// Standard font weights.
var FontWeights;
(function (FontWeights) {
FontWeights.light = 100;
FontWeights.semilight = 300;
FontWeights.regular = 400;
FontWeights.semibold = 600;
FontWeights.bold = 700;
})(FontWeights || (FontWeights = {}));
// Standard Icon Sizes.
var IconFontSizes;
(function (IconFontSizes) {
IconFontSizes.xSmall = '10px';
IconFontSizes.small = '12px';
IconFontSizes.medium = '16px';
IconFontSizes.large = '20px';
})(IconFontSizes || (IconFontSizes = {}));
//# sourceMappingURL=FluentFonts.js.map
}),
"./node_modules/@fluentui/theme/lib/fonts/createFontStyles.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/fonts/createFontStyles.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createFontStyles: () => (createFontStyles)
});
/* import */ var _FluentFonts__rspack_import_0 = __webpack_require__(/*! ./FluentFonts */ "./node_modules/@fluentui/theme/lib/fonts/FluentFonts.js");
// Fallback fonts, if specified system or web fonts are unavailable.
var FontFamilyFallbacks = "'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif";
// By default, we favor system fonts for the default.
// All localized fonts use a web font and never use the system font.
var defaultFontFamily = "'Segoe UI', '".concat(_FluentFonts__rspack_import_0.LocalizedFontNames.WestEuropean, "'");
// Mapping of language prefix to to font family.
var LanguageToFontMap = {
ar: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Arabic,
bg: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Cyrillic,
cs: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
el: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Greek,
et: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
he: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Hebrew,
hi: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Hindi,
hr: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
hu: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
ja: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Japanese,
kk: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
ko: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Korean,
lt: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
lv: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
pl: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
ru: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Cyrillic,
sk: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
'sr-latn': _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
th: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Thai,
tr: _FluentFonts__rspack_import_0.LocalizedFontFamilies.EastEuropean,
uk: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Cyrillic,
vi: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Vietnamese,
'zh-hans': _FluentFonts__rspack_import_0.LocalizedFontFamilies.ChineseSimplified,
'zh-hant': _FluentFonts__rspack_import_0.LocalizedFontFamilies.ChineseTraditional,
hy: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Armenian,
ka: _FluentFonts__rspack_import_0.LocalizedFontFamilies.Georgian,
};
function _fontFamilyWithFallbacks(fontFamily) {
return "".concat(fontFamily, ", ").concat(FontFamilyFallbacks);
}
/**
* If there is a localized font for this language, return that.
* Returns undefined if there is no localized font for that language.
*/
function _getLocalizedFontFamily(language) {
for (var lang in LanguageToFontMap) {
if (LanguageToFontMap.hasOwnProperty(lang) && language && lang.indexOf(language) === 0) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return LanguageToFontMap[lang];
}
}
return defaultFontFamily;
}
function _createFont(size, weight, fontFamily) {
return {
fontFamily: fontFamily,
MozOsxFontSmoothing: 'grayscale',
WebkitFontSmoothing: 'antialiased',
fontSize: size,
fontWeight: weight,
};
}
function createFontStyles(localeCode) {
var localizedFont = _getLocalizedFontFamily(localeCode);
var fontFamilyWithFallback = _fontFamilyWithFallbacks(localizedFont);
var fontStyles = {
tiny: _createFont(_FluentFonts__rspack_import_0.FontSizes.mini, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
xSmall: _createFont(_FluentFonts__rspack_import_0.FontSizes.xSmall, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
small: _createFont(_FluentFonts__rspack_import_0.FontSizes.small, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
smallPlus: _createFont(_FluentFonts__rspack_import_0.FontSizes.smallPlus, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
medium: _createFont(_FluentFonts__rspack_import_0.FontSizes.medium, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
mediumPlus: _createFont(_FluentFonts__rspack_import_0.FontSizes.mediumPlus, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
large: _createFont(_FluentFonts__rspack_import_0.FontSizes.large, _FluentFonts__rspack_import_0.FontWeights.regular, fontFamilyWithFallback),
xLarge: _createFont(_FluentFonts__rspack_import_0.FontSizes.xLarge, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
xLargePlus: _createFont(_FluentFonts__rspack_import_0.FontSizes.xLargePlus, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
xxLarge: _createFont(_FluentFonts__rspack_import_0.FontSizes.xxLarge, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
xxLargePlus: _createFont(_FluentFonts__rspack_import_0.FontSizes.xxLargePlus, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
superLarge: _createFont(_FluentFonts__rspack_import_0.FontSizes.superLarge, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
mega: _createFont(_FluentFonts__rspack_import_0.FontSizes.mega, _FluentFonts__rspack_import_0.FontWeights.semibold, fontFamilyWithFallback),
};
return fontStyles;
}
//# sourceMappingURL=createFontStyles.js.map
}),
"./node_modules/@fluentui/theme/lib/mergeThemes.js":
/*!*********************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/mergeThemes.js ***!
\*********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeThemes: () => (mergeThemes)
});
/* import */ var _fluentui_utilities__rspack_import_0 = __webpack_require__(/*! @fluentui/utilities */ "./node_modules/@fluentui/utilities/lib/merge.js");
/* import */ var _utilities_makeSemanticColors__rspack_import_1 = __webpack_require__(/*! ./utilities/makeSemanticColors */ "./node_modules/@fluentui/theme/lib/utilities/makeSemanticColors.js");
/**
* Merge a partial/full theme into a full theme and returns a merged full theme.
*/
function mergeThemes(theme, partialTheme) {
var _a, _b, _c;
if (partialTheme === void 0) { partialTheme = {}; }
var mergedTheme = (0,_fluentui_utilities__rspack_import_0.merge)({}, theme, partialTheme, {
semanticColors: (0,_utilities_makeSemanticColors__rspack_import_1.getSemanticColors)(partialTheme.palette, partialTheme.effects, partialTheme.semanticColors, partialTheme.isInverted === undefined ? theme.isInverted : partialTheme.isInverted),
});
if (((_a = partialTheme.palette) === null || _a === void 0 ? void 0 : _a.themePrimary) && !((_b = partialTheme.palette) === null || _b === void 0 ? void 0 : _b.accent)) {
mergedTheme.palette.accent = partialTheme.palette.themePrimary;
}
if (partialTheme.defaultFontStyle) {
for (var _i = 0, _d = Object.keys(mergedTheme.fonts); _i < _d.length; _i++) {
var fontStyle = _d[_i];
mergedTheme.fonts[fontStyle] = (0,_fluentui_utilities__rspack_import_0.merge)(mergedTheme.fonts[fontStyle], partialTheme.defaultFontStyle, (_c = partialTheme === null || partialTheme === void 0 ? void 0 : partialTheme.fonts) === null || _c === void 0 ? void 0 : _c[fontStyle]);
}
}
return mergedTheme;
}
//# sourceMappingURL=mergeThemes.js.map
}),
"./node_modules/@fluentui/theme/lib/motion/AnimationStyles.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/motion/AnimationStyles.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
AnimationStyles: () => (AnimationStyles),
AnimationVariables: () => (AnimationVariables)
});
/* import */ var _fluentui_merge_styles__rspack_import_0 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/keyframes.js");
/* Register the keyframes */
var EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';
var EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';
var DURATION_1 = '0.167s';
var DURATION_2 = '0.267s';
var DURATION_3 = '0.367s';
var DURATION_4 = '0.467s';
var FADE_IN = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { opacity: 0 },
to: { opacity: 1 },
});
var FADE_OUT = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { opacity: 1 },
to: { opacity: 0, visibility: 'hidden' },
});
var SLIDE_RIGHT_IN10 = _createSlideInX(-10);
var SLIDE_RIGHT_IN20 = _createSlideInX(-20);
var SLIDE_RIGHT_IN40 = _createSlideInX(-40);
var SLIDE_RIGHT_IN400 = _createSlideInX(-400);
var SLIDE_LEFT_IN10 = _createSlideInX(10);
var SLIDE_LEFT_IN20 = _createSlideInX(20);
var SLIDE_LEFT_IN40 = _createSlideInX(40);
var SLIDE_LEFT_IN400 = _createSlideInX(400);
var SLIDE_UP_IN10 = _createSlideInY(10);
var SLIDE_UP_IN20 = _createSlideInY(20);
var SLIDE_DOWN_IN10 = _createSlideInY(-10);
var SLIDE_DOWN_IN20 = _createSlideInY(-20);
var SLIDE_RIGHT_OUT10 = _createSlideOutX(10);
var SLIDE_RIGHT_OUT20 = _createSlideOutX(20);
var SLIDE_RIGHT_OUT40 = _createSlideOutX(40);
var SLIDE_RIGHT_OUT400 = _createSlideOutX(400);
var SLIDE_LEFT_OUT10 = _createSlideOutX(-10);
var SLIDE_LEFT_OUT20 = _createSlideOutX(-20);
var SLIDE_LEFT_OUT40 = _createSlideOutX(-40);
var SLIDE_LEFT_OUT400 = _createSlideOutX(-400);
var SLIDE_UP_OUT10 = _createSlideOutY(-10);
var SLIDE_UP_OUT20 = _createSlideOutY(-20);
var SLIDE_DOWN_OUT10 = _createSlideOutY(10);
var SLIDE_DOWN_OUT20 = _createSlideOutY(20);
var SCALE_UP100 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'scale3d(.98,.98,1)' },
to: { transform: 'scale3d(1,1,1)' },
});
var SCALE_DOWN98 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'scale3d(1,1,1)' },
to: { transform: 'scale3d(.98,.98,1)' },
});
var SCALE_DOWN100 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'scale3d(1.03,1.03,1)' },
to: { transform: 'scale3d(1,1,1)' },
});
var SCALE_UP103 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'scale3d(1,1,1)' },
to: { transform: 'scale3d(1.03,1.03,1)' },
});
var ROTATE90 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'rotateZ(0deg)' },
to: { transform: 'rotateZ(90deg)' },
});
var ROTATE_N90 = (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: 'rotateZ(0deg)' },
to: { transform: 'rotateZ(-90deg)' },
});
/**
* Exporting raw duraction values and easing functions to be used in custom animations
*/
var AnimationVariables = {
easeFunction1: EASING_FUNCTION_1,
easeFunction2: EASING_FUNCTION_2,
durationValue1: DURATION_1,
durationValue2: DURATION_2,
durationValue3: DURATION_3,
durationValue4: DURATION_4,
};
/**
* All Fabric standard animations, exposed as json objects referencing predefined
* keyframes. These objects can be mixed in with other class definitions.
*/
var AnimationStyles = {
slideRightIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN10), DURATION_3, EASING_FUNCTION_1),
slideRightIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN20), DURATION_3, EASING_FUNCTION_1),
slideRightIn40: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN40), DURATION_3, EASING_FUNCTION_1),
slideRightIn400: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN400), DURATION_3, EASING_FUNCTION_1),
slideLeftIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN10), DURATION_3, EASING_FUNCTION_1),
slideLeftIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN20), DURATION_3, EASING_FUNCTION_1),
slideLeftIn40: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN40), DURATION_3, EASING_FUNCTION_1),
slideLeftIn400: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN400), DURATION_3, EASING_FUNCTION_1),
slideUpIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_UP_IN10), DURATION_3, EASING_FUNCTION_1),
slideUpIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_UP_IN20), DURATION_3, EASING_FUNCTION_1),
slideDownIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_DOWN_IN10), DURATION_3, EASING_FUNCTION_1),
slideDownIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_DOWN_IN20), DURATION_3, EASING_FUNCTION_1),
slideRightOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT10), DURATION_3, EASING_FUNCTION_1),
slideRightOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT20), DURATION_3, EASING_FUNCTION_1),
slideRightOut40: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT40), DURATION_3, EASING_FUNCTION_1),
slideRightOut400: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT400), DURATION_3, EASING_FUNCTION_1),
slideLeftOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT10), DURATION_3, EASING_FUNCTION_1),
slideLeftOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT20), DURATION_3, EASING_FUNCTION_1),
slideLeftOut40: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT40), DURATION_3, EASING_FUNCTION_1),
slideLeftOut400: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT400), DURATION_3, EASING_FUNCTION_1),
slideUpOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_UP_OUT10), DURATION_3, EASING_FUNCTION_1),
slideUpOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_UP_OUT20), DURATION_3, EASING_FUNCTION_1),
slideDownOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_DOWN_OUT10), DURATION_3, EASING_FUNCTION_1),
slideDownOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_DOWN_OUT20), DURATION_3, EASING_FUNCTION_1),
scaleUpIn100: _createAnimation("".concat(FADE_IN, ",").concat(SCALE_UP100), DURATION_3, EASING_FUNCTION_1),
scaleDownIn100: _createAnimation("".concat(FADE_IN, ",").concat(SCALE_DOWN100), DURATION_3, EASING_FUNCTION_1),
scaleUpOut103: _createAnimation("".concat(FADE_OUT, ",").concat(SCALE_UP103), DURATION_1, EASING_FUNCTION_2),
scaleDownOut98: _createAnimation("".concat(FADE_OUT, ",").concat(SCALE_DOWN98), DURATION_1, EASING_FUNCTION_2),
fadeIn100: _createAnimation(FADE_IN, DURATION_1, EASING_FUNCTION_2),
fadeIn200: _createAnimation(FADE_IN, DURATION_2, EASING_FUNCTION_2),
fadeIn400: _createAnimation(FADE_IN, DURATION_3, EASING_FUNCTION_2),
fadeIn500: _createAnimation(FADE_IN, DURATION_4, EASING_FUNCTION_2),
fadeOut100: _createAnimation(FADE_OUT, DURATION_1, EASING_FUNCTION_2),
fadeOut200: _createAnimation(FADE_OUT, DURATION_2, EASING_FUNCTION_2),
fadeOut400: _createAnimation(FADE_OUT, DURATION_3, EASING_FUNCTION_2),
fadeOut500: _createAnimation(FADE_OUT, DURATION_4, EASING_FUNCTION_2),
rotate90deg: _createAnimation(ROTATE90, '0.1s', EASING_FUNCTION_2),
rotateN90deg: _createAnimation(ROTATE_N90, '0.1s', EASING_FUNCTION_2),
// expandCollapse 100/200/400, delay 100/200
};
function _createAnimation(animationName, animationDuration, animationTimingFunction) {
return {
animationName: animationName,
animationDuration: animationDuration,
animationTimingFunction: animationTimingFunction,
animationFillMode: 'both',
};
}
function _createSlideInX(fromX) {
return (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: "translate3d(".concat(fromX, "px,0,0)"), pointerEvents: 'none' },
to: { transform: "translate3d(0,0,0)", pointerEvents: 'auto' },
});
}
function _createSlideInY(fromY) {
return (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: "translate3d(0,".concat(fromY, "px,0)"), pointerEvents: 'none' },
to: { transform: "translate3d(0,0,0)", pointerEvents: 'auto' },
});
}
function _createSlideOutX(toX) {
return (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: "translate3d(0,0,0)" },
to: { transform: "translate3d(".concat(toX, "px,0,0)") },
});
}
function _createSlideOutY(toY) {
return (0,_fluentui_merge_styles__rspack_import_0.keyframes)({
from: { transform: "translate3d(0,0,0)" },
to: { transform: "translate3d(0,".concat(toY, "px,0)") },
});
}
//# sourceMappingURL=AnimationStyles.js.map
}),
"./node_modules/@fluentui/theme/lib/spacing/DefaultSpacing.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/spacing/DefaultSpacing.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DefaultSpacing: () => (DefaultSpacing)
});
var DefaultSpacing = {
s2: '4px',
s1: '8px',
m: '16px',
l1: '20px',
l2: '32px',
};
//# sourceMappingURL=DefaultSpacing.js.map
}),
"./node_modules/@fluentui/theme/lib/utilities/makeSemanticColors.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/theme/lib/utilities/makeSemanticColors.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getSemanticColors: () => (getSemanticColors),
makeSemanticColors: () => (makeSemanticColors)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/** Generates all the semantic slot colors based on the theme so far
* We'll use these as fallbacks for semantic slots that the passed in theme did not define.
* The caller must still mix in the customized semantic slots at the end.
*/
function makeSemanticColors(p, e, s, isInverted, depComments) {
if (depComments === void 0) { depComments = false; }
var semanticColors = (0,tslib__rspack_import_0.__assign)({ primaryButtonBorder: 'transparent', errorText: !isInverted ? '#a4262c' : '#F1707B', messageText: !isInverted ? '#323130' : '#F3F2F1', messageLink: !isInverted ? '#005A9E' : '#6CB8F6', messageLinkHovered: !isInverted ? '#004578' : '#82C7FF', infoIcon: !isInverted ? '#605e5c' : '#C8C6C4', errorIcon: !isInverted ? '#A80000' : '#F1707B', blockingIcon: !isInverted ? '#FDE7E9' : '#442726', warningIcon: !isInverted ? '#797775' : '#C8C6C4', severeWarningIcon: !isInverted ? '#D83B01' : '#FCE100', successIcon: !isInverted ? '#107C10' : '#92C353', infoBackground: !isInverted ? '#f3f2f1' : '#323130', errorBackground: !isInverted ? '#FDE7E9' : '#442726', blockingBackground: !isInverted ? '#FDE7E9' : '#442726', warningBackground: !isInverted ? '#FFF4CE' : '#433519', severeWarningBackground: !isInverted ? '#FED9CC' : '#4F2A0F', successBackground: !isInverted ? '#DFF6DD' : '#393D1B',
// deprecated
warningHighlight: !isInverted ? '#ffb900' : '#fff100', successText: !isInverted ? '#107C10' : '#92c353' }, s);
var fullSemanticColors = getSemanticColors(p, e, semanticColors, isInverted);
return _fixDeprecatedSlots(fullSemanticColors, depComments);
}
/**
* Map partial platte and effects to partial semantic colors.
*/
function getSemanticColors(p, e, s, isInverted, depComments) {
if (depComments === void 0) { depComments = false; }
var result = {};
// map palette
var _a = p || {}, white = _a.white, black = _a.black, themePrimary = _a.themePrimary, themeDark = _a.themeDark, themeDarker = _a.themeDarker, themeDarkAlt = _a.themeDarkAlt, themeLighter = _a.themeLighter, neutralLight = _a.neutralLight, neutralLighter = _a.neutralLighter, neutralDark = _a.neutralDark, neutralQuaternary = _a.neutralQuaternary, neutralQuaternaryAlt = _a.neutralQuaternaryAlt, neutralPrimary = _a.neutralPrimary, neutralSecondary = _a.neutralSecondary, neutralSecondaryAlt = _a.neutralSecondaryAlt, neutralTertiary = _a.neutralTertiary, neutralTertiaryAlt = _a.neutralTertiaryAlt, neutralLighterAlt = _a.neutralLighterAlt, accent = _a.accent;
if (white) {
result.bodyBackground = white;
result.bodyFrameBackground = white;
result.accentButtonText = white;
result.buttonBackground = white;
result.primaryButtonText = white;
result.primaryButtonTextHovered = white;
result.primaryButtonTextPressed = white;
result.inputBackground = white;
result.inputForegroundChecked = white;
result.listBackground = white;
result.menuBackground = white;
result.cardStandoutBackground = white;
}
if (black) {
result.bodyTextChecked = black;
result.buttonTextCheckedHovered = black;
}
if (themePrimary) {
result.link = themePrimary;
result.primaryButtonBackground = themePrimary;
result.inputBackgroundChecked = themePrimary;
result.inputIcon = themePrimary;
result.inputFocusBorderAlt = themePrimary;
result.menuIcon = themePrimary;
result.menuHeader = themePrimary;
result.accentButtonBackground = themePrimary;
}
if (themeDark) {
result.primaryButtonBackgroundPressed = themeDark;
result.inputBackgroundCheckedHovered = themeDark;
result.inputIconHovered = themeDark;
}
if (themeDarker) {
result.linkHovered = themeDarker;
}
if (themeDarkAlt) {
result.primaryButtonBackgroundHovered = themeDarkAlt;
}
if (themeLighter) {
result.inputPlaceholderBackgroundChecked = themeLighter;
}
if (neutralLight) {
result.bodyBackgroundChecked = neutralLight;
result.bodyFrameDivider = neutralLight;
result.bodyDivider = neutralLight;
result.variantBorder = neutralLight;
result.buttonBackgroundCheckedHovered = neutralLight;
result.buttonBackgroundPressed = neutralLight;
result.listItemBackgroundChecked = neutralLight;
result.listHeaderBackgroundPressed = neutralLight;
result.menuItemBackgroundPressed = neutralLight;
// eslint-disable-next-line @typescript-eslint/no-deprecated
result.menuItemBackgroundChecked = neutralLight;
}
if (neutralLighter) {
result.bodyBackgroundHovered = neutralLighter;
result.buttonBackgroundHovered = neutralLighter;
result.buttonBackgroundDisabled = neutralLighter;
result.buttonBorderDisabled = neutralLighter;
result.primaryButtonBackgroundDisabled = neutralLighter;
result.disabledBackground = neutralLighter;
result.listItemBackgroundHovered = neutralLighter;
result.listHeaderBackgroundHovered = neutralLighter;
result.menuItemBackgroundHovered = neutralLighter;
}
if (neutralQuaternary) {
result.primaryButtonTextDisabled = neutralQuaternary;
result.disabledSubtext = neutralQuaternary;
}
if (neutralQuaternaryAlt) {
result.listItemBackgroundCheckedHovered = neutralQuaternaryAlt;
}
if (neutralTertiary) {
result.disabledBodyText = neutralTertiary;
result.variantBorderHovered = (s === null || s === void 0 ? void 0 : s.variantBorderHovered) || neutralTertiary;
result.buttonTextDisabled = neutralTertiary;
result.inputIconDisabled = neutralTertiary;
result.disabledText = neutralTertiary;
}
if (neutralPrimary) {
result.bodyText = neutralPrimary;
result.actionLink = neutralPrimary;
result.buttonText = neutralPrimary;
result.inputBorderHovered = neutralPrimary;
result.inputText = neutralPrimary;
result.listText = neutralPrimary;
result.menuItemText = neutralPrimary;
}
if (neutralLighterAlt) {
result.bodyStandoutBackground = neutralLighterAlt;
result.defaultStateBackground = neutralLighterAlt;
}
if (neutralDark) {
result.actionLinkHovered = neutralDark;
result.buttonTextHovered = neutralDark;
result.buttonTextChecked = neutralDark;
result.buttonTextPressed = neutralDark;
result.inputTextHovered = neutralDark;
result.menuItemTextHovered = neutralDark;
}
if (neutralSecondary) {
result.bodySubtext = neutralSecondary;
result.focusBorder = neutralSecondary;
result.inputBorder = neutralSecondary;
result.smallInputBorder = neutralSecondary;
result.inputPlaceholderText = neutralSecondary;
}
if (neutralSecondaryAlt) {
result.buttonBorder = neutralSecondaryAlt;
}
if (neutralTertiaryAlt) {
result.disabledBodySubtext = neutralTertiaryAlt;
result.disabledBorder = neutralTertiaryAlt;
result.buttonBackgroundChecked = neutralTertiaryAlt;
result.menuDivider = neutralTertiaryAlt;
}
if (accent) {
result.accentButtonBackground = accent;
}
// map effects
if (e === null || e === void 0 ? void 0 : e.elevation4) {
result.cardShadow = e.elevation4;
}
if (!isInverted && (e === null || e === void 0 ? void 0 : e.elevation8)) {
result.cardShadowHovered = e.elevation8;
}
else if (result.variantBorderHovered) {
result.cardShadowHovered = '0 0 1px ' + result.variantBorderHovered;
}
result = (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, result), s);
return result;
}
function _fixDeprecatedSlots(s, depComments) {
// Add @deprecated tag as comment if enabled
var dep = '';
if (depComments === true) {
dep = ' /* @deprecated */';
}
/* eslint-disable @typescript-eslint/no-deprecated */
s.listTextColor = s.listText + dep;
s.menuItemBackgroundChecked += dep;
s.warningHighlight += dep;
s.warningText = s.messageText + dep;
s.successText += dep;
/* eslint-enable @typescript-eslint/no-deprecated */
return s;
}
//# sourceMappingURL=makeSemanticColors.js.map
}),
"./node_modules/@fluentui/utilities/lib/Async.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/Async.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Async: () => (Async)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/**
* Bugs often appear in async code when stuff gets disposed, but async operations don't get canceled.
* This Async helper class solves these issues by tying async code to the lifetime of a disposable object.
*
* Usage: Anything class extending from BaseModel can access this helper via this.async. Otherwise create a
* new instance of the class and remember to call dispose() during your code's dispose handler.
*
* @public
*/
var Async = /** @class */ (function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function Async(parent, onError) {
this._timeoutIds = null;
this._immediateIds = null;
this._intervalIds = null;
this._animationFrameIds = null;
this._isDisposed = false;
this._parent = parent || null;
this._onErrorHandler = onError;
this._noop = function () {
/* do nothing */
};
}
/**
* Dispose function, clears all async operations.
*/
Async.prototype.dispose = function () {
var id;
this._isDisposed = true;
this._parent = null;
// Clear timeouts.
if (this._timeoutIds) {
for (id in this._timeoutIds) {
if (this._timeoutIds.hasOwnProperty(id)) {
this.clearTimeout(parseInt(id, 10));
}
}
this._timeoutIds = null;
}
// Clear immediates.
if (this._immediateIds) {
for (id in this._immediateIds) {
if (this._immediateIds.hasOwnProperty(id)) {
this.clearImmediate(parseInt(id, 10));
}
}
this._immediateIds = null;
}
// Clear intervals.
if (this._intervalIds) {
for (id in this._intervalIds) {
if (this._intervalIds.hasOwnProperty(id)) {
this.clearInterval(parseInt(id, 10));
}
}
this._intervalIds = null;
}
// Clear animation frames.
if (this._animationFrameIds) {
for (id in this._animationFrameIds) {
if (this._animationFrameIds.hasOwnProperty(id)) {
this.cancelAnimationFrame(parseInt(id, 10));
}
}
this._animationFrameIds = null;
}
};
/**
* SetTimeout override, which will auto cancel the timeout during dispose.
* @param callback - Callback to execute.
* @param duration - Duration in milliseconds.
* @returns The setTimeout id.
*/
Async.prototype.setTimeout = function (callback, duration) {
var _this = this;
var timeoutId = 0;
if (!this._isDisposed) {
if (!this._timeoutIds) {
this._timeoutIds = {};
}
timeoutId = setTimeout(function () {
// Time to execute the timeout, enqueue it as a foreground task to be executed.
try {
// Now delete the record and call the callback.
if (_this._timeoutIds) {
delete _this._timeoutIds[timeoutId];
}
callback.apply(_this._parent);
}
catch (e) {
_this._logError(e);
}
}, duration);
this._timeoutIds[timeoutId] = true;
}
return timeoutId;
};
/**
* Clears the timeout.
* @param id - Id to cancel.
*/
Async.prototype.clearTimeout = function (id) {
if (this._timeoutIds && this._timeoutIds[id]) {
clearTimeout(id);
delete this._timeoutIds[id];
}
};
/**
* SetImmediate override, which will auto cancel the immediate during dispose.
* @param callback - Callback to execute.
* @param targetElement - Optional target element to use for identifying the correct window.
* @returns The setTimeout id.
*/
Async.prototype.setImmediate = function (callback, targetElement) {
var _this = this;
var immediateId = 0;
var win = (0,_dom_getWindow__rspack_import_0.getWindow)(targetElement);
if (!this._isDisposed) {
if (!this._immediateIds) {
this._immediateIds = {};
}
var setImmediateCallback = function () {
// Time to execute the timeout, enqueue it as a foreground task to be executed.
try {
// Now delete the record and call the callback.
if (_this._immediateIds) {
delete _this._immediateIds[immediateId];
}
callback.apply(_this._parent);
}
catch (e) {
_this._logError(e);
}
};
immediateId = win.setTimeout(setImmediateCallback, 0);
this._immediateIds[immediateId] = true;
}
return immediateId;
};
/**
* Clears the immediate.
* @param id - Id to cancel.
* @param targetElement - Optional target element to use for identifying the correct window.
*/
Async.prototype.clearImmediate = function (id, targetElement) {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)(targetElement);
if (this._immediateIds && this._immediateIds[id]) {
win.clearTimeout(id);
delete this._immediateIds[id];
}
};
/**
* SetInterval override, which will auto cancel the timeout during dispose.
* @param callback - Callback to execute.
* @param duration - Duration in milliseconds.
* @returns The setTimeout id.
*/
Async.prototype.setInterval = function (callback, duration) {
var _this = this;
var intervalId = 0;
if (!this._isDisposed) {
if (!this._intervalIds) {
this._intervalIds = {};
}
intervalId = setInterval(function () {
// Time to execute the interval callback, enqueue it as a foreground task to be executed.
try {
callback.apply(_this._parent);
}
catch (e) {
_this._logError(e);
}
}, duration);
this._intervalIds[intervalId] = true;
}
return intervalId;
};
/**
* Clears the interval.
* @param id - Id to cancel.
*/
Async.prototype.clearInterval = function (id) {
if (this._intervalIds && this._intervalIds[id]) {
clearInterval(id);
delete this._intervalIds[id];
}
};
/**
* Creates a function that, when executed, will only call the func function at most once per
* every wait milliseconds. Provide an options object to indicate that func should be invoked
* on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled
* function will return the result of the last func call.
*
* Note: If leading and trailing options are true func will be called on the trailing edge of
* the timeout only if the throttled function is invoked more than once during the wait timeout.
*
* @param func - The function to throttle.
* @param wait - The number of milliseconds to throttle executions to. Defaults to 0.
* @param options - The options object.
* @returns The new throttled function.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Async.prototype.throttle = function (func, wait, options) {
var _this = this;
if (this._isDisposed) {
return this._noop;
}
var waitMS = wait || 0;
var leading = true;
var trailing = true;
var lastExecuteTime = 0;
var lastResult;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var lastArgs;
var timeoutId = null;
if (options && typeof options.leading === 'boolean') {
leading = options.leading;
}
if (options && typeof options.trailing === 'boolean') {
trailing = options.trailing;
}
var callback = function (userCall) {
var now = Date.now();
var delta = now - lastExecuteTime;
var waitLength = leading ? waitMS - delta : waitMS;
if (delta >= waitMS && (!userCall || leading)) {
lastExecuteTime = now;
if (timeoutId) {
_this.clearTimeout(timeoutId);
timeoutId = null;
}
lastResult = func.apply(_this._parent, lastArgs);
}
else if (timeoutId === null && trailing) {
timeoutId = _this.setTimeout(callback, waitLength);
}
return lastResult;
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var resultFunction = (function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
lastArgs = args;
return callback(true);
});
return resultFunction;
};
/**
* Creates a function that will delay the execution of func until after wait milliseconds have
* elapsed since the last time it was invoked. Provide an options object to indicate that func
* should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls
* to the debounced function will return the result of the last func call.
*
* Note: If leading and trailing options are true func will be called on the trailing edge of
* the timeout only if the debounced function is invoked more than once during the wait
* timeout.
*
* @param func - The function to debounce.
* @param wait - The number of milliseconds to delay.
* @param options - The options object.
* @returns The new debounced function.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Async.prototype.debounce = function (func, wait, options) {
var _this = this;
if (this._isDisposed) {
var noOpFunction = (function () {
/** Do nothing */
});
noOpFunction.cancel = function () {
return;
};
noOpFunction.flush = (function () { return null; });
noOpFunction.pending = function () { return false; };
return noOpFunction;
}
var waitMS = wait || 0;
var leading = false;
var trailing = true;
var maxWait = null;
var lastCallTime = 0;
var lastExecuteTime = Date.now();
var lastResult;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var lastArgs;
var timeoutId = null;
if (options && typeof options.leading === 'boolean') {
leading = options.leading;
}
if (options && typeof options.trailing === 'boolean') {
trailing = options.trailing;
}
if (options && typeof options.maxWait === 'number' && !isNaN(options.maxWait)) {
maxWait = options.maxWait;
}
var markExecuted = function (time) {
if (timeoutId) {
_this.clearTimeout(timeoutId);
timeoutId = null;
}
lastExecuteTime = time;
};
var invokeFunction = function (time) {
markExecuted(time);
lastResult = func.apply(_this._parent, lastArgs);
};
var callback = function (userCall) {
var now = Date.now();
var executeImmediately = false;
if (userCall) {
if (leading && now - lastCallTime >= waitMS) {
executeImmediately = true;
}
lastCallTime = now;
}
var delta = now - lastCallTime;
var waitLength = waitMS - delta;
var maxWaitDelta = now - lastExecuteTime;
var maxWaitExpired = false;
if (maxWait !== null) {
// maxWait only matters when there is a pending callback
if (maxWaitDelta >= maxWait && timeoutId) {
maxWaitExpired = true;
}
else {
waitLength = Math.min(waitLength, maxWait - maxWaitDelta);
}
}
if (delta >= waitMS || maxWaitExpired || executeImmediately) {
invokeFunction(now);
}
else if ((timeoutId === null || !userCall) && trailing) {
timeoutId = _this.setTimeout(callback, waitLength);
}
return lastResult;
};
var pending = function () {
return !!timeoutId;
};
var cancel = function () {
if (pending()) {
// Mark the debounced function as having executed
markExecuted(Date.now());
}
};
var flush = function () {
if (pending()) {
invokeFunction(Date.now());
}
return lastResult;
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var resultFunction = (function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
lastArgs = args;
return callback(true);
});
resultFunction.cancel = cancel;
resultFunction.flush = flush;
resultFunction.pending = pending;
return resultFunction;
};
Async.prototype.requestAnimationFrame = function (callback, targetElement) {
var _this = this;
var animationFrameId = 0;
var win = (0,_dom_getWindow__rspack_import_0.getWindow)(targetElement);
if (!this._isDisposed) {
if (!this._animationFrameIds) {
this._animationFrameIds = {};
}
var animationFrameCallback = function () {
try {
// Now delete the record and call the callback.
if (_this._animationFrameIds) {
delete _this._animationFrameIds[animationFrameId];
}
callback.apply(_this._parent);
}
catch (e) {
_this._logError(e);
}
};
animationFrameId = win.requestAnimationFrame
? win.requestAnimationFrame(animationFrameCallback)
: win.setTimeout(animationFrameCallback, 0);
this._animationFrameIds[animationFrameId] = true;
}
return animationFrameId;
};
Async.prototype.cancelAnimationFrame = function (id, targetElement) {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)(targetElement);
if (this._animationFrameIds && this._animationFrameIds[id]) {
win.cancelAnimationFrame ? win.cancelAnimationFrame(id) : win.clearTimeout(id);
delete this._animationFrameIds[id];
}
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Async.prototype._logError = function (e) {
if (this._onErrorHandler) {
this._onErrorHandler(e);
}
};
return Async;
}());
//# sourceMappingURL=Async.js.map
}),
"./node_modules/@fluentui/utilities/lib/BaseComponent.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/BaseComponent.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
BaseComponent: () => (BaseComponent),
nullRender: () => (nullRender)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Async__rspack_import_2 = __webpack_require__(/*! ./Async */ "./node_modules/@fluentui/utilities/lib/Async.js");
/* import */ var _EventGroup__rspack_import_3 = __webpack_require__(/*! ./EventGroup */ "./node_modules/@fluentui/utilities/lib/EventGroup.js");
/* import */ var _warn_warnConditionallyRequiredProps__rspack_import_6 = __webpack_require__(/*! ./warn/warnConditionallyRequiredProps */ "./node_modules/@fluentui/utilities/lib/warn/warnConditionallyRequiredProps.js");
/* import */ var _warn_warnMutuallyExclusive__rspack_import_5 = __webpack_require__(/*! ./warn/warnMutuallyExclusive */ "./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js");
/* import */ var _warn_warnDeprecations__rspack_import_4 = __webpack_require__(/*! ./warn/warnDeprecations */ "./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js");
/**
* BaseComponent class, which provides basic helpers for all components.
*
* @public
* {@docCategory BaseComponent}
*
* @deprecated Do not use. We are moving away from class component.
*/
var BaseComponent = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(BaseComponent, _super);
/**
* BaseComponent constructor
* @param props - The props for the component.
* @param context - The context for the component.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function BaseComponent(props, context) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _this = _super.call(this, props, context) || this;
// eslint-disable-next-line @typescript-eslint/no-deprecated
_makeAllSafe(_this, BaseComponent.prototype, [
'componentDidMount',
'shouldComponentUpdate',
'getSnapshotBeforeUpdate',
'render',
'componentDidUpdate',
'componentWillUnmount',
]);
return _this;
}
/**
* When the component receives props, make sure the componentRef is updated.
*/
BaseComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
this._updateComponentRef(prevProps, this.props);
};
/**
* When the component has mounted, update the componentRef.
*/
BaseComponent.prototype.componentDidMount = function () {
this._setComponentRef(this.props.componentRef, this);
};
/**
* If we have disposables, dispose them automatically on unmount.
*/
BaseComponent.prototype.componentWillUnmount = function () {
this._setComponentRef(this.props.componentRef, null);
if (this.__disposables) {
for (var i = 0, len = this._disposables.length; i < len; i++) {
var disposable = this.__disposables[i];
if (disposable.dispose) {
disposable.dispose();
}
}
this.__disposables = null;
}
};
Object.defineProperty(BaseComponent.prototype, "className", {
/**
* Gets the object's class name.
*/
get: function () {
if (!this.__className) {
var funcNameRegex = /function (.{1,})\(/;
var results = funcNameRegex.exec(this.constructor.toString());
this.__className = results && results.length > 1 ? results[1] : '';
}
return this.__className;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BaseComponent.prototype, "_disposables", {
/**
* Allows subclasses to push things to this._disposables to be auto disposed.
*/
get: function () {
if (!this.__disposables) {
this.__disposables = [];
}
return this.__disposables;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BaseComponent.prototype, "_async", {
/**
* Gets the async instance associated with the component, created on demand. The async instance gives
* subclasses a way to execute setTimeout/setInterval async calls safely, where the callbacks
* will be cleared/ignored automatically after unmounting. The helpers within the async object also
* preserve the this pointer so that you don't need to "bind" the callbacks.
*/
get: function () {
if (!this.__async) {
this.__async = new _Async__rspack_import_2.Async(this);
this._disposables.push(this.__async);
}
return this.__async;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BaseComponent.prototype, "_events", {
/**
* Gets the event group instance assocaited with the component, created on demand. The event instance
* provides on/off methods for listening to DOM (or regular javascript object) events. The event callbacks
* will be automatically disconnected after unmounting. The helpers within the events object also
* preserve the this reference so that you don't need to "bind" the callbacks.
*/
get: function () {
if (!this.__events) {
this.__events = new _EventGroup__rspack_import_3.EventGroup(this);
this._disposables.push(this.__events);
}
return this.__events;
},
enumerable: false,
configurable: true
});
/**
* Helper to return a memoized ref resolver function.
* @param refName - Name of the member to assign the ref to.
* @returns A function instance keyed from the given refname.
* @deprecated Use `createRef` from React.createRef.
*/
BaseComponent.prototype._resolveRef = function (refName) {
var _this = this;
if (!this.__resolves) {
this.__resolves = {};
}
if (!this.__resolves[refName]) {
this.__resolves[refName] = function (ref) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (_this[refName] = ref);
};
}
return this.__resolves[refName];
};
/**
* Updates the componentRef (by calling it with "this" when necessary.)
*/
BaseComponent.prototype._updateComponentRef = function (currentProps, newProps) {
if (newProps === void 0) { newProps = {}; }
// currentProps *should* always be defined, but verify that just in case a subclass is manually
// calling a lifecycle method with no parameters (which has happened) or other odd usage.
if (currentProps && newProps && currentProps.componentRef !== newProps.componentRef) {
this._setComponentRef(currentProps.componentRef, null);
this._setComponentRef(newProps.componentRef, this);
}
};
/**
* Warns when a deprecated props are being used.
*
* @param deprecationMap - The map of deprecations, where key is the prop name and the value is
* either null or a replacement prop name.
*/
BaseComponent.prototype._warnDeprecations = function (deprecationMap) {
(0,_warn_warnDeprecations__rspack_import_4.warnDeprecations)(this.className, this.props, deprecationMap);
};
/**
* Warns when props which are mutually exclusive with each other are both used.
*
* @param mutuallyExclusiveMap - The map of mutually exclusive props.
*/
BaseComponent.prototype._warnMutuallyExclusive = function (mutuallyExclusiveMap) {
(0,_warn_warnMutuallyExclusive__rspack_import_5.warnMutuallyExclusive)(this.className, this.props, mutuallyExclusiveMap);
};
/**
* Warns when props are required if a condition is met.
*
* @param requiredProps - The name of the props that are required when the condition is met.
* @param conditionalPropName - The name of the prop that the condition is based on.
* @param condition - Whether the condition is met.
*/
BaseComponent.prototype._warnConditionallyRequiredProps = function (requiredProps, conditionalPropName, condition) {
(0,_warn_warnConditionallyRequiredProps__rspack_import_6.warnConditionallyRequiredProps)(this.className, this.props, requiredProps, conditionalPropName, condition);
};
BaseComponent.prototype._setComponentRef = function (ref, value) {
if (!this._skipComponentRefResolution && ref) {
if (typeof ref === 'function') {
ref(value);
}
if (typeof ref === 'object') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref.current = value;
}
}
};
return BaseComponent;
}(react__rspack_import_0.Component));
/**
* Helper to override a given method with a wrapper method that can try/catch the original, but also
* ensures that the BaseComponent's methods are called before the subclass's. This ensures that
* componentWillUnmount in the base is called and that things in the _disposables array are disposed.
*/
// eslint-disable-next-line @typescript-eslint/no-deprecated
function _makeAllSafe(obj, prototype, methodNames) {
for (var i = 0, len = methodNames.length; i < len; i++) {
_makeSafe(obj, prototype, methodNames[i]);
}
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
function _makeSafe(obj, prototype, methodName) {
/* eslint-disable @typescript-eslint/no-explicit-any */
var classMethod = obj[methodName];
var prototypeMethod = prototype[methodName];
if (classMethod || prototypeMethod) {
obj[methodName] = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
/* eslint-enable @typescript-eslint/no-explicit-any */
var retVal;
if (prototypeMethod) {
retVal = prototypeMethod.apply(this, args);
}
if (classMethod !== prototypeMethod) {
retVal = classMethod.apply(this, args);
}
return retVal;
};
}
}
/**
* Simple constant function for returning null, used to render empty templates in JSX.
*
* @public
*/
function nullRender() {
return null;
}
//# sourceMappingURL=BaseComponent.js.map
}),
"./node_modules/@fluentui/utilities/lib/DelayedRender.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/DelayedRender.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DelayedRender: () => (DelayedRender)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _dom_getWindow__rspack_import_2 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/**
* Utility component for delaying the render of a child component after a given delay. This component
* requires a single child component; don't pass in many components. Wrap multiple components in a DIV
* if necessary.
*
* @public
* {@docCategory DelayedRender}
*/
var DelayedRender = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(DelayedRender, _super);
function DelayedRender(props) {
var _this = _super.call(this, props) || this;
_this.state = {
isRendered: (0,_dom_getWindow__rspack_import_2.getWindow)() === undefined,
};
return _this;
}
DelayedRender.prototype.componentDidMount = function () {
var _this = this;
var delay = this.props.delay;
// eslint-disable-next-line no-restricted-globals
this._timeoutId = window.setTimeout(function () {
_this.setState({
isRendered: true,
});
}, delay);
};
DelayedRender.prototype.componentWillUnmount = function () {
if (this._timeoutId) {
clearTimeout(this._timeoutId);
}
};
DelayedRender.prototype.render = function () {
return this.state.isRendered ? react__rspack_import_0.Children.only(this.props.children) : null;
};
DelayedRender.defaultProps = {
delay: 0,
};
return DelayedRender;
}(react__rspack_import_0.Component));
//# sourceMappingURL=DelayedRender.js.map
}),
"./node_modules/@fluentui/utilities/lib/EventGroup.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/EventGroup.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
EventGroup: () => (EventGroup)
});
/* import */ var _dom__rspack_import_0 = __webpack_require__(/*! ./dom */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _object__rspack_import_1 = __webpack_require__(/*! ./object */ "./node_modules/@fluentui/utilities/lib/object.js");
/** An instance of EventGroup allows anything with a handle to it to trigger events on it.
* If the target is an HTMLElement, the event will be attached to the element and can be
* triggered as usual (like clicking for onClick).
* The event can be triggered by calling EventGroup.raise() here. If the target is an
* HTMLElement, the event gets raised and is handled by the browser. Otherwise, it gets
* handled here in EventGroup, and the handler is called in the context of the parent
* (which is passed in in the constructor).
*
* @public
* {@docCategory EventGroup}
*/
var EventGroup = /** @class */ (function () {
/** parent: the context in which events attached to non-HTMLElements are called */
function EventGroup(parent) {
this._id = EventGroup._uniqueId++;
this._parent = parent;
this._eventRecords = [];
}
/** For IE8, bubbleEvent is ignored here and must be dealt with by the handler.
* Events raised here by default have bubbling set to false and cancelable set to true.
* This applies also to built-in events being raised manually here on HTMLElements,
* which may lead to unexpected behavior if it differs from the defaults.
*
*/
EventGroup.raise = function (target, eventName, eventArgs, bubbleEvent, doc) {
var retVal;
var theDoc = doc !== null && doc !== void 0 ? doc : (0,_dom__rspack_import_0.getDocument)();
if (EventGroup._isElement(target)) {
if (typeof theDoc !== 'undefined' && theDoc.createEvent) {
var ev = theDoc.createEvent('HTMLEvents');
// eslint-disable-next-line @typescript-eslint/no-deprecated
ev.initEvent(eventName, bubbleEvent || false, true);
(0,_object__rspack_import_1.assign)(ev, eventArgs);
retVal = target.dispatchEvent(ev);
}
else if (typeof theDoc !== 'undefined' && theDoc.createEventObject) {
// IE8
var evObj = theDoc.createEventObject(eventArgs);
// cannot set cancelBubble on evObj, fireEvent will overwrite it
target.fireEvent('on' + eventName, evObj);
}
}
else {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore -- FIXME: strictBindCallApply error - https://github.com/microsoft/fluentui/issues/17331
while (target && retVal !== false) {
var events = target.__events__;
var eventRecords = events ? events[eventName] : null;
if (eventRecords) {
for (var id in eventRecords) {
if (eventRecords.hasOwnProperty(id)) {
var eventRecordList = eventRecords[id];
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore -- FIXME: strictBindCallApply error - https://github.com/microsoft/fluentui/issues/17331
for (var listIndex = 0; retVal !== false && listIndex < eventRecordList.length; listIndex++) {
var record = eventRecordList[listIndex];
if (record.objectCallback) {
retVal = record.objectCallback.call(record.parent, eventArgs);
}
}
}
}
}
// If the target has a parent, bubble the event up.
target = bubbleEvent ? target.parent : null;
}
}
return retVal;
};
EventGroup.isObserved = function (target, eventName) {
var events = target && target.__events__;
return !!events && !!events[eventName];
};
/** Check to see if the target has declared support of the given event. */
EventGroup.isDeclared = function (target, eventName) {
var declaredEvents = target && target.__declaredEvents;
return !!declaredEvents && !!declaredEvents[eventName];
};
EventGroup.stopPropagation = function (event) {
if (event.stopPropagation) {
event.stopPropagation();
}
else {
// IE8
event.cancelBubble = true;
}
};
EventGroup._isElement = function (target) {
return (!!target && (!!target.addEventListener || (typeof HTMLElement !== 'undefined' && target instanceof HTMLElement)));
};
EventGroup.prototype.dispose = function () {
if (!this._isDisposed) {
this._isDisposed = true;
this.off();
this._parent = null;
}
};
/** On the target, attach a set of events, where the events object is a name to function mapping. */
EventGroup.prototype.onAll = function (target, events, useCapture) {
for (var eventName in events) {
if (events.hasOwnProperty(eventName)) {
this.on(target, eventName, events[eventName], useCapture);
}
}
};
/**
* On the target, attach an event whose handler will be called in the context of the parent
* of this instance of EventGroup.
*/
EventGroup.prototype.on = function (target, eventName, callback, options) {
var _this = this;
if (eventName.indexOf(',') > -1) {
var events = eventName.split(/[ ,]+/);
for (var i = 0; i < events.length; i++) {
this.on(target, events[i], callback, options);
}
}
else {
var parent_1 = this._parent;
var eventRecord = {
target: target,
eventName: eventName,
parent: parent_1,
callback: callback,
options: options,
};
// Initialize and wire up the record on the target, so that it can call the callback if the event fires.
var events = (target.__events__ = target.__events__ || {});
events[eventName] =
events[eventName] ||
{
count: 0,
};
events[eventName][this._id] = events[eventName][this._id] || [];
events[eventName][this._id].push(eventRecord);
events[eventName].count++;
if (EventGroup._isElement(target)) {
var processElementEvent = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (_this._isDisposed) {
return;
}
var result;
try {
result = callback.apply(parent_1, args);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore -- FIXME: strictBindCallApply error - https://github.com/microsoft/fluentui/issues/17331
if (result === false && args[0]) {
var e = args[0];
if (e.preventDefault) {
e.preventDefault();
}
if (e.stopPropagation) {
e.stopPropagation();
}
e.cancelBubble = true;
}
}
catch (e) {
// ignore
}
return result;
};
eventRecord.elementCallback = processElementEvent;
if (target.addEventListener) {
target.addEventListener(eventName, processElementEvent, options);
}
else if (target.attachEvent) {
// IE8
target.attachEvent('on' + eventName, processElementEvent);
}
}
else {
var processObjectEvent = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (_this._isDisposed) {
return;
}
return callback.apply(parent_1, args);
};
eventRecord.objectCallback = processObjectEvent;
}
// Remember the record locally, so that it can be removed.
this._eventRecords.push(eventRecord);
}
};
EventGroup.prototype.off = function (target, eventName, callback, options) {
for (var i = 0; i < this._eventRecords.length; i++) {
var eventRecord = this._eventRecords[i];
if ((!target || target === eventRecord.target) &&
(!eventName || eventName === eventRecord.eventName) &&
(!callback || callback === eventRecord.callback) &&
(typeof options !== 'boolean' || options === eventRecord.options)) {
var events = eventRecord.target.__events__;
var targetArrayLookup = events[eventRecord.eventName];
var targetArray = targetArrayLookup ? targetArrayLookup[this._id] : null;
// We may have already target's entries, so check for null.
if (targetArray) {
if (targetArray.length === 1 || !callback) {
targetArrayLookup.count -= targetArray.length;
delete events[eventRecord.eventName][this._id];
}
else {
targetArrayLookup.count--;
targetArray.splice(targetArray.indexOf(eventRecord), 1);
}
if (!targetArrayLookup.count) {
delete events[eventRecord.eventName];
}
}
if (eventRecord.elementCallback) {
if (eventRecord.target.removeEventListener) {
eventRecord.target.removeEventListener(eventRecord.eventName, eventRecord.elementCallback, eventRecord.options);
}
else if (eventRecord.target.detachEvent) {
// IE8
eventRecord.target.detachEvent('on' + eventRecord.eventName, eventRecord.elementCallback);
}
}
this._eventRecords.splice(i--, 1);
}
}
};
/** Trigger the given event in the context of this instance of EventGroup. */
EventGroup.prototype.raise = function (eventName, eventArgs, bubbleEvent) {
return EventGroup.raise(this._parent, eventName, eventArgs, bubbleEvent);
};
/** Declare an event as being supported by this instance of EventGroup. */
EventGroup.prototype.declare = function (event) {
var declaredEvents = (this._parent.__declaredEvents = this._parent.__declaredEvents || {});
if (typeof event === 'string') {
declaredEvents[event] = true;
}
else {
for (var i = 0; i < event.length; i++) {
declaredEvents[event[i]] = true;
}
}
};
EventGroup._uniqueId = 0;
return EventGroup;
}());
//# sourceMappingURL=EventGroup.js.map
}),
"./node_modules/@fluentui/utilities/lib/FocusRectsProvider.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/FocusRectsProvider.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FocusRectsProvider: () => (FocusRectsProvider)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _useFocusRects__rspack_import_1 = __webpack_require__(/*! ./useFocusRects */ "./node_modules/@fluentui/utilities/lib/useFocusRects.js");
var FocusRectsProvider = function (props) {
var providerRef = props.providerRef, layerRoot = props.layerRoot;
var registeredProviders = react__rspack_import_0.useState([])[0];
var parentContext = react__rspack_import_0.useContext(_useFocusRects__rspack_import_1.FocusRectsContext);
// Inherit the parent context if it exists, unless this is a layer root.
// This allows the topmost provider element in the DOM tree to handle the focus events.
// Since layers are in a separate HTML tree from their parent, they shouldn't use the parent's providerRef.
var inheritParentContext = parentContext !== undefined && !layerRoot;
var context = react__rspack_import_0.useMemo(function () {
return inheritParentContext
? undefined
: {
providerRef: providerRef,
registeredProviders: registeredProviders,
registerProvider: function (ref) {
// Register this child provider with the current context, and any parent contexts
registeredProviders.push(ref);
parentContext === null || parentContext === void 0 ? void 0 : parentContext.registerProvider(ref);
},
unregisterProvider: function (ref) {
parentContext === null || parentContext === void 0 ? void 0 : parentContext.unregisterProvider(ref);
var i = registeredProviders.indexOf(ref);
if (i >= 0) {
registeredProviders.splice(i, 1);
}
},
};
}, [providerRef, registeredProviders, parentContext, inheritParentContext]);
react__rspack_import_0.useEffect(function () {
if (context) {
context.registerProvider(context.providerRef);
return function () { return context.unregisterProvider(context.providerRef); };
}
}, [context]);
// Create a new context provider if this is not inheriting from the parent.
if (context) {
return react__rspack_import_0.createElement(_useFocusRects__rspack_import_1.FocusRectsContext.Provider, { value: context }, props.children);
}
else {
return react__rspack_import_0.createElement(react__rspack_import_0.Fragment, null, props.children);
}
};
//# sourceMappingURL=FocusRectsProvider.js.map
}),
"./node_modules/@fluentui/utilities/lib/GlobalSettings.js":
/*!****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/GlobalSettings.js ***!
\****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
GlobalSettings: () => (GlobalSettings)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/**
* Storing global state in local module variables has issues when more than one copy
* if the module gets loaded on the page (due to a bundling error or simply by consuming
* a prebundled script.)
*
* This file contains helpers to deal with the getting and setting local state, and allows
* callers to get called back when it mutates.
*/
var GLOBAL_SETTINGS_PROP_NAME = '__globalSettings__';
var CALLBACK_STATE_PROP_NAME = '__callbacks__';
var _counter = 0;
/**
* Global settings helper, which stores settings in the global (window) namespace.
* If window is not provided, it will store settings in module scope. Provides a
* way to observe changes as well when their values change.
*
* @public
* {@docCategory GlobalSettings}
*/
var GlobalSettings = /** @class */ (function () {
function GlobalSettings() {
}
GlobalSettings.getValue = function (key, defaultValue) {
var globalSettings = _getGlobalSettings();
if (globalSettings[key] === undefined) {
globalSettings[key] = typeof defaultValue === 'function' ? defaultValue() : defaultValue;
}
return globalSettings[key];
};
GlobalSettings.setValue = function (key, value) {
var globalSettings = _getGlobalSettings();
var callbacks = globalSettings[CALLBACK_STATE_PROP_NAME];
var oldValue = globalSettings[key];
if (value !== oldValue) {
globalSettings[key] = value;
var changeDescription = {
oldValue: oldValue,
value: value,
key: key,
};
for (var id in callbacks) {
if (callbacks.hasOwnProperty(id)) {
callbacks[id](changeDescription);
}
}
}
return value;
};
GlobalSettings.addChangeListener = function (cb) {
// Note: we use generated ids on the callbacks to create a map of the callbacks, which optimizes removal.
// (It's faster to delete a key than it is to look up the index of an object and splice an array.)
var id = cb.__id__;
var callbacks = _getCallbacks();
if (!id) {
id = cb.__id__ = String(_counter++);
}
callbacks[id] = cb;
};
GlobalSettings.removeChangeListener = function (cb) {
var callbacks = _getCallbacks();
delete callbacks[cb.__id__];
};
return GlobalSettings;
}());
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _getGlobalSettings() {
var _a;
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var globalObj = win || {};
if (!globalObj[GLOBAL_SETTINGS_PROP_NAME]) {
globalObj[GLOBAL_SETTINGS_PROP_NAME] = (_a = {},
_a[CALLBACK_STATE_PROP_NAME] = {},
_a);
}
return globalObj[GLOBAL_SETTINGS_PROP_NAME];
}
function _getCallbacks() {
var globalSettings = _getGlobalSettings();
return globalSettings[CALLBACK_STATE_PROP_NAME];
}
//# sourceMappingURL=GlobalSettings.js.map
}),
"./node_modules/@fluentui/utilities/lib/KeyCodes.js":
/*!**********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/KeyCodes.js ***!
\**********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
KeyCodes: () => (KeyCodes)
});
/**
* Simulated enum for keycodes. These will get inlined by uglify when used much like an enum
*
* @public
* {@docCategory KeyCodes}
*/
var KeyCodes = {
backspace: 8,
tab: 9,
enter: 13,
shift: 16,
ctrl: 17,
alt: 18,
pauseBreak: 19,
capslock: 20,
escape: 27,
space: 32,
pageUp: 33,
pageDown: 34,
end: 35,
home: 36,
left: 37,
up: 38,
right: 39,
down: 40,
insert: 45,
del: 46,
zero: 48,
one: 49,
two: 50,
three: 51,
four: 52,
five: 53,
six: 54,
seven: 55,
eight: 56,
nine: 57,
colon: 58,
a: 65,
b: 66,
c: 67,
d: 68,
e: 69,
f: 70,
g: 71,
h: 72,
i: 73,
j: 74,
k: 75,
l: 76,
m: 77,
n: 78,
o: 79,
p: 80,
q: 81,
r: 82,
s: 83,
t: 84,
u: 85,
v: 86,
w: 87,
x: 88,
y: 89,
z: 90,
leftWindow: 91,
rightWindow: 92,
select: 93,
/* eslint-disable @typescript-eslint/naming-convention */
zero_numpad: 96,
one_numpad: 97,
two_numpad: 98,
three_numpad: 99,
four_numpad: 100,
five_numpad: 101,
six_numpad: 102,
seven_numpad: 103,
eight_numpad: 104,
nine_numpad: 105,
/* eslint-enable @typescript-eslint/naming-convention */
multiply: 106,
add: 107,
subtract: 109,
decimalPoint: 110,
divide: 111,
f1: 112,
f2: 113,
f3: 114,
f4: 115,
f5: 116,
f6: 117,
f7: 118,
f8: 119,
f9: 120,
f10: 121,
f11: 122,
f12: 123,
numlock: 144,
scrollLock: 145,
semicolon: 186,
equalSign: 187,
comma: 188,
dash: 189,
period: 190,
forwardSlash: 191,
graveAccent: 192,
openBracket: 219,
backSlash: 220,
closeBracket: 221,
singleQuote: 222,
};
//# sourceMappingURL=KeyCodes.js.map
}),
"./node_modules/@fluentui/utilities/lib/Rectangle.js":
/*!***********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/Rectangle.js ***!
\***********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Rectangle: () => (Rectangle)
});
/**
* Rectangle helper class.
*
* @public
* {@docCategory Rectangle}
*/
var Rectangle = /** @class */ (function () {
function Rectangle(left, right, top, bottom) {
if (left === void 0) { left = 0; }
if (right === void 0) { right = 0; }
if (top === void 0) { top = 0; }
if (bottom === void 0) { bottom = 0; }
this.top = top;
this.bottom = bottom;
this.left = left;
this.right = right;
}
Object.defineProperty(Rectangle.prototype, "width", {
/**
* Calculated automatically by subtracting the right from left
*/
get: function () {
return this.right - this.left;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Rectangle.prototype, "height", {
/**
* Calculated automatically by subtracting the bottom from top.
*/
get: function () {
return this.bottom - this.top;
},
enumerable: false,
configurable: true
});
/**
* Tests if another rect is approximately equal to this rect (within 4 decimal places.)
*/
Rectangle.prototype.equals = function (rect) {
// Fixing to 4 decimal places because it allows enough precision and will handle cases when something
// should be rounded, like .999999 should round to 1.
return (parseFloat(this.top.toFixed(4)) === parseFloat(rect.top.toFixed(4)) &&
parseFloat(this.bottom.toFixed(4)) === parseFloat(rect.bottom.toFixed(4)) &&
parseFloat(this.left.toFixed(4)) === parseFloat(rect.left.toFixed(4)) &&
parseFloat(this.right.toFixed(4)) === parseFloat(rect.right.toFixed(4)));
};
return Rectangle;
}());
//# sourceMappingURL=Rectangle.js.map
}),
"./node_modules/@fluentui/utilities/lib/appendFunction.js":
/*!****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/appendFunction.js ***!
\****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
appendFunction: () => (appendFunction)
});
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Returns a single function which will call each of the given functions in the context of the
* parent.
*/
function appendFunction(parent) {
var functions = [];
for (var _i = 1; _i < arguments.length; _i++) {
functions[_i - 1] = arguments[_i];
}
if (functions.length < 2) {
return functions[0];
}
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
functions.forEach(function (f) { return f && f.apply(parent, args); });
};
}
//# sourceMappingURL=appendFunction.js.map
}),
"./node_modules/@fluentui/utilities/lib/aria.js":
/*!******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/aria.js ***!
\******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeAriaAttributeValues: () => (mergeAriaAttributeValues)
});
/**
* ARIA helper to concatenate attributes, returning undefined if all attributes
* are undefined. (Empty strings are not a valid ARIA attribute value.)
*
* @param ariaAttributes - ARIA attributes to merge
*/
function mergeAriaAttributeValues() {
var ariaAttributes = [];
for (var _i = 0; _i < arguments.length; _i++) {
ariaAttributes[_i] = arguments[_i];
}
var mergedAttribute = ariaAttributes
.filter(function (arg) { return arg; })
.join(' ')
.trim();
return mergedAttribute === '' ? undefined : mergedAttribute;
}
//# sourceMappingURL=aria.js.map
}),
"./node_modules/@fluentui/utilities/lib/array.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/array.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
addElementAtIndex: () => (addElementAtIndex),
arraysEqual: () => (arraysEqual),
createArray: () => (createArray),
find: () => (find),
findIndex: () => (findIndex),
flatten: () => (flatten),
removeIndex: () => (removeIndex),
replaceElement: () => (replaceElement),
toMatrix: () => (toMatrix)
});
/**
* Helper to find the index of an item within an array, using a callback to
* determine the match.
*
* @public
* @param array - Array to search.
* @param cb - Callback which returns true on matches.
* @param fromIndex - Optional index to start from (defaults to 0)
*/
function findIndex(array, cb, fromIndex) {
if (fromIndex === void 0) { fromIndex = 0; }
var index = -1;
for (var i = fromIndex; array && i < array.length; i++) {
if (cb(array[i], i)) {
index = i;
break;
}
}
return index;
}
/**
* Helper to find the first item within an array that satisfies the callback.
* @param array - Array to search
* @param cb - Callback which returns true on matches
*/
function find(array, cb) {
var index = findIndex(array, cb);
if (index < 0) {
return undefined;
}
return array[index];
}
/**
* Creates an array of a given size and helper method to populate.
*
* @public
* @param size - Size of array.
* @param getItem - Callback to populate given cell index.
*/
function createArray(size, getItem) {
var array = [];
for (var i = 0; i < size; i++) {
array.push(getItem(i));
}
return array;
}
/**
* Convert the given array to a matrix with columnCount number
* of columns.
*
* @public
* @param items - The array to convert
* @param columnCount - The number of columns for the resulting matrix
* @returns A matrix of items
*/
function toMatrix(items, columnCount) {
return items.reduce(function (rows, currentValue, index) {
if (index % columnCount === 0) {
rows.push([currentValue]);
}
else {
rows[rows.length - 1].push(currentValue);
}
return rows;
}, []);
}
/**
* Given an array, it returns a new array that does not contain the item at the given index.
* @param array - The array to operate on
* @param index - The index of the element to remove
*/
function removeIndex(array, index) {
return array.filter(function (_, i) { return index !== i; });
}
/**
* Given an array, this function returns a new array where the element at a given index has been replaced.
* @param array - The array to operate on
* @param newElement - The element that will be placed in the new array
* @param index - The index of the element that should be replaced
*/
function replaceElement(array, newElement, index) {
var copy = array.slice();
copy[index] = newElement;
return copy;
}
/**
* Given an array, this function returns a new array where an element has been inserted at the given index.
* @param array - The array to operate on
* @param index - The index where an element should be inserted
* @param itemToAdd - The element to insert
*/
function addElementAtIndex(array, index, itemToAdd) {
var copy = array.slice();
copy.splice(index, 0, itemToAdd);
return copy;
}
/**
* Given an array where each element is of type T or T[], flatten it into an array of T
* @param array - The array where each element can optionally also be an array
*/
function flatten(array) {
var result = [];
array.forEach(function (item) { return (result = result.concat(item)); });
return result;
}
/**
* Returns a boolean indicating if the two given arrays are equal in length and values.
*
* @param array1 - First array to compare
* @param array2 - Second array to compare
* @returns True if the arrays are the same length and have the same values in the same positions, false otherwise.
*/
function arraysEqual(array1, array2) {
if (array1.length !== array2.length) {
return false;
}
for (var i = 0; i < array1.length; i++) {
if (array1[i] !== array2[i]) {
return false;
}
}
return true;
}
//# sourceMappingURL=array.js.map
}),
"./node_modules/@fluentui/utilities/lib/classNamesFunction.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/classNamesFunction.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
classNamesFunction: () => (classNamesFunction)
});
/* import */ var _fluentui_merge_styles__rspack_import_0 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyleSets.js");
/* import */ var _rtl__rspack_import_1 = __webpack_require__(/*! ./rtl */ "./node_modules/@fluentui/utilities/lib/rtl.js");
/* import */ var _dom__rspack_import_3 = __webpack_require__(/*! ./dom */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var MAX_CACHE_COUNT = 50;
var DEFAULT_SPECIFICITY_MULTIPLIER = 5;
var _memoizedClassNames = 0;
var stylesheet = _fluentui_merge_styles__rspack_import_0.Stylesheet.getInstance();
if (stylesheet && stylesheet.onReset) {
stylesheet.onReset(function () { return _memoizedClassNames++; });
}
// Note that because of the caching nature within the classNames memoization,
// I've disabled this rule to simply be able to work with any types.
/* eslint-disable @typescript-eslint/no-explicit-any */
// This represents a prop we attach to each Map to indicate the cached return value
// associated with the graph node.
var retVal = '__retval__';
/**
* Creates a getClassNames function which calls getStyles given the props, and injects them
* into mergeStyleSets.
*
* Note that the props you pass in on every render should be in the same order and
* immutable (numbers, strings, and booleans). This will allow the results to be memoized. Violating
* these will cause extra recalcs to occur.
*/
function classNamesFunction(options) {
// We build a trie where each node is a Map. The map entry key represents an argument
// value, and the entry value is another node (Map). Each node has a `__retval__`
// property which is used to hold the cached response.
if (options === void 0) { options = {}; }
// To derive the response, we can simply ensure the arguments are added or already
// exist in the trie. At the last node, if there is a `__retval__` we return that. Otherwise
// we call the `getStyles` api to evaluate, cache on the property, and return that.
// let map: IRecursiveMemoNode = new Map();
var windowMap = new Map();
var styleCalcCount = 0;
var getClassNamesCount = 0;
var currentMemoizedClassNames = _memoizedClassNames;
var getClassNames = function (styleFunctionOrObject, styleProps) {
var _a;
if (styleProps === void 0) { styleProps = {}; }
// If useStaticStyles is true, styleFunctionOrObject returns slot to classname mappings.
// If there is also no style overrides, we can skip merge styles completely and
// simply return the result from the style funcion.
if (options.useStaticStyles &&
typeof styleFunctionOrObject === 'function' &&
styleFunctionOrObject.__noStyleOverride__) {
return styleFunctionOrObject(styleProps);
}
getClassNamesCount++;
var shadowConfig = styleFunctionOrObject
? styleFunctionOrObject.__shadowConfig__
: undefined;
var key = shadowConfig && shadowConfig.window ? shadowConfig.window : '__default__';
if (!windowMap.has(key)) {
windowMap.set(key, new Map());
}
var current = windowMap.get(key);
// let current: Map = map;
var theme = styleProps.theme;
var rtl = theme && theme.rtl !== undefined ? theme.rtl : (0,_rtl__rspack_import_1.getRTL)();
var disableCaching = options.disableCaching;
// On reset of our stylesheet, reset memoized cache.
if (currentMemoizedClassNames !== _memoizedClassNames) {
currentMemoizedClassNames = _memoizedClassNames;
// map = new Map();
windowMap.set(key, new Map());
current = windowMap.get(key);
styleCalcCount = 0;
}
if (!options.disableCaching) {
current = _traverseMap(windowMap.get(key), styleFunctionOrObject);
current = _traverseMap(current, styleProps);
}
if (disableCaching || !current[retVal]) {
if (styleFunctionOrObject === undefined) {
current[retVal] = {};
}
else {
current[retVal] = (0,_fluentui_merge_styles__rspack_import_2.mergeCssSets)([
(typeof styleFunctionOrObject === 'function'
? styleFunctionOrObject(styleProps)
: styleFunctionOrObject),
], {
shadowConfig: styleFunctionOrObject.__shadowConfig__,
rtl: !!rtl,
specificityMultiplier: options.useStaticStyles ? DEFAULT_SPECIFICITY_MULTIPLIER : undefined,
});
}
if (!disableCaching) {
styleCalcCount++;
}
}
if (styleCalcCount > (options.cacheSize || MAX_CACHE_COUNT)) {
var win = (0,_dom__rspack_import_3.getWindow)();
if ((_a = win === null || win === void 0 ? void 0 : win.FabricConfig) === null || _a === void 0 ? void 0 : _a.enableClassNameCacheFullWarning) {
// eslint-disable-next-line no-console
console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(styleCalcCount, "/").concat(getClassNamesCount, "."));
// eslint-disable-next-line no-console
console.trace();
}
windowMap.get(key).clear();
styleCalcCount = 0;
// Mutate the options passed in, that's all we can do.
options.disableCaching = true;
}
// Note: the retVal is an attached property on the Map; not a key in the Map. We use this attached property to
// cache the return value for this branch of the graph.
return current[retVal];
};
return getClassNames;
}
function _traverseEdge(current, value) {
value = _normalizeValue(value);
if (!current.has(value)) {
current.set(value, new Map());
}
return current.get(value);
}
function _traverseMap(current, inputs) {
if (typeof inputs === 'function') {
var cachedInputsFromStyled = inputs.__cachedInputs__;
if (cachedInputsFromStyled) {
// The styled helper will generate the styles function and will attach the cached
// inputs (consisting of the default styles, customzied styles, and user provided styles.)
// These should be used as cache keys for deriving the memoized value.
for (var _i = 0, _a = inputs.__cachedInputs__; _i < _a.length; _i++) {
var input = _a[_i];
current = _traverseEdge(current, input);
}
}
else {
current = _traverseEdge(current, inputs);
}
}
else if (typeof inputs === 'object') {
for (var propName in inputs) {
if (inputs.hasOwnProperty(propName)) {
current = _traverseEdge(current, inputs[propName]);
}
}
}
return current;
}
function _normalizeValue(value) {
switch (value) {
case undefined:
return '__undefined__';
case null:
return '__null__';
default:
return value;
}
}
//# sourceMappingURL=classNamesFunction.js.map
}),
"./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js":
/*!********************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/componentAs/composeComponentAs.js ***!
\********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
composeComponentAs: () => (composeComponentAs)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _memoize__rspack_import_1 = __webpack_require__(/*! ../memoize */ "./node_modules/@fluentui/utilities/lib/memoize.js");
function createComposedComponent(outer) {
var Outer = outer;
var outerMemoizer = (0,_memoize__rspack_import_1.createMemoizer)(function (inner) {
if (outer === inner) {
throw new Error('Attempted to compose a component with itself.');
}
var Inner = inner;
var innerMemoizer = (0,_memoize__rspack_import_1.createMemoizer)(function (defaultRender) {
var InnerWithDefaultRender = function (innerProps) {
return react__rspack_import_0.createElement(Inner, (0,tslib__rspack_import_2.__assign)({}, innerProps, { defaultRender: defaultRender }));
};
return InnerWithDefaultRender;
});
var OuterWithDefaultRender = function (outerProps) {
var defaultRender = outerProps.defaultRender;
return react__rspack_import_0.createElement(Outer, (0,tslib__rspack_import_2.__assign)({}, outerProps, { defaultRender: defaultRender ? innerMemoizer(defaultRender) : Inner }));
};
return OuterWithDefaultRender;
});
return outerMemoizer;
}
var componentAsMemoizer = (0,_memoize__rspack_import_1.createMemoizer)(createComposedComponent);
/**
* Composes two components which conform to the `IComponentAs` specification; that is, two
* components which accept a `defaultRender` prop, which is a 'default' implementation of
* a component which accepts the same overall props.
*
* @public
*/
function composeComponentAs(outer, inner) {
return componentAsMemoizer(outer)(inner);
}
//# sourceMappingURL=composeComponentAs.js.map
}),
"./node_modules/@fluentui/utilities/lib/controlled.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/controlled.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
isControlled: () => (isControlled)
});
/**
* Determines whether a component is controlled.
* @param props - Component props
* @param valueProp - Prop containing the controlled value
* @returns true if controlled, false if uncontrolled
*/
function isControlled(props, valueProp) {
// React's built-in considers a prop to be provided if its value is non-null/undefined.
// Mirror that behavior here (rather than checking for just undefined).
return props[valueProp] !== undefined && props[valueProp] !== null;
}
//# sourceMappingURL=controlled.js.map
}),
"./node_modules/@fluentui/utilities/lib/createMergedRef.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/createMergedRef.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createMergedRef: () => (createMergedRef)
});
/* import */ var _array__rspack_import_0 = __webpack_require__(/*! ./array */ "./node_modules/@fluentui/utilities/lib/array.js");
/**
* Set up a ref resolver function given internal state managed for the ref.
* @param local Set
*/
var createResolver = function (local) {
return function (newValue) {
for (var _i = 0, _a = local.refs; _i < _a.length; _i++) {
var ref = _a[_i];
if (typeof ref === 'function') {
ref(newValue);
}
else if (ref) {
// work around the immutability of the React.Ref type
// eslint-disable-next-line @typescript-eslint/no-deprecated
ref.current = newValue;
}
}
};
};
/**
* Helper to merge refs from within class components.
*/
var createMergedRef = function (value) {
var local = {
refs: [],
};
return function () {
var newRefs = [];
for (var _i = 0; _i < arguments.length; _i++) {
newRefs[_i] = arguments[_i];
}
if (!local.resolver || !(0,_array__rspack_import_0.arraysEqual)(local.refs, newRefs)) {
local.resolver = createResolver(local);
}
local.refs = newRefs;
return local.resolver;
};
};
//# sourceMappingURL=createMergedRef.js.map
}),
"./node_modules/@fluentui/utilities/lib/css.js":
/*!*****************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/css.js ***!
\*****************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
css: () => (css)
});
/**
* Concatination helper, which can merge class names together. Skips over falsey values.
*
* @public
*/
function css() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var classes = [];
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
if (arg) {
if (typeof arg === 'string') {
classes.push(arg);
}
else if (arg.hasOwnProperty('toString') && typeof arg.toString === 'function') {
classes.push(arg.toString());
}
else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
for (var key in arg) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (arg[key]) {
classes.push(key);
}
}
}
}
}
return classes.join(' ');
}
//# sourceMappingURL=css.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/Customizations.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/Customizations.js ***!
\*******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Customizations: () => (Customizations)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var _GlobalSettings__rspack_import_0 = __webpack_require__(/*! ../GlobalSettings */ "./node_modules/@fluentui/utilities/lib/GlobalSettings.js");
var CustomizationsGlobalKey = 'customizations';
var NO_CUSTOMIZATIONS = { settings: {}, scopedSettings: {}, inCustomizerContext: false };
var _allSettings = _GlobalSettings__rspack_import_0.GlobalSettings.getValue(CustomizationsGlobalKey, {
settings: {},
scopedSettings: {},
inCustomizerContext: false,
});
var _events = [];
var Customizations = /** @class */ (function () {
function Customizations() {
}
Customizations.reset = function () {
_allSettings.settings = {};
_allSettings.scopedSettings = {};
};
/** Apply global Customization settings.
* @example Customizations.applySettings(\{ theme: \{...\} \});
*/
Customizations.applySettings = function (settings) {
_allSettings.settings = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, _allSettings.settings), settings);
Customizations._raiseChange();
};
/** Apply Customizations to a particular named scope, like a component.
* @example Customizations.applyScopedSettings('Nav', \{ styles: () =\> \{\} \});
*/
Customizations.applyScopedSettings = function (scopeName, settings) {
_allSettings.scopedSettings[scopeName] = (0,tslib__rspack_import_1.__assign)((0,tslib__rspack_import_1.__assign)({}, _allSettings.scopedSettings[scopeName]), settings);
Customizations._raiseChange();
};
Customizations.getSettings = function (properties, scopeName, localSettings) {
if (localSettings === void 0) { localSettings = NO_CUSTOMIZATIONS; }
var settings = {};
var localScopedSettings = (scopeName && localSettings.scopedSettings[scopeName]) || {};
var globalScopedSettings = (scopeName && _allSettings.scopedSettings[scopeName]) || {};
for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
var property = properties_1[_i];
settings[property] =
localScopedSettings[property] ||
localSettings.settings[property] ||
globalScopedSettings[property] ||
_allSettings.settings[property];
}
return settings;
};
/** Used to run some code that sets Customizations without triggering an update until the end.
* Useful for applying Customizations that don't affect anything currently rendered, or for
* applying many customizations at once.
* @param suppressUpdate - Do not raise the change event at the end, preventing all updates
*/
Customizations.applyBatchedUpdates = function (code, suppressUpdate) {
Customizations._suppressUpdates = true;
try {
code();
}
catch (_a) {
/* do nothing */
}
Customizations._suppressUpdates = false;
if (!suppressUpdate) {
Customizations._raiseChange();
}
};
Customizations.observe = function (onChange) {
_events.push(onChange);
};
Customizations.unobserve = function (onChange) {
_events = _events.filter(function (cb) { return cb !== onChange; });
};
Customizations._raiseChange = function () {
if (!Customizations._suppressUpdates) {
_events.forEach(function (cb) { return cb(); });
}
};
return Customizations;
}());
//# sourceMappingURL=Customizations.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/Customizer.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/Customizer.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Customizer: () => (Customizer)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Customizations__rspack_import_2 = __webpack_require__(/*! ./Customizations */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _CustomizerContext__rspack_import_3 = __webpack_require__(/*! ./CustomizerContext */ "./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js");
/* import */ var _mergeCustomizations__rspack_import_4 = __webpack_require__(/*! ./mergeCustomizations */ "./node_modules/@fluentui/utilities/lib/customizations/mergeCustomizations.js");
/**
* The Customizer component allows for default props to be mixed into components which
* are decorated with the customizable() decorator, or use the styled HOC. This enables
* injection scenarios like:
*
* 1. render svg icons instead of the icon font within all buttons
* 2. inject a custom theme object into a component
*
* Props are provided via the settings prop which should be one of the following:
* - A json map which contains 1 or more name/value pairs representing injectable props.
* - A function that receives the current settings and returns the new ones that apply to the scope
*
* @public
*
* @deprecated This component is deprecated for purpose of applying theme to components
* as of `@fluentui/react` version 8. Use `ThemeProvider` for applying theme instead.
*/
var Customizer = /** @class */ (function (_super) {
(0,tslib__rspack_import_1.__extends)(Customizer, _super);
function Customizer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._onCustomizationChange = function () { return _this.forceUpdate(); };
return _this;
}
Customizer.prototype.componentDidMount = function () {
_Customizations__rspack_import_2.Customizations.observe(this._onCustomizationChange);
};
Customizer.prototype.componentWillUnmount = function () {
_Customizations__rspack_import_2.Customizations.unobserve(this._onCustomizationChange);
};
Customizer.prototype.render = function () {
var _this = this;
var contextTransform = this.props.contextTransform;
return (react__rspack_import_0.createElement(_CustomizerContext__rspack_import_3.CustomizerContext.Consumer, null, function (parentContext) {
var newContext = (0,_mergeCustomizations__rspack_import_4.mergeCustomizations)(_this.props, parentContext);
if (contextTransform) {
newContext = contextTransform(newContext);
}
return react__rspack_import_0.createElement(_CustomizerContext__rspack_import_3.CustomizerContext.Provider, { value: newContext }, _this.props.children);
}));
};
return Customizer;
}(react__rspack_import_0.Component));
//# sourceMappingURL=Customizer.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js ***!
\**********************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
CustomizerContext: () => (CustomizerContext)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
var CustomizerContext = react__rspack_import_0.createContext({
customizations: {
inCustomizerContext: false,
settings: {},
scopedSettings: {},
},
});
//# sourceMappingURL=CustomizerContext.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/customizable.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/customizable.js ***!
\*****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
customizable: () => (customizable)
});
/* import */ var tslib__rspack_import_3 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Customizations__rspack_import_4 = __webpack_require__(/*! ./Customizations */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _hoistStatics__rspack_import_10 = __webpack_require__(/*! ../hoistStatics */ "./node_modules/@fluentui/utilities/lib/hoistStatics.js");
/* import */ var _CustomizerContext__rspack_import_6 = __webpack_require__(/*! ./CustomizerContext */ "./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js");
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var _fluentui_merge_styles__rspack_import_8 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSets.js");
/* import */ var _shadowDom_contexts_MergeStylesShadowRootConsumer__rspack_import_5 = __webpack_require__(/*! ../shadowDom/contexts/MergeStylesShadowRootConsumer */ "./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootConsumer.js");
/* import */ var _dom_getWindow__rspack_import_7 = __webpack_require__(/*! ../dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _fluentui_react_window_provider__rspack_import_9 = __webpack_require__(/*! @fluentui/react-window-provider */ "./node_modules/@fluentui/react-window-provider/lib/WindowProvider.js");
/* import */ var _memoize__rspack_import_1 = __webpack_require__(/*! ../memoize */ "./node_modules/@fluentui/utilities/lib/memoize.js");
var memoizedMakeShadowConfig = (0,_memoize__rspack_import_1.memoizeFunction)(_fluentui_merge_styles__rspack_import_2.makeShadowConfig);
var mergeComponentStyles = (0,_memoize__rspack_import_1.memoizeFunction)(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function (defaultStyles, componentStyles, shadowConfig) {
var _a;
var styles = (_a = componentStyles !== null && componentStyles !== void 0 ? componentStyles : defaultStyles) !== null && _a !== void 0 ? _a : {};
styles.__shadowConfig__ = shadowConfig;
return styles;
});
function customizable(scope, fields, concatStyles) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function customizableFactory(ComposedComponent) {
var _a;
var resultClass = (_a = /** @class */ (function (_super) {
(0,tslib__rspack_import_3.__extends)(ComponentWithInjectedProps, _super);
function ComponentWithInjectedProps(props) {
var _this = _super.call(this, props) || this;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
_this._styleCache = {};
_this._onSettingChanged = _this._onSettingChanged.bind(_this);
return _this;
}
ComponentWithInjectedProps.prototype.componentDidMount = function () {
_Customizations__rspack_import_4.Customizations.observe(this._onSettingChanged);
};
ComponentWithInjectedProps.prototype.componentWillUnmount = function () {
_Customizations__rspack_import_4.Customizations.unobserve(this._onSettingChanged);
};
ComponentWithInjectedProps.prototype.render = function () {
var _this = this;
return (react__rspack_import_0.createElement(_shadowDom_contexts_MergeStylesShadowRootConsumer__rspack_import_5.MergeStylesShadowRootConsumer, { stylesheetKey: scope }, function (inShadow) {
return (react__rspack_import_0.createElement(_CustomizerContext__rspack_import_6.CustomizerContext.Consumer, null, function (context) {
var _b;
var defaultProps = _Customizations__rspack_import_4.Customizations.getSettings(fields, scope, context.customizations);
var win = (_b = _this.context.window) !== null && _b !== void 0 ? _b : (0,_dom_getWindow__rspack_import_7.getWindow)();
var shadowConfig = memoizedMakeShadowConfig(scope, inShadow, win);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var componentProps = _this.props;
// If defaultProps.styles is a function, evaluate it before calling concatStyleSets
if (defaultProps.styles && typeof defaultProps.styles === 'function') {
defaultProps.styles = defaultProps.styles((0,tslib__rspack_import_3.__assign)((0,tslib__rspack_import_3.__assign)({}, defaultProps), componentProps));
}
// If concatStyles is true and custom styles have been defined compute those styles
if (concatStyles && defaultProps.styles) {
if (_this._styleCache.default !== defaultProps.styles ||
_this._styleCache.component !== componentProps.styles) {
var mergedStyles = (0,_fluentui_merge_styles__rspack_import_8.concatStyleSets)(defaultProps.styles, componentProps.styles);
mergedStyles.__shadowConfig__ = shadowConfig;
_this._styleCache.default = defaultProps.styles;
_this._styleCache.component = componentProps.styles;
_this._styleCache.merged = mergedStyles;
}
return (react__rspack_import_0.createElement(ComposedComponent, (0,tslib__rspack_import_3.__assign)({}, defaultProps, componentProps, { styles: _this._styleCache.merged })));
}
var styles = mergeComponentStyles(defaultProps.styles, componentProps.styles, shadowConfig);
return react__rspack_import_0.createElement(ComposedComponent, (0,tslib__rspack_import_3.__assign)({}, defaultProps, componentProps, { styles: styles }));
}));
}));
};
ComponentWithInjectedProps.prototype._onSettingChanged = function () {
this.forceUpdate();
};
return ComponentWithInjectedProps;
}(react__rspack_import_0.Component)),
_a.displayName = 'Customized' + scope,
_a.contextType = _fluentui_react_window_provider__rspack_import_9.WindowContext,
_a);
return (0,_hoistStatics__rspack_import_10.hoistStatics)(ComposedComponent, resultClass);
};
}
//# sourceMappingURL=customizable.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/mergeCustomizations.js":
/*!************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/mergeCustomizations.js ***!
\************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeCustomizations: () => (mergeCustomizations)
});
/* import */ var _mergeSettings__rspack_import_0 = __webpack_require__(/*! ./mergeSettings */ "./node_modules/@fluentui/utilities/lib/customizations/mergeSettings.js");
/**
* Merge props and customizations giving priority to props over context.
* NOTE: This function will always perform multiple merge operations. Use with caution.
* @param props - New settings to merge in.
* @param parentContext - Context containing current settings.
* @returns Merged customizations.
*/
function mergeCustomizations(props, parentContext) {
var _a = (parentContext || {}).customizations, customizations = _a === void 0 ? { settings: {}, scopedSettings: {} } : _a;
return {
customizations: {
settings: (0,_mergeSettings__rspack_import_0.mergeSettings)(customizations.settings, props.settings),
scopedSettings: (0,_mergeSettings__rspack_import_0.mergeScopedSettings)(customizations.scopedSettings, props.scopedSettings),
inCustomizerContext: true,
},
};
}
//# sourceMappingURL=mergeCustomizations.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/mergeSettings.js":
/*!******************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/mergeSettings.js ***!
\******************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
mergeScopedSettings: () => (mergeScopedSettings),
mergeSettings: () => (mergeSettings)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/**
* Merge new and old settings, giving priority to new settings.
* New settings is optional in which case oldSettings is returned as-is.
* @param oldSettings - Old settings to fall back to.
* @param newSettings - New settings that will be merged over oldSettings.
* @returns Merged settings.
*/
function mergeSettings(oldSettings, newSettings) {
if (oldSettings === void 0) { oldSettings = {}; }
var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _settingsMergeWith(newSettings);
return mergeSettingsWith(oldSettings);
}
function mergeScopedSettings(oldSettings, newSettings) {
if (oldSettings === void 0) { oldSettings = {}; }
var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _scopedSettingsMergeWith(newSettings);
return mergeSettingsWith(oldSettings);
}
function _isSettingsFunction(settings) {
return typeof settings === 'function';
}
function _settingsMergeWith(newSettings) {
return function (settings) { return (newSettings ? (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, settings), newSettings) : settings); };
}
function _scopedSettingsMergeWith(scopedSettingsFromProps) {
if (scopedSettingsFromProps === void 0) { scopedSettingsFromProps = {}; }
return function (oldScopedSettings) {
var newScopedSettings = (0,tslib__rspack_import_0.__assign)({}, oldScopedSettings);
for (var scopeName in scopedSettingsFromProps) {
if (scopedSettingsFromProps.hasOwnProperty(scopeName)) {
newScopedSettings[scopeName] = (0,tslib__rspack_import_0.__assign)((0,tslib__rspack_import_0.__assign)({}, oldScopedSettings[scopeName]), scopedSettingsFromProps[scopeName]);
}
}
return newScopedSettings;
};
}
//# sourceMappingURL=mergeSettings.js.map
}),
"./node_modules/@fluentui/utilities/lib/customizations/useCustomizationSettings.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/customizations/useCustomizationSettings.js ***!
\*****************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useCustomizationSettings: () => (useCustomizationSettings)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _Customizations__rspack_import_2 = __webpack_require__(/*! ./Customizations */ "./node_modules/@fluentui/utilities/lib/customizations/Customizations.js");
/* import */ var _CustomizerContext__rspack_import_1 = __webpack_require__(/*! ./CustomizerContext */ "./node_modules/@fluentui/utilities/lib/customizations/CustomizerContext.js");
/**
* Hook to get Customizations settings from Customizations singleton or CustomizerContext.
* It will trigger component state update on settings change observed.
*/
function useCustomizationSettings(properties, scopeName) {
var forceUpdate = useForceUpdate();
var customizations = react__rspack_import_0.useContext(_CustomizerContext__rspack_import_1.CustomizerContext).customizations;
var inCustomizerContext = customizations.inCustomizerContext;
react__rspack_import_0.useEffect(function () {
if (!inCustomizerContext) {
_Customizations__rspack_import_2.Customizations.observe(forceUpdate);
}
return function () {
if (!inCustomizerContext) {
_Customizations__rspack_import_2.Customizations.unobserve(forceUpdate);
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps -- exclude forceUpdate
}, [inCustomizerContext]);
return _Customizations__rspack_import_2.Customizations.getSettings(properties, scopeName, customizations);
}
function useForceUpdate() {
var _a = react__rspack_import_0.useState(0), setValue = _a[1];
return function () { return setValue(function (value) { return ++value; }); };
}
//# sourceMappingURL=useCustomizationSettings.js.map
}),
"./node_modules/@fluentui/utilities/lib/dom/canUseDOM.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/dom/canUseDOM.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
canUseDOM: () => (canUseDOM)
});
/**
* Verifies if an application can use DOM.
*/
function canUseDOM() {
return (
// eslint-disable-next-line no-restricted-globals
typeof window !== 'undefined' &&
!!(
// eslint-disable-next-line no-restricted-globals, @typescript-eslint/no-deprecated
(window.document && window.document.createElement)));
}
//# sourceMappingURL=canUseDOM.js.map
}),
"./node_modules/@fluentui/utilities/lib/dom/getDocument.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/dom/getDocument.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getDocument: () => (getDocument)
});
/* import */ var _canUseDOM__rspack_import_0 = __webpack_require__(/*! ./canUseDOM */ "./node_modules/@fluentui/utilities/lib/dom/canUseDOM.js");
/**
* Helper to get the document object. Note that in popup window cases, document
* might be the wrong document, which is why we look at ownerDocument for the
* truth.
*
* @public
*/
function getDocument(rootElement) {
// eslint-disable-next-line no-restricted-globals
if (!(0,_canUseDOM__rspack_import_0.canUseDOM)() || typeof document === 'undefined') {
return undefined;
}
else {
var el = rootElement;
// eslint-disable-next-line no-restricted-globals
return el && el.ownerDocument ? el.ownerDocument : document;
}
}
//# sourceMappingURL=getDocument.js.map
}),
"./node_modules/@fluentui/utilities/lib/dom/getWindow.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/dom/getWindow.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getWindow: () => (getWindow)
});
/* import */ var _canUseDOM__rspack_import_0 = __webpack_require__(/*! ./canUseDOM */ "./node_modules/@fluentui/utilities/lib/dom/canUseDOM.js");
var _window = undefined;
// Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window"
// hits a memory leak, whereas aliasing it and calling "typeof _window" does not.
// Caching the window value at the file scope lets us minimize the impact.
try {
// eslint-disable-next-line no-restricted-globals
_window = window;
}
catch (e) {
/* no-op */
}
/**
* Helper to get the window object. The helper will make sure to use a cached variable
* of "window", to avoid overhead and memory leaks in IE11. Note that in popup scenarios the
* window object won't match the "global" window object, and for these scenarios, you should
* pass in an element hosted within the popup.
*
* @public
*/
function getWindow(rootElement) {
if (!(0,_canUseDOM__rspack_import_0.canUseDOM)() || typeof _window === 'undefined') {
return undefined;
}
else {
var el = rootElement;
return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : _window;
}
}
//# sourceMappingURL=getWindow.js.map
}),
"./node_modules/@fluentui/utilities/lib/dom/on.js":
/*!********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/dom/on.js ***!
\********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
on: () => (on)
});
function on(element, eventName, callback, options) {
element.addEventListener(eventName, callback, options);
return function () { return element.removeEventListener(eventName, callback, options); };
}
//# sourceMappingURL=on.js.map
}),
"./node_modules/@fluentui/utilities/lib/extendComponent.js":
/*!*****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/extendComponent.js ***!
\*****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
extendComponent: () => (extendComponent)
});
/* import */ var _appendFunction__rspack_import_0 = __webpack_require__(/*! ./appendFunction */ "./node_modules/@fluentui/utilities/lib/appendFunction.js");
/**
* Extends a component's lifetime methods by appending new functions to the existing lifetime functions.
*/
function extendComponent(parent, methods) {
for (var name_1 in methods) {
if (methods.hasOwnProperty(name_1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
parent[name_1] = (0,_appendFunction__rspack_import_0.appendFunction)(parent, parent[name_1], methods[name_1]);
}
}
}
//# sourceMappingURL=extendComponent.js.map
}),
"./node_modules/@fluentui/utilities/lib/focus.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/focus.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
doesElementContainFocus: () => (doesElementContainFocus),
focusAsync: () => (focusAsync),
focusFirstChild: () => (focusFirstChild),
getElementIndexPath: () => (getElementIndexPath),
getFirstFocusable: () => (getFirstFocusable),
getFirstTabbable: () => (getFirstTabbable),
getFocusableByIndexPath: () => (getFocusableByIndexPath),
getLastFocusable: () => (getLastFocusable),
getLastTabbable: () => (getLastTabbable),
getNextElement: () => (getNextElement),
getPreviousElement: () => (getPreviousElement),
isElementFocusSubZone: () => (isElementFocusSubZone),
isElementFocusZone: () => (isElementFocusZone),
isElementTabbable: () => (isElementTabbable),
isElementVisible: () => (isElementVisible),
isElementVisibleAndNotHidden: () => (isElementVisibleAndNotHidden),
shouldWrapFocus: () => (shouldWrapFocus)
});
/* import */ var _dom_elementContainsAttribute__rspack_import_3 = __webpack_require__(/*! ./dom/elementContainsAttribute */ "./node_modules/@fluentui/dom-utilities/lib/elementContainsAttribute.js");
/* import */ var _dom_elementContains__rspack_import_2 = __webpack_require__(/*! ./dom/elementContains */ "./node_modules/@fluentui/dom-utilities/lib/elementContains.js");
/* import */ var _dom_getParent__rspack_import_4 = __webpack_require__(/*! ./dom/getParent */ "./node_modules/@fluentui/dom-utilities/lib/getParent.js");
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _dom_getDocument__rspack_import_1 = __webpack_require__(/*! ./dom/getDocument */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
var IS_FOCUSABLE_ATTRIBUTE = 'data-is-focusable';
var IS_VISIBLE_ATTRIBUTE = 'data-is-visible';
var FOCUSZONE_ID_ATTRIBUTE = 'data-focuszone-id';
var FOCUSZONE_SUB_ATTRIBUTE = 'data-is-sub-focuszone';
/**
* Gets the first focusable element.
*
* @public
*/
function getFirstFocusable(rootElement, currentElement, includeElementsInFocusZones, includeShadowRoots) {
return getNextElement(rootElement, currentElement, true /*checkNode*/, false /*suppressParentTraversal*/, false /*suppressChildTraversal*/, includeElementsInFocusZones, undefined, undefined, undefined, includeShadowRoots);
}
/**
* Gets the last focusable element.
*
* @public
*/
function getLastFocusable(rootElement, currentElement, includeElementsInFocusZones, includeShadowRoots) {
return getPreviousElement(rootElement, currentElement, true /*checkNode*/, false /*suppressParentTraversal*/, true /*traverseChildren*/, includeElementsInFocusZones, undefined, undefined, includeShadowRoots);
}
/**
* Gets the first tabbable element. (The difference between focusable and tabbable is that tabbable elements are
* focusable elements that also have tabIndex != -1.)
* @param rootElement - The parent element to search beneath.
* @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked,
* and iteration continues forward. Typical use passes rootElement.firstChild.
* @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants.
* @param checkNode - Include currentElement in search when true. Defaults to true.
* @public
*/
function getFirstTabbable(rootElement, currentElement, includeElementsInFocusZones, checkNode, includeShadowRoots) {
if (checkNode === void 0) { checkNode = true; }
return getNextElement(rootElement, currentElement, checkNode, false /*suppressParentTraversal*/, false /*suppressChildTraversal*/, includeElementsInFocusZones, false /*allowFocusRoot*/, true /*tabbable*/, undefined, includeShadowRoots);
}
/**
* Gets the last tabbable element. (The difference between focusable and tabbable is that tabbable elements are
* focusable elements that also have tabIndex != -1.)
* @param rootElement - The parent element to search beneath.
* @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked,
* and iteration continues in reverse. Typical use passes rootElement.lastChild.
* @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants.
* @param checkNode - Include currentElement in search when true. Defaults to true.
* @public
*/
function getLastTabbable(rootElement, currentElement, includeElementsInFocusZones, checkNode, includeShadowRoots) {
if (checkNode === void 0) { checkNode = true; }
return getPreviousElement(rootElement, currentElement, checkNode, false /*suppressParentTraversal*/, true /*traverseChildren*/, includeElementsInFocusZones, false /*allowFocusRoot*/, true /*tabbable*/, includeShadowRoots);
}
/**
* Attempts to focus the first focusable element that is a child or child's child of the rootElement.
*
* @public
* @param rootElement - Element to start the search for a focusable child.
* @param bypassHiddenElements - If true, focus will be not be set on hidden elements.
* @returns True if focus was set, false if it was not.
*/
function focusFirstChild(rootElement, bypassHiddenElements, includeShadowRoots) {
var element = getNextElement(rootElement, rootElement, true, false, false, true, undefined, undefined, bypassHiddenElements, includeShadowRoots);
if (element) {
focusAsync(element);
return true;
}
return false;
}
/**
* Traverse to find the previous element.
* If tabbable is true, the element must have tabIndex != -1.
*
* @public
*/
function getPreviousElement(rootElement, currentElement, checkNode, suppressParentTraversal, traverseChildren, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots) {
var _a;
if (!currentElement || (!allowFocusRoot && currentElement === rootElement)) {
return null;
}
var isCurrentElementVisible = isElementVisible(currentElement);
// Check its children.
if (traverseChildren &&
isCurrentElementVisible &&
(includeElementsInFocusZones || !(isElementFocusZone(currentElement) || isElementFocusSubZone(currentElement)))) {
var lastElementChild = (currentElement.lastElementChild ||
(includeShadowRoots && ((_a = currentElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.lastElementChild)));
var childMatch = getPreviousElement(rootElement, lastElementChild, true, true, true, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots);
if (childMatch) {
if ((tabbable && isElementTabbable(childMatch, true, includeShadowRoots)) || !tabbable) {
return childMatch;
}
var childMatchSiblingMatch = getPreviousElement(rootElement, childMatch.previousElementSibling, true, true, true, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots);
if (childMatchSiblingMatch) {
return childMatchSiblingMatch;
}
var childMatchParent = childMatch.parentElement;
// At this point if we have not found any potential matches
// start looking at the rest of the subtree under the currentParent.
// NOTE: We do not want to recurse here because doing so could
// cause elements to get skipped.
while (childMatchParent && childMatchParent !== currentElement) {
var childMatchParentMatch = getPreviousElement(rootElement, childMatchParent.previousElementSibling, true, true, true, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots);
if (childMatchParentMatch) {
return childMatchParentMatch;
}
childMatchParent = childMatchParent.parentElement;
}
}
}
// Check the current node, if it's not the first traversal.
if (checkNode && isCurrentElementVisible && isElementTabbable(currentElement, tabbable, includeShadowRoots)) {
return currentElement;
}
// Check its previous sibling.
var siblingMatch = getPreviousElement(rootElement, currentElement.previousElementSibling, true, true, true, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots);
if (siblingMatch) {
return siblingMatch;
}
// Check its parent.
if (!suppressParentTraversal) {
return getPreviousElement(rootElement, currentElement.parentElement, true, false, false, includeElementsInFocusZones, allowFocusRoot, tabbable, includeShadowRoots);
}
return null;
}
/**
* Traverse to find the next focusable element.
* If tabbable is true, the element must have tabIndex != -1.
*
* @public
* @param checkNode - Include currentElement in search when true.
*/
function getNextElement(rootElement, currentElement, checkNode, suppressParentTraversal, suppressChildTraversal, includeElementsInFocusZones, allowFocusRoot, tabbable, bypassHiddenElements, includeShadowRoots) {
var _a;
if (!currentElement || (currentElement === rootElement && suppressChildTraversal && !allowFocusRoot)) {
return null;
}
var checkElementVisibility = bypassHiddenElements ? isElementVisibleAndNotHidden : isElementVisible;
var isCurrentElementVisible = checkElementVisibility(currentElement);
// Check the current node, if it's not the first traversal.
if (checkNode && isCurrentElementVisible && isElementTabbable(currentElement, tabbable, includeShadowRoots)) {
return currentElement;
}
// Check its children.
if (!suppressChildTraversal &&
isCurrentElementVisible &&
(includeElementsInFocusZones || !(isElementFocusZone(currentElement) || isElementFocusSubZone(currentElement)))) {
var firstElementchild = (currentElement.firstElementChild ||
(includeShadowRoots && ((_a = currentElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.firstElementChild)));
var childMatch = getNextElement(rootElement, firstElementchild, true, true, false, includeElementsInFocusZones, allowFocusRoot, tabbable, bypassHiddenElements, includeShadowRoots);
if (childMatch) {
return childMatch;
}
}
if (currentElement === rootElement) {
return null;
}
// Check its sibling.
var siblingMatch = getNextElement(rootElement, currentElement.nextElementSibling, true, true, false, includeElementsInFocusZones, allowFocusRoot, tabbable, bypassHiddenElements, includeShadowRoots);
if (siblingMatch) {
return siblingMatch;
}
if (!suppressParentTraversal) {
return getNextElement(rootElement, currentElement.parentElement, false, false, true, includeElementsInFocusZones, allowFocusRoot, tabbable, bypassHiddenElements, includeShadowRoots);
}
return null;
}
/**
* Determines if an element is visible.
*
* @public
*/
function isElementVisible(element) {
// If the element is not valid, return false.
if (!element || !element.getAttribute) {
return false;
}
var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);
// If the element is explicitly marked with the visibility attribute, return that value as boolean.
if (visibilityAttribute !== null && visibilityAttribute !== undefined) {
return visibilityAttribute === 'true';
}
// Fallback to other methods of determining actual visibility.
return (element.offsetHeight !== 0 ||
element.offsetParent !== null ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
element.isVisible === true); // used as a workaround for testing.
}
/**
* Determines if an element is visible and not hidden
* @param element - Element to check
* @returns Returns true if the given element is visible and not hidden
*
* @public
*/
function isElementVisibleAndNotHidden(element, win) {
var theWin = win !== null && win !== void 0 ? win : (0,_dom_getWindow__rspack_import_0.getWindow)();
return (!!element &&
isElementVisible(element) &&
!element.hidden &&
theWin.getComputedStyle(element).visibility !== 'hidden');
}
/**
* Determines if an element can receive focus programmatically or via a mouse click.
* If checkTabIndex is true, additionally checks to ensure the element can be focused with the tab key,
* meaning tabIndex != -1.
*
* @public
*/
function isElementTabbable(element, checkTabIndex, checkShadowRoot) {
if (checkShadowRoot === void 0) { checkShadowRoot = true; }
// If this element is null or is disabled, it is not considered tabbable.
if (!element || element.disabled) {
return false;
}
var tabIndex = 0;
var tabIndexAttributeValue = null;
if (element && element.getAttribute) {
tabIndexAttributeValue = element.getAttribute('tabIndex');
if (tabIndexAttributeValue) {
tabIndex = parseInt(tabIndexAttributeValue, 10);
}
}
var isFocusableAttribute = element.getAttribute ? element.getAttribute(IS_FOCUSABLE_ATTRIBUTE) : null;
var isTabIndexSet = tabIndexAttributeValue !== null && tabIndex >= 0;
var delegatesFocus = checkShadowRoot && element.shadowRoot ? !!element.shadowRoot.delegatesFocus : false;
var result = !!element &&
isFocusableAttribute !== 'false' &&
(element.tagName === 'A' ||
element.tagName === 'BUTTON' ||
element.tagName === 'INPUT' ||
element.tagName === 'TEXTAREA' ||
element.tagName === 'SELECT' ||
isFocusableAttribute === 'true' ||
isTabIndexSet ||
delegatesFocus);
return checkTabIndex ? tabIndex !== -1 && result : result;
}
/**
* Determines if a given element is a focus zone.
*
* @public
*/
function isElementFocusZone(element) {
return !!(element && element.getAttribute && !!element.getAttribute(FOCUSZONE_ID_ATTRIBUTE));
}
/**
* Determines if a given element is a focus sub zone.
*
* @public
*/
function isElementFocusSubZone(element) {
return !!(element && element.getAttribute && element.getAttribute(FOCUSZONE_SUB_ATTRIBUTE) === 'true');
}
/**
* Determines if an element, or any of its children, contain focus.
*
* @public
*/
function doesElementContainFocus(element) {
var doc = (0,_dom_getDocument__rspack_import_1.getDocument)(element);
var currentActiveElement = doc && doc.activeElement;
if (currentActiveElement && (0,_dom_elementContains__rspack_import_2.elementContains)(element, currentActiveElement)) {
return true;
}
return false;
}
/**
* Determines if an, or any of its ancestors, sepcificies that it doesn't want focus to wrap
* @param element - element to start searching from
* @param noWrapDataAttribute - the no wrap data attribute to match (either)
* @returns true if focus should wrap, false otherwise
*/
function shouldWrapFocus(element, noWrapDataAttribute, doc) {
var theDoc = doc !== null && doc !== void 0 ? doc : (0,_dom_getDocument__rspack_import_1.getDocument)();
return (0,_dom_elementContainsAttribute__rspack_import_3.elementContainsAttribute)(element, noWrapDataAttribute, theDoc) === 'true' ? false : true;
}
var animationId = undefined;
/**
* Sets focus to an element asynchronously. The focus will be set at the next browser repaint,
* meaning it won't cause any extra recalculations. If more than one focusAsync is called during one frame,
* only the latest called focusAsync element will actually be focused
* @param element - The element to focus
*/
function focusAsync(element) {
if (element) {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)(element);
if (win) {
// cancel any previous focus queues
if (animationId !== undefined) {
win.cancelAnimationFrame(animationId);
}
// element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe
animationId = win.requestAnimationFrame(function () {
element && element.focus();
// We are done focusing for this frame, so reset the queued focus element
animationId = undefined;
});
}
}
}
/**
* Finds the closest focusable element via an index path from a parent. See
* `getElementIndexPath` for getting an index path from an element to a child.
*/
function getFocusableByIndexPath(parent, path) {
var element = parent;
for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {
var index = path_1[_i];
var nextChild = element.children[Math.min(index, element.children.length - 1)];
if (!nextChild) {
break;
}
element = nextChild;
}
element =
isElementTabbable(element) && isElementVisible(element)
? element
: getNextElement(parent, element, true) || getPreviousElement(parent, element);
return element;
}
/**
* Finds the element index path from a parent element to a child element.
*
* If you had this node structure: "A has children [B, C] and C has child D",
* the index path from A to D would be [1, 0], or `parent.chidren[1].children[0]`.
*/
function getElementIndexPath(fromElement, toElement) {
var path = [];
while (toElement && fromElement && toElement !== fromElement) {
var parent_1 = (0,_dom_getParent__rspack_import_4.getParent)(toElement, true);
if (parent_1 === null) {
return [];
}
path.unshift(Array.prototype.indexOf.call(parent_1.children, toElement));
toElement = parent_1;
}
return path;
}
//# sourceMappingURL=focus.js.map
}),
"./node_modules/@fluentui/utilities/lib/getId.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/getId.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getId: () => (getId),
resetIds: () => (resetIds)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
// Initialize global window id.
var CURRENT_ID_PROPERTY = '__currentId__';
var DEFAULT_ID_STRING = 'id__';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var _global = (0,_dom_getWindow__rspack_import_0.getWindow)() || {};
if (_global[CURRENT_ID_PROPERTY] === undefined) {
_global[CURRENT_ID_PROPERTY] = 0;
}
var _initializedStylesheetResets = false;
/**
* Generates a unique id in the global scope (this spans across duplicate copies of the same library.)
*
* @public
*/
function getId(prefix) {
if (!_initializedStylesheetResets) {
// Configure ids to reset on stylesheet resets.
var stylesheet = _fluentui_merge_styles__rspack_import_1.Stylesheet.getInstance();
if (stylesheet && stylesheet.onReset) {
stylesheet.onReset(resetIds);
}
_initializedStylesheetResets = true;
}
var index = _global[CURRENT_ID_PROPERTY]++;
return (prefix === undefined ? DEFAULT_ID_STRING : prefix) + index;
}
/**
* Resets id counter to an (optional) number.
*
* @public
*/
function resetIds(counter) {
if (counter === void 0) { counter = 0; }
_global[CURRENT_ID_PROPERTY] = counter;
}
//# sourceMappingURL=getId.js.map
}),
"./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js":
/*!**********************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/getPropsWithDefaults.js ***!
\**********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getPropsWithDefaults: () => (getPropsWithDefaults)
});
/* import */ var tslib__rspack_import_0 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/**
* Function to apply default values to a component props object. This function is intended for function components,
* to maintain parity with the `defaultProps` feature of class components. It accounts for properties that are
* specified, but undefined.
* @param defaultProps- An object with default values for various properties
* @param propsWithoutDefaults- The props object passed into the component
*/
function getPropsWithDefaults(defaultProps, propsWithoutDefaults) {
var props = (0,tslib__rspack_import_0.__assign)({}, propsWithoutDefaults);
for (var _i = 0, _a = Object.keys(defaultProps); _i < _a.length; _i++) {
var key = _a[_i];
if (props[key] === undefined) {
props[key] = defaultProps[key];
}
}
return props;
}
//# sourceMappingURL=getPropsWithDefaults.js.map
}),
"./node_modules/@fluentui/utilities/lib/hoist.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/hoist.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
hoistMethods: () => (hoistMethods),
unhoistMethods: () => (unhoistMethods)
});
var REACT_LIFECYCLE_EXCLUSIONS = [
'setState',
'render',
'componentWillMount',
'UNSAFE_componentWillMount',
'componentDidMount',
'componentWillReceiveProps',
'UNSAFE_componentWillReceiveProps',
'shouldComponentUpdate',
'componentWillUpdate',
'getSnapshotBeforeUpdate',
'UNSAFE_componentWillUpdate',
'componentDidUpdate',
'componentWillUnmount',
];
/**
* Allows you to hoist methods, except those in an exclusion set from a source object into a destination object.
*
* @public
* @param destination - The instance of the object to hoist the methods onto.
* @param source - The instance of the object where the methods are hoisted from.
* @param exclusions - (Optional) What methods to exclude from being hoisted.
* @returns An array of names of methods that were hoisted.
*/
function hoistMethods(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
destination,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
source, exclusions) {
if (exclusions === void 0) { exclusions = REACT_LIFECYCLE_EXCLUSIONS; }
var hoisted = [];
var _loop_1 = function (methodName) {
if (typeof source[methodName] === 'function' &&
destination[methodName] === undefined &&
(!exclusions || exclusions.indexOf(methodName) === -1)) {
hoisted.push(methodName);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
destination[methodName] = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
source[methodName].apply(source, args);
};
}
};
for (var methodName in source) {
_loop_1(methodName);
}
return hoisted;
}
/**
* Provides a method for convenience to unhoist hoisted methods.
*
* @public
* @param source - The source object upon which methods were hoisted.
* @param methodNames - An array of method names to unhoist.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function unhoistMethods(source, methodNames) {
methodNames.forEach(function (methodName) { return delete source[methodName]; });
}
//# sourceMappingURL=hoist.js.map
}),
"./node_modules/@fluentui/utilities/lib/hoistStatics.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/hoistStatics.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
hoistStatics: () => (hoistStatics)
});
/**
* Allows you to hoist static functions in components.
* Created for the purpose of fixing broken static functions in classes
* that utilize decorators.
*
* @public
* @param source - The object where the methods are hoisted from.
* @param dest - The object to hoist the methods onto.
* @returns The dest object with methods added
*/
function hoistStatics(source, dest) {
for (var name_1 in source) {
if (source.hasOwnProperty(name_1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
dest[name_1] = source[name_1];
}
}
return dest;
}
//# sourceMappingURL=hoistStatics.js.map
}),
"./node_modules/@fluentui/utilities/lib/ie11Detector.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/ie11Detector.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
isIE11: () => (isIE11)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var isIE11 = function () {
var _a;
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
if (!((_a = win === null || win === void 0 ? void 0 : win.navigator) === null || _a === void 0 ? void 0 : _a.userAgent)) {
return false;
}
return win.navigator.userAgent.indexOf('rv:11.0') > -1;
};
//# sourceMappingURL=ie11Detector.js.map
}),
"./node_modules/@fluentui/utilities/lib/initializeComponentRef.js":
/*!************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/initializeComponentRef.js ***!
\************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
initializeComponentRef: () => (initializeComponentRef)
});
/* import */ var _extendComponent__rspack_import_0 = __webpack_require__(/*! ./extendComponent */ "./node_modules/@fluentui/utilities/lib/extendComponent.js");
/**
* Helper to manage componentRef resolution. Internally appends logic to
* lifetime methods to resolve componentRef to the passed in object.
*
* Usage: call initializeComponentRef(this) in the constructor,
*/
function initializeComponentRef(obj) {
(0,_extendComponent__rspack_import_0.extendComponent)(obj, {
componentDidMount: _onMount,
componentDidUpdate: _onUpdate,
componentWillUnmount: _onUnmount,
});
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _onMount() {
_setComponentRef(this.props.componentRef, this);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _onUpdate(prevProps) {
if (prevProps.componentRef !== this.props.componentRef) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
_setComponentRef(prevProps.componentRef, null);
_setComponentRef(this.props.componentRef, this);
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _onUnmount() {
_setComponentRef(this.props.componentRef, null);
}
function _setComponentRef(componentRef, value) {
if (componentRef) {
if (typeof componentRef === 'object') {
componentRef.current = value;
}
else if (typeof componentRef === 'function') {
componentRef(value);
}
}
}
//# sourceMappingURL=initializeComponentRef.js.map
}),
"./node_modules/@fluentui/utilities/lib/keyboard.js":
/*!**********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/keyboard.js ***!
\**********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
addDirectionalKeyCode: () => (addDirectionalKeyCode),
isDirectionalKeyCode: () => (isDirectionalKeyCode),
removeDirectionalKeyCode: () => (removeDirectionalKeyCode)
});
/* import */ var _KeyCodes__rspack_import_0 = __webpack_require__(/*! ./KeyCodes */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
var _a;
var DirectionalKeyCodes = (_a = {},
_a[_KeyCodes__rspack_import_0.KeyCodes.up] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.down] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.left] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.right] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.home] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.end] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.tab] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.pageUp] = 1,
_a[_KeyCodes__rspack_import_0.KeyCodes.pageDown] = 1,
_a);
/**
* Returns true if the keycode is a directional keyboard key.
*/
function isDirectionalKeyCode(which) {
return !!DirectionalKeyCodes[which];
}
/**
* Adds a keycode to the list of keys that, when pressed, should cause the focus outlines to be visible.
* This can be used to add global shortcut keys that directionally move from section to section within
* an app or between focus trap zones.
*/
function addDirectionalKeyCode(which) {
DirectionalKeyCodes[which] = 1;
}
/**
* Removes a keycode to the list of keys that, when pressed, should cause the focus outlines to be visible.
* This can be used to remove global shortcut keys that directionally move from section to section within
* an app or between focus trap zones.
*/
function removeDirectionalKeyCode(which) {
delete DirectionalKeyCodes[which];
}
//# sourceMappingURL=keyboard.js.map
}),
"./node_modules/@fluentui/utilities/lib/language.js":
/*!**********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/language.js ***!
\**********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getLanguage: () => (getLanguage),
setLanguage: () => (setLanguage)
});
/* import */ var _dom_getDocument__rspack_import_0 = __webpack_require__(/*! ./dom/getDocument */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _localStorage__rspack_import_1 = __webpack_require__(/*! ./localStorage */ "./node_modules/@fluentui/utilities/lib/localStorage.js");
/* import */ var _sessionStorage__rspack_import_2 = __webpack_require__(/*! ./sessionStorage */ "./node_modules/@fluentui/utilities/lib/sessionStorage.js");
// Default to undefined so that we initialize on first read.
var _language;
var STORAGE_KEY = 'language';
/**
* Gets the language set for the page.
* @param persistenceType - Where to persist the value. Default is `sessionStorage` if available.
*/
function getLanguage(persistenceType) {
if (persistenceType === void 0) { persistenceType = 'sessionStorage'; }
if (_language === undefined) {
var doc = (0,_dom_getDocument__rspack_import_0.getDocument)();
var savedLanguage = persistenceType === 'localStorage'
? _localStorage__rspack_import_1.getItem(STORAGE_KEY)
: persistenceType === 'sessionStorage'
? _sessionStorage__rspack_import_2.getItem(STORAGE_KEY)
: undefined;
if (savedLanguage) {
_language = savedLanguage;
}
if (_language === undefined && doc) {
_language = doc.documentElement.getAttribute('lang');
}
if (_language === undefined) {
_language = 'en';
}
}
return _language;
}
function setLanguage(language, persistenceParam) {
var doc = (0,_dom_getDocument__rspack_import_0.getDocument)();
if (doc) {
doc.documentElement.setAttribute('lang', language);
}
var persistenceType = persistenceParam === true ? 'none' : !persistenceParam ? 'sessionStorage' : persistenceParam;
if (persistenceType === 'localStorage') {
_localStorage__rspack_import_1.setItem(STORAGE_KEY, language);
}
else if (persistenceType === 'sessionStorage') {
_sessionStorage__rspack_import_2.setItem(STORAGE_KEY, language);
}
_language = language;
}
//# sourceMappingURL=language.js.map
}),
"./node_modules/@fluentui/utilities/lib/localStorage.js":
/*!**************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/localStorage.js ***!
\**************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getItem: () => (getItem),
setItem: () => (setItem)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/**
* Fetches an item from local storage without throwing an exception
* @param key The key of the item to fetch from local storage
*/
function getItem(key) {
var result = null;
try {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
result = win ? win.localStorage.getItem(key) : null;
}
catch (e) {
/* Eat the exception */
}
return result;
}
/**
* Inserts an item into local storage without throwing an exception
* @param key The key of the item to add to local storage
* @param data The data to put into local storage
*/
function setItem(key, data) {
try {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
win && win.localStorage.setItem(key, data);
}
catch (e) {
/* Eat the exception */
}
}
//# sourceMappingURL=localStorage.js.map
}),
"./node_modules/@fluentui/utilities/lib/memoize.js":
/*!*********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/memoize.js ***!
\*********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
createMemoizer: () => (createMemoizer),
memoize: () => (memoize),
memoizeFunction: () => (memoizeFunction),
resetMemoizations: () => (resetMemoizations),
setMemoizeWeakMap: () => (setMemoizeWeakMap)
});
/* import */ var _fluentui_merge_styles__rspack_import_0 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/Stylesheet.js");
var _initializedStylesheetResets = false;
var _resetCounter = 0;
var _emptyObject = { empty: true };
var _dictionary = {};
var _weakMap = typeof WeakMap === 'undefined' ? null : WeakMap;
/**
* Test utility for providing a custom weakmap.
*
* @internal
* */
function setMemoizeWeakMap(weakMap) {
_weakMap = weakMap;
}
/**
* Reset memoizations.
*/
function resetMemoizations() {
_resetCounter++;
}
/**
* Memoize decorator to be used on class methods. WARNING: the `this` reference
* will be inaccessible within a memoized method, given that a cached method's `this`
* would not be instance-specific.
*
* @public
*/
function memoize(_target, _key, descriptor) {
// We bind to "null" to prevent people from inadvertently pulling values from "this",
// rather than passing them in as input values which can be memoized.
var fn = memoizeFunction(descriptor.value && descriptor.value.bind(null));
return {
configurable: true,
get: function () {
return fn;
},
};
}
/**
* Memoizes a function; when you pass in the same parameters multiple times, it returns a cached result.
* Be careful when passing in objects, you need to pass in the same INSTANCE for caching to work. Otherwise
* it will grow the cache unnecessarily. Also avoid using default values that evaluate functions; passing in
* undefined for a value and relying on a default function will execute it the first time, but will not
* re-evaluate subsequent times which may have been unexpected.
*
* By default, the cache will reset after 100 permutations, to avoid abuse cases where the function is
* unintendedly called with unique objects. Without a reset, the cache could grow infinitely, so we safeguard
* by resetting. To override this behavior, pass a value of 0 to the maxCacheSize parameter.
*
* @public
* @param cb - The function to memoize.
* @param maxCacheSize - Max results to cache. If the cache exceeds this value, it will reset on the next call.
* @param ignoreNullOrUndefinedResult - Flag to decide whether to cache callback result if it is undefined/null.
* If the flag is set to true, the callback result is recomputed every time till the callback result is
* not undefined/null for the first time, and then the non-undefined/null version gets cached.
* @returns A memoized version of the function.
*/
function memoizeFunction(cb, maxCacheSize, ignoreNullOrUndefinedResult) {
if (maxCacheSize === void 0) { maxCacheSize = 100; }
if (ignoreNullOrUndefinedResult === void 0) { ignoreNullOrUndefinedResult = false; }
// Avoid breaking scenarios which don't have weak map.
if (!_weakMap) {
return cb;
}
if (!_initializedStylesheetResets) {
var stylesheet = _fluentui_merge_styles__rspack_import_0.Stylesheet.getInstance();
if (stylesheet && stylesheet.onReset) {
_fluentui_merge_styles__rspack_import_0.Stylesheet.getInstance().onReset(resetMemoizations);
}
_initializedStylesheetResets = true;
}
var rootNode;
var cacheSize = 0;
var localResetCounter = _resetCounter;
return function memoizedFunction() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var currentNode = rootNode;
if (rootNode === undefined ||
localResetCounter !== _resetCounter ||
(maxCacheSize > 0 && cacheSize > maxCacheSize)) {
rootNode = _createNode();
cacheSize = 0;
localResetCounter = _resetCounter;
}
currentNode = rootNode;
// Traverse the tree until we find the match.
for (var i = 0; i < args.length; i++) {
var arg = _normalizeArg(args[i]);
if (!currentNode.map.has(arg)) {
currentNode.map.set(arg, _createNode());
}
currentNode = currentNode.map.get(arg);
}
if (!currentNode.hasOwnProperty('value')) {
currentNode.value = cb.apply(void 0, args);
cacheSize++;
}
if (ignoreNullOrUndefinedResult && (currentNode.value === null || currentNode.value === undefined)) {
currentNode.value = cb.apply(void 0, args);
}
return currentNode.value;
};
}
/**
* Creates a memoizer for a single-value function, backed by a WeakMap.
* With a WeakMap, the memoized values are only kept as long as the source objects,
* ensuring that there is no memory leak.
*
* This function assumes that the input values passed to the wrapped function will be
* `function` or `object` types. To memoize functions which accept other inputs, use
* `memoizeFunction`, which memoizes against arbitrary inputs using a lookup cache.
*
* @public
*/
function createMemoizer(getValue) {
if (!_weakMap) {
// Without a `WeakMap` implementation, memoization is not possible.
return getValue;
}
var cache = new _weakMap();
function memoizedGetValue(input) {
if (!input || (typeof input !== 'function' && typeof input !== 'object')) {
// A WeakMap can only be used to test against reference values, i.e. 'function' and 'object'.
// All other inputs cannot be memoized against in this manner.
return getValue(input);
}
if (cache.has(input)) {
return cache.get(input);
}
var value = getValue(input);
cache.set(input, value);
return value;
}
return memoizedGetValue;
}
function _normalizeArg(val) {
if (!val) {
return _emptyObject;
}
else if (typeof val === 'object' || typeof val === 'function') {
return val;
}
else if (!_dictionary[val]) {
_dictionary[val] = { val: val };
}
return _dictionary[val];
}
function _createNode() {
return {
map: _weakMap ? new _weakMap() : null,
};
}
//# sourceMappingURL=memoize.js.map
}),
"./node_modules/@fluentui/utilities/lib/merge.js":
/*!*******************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/merge.js ***!
\*******************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
merge: () => (merge)
});
/**
* Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged
* together in the order provided. If an object creates a circular reference, it will assign the
* original reference.
*/
function merge(target) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
_merge(target || {}, arg);
}
return target;
}
/**
* The _merge helper iterates through all props on source and assigns them to target.
* When the value is an object, we will create a deep clone of the object. However if
* there is a circular reference, the value will not be deep cloned and will persist
* the reference.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _merge(target, source, circularReferences) {
if (circularReferences === void 0) { circularReferences = []; }
circularReferences.push(source);
for (var name_1 in source) {
if (source.hasOwnProperty(name_1)) {
if (name_1 !== '__proto__' && name_1 !== 'constructor' && name_1 !== 'prototype') {
var value = source[name_1];
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
var isCircularReference = circularReferences.indexOf(value) > -1;
target[name_1] = (isCircularReference ? value : _merge(target[name_1] || {}, value, circularReferences));
}
else {
target[name_1] = value;
}
}
}
}
circularReferences.pop();
return target;
}
//# sourceMappingURL=merge.js.map
}),
"./node_modules/@fluentui/utilities/lib/mobileDetector.js":
/*!****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/mobileDetector.js ***!
\****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
isIOS: () => (isIOS)
});
/**
* Returns true if and only if the user is on a iOS device.
* Used to determine whether iOS-specific behavior should be applied.
*/
var isIOS = function () {
// eslint-disable-next-line no-restricted-globals
if (!window || !window.navigator || !window.navigator.userAgent) {
return false;
}
// eslint-disable-next-line no-restricted-globals
return /iPad|iPhone|iPod/i.test(window.navigator.userAgent);
};
//# sourceMappingURL=mobileDetector.js.map
}),
"./node_modules/@fluentui/utilities/lib/modalize.js":
/*!**********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/modalize.js ***!
\**********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
modalize: () => (modalize)
});
/* import */ var _dom_getDocument__rspack_import_0 = __webpack_require__(/*! ./dom/getDocument */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/**
* The helper functions here will make the target element as modal to screen readers, by placing aria-hidden on elements
* that are siblings to the target element and the target element's ancestors (because aria-hidden gets inherited).
* That way, all other elements on the page are hidden to the screen reader.
*/
/** Tag names to ignore when modalizing */
var tagsToIgnore = ['TEMPLATE', 'STYLE', 'SCRIPT'];
/**
* Call this on a target element to make it modal to screen readers.
* Returns a function that undoes the changes it made.
*/
function modalize(target) {
var targetDocument = (0,_dom_getDocument__rspack_import_0.getDocument)(target);
if (!targetDocument) {
// can't do this in SSR
return function () { return undefined; };
}
var affectedNodes = [];
// start at target, then recurse and do the same for parent, until we reach
while (target !== targetDocument.body && target.parentElement) {
// grab all siblings of current element
for (var _i = 0, _a = target.parentElement.children; _i < _a.length; _i++) {
var sibling = _a[_i];
// but ignore elements that are already aria-hidden
var ariaHidden = sibling.getAttribute('aria-hidden');
if (sibling !== target && (ariaHidden === null || ariaHidden === void 0 ? void 0 : ariaHidden.toLowerCase()) !== 'true' && tagsToIgnore.indexOf(sibling.tagName) === -1) {
affectedNodes.push([sibling, ariaHidden]);
}
}
target = target.parentElement;
}
// take all those elements and set aria-hidden=true on them
affectedNodes.forEach(function (_a) {
var node = _a[0];
node.setAttribute('aria-hidden', 'true');
});
return function () {
unmodalize(affectedNodes);
affectedNodes = []; // dispose
};
}
/**
* Undoes the changes that modalize() did.
*/
function unmodalize(affectedNodes) {
affectedNodes.forEach(function (_a) {
var node = _a[0], originalValue = _a[1];
// Restore the original value (false or unset)
if (originalValue) {
node.setAttribute('aria-hidden', originalValue);
}
else {
node.removeAttribute('aria-hidden');
}
});
}
//# sourceMappingURL=modalize.js.map
}),
"./node_modules/@fluentui/utilities/lib/object.js":
/*!********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/object.js ***!
\********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
assign: () => (assign),
filteredAssign: () => (filteredAssign),
mapEnumByName: () => (mapEnumByName),
omit: () => (omit),
shallowCompare: () => (shallowCompare),
values: () => (values)
});
/**
* Compares a to b and b to a.
*
* @public
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function shallowCompare(a, b) {
if (!a || !b) {
// only return true if both a and b are falsy
return !a && !b;
}
for (var propName in a) {
if (a.hasOwnProperty(propName)) {
if (!b.hasOwnProperty(propName) || b[propName] !== a[propName]) {
return false;
}
}
}
for (var propName in b) {
if (b.hasOwnProperty(propName)) {
if (!a.hasOwnProperty(propName)) {
return false;
}
}
}
return true;
}
/**
* Makes a resulting merge of a bunch of objects. Pass in the target object followed by 1 or more
* objects as arguments and they will be merged sequentially into the target. Note that this will
* shallow merge; it will not create new cloned values for target members.
*
* @public
* @param target - Target object to merge following object arguments into.
* @param args - One or more objects that will be mixed into the target in the order they are provided.
* @returns Resulting merged target.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function assign(target) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return filteredAssign.apply(this, [null, target].concat(args));
}
/**
* Makes a resulting merge of a bunch of objects, but allows a filter function to be passed in to filter
* the resulting merges. This allows for scenarios where you want to merge "everything except that one thing"
* or "properties that start with data-". Note that this will shallow merge; it will not create new cloned
* values for target members.
*
* @public
* @param isAllowed - Callback to determine if the given propName is allowed in the result.
* @param target - Target object to merge following object arguments into.
* @param args - One or more objects that will be mixed into the target in the order they are provided.
* @returns Resulting merged target.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function filteredAssign(isAllowed, target) {
var args = [];
for (var _i = 2; _i < arguments.length; _i++) {
args[_i - 2] = arguments[_i];
}
target = target || {};
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var sourceObject = args_1[_a];
if (sourceObject) {
for (var propName in sourceObject) {
if (sourceObject.hasOwnProperty(propName) && (!isAllowed || isAllowed(propName))) {
target[propName] = sourceObject[propName];
}
}
}
}
return target;
}
/**
* Takes an enum and iterates over each value of the enum (as a string), running the callback on each,
* returning a mapped array.
* @param theEnum - Enum to iterate over
* @param callback - The first parameter the name of the entry, and the second parameter is the value
* of that entry, which is the value you'd normally use when using the enum (usually a number).
*/
function mapEnumByName(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
theEnum, callback) {
// map to satisfy compiler since it doesn't realize we strip out undefineds in the .filter() call
return Object.keys(theEnum)
.map(function (p) {
// map on each property name as a string
if (String(Number(p)) !== p) {
// if the property is not just a number (because enums in TypeScript will map both ways)
return callback(p, theEnum[p]);
}
return undefined;
})
.filter(function (v) { return !!v; }); // only return elements with values
}
/**
* Get all values in an object dictionary
*
* @param obj - The dictionary to get values for
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function values(obj) {
return Object.keys(obj).reduce(function (arr, key) {
arr.push(obj[key]);
return arr;
}, []);
}
/**
* Tiny helper to do the minimal amount of work in duplicating an object but omitting some
* props. This ends up faster than using object ...rest or reduce to filter.
*
* This behaves very much like filteredAssign, but does not merge many objects together,
* uses an exclusion object map, and avoids spreads all for optimal performance.
*
* See perf test for background:
* https://jsperf.com/omit-vs-rest-vs-reduce/1
*
* @param obj - The object to clone
* @param exclusions - The array of keys to exclude
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function omit(obj, exclusions) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var result = {};
for (var key in obj) {
if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {
result[key] = obj[key];
}
}
return result;
}
//# sourceMappingURL=object.js.map
}),
"./node_modules/@fluentui/utilities/lib/osDetector.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/osDetector.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
isMac: () => (isMac)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var isMacResult;
/**
* Returns true if the user is on a Mac. Caches the result value.
* @param reset - Reset the cached result value (mainly for testing).
*/
function isMac(reset) {
var _a;
if (typeof isMacResult === 'undefined' || reset) {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
// In certain SSR frameworks, `window` will be defined even on the server but `navigator` will be undefined
var userAgent = (_a = win === null || win === void 0 ? void 0 : win.navigator) === null || _a === void 0 ? void 0 : _a.userAgent;
isMacResult = !!userAgent && userAgent.indexOf('Macintosh') !== -1;
}
return !!isMacResult;
}
//# sourceMappingURL=osDetector.js.map
}),
"./node_modules/@fluentui/utilities/lib/overflow.js":
/*!**********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/overflow.js ***!
\**********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
hasHorizontalOverflow: () => (hasHorizontalOverflow),
hasOverflow: () => (hasOverflow),
hasVerticalOverflow: () => (hasVerticalOverflow)
});
/**
* Detects whether an element's content has horizontal overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
function hasHorizontalOverflow(element) {
return element.clientWidth < element.scrollWidth;
}
/**
* Detects whether an element's content has vertical overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
function hasVerticalOverflow(element) {
return element.clientHeight < element.scrollHeight;
}
/**
* Detects whether an element's content has overflow in any direction
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
function hasOverflow(element) {
return hasHorizontalOverflow(element) || hasVerticalOverflow(element);
}
//# sourceMappingURL=overflow.js.map
}),
"./node_modules/@fluentui/utilities/lib/properties.js":
/*!************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/properties.js ***!
\************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
anchorProperties: () => (anchorProperties),
audioProperties: () => (audioProperties),
baseElementEvents: () => (baseElementEvents),
baseElementProperties: () => (baseElementProperties),
buttonProperties: () => (buttonProperties),
colGroupProperties: () => (colGroupProperties),
colProperties: () => (colProperties),
divProperties: () => (divProperties),
formProperties: () => (formProperties),
getNativeProps: () => (getNativeProps),
htmlElementProperties: () => (htmlElementProperties),
iframeProperties: () => (iframeProperties),
imageProperties: () => (imageProperties),
imgProperties: () => (imgProperties),
inputProperties: () => (inputProperties),
labelProperties: () => (labelProperties),
liProperties: () => (liProperties),
olProperties: () => (olProperties),
optionProperties: () => (optionProperties),
selectProperties: () => (selectProperties),
tableProperties: () => (tableProperties),
tdProperties: () => (tdProperties),
textAreaProperties: () => (textAreaProperties),
thProperties: () => (thProperties),
trProperties: () => (trProperties),
videoProperties: () => (videoProperties)
});
var toObjectMap = function () {
var items = [];
for (var _i = 0; _i < arguments.length; _i++) {
items[_i] = arguments[_i];
}
var result = {};
for (var _a = 0, items_1 = items; _a < items_1.length; _a++) {
var item = items_1[_a];
var keys = Array.isArray(item) ? item : Object.keys(item);
for (var _b = 0, keys_1 = keys; _b < keys_1.length; _b++) {
var key = keys_1[_b];
result[key] = 1;
}
}
return result;
};
/**
* An array of events that are allowed on every html element type.
*
* @public
*/
var baseElementEvents = toObjectMap([
'onCopy',
'onCut',
'onPaste',
'onCompositionEnd',
'onCompositionStart',
'onCompositionUpdate',
'onFocus',
'onFocusCapture',
'onBlur',
'onBlurCapture',
'onChange',
'onInput',
'onSubmit',
'onLoad',
'onError',
'onKeyDown',
'onKeyDownCapture',
'onKeyPress',
'onKeyUp',
'onAbort',
'onCanPlay',
'onCanPlayThrough',
'onDurationChange',
'onEmptied',
'onEncrypted',
'onEnded',
'onLoadedData',
'onLoadedMetadata',
'onLoadStart',
'onPause',
'onPlay',
'onPlaying',
'onProgress',
'onRateChange',
'onSeeked',
'onSeeking',
'onStalled',
'onSuspend',
'onTimeUpdate',
'onVolumeChange',
'onWaiting',
'onClick',
'onClickCapture',
'onContextMenu',
'onDoubleClick',
'onDrag',
'onDragEnd',
'onDragEnter',
'onDragExit',
'onDragLeave',
'onDragOver',
'onDragStart',
'onDrop',
'onMouseDown',
'onMouseDownCapture',
'onMouseEnter',
'onMouseLeave',
'onMouseMove',
'onMouseOut',
'onMouseOver',
'onMouseUp',
'onMouseUpCapture',
'onSelect',
'onTouchCancel',
'onTouchEnd',
'onTouchMove',
'onTouchStart',
'onScroll',
'onWheel',
'onPointerCancel',
'onPointerDown',
'onPointerEnter',
'onPointerLeave',
'onPointerMove',
'onPointerOut',
'onPointerOver',
'onPointerUp',
'onGotPointerCapture',
'onLostPointerCapture',
]);
/**
* An array of element attributes which are allowed on every html element type.
*
* @public
*/
var baseElementProperties = toObjectMap([
'accessKey', // global
'children', // global
'className', // global
'contentEditable', // global
'dir', // global
'draggable', // global
'hidden', // global
'htmlFor', // global
'id', // global
'lang', // global
'ref', // global
'role', // global
'style', // global
'tabIndex', // global
'title', // global
'translate', // global
'spellCheck', // global
'name', // global
]);
/**
* An array of HTML element properties and events.
*
* @public
*/
var htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);
/**
* An array of LABEL tag properties and events.
*
* @public
*/
var labelProperties = toObjectMap(htmlElementProperties, [
'form', // button, fieldset, input, label, meter, object, output, select, textarea
]);
/**
* An array of AUDIO tag properties and events.
* @public
*/
var audioProperties = toObjectMap(htmlElementProperties, [
'height', // canvas, embed, iframe, img, input, object, video
'loop', // audio, video
'muted', // audio, video
'preload', // audio, video
'src', // audio, embed, iframe, img, input, script, source, track, video
'width', // canvas, embed, iframe, img, input, object, video
]);
/**
* An array of VIDEO tag properties and events.
*
* @public
*/
var videoProperties = toObjectMap(audioProperties, [
'poster', // video
]);
/**
* An array of OL tag properties and events.
*
* @public
*/
var olProperties = toObjectMap(htmlElementProperties, [
'start', // ol
]);
/**
* An array of LI tag properties and events.
*
* @public
*/
var liProperties = toObjectMap(htmlElementProperties, [
'value', // button, input, li, option, meter, progress, param
]);
/**
* An array of A tag properties and events.
*
* @public
*/
var anchorProperties = toObjectMap(htmlElementProperties, [
'download', // a, area
'href', // a, area, base, link
'hrefLang', // a, area, link
'media', // a, area, link, source, style
'rel', // a, area, link
'target', // a, area, base, form
'type', // a, button, input, link, menu, object, script, source, style
]);
/**
* An array of BUTTON tag properties and events.
*
* @public
*/
var buttonProperties = toObjectMap(htmlElementProperties, [
'autoFocus', // button, input, select, textarea
'disabled', // button, fieldset, input, optgroup, option, select, textarea
'form', // button, fieldset, input, label, meter, object, output, select, textarea
'formAction', // input, button
'formEncType', // input, button
'formMethod', // input, button
'formNoValidate', // input, button
'formTarget', // input, button
'type', // a, button, input, link, menu, object, script, source, style
'value', // button, input, li, option, meter, progress, param,
]);
/**
* An array of INPUT tag properties and events.
*
* @public
*/
var inputProperties = toObjectMap(buttonProperties, [
'accept', // input
'alt', // area, img, input
'autoCapitalize', // input, textarea
'autoComplete', // form, input
'checked', // input
'dirname', // input, textarea
'form', // button, fieldset, input, label, meter, object, output, select, textarea
'height', // canvas, embed, iframe, img, input, object, video
'inputMode', // input
'list', // input
'max', // input, meter
'maxLength', // input, textarea
'min', // input, meter
'minLength', // input, textarea
'multiple', // input, select
'pattern', // input
'placeholder', // input, textarea
'readOnly', // input, textarea
'required', // input, select, textarea
'src', // audio, embed, iframe, img, input, script, source, track, video
'step', // input
'size', // input
'type', // a, button, input, link, menu, object, script, source, style
'value', // button, input, li, option, meter, progress, param
'width', // canvas, embed, iframe, img, input, object, video
]);
/**
* An array of TEXTAREA tag properties and events.
*
* @public
*/
var textAreaProperties = toObjectMap(buttonProperties, [
'autoCapitalize', // input, textarea
'cols', // textarea
'dirname', // input, textarea
'form', // button, fieldset, input, label, meter, object, output, select, textarea
'maxLength', // input, textarea
'minLength', // input, textarea
'placeholder', // input, textarea
'readOnly', // input, textarea
'required', // input, select, textarea
'rows', // textarea
'wrap', // textarea
]);
/**
* An array of SELECT tag properties and events.
*
* @public
*/
var selectProperties = toObjectMap(buttonProperties, [
'form', // button, fieldset, input, label, meter, object, output, select, textarea
'multiple', // input, select
'required', // input, select, textarea
]);
var optionProperties = toObjectMap(htmlElementProperties, [
'selected', // option
'value', // button, input, li, option, meter, progress, param
]);
/**
* An array of TABLE tag properties and events.
*
* @public
*/
var tableProperties = toObjectMap(htmlElementProperties, [
'cellPadding', // table
'cellSpacing', // table
]);
/**
* An array of TR tag properties and events.
*
* @public
*/
var trProperties = htmlElementProperties;
/**
* An array of TH tag properties and events.
*
* @public
*/
var thProperties = toObjectMap(htmlElementProperties, [
'rowSpan', // td, th
'scope', // th
]);
/**
* An array of TD tag properties and events.
*
* @public
*/
var tdProperties = toObjectMap(htmlElementProperties, [
'colSpan', // td
'headers', // td
'rowSpan', // td, th
'scope', // th
]);
var colGroupProperties = toObjectMap(htmlElementProperties, [
'span', // col, colgroup
]);
var colProperties = toObjectMap(htmlElementProperties, [
'span', // col, colgroup
]);
/**
* An array of FORM tag properties and events.
*
* @public
*/
var formProperties = toObjectMap(htmlElementProperties, [
'acceptCharset', // form
'action', // form
'encType', // form
'encType', // form
'method', // form
'noValidate', // form
'target', // form
]);
/**
* An array of IFRAME tag properties and events.
*
* @public
*/
var iframeProperties = toObjectMap(htmlElementProperties, [
'allow', // iframe
'allowFullScreen', // iframe
'allowPaymentRequest', // iframe
'allowTransparency', // iframe
'csp', // iframe
'height', // canvas, embed, iframe, img, input, object, video
'importance', // iframe
'referrerPolicy', // iframe
'sandbox', // iframe
'src', // audio, embed, iframe, img, input, script, source, track, video
'srcDoc', // iframe
'width', // canvas, embed, iframe, img, input, object, video,
]);
/**
* An array of IMAGE tag properties and events.
*
* @public
*/
var imgProperties = toObjectMap(htmlElementProperties, [
'alt', // area, img, input
'crossOrigin', // img
'height', // canvas, embed, iframe, img, input, object, video
'src', // audio, embed, iframe, img, input, script, source, track, video
'srcSet', // img, source
'useMap', // img, object,
'width', // canvas, embed, iframe, img, input, object, video
]);
/**
* @deprecated Use imgProperties for img elements.
*/
var imageProperties = imgProperties;
/**
* An array of DIV tag properties and events.
*
* @public
*/
var divProperties = htmlElementProperties;
/**
* Gets native supported props for an html element provided the allowance set. Use one of the property
* sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given
* props set. Note that all data- and aria- prefixed attributes will be allowed.
* NOTE: getNativeProps should always be applied first when adding props to a react component. The
* non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.
* For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to
* the component after an onClick function is added, then the getNativeProps onClick will override it.
*
* @public
* @param props - The unfiltered input props
* @param allowedPropsNames - The array or record of allowed prop names.
* @returns The filtered props
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getNativeProps(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
props, allowedPropNames, excludedPropNames) {
// It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for
// JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.
// Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then
// return native props.
// We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
var isArray = Array.isArray(allowedPropNames);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var result = {};
var keys = Object.keys(props);
for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
var key = keys_2[_i];
var isNativeProp = (!isArray && allowedPropNames[key]) ||
(isArray && allowedPropNames.indexOf(key) >= 0) ||
key.indexOf('data-') === 0 ||
key.indexOf('aria-') === 0;
if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result[key] = props[key];
}
}
return result;
}
//# sourceMappingURL=properties.js.map
}),
"./node_modules/@fluentui/utilities/lib/renderFunction/composeRenderFunction.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/renderFunction/composeRenderFunction.js ***!
\**************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
composeRenderFunction: () => (composeRenderFunction)
});
/* import */ var _memoize__rspack_import_0 = __webpack_require__(/*! ../memoize */ "./node_modules/@fluentui/utilities/lib/memoize.js");
function createComposedRenderFunction(outer) {
var outerMemoizer = (0,_memoize__rspack_import_0.createMemoizer)(function (inner) {
var innerMemoizer = (0,_memoize__rspack_import_0.createMemoizer)(function (defaultRender) {
return function (innerProps) {
return inner(innerProps, defaultRender);
};
});
return function (outerProps, defaultRender) {
return outer(outerProps, defaultRender ? innerMemoizer(defaultRender) : inner);
};
});
return outerMemoizer;
}
var memoizer = (0,_memoize__rspack_import_0.createMemoizer)(createComposedRenderFunction);
/**
* Composes two 'render functions' to produce a final render function that renders
* the outer function, passing the inner function as 'default render'. The inner function
* is then passed the original 'default render' prop.
* @public
*/
function composeRenderFunction(outer, inner) {
return memoizer(outer)(inner);
}
//# sourceMappingURL=composeRenderFunction.js.map
}),
"./node_modules/@fluentui/utilities/lib/rtl.js":
/*!*****************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/rtl.js ***!
\*****************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getRTL: () => (getRTL),
getRTLSafeKeyCode: () => (getRTLSafeKeyCode),
setRTL: () => (setRTL)
});
/* import */ var _KeyCodes__rspack_import_3 = __webpack_require__(/*! ./KeyCodes */ "./node_modules/@fluentui/utilities/lib/KeyCodes.js");
/* import */ var _dom_getDocument__rspack_import_1 = __webpack_require__(/*! ./dom/getDocument */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _sessionStorage__rspack_import_0 = __webpack_require__(/*! ./sessionStorage */ "./node_modules/@fluentui/utilities/lib/sessionStorage.js");
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/StyleOptionsState.js");
var RTL_LOCAL_STORAGE_KEY = 'isRTL';
// Default to undefined so that we initialize on first read.
var _isRTL;
/**
* Gets the rtl state of the page (returns true if in rtl.)
*/
function getRTL(theme) {
if (theme === void 0) { theme = {}; }
if (theme.rtl !== undefined) {
return theme.rtl;
}
if (_isRTL === undefined) {
// Fabric supports persisting the RTL setting between page refreshes via session storage
var savedRTL = (0,_sessionStorage__rspack_import_0.getItem)(RTL_LOCAL_STORAGE_KEY);
if (savedRTL !== null) {
_isRTL = savedRTL === '1';
setRTL(_isRTL);
}
var doc = (0,_dom_getDocument__rspack_import_1.getDocument)();
if (_isRTL === undefined && doc) {
_isRTL = ((doc.body && doc.body.getAttribute('dir')) || doc.documentElement.getAttribute('dir')) === 'rtl';
(0,_fluentui_merge_styles__rspack_import_2.setRTL)(_isRTL);
}
}
return !!_isRTL;
}
/**
* Sets the rtl state of the page (by adjusting the dir attribute of the html element.)
*/
function setRTL(isRTL, persistSetting) {
if (persistSetting === void 0) { persistSetting = false; }
var doc = (0,_dom_getDocument__rspack_import_1.getDocument)();
if (doc) {
doc.documentElement.setAttribute('dir', isRTL ? 'rtl' : 'ltr');
}
if (persistSetting) {
(0,_sessionStorage__rspack_import_0.setItem)(RTL_LOCAL_STORAGE_KEY, isRTL ? '1' : '0');
}
_isRTL = isRTL;
(0,_fluentui_merge_styles__rspack_import_2.setRTL)(_isRTL);
}
/**
* Returns the given key, but flips right/left arrows if necessary.
*/
function getRTLSafeKeyCode(key, theme) {
if (theme === void 0) { theme = {}; }
if (getRTL(theme)) {
if (key === _KeyCodes__rspack_import_3.KeyCodes.left) {
key = _KeyCodes__rspack_import_3.KeyCodes.right;
}
else if (key === _KeyCodes__rspack_import_3.KeyCodes.right) {
key = _KeyCodes__rspack_import_3.KeyCodes.left;
}
}
return key;
}
//# sourceMappingURL=rtl.js.map
}),
"./node_modules/@fluentui/utilities/lib/safeRequestAnimationFrame.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/safeRequestAnimationFrame.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
safeRequestAnimationFrame: () => (safeRequestAnimationFrame)
});
/* import */ var _extendComponent__rspack_import_0 = __webpack_require__(/*! ./extendComponent */ "./node_modules/@fluentui/utilities/lib/extendComponent.js");
/**
* Generates a function to be attached to a React component, which can be called
* as a replacement to RAF. In-flight async calls will be auto canceled if the component
* is unmounting before the async code is executed, preventing bugs where code
* accesses things within the component after being unmounted.
*/
var safeRequestAnimationFrame = function (component) {
var activeTimeouts;
return function (cb) {
if (!activeTimeouts) {
activeTimeouts = new Set();
(0,_extendComponent__rspack_import_0.extendComponent)(component, {
componentWillUnmount: function () {
activeTimeouts.forEach(function (id) { return cancelAnimationFrame(id); });
},
});
}
var timeoutId = requestAnimationFrame(function () {
activeTimeouts.delete(timeoutId);
cb();
});
activeTimeouts.add(timeoutId);
};
};
//# sourceMappingURL=safeRequestAnimationFrame.js.map
}),
"./node_modules/@fluentui/utilities/lib/scroll.js":
/*!********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/scroll.js ***!
\********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
DATA_IS_SCROLLABLE_ATTRIBUTE: () => (DATA_IS_SCROLLABLE_ATTRIBUTE),
allowOverscrollOnElement: () => (allowOverscrollOnElement),
allowScrollOnElement: () => (allowScrollOnElement),
disableBodyScroll: () => (disableBodyScroll),
enableBodyScroll: () => (enableBodyScroll),
findScrollableParent: () => (findScrollableParent),
getScrollbarWidth: () => (getScrollbarWidth)
});
/* import */ var _dom_getDocument__rspack_import_2 = __webpack_require__(/*! ./dom/getDocument */ "./node_modules/@fluentui/utilities/lib/dom/getDocument.js");
/* import */ var _fluentui_merge_styles__rspack_import_0 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/mergeStyles.js");
/* import */ var _dom_getWindow__rspack_import_1 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var _scrollbarWidth;
var _bodyScrollDisabledCount = 0;
var DisabledScrollClassName = (0,_fluentui_merge_styles__rspack_import_0.mergeStyles)({
overflow: 'hidden !important',
});
/**
* Placing this attribute on scrollable divs optimizes detection to know
* if the div is scrollable or not (given we can avoid expensive operations
* like getComputedStyle.)
*
* @public
*/
var DATA_IS_SCROLLABLE_ATTRIBUTE = 'data-is-scrollable';
/**
* Allows the user to scroll within a element,
* while preventing the user from scrolling the body
*/
var allowScrollOnElement = function (element, events) {
var window = (0,_dom_getWindow__rspack_import_1.getWindow)(element);
if (!element || !window) {
return;
}
var _previousClientY = 0;
var _element = null;
var computedStyles = window.getComputedStyle(element);
// remember the clientY for future calls of _preventOverscrolling
var _saveClientY = function (event) {
if (event.targetTouches.length === 1) {
_previousClientY = event.targetTouches[0].clientY;
}
};
// prevent the body from scrolling when the user attempts
// to scroll past the top or bottom of the element
var _preventOverscrolling = function (event) {
// only respond to a single-finger touch
if (event.targetTouches.length !== 1) {
return;
}
// prevent the body touchmove handler from firing
// so that scrolling is allowed within the element
event.stopPropagation();
if (!_element) {
return;
}
var clientY = event.targetTouches[0].clientY - _previousClientY;
var scrollableParent = findScrollableParent(event.target);
if (scrollableParent && _element !== scrollableParent) {
_element = scrollableParent;
computedStyles = window.getComputedStyle(_element);
}
var scrollTop = _element.scrollTop;
var isColumnReverse = (computedStyles === null || computedStyles === void 0 ? void 0 : computedStyles.flexDirection) === 'column-reverse';
// if the element is scrolled to the top,
// prevent the user from scrolling up
if (scrollTop === 0 && (isColumnReverse ? clientY < 0 : clientY > 0)) {
event.preventDefault();
}
// if the element is scrolled to the bottom,
// prevent the user from scrolling down
if (_element.scrollHeight - Math.abs(Math.ceil(scrollTop)) <= _element.clientHeight &&
(isColumnReverse ? clientY > 0 : clientY < 0)) {
event.preventDefault();
}
};
events.on(element, 'touchstart', _saveClientY, { passive: false });
events.on(element, 'touchmove', _preventOverscrolling, { passive: false });
_element = element;
};
/**
* Same as allowScrollOnElement but does not prevent overscrolling.
*/
var allowOverscrollOnElement = function (element, events) {
if (!element) {
return;
}
var _allowElementScroll = function (event) {
event.stopPropagation();
};
events.on(element, 'touchmove', _allowElementScroll, { passive: false });
};
var _disableIosBodyScroll = function (event) {
event.preventDefault();
};
/**
* Disables the body scrolling.
*
* @public
*/
function disableBodyScroll() {
var doc = (0,_dom_getDocument__rspack_import_2.getDocument)();
if (doc && doc.body && !_bodyScrollDisabledCount) {
doc.body.classList.add(DisabledScrollClassName);
doc.body.addEventListener('touchmove', _disableIosBodyScroll, { passive: false, capture: false });
}
_bodyScrollDisabledCount++;
}
/**
* Enables the body scrolling.
*
* @public
*/
function enableBodyScroll() {
if (_bodyScrollDisabledCount > 0) {
var doc = (0,_dom_getDocument__rspack_import_2.getDocument)();
if (doc && doc.body && _bodyScrollDisabledCount === 1) {
doc.body.classList.remove(DisabledScrollClassName);
doc.body.removeEventListener('touchmove', _disableIosBodyScroll);
}
_bodyScrollDisabledCount--;
}
}
/**
* Calculates the width of a scrollbar for the browser/os.
*
* @public
*/
function getScrollbarWidth(doc) {
if (_scrollbarWidth === undefined) {
var theDoc = doc !== null && doc !== void 0 ? doc : (0,_dom_getDocument__rspack_import_2.getDocument)();
var scrollDiv = theDoc.createElement('div');
scrollDiv.style.setProperty('width', '100px');
scrollDiv.style.setProperty('height', '100px');
scrollDiv.style.setProperty('overflow', 'scroll');
scrollDiv.style.setProperty('position', 'absolute');
scrollDiv.style.setProperty('top', '-9999px');
theDoc.body.appendChild(scrollDiv);
// Get the scrollbar width
_scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
// Delete the DIV
theDoc.body.removeChild(scrollDiv);
}
return _scrollbarWidth;
}
/**
* Traverses up the DOM for the element with the data-is-scrollable=true attribute, or returns
* document.body.
*
* @public
*/
function findScrollableParent(startingElement) {
var el = startingElement;
var doc = (0,_dom_getDocument__rspack_import_2.getDocument)(startingElement);
// First do a quick scan for the scrollable attribute.
while (el && el !== doc.body) {
if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {
return el;
}
el = el.parentElement;
}
// If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.
el = startingElement;
while (el && el !== doc.body) {
if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {
var computedStyles = getComputedStyle(el);
var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';
if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {
return el;
}
}
el = el.parentElement;
}
// Fall back to window scroll.
if (!el || el === doc.body) {
el = (0,_dom_getWindow__rspack_import_1.getWindow)(startingElement);
}
return el;
}
//# sourceMappingURL=scroll.js.map
}),
"./node_modules/@fluentui/utilities/lib/sessionStorage.js":
/*!****************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/sessionStorage.js ***!
\****************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
getItem: () => (getItem),
setItem: () => (setItem)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/**
* Fetches an item from session storage without throwing an exception
* @param key The key of the item to fetch from session storage
*/
function getItem(key) {
var result = null;
try {
var win = (0,_dom_getWindow__rspack_import_0.getWindow)();
result = win ? win.sessionStorage.getItem(key) : null;
}
catch (e) {
/* Eat the exception */
}
return result;
}
/**
* Inserts an item into session storage without throwing an exception
* @param key The key of the item to add to session storage
* @param data The data to put into session storage
*/
function setItem(key, data) {
var _a;
try {
(_a = (0,_dom_getWindow__rspack_import_0.getWindow)()) === null || _a === void 0 ? void 0 : _a.sessionStorage.setItem(key, data);
}
catch (e) {
/* Eat the exception */
}
}
//# sourceMappingURL=sessionStorage.js.map
}),
"./node_modules/@fluentui/utilities/lib/setFocusVisibility.js":
/*!********************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/setFocusVisibility.js ***!
\********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
IsFocusHiddenClassName: () => (IsFocusHiddenClassName),
IsFocusVisibleClassName: () => (IsFocusVisibleClassName),
setFocusVisibility: () => (setFocusVisibility)
});
/* import */ var _dom_getWindow__rspack_import_0 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
var IsFocusVisibleClassName = 'ms-Fabric--isFocusVisible';
var IsFocusHiddenClassName = 'ms-Fabric--isFocusHidden';
function updateClassList(el, enabled) {
if (el) {
el.classList.add(enabled ? IsFocusVisibleClassName : IsFocusHiddenClassName);
el.classList.remove(enabled ? IsFocusHiddenClassName : IsFocusVisibleClassName);
}
}
/**
* Sets the visibility of focus styling.
*
* By default, focus styles (the box surrounding a focused Button, for example) only show up when navigational
* keypresses occur (through Tab, arrows, PgUp/PgDn, Home and End), and are hidden when mouse interactions occur.
* This API provides an imperative way to turn them on/off.
*
* A use case might be when you have a keypress like ctrl-f6 navigate to a particular region on the page,
* and want focus to show up.
*
* @param enabled - Whether to turn focus visibility on or off.
* @param target - Optional target from which to get window in case no `providerElem` has been specified.
* @param registeredProviders - Array of provider refs that are associated with a FocusRectsProvider. If no array
* is passed in, the classnames are attached to the document body that contains `target`.
*/
function setFocusVisibility(enabled, target, registeredProviders) {
var _a;
if (registeredProviders) {
registeredProviders.forEach(function (ref) { return updateClassList(ref.current, enabled); });
}
else {
updateClassList((_a = (0,_dom_getWindow__rspack_import_0.getWindow)(target)) === null || _a === void 0 ? void 0 : _a.document.body, enabled);
}
}
//# sourceMappingURL=setFocusVisibility.js.map
}),
"./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesDefaultContext.js":
/*!**********************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesDefaultContext.js ***!
\**********************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MergeStylesDefaultContext: () => (MergeStylesDefaultContext),
getNewContext: () => (getNewContext)
});
/* import */ var _fluentui_merge_styles__rspack_import_1 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
var noop = function () { return false; };
var noopShadow = function () { return _fluentui_merge_styles__rspack_import_1.DEFAULT_SHADOW_CONFIG; };
var noopRootStylesheets = function () { return new Map(); };
var noopUndefined = function () { return undefined; };
var getNewContext = function () {
return {
stylesheets: new Map(),
useAdoptedStylesheetEx: noop,
useAdoptedStylesheet: noop,
useShadowConfig: noopShadow,
useMergeStylesShadowRootContext: noopUndefined,
useHasMergeStylesShadowRootContext: noop,
useMergeStylesRootStylesheets: noopRootStylesheets,
useWindow: noopUndefined,
useStyled: noopUndefined,
};
};
var MergeStylesDefaultContext = react__rspack_import_0.createContext(getNewContext());
//# sourceMappingURL=MergeStylesDefaultContext.js.map
}),
"./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootConsumer.js":
/*!**************************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootConsumer.js ***!
\**************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MergeStylesShadowRootConsumer: () => (MergeStylesShadowRootConsumer)
});
/* import */ var _fluentui_merge_styles__rspack_import_2 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var _hooks_useMergeStylesHooks__rspack_import_0 = __webpack_require__(/*! ../hooks/useMergeStylesHooks */ "./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesHooks.js");
/* import */ var _hooks_useMergeStylesShadowRoot__rspack_import_1 = __webpack_require__(/*! ../hooks/useMergeStylesShadowRoot */ "./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesShadowRoot.js");
var MergeStylesShadowRootConsumer = function (_a) {
var stylesheetKey = _a.stylesheetKey, children = _a.children;
var _b = (0,_hooks_useMergeStylesHooks__rspack_import_0.useMergeStylesHooks)(), useAdoptedStylesheetEx = _b.useAdoptedStylesheetEx, useMergeStylesRootStylesheets = _b.useMergeStylesRootStylesheets, useWindow = _b.useWindow;
var shadowCtx = (0,_hooks_useMergeStylesShadowRoot__rspack_import_1.useMergeStylesShadowRootContext)();
var rootMergeStyles = useMergeStylesRootStylesheets();
var win = useWindow();
useAdoptedStylesheetEx(_fluentui_merge_styles__rspack_import_2.GLOBAL_STYLESHEET_KEY, shadowCtx, rootMergeStyles, win);
useAdoptedStylesheetEx(stylesheetKey, shadowCtx, rootMergeStyles, win);
return children(!!shadowCtx);
};
//# sourceMappingURL=MergeStylesShadowRootConsumer.js.map
}),
"./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootContext.js":
/*!*************************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootContext.js ***!
\*************************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
MergeStylesShadowRootContext: () => (MergeStylesShadowRootContext),
MergeStylesShadowRootProvider: () => (MergeStylesShadowRootProvider)
});
/* import */ var tslib__rspack_import_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_merge_styles__rspack_import_3 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/shadowConfig.js");
/* import */ var _hooks_useMergeStylesHooks__rspack_import_2 = __webpack_require__(/*! ../hooks/useMergeStylesHooks */ "./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesHooks.js");
var MergeStylesShadowRootContext = react__rspack_import_0.createContext(undefined);
/**
* Context for a shadow root.
*/
var MergeStylesShadowRootProvider = function (_a) {
var shadowRoot = _a.shadowRoot, props = (0,tslib__rspack_import_1.__rest)(_a, ["shadowRoot"]);
var value = react__rspack_import_0.useMemo(function () {
return {
stylesheets: new Map(),
shadowRoot: shadowRoot,
};
}, [shadowRoot]);
return (react__rspack_import_0.createElement(MergeStylesShadowRootContext.Provider, (0,tslib__rspack_import_1.__assign)({ value: value }, props),
react__rspack_import_0.createElement(GlobalStyles, null),
props.children));
};
var GlobalStyles = function (props) {
var useAdoptedStylesheet = (0,_hooks_useMergeStylesHooks__rspack_import_2.useMergeStylesHooks)().useAdoptedStylesheet;
useAdoptedStylesheet(_fluentui_merge_styles__rspack_import_3.GLOBAL_STYLESHEET_KEY);
return null;
};
//# sourceMappingURL=MergeStylesShadowRootContext.js.map
}),
"./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesHooks.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesHooks.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useMergeStylesHooks: () => (useMergeStylesHooks)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _contexts_MergeStylesDefaultContext__rspack_import_1 = __webpack_require__(/*! ../contexts/MergeStylesDefaultContext */ "./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesDefaultContext.js");
var useMergeStylesHooks = function () {
var ctx = react__rspack_import_0.useContext(_contexts_MergeStylesDefaultContext__rspack_import_1.MergeStylesDefaultContext);
return {
useAdoptedStylesheet: ctx.useAdoptedStylesheet,
useAdoptedStylesheetEx: ctx.useAdoptedStylesheetEx,
useShadowConfig: ctx.useShadowConfig,
useMergeStylesShadowRootContext: ctx.useMergeStylesShadowRootContext,
useHasMergeStylesShadowRootContext: ctx.useHasMergeStylesShadowRootContext,
useMergeStylesRootStylesheets: ctx.useMergeStylesRootStylesheets,
useWindow: ctx.useWindow,
useStyled: ctx.useStyled,
};
};
//# sourceMappingURL=useMergeStylesHooks.js.map
}),
"./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesShadowRoot.js":
/*!******************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesShadowRoot.js ***!
\******************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useHasMergeStylesShadowRootContext: () => (useHasMergeStylesShadowRootContext),
useMergeStylesShadowRootContext: () => (useMergeStylesShadowRootContext)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _contexts_MergeStylesShadowRootContext__rspack_import_1 = __webpack_require__(/*! ../contexts/MergeStylesShadowRootContext */ "./node_modules/@fluentui/utilities/lib/shadowDom/contexts/MergeStylesShadowRootContext.js");
/**
* Test if a context is available.
* @returns true if there is a context.
*/
var useHasMergeStylesShadowRootContext = function () {
return !!useMergeStylesShadowRootContext();
};
/**
* Get a reference to the shadow root context.
* @returns The context for the shadow root.
*/
var useMergeStylesShadowRootContext = function () {
return react__rspack_import_0.useContext(_contexts_MergeStylesShadowRootContext__rspack_import_1.MergeStylesShadowRootContext);
};
//# sourceMappingURL=useMergeStylesShadowRoot.js.map
}),
"./node_modules/@fluentui/utilities/lib/styled.js":
/*!********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/styled.js ***!
\********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
styled: () => (styled)
});
/* import */ var tslib__rspack_import_2 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs");
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _fluentui_merge_styles__rspack_import_4 = __webpack_require__(/*! @fluentui/merge-styles */ "./node_modules/@fluentui/merge-styles/lib/concatStyleSetsWithProps.js");
/* import */ var _shadowDom_index__rspack_import_3 = __webpack_require__(/*! ./shadowDom/index */ "./node_modules/@fluentui/utilities/lib/shadowDom/hooks/useMergeStylesHooks.js");
/* import */ var _customizations_useCustomizationSettings__rspack_import_1 = __webpack_require__(/*! ./customizations/useCustomizationSettings */ "./node_modules/@fluentui/utilities/lib/customizations/useCustomizationSettings.js");
var DefaultFields = ['theme', 'styles'];
function styled(Component, baseStyles, getProps, customizable, pure) {
customizable = customizable || { scope: '', fields: undefined };
var scope = customizable.scope, _a = customizable.fields, fields = _a === void 0 ? DefaultFields : _a;
var Wrapped = react__rspack_import_0.forwardRef(function (props, forwardedRef) {
var styles = react__rspack_import_0.useRef(undefined);
var settings = (0,_customizations_useCustomizationSettings__rspack_import_1.useCustomizationSettings)(fields, scope);
var customizedStyles = settings.styles, dir = settings.dir, rest = (0,tslib__rspack_import_2.__rest)(settings, ["styles", "dir"]);
var additionalProps = getProps ? getProps(props) : undefined;
var useStyled = (0,_shadowDom_index__rspack_import_3.useMergeStylesHooks)().useStyled;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var cache = (styles.current && styles.current.__cachedInputs__) || [];
var propStyles = props.styles;
if (!styles.current || customizedStyles !== cache[1] || propStyles !== cache[2]) {
// Using styled components as the Component arg will result in nested styling arrays.
// The function can be cached and in order to prevent the props from being retained within it's closure
// we pass in just the styles and not the entire props
var concatenatedStyles = function (styleProps) {
return (0,_fluentui_merge_styles__rspack_import_4.concatStyleSetsWithProps)(styleProps, baseStyles, customizedStyles, propStyles);
};
// The __cachedInputs__ array is attached to the function and consumed by the
// classNamesFunction as a list of keys to include for memoizing classnames.
concatenatedStyles.__cachedInputs__ = [
baseStyles,
customizedStyles,
propStyles,
];
concatenatedStyles.__noStyleOverride__ =
!customizedStyles && !propStyles;
styles.current = concatenatedStyles;
}
styles.current.__shadowConfig__ = useStyled(scope);
return (react__rspack_import_0.createElement(Component, (0,tslib__rspack_import_2.__assign)({ ref: forwardedRef }, rest, additionalProps, props, { styles: styles.current })));
});
// Function.prototype.name is an ES6 feature, so the cast to any is required until we're
// able to drop IE 11 support and compile with ES6 libs
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Wrapped.displayName = "Styled".concat(Component.displayName || Component.name);
// This preserves backwards compatibility.
var pureComponent = pure ? react__rspack_import_0.memo(Wrapped) : Wrapped;
// Check if the wrapper has a displayName after it has been memoized. Then assign it to the pure component.
if (Wrapped.displayName) {
pureComponent.displayName = Wrapped.displayName;
}
return pureComponent;
}
//# sourceMappingURL=styled.js.map
}),
"./node_modules/@fluentui/utilities/lib/useFocusRects.js":
/*!***************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/useFocusRects.js ***!
\***************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
FocusRects: () => (FocusRects),
FocusRectsContext: () => (FocusRectsContext),
useFocusRects: () => (useFocusRects)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _dom_getWindow__rspack_import_1 = __webpack_require__(/*! ./dom/getWindow */ "./node_modules/@fluentui/utilities/lib/dom/getWindow.js");
/* import */ var _keyboard__rspack_import_3 = __webpack_require__(/*! ./keyboard */ "./node_modules/@fluentui/utilities/lib/keyboard.js");
/* import */ var _setFocusVisibility__rspack_import_2 = __webpack_require__(/*! ./setFocusVisibility */ "./node_modules/@fluentui/utilities/lib/setFocusVisibility.js");
var mountCounters = new WeakMap();
var callbackMap = new WeakMap();
function setMountCounters(key, delta) {
var newValue;
var currValue = mountCounters.get(key);
if (currValue) {
newValue = currValue + delta;
}
else {
newValue = 1;
}
mountCounters.set(key, newValue);
return newValue;
}
function setCallbackMap(context) {
var callbacks = callbackMap.get(context);
if (callbacks) {
return callbacks;
}
var onMouseDown = function (ev) { return _onMouseDown(ev, context.registeredProviders); };
var onPointerDown = function (ev) { return _onPointerDown(ev, context.registeredProviders); };
var onKeyDown = function (ev) { return _onKeyDown(ev, context.registeredProviders); };
var onKeyUp = function (ev) { return _onKeyUp(ev, context.registeredProviders); };
callbacks = { onMouseDown: onMouseDown, onPointerDown: onPointerDown, onKeyDown: onKeyDown, onKeyUp: onKeyUp };
callbackMap.set(context, callbacks);
return callbacks;
}
var FocusRectsContext = react__rspack_import_0.createContext(undefined);
/**
* Initializes the logic which:
*
* 1. Subscribes keydown, keyup, mousedown and pointerdown events. (It will only do it once for the current element of
* the FocusRectsContext providerRef or once per window if no such element is provided via context, so it's safe to
* call this method multiple times.)
* 2. When the user presses triggers a keydown or keyup event via directional keyboard keys, adds the
* 'ms-Fabric--isFocusVisible' classname to the current element of the FocusRectsContext providerRef or the document
* body if no such element is provided via context, and removes the 'ms-Fabric-isFocusHidden' classname.
* 3. When the user triggers a mousedown or pointerdown event, adds the 'ms-Fabric-isFocusHidden' classname to the
* current element of the FocusRectsContext providerRef or the document body if no such element is provided via
* context, and removes the 'ms-Fabric--isFocusVisible' classname.
*
* This logic allows components on the page to conditionally render focus treatments based on
* the existence of global classnames, which simplifies logic overall.
*
* @param rootRef - A Ref object. Focus rectangle can be applied on itself and all its children.
*/
function useFocusRects(rootRef) {
var context = react__rspack_import_0.useContext(FocusRectsContext);
react__rspack_import_0.useEffect(function () {
var _a, _b, _c, _d;
var win = (0,_dom_getWindow__rspack_import_1.getWindow)(rootRef === null || rootRef === void 0 ? void 0 : rootRef.current);
if (!win || ((_a = win.FabricConfig) === null || _a === void 0 ? void 0 : _a.disableFocusRects) === true) {
return undefined;
}
var el = win;
var onMouseDown;
var onPointerDown;
var onKeyDown;
var onKeyUp;
if (((_b = context === null || context === void 0 ? void 0 : context.providerRef) === null || _b === void 0 ? void 0 : _b.current) &&
((_d = (_c = context === null || context === void 0 ? void 0 : context.providerRef) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.addEventListener)) {
el = context.providerRef.current;
// The NOINLINE directive tells terser not to move the setCallbackMap implementation into the call site during
// minification.
// This prevents the function from capturing additional variables in the closure, which can cause memory leaks.
var callbacks = /*@__NOINLINE__*/ setCallbackMap(context);
onMouseDown = callbacks.onMouseDown;
onPointerDown = callbacks.onPointerDown;
onKeyDown = callbacks.onKeyDown;
onKeyUp = callbacks.onKeyUp;
}
else {
onMouseDown = _onMouseDown;
onPointerDown = _onPointerDown;
onKeyDown = _onKeyDown;
onKeyUp = _onKeyUp;
}
var count = setMountCounters(el, 1);
if (count <= 1) {
el.addEventListener('mousedown', onMouseDown, true);
el.addEventListener('pointerdown', onPointerDown, true);
el.addEventListener('keydown', onKeyDown, true);
el.addEventListener('keyup', onKeyUp, true);
}
return function () {
var _a;
if (!win || ((_a = win.FabricConfig) === null || _a === void 0 ? void 0 : _a.disableFocusRects) === true) {
return;
}
count = setMountCounters(el, -1);
if (count === 0) {
el.removeEventListener('mousedown', onMouseDown, true);
el.removeEventListener('pointerdown', onPointerDown, true);
el.removeEventListener('keydown', onKeyDown, true);
el.removeEventListener('keyup', onKeyUp, true);
}
};
}, [context, rootRef]);
}
/**
* Function Component wrapper which enables calling `useFocusRects` hook.
* Renders nothing.
*/
var FocusRects = function (props) {
useFocusRects(props.rootRef);
return null;
};
function _onMouseDown(ev, registeredProviders) {
(0,_setFocusVisibility__rspack_import_2.setFocusVisibility)(false, ev.target, registeredProviders);
}
function _onPointerDown(ev, registeredProviders) {
if (ev.pointerType !== 'mouse') {
(0,_setFocusVisibility__rspack_import_2.setFocusVisibility)(false, ev.target, registeredProviders);
}
}
// You need both a keydown and a keyup listener that sets focus visibility to true to handle two distinct scenarios when
// attaching the listeners and classnames to the provider instead of the document body.
// If you only have a keydown listener, then the focus rectangles will not show when moving from outside of the provider
// to inside it. That is why a keyup listener is needed, since it will always trigger after the focus event is fired.
// If you only have a keyup listener, then the focus rectangles will not show moving between different tabbable elements
// if the tab key is pressed without being released. That's is why we need a keydown listener, since it will trigger for
// every element that is being tabbed into.
// This works because `classList.add` is smart and will not duplicate a classname that already exists on the classList
// when focus visibility is turned on.
function _onKeyDown(ev, registeredProviders) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if ((0,_keyboard__rspack_import_3.isDirectionalKeyCode)(ev.which)) {
(0,_setFocusVisibility__rspack_import_2.setFocusVisibility)(true, ev.target, registeredProviders);
}
}
function _onKeyUp(ev, registeredProviders) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if ((0,_keyboard__rspack_import_3.isDirectionalKeyCode)(ev.which)) {
(0,_setFocusVisibility__rspack_import_2.setFocusVisibility)(true, ev.target, registeredProviders);
}
}
//# sourceMappingURL=useFocusRects.js.map
}),
"./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js":
/*!***************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/useIsomorphicLayoutEffect.js ***!
\***************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
useIsomorphicLayoutEffect: () => (useIsomorphicLayoutEffect)
});
/* import */ var react__rspack_import_0 = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
/* import */ var _dom_canUseDOM__rspack_import_1 = __webpack_require__(/*! ./dom/canUseDOM */ "./node_modules/@fluentui/utilities/lib/dom/canUseDOM.js");
/**
* React currently throws a warning when using `useLayoutEffect` on the server. To get around it,
* this hook calls `useEffect` on the server (no-op) and `useLayoutEffect` in the browser.
*
* Prefer `useEffect` unless you have a specific need to do something after mount and before paint,
* such as to avoid a render flash for certain operations.
*
* Server-side rendering is detected based on `canUseDOM` from `@fluentui/utilities`.
*
* https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
* https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js
*/
// eslint-disable-next-line no-restricted-properties
var useIsomorphicLayoutEffect = (0,_dom_canUseDOM__rspack_import_1.canUseDOM)() ? react__rspack_import_0.useLayoutEffect : react__rspack_import_0.useEffect;
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
}),
"./node_modules/@fluentui/utilities/lib/warn/warn.js":
/*!***********************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/warn/warn.js ***!
\***********************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
setWarningCallback: () => (setWarningCallback),
warn: () => (warn)
});
/* eslint-disable no-console */
var _warningCallback = undefined;
/**
* Sends a warning to console, if the api is present.
*
* @public
* @param message - Warning message.
*/
function warn(message) {
if (_warningCallback && "development" !== 'production') {
_warningCallback(message);
}
else if (console && console.warn) {
console.warn(message);
}
}
/**
* Configures the warning callback. Passing in undefined will reset it to use the default
* console.warn function.
*
* @public
* @param warningCallback - Callback to override the generated warnings.
*/
function setWarningCallback(warningCallback) {
_warningCallback = warningCallback;
}
//# sourceMappingURL=warn.js.map
}),
"./node_modules/@fluentui/utilities/lib/warn/warnConditionallyRequiredProps.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/warn/warnConditionallyRequiredProps.js ***!
\*************************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
warnConditionallyRequiredProps: () => (warnConditionallyRequiredProps)
});
/* import */ var _warn__rspack_import_0 = __webpack_require__(/*! ./warn */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/**
* Warns when props are required if a condition is met.
*
* @public
* @param componentName - The name of the component being used.
* @param props - The props passed into the component.
* @param requiredProps - The name of the props that are required when the condition is met.
* @param conditionalPropName - The name of the prop that the condition is based on.
* @param condition - Whether the condition is met.
*/
function warnConditionallyRequiredProps(componentName, props, requiredProps, conditionalPropName, condition) {
if (condition === true && "development" !== 'production') {
for (var _i = 0, requiredProps_1 = requiredProps; _i < requiredProps_1.length; _i++) {
var requiredPropName = requiredProps_1[_i];
if (!(requiredPropName in props)) {
(0,_warn__rspack_import_0.warn)("".concat(componentName, " property '").concat(requiredPropName, "' is required when '").concat(conditionalPropName, "' is used.'"));
}
}
}
}
//# sourceMappingURL=warnConditionallyRequiredProps.js.map
}),
"./node_modules/@fluentui/utilities/lib/warn/warnControlledUsage.js":
/*!**************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/warn/warnControlledUsage.js ***!
\**************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
resetControlledWarnings: () => (resetControlledWarnings),
warnControlledUsage: () => (warnControlledUsage)
});
/* import */ var _warn__rspack_import_1 = __webpack_require__(/*! ./warn */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/* import */ var _controlled__rspack_import_0 = __webpack_require__(/*! ../controlled */ "./node_modules/@fluentui/utilities/lib/controlled.js");
var warningsMap;
if (true) {
warningsMap = {
valueOnChange: {},
valueDefaultValue: {},
controlledToUncontrolled: {},
uncontrolledToControlled: {},
};
}
/** Reset controlled usage warnings for testing purposes. */
function resetControlledWarnings() {
if (true) {
warningsMap.valueOnChange = {};
warningsMap.valueDefaultValue = {};
warningsMap.controlledToUncontrolled = {};
warningsMap.uncontrolledToControlled = {};
}
}
/**
* Check for and warn on the following error conditions with a form component:
* - A value prop is provided (indicated it's being used as controlled) without a change handler,
* and the component is not read-only
* - Both the value and defaultValue props are provided
* - The component is attempting to switch between controlled and uncontrolled
*
* The messages mimic the warnings React gives for these error conditions on input elements.
* The warning will only be displayed once per component ID.
*/
function warnControlledUsage(params) {
if (true) {
var componentId = params.componentId, componentName = params.componentName, defaultValueProp = params.defaultValueProp, props = params.props, oldProps = params.oldProps, onChangeProp = params.onChangeProp, readOnlyProp = params.readOnlyProp, valueProp = params.valueProp;
// This warning logic closely follows what React does for native elements.
var oldIsControlled = oldProps ? (0,_controlled__rspack_import_0.isControlled)(oldProps, valueProp) : undefined;
var newIsControlled = (0,_controlled__rspack_import_0.isControlled)(props, valueProp);
if (newIsControlled) {
// onChange (or readOnly) must be provided if value is provided
var hasOnChange = !!props[onChangeProp];
var isReadOnly = !!(readOnlyProp && props[readOnlyProp]);
if (!(hasOnChange || isReadOnly) && !warningsMap.valueOnChange[componentId]) {
warningsMap.valueOnChange[componentId] = true;
(0,_warn__rspack_import_1.warn)("Warning: You provided a '".concat(String(valueProp), "' prop to a ").concat(String(componentName), " without an '").concat(String(onChangeProp), "' handler. ") +
"This will render a read-only field. If the field should be mutable use '".concat(String(defaultValueProp), "'. ") +
"Otherwise, set '".concat(String(onChangeProp), "'").concat(readOnlyProp ? " or '".concat(String(readOnlyProp), "'") : '', "."));
}
// value and defaultValue are mutually exclusive
var defaultValue = props[defaultValueProp];
if (defaultValue !== undefined && defaultValue !== null && !warningsMap.valueDefaultValue[componentId]) {
warningsMap.valueDefaultValue[componentId] = true;
(0,_warn__rspack_import_1.warn)("Warning: You provided both '".concat(String(valueProp), "' and '").concat(String(defaultValueProp), "' to a ").concat(componentName, ". ") +
"Form fields must be either controlled or uncontrolled (specify either the '".concat(String(valueProp), "' prop, ") +
"or the '".concat(String(defaultValueProp), "' prop, but not both). Decide between using a controlled or uncontrolled ") +
"".concat(componentName, " and remove one of these props. More info: https://fb.me/react-controlled-components"));
}
}
// Warn if switching between uncontrolled and controlled. (One difference between this implementation
// and React's is that if oldIsControlled is indeterminate and newIsControlled true, we don't warn.)
if (oldProps && newIsControlled !== oldIsControlled) {
var oldType = oldIsControlled ? 'a controlled' : 'an uncontrolled';
var newType = oldIsControlled ? 'uncontrolled' : 'controlled';
var warnMap = oldIsControlled ? warningsMap.controlledToUncontrolled : warningsMap.uncontrolledToControlled;
if (!warnMap[componentId]) {
warnMap[componentId] = true;
(0,_warn__rspack_import_1.warn)("Warning: A component is changing ".concat(oldType, " ").concat(componentName, " to be ").concat(newType, ". ") +
"".concat(componentName, "s should not switch from controlled to uncontrolled (or vice versa). ") +
"Decide between using controlled or uncontrolled for the lifetime of the component. " +
"More info: https://fb.me/react-controlled-components");
}
}
}
}
//# sourceMappingURL=warnControlledUsage.js.map
}),
"./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js":
/*!***********************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/warn/warnDeprecations.js ***!
\***********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
warnDeprecations: () => (warnDeprecations)
});
/* import */ var _warn__rspack_import_0 = __webpack_require__(/*! ./warn */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/**
* Warns when a deprecated props are being used.
*
* @public
* @param componentName - The name of the component being used.
* @param props - The props passed into the component.
* @param deprecationMap - The map of deprecations, where key is the prop name and the value is
* either null or a replacement prop name.
*/
function warnDeprecations(componentName, props, deprecationMap) {
if (true) {
for (var propName in deprecationMap) {
if (props && propName in props) {
var deprecationMessage = "".concat(componentName, " property '").concat(propName, "' was used but has been deprecated.");
var replacementPropName = deprecationMap[propName];
if (replacementPropName) {
deprecationMessage += " Use '".concat(replacementPropName, "' instead.");
}
(0,_warn__rspack_import_0.warn)(deprecationMessage);
}
}
}
}
//# sourceMappingURL=warnDeprecations.js.map
}),
"./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js":
/*!****************************************************************************!*\
!*** ./node_modules/@fluentui/utilities/lib/warn/warnMutuallyExclusive.js ***!
\****************************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
warnMutuallyExclusive: () => (warnMutuallyExclusive)
});
/* import */ var _warn__rspack_import_0 = __webpack_require__(/*! ./warn */ "./node_modules/@fluentui/utilities/lib/warn/warn.js");
/**
* Warns when two props which are mutually exclusive are both being used.
*
* @public
* @param componentName - The name of the component being used.
* @param props - The props passed into the component.
* @param exclusiveMap - A map where the key is a parameter, and the value is the other parameter.
*/
function warnMutuallyExclusive(componentName, props, exclusiveMap) {
if (true) {
for (var propName in exclusiveMap) {
if (props && props[propName] !== undefined) {
var propInExclusiveMapValue = exclusiveMap[propName];
if (propInExclusiveMapValue && props[propInExclusiveMapValue] !== undefined) {
(0,_warn__rspack_import_0.warn)("".concat(componentName, " property '").concat(propName, "' is mutually exclusive with '").concat(exclusiveMap[propName], "'. ") +
"Use one or the other.");
}
}
}
}
}
//# sourceMappingURL=warnMutuallyExclusive.js.map
}),
"./node_modules/@microsoft/load-themed-styles/lib-es6/index.js":
/*!*********************************************************************!*\
!*** ./node_modules/@microsoft/load-themed-styles/lib-es6/index.js ***!
\*********************************************************************/
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
clearStyles: () => (clearStyles),
configureLoadStyles: () => (configureLoadStyles),
configureRunMode: () => (configureRunMode),
detokenize: () => (detokenize),
flush: () => (flush),
loadStyles: () => (loadStyles),
loadTheme: () => (loadTheme),
splitStyles: () => (splitStyles)
});
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
var __assign = (undefined && undefined.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
// Store the theming state in __themeState__ global scope for reuse in the case of duplicate
// load-themed-styles hosted on the page.
var _root = typeof window === 'undefined' ? __webpack_require__.g : window; // eslint-disable-line @typescript-eslint/no-explicit-any
// Nonce string to inject into script tag if one provided. This is used in CSP (Content Security Policy).
var _styleNonce = _root && _root.CSPSettings && _root.CSPSettings.nonce;
var _themeState = initializeThemeState();
/**
* Matches theming tokens. For example, "[theme: themeSlotName, default: #FFF]" (including the quotes).
*/
var _themeTokenRegex = /[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g;
var now = function () {
return typeof performance !== 'undefined' && !!performance.now ? performance.now() : Date.now();
};
function measure(func) {
var start = now();
func();
var end = now();
_themeState.perf.duration += end - start;
}
/**
* initialize global state object
*/
function initializeThemeState() {
var state = _root.__themeState__ || {
theme: undefined,
lastStyleElement: undefined,
registeredStyles: []
};
if (!state.runState) {
state = __assign(__assign({}, state), { perf: {
count: 0,
duration: 0
}, runState: {
flushTimer: 0,
mode: 0 /* Mode.sync */,
buffer: []
} });
}
if (!state.registeredThemableStyles) {
state = __assign(__assign({}, state), { registeredThemableStyles: [] });
}
_root.__themeState__ = state;
return state;
}
/**
* Loads a set of style text. If it is registered too early, we will register it when the window.load
* event is fired.
* @param {string | ThemableArray} styles Themable style text to register.
* @param {boolean} loadAsync When true, always load styles in async mode, irrespective of current sync mode.
*/
function loadStyles(styles, loadAsync) {
if (loadAsync === void 0) { loadAsync = false; }
measure(function () {
var styleParts = Array.isArray(styles) ? styles : splitStyles(styles);
var _a = _themeState.runState, mode = _a.mode, buffer = _a.buffer, flushTimer = _a.flushTimer;
if (loadAsync || mode === 1 /* Mode.async */) {
buffer.push(styleParts);
if (!flushTimer) {
_themeState.runState.flushTimer = asyncLoadStyles();
}
}
else {
applyThemableStyles(styleParts);
}
});
}
/**
* Allows for customizable loadStyles logic. e.g. for server side rendering application
* @param {(processedStyles: string, rawStyles?: string | ThemableArray) => void}
* a loadStyles callback that gets called when styles are loaded or reloaded
*/
function configureLoadStyles(loadStylesFn) {
_themeState.loadStyles = loadStylesFn;
}
/**
* Configure run mode of load-themable-styles
* @param mode load-themable-styles run mode, async or sync
*/
function configureRunMode(mode) {
_themeState.runState.mode = mode;
}
/**
* external code can call flush to synchronously force processing of currently buffered styles
*/
function flush() {
measure(function () {
var styleArrays = _themeState.runState.buffer.slice();
_themeState.runState.buffer = [];
var mergedStyleArray = [].concat.apply([], styleArrays);
if (mergedStyleArray.length > 0) {
applyThemableStyles(mergedStyleArray);
}
});
}
/**
* register async loadStyles
*/
function asyncLoadStyles() {
return setTimeout(function () {
_themeState.runState.flushTimer = 0;
flush();
}, 0);
}
/**
* Loads a set of style text. If it is registered too early, we will register it when the window.load event
* is fired.
* @param {string} styleText Style to register.
* @param {IStyleRecord} styleRecord Existing style record to re-apply.
*/
function applyThemableStyles(stylesArray, styleRecord) {
if (_themeState.loadStyles) {
_themeState.loadStyles(resolveThemableArray(stylesArray).styleString, stylesArray);
}
else {
registerStyles(stylesArray);
}
}
/**
* Registers a set theme tokens to find and replace. If styles were already registered, they will be
* replaced.
* @param {theme} theme JSON object of theme tokens to values.
*/
function loadTheme(theme) {
_themeState.theme = theme;
// reload styles.
reloadStyles();
}
/**
* Clear already registered style elements and style records in theme_State object
* @param option - specify which group of registered styles should be cleared.
* Default to be both themable and non-themable styles will be cleared
*/
function clearStyles(option) {
if (option === void 0) { option = 3 /* ClearStyleOptions.all */; }
if (option === 3 /* ClearStyleOptions.all */ || option === 2 /* ClearStyleOptions.onlyNonThemable */) {
clearStylesInternal(_themeState.registeredStyles);
_themeState.registeredStyles = [];
}
if (option === 3 /* ClearStyleOptions.all */ || option === 1 /* ClearStyleOptions.onlyThemable */) {
clearStylesInternal(_themeState.registeredThemableStyles);
_themeState.registeredThemableStyles = [];
}
}
function clearStylesInternal(records) {
records.forEach(function (styleRecord) {
var styleElement = styleRecord && styleRecord.styleElement;
if (styleElement && styleElement.parentElement) {
styleElement.parentElement.removeChild(styleElement);
}
});
}
/**
* Reloads styles.
*/
function reloadStyles() {
if (_themeState.theme) {
var themableStyles = [];
for (var _i = 0, _a = _themeState.registeredThemableStyles; _i < _a.length; _i++) {
var styleRecord = _a[_i];
themableStyles.push(styleRecord.themableStyle);
}
if (themableStyles.length > 0) {
clearStyles(1 /* ClearStyleOptions.onlyThemable */);
applyThemableStyles([].concat.apply([], themableStyles));
}
}
}
/**
* Find theme tokens and replaces them with provided theme values.
* @param {string} styles Tokenized styles to fix.
*/
function detokenize(styles) {
if (styles) {
styles = resolveThemableArray(splitStyles(styles)).styleString;
}
return styles;
}
/**
* Resolves ThemingInstruction objects in an array and joins the result into a string.
* @param {ThemableArray} splitStyleArray ThemableArray to resolve and join.
*/
function resolveThemableArray(splitStyleArray) {
var theme = _themeState.theme;
var themable = false;
// Resolve the array of theming instructions to an array of strings.
// Then join the array to produce the final CSS string.
var resolvedArray = (splitStyleArray || []).map(function (currentValue) {
var themeSlot = currentValue.theme;
if (themeSlot) {
themable = true;
// A theming annotation. Resolve it.
var themedValue = theme ? theme[themeSlot] : undefined;
var defaultValue = currentValue.defaultValue || 'inherit';
// Warn to console if we hit an unthemed value even when themes are provided, but only if "DEBUG" is true.
// Allow the themedValue to be undefined to explicitly request the default value.
if (theme &&
!themedValue &&
console &&
!(themeSlot in theme) &&
typeof DEBUG !== 'undefined' &&
DEBUG) {
console.warn("Theming value not provided for \"".concat(themeSlot, "\". Falling back to \"").concat(defaultValue, "\"."));
}
return themedValue || defaultValue;
}
else {
// A non-themable string. Preserve it.
return currentValue.rawString;
}
});
return {
styleString: resolvedArray.join(''),
themable: themable
};
}
/**
* Split tokenized CSS into an array of strings and theme specification objects
* @param {string} styles Tokenized styles to split.
*/
function splitStyles(styles) {
var result = [];
if (styles) {
var pos = 0; // Current position in styles.
var tokenMatch = void 0;
while ((tokenMatch = _themeTokenRegex.exec(styles))) {
var matchIndex = tokenMatch.index;
if (matchIndex > pos) {
result.push({
rawString: styles.substring(pos, matchIndex)
});
}
result.push({
theme: tokenMatch[1],
defaultValue: tokenMatch[2] // May be undefined
});
// index of the first character after the current match
pos = _themeTokenRegex.lastIndex;
}
// Push the rest of the string after the last match.
result.push({
rawString: styles.substring(pos)
});
}
return result;
}
/**
* Registers a set of style text. If it is registered too early, we will register it when the
* window.load event is fired.
* @param {ThemableArray} styleArray Array of IThemingInstruction objects to register.
* @param {IStyleRecord} styleRecord May specify a style Element to update.
*/
function registerStyles(styleArray) {
if (typeof document === 'undefined') {
return;
}
var head = document.getElementsByTagName('head')[0];
var styleElement = document.createElement('style');
var _a = resolveThemableArray(styleArray), styleString = _a.styleString, themable = _a.themable;
styleElement.setAttribute('data-load-themed-styles', 'true');
if (_styleNonce) {
styleElement.setAttribute('nonce', _styleNonce);
}
styleElement.appendChild(document.createTextNode(styleString));
_themeState.perf.count++;
head.appendChild(styleElement);
var ev = document.createEvent('HTMLEvents');
ev.initEvent('styleinsert', true /* bubbleEvent */, false /* cancelable */);
ev.args = {
newStyle: styleElement
};
document.dispatchEvent(ev);
var record = {
styleElement: styleElement,
themableStyle: styleArray
};
if (themable) {
_themeState.registeredThemableStyles.push(record);
}
else {
_themeState.registeredStyles.push(record);
}
}
//# sourceMappingURL=index.js.map
}),
"./node_modules/react-dom/cjs/react-dom-client.development.js":
/*!********************************************************************!*\
!*** ./node_modules/react-dom/cjs/react-dom-client.development.js ***!
\********************************************************************/
(function (__unused_webpack_module, exports, __webpack_require__) {
/**
* @license React
* react-dom-client.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
true &&
(function () {
function findHook(fiber, id) {
for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
(fiber = fiber.next), id--;
return fiber;
}
function copyWithSetImpl(obj, path, index, value) {
if (index >= path.length) return value;
var key = path[index],
updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
}
function copyWithRename(obj, oldPath, newPath) {
if (oldPath.length !== newPath.length)
console.warn("copyWithRename() expects paths of the same length");
else {
for (var i = 0; i < newPath.length - 1; i++)
if (oldPath[i] !== newPath[i]) {
console.warn(
"copyWithRename() expects paths to be the same except for the deepest key"
);
return;
}
return copyWithRenameImpl(obj, oldPath, newPath, 0);
}
}
function copyWithRenameImpl(obj, oldPath, newPath, index) {
var oldKey = oldPath[index],
updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
index + 1 === oldPath.length
? ((updated[newPath[index]] = updated[oldKey]),
isArrayImpl(updated)
? updated.splice(oldKey, 1)
: delete updated[oldKey])
: (updated[oldKey] = copyWithRenameImpl(
obj[oldKey],
oldPath,
newPath,
index + 1
));
return updated;
}
function copyWithDeleteImpl(obj, path, index) {
var key = path[index],
updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
if (index + 1 === path.length)
return (
isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key],
updated
);
updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
return updated;
}
function shouldSuspendImpl() {
return !1;
}
function shouldErrorImpl() {
return null;
}
function warnInvalidHookAccess() {
console.error(
"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
);
}
function warnInvalidContextAccess() {
console.error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
}
function noop() {}
function warnForMissingKey() {}
function setToSortedString(set) {
var array = [];
set.forEach(function (value) {
array.push(value);
});
return array.sort().join(", ");
}
function createFiber(tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
}
function scheduleRoot(root, element) {
root.context === emptyContextObject &&
(updateContainerImpl(root.current, 2, element, root, null, null),
flushSyncWork$1());
}
function scheduleRefresh(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
staleFamilies
);
flushSyncWork$1();
}
}
function setRefreshHandler(handler) {
resolveFamily = handler;
}
function isValidContainer(node) {
return !(
!node ||
(1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
);
}
function getNearestMountedFiber(fiber) {
var node = fiber,
nearestMounted = fiber;
if (fiber.alternate) for (; node.return; ) node = node.return;
else {
fiber = node;
do
(node = fiber),
0 !== (node.flags & 4098) && (nearestMounted = node.return),
(fiber = node.return);
while (fiber);
}
return 3 === node.tag ? nearestMounted : null;
}
function getSuspenseInstanceFromFiber(fiber) {
if (13 === fiber.tag) {
var suspenseState = fiber.memoizedState;
null === suspenseState &&
((fiber = fiber.alternate),
null !== fiber && (suspenseState = fiber.memoizedState));
if (null !== suspenseState) return suspenseState.dehydrated;
}
return null;
}
function getActivityInstanceFromFiber(fiber) {
if (31 === fiber.tag) {
var activityState = fiber.memoizedState;
null === activityState &&
((fiber = fiber.alternate),
null !== fiber && (activityState = fiber.memoizedState));
if (null !== activityState) return activityState.dehydrated;
}
return null;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber)
throw Error("Unable to find node on an unmounted component.");
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
alternate = getNearestMountedFiber(fiber);
if (null === alternate)
throw Error("Unable to find node on an unmounted component.");
return alternate !== fiber ? null : fiber;
}
for (var a = fiber, b = alternate; ; ) {
var parentA = a.return;
if (null === parentA) break;
var parentB = parentA.alternate;
if (null === parentB) {
b = parentA.return;
if (null !== b) {
a = b;
continue;
}
break;
}
if (parentA.child === parentB.child) {
for (parentB = parentA.child; parentB; ) {
if (parentB === a) return assertIsMounted(parentA), fiber;
if (parentB === b) return assertIsMounted(parentA), alternate;
parentB = parentB.sibling;
}
throw Error("Unable to find node on an unmounted component.");
}
if (a.return !== b.return) (a = parentA), (b = parentB);
else {
for (var didFindChild = !1, _child = parentA.child; _child; ) {
if (_child === a) {
didFindChild = !0;
a = parentA;
b = parentB;
break;
}
if (_child === b) {
didFindChild = !0;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
for (_child = parentB.child; _child; ) {
if (_child === a) {
didFindChild = !0;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = !0;
b = parentB;
a = parentA;
break;
}
_child = _child.sibling;
}
if (!didFindChild)
throw Error(
"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
);
}
}
if (a.alternate !== b)
throw Error(
"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
);
}
if (3 !== a.tag)
throw Error("Unable to find node on an unmounted component.");
return a.stateNode.current === a ? fiber : alternate;
}
function findCurrentHostFiberImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node; ) {
tag = findCurrentHostFiberImpl(node);
if (null !== tag) return tag;
node = node.sibling;
}
return null;
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function getComponentNameFromOwner(owner) {
return "number" === typeof owner.tag
? getComponentNameFromFiber(owner)
: "string" === typeof owner.name
? owner.name
: null;
}
function getComponentNameFromFiber(fiber) {
var type = fiber.type;
switch (fiber.tag) {
case 31:
return "Activity";
case 24:
return "Cache";
case 9:
return (type._context.displayName || "Context") + ".Consumer";
case 10:
return type.displayName || "Context";
case 18:
return "DehydratedFragment";
case 11:
return (
(fiber = type.render),
(fiber = fiber.displayName || fiber.name || ""),
type.displayName ||
("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef")
);
case 7:
return "Fragment";
case 26:
case 27:
case 5:
return type;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return getComponentNameFromType(type);
case 8:
return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 14:
case 15:
if ("function" === typeof type)
return type.displayName || type.name || null;
if ("string" === typeof type) return type;
break;
case 29:
type = fiber._debugInfo;
if (null != type)
for (var i = type.length - 1; 0 <= i; i--)
if ("string" === typeof type[i].name) return type[i].name;
if (null !== fiber.return)
return getComponentNameFromFiber(fiber.return);
}
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
function pop(cursor, fiber) {
0 > index$jscomp$0
? console.error("Unexpected pop.")
: (fiber !== fiberStack[index$jscomp$0] &&
console.error("Unexpected Fiber popped."),
(cursor.current = valueStack[index$jscomp$0]),
(valueStack[index$jscomp$0] = null),
(fiberStack[index$jscomp$0] = null),
index$jscomp$0--);
}
function push(cursor, value, fiber) {
index$jscomp$0++;
valueStack[index$jscomp$0] = cursor.current;
fiberStack[index$jscomp$0] = fiber;
cursor.current = value;
}
function requiredContext(c) {
null === c &&
console.error(
"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
);
return c;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance, fiber);
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor, null, fiber);
var nextRootContext = nextRootInstance.nodeType;
switch (nextRootContext) {
case 9:
case 11:
nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
nextRootInstance = (nextRootInstance =
nextRootInstance.documentElement)
? (nextRootInstance = nextRootInstance.namespaceURI)
? getOwnHostContext(nextRootInstance)
: HostContextNamespaceNone
: HostContextNamespaceNone;
break;
default:
if (
((nextRootContext = nextRootInstance.tagName),
(nextRootInstance = nextRootInstance.namespaceURI))
)
(nextRootInstance = getOwnHostContext(nextRootInstance)),
(nextRootInstance = getChildHostContextProd(
nextRootInstance,
nextRootContext
));
else
switch (nextRootContext) {
case "svg":
nextRootInstance = HostContextNamespaceSvg;
break;
case "math":
nextRootInstance = HostContextNamespaceMath;
break;
default:
nextRootInstance = HostContextNamespaceNone;
}
}
nextRootContext = nextRootContext.toLowerCase();
nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
nextRootContext = {
context: nextRootInstance,
ancestorInfo: nextRootContext
};
pop(contextStackCursor, fiber);
push(contextStackCursor, nextRootContext, fiber);
}
function popHostContainer(fiber) {
pop(contextStackCursor, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
}
function getHostContext() {
return requiredContext(contextStackCursor.current);
}
function pushHostContext(fiber) {
null !== fiber.memoizedState &&
push(hostTransitionProviderCursor, fiber, fiber);
var context = requiredContext(contextStackCursor.current);
var type = fiber.type;
var nextContext = getChildHostContextProd(context.context, type);
type = updatedAncestorInfoDev(context.ancestorInfo, type);
nextContext = { context: nextContext, ancestorInfo: type };
context !== nextContext &&
(push(contextFiberStackCursor, fiber, fiber),
push(contextStackCursor, nextContext, fiber));
}
function popHostContext(fiber) {
contextFiberStackCursor.current === fiber &&
(pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
hostTransitionProviderCursor.current === fiber &&
(pop(hostTransitionProviderCursor, fiber),
(HostTransitionContext._currentValue = NotPendingTransition));
}
function disabledLog() {}
function disableLogs() {
if (0 === disabledDepth) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: !0,
enumerable: !0,
value: disabledLog,
writable: !0
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
function reenableLogs() {
disabledDepth--;
if (0 === disabledDepth) {
var props = { configurable: !0, enumerable: !0, writable: !0 };
Object.defineProperties(console, {
log: assign({}, props, { value: prevLog }),
info: assign({}, props, { value: prevInfo }),
warn: assign({}, props, { value: prevWarn }),
error: assign({}, props, { value: prevError }),
group: assign({}, props, { value: prevGroup }),
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
groupEnd: assign({}, props, { value: prevGroupEnd })
});
}
0 > disabledDepth &&
console.error(
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
);
}
function formatOwnerStack(error) {
var prevPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
error = error.stack;
Error.prepareStackTrace = prevPrepareStackTrace;
error.startsWith("Error: react-stack-top-frame\n") &&
(error = error.slice(29));
prevPrepareStackTrace = error.indexOf("\n");
-1 !== prevPrepareStackTrace &&
(error = error.slice(prevPrepareStackTrace + 1));
prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
-1 !== prevPrepareStackTrace &&
(prevPrepareStackTrace = error.lastIndexOf(
"\n",
prevPrepareStackTrace
));
if (-1 !== prevPrepareStackTrace)
error = error.slice(0, prevPrepareStackTrace);
else return "";
return error;
}
function describeBuiltInComponentFrame(name) {
if (void 0 === prefix)
try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = (match && match[1]) || "";
suffix =
-1 < x.stack.indexOf("\n at")
? " ()"
: -1 < x.stack.indexOf("@")
? "@unknown:0:0"
: "";
}
return "\n" + prefix + name + suffix;
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) return "";
var frame = componentFrameCache.get(fn);
if (void 0 !== frame) return frame;
reentry = !0;
frame = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher = null;
previousDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = null;
disableLogs();
try {
var RunInRootFrame = {
DetermineComponentFrameRoot: function () {
try {
if (construct) {
var Fake = function () {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function () {
throw Error();
}
});
if ("object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
var control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x$0) {
control = x$0;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x$1) {
control = x$1;
}
(Fake = fn()) &&
"function" === typeof Fake.catch &&
Fake.catch(function () {});
}
} catch (sample) {
if (sample && control && "string" === typeof sample.stack)
return [sample.stack, control.stack];
}
return [null, null];
}
};
RunInRootFrame.DetermineComponentFrameRoot.displayName =
"DetermineComponentFrameRoot";
var namePropDescriptor = Object.getOwnPropertyDescriptor(
RunInRootFrame.DetermineComponentFrameRoot,
"name"
);
namePropDescriptor &&
namePropDescriptor.configurable &&
Object.defineProperty(
RunInRootFrame.DetermineComponentFrameRoot,
"name",
{ value: "DetermineComponentFrameRoot" }
);
var _RunInRootFrame$Deter =
RunInRootFrame.DetermineComponentFrameRoot(),
sampleStack = _RunInRootFrame$Deter[0],
controlStack = _RunInRootFrame$Deter[1];
if (sampleStack && controlStack) {
var sampleLines = sampleStack.split("\n"),
controlLines = controlStack.split("\n");
for (
_RunInRootFrame$Deter = namePropDescriptor = 0;
namePropDescriptor < sampleLines.length &&
!sampleLines[namePropDescriptor].includes(
"DetermineComponentFrameRoot"
);
)
namePropDescriptor++;
for (
;
_RunInRootFrame$Deter < controlLines.length &&
!controlLines[_RunInRootFrame$Deter].includes(
"DetermineComponentFrameRoot"
);
)
_RunInRootFrame$Deter++;
if (
namePropDescriptor === sampleLines.length ||
_RunInRootFrame$Deter === controlLines.length
)
for (
namePropDescriptor = sampleLines.length - 1,
_RunInRootFrame$Deter = controlLines.length - 1;
1 <= namePropDescriptor &&
0 <= _RunInRootFrame$Deter &&
sampleLines[namePropDescriptor] !==
controlLines[_RunInRootFrame$Deter];
)
_RunInRootFrame$Deter--;
for (
;
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
namePropDescriptor--, _RunInRootFrame$Deter--
)
if (
sampleLines[namePropDescriptor] !==
controlLines[_RunInRootFrame$Deter]
) {
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
do
if (
(namePropDescriptor--,
_RunInRootFrame$Deter--,
0 > _RunInRootFrame$Deter ||
sampleLines[namePropDescriptor] !==
controlLines[_RunInRootFrame$Deter])
) {
var _frame =
"\n" +
sampleLines[namePropDescriptor].replace(
" at new ",
" at "
);
fn.displayName &&
_frame.includes("") &&
(_frame = _frame.replace("", fn.displayName));
"function" === typeof fn &&
componentFrameCache.set(fn, _frame);
return _frame;
}
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
}
break;
}
}
} finally {
(reentry = !1),
(ReactSharedInternals.H = previousDispatcher),
reenableLogs(),
(Error.prepareStackTrace = frame);
}
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
? describeBuiltInComponentFrame(sampleLines)
: "";
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
function describeFiber(fiber, childFiber) {
switch (fiber.tag) {
case 26:
case 27:
case 5:
return describeBuiltInComponentFrame(fiber.type);
case 16:
return describeBuiltInComponentFrame("Lazy");
case 13:
return fiber.child !== childFiber && null !== childFiber
? describeBuiltInComponentFrame("Suspense Fallback")
: describeBuiltInComponentFrame("Suspense");
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 15:
return describeNativeComponentFrame(fiber.type, !1);
case 11:
return describeNativeComponentFrame(fiber.type.render, !1);
case 1:
return describeNativeComponentFrame(fiber.type, !0);
case 31:
return describeBuiltInComponentFrame("Activity");
default:
return "";
}
}
function getStackByFiberInDevAndProd(workInProgress) {
try {
var info = "",
previous = null;
do {
info += describeFiber(workInProgress, previous);
var debugInfo = workInProgress._debugInfo;
if (debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--) {
var entry = debugInfo[i];
if ("string" === typeof entry.name) {
var JSCompiler_temp_const = info;
a: {
var name = entry.name,
env = entry.env,
location = entry.debugLocation;
if (null != location) {
var childStack = formatOwnerStack(location),
idx = childStack.lastIndexOf("\n"),
lastLine =
-1 === idx ? childStack : childStack.slice(idx + 1);
if (-1 !== lastLine.indexOf(name)) {
var JSCompiler_inline_result = "\n" + lastLine;
break a;
}
}
JSCompiler_inline_result = describeBuiltInComponentFrame(
name + (env ? " [" + env + "]" : "")
);
}
info = JSCompiler_temp_const + JSCompiler_inline_result;
}
}
previous = workInProgress;
workInProgress = workInProgress.return;
} while (workInProgress);
return info;
} catch (x) {
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
function describeFunctionComponentFrameWithoutLineNumber(fn) {
return (fn = fn ? fn.displayName || fn.name : "")
? describeBuiltInComponentFrame(fn)
: "";
}
function getCurrentFiberOwnerNameInDevOrNull() {
if (null === current) return null;
var owner = current._debugOwner;
return null != owner ? getComponentNameFromOwner(owner) : null;
}
function getCurrentFiberStackInDev() {
if (null === current) return "";
var workInProgress = current;
try {
var info = "";
6 === workInProgress.tag && (workInProgress = workInProgress.return);
switch (workInProgress.tag) {
case 26:
case 27:
case 5:
info += describeBuiltInComponentFrame(workInProgress.type);
break;
case 13:
info += describeBuiltInComponentFrame("Suspense");
break;
case 19:
info += describeBuiltInComponentFrame("SuspenseList");
break;
case 31:
info += describeBuiltInComponentFrame("Activity");
break;
case 30:
case 0:
case 15:
case 1:
workInProgress._debugOwner ||
"" !== info ||
(info += describeFunctionComponentFrameWithoutLineNumber(
workInProgress.type
));
break;
case 11:
workInProgress._debugOwner ||
"" !== info ||
(info += describeFunctionComponentFrameWithoutLineNumber(
workInProgress.type.render
));
}
for (; workInProgress; )
if ("number" === typeof workInProgress.tag) {
var fiber = workInProgress;
workInProgress = fiber._debugOwner;
var debugStack = fiber._debugStack;
if (workInProgress && debugStack) {
var formattedStack = formatOwnerStack(debugStack);
"" !== formattedStack && (info += "\n" + formattedStack);
}
} else if (null != workInProgress.debugStack) {
var ownerStack = workInProgress.debugStack;
(workInProgress = workInProgress.owner) &&
ownerStack &&
(info += "\n" + formatOwnerStack(ownerStack));
} else break;
var JSCompiler_inline_result = info;
} catch (x) {
JSCompiler_inline_result =
"\nError generating stack: " + x.message + "\n" + x.stack;
}
return JSCompiler_inline_result;
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
setCurrentFiber(fiber);
try {
return null !== fiber && fiber._debugTask
? fiber._debugTask.run(
callback.bind(null, arg0, arg1, arg2, arg3, arg4)
)
: callback(arg0, arg1, arg2, arg3, arg4);
} finally {
setCurrentFiber(previousFiber);
}
throw Error(
"runWithFiberInDEV should never be called in production. This is a bug in React."
);
}
function setCurrentFiber(fiber) {
ReactSharedInternals.getCurrentStack =
null === fiber ? null : getCurrentFiberStackInDev;
isRendering = !1;
current = fiber;
}
function typeName(value) {
return (
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object"
);
}
function willCoercionThrow(value) {
try {
return testStringCoercion(value), !1;
} catch (e) {
return !0;
}
}
function testStringCoercion(value) {
return "" + value;
}
function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value))
return (
console.error(
"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
),
testStringCoercion(value)
);
}
function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value))
return (
console.error(
"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
propName,
typeName(value)
),
testStringCoercion(value)
);
}
function checkFormFieldValueStringCoercion(value) {
if (willCoercionThrow(value))
return (
console.error(
"Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
typeName(value)
),
testStringCoercion(value)
);
}
function injectInternals(internals) {
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) return !0;
if (!hook.supportsFiber)
return (
console.error(
"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
),
!0
);
try {
(rendererID = hook.inject(internals)), (injectedHook = hook);
} catch (err) {
console.error("React instrumentation encountered an error: %o.", err);
}
return hook.checkDCE ? !0 : !1;
}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 &&
unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError ||
((hasLoggedError = !0),
console.error(
"React instrumentation encountered an error: %o",
err
));
}
}
function clz32Fallback(x) {
x >>>= 0;
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
}
function getHighestPriorityLanes(lanes) {
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
return 64;
case 128:
return 128;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
return lanes & 261888;
case 262144:
case 524288:
case 1048576:
case 2097152:
return lanes & 3932160;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return lanes & 62914560;
case 67108864:
return 67108864;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 0;
default:
return (
console.error(
"Should have found matching lanes. This is a bug in React."
),
lanes
);
}
}
function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
pingedLanes = root.pingedLanes;
root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
0 !== pendingLanes
? (nextLanes = getHighestPriorityLanes(pendingLanes))
: ((pingedLanes &= nonIdlePendingLanes),
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: rootHasPendingCommit ||
((rootHasPendingCommit = nonIdlePendingLanes & ~root),
0 !== rootHasPendingCommit &&
(nextLanes =
getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: rootHasPendingCommit ||
((rootHasPendingCommit = pendingLanes & ~root),
0 !== rootHasPendingCommit &&
(nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
(rootHasPendingCommit = wipLanes & -wipLanes),
suspendedLanes >= rootHasPendingCommit ||
(32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
? wipLanes
: nextLanes;
}
function checkIfRootIsPrerendering(root, renderLanes) {
return (
0 ===
(root.pendingLanes &
~(root.suspendedLanes & ~root.pingedLanes) &
renderLanes)
);
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case 1:
case 2:
case 4:
case 8:
case 64:
return currentTime + 250;
case 16:
case 32:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return currentTime + 5e3;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return -1;
case 67108864:
case 134217728:
case 268435456:
case 536870912:
case 1073741824:
return -1;
default:
return (
console.error(
"Should have found matching lanes. This is a bug in React."
),
-1
);
}
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
return lane;
}
function createLaneMap(initial) {
for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
return laneMap;
}
function markRootUpdated$1(root, updateLane) {
root.pendingLanes |= updateLane;
268435456 !== updateLane &&
((root.suspendedLanes = 0),
(root.pingedLanes = 0),
(root.warmLanes = 0));
}
function markRootFinished(
root,
finishedLanes,
remainingLanes,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
var previouslyPendingLanes = root.pendingLanes;
root.pendingLanes = remainingLanes;
root.suspendedLanes = 0;
root.pingedLanes = 0;
root.warmLanes = 0;
root.expiredLanes &= remainingLanes;
root.entangledLanes &= remainingLanes;
root.errorRecoveryDisabledLanes &= remainingLanes;
root.shellSuspendCounter = 0;
var entanglements = root.entanglements,
expirationTimes = root.expirationTimes,
hiddenUpdates = root.hiddenUpdates;
for (
remainingLanes = previouslyPendingLanes & ~remainingLanes;
0 < remainingLanes;
) {
var index = 31 - clz32(remainingLanes),
lane = 1 << index;
entanglements[index] = 0;
expirationTimes[index] = -1;
var hiddenUpdatesForLane = hiddenUpdates[index];
if (null !== hiddenUpdatesForLane)
for (
hiddenUpdates[index] = null, index = 0;
index < hiddenUpdatesForLane.length;
index++
) {
var update = hiddenUpdatesForLane[index];
null !== update && (update.lane &= -536870913);
}
remainingLanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
0 !== suspendedRetryLanes &&
0 === updatedLanes &&
0 !== root.tag &&
(root.suspendedLanes |=
suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
var spawnedLaneIndex = 31 - clz32(spawnedLane);
root.entangledLanes |= spawnedLane;
root.entanglements[spawnedLaneIndex] =
root.entanglements[spawnedLaneIndex] |
1073741824 |
(entangledLanes & 261930);
}
function markRootEntangled(root, entangledLanes) {
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
for (root = root.entanglements; rootEntangledLanes; ) {
var index = 31 - clz32(rootEntangledLanes),
lane = 1 << index;
(lane & entangledLanes) | (root[index] & entangledLanes) &&
(root[index] |= entangledLanes);
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
renderLane =
0 !== (renderLane & 42)
? 1
: getBumpedLaneForHydrationByLane(renderLane);
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
lane = 1;
break;
case 8:
lane = 4;
break;
case 32:
lane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
lane = 128;
break;
case 268435456:
lane = 134217728;
break;
default:
lane = 0;
}
return lane;
}
function addFiberToLanesMap(root, fiber, lanes) {
if (isDevToolsPresent)
for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
var index = 31 - clz32(lanes),
lane = 1 << index;
root[index].add(fiber);
lanes &= ~lane;
}
}
function movePendingFibersToMemoized(root, lanes) {
if (isDevToolsPresent)
for (
var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
memoizedUpdaters = root.memoizedUpdaters;
0 < lanes;
) {
var index = 31 - clz32(lanes);
root = 1 << index;
index = pendingUpdatersLaneMap[index];
0 < index.size &&
(index.forEach(function (fiber) {
var alternate = fiber.alternate;
(null !== alternate && memoizedUpdaters.has(alternate)) ||
memoizedUpdaters.add(fiber);
}),
index.clear());
lanes &= ~root;
}
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes
? 0 !== (lanes & 134217727)
? DefaultEventPriority
: IdleEventPriority
: ContinuousEventPriority
: DiscreteEventPriority;
}
function resolveUpdatePriority() {
var updatePriority = ReactDOMSharedInternals.p;
if (0 !== updatePriority) return updatePriority;
updatePriority = window.event;
return void 0 === updatePriority
? DefaultEventPriority
: getEventPriority(updatePriority.type);
}
function runWithPriority(priority, fn) {
var previousPriority = ReactDOMSharedInternals.p;
try {
return (ReactDOMSharedInternals.p = priority), fn();
} finally {
ReactDOMSharedInternals.p = previousPriority;
}
}
function detachDeletedInstance(node) {
delete node[internalInstanceKey];
delete node[internalPropsKey];
delete node[internalEventHandlersKey];
delete node[internalEventHandlerListenersKey];
delete node[internalEventHandlesSetKey];
}
function getClosestInstanceFromNode(targetNode) {
var targetInst = targetNode[internalInstanceKey];
if (targetInst) return targetInst;
for (var parentNode = targetNode.parentNode; parentNode; ) {
if (
(targetInst =
parentNode[internalContainerInstanceKey] ||
parentNode[internalInstanceKey])
) {
parentNode = targetInst.alternate;
if (
null !== targetInst.child ||
(null !== parentNode && null !== parentNode.child)
)
for (
targetNode = getParentHydrationBoundary(targetNode);
null !== targetNode;
) {
if ((parentNode = targetNode[internalInstanceKey]))
return parentNode;
targetNode = getParentHydrationBoundary(targetNode);
}
return targetInst;
}
targetNode = parentNode;
parentNode = targetNode.parentNode;
}
return null;
}
function getInstanceFromNode(node) {
if (
(node = node[internalInstanceKey] || node[internalContainerInstanceKey])
) {
var tag = node.tag;
if (
5 === tag ||
6 === tag ||
13 === tag ||
31 === tag ||
26 === tag ||
27 === tag ||
3 === tag
)
return node;
}
return null;
}
function getNodeFromInstance(inst) {
var tag = inst.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
return inst.stateNode;
throw Error("getNodeFromInstance: Invalid argument.");
}
function getResourcesFromRoot(root) {
var resources = root[internalRootNodeResourcesKey];
resources ||
(resources = root[internalRootNodeResourcesKey] =
{ hoistableStyles: new Map(), hoistableScripts: new Map() });
return resources;
}
function markNodeAsHoistable(node) {
node[internalHoistableMarker] = !0;
}
function registerTwoPhaseEvent(registrationName, dependencies) {
registerDirectEvent(registrationName, dependencies);
registerDirectEvent(registrationName + "Capture", dependencies);
}
function registerDirectEvent(registrationName, dependencies) {
registrationNameDependencies[registrationName] &&
console.error(
"EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
registrationName
);
registrationNameDependencies[registrationName] = dependencies;
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
"onDoubleClick" === registrationName &&
(possibleRegistrationNames.ondblclick = registrationName);
for (
registrationName = 0;
registrationName < dependencies.length;
registrationName++
)
allNativeEvents.add(dependencies[registrationName]);
}
function checkControlledValueProps(tagName, props) {
hasReadOnlyValue[props.type] ||
props.onChange ||
props.onInput ||
props.readOnly ||
props.disabled ||
null == props.value ||
("select" === tagName
? console.error(
"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
)
: console.error(
"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
));
props.onChange ||
props.readOnly ||
props.disabled ||
null == props.checked ||
console.error(
"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
);
}
function isAttributeNameSafe(attributeName) {
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
return !0;
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
return !1;
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
return (validatedAttributeNameCache[attributeName] = !0);
illegalAttributeNameCache[attributeName] = !0;
console.error("Invalid attribute name: `%s`", attributeName);
return !1;
}
function getValueForAttributeOnCustomComponent(node, name, expected) {
if (isAttributeNameSafe(name)) {
if (!node.hasAttribute(name)) {
switch (typeof expected) {
case "symbol":
case "object":
return expected;
case "function":
return expected;
case "boolean":
if (!1 === expected) return expected;
}
return void 0 === expected ? void 0 : null;
}
node = node.getAttribute(name);
if ("" === node && !0 === expected) return !0;
checkAttributeStringCoercion(expected, name);
return node === "" + expected ? expected : node;
}
}
function setValueForAttribute(node, name, value) {
if (isAttributeNameSafe(name))
if (null === value) node.removeAttribute(name);
else {
switch (typeof value) {
case "undefined":
case "function":
case "symbol":
node.removeAttribute(name);
return;
case "boolean":
var prefix = name.toLowerCase().slice(0, 5);
if ("data-" !== prefix && "aria-" !== prefix) {
node.removeAttribute(name);
return;
}
}
checkAttributeStringCoercion(value, name);
node.setAttribute(name, "" + value);
}
}
function setValueForKnownAttribute(node, name, value) {
if (null === value) node.removeAttribute(name);
else {
switch (typeof value) {
case "undefined":
case "function":
case "symbol":
case "boolean":
node.removeAttribute(name);
return;
}
checkAttributeStringCoercion(value, name);
node.setAttribute(name, "" + value);
}
}
function setValueForNamespacedAttribute(node, namespace, name, value) {
if (null === value) node.removeAttribute(name);
else {
switch (typeof value) {
case "undefined":
case "function":
case "symbol":
case "boolean":
node.removeAttribute(name);
return;
}
checkAttributeStringCoercion(value, name);
node.setAttributeNS(namespace, name, "" + value);
}
}
function getToStringValue(value) {
switch (typeof value) {
case "bigint":
case "boolean":
case "number":
case "string":
case "undefined":
return value;
case "object":
return checkFormFieldValueStringCoercion(value), value;
default:
return "";
}
}
function isCheckable(elem) {
var type = elem.type;
return (
(elem = elem.nodeName) &&
"input" === elem.toLowerCase() &&
("checkbox" === type || "radio" === type)
);
}
function trackValueOnNode(node, valueField, currentValue) {
var descriptor = Object.getOwnPropertyDescriptor(
node.constructor.prototype,
valueField
);
if (
!node.hasOwnProperty(valueField) &&
"undefined" !== typeof descriptor &&
"function" === typeof descriptor.get &&
"function" === typeof descriptor.set
) {
var get = descriptor.get,
set = descriptor.set;
Object.defineProperty(node, valueField, {
configurable: !0,
get: function () {
return get.call(this);
},
set: function (value) {
checkFormFieldValueStringCoercion(value);
currentValue = "" + value;
set.call(this, value);
}
});
Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable
});
return {
getValue: function () {
return currentValue;
},
setValue: function (value) {
checkFormFieldValueStringCoercion(value);
currentValue = "" + value;
},
stopTracking: function () {
node._valueTracker = null;
delete node[valueField];
}
};
}
}
function track(node) {
if (!node._valueTracker) {
var valueField = isCheckable(node) ? "checked" : "value";
node._valueTracker = trackValueOnNode(
node,
valueField,
"" + node[valueField]
);
}
}
function updateValueIfChanged(node) {
if (!node) return !1;
var tracker = node._valueTracker;
if (!tracker) return !0;
var lastValue = tracker.getValue();
var value = "";
node &&
(value = isCheckable(node)
? node.checked
? "true"
: "false"
: node.value);
node = value;
return node !== lastValue ? (tracker.setValue(node), !0) : !1;
}
function getActiveElement(doc) {
doc = doc || ("undefined" !== typeof document ? document : void 0);
if ("undefined" === typeof doc) return null;
try {
return doc.activeElement || doc.body;
} catch (e) {
return doc.body;
}
}
function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
return value.replace(
escapeSelectorAttributeValueInsideDoubleQuotesRegex,
function (ch) {
return "\\" + ch.charCodeAt(0).toString(16) + " ";
}
);
}
function validateInputProps(element, props) {
void 0 === props.checked ||
void 0 === props.defaultChecked ||
didWarnCheckedDefaultChecked ||
(console.error(
"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
getCurrentFiberOwnerNameInDevOrNull() || "A component",
props.type
),
(didWarnCheckedDefaultChecked = !0));
void 0 === props.value ||
void 0 === props.defaultValue ||
didWarnValueDefaultValue$1 ||
(console.error(
"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
getCurrentFiberOwnerNameInDevOrNull() || "A component",
props.type
),
(didWarnValueDefaultValue$1 = !0));
}
function updateInput(
element,
value,
defaultValue,
lastDefaultValue,
checked,
defaultChecked,
type,
name
) {
element.name = "";
null != type &&
"function" !== typeof type &&
"symbol" !== typeof type &&
"boolean" !== typeof type
? (checkAttributeStringCoercion(type, "type"), (element.type = type))
: element.removeAttribute("type");
if (null != value)
if ("number" === type) {
if ((0 === value && "" === element.value) || element.value != value)
element.value = "" + getToStringValue(value);
} else
element.value !== "" + getToStringValue(value) &&
(element.value = "" + getToStringValue(value));
else
("submit" !== type && "reset" !== type) ||
element.removeAttribute("value");
null != value
? setDefaultValue(element, type, getToStringValue(value))
: null != defaultValue
? setDefaultValue(element, type, getToStringValue(defaultValue))
: null != lastDefaultValue && element.removeAttribute("value");
null == checked &&
null != defaultChecked &&
(element.defaultChecked = !!defaultChecked);
null != checked &&
(element.checked =
checked &&
"function" !== typeof checked &&
"symbol" !== typeof checked);
null != name &&
"function" !== typeof name &&
"symbol" !== typeof name &&
"boolean" !== typeof name
? (checkAttributeStringCoercion(name, "name"),
(element.name = "" + getToStringValue(name)))
: element.removeAttribute("name");
}
function initInput(
element,
value,
defaultValue,
checked,
defaultChecked,
type,
name,
isHydrating
) {
null != type &&
"function" !== typeof type &&
"symbol" !== typeof type &&
"boolean" !== typeof type &&
(checkAttributeStringCoercion(type, "type"), (element.type = type));
if (null != value || null != defaultValue) {
if (
!(
("submit" !== type && "reset" !== type) ||
(void 0 !== value && null !== value)
)
) {
track(element);
return;
}
defaultValue =
null != defaultValue ? "" + getToStringValue(defaultValue) : "";
value = null != value ? "" + getToStringValue(value) : defaultValue;
isHydrating || value === element.value || (element.value = value);
element.defaultValue = value;
}
checked = null != checked ? checked : defaultChecked;
checked =
"function" !== typeof checked &&
"symbol" !== typeof checked &&
!!checked;
element.checked = isHydrating ? element.checked : !!checked;
element.defaultChecked = !!checked;
null != name &&
"function" !== typeof name &&
"symbol" !== typeof name &&
"boolean" !== typeof name &&
(checkAttributeStringCoercion(name, "name"), (element.name = name));
track(element);
}
function setDefaultValue(node, type, value) {
("number" === type && getActiveElement(node.ownerDocument) === node) ||
node.defaultValue === "" + value ||
(node.defaultValue = "" + value);
}
function validateOptionProps(element, props) {
null == props.value &&
("object" === typeof props.children && null !== props.children
? React.Children.forEach(props.children, function (child) {
null == child ||
"string" === typeof child ||
"number" === typeof child ||
"bigint" === typeof child ||
didWarnInvalidChild ||
((didWarnInvalidChild = !0),
console.error(
"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to