mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
|
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested'; // To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n var mergedTheme = localTheme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['Material-UI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n var children = props.children,\n localTheme = props.theme;\n var outerTheme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['Material-UI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n var theme = React.useMemo(function () {\n var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\n\nexport default ThemeProvider;","map":{"version":3,"sources":["/app/node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js"],"names":["_extends","React","PropTypes","exactProp","ThemeContext","useTheme","nested","mergeOuterLocalTheme","outerTheme","localTheme","mergedTheme","process","env","NODE_ENV","console","error","join","ThemeProvider","props","children","theme","useMemo","output","createElement","Provider","value","propTypes","node","isRequired","oneOfType","object","func"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,MAAP,MAAmB,UAAnB,C,CAA+B;;AAE/B,SAASC,oBAAT,CAA8BC,UAA9B,EAA0CC,UAA1C,EAAsD;AACpD,MAAI,OAAOA,UAAP,KAAsB,UAA1B,EAAsC;AACpC,QAAIC,WAAW,GAAGD,UAAU,CAACD,UAAD,CAA5B;;AAEA,QAAIG,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC,UAAI,CAACH,WAAL,EAAkB;AAChBI,QAAAA,OAAO,CAACC,KAAR,CAAc,CAAC,yEAAD,EAA4E,sCAA5E,EAAoHC,IAApH,CAAyH,IAAzH,CAAd;AACD;AACF;;AAED,WAAON,WAAP;AACD;;AAED,SAAOV,QAAQ,CAAC,EAAD,EAAKQ,UAAL,EAAiBC,UAAjB,CAAf;AACD;AACD;AACA;AACA;AACA;AACA;;;AAGA,SAASQ,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,MAAIC,QAAQ,GAAGD,KAAK,CAACC,QAArB;AAAA,MACIV,UAAU,GAAGS,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