{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n  var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  if (inclusive) {\n    return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n  }\n\n  return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n  var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  if (inclusive) {\n    return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n  }\n\n  return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return function (Component) {\n    var _options$withTheme = options.withTheme,\n        withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n        _options$noSSR = options.noSSR,\n        noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n        initialWidthOption = options.initialWidth;\n\n    function WithWidth(props) {\n      var contextTheme = useTheme();\n      var theme = props.theme || contextTheme;\n\n      var _getThemeProps = getThemeProps({\n        theme: theme,\n        name: 'MuiWithWidth',\n        props: _extends({}, props)\n      }),\n          initialWidth = _getThemeProps.initialWidth,\n          width = _getThemeProps.width,\n          other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n      var _React$useState = React.useState(false),\n          mountedState = _React$useState[0],\n          setMountedState = _React$useState[1];\n\n      useEnhancedEffect(function () {\n        setMountedState(true);\n      }, []);\n      /**\n       * innerWidth |xs      sm      md      lg      xl\n       *            |-------|-------|-------|-------|------>\n       * width      |  xs   |  sm   |  md   |  lg   |  xl\n       */\n\n      var keys = theme.breakpoints.keys.slice().reverse();\n      var widthComputed = keys.reduce(function (output, key) {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        var matches = useMediaQuery(theme.breakpoints.up(key));\n        return !output && matches ? key : output;\n      }, null);\n\n      var more = _extends({\n        width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n      }, withThemeOption ? {\n        theme: theme\n      } : {}, other); // When rendering the component on the server,\n      // we have no idea about the client browser screen width.\n      // In order to prevent blinks and help the reconciliation of the React tree\n      // we are not rendering the child component.\n      //\n      // An alternative is to use the `initialWidth` property.\n\n\n      if (more.width === undefined) {\n        return null;\n      }\n\n      return /*#__PURE__*/React.createElement(Component, more);\n    }\n\n    process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n      /**\n       * As `window.innerWidth` is unavailable on the server,\n       * we default to rendering an empty component during the first mount.\n       * You might want to use an heuristic to approximate\n       * the screen width of the client browser screen width.\n       *\n       * For instance, you could be using the user-agent or the client-hints.\n       * https://caniuse.com/#search=client%20hint\n       */\n      initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n      /**\n       * @ignore\n       */\n      theme: PropTypes.object,\n\n      /**\n       * Bypass the width calculation logic.\n       */\n      width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n    } : void 0;\n\n    if (process.env.NODE_ENV !== 'production') {\n      WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n    }\n\n    hoistNonReactStatics(WithWidth, Component);\n    return WithWidth;\n  };\n};\n\nexport default withWidth;","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/@material-ui/core/esm/withWidth/withWidth.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","getDisplayName","getThemeProps","hoistNonReactStatics","useTheme","keys","breakpointKeys","useMediaQuery","isWidthUp","breakpoint","width","inclusive","arguments","length","undefined","indexOf","isWidthDown","useEnhancedEffect","window","useEffect","useLayoutEffect","withWidth","options","Component","_options$withTheme","withTheme","withThemeOption","_options$noSSR","noSSR","initialWidthOption","initialWidth","WithWidth","props","contextTheme","theme","_getThemeProps","name","other","_React$useState","useState","mountedState","setMountedState","breakpoints","slice","reverse","widthComputed","reduce","output","key","matches","up","more","createElement","process","env","NODE_ENV","propTypes","oneOf","object","displayName","concat"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,aAAT,QAA8B,qBAA9B;AACA,OAAOC,oBAAP,MAAiC,yBAAjC;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,SAASC,IAAI,IAAIC,cAAjB,QAAuC,6BAAvC;AACA,OAAOC,aAAP,MAA0B,kBAA1B,C,CAA8C;;AAE9C,OAAO,IAAIC,SAAS,GAAG,SAASA,SAAT,CAAmBC,UAAnB,EAA+BC,KAA/B,EAAsC;AAC3D,MAAIC,SAAS,GAAGC,SAAS,CAACC,MAAV,GAAmB,CAAnB,IAAwBD,SAAS,CAAC,CAAD,CAAT,KAAiBE,SAAzC,GAAqDF,SAAS,CAAC,CAAD,CAA9D,GAAoE,IAApF;;AAEA,MAAID,SAAJ,EAAe;AACb,WAAOL,cAAc,CAACS,OAAf,CAAuBN,UAAvB,KAAsCH,cAAc,CAACS,OAAf,CAAuBL,KAAvB,CAA7C;AACD;;A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B,CAAC4B,SAAD,EAAYR,SAAZ,CAApB;AACA,WAAOQ,SAAP;AACD,GAxFD;AAyFD,CA3FD;;AA6FA,eAAeV,SAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n  var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  if (inclusive) {\n    return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n  }\n\n  return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n  var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  if (inclusive) {\n    return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n  }\n\n  return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return function (Component) {\n    var _options$withTheme = options.withTheme,\n        withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n        _options$noSSR = options.noSSR,\n        noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n        initialWidthOption = options.initialWidth;\n\n    function WithWidth(props) {\n      var contextTheme = useTheme();\n      var theme = props.theme || contextTheme;\n\n      var _getThemeProps = getThemeProps({\n        theme: theme,\n        name: 'MuiWithWidth',\n        props: _extends({}, props)\n      }),\n          initialWidth = _getThemeProps.initialWidth,\n          width = _getThemeProps.width,\n          other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n      var _React$useState = React.useState(false),\n          mountedState = _React$useState[0],\n          setMountedState = _React$useState[1];\n\n      useEnhancedEffect(function () {\n        setMountedState(true);\n      }, []);\n      /**\n       * innerWidth |xs      sm      md      lg      xl\n       *            |-------|-------|-------|-------|------>\n       * width      |  xs   |  sm   |  md   |  lg   |  xl\n       */\n\n      var keys = theme.breakpoints.keys.slice().reverse();\n      var widthComputed = keys.reduce(function (output, key) {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        var matches = useMediaQuery(theme.breakpoints.up(key));\n        return !output && matches ? key : output;\n      }, null);\n\n      var more = _extends({\n        width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n      }, withThemeOption ? {\n        theme: theme\n      } : {}, other); // When rendering the component on the server,\n      // we have no idea about the client browser screen width.\n      // In order to prevent blinks and help the reconciliation of the React tree\n      // we are not rendering the child component.\n      //\n      // An alternative is to use the `initialWidth` property.\n\n\n      if (more.width === undefined) {\n        return null;\n      }\n\n      return /*#__PURE__*/React.createElement(Component, more);\n    }\n\n    process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n      /**\n       * As `window.innerWidth` is unavailable on the server,\n       * we default to rendering an empty component during the first mount.\n       * You might want to use an heuristic to approximate\n       * the screen width of the client browser screen width.\n       *\n       * For instance, you could be using the user-agent or the client-hints.\n       * https://caniuse.com/#search=client%20hint\n       */\n      initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n      /**\n       * @ignore\n       */\n      theme: PropTypes.object,\n\n      /**\n       * Bypass the width calculation logic.\n       */\n      width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n    } : void 0;\n\n    if (process.env.NODE_ENV !== 'production') {\n      WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n    }\n\n    hoistNonReactStatics(WithWidth, Component);\n    return WithWidth;\n  };\n};\n\nexport default withWidth;"]},"metadata":{},"sourceType":"module"}