{"ast":null,"code":"\"use client\";\n\nimport React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport useMessage from '../message/useMessage';\nimport useModal from '../modal/useModal';\nimport useNotification from '../notification/useNotification';\nimport AppContext, { AppConfigContext } from './context';\nimport useStyle from './style';\nconst useApp = () => React.useContext(AppContext);\nconst App = props => {\n const {\n prefixCls: customizePrefixCls,\n children,\n className,\n rootClassName,\n message,\n notification,\n style,\n component = 'div'\n } = props;\n const {\n getPrefixCls\n } = useContext(ConfigContext);\n const prefixCls = getPrefixCls('app', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const customClassName = classNames(hashId, prefixCls, className, rootClassName, cssVarCls);\n const appConfig = useContext(AppConfigContext);\n const mergedAppConfig = React.useMemo(() => ({\n message: Object.assign(Object.assign({}, appConfig.message), message),\n notification: Object.assign(Object.assign({}, appConfig.notification), notification)\n }), [message, notification, appConfig.message, appConfig.notification]);\n const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);\n const [notificationApi, notificationContextHolder] = useNotification(mergedAppConfig.notification);\n const [ModalApi, ModalContextHolder] = useModal();\n const memoizedContextValue = React.useMemo(() => ({\n message: messageApi,\n notification: notificationApi,\n modal: ModalApi\n }), [messageApi, notificationApi, ModalApi]);\n // https://github.com/ant-design/ant-design/issues/48802#issuecomment-2097813526\n devUseWarning('App')(!(cssVarCls && component === false), 'usage', 'When using cssVar, ensure `component` is assigned a valid React component string.');\n // ============================ Render ============================\n const Component = component === false ? React.Fragment : component;\n const rootProps = {\n className: customClassName,\n style\n };\n return wrapCSSVar( /*#__PURE__*/React.createElement(AppContext.Provider, {\n value: memoizedContextValue\n }, /*#__PURE__*/React.createElement(AppConfigContext.Provider, {\n value: mergedAppConfig\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, component === false ? undefined : rootProps), ModalContextHolder, messageContextHolder, notificationContextHolder, children))));\n};\nif (process.env.NODE_ENV !== 'production') {\n App.displayName = 'App';\n}\nApp.useApp = useApp;\nexport default App;","map":{"version":3,"names":["React","useContext","classNames","devUseWarning","ConfigContext","useMessage","useModal","useNotification","AppContext","AppConfigContext","useStyle","useApp","App","props","prefixCls","customizePrefixCls","children","className","rootClassName","message","notification","style","component","getPrefixCls","wrapCSSVar","hashId","cssVarCls","customClassName","appConfig","mergedAppConfig","useMemo","Object","assign","messageApi","messageContextHolder","notificationApi","notificationContextHolder","ModalApi","ModalContextHolder","memoizedContextValue","modal","Component","Fragment","rootProps","createElement","Provider","value","undefined","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/app/index.js"],"sourcesContent":["\"use client\";\n\nimport React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport useMessage from '../message/useMessage';\nimport useModal from '../modal/useModal';\nimport useNotification from '../notification/useNotification';\nimport AppContext, { AppConfigContext } from './context';\nimport useStyle from './style';\nconst useApp = () => React.useContext(AppContext);\nconst App = props => {\n const {\n prefixCls: customizePrefixCls,\n children,\n className,\n rootClassName,\n message,\n notification,\n style,\n component = 'div'\n } = props;\n const {\n getPrefixCls\n } = useContext(ConfigContext);\n const prefixCls = getPrefixCls('app', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const customClassName = classNames(hashId, prefixCls, className, rootClassName, cssVarCls);\n const appConfig = useContext(AppConfigContext);\n const mergedAppConfig = React.useMemo(() => ({\n message: Object.assign(Object.assign({}, appConfig.message), message),\n notification: Object.assign(Object.assign({}, appConfig.notification), notification)\n }), [message, notification, appConfig.message, appConfig.notification]);\n const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);\n const [notificationApi, notificationContextHolder] = useNotification(mergedAppConfig.notification);\n const [ModalApi, ModalContextHolder] = useModal();\n const memoizedContextValue = React.useMemo(() => ({\n message: messageApi,\n notification: notificationApi,\n modal: ModalApi\n }), [messageApi, notificationApi, ModalApi]);\n // https://github.com/ant-design/ant-design/issues/48802#issuecomment-2097813526\n devUseWarning('App')(!(cssVarCls && component === false), 'usage', 'When using cssVar, ensure `component` is assigned a valid React component string.');\n // ============================ Render ============================\n const Component = component === false ? React.Fragment : component;\n const rootProps = {\n className: customClassName,\n style\n };\n return wrapCSSVar( /*#__PURE__*/React.createElement(AppContext.Provider, {\n value: memoizedContextValue\n }, /*#__PURE__*/React.createElement(AppConfigContext.Provider, {\n value: mergedAppConfig\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, component === false ? undefined : rootProps), ModalContextHolder, messageContextHolder, notificationContextHolder, children))));\n};\nif (process.env.NODE_ENV !== 'production') {\n App.displayName = 'App';\n}\nApp.useApp = useApp;\nexport default App;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,eAAe,MAAM,iCAAiC;AAC7D,OAAOC,UAAU,IAAIC,gBAAgB,QAAQ,WAAW;AACxD,OAAOC,QAAQ,MAAM,SAAS;AAC9B,MAAMC,MAAM,GAAGA,CAAA,KAAMX,KAAK,CAACC,UAAU,CAACO,UAAU,CAAC;AACjD,MAAMI,GAAG,GAAGC,KAAK,IAAI;EACnB,MAAM;IACJC,SAAS,EAAEC,kBAAkB;IAC7BC,QAAQ;IACRC,SAAS;IACTC,aAAa;IACbC,OAAO;IACPC,YAAY;IACZC,KAAK;IACLC,SAAS,GAAG;EACd,CAAC,GAAGT,KAAK;EACT,MAAM;IACJU;EACF,CAAC,GAAGtB,UAAU,CAACG,aAAa,CAAC;EAC7B,MAAMU,SAAS,GAAGS,YAAY,CAAC,KAAK,E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