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,CAAA,CAAA,EAAA,EAAK,WAAW,CAAA,CAAE,CAAI,GAAA,KAAA;AAAA,SAC3B,MAAA;AACL,UAAA,SAAA,CAAU,CAAK,EAAA,EAAA,WAAW,CAAE,CAAA,CAAA,GAAI,GAAG,KAAK,CAAA,EAAA,CAAA;AAAA;AAC1C,OACD,CAAA;AAAA;AAGH,IAAM,MAAA,MAAA,GAAS,kCACV,KACA,CAAA,EAAA,SAAA,CAAA;AAIL,IAAA,2BAAQ,SAAU,EAAA,cAAA,CAAA,EAAA,GAAA,EAAU,WAAW,OAAS,EAAA,KAAA,EAAO,UAAY,KAAO,CAAA,CAAA;AAAA;AAE9E,CAAA;AAEA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YACpB,GAAA,GAAA,CAAI,SAAmC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUtC,IAAI,SAAU,CAAA,WAAA;AAAA;AAAA;AAAA;AAAA,EAId,UAAU,SAAU,CAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpB,WAAW,SAAU,CAAA,WAAA;AAAA;AAAA;AAAA;AAAA,EAIrB,EAAA,EAAI,UAAU,SAAU,CAAA,CAAC,UAAU,IAAM,EAAA,SAAA,CAAU,MAAM,CAAC;AAC5D,CACA,GAAA,KAAA,CAAA;AAEJ,IAAO,WAAQ,GAAA","file":"Box.mjs","sourcesContent":["/* eslint-disable react/prop-types */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Box = React.forwardRef(\n  (\n    {\n      as = 'div',\n      // Added to support compatibility with @mui/system\n      component,\n      /**\n       * The type of the transformed sx prop is either a\n       * \"string\" if the css passed was fully static or an\n       * object with the following shape:\n       * {\n       *  className: string,\n       *  vars: Record<string, [string | number, boolean]>\n       * }\n       */\n      sx,\n      className,\n      style,\n      ...other\n    },\n    ref,\n  ) => {\n    const Component = component ?? as;\n    // eslint-disable-next-line react/prop-types\n    const sxClass = typeof sx === 'string' ? sx : sx?.className;\n    const classes = [className, sxClass].filter(Boolean).join(' ');\n    // eslint-disable-next-line react/prop-types\n    const sxVars = sx && typeof sx !== 'string' ? sx?.vars : {};\n    const varStyles = {};\n\n    if (sxVars) {\n      Object.entries(sxVars).forEach(([cssVariable, [value, isUnitLess]]) => {\n        if (typeof value === 'string' || isUnitLess) {\n          varStyles[`--${cssVariable}`] = value;\n        } else {\n          varStyles[`--${cssVariable}`] = `${value}px`;\n        }\n      });\n    }\n\n    const styles = {\n      ...style,\n      ...varStyles,\n    };\n\n    // eslint-disable-next-line react/jsx-filename-extension\n    return <Component ref={ref} className={classes} style={styles} {...other} />;\n  },\n);\n\nprocess.env.NODE_ENV !== 'production'\n  ? (Box.propTypes /* remove-proptypes */ = {\n      // ┌────────────────────────────── Warning ──────────────────────────────┐\n      // │ These PropTypes are generated from the TypeScript type definitions. │\n      // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │\n      // └─────────────────────────────────────────────────────────────────────┘\n      /**\n       * The component used for the root node.\n       * Either a string to use a HTML element or a component.\n       * Replacement for the emotion's `as` prop.\n       */\n      as: PropTypes.elementType,\n      /**\n       * The content of the component.\n       */\n      children: PropTypes.node,\n      /**\n       * The component used for the root node.\n       * Either a string to use a HTML element or a component.\n       */\n      component: PropTypes.elementType,\n      /**\n       * The style extension prop that allows defining system overrides as well as additional CSS styles.\n       */\n      sx: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n    })\n  : void 0;\n\nexport default Box;\n"]}