1 line
13 KiB
JSON
1 line
13 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport RcImage from 'rc-image';\nimport { useZIndex } from '../_util/hooks/useZIndex';\nimport { getTransitionName } from '../_util/motion';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport defaultLocale from '../locale/en_US';\nimport PreviewGroup, { icons } from './PreviewGroup';\nimport useStyle from './style';\nconst Image = props => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n preview,\n className,\n rootClassName,\n style\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"preview\", \"className\", \"rootClassName\", \"style\"]);\n const {\n getPrefixCls,\n locale: contextLocale = defaultLocale,\n getPopupContainer: getContextPopupContainer,\n image\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('image', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const imageLocale = contextLocale.Image || defaultLocale.Image;\n // Style\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const mergedRootClassName = classNames(rootClassName, hashId, cssVarCls, rootCls);\n const mergedClassName = classNames(className, hashId, image === null || image === void 0 ? void 0 : image.className);\n const [zIndex] = useZIndex('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);\n const mergedPreview = React.useMemo(() => {\n var _a;\n if (preview === false) {\n return preview;\n }\n const _preview = typeof preview === 'object' ? preview : {};\n const {\n getContainer,\n closeIcon\n } = _preview,\n restPreviewProps = __rest(_preview, [\"getContainer\", \"closeIcon\"]);\n return Object.assign(Object.assign({\n mask: ( /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-mask-info`\n }, /*#__PURE__*/React.createElement(EyeOutlined, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),\n icons\n }, restPreviewProps), {\n getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,\n transitionName: getTransitionName(rootPrefixCls, 'zoom', _preview.transitionName),\n maskTransitionName: getTransitionName(rootPrefixCls, 'fade', _preview.maskTransitionName),\n zIndex,\n closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon\n });\n }, [preview, imageLocale, (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon]);\n const mergedStyle = Object.assign(Object.assign({}, image === null || image === void 0 ? void 0 : image.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcImage, Object.assign({\n prefixCls: prefixCls,\n preview: mergedPreview,\n rootClassName: mergedRootClassName,\n className: mergedClassName,\n style: mergedStyle\n }, otherProps)));\n};\nImage.PreviewGroup = PreviewGroup;\nif (process.env.NODE_ENV !== 'production') {\n Image.displayName = 'Image';\n}\nexport default Image;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","EyeOutlined","classNames","RcImage","useZIndex","getTransitionName","ConfigContext","useCSSVarCls","defaultLocale","PreviewGroup","icons","useStyle","Image","props","_a","prefixCls","customizePrefixCls","preview","className","rootClassName","style","otherProps","getPrefixCls","locale","contextLocale","getPopupContainer","getContextPopupContainer","image","useContext","rootPrefixCls","imageLocale","rootCls","wrapCSSVar","hashId","cssVarCls","mergedRootClassName","mergedClassName","zIndex","undefined","mergedPreview","useMemo","_preview","getContainer","closeIcon","restPreviewProps","assign","mask","createElement","transitionName","maskTransitionName","mergedStyle","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/image/index.js"],"sourcesContent":["\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport RcImage from 'rc-image';\nimport { useZIndex } from '../_util/hooks/useZIndex';\nimport { getTransitionName } from '../_util/motion';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport defaultLocale from '../locale/en_US';\nimport PreviewGroup, { icons } from './PreviewGroup';\nimport useStyle from './style';\nconst Image = props => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n preview,\n className,\n rootClassName,\n style\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"preview\", \"className\", \"rootClassName\", \"style\"]);\n const {\n getPrefixCls,\n locale: contextLocale = defaultLocale,\n getPopupContainer: getContextPopupContainer,\n image\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('image', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const imageLocale = contextLocale.Image || defaultLocale.Image;\n // Style\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const mergedRootClassName = classNames(rootClassName, hashId, cssVarCls, rootCls);\n const mergedClassName = classNames(className, hashId, image === null || image === void 0 ? void 0 : image.className);\n const [zIndex] = useZIndex('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);\n const mergedPreview = React.useMemo(() => {\n var _a;\n if (preview === false) {\n return preview;\n }\n const _preview = typeof preview === 'object' ? preview : {};\n const {\n getContainer,\n closeIcon\n } = _preview,\n restPreviewProps = __rest(_preview, [\"getContainer\", \"closeIcon\"]);\n return Object.assign(Object.assign({\n mask: ( /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-mask-info`\n }, /*#__PURE__*/React.createElement(EyeOutlined, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),\n icons\n }, restPreviewProps), {\n getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,\n transitionName: getTransitionName(rootPrefixCls, 'zoom', _preview.transitionName),\n maskTransitionName: getTransitionName(rootPrefixCls, 'fade', _preview.maskTransitionName),\n zIndex,\n closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon\n });\n }, [preview, imageLocale, (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon]);\n const mergedStyle = Object.assign(Object.assign({}, image === null || image === void 0 ? void 0 : image.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcImage, Object.assign({\n prefixCls: prefixCls,\n preview: mergedPreview,\n rootClassName: mergedRootClassName,\n className: mergedClassName,\n style: mergedStyle\n }, otherProps)));\n};\nImage.PreviewGroup = PreviewGroup;\nif (process.env.NODE_ENV !== 'production') {\n Image.displayName = 'Image';\n}\nexport default Image;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CA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