{"version":3,"file":"Portal-01d3062b.cjs","sources":["../../node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType.js","../../node_modules/@mui/base/Portal/Portal.js"],"sourcesContent":["export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n  if (process.env.NODE_ENV === 'production') {\n    return null;\n  }\n  const propValue = props[propName];\n  const safePropName = propFullName || propName;\n  if (propValue == null) {\n    return null;\n  }\n  if (propValue && propValue.nodeType !== 1) {\n    return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n  }\n  return null;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n  return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/base-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/base-ui/react-portal/components-api/#portal)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n  const {\n    children,\n    container,\n    disablePortal = false\n  } = props;\n  const [mountNode, setMountNode] = React.useState(null);\n  // @ts-expect-error TODO upstream fix\n  const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);\n  useEnhancedEffect(() => {\n    if (!disablePortal) {\n      setMountNode(getContainer(container) || document.body);\n    }\n  }, [container, disablePortal]);\n  useEnhancedEffect(() => {\n    if (mountNode && !disablePortal) {\n      setRef(forwardedRef, mountNode);\n      return () => {\n        setRef(forwardedRef, null);\n      };\n    }\n    return undefined;\n  }, [forwardedRef, mountNode, disablePortal]);\n  if (disablePortal) {\n    if ( /*#__PURE__*/React.isValidElement(children)) {\n      const newProps = {\n        ref: handleRef\n      };\n      return /*#__PURE__*/React.cloneElement(children, newProps);\n    }\n    return /*#__PURE__*/_jsx(React.Fragment, {\n      children: children\n    });\n  }\n  return /*#__PURE__*/_jsx(React.Fragment, {\n    children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n  // ┌────────────────────────────── Warning ──────────────────────────────┐\n  // │ These PropTypes are generated from the TypeScript type definitions. │\n  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n  // └─────────────────────────────────────────────────────────────────────┘\n  /**\n   * The children to render into the `container`.\n   */\n  children: PropTypes.node,\n  /**\n   * An HTML element or function that returns one.\n   * The `container` will have the portal children appended to it.\n   *\n   * You can also provide a callback, which is called in a React layout effect.\n   * This lets you set the container from a ref, and also makes server-side rendering possible.\n   *\n   * By default, it uses the body of the top-level document object,\n   * so it's simply `document.body` most of the time.\n   */\n  container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n  /**\n   * The `children` will be under the DOM hierarchy of the parent component.\n   * @default false\n   */\n  disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n  // eslint-disable-next-line\n  Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport { Portal };"],"names":["HTMLElementType","props","propName","componentName","location","propFullName","propValue","safePropName","getContainer","container","Portal","React","forwardedRef","children","disablePortal","mountNode","setMountNode","handleRef","useForkRef","useEnhancedEffect","setRef","newProps","_jsx","ReactDOM","PropTypes","exactProp"],"mappings":"wkBAAe,SAASA,EAAgBC,EAAOC,EAAUC,EAAeC,EAAUC,EAAc,CAC9F,GAAI,QAAQ,IAAI,WAAa,aAC3B,OAAO,KAET,MAAMC,EAAYL,EAAMC,CAAQ,EAC1BK,EAAeF,GAAgBH,EACrC,OAAII,GAAa,KACR,KAELA,G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