diff --git a/kiss-translator-ios-safari.user.js b/kiss-translator-ios-safari.user.js index 69c8820..697dc57 100644 --- a/kiss-translator-ios-safari.user.js +++ b/kiss-translator-ios-safari.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name KISS Translator // @namespace https://github.com/fishjar/kiss-translator -// @version 2.0.2 +// @version 2.0.3 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe // @homepageURL https://github.com/fishjar/kiss-translator @@ -29406,2313 +29406,8 @@ __webpack_require__.d(base_namespaceObject, { stringifyUrl: () => (stringifyUrl) }); -// EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js -var react = __webpack_require__(7948); -// EXTERNAL MODULE: ./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js -var client = __webpack_require__(3884); -// EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js -var objectWithoutPropertiesLoose = __webpack_require__(3031); -// EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(1010); -// EXTERNAL MODULE: ./node_modules/.pnpm/clsx@2.1.0/node_modules/clsx/dist/clsx.mjs -var clsx = __webpack_require__(7919); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/composeClasses/composeClasses.js -var composeClasses = __webpack_require__(5923); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/styles/styled.js -var styled = __webpack_require__(5807); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/styles/useThemeProps.js -var useThemeProps = __webpack_require__(3954); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useForkRef.js -var useForkRef = __webpack_require__(8689); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useEventCallback.js -var useEventCallback = __webpack_require__(1469); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useIsFocusVisible.js -var useIsFocusVisible = __webpack_require__(7541); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js -function _taggedTemplateLiteral(strings, raw) { - if (!raw) { - raw = strings.slice(0); - } - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self; -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf(subClass, superClass); -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-transition-group/esm/TransitionGroupContext.js - -/* harmony default export */ const TransitionGroupContext = (react.createContext(null)); -;// CONCATENATED MODULE: ./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-transition-group/esm/utils/ChildMapping.js - -/** - * Given `this.props.children`, return an object mapping key to child. - * - * @param {*} children `this.props.children` - * @return {object} Mapping of key to child - */ - -function getChildMapping(children, mapFn) { - var mapper = function mapper(child) { - return mapFn && (0,react.isValidElement)(child) ? mapFn(child) : child; - }; - var result = Object.create(null); - if (children) react.Children.map(children, function (c) { - return c; - }).forEach(function (child) { - // run the map function here instead so that the key is the computed one - result[child.key] = mapper(child); - }); - return result; -} -/** - * When you're adding or removing children some may be added or removed in the - * same render pass. We want to show *both* since we want to simultaneously - * animate elements in and out. This function takes a previous set of keys - * and a new set of keys and merges them with its best guess of the correct - * ordering. In the future we may expose some of the utilities in - * ReactMultiChild to make this easy, but for now React itself does not - * directly have this concept of the union of prevChildren and nextChildren - * so we implement it here. - * - * @param {object} prev prev children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @param {object} next next children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @return {object} a key set that contains all keys in `prev` and all keys - * in `next` in a reasonable order. - */ - -function mergeChildMappings(prev, next) { - prev = prev || {}; - next = next || {}; - function getValueForKey(key) { - return key in next ? next[key] : prev[key]; - } // For each key of `next`, the list of keys to insert before that key in - // the combined list - - var nextKeysPending = Object.create(null); - var pendingKeys = []; - for (var prevKey in prev) { - if (prevKey in next) { - if (pendingKeys.length) { - nextKeysPending[prevKey] = pendingKeys; - pendingKeys = []; - } - } else { - pendingKeys.push(prevKey); - } - } - var i; - var childMapping = {}; - for (var nextKey in next) { - if (nextKeysPending[nextKey]) { - for (i = 0; i < nextKeysPending[nextKey].length; i++) { - var pendingNextKey = nextKeysPending[nextKey][i]; - childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); - } - } - childMapping[nextKey] = getValueForKey(nextKey); - } // Finally, add the keys which didn't appear before any key in `next` - - for (i = 0; i < pendingKeys.length; i++) { - childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); - } - return childMapping; -} -function getProp(child, prop, props) { - return props[prop] != null ? props[prop] : child.props[prop]; -} -function getInitialChildMapping(props, onExited) { - return getChildMapping(props.children, function (child) { - return (0,react.cloneElement)(child, { - onExited: onExited.bind(null, child), - in: true, - appear: getProp(child, 'appear', props), - enter: getProp(child, 'enter', props), - exit: getProp(child, 'exit', props) - }); - }); -} -function getNextChildMapping(nextProps, prevChildMapping, onExited) { - var nextChildMapping = getChildMapping(nextProps.children); - var children = mergeChildMappings(prevChildMapping, nextChildMapping); - Object.keys(children).forEach(function (key) { - var child = children[key]; - if (!(0,react.isValidElement)(child)) return; - var hasPrev = (key in prevChildMapping); - var hasNext = (key in nextChildMapping); - var prevChild = prevChildMapping[key]; - var isLeaving = (0,react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering) - - if (hasNext && (!hasPrev || isLeaving)) { - // console.log('entering', key) - children[key] = (0,react.cloneElement)(child, { - onExited: onExited.bind(null, child), - in: true, - exit: getProp(child, 'exit', nextProps), - enter: getProp(child, 'enter', nextProps) - }); - } else if (!hasNext && hasPrev && !isLeaving) { - // item is old (exiting) - // console.log('leaving', key) - children[key] = (0,react.cloneElement)(child, { - in: false - }); - } else if (hasNext && hasPrev && (0,react.isValidElement)(prevChild)) { - // item hasn't changed transition states - // copy over the last transition props; - // console.log('unchanged', key) - children[key] = (0,react.cloneElement)(child, { - onExited: onExited.bind(null, child), - in: prevChild.props.in, - exit: getProp(child, 'exit', nextProps), - enter: getProp(child, 'enter', nextProps) - }); - } - }); - return children; -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-transition-group/esm/TransitionGroup.js - - - - - - - - -var values = Object.values || function (obj) { - return Object.keys(obj).map(function (k) { - return obj[k]; - }); -}; -var defaultProps = { - component: 'div', - childFactory: function childFactory(child) { - return child; - } -}; -/** - * The `` component manages a set of transition components - * (`` and ``) in a list. Like with the transition - * components, `` is a state machine for managing the mounting - * and unmounting of components over time. - * - * Consider the example below. As items are removed or added to the TodoList the - * `in` prop is toggled automatically by the ``. - * - * Note that `` does not define any animation behavior! - * Exactly _how_ a list item animates is up to the individual transition - * component. This means you can mix and match animations across different list - * items. - */ - -var TransitionGroup = /*#__PURE__*/function (_React$Component) { - _inheritsLoose(TransitionGroup, _React$Component); - function TransitionGroup(props, context) { - var _this; - _this = _React$Component.call(this, props, context) || this; - var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear - - _this.state = { - contextValue: { - isMounting: true - }, - handleExited: handleExited, - firstRender: true - }; - return _this; - } - var _proto = TransitionGroup.prototype; - _proto.componentDidMount = function componentDidMount() { - this.mounted = true; - this.setState({ - contextValue: { - isMounting: false - } - }); - }; - _proto.componentWillUnmount = function componentWillUnmount() { - this.mounted = false; - }; - TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { - var prevChildMapping = _ref.children, - handleExited = _ref.handleExited, - firstRender = _ref.firstRender; - return { - children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited), - firstRender: false - }; - } // node is `undefined` when user provided `nodeRef` prop - ; - - _proto.handleExited = function handleExited(child, node) { - var currentChildMapping = getChildMapping(this.props.children); - if (child.key in currentChildMapping) return; - if (child.props.onExited) { - child.props.onExited(node); - } - if (this.mounted) { - this.setState(function (state) { - var children = (0,esm_extends/* default */.Z)({}, state.children); - delete children[child.key]; - return { - children: children - }; - }); - } - }; - _proto.render = function render() { - var _this$props = this.props, - Component = _this$props.component, - childFactory = _this$props.childFactory, - props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["component", "childFactory"]); - var contextValue = this.state.contextValue; - var children = values(this.state.children).map(childFactory); - delete props.appear; - delete props.enter; - delete props.exit; - if (Component === null) { - return /*#__PURE__*/react.createElement(TransitionGroupContext.Provider, { - value: contextValue - }, children); - } - return /*#__PURE__*/react.createElement(TransitionGroupContext.Provider, { - value: contextValue - }, /*#__PURE__*/react.createElement(Component, props, children)); - }; - return TransitionGroup; -}(react.Component); -TransitionGroup.propTypes = false ? 0 : {}; -TransitionGroup.defaultProps = defaultProps; -/* harmony default export */ const esm_TransitionGroup = (TransitionGroup); -// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0/node_modules/@emotion/react/dist/emotion-react.browser.esm.js -var emotion_react_browser_esm = __webpack_require__(2150); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/useTimeout/useTimeout.js -var useTimeout = __webpack_require__(5859); -// EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js -var jsx_runtime = __webpack_require__(7394); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/ButtonBase/Ripple.js -'use client'; - - - - - -/** - * @ignore - internal component. - */ - -function Ripple(props) { - const { - className, - classes, - pulsate = false, - rippleX, - rippleY, - rippleSize, - in: inProp, - onExited, - timeout - } = props; - const [leaving, setLeaving] = react.useState(false); - const rippleClassName = (0,clsx/* default */.Z)(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); - const rippleStyles = { - width: rippleSize, - height: rippleSize, - top: -(rippleSize / 2) + rippleY, - left: -(rippleSize / 2) + rippleX - }; - const childClassName = (0,clsx/* default */.Z)(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); - if (!inProp && !leaving) { - setLeaving(true); - } - react.useEffect(() => { - if (!inProp && onExited != null) { - // react-transition-group#onExited - const timeoutId = setTimeout(onExited, timeout); - return () => { - clearTimeout(timeoutId); - }; - } - return undefined; - }, [onExited, inProp, timeout]); - return /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: rippleClassName, - style: rippleStyles, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: childClassName - }) - }); -} - false ? 0 : void 0; -/* harmony default export */ const ButtonBase_Ripple = (Ripple); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js -var generateUtilityClasses = __webpack_require__(3453); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/ButtonBase/touchRippleClasses.js - - -function getTouchRippleUtilityClass(slot) { - return generateUtilityClass('MuiTouchRipple', slot); -} -const touchRippleClasses = (0,generateUtilityClasses/* default */.Z)('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']); -/* harmony default export */ const ButtonBase_touchRippleClasses = (touchRippleClasses); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/ButtonBase/TouchRipple.js -'use client'; - - -var _templateObject, _templateObject2, _templateObject3, _templateObject4; - - -const _excluded = ["center", "classes", "className"]; -let _ = t => t, - _t, - _t2, - _t3, - _t4; - - - - - - - - - - - -const DURATION = 550; -const DELAY_RIPPLE = 80; -const enterKeyframe = (0,emotion_react_browser_esm/* keyframes */.F4)(_t || (_t = _(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"]))))); -const exitKeyframe = (0,emotion_react_browser_esm/* keyframes */.F4)(_t2 || (_t2 = _(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"]))))); -const pulsateKeyframe = (0,emotion_react_browser_esm/* keyframes */.F4)(_t3 || (_t3 = _(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"]))))); -const TouchRippleRoot = (0,styled/* default */.ZP)('span', { - name: 'MuiTouchRipple', - slot: 'Root' -})({ - overflow: 'hidden', - pointerEvents: 'none', - position: 'absolute', - zIndex: 0, - top: 0, - right: 0, - bottom: 0, - left: 0, - borderRadius: 'inherit' -}); - -// This `styled()` function invokes keyframes. `styled-components` only supports keyframes -// in string templates. Do not convert these styles in JS object as it will break. -const TouchRippleRipple = (0,styled/* default */.ZP)(ButtonBase_Ripple, { - name: 'MuiTouchRipple', - slot: 'Ripple' -})(_t4 || (_t4 = _(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n opacity: 0;\n position: absolute;\n\n &.", " {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ", ";\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n }\n\n &.", " {\n animation-duration: ", "ms;\n }\n\n & .", " {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .", " {\n opacity: 0;\n animation-name: ", ";\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n }\n\n & .", " {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ", ";\n animation-duration: 2500ms;\n animation-timing-function: ", ";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"])), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), ButtonBase_touchRippleClasses.rippleVisible, enterKeyframe, DURATION, _ref => { - let { - theme - } = _ref; - return theme.transitions.easing.easeInOut; -}, ButtonBase_touchRippleClasses.ripplePulsate, _ref2 => { - let { - theme - } = _ref2; - return theme.transitions.duration.shorter; -}, ButtonBase_touchRippleClasses.child, ButtonBase_touchRippleClasses.childLeaving, exitKeyframe, DURATION, _ref3 => { - let { - theme - } = _ref3; - return theme.transitions.easing.easeInOut; -}, ButtonBase_touchRippleClasses.childPulsate, pulsateKeyframe, _ref4 => { - let { - theme - } = _ref4; - return theme.transitions.easing.easeInOut; -}); - -/** - * @ignore - internal component. - * - * TODO v5: Make private - */ -const TouchRipple = /*#__PURE__*/react.forwardRef(function TouchRipple(inProps, ref) { - const props = (0,useThemeProps/* default */.Z)({ - props: inProps, - name: 'MuiTouchRipple' - }); - const { - center: centerProp = false, - classes = {}, - className - } = props, - other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); - const [ripples, setRipples] = react.useState([]); - const nextKey = react.useRef(0); - const rippleCallback = react.useRef(null); - react.useEffect(() => { - if (rippleCallback.current) { - rippleCallback.current(); - rippleCallback.current = null; - } - }, [ripples]); - - // Used to filter out mouse emulated events on mobile. - const ignoringMouseDown = react.useRef(false); - // We use a timer in order to only show the ripples for touch "click" like events. - // We don't want to display the ripple for touch scroll events. - const startTimer = (0,useTimeout/* default */.Z)(); - - // This is the hook called once the previous timeout is ready. - const startTimerCommit = react.useRef(null); - const container = react.useRef(null); - const startCommit = react.useCallback(params => { - const { - pulsate, - rippleX, - rippleY, - rippleSize, - cb - } = params; - setRipples(oldRipples => [...oldRipples, /*#__PURE__*/(0,jsx_runtime.jsx)(TouchRippleRipple, { - classes: { - ripple: (0,clsx/* default */.Z)(classes.ripple, ButtonBase_touchRippleClasses.ripple), - rippleVisible: (0,clsx/* default */.Z)(classes.rippleVisible, ButtonBase_touchRippleClasses.rippleVisible), - ripplePulsate: (0,clsx/* default */.Z)(classes.ripplePulsate, ButtonBase_touchRippleClasses.ripplePulsate), - child: (0,clsx/* default */.Z)(classes.child, ButtonBase_touchRippleClasses.child), - childLeaving: (0,clsx/* default */.Z)(classes.childLeaving, ButtonBase_touchRippleClasses.childLeaving), - childPulsate: (0,clsx/* default */.Z)(classes.childPulsate, ButtonBase_touchRippleClasses.childPulsate) - }, - timeout: DURATION, - pulsate: pulsate, - rippleX: rippleX, - rippleY: rippleY, - rippleSize: rippleSize - }, nextKey.current)]); - nextKey.current += 1; - rippleCallback.current = cb; - }, [classes]); - const start = react.useCallback(function () { - let event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - let cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {}; - const { - pulsate = false, - center = centerProp || options.pulsate, - fakeElement = false // For test purposes - } = options; - if ((event == null ? void 0 : event.type) === 'mousedown' && ignoringMouseDown.current) { - ignoringMouseDown.current = false; - return; - } - if ((event == null ? void 0 : event.type) === 'touchstart') { - ignoringMouseDown.current = true; - } - const element = fakeElement ? null : container.current; - const rect = element ? element.getBoundingClientRect() : { - width: 0, - height: 0, - left: 0, - top: 0 - }; - - // Get the size of the ripple - let rippleX; - let rippleY; - let rippleSize; - if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { - rippleX = Math.round(rect.width / 2); - rippleY = Math.round(rect.height / 2); - } else { - const { - clientX, - clientY - } = event.touches && event.touches.length > 0 ? event.touches[0] : event; - rippleX = Math.round(clientX - rect.left); - rippleY = Math.round(clientY - rect.top); - } - if (center) { - rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3); - - // For some reason the animation is broken on Mobile Chrome if the size is even. - if (rippleSize % 2 === 0) { - rippleSize += 1; - } - } else { - const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; - const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; - rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2); - } - - // Touche devices - if (event != null && event.touches) { - // check that this isn't another touchstart due to multitouch - // otherwise we will only clear a single timer when unmounting while two - // are running - if (startTimerCommit.current === null) { - // Prepare the ripple effect. - startTimerCommit.current = () => { - startCommit({ - pulsate, - rippleX, - rippleY, - rippleSize, - cb - }); - }; - // Delay the execution of the ripple effect. - // We have to make a tradeoff with this delay value. - startTimer.start(DELAY_RIPPLE, () => { - if (startTimerCommit.current) { - startTimerCommit.current(); - startTimerCommit.current = null; - } - }); - } - } else { - startCommit({ - pulsate, - rippleX, - rippleY, - rippleSize, - cb - }); - } - }, [centerProp, startCommit, startTimer]); - const pulsate = react.useCallback(() => { - start({}, { - pulsate: true - }); - }, [start]); - const stop = react.useCallback((event, cb) => { - startTimer.clear(); - - // The touch interaction occurs too quickly. - // We still want to show ripple effect. - if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) { - startTimerCommit.current(); - startTimerCommit.current = null; - startTimer.start(0, () => { - stop(event, cb); - }); - return; - } - startTimerCommit.current = null; - setRipples(oldRipples => { - if (oldRipples.length > 0) { - return oldRipples.slice(1); - } - return oldRipples; - }); - rippleCallback.current = cb; - }, [startTimer]); - react.useImperativeHandle(ref, () => ({ - pulsate, - start, - stop - }), [pulsate, start, stop]); - return /*#__PURE__*/(0,jsx_runtime.jsx)(TouchRippleRoot, (0,esm_extends/* default */.Z)({ - className: (0,clsx/* default */.Z)(ButtonBase_touchRippleClasses.root, classes.root, className), - ref: container - }, other, { - children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_TransitionGroup, { - component: null, - exit: true, - children: ripples - }) - })); -}); - false ? 0 : void 0; -/* harmony default export */ const ButtonBase_TouchRipple = (TouchRipple); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js -var generateUtilityClass_generateUtilityClass = __webpack_require__(8092); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/ButtonBase/buttonBaseClasses.js - - -function getButtonBaseUtilityClass(slot) { - return (0,generateUtilityClass_generateUtilityClass/* default */.ZP)('MuiButtonBase', slot); -} -const buttonBaseClasses = (0,generateUtilityClasses/* default */.Z)('MuiButtonBase', ['root', 'disabled', 'focusVisible']); -/* harmony default export */ const ButtonBase_buttonBaseClasses = (buttonBaseClasses); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/ButtonBase/ButtonBase.js -'use client'; - - - -const ButtonBase_excluded = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"]; - - - - - - - - - - - - - - - -const useUtilityClasses = ownerState => { - const { - disabled, - focusVisible, - focusVisibleClassName, - classes - } = ownerState; - const slots = { - root: ['root', disabled && 'disabled', focusVisible && 'focusVisible'] - }; - const composedClasses = (0,composeClasses/* default */.Z)(slots, getButtonBaseUtilityClass, classes); - if (focusVisible && focusVisibleClassName) { - composedClasses.root += " ".concat(focusVisibleClassName); - } - return composedClasses; -}; -const ButtonBaseRoot = (0,styled/* default */.ZP)('button', { - name: 'MuiButtonBase', - slot: 'Root', - overridesResolver: (props, styles) => styles.root -})({ - display: 'inline-flex', - alignItems: 'center', - justifyContent: 'center', - position: 'relative', - boxSizing: 'border-box', - WebkitTapHighlightColor: 'transparent', - backgroundColor: 'transparent', - // Reset default value - // We disable the focus ring for mouse, touch and keyboard users. - outline: 0, - border: 0, - margin: 0, - // Remove the margin in Safari - borderRadius: 0, - padding: 0, - // Remove the padding in Firefox - cursor: 'pointer', - userSelect: 'none', - verticalAlign: 'middle', - MozAppearance: 'none', - // Reset - WebkitAppearance: 'none', - // Reset - textDecoration: 'none', - // So we take precedent over the style of a native element. - color: 'inherit', - '&::-moz-focus-inner': { - borderStyle: 'none' // Remove Firefox dotted outline. - }, - - ["&.".concat(ButtonBase_buttonBaseClasses.disabled)]: { - pointerEvents: 'none', - // Disable link interactions - cursor: 'default' - }, - '@media print': { - colorAdjust: 'exact' - } -}); - -/** - * `ButtonBase` contains as few styles as possible. - * It aims to be a simple building block for creating a button. - * It contains a load of style reset and some focus/ripple logic. - */ -const ButtonBase = /*#__PURE__*/react.forwardRef(function ButtonBase(inProps, ref) { - const props = (0,useThemeProps/* default */.Z)({ - props: inProps, - name: 'MuiButtonBase' - }); - const { - action, - centerRipple = false, - children, - className, - component = 'button', - disabled = false, - disableRipple = false, - disableTouchRipple = false, - focusRipple = false, - LinkComponent = 'a', - onBlur, - onClick, - onContextMenu, - onDragLeave, - onFocus, - onFocusVisible, - onKeyDown, - onKeyUp, - onMouseDown, - onMouseLeave, - onMouseUp, - onTouchEnd, - onTouchMove, - onTouchStart, - tabIndex = 0, - TouchRippleProps, - touchRippleRef, - type - } = props, - other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, ButtonBase_excluded); - const buttonRef = react.useRef(null); - const rippleRef = react.useRef(null); - const handleRippleRef = (0,useForkRef/* default */.Z)(rippleRef, touchRippleRef); - const { - isFocusVisibleRef, - onFocus: handleFocusVisible, - onBlur: handleBlurVisible, - ref: focusVisibleRef - } = (0,useIsFocusVisible/* default */.Z)(); - const [focusVisible, setFocusVisible] = react.useState(false); - if (disabled && focusVisible) { - setFocusVisible(false); - } - react.useImperativeHandle(action, () => ({ - focusVisible: () => { - setFocusVisible(true); - buttonRef.current.focus(); - } - }), []); - const [mountedState, setMountedState] = react.useState(false); - react.useEffect(() => { - setMountedState(true); - }, []); - const enableTouchRipple = mountedState && !disableRipple && !disabled; - react.useEffect(() => { - if (focusVisible && focusRipple && !disableRipple && mountedState) { - rippleRef.current.pulsate(); - } - }, [disableRipple, focusRipple, focusVisible, mountedState]); - function useRippleHandler(rippleAction, eventCallback) { - let skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple; - return (0,useEventCallback/* default */.Z)(event => { - if (eventCallback) { - eventCallback(event); - } - const ignore = skipRippleAction; - if (!ignore && rippleRef.current) { - rippleRef.current[rippleAction](event); - } - return true; - }); - } - const handleMouseDown = useRippleHandler('start', onMouseDown); - const handleContextMenu = useRippleHandler('stop', onContextMenu); - const handleDragLeave = useRippleHandler('stop', onDragLeave); - const handleMouseUp = useRippleHandler('stop', onMouseUp); - const handleMouseLeave = useRippleHandler('stop', event => { - if (focusVisible) { - event.preventDefault(); - } - if (onMouseLeave) { - onMouseLeave(event); - } - }); - const handleTouchStart = useRippleHandler('start', onTouchStart); - const handleTouchEnd = useRippleHandler('stop', onTouchEnd); - const handleTouchMove = useRippleHandler('stop', onTouchMove); - const handleBlur = useRippleHandler('stop', event => { - handleBlurVisible(event); - if (isFocusVisibleRef.current === false) { - setFocusVisible(false); - } - if (onBlur) { - onBlur(event); - } - }, false); - const handleFocus = (0,useEventCallback/* default */.Z)(event => { - // Fix for https://github.com/facebook/react/issues/7769 - if (!buttonRef.current) { - buttonRef.current = event.currentTarget; - } - handleFocusVisible(event); - if (isFocusVisibleRef.current === true) { - setFocusVisible(true); - if (onFocusVisible) { - onFocusVisible(event); - } - } - if (onFocus) { - onFocus(event); - } - }); - const isNonNativeButton = () => { - const button = buttonRef.current; - return component && component !== 'button' && !(button.tagName === 'A' && button.href); - }; - - /** - * IE11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat - */ - const keydownRef = react.useRef(false); - const handleKeyDown = (0,useEventCallback/* default */.Z)(event => { - // Check if key is already down to avoid repeats being counted as multiple activations - if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') { - keydownRef.current = true; - rippleRef.current.stop(event, () => { - rippleRef.current.start(event); - }); - } - if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') { - event.preventDefault(); - } - if (onKeyDown) { - onKeyDown(event); - } - - // Keyboard accessibility for non interactive elements - if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) { - event.preventDefault(); - if (onClick) { - onClick(event); - } - } - }); - const handleKeyUp = (0,useEventCallback/* default */.Z)(event => { - // calling preventDefault in keyUp on a - * - * ); - * } - * ``` - * - * When the button is clicked the component will shift to the `'entering'` state - * and stay there for 500ms (the value of `timeout`) before it finally switches - * to `'entered'`. - * - * When `in` is `false` the same thing happens except the state moves from - * `'exiting'` to `'exited'`. - */ - -var Transition = /*#__PURE__*/function (_React$Component) { - _inheritsLoose(Transition, _React$Component); - function Transition(props, context) { - var _this; - _this = _React$Component.call(this, props, context) || this; - var parentGroup = context; // In the context of a TransitionGroup all enters are really appears - - var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; - var initialStatus; - _this.appearStatus = null; - if (props.in) { - if (appear) { - initialStatus = EXITED; - _this.appearStatus = ENTERING; - } else { - initialStatus = ENTERED; - } - } else { - if (props.unmountOnExit || props.mountOnEnter) { - initialStatus = UNMOUNTED; - } else { - initialStatus = EXITED; - } - } - _this.state = { - status: initialStatus - }; - _this.nextCallback = null; - return _this; - } - Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { - var nextIn = _ref.in; - if (nextIn && prevState.status === UNMOUNTED) { - return { - status: EXITED - }; - } - return null; - } // getSnapshotBeforeUpdate(prevProps) { - // let nextStatus = null - // if (prevProps !== this.props) { - // const { status } = this.state - // if (this.props.in) { - // if (status !== ENTERING && status !== ENTERED) { - // nextStatus = ENTERING - // } - // } else { - // if (status === ENTERING || status === ENTERED) { - // nextStatus = EXITING - // } - // } - // } - // return { nextStatus } - // } - ; - - var _proto = Transition.prototype; - _proto.componentDidMount = function componentDidMount() { - this.updateStatus(true, this.appearStatus); - }; - _proto.componentDidUpdate = function componentDidUpdate(prevProps) { - var nextStatus = null; - if (prevProps !== this.props) { - var status = this.state.status; - if (this.props.in) { - if (status !== ENTERING && status !== ENTERED) { - nextStatus = ENTERING; - } - } else { - if (status === ENTERING || status === ENTERED) { - nextStatus = EXITING; - } - } - } - this.updateStatus(false, nextStatus); - }; - _proto.componentWillUnmount = function componentWillUnmount() { - this.cancelNextCallback(); - }; - _proto.getTimeouts = function getTimeouts() { - var timeout = this.props.timeout; - var exit, enter, appear; - exit = enter = appear = timeout; - if (timeout != null && typeof timeout !== 'number') { - exit = timeout.exit; - enter = timeout.enter; // TODO: remove fallback for next major - - appear = timeout.appear !== undefined ? timeout.appear : enter; - } - return { - exit: exit, - enter: enter, - appear: appear - }; - }; - _proto.updateStatus = function updateStatus(mounting, nextStatus) { - if (mounting === void 0) { - mounting = false; - } - if (nextStatus !== null) { - // nextStatus will always be ENTERING or EXITING. - this.cancelNextCallback(); - if (nextStatus === ENTERING) { - if (this.props.unmountOnExit || this.props.mountOnEnter) { - var node = this.props.nodeRef ? this.props.nodeRef.current : react_dom.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749 - // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`. - // To make the animation happen, we have to separate each rendering and avoid being processed as batched. - - if (node) forceReflow(node); - } - this.performEnter(mounting); - } else { - this.performExit(); - } - } else if (this.props.unmountOnExit && this.state.status === EXITED) { - this.setState({ - status: UNMOUNTED - }); - } - }; - _proto.performEnter = function performEnter(mounting) { - var _this2 = this; - var enter = this.props.enter; - var appearing = this.context ? this.context.isMounting : mounting; - var _ref2 = this.props.nodeRef ? [appearing] : [react_dom.findDOMNode(this), appearing], - maybeNode = _ref2[0], - maybeAppearing = _ref2[1]; - var timeouts = this.getTimeouts(); - var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED - // if we are mounting and running this it means appear _must_ be set - - if (!mounting && !enter || config.disabled) { - this.safeSetState({ - status: ENTERED - }, function () { - _this2.props.onEntered(maybeNode); - }); - return; - } - this.props.onEnter(maybeNode, maybeAppearing); - this.safeSetState({ - status: ENTERING - }, function () { - _this2.props.onEntering(maybeNode, maybeAppearing); - _this2.onTransitionEnd(enterTimeout, function () { - _this2.safeSetState({ - status: ENTERED - }, function () { - _this2.props.onEntered(maybeNode, maybeAppearing); - }); - }); - }); - }; - _proto.performExit = function performExit() { - var _this3 = this; - var exit = this.props.exit; - var timeouts = this.getTimeouts(); - var maybeNode = this.props.nodeRef ? undefined : react_dom.findDOMNode(this); // no exit animation skip right to EXITED - - if (!exit || config.disabled) { - this.safeSetState({ - status: EXITED - }, function () { - _this3.props.onExited(maybeNode); - }); - return; - } - this.props.onExit(maybeNode); - this.safeSetState({ - status: EXITING - }, function () { - _this3.props.onExiting(maybeNode); - _this3.onTransitionEnd(timeouts.exit, function () { - _this3.safeSetState({ - status: EXITED - }, function () { - _this3.props.onExited(maybeNode); - }); - }); - }); - }; - _proto.cancelNextCallback = function cancelNextCallback() { - if (this.nextCallback !== null) { - this.nextCallback.cancel(); - this.nextCallback = null; - } - }; - _proto.safeSetState = function safeSetState(nextState, callback) { - // This shouldn't be necessary, but there are weird race conditions with - // setState callbacks and unmounting in testing, so always make sure that - // we can cancel any pending setState callbacks after we unmount. - callback = this.setNextCallback(callback); - this.setState(nextState, callback); - }; - _proto.setNextCallback = function setNextCallback(callback) { - var _this4 = this; - var active = true; - this.nextCallback = function (event) { - if (active) { - active = false; - _this4.nextCallback = null; - callback(event); - } - }; - this.nextCallback.cancel = function () { - active = false; - }; - return this.nextCallback; - }; - _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) { - this.setNextCallback(handler); - var node = this.props.nodeRef ? this.props.nodeRef.current : react_dom.findDOMNode(this); - var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; - if (!node || doesNotHaveTimeoutOrListener) { - setTimeout(this.nextCallback, 0); - return; - } - if (this.props.addEndListener) { - var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], - maybeNode = _ref3[0], - maybeNextCallback = _ref3[1]; - this.props.addEndListener(maybeNode, maybeNextCallback); - } - if (timeout != null) { - setTimeout(this.nextCallback, timeout); - } - }; - _proto.render = function render() { - var status = this.state.status; - if (status === UNMOUNTED) { - return null; - } - var _this$props = this.props, - children = _this$props.children, - _in = _this$props.in, - _mountOnEnter = _this$props.mountOnEnter, - _unmountOnExit = _this$props.unmountOnExit, - _appear = _this$props.appear, - _enter = _this$props.enter, - _exit = _this$props.exit, - _timeout = _this$props.timeout, - _addEndListener = _this$props.addEndListener, - _onEnter = _this$props.onEnter, - _onEntering = _this$props.onEntering, - _onEntered = _this$props.onEntered, - _onExit = _this$props.onExit, - _onExiting = _this$props.onExiting, - _onExited = _this$props.onExited, - _nodeRef = _this$props.nodeRef, - childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); - return /*#__PURE__*/( - // allows for nested Transitions - react.createElement(TransitionGroupContext.Provider, { - value: null - }, typeof children === 'function' ? children(status, childProps) : react.cloneElement(react.Children.only(children), childProps)) - ); - }; - return Transition; -}(react.Component); -Transition.contextType = TransitionGroupContext; -Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation - -function noop() {} -Transition.defaultProps = { - in: false, - mountOnEnter: false, - unmountOnExit: false, - appear: false, - enter: true, - exit: true, - onEnter: noop, - onEntering: noop, - onEntered: noop, - onExit: noop, - onExiting: noop, - onExited: noop -}; -Transition.UNMOUNTED = UNMOUNTED; -Transition.EXITED = EXITED; -Transition.ENTERING = ENTERING; -Transition.ENTERED = ENTERED; -Transition.EXITING = EXITING; -/* harmony default export */ const esm_Transition = (Transition); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/transitions/utils.js -const reflow = node => node.scrollTop; -function getTransitionProps(props, options) { - var _style$transitionDura, _style$transitionTimi; - const { - timeout, - easing, - style = {} - } = props; - return { - duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0, - easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing, - delay: style.transitionDelay - }; -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/Grow/Grow.js -'use client'; - - - -const Grow_excluded = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]; - - - - - - - - - -function getScale(value) { - return "scale(".concat(value, ", ").concat(value ** 2, ")"); -} -const Grow_styles = { - entering: { - opacity: 1, - transform: getScale(1) - }, - entered: { - opacity: 1, - transform: 'none' - } -}; - -/* - TODO v6: remove - Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers. - */ -const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent); - -/** - * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and - * [Popover](/material-ui/react-popover/) components. - * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. - */ -const Grow = /*#__PURE__*/react.forwardRef(function Grow(props, ref) { - const { - addEndListener, - appear = true, - children, - easing, - in: inProp, - onEnter, - onEntered, - onEntering, - onExit, - onExited, - onExiting, - style, - timeout = 'auto', - // eslint-disable-next-line react/prop-types - TransitionComponent = esm_Transition - } = props, - other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, Grow_excluded); - const timer = (0,useTimeout/* default */.Z)(); - const autoTimeout = react.useRef(); - const theme = useTheme_useTheme(); - const nodeRef = react.useRef(null); - const handleRef = (0,useForkRef/* default */.Z)(nodeRef, children.ref, ref); - const normalizedTransitionCallback = callback => maybeIsAppearing => { - if (callback) { - const node = nodeRef.current; - - // onEnterXxx and onExitXxx callbacks have a different arguments.length value. - if (maybeIsAppearing === undefined) { - callback(node); - } else { - callback(node, maybeIsAppearing); - } - } - }; - const handleEntering = normalizedTransitionCallback(onEntering); - const handleEnter = normalizedTransitionCallback((node, isAppearing) => { - reflow(node); // So the animation always start from the start. - - const { - duration: transitionDuration, - delay, - easing: transitionTimingFunction - } = getTransitionProps({ - style, - timeout, - easing - }, { - mode: 'enter' - }); - let duration; - if (timeout === 'auto') { - duration = theme.transitions.getAutoHeightDuration(node.clientHeight); - autoTimeout.current = duration; - } else { - duration = transitionDuration; - } - node.style.transition = [theme.transitions.create('opacity', { - duration, - delay - }), theme.transitions.create('transform', { - duration: isWebKit154 ? duration : duration * 0.666, - delay, - easing: transitionTimingFunction - })].join(','); - if (onEnter) { - onEnter(node, isAppearing); - } - }); - const handleEntered = normalizedTransitionCallback(onEntered); - const handleExiting = normalizedTransitionCallback(onExiting); - const handleExit = normalizedTransitionCallback(node => { - const { - duration: transitionDuration, - delay, - easing: transitionTimingFunction - } = getTransitionProps({ - style, - timeout, - easing - }, { - mode: 'exit' - }); - let duration; - if (timeout === 'auto') { - duration = theme.transitions.getAutoHeightDuration(node.clientHeight); - autoTimeout.current = duration; - } else { - duration = transitionDuration; - } - node.style.transition = [theme.transitions.create('opacity', { - duration, - delay - }), theme.transitions.create('transform', { - duration: isWebKit154 ? duration : duration * 0.666, - delay: isWebKit154 ? delay : delay || duration * 0.333, - easing: transitionTimingFunction - })].join(','); - node.style.opacity = 0; - node.style.transform = getScale(0.75); - if (onExit) { - onExit(node); - } - }); - const handleExited = normalizedTransitionCallback(onExited); - const handleAddEndListener = next => { - if (timeout === 'auto') { - timer.start(autoTimeout.current || 0, next); - } - if (addEndListener) { - // Old call signature before `react-transition-group` implemented `nodeRef` - addEndListener(nodeRef.current, next); - } - }; - return /*#__PURE__*/(0,jsx_runtime.jsx)(TransitionComponent, (0,esm_extends/* default */.Z)({ - appear: appear, - in: inProp, - nodeRef: nodeRef, - onEnter: handleEnter, - onEntered: handleEntered, - onEntering: handleEntering, - onExit: handleExit, - onExited: handleExited, - onExiting: handleExiting, - addEndListener: handleAddEndListener, - timeout: timeout === 'auto' ? null : timeout - }, other, { - children: (state, childProps) => { - return /*#__PURE__*/react.cloneElement(children, (0,esm_extends/* default */.Z)({ - style: (0,esm_extends/* default */.Z)({ - opacity: 0, - transform: getScale(0.75), - visibility: state === 'exited' && !inProp ? 'hidden' : undefined - }, Grow_styles[state], style, children.props.style), - ref: handleRef - }, childProps)); - } - })); -}); - false ? 0 : void 0; -Grow.muiSupportAuto = true; -/* harmony default export */ const Grow_Grow = (Grow); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/ownerDocument/ownerDocument.js -var ownerDocument_ownerDocument = __webpack_require__(1563); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/useEventCallback/useEventCallback.js -var useEventCallback_useEventCallback = __webpack_require__(9210); -// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/createChainedFunction/createChainedFunction.js -var createChainedFunction = __webpack_require__(3444); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+base@5.0.0-beta.40_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@mui/base/unstable_useModal/ModalManager.js - -// Is a vertical scrollbar displayed? -function isOverflowing(container) { - const doc = (0,ownerDocument_ownerDocument/* default */.Z)(container); - if (doc.body === container) { - return (0,ownerWindow/* default */.Z)(container).innerWidth > doc.documentElement.clientWidth; - } - return container.scrollHeight > container.clientHeight; -} -function ariaHidden(element, show) { - if (show) { - element.setAttribute('aria-hidden', 'true'); - } else { - element.removeAttribute('aria-hidden'); - } -} -function getPaddingRight(element) { - return parseInt((0,ownerWindow/* default */.Z)(element).getComputedStyle(element).paddingRight, 10) || 0; -} -function isAriaHiddenForbiddenOnElement(element) { - // The forbidden HTML tags are the ones from ARIA specification that - // can be children of body and can't have aria-hidden attribute. - // cf. https://www.w3.org/TR/html-aria/#docconformance - const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK']; - const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1; - const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden'; - return isForbiddenTagName || isInputHidden; -} -function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) { - const blacklist = [mountElement, currentElement, ...elementsToExclude]; - [].forEach.call(container.children, element => { - const isNotExcludedElement = blacklist.indexOf(element) === -1; - const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element); - if (isNotExcludedElement && isNotForbiddenElement) { - ariaHidden(element, show); - } - }); -} -function findIndexOf(items, callback) { - let idx = -1; - items.some((item, index) => { - if (callback(item)) { - idx = index; - return true; - } - return false; - }); - return idx; -} -function handleContainer(containerInfo, props) { - const restoreStyle = []; - const container = containerInfo.container; - if (!props.disableScrollLock) { - if (isOverflowing(container)) { - // Compute the size before applying overflow hidden to avoid any scroll jumps. - const scrollbarSize = getScrollbarSize((0,ownerDocument_ownerDocument/* default */.Z)(container)); - restoreStyle.push({ - value: container.style.paddingRight, - property: 'padding-right', - el: container - }); - // Use computed style, here to get the real padding to add our scrollbar width. - container.style.paddingRight = "".concat(getPaddingRight(container) + scrollbarSize, "px"); - - // .mui-fixed is a global helper. - const fixedElements = (0,ownerDocument_ownerDocument/* default */.Z)(container).querySelectorAll('.mui-fixed'); - [].forEach.call(fixedElements, element => { - restoreStyle.push({ - value: element.style.paddingRight, - property: 'padding-right', - el: element - }); - element.style.paddingRight = "".concat(getPaddingRight(element) + scrollbarSize, "px"); - }); - } - let scrollContainer; - if (container.parentNode instanceof DocumentFragment) { - scrollContainer = (0,ownerDocument_ownerDocument/* default */.Z)(container).body; - } else { - // Support html overflow-y: auto for scroll stability between pages - // https://css-tricks.com/snippets/css/force-vertical-scrollbar/ - const parent = container.parentElement; - const containerWindow = (0,ownerWindow/* default */.Z)(container); - scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container; - } - - // Block the scroll even if no scrollbar is visible to account for mobile keyboard - // screensize shrink. - restoreStyle.push({ - value: scrollContainer.style.overflow, - property: 'overflow', - el: scrollContainer - }, { - value: scrollContainer.style.overflowX, - property: 'overflow-x', - el: scrollContainer - }, { - value: scrollContainer.style.overflowY, - property: 'overflow-y', - el: scrollContainer - }); - scrollContainer.style.overflow = 'hidden'; - } - const restore = () => { - restoreStyle.forEach(_ref => { - let { - value, - el, - property - } = _ref; - if (value) { - el.style.setProperty(property, value); - } else { - el.style.removeProperty(property); - } - }); - }; - return restore; -} -function getHiddenSiblings(container) { - const hiddenSiblings = []; - [].forEach.call(container.children, element => { - if (element.getAttribute('aria-hidden') === 'true') { - hiddenSiblings.push(element); - } - }); - return hiddenSiblings; -} -/** - * @ignore - do not document. - * - * Proper state management for containers and the modals in those containers. - * Simplified, but inspired by react-overlay's ModalManager class. - * Used by the Modal to ensure proper styling of containers. - */ -class ModalManager { - constructor() { - this.containers = void 0; - this.modals = void 0; - this.modals = []; - this.containers = []; - } - add(modal, container) { - let modalIndex = this.modals.indexOf(modal); - if (modalIndex !== -1) { - return modalIndex; - } - modalIndex = this.modals.length; - this.modals.push(modal); - - // If the modal we are adding is already in the DOM. - if (modal.modalRef) { - ariaHidden(modal.modalRef, false); - } - const hiddenSiblings = getHiddenSiblings(container); - ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true); - const containerIndex = findIndexOf(this.containers, item => item.container === container); - if (containerIndex !== -1) { - this.containers[containerIndex].modals.push(modal); - return modalIndex; - } - this.containers.push({ - modals: [modal], - container, - restore: null, - hiddenSiblings - }); - return modalIndex; - } - mount(modal, props) { - const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1); - const containerInfo = this.containers[containerIndex]; - if (!containerInfo.restore) { - containerInfo.restore = handleContainer(containerInfo, props); - } - } - remove(modal) { - let ariaHiddenState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - const modalIndex = this.modals.indexOf(modal); - if (modalIndex === -1) { - return modalIndex; - } - const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1); - const containerInfo = this.containers[containerIndex]; - containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1); - this.modals.splice(modalIndex, 1); - - // If that was the last modal in a container, clean up the container. - if (containerInfo.modals.length === 0) { - // The modal might be closed before it had the chance to be mounted in the DOM. - if (containerInfo.restore) { - containerInfo.restore(); - } - if (modal.modalRef) { - // In case the modal wasn't in the DOM yet. - ariaHidden(modal.modalRef, ariaHiddenState); - } - ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false); - this.containers.splice(containerIndex, 1); - } else { - // Otherwise make sure the next top modal is visible to a screen reader. - const nextTop = containerInfo.modals[containerInfo.modals.length - 1]; - // as soon as a modal is adding its modalRef is undefined. it can't set - // aria-hidden because the dom element doesn't exist either - // when modal was unmounted before modalRef gets null - if (nextTop.modalRef) { - ariaHidden(nextTop.modalRef, false); - } - } - return modalIndex; - } - isTopModal(modal) { - return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal; - } -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+base@5.0.0-beta.40_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@mui/base/unstable_useModal/useModal.js -'use client'; - - - - - - -function getContainer(container) { - return typeof container === 'function' ? container() : container; -} -function getHasTransition(children) { - return children ? children.props.hasOwnProperty('in') : false; -} - -// A modal manager used to track and manage the state of open Modals. -// Modals don't open on the server so this won't conflict with concurrent requests. -const defaultManager = new ModalManager(); -/** - * - * Demos: - * - * - [Modal](https://mui.com/base-ui/react-modal/#hook) - * - * API: - * - * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal) - */ -function useModal(parameters) { - const { - container, - disableEscapeKeyDown = false, - disableScrollLock = false, - // @ts-ignore internal logic - Base UI supports the manager as a prop too - manager = defaultManager, - closeAfterTransition = false, - onTransitionEnter, - onTransitionExited, - children, - onClose, - open, - rootRef - } = parameters; - - // @ts-ignore internal logic - const modal = react.useRef({}); - const mountNodeRef = react.useRef(null); - const modalRef = react.useRef(null); - const handleRef = (0,useForkRef_useForkRef/* default */.Z)(modalRef, rootRef); - const [exited, setExited] = react.useState(!open); - const hasTransition = getHasTransition(children); - let ariaHiddenProp = true; - if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) { - ariaHiddenProp = false; - } - const getDoc = () => (0,ownerDocument_ownerDocument/* default */.Z)(mountNodeRef.current); - const getModal = () => { - modal.current.modalRef = modalRef.current; - modal.current.mount = mountNodeRef.current; - return modal.current; - }; - const handleMounted = () => { - manager.mount(getModal(), { - disableScrollLock - }); - - // Fix a bug on Chrome where the scroll isn't initially 0. - if (modalRef.current) { - modalRef.current.scrollTop = 0; - } - }; - const handleOpen = (0,useEventCallback_useEventCallback/* default */.Z)(() => { - const resolvedContainer = getContainer(container) || getDoc().body; - manager.add(getModal(), resolvedContainer); - - // The element was already mounted. - if (modalRef.current) { - handleMounted(); - } - }); - const isTopModal = react.useCallback(() => manager.isTopModal(getModal()), [manager]); - const handlePortalRef = (0,useEventCallback_useEventCallback/* default */.Z)(node => { - mountNodeRef.current = node; - if (!node) { - return; - } - if (open && isTopModal()) { - handleMounted(); - } else if (modalRef.current) { - ariaHidden(modalRef.current, ariaHiddenProp); - } - }); - const handleClose = react.useCallback(() => { - manager.remove(getModal(), ariaHiddenProp); - }, [ariaHiddenProp, manager]); - react.useEffect(() => { - return () => { - handleClose(); - }; - }, [handleClose]); - react.useEffect(() => { - if (open) { - handleOpen(); - } else if (!hasTransition || !closeAfterTransition) { - handleClose(); - } - }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); - const createHandleKeyDown = otherHandlers => event => { - var _otherHandlers$onKeyD; - (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event); - - // The handler doesn't take event.defaultPrevented into account: - // - // event.preventDefault() is meant to stop default behaviors like - // clicking a checkbox to check it, hitting a button to submit a form, - // and hitting left arrow to move the cursor in a text input etc. - // Only special HTML elements have these default behaviors. - if (event.key !== 'Escape' || event.which === 229 || - // Wait until IME is settled. - !isTopModal()) { - return; - } - if (!disableEscapeKeyDown) { - // Swallow the event, in case someone is listening for the escape key on the body. - event.stopPropagation(); - if (onClose) { - onClose(event, 'escapeKeyDown'); - } - } - }; - const createHandleBackdropClick = otherHandlers => event => { - var _otherHandlers$onClic; - (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event); - if (event.target !== event.currentTarget) { - return; - } - if (onClose) { - onClose(event, 'backdropClick'); - } - }; - const getRootProps = function () { - let otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const propsEventHandlers = extractEventHandlers(parameters); - - // The custom event handlers shouldn't be spread on the root element - delete propsEventHandlers.onTransitionEnter; - delete propsEventHandlers.onTransitionExited; - const externalEventHandlers = (0,esm_extends/* default */.Z)({}, propsEventHandlers, otherHandlers); - return (0,esm_extends/* default */.Z)({ - role: 'presentation' - }, externalEventHandlers, { - onKeyDown: createHandleKeyDown(externalEventHandlers), - ref: handleRef - }); - }; - const getBackdropProps = function () { - let otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const externalEventHandlers = otherHandlers; - return (0,esm_extends/* default */.Z)({ - 'aria-hidden': true - }, externalEventHandlers, { - onClick: createHandleBackdropClick(externalEventHandlers), - open - }); - }; - const getTransitionProps = () => { - const handleEnter = () => { - setExited(false); - if (onTransitionEnter) { - onTransitionEnter(); - } - }; - const handleExited = () => { - setExited(true); - if (onTransitionExited) { - onTransitionExited(); - } - if (closeAfterTransition) { - handleClose(); - } - }; - return { - onEnter: (0,createChainedFunction/* default */.Z)(handleEnter, children == null ? void 0 : children.props.onEnter), - onExited: (0,createChainedFunction/* default */.Z)(handleExited, children == null ? void 0 : children.props.onExited) - }; - }; - return { - getRootProps, - getBackdropProps, - getTransitionProps, - rootRef: handleRef, - portalRef: handlePortalRef, - isTopModal, - exited, - hasTransition - }; -} -;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+base@5.0.0-beta.40_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@mui/base/FocusTrap/FocusTrap.js -'use client'; - -/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */ - - - - - -// Inspired by https://github.com/focus-trap/tabbable -const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(','); -function getTabIndex(node) { - const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10); - if (!Number.isNaN(tabindexAttr)) { - return tabindexAttr; - } - - // Browsers do not return `tabIndex` correctly for contentEditable nodes; - // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2 - // so if they don't have a tabindex attribute specifically set, assume it's 0. - // in Chrome,
,