{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\"; // @inheritedComponent IconButton\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);","map":{"version":3,"sources":["/app/node_modules/@material-ui/core/esm/Switch/Switch.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","refType","withStyles","alpha","capitalize","SwitchBase","styles","theme","root","display","width","height","overflow","padding","boxSizing","position","flexShrink","zIndex","verticalAlign","colorAdjust","edgeStart","marginLeft","edgeEnd","marginRight","switchBase","top","left","color","palette","type","grey","transition","transitions","create","duration","shortest","transform","opacity","colorPrimary","primary","main","backgroundColor","action","hoverOpacity","common","black","white","colorSecondary","secondary","sizeSmall","checked","disabled","input","thumb","boxShadow","shadows","borderRadius","track","Switch","forwardRef","props","ref","classes","className","_props$color","_props$edge","edge","_props$size","size","other","icon","createElement","concat","checkedIcon","process","env","NODE_ENV","propTypes","bool","node","object","string","oneOf","defaultChecked","disableRipple","id","inputProps","inputRef","onChange","func","required","value","any","name"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC,C,CACA;;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,OAAOC,UAAP,MAAuB,sBAAvB;AACA,SAASC,KAAT,QAAsB,4BAAtB;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAO,IAAIC,MAAM,GAAG,SAASA,MAAT,CAAgBC,KAAhB,EAAuB;AACzC,SAAO;AACL;AACAC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,aADL;AAEJC,MAAAA,KAAK,EAAE,KAAK,KAAK,CAFb;AAGJC,MAAAA,MAAM,EAAE,KAAK,KAAK,CAHd;AAIJC,MAAAA,QAAQ,EAAE,QAJN;AAKJC,MAAAA,OAAO,EAAE,EALL;AAMJC,MAAAA,SAAS,EAAE,YANP;AAOJC,MAAAA,QAAQ,EAAE,UAPN;AAQJC,MAAAA,UAAU,EAAE,CARR;AASJC,MAAAA,MAAM,EAAE,CATJ;AAUJ;AACAC,MAAAA,aAAa,EAAE,QAXX;AAYJ;AACA,sBAAgB;AACdC,QAAAA,WAAW,EAAE;AADC;AAbZ,KAFD;;AAoBL;AACAC,IAAAA,SAAS,EAAE;AACTC,MAAAA,UAAU,EAAE,CAAC;AADJ,KArBN;;AAyBL;AACAC,IAAAA,OAAO,EAAE;AACPC,MAAAA,WAAW,EAAE,CAAC;AADP,KA1BJ;;AA8BL;AACAC,IAAAA,UAAU,EAAE;AACVT,MAAAA,QAAQ,EAAE,UADA;AAEVU,MAAAA,GAAG,EAAE,CAFK;AAGVC,MAAAA,IAAI,EAAE,CAHI;AAIVT,MAAAA,MA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,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,CAAhB,CA7FmD;;AA+FzD;AACF;AACA;AACA;AACES,EAAAA,KAAK,EAAE5F,SAAS,CAAC6F;AAnGwC,CAA3D,GAoGI,KAAK,CApGT;AAqGA,eAAe1F,UAAU,CAACI,MAAD,EAAS;AAChCuF,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZnC,MAFY,CAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);"]},"metadata":{},"sourceType":"module"}