{"version":3,"file":"no-ssr.cjs","sources":["../../node_modules/@mui/base/NoSsr/NoSsr.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n *\n * *   Escape hatch for broken dependencies not supporting SSR.\n * *   Improve the time-to-first paint on the client by only rendering above the fold.\n * *   Reduce the rendering time on the server.\n * *   Under too heavy server load, you can turn on service degradation.\n *\n * Demos:\n *\n * - [No SSR](https://mui.com/base-ui/react-no-ssr/)\n *\n * API:\n *\n * - [NoSsr API](https://mui.com/base-ui/react-no-ssr/components-api/#no-ssr)\n */\nfunction NoSsr(props) {\n  const {\n    children,\n    defer = false,\n    fallback = null\n  } = props;\n  const [mountedState, setMountedState] = React.useState(false);\n  useEnhancedEffect(() => {\n    if (!defer) {\n      setMountedState(true);\n    }\n  }, [defer]);\n  React.useEffect(() => {\n    if (defer) {\n      setMountedState(true);\n    }\n  }, [defer]);\n\n  // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n  return /*#__PURE__*/_jsx(React.Fragment, {\n    children: mountedState ? children : fallback\n  });\n}\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.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   * You can wrap a node.\n   */\n  children: PropTypes.node,\n  /**\n   * If `true`, the component will not only prevent server-side rendering.\n   * It will also defer the rendering of the children into a different screen frame.\n   * @default false\n   */\n  defer: PropTypes.bool,\n  /**\n   * The fallback content to display.\n   * @default null\n   */\n  fallback: PropTypes.node\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n  // eslint-disable-next-line\n  NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\nexport { NoSsr };"],"names":["NoSsr","props","children","defer","fallback","mountedState","setMountedState","React","useEnhancedEffect","_jsx","PropTypes","exactProp"],"mappings":"mkBAwBA,SAASA,EAAMC,EAAO,CACpB,KAAM,CACJ,SAAAC,EACA,MAAAC,EAAQ,GACR,SAAAC,EAAW,IACZ,EAAGH,EACE,CAACI,EAAcC,CAAe,EAAIC,EAAM,SAAS,EAAK,EAC5DC,OAAAA,EAAAA,kBAAkB,IAAM,CACjBL,GACHG,EAAgB,EAAI,CAE1B,EAAK,CAACH,CAAK,CAAC,EACVI,EAAM,UAAU,IAAM,CAChBJ,GACFG,EAAgB,EAAI,CAE1B,EAAK,CAACH,CAAK,CAAC,EAGUM,EAAI,kBAAA,IAACF,EAAM,SAAU,CACvC,SAAUF,EAAeH,EAAWE,CACxC,CAAG,CACH,CACA,QAAQ,IAAI,WAAa,eAAeJ,EAAM,UAAmC,CAQ/E,SAAUU,EAAS,UAAC,KAMpB,MAAOA,EAAS,UAAC,KAKjB,SAAUA,EAAS,UAAC,IACtB,GACI,QAAQ,IAAI,WAAa,eAE3BV,EAAM,WAAgB,EAAIW,EAAAA,UAAUX,EAAM,SAAS","x_google_ignoreList":[0]}