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 classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport RowContext from './RowContext';\nimport { useColStyle } from './style';\nfunction parseFlex(flex) {\n if (typeof flex === 'number') {\n return `${flex} ${flex} auto`;\n }\n if (/^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(flex)) {\n return `0 0 ${flex}`;\n }\n return flex;\n}\nconst sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\nconst Col = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(ConfigContext);\n const {\n gutter,\n wrap\n } = React.useContext(RowContext);\n const {\n prefixCls: customizePrefixCls,\n span,\n order,\n offset,\n push,\n pull,\n className,\n children,\n flex,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"span\", \"order\", \"offset\", \"push\", \"pull\", \"className\", \"children\", \"flex\", \"style\"]);\n const prefixCls = getPrefixCls('col', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useColStyle(prefixCls);\n // ===================== Size ======================\n const sizeStyle = {};\n let sizeClassObj = {};\n sizes.forEach(size => {\n let sizeProps = {};\n const propSize = props[size];\n if (typeof propSize === 'number') {\n sizeProps.span = propSize;\n } else if (typeof propSize === 'object') {\n sizeProps = propSize || {};\n }\n delete others[size];\n sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {\n [`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,\n [`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,\n [`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,\n [`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,\n [`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n // Responsive flex layout\n if (sizeProps.flex) {\n sizeClassObj[`${prefixCls}-${size}-flex`] = true;\n sizeStyle[`--${prefixCls}-${size}-flex`] = parseFlex(sizeProps.flex);\n }\n });\n // ==================== Normal =====================\n const classes = classNames(prefixCls, {\n [`${prefixCls}-${span}`]: span !== undefined,\n [`${prefixCls}-order-${order}`]: order,\n [`${prefixCls}-offset-${offset}`]: offset,\n [`${prefixCls}-push-${push}`]: push,\n [`${prefixCls}-pull-${pull}`]: pull\n }, className, sizeClassObj, hashId, cssVarCls);\n const mergedStyle = {};\n // Horizontal gutter use padding\n if (gutter && gutter[0] > 0) {\n const horizontalGutter = gutter[0] / 2;\n mergedStyle.paddingLeft = horizontalGutter;\n mergedStyle.paddingRight = horizontalGutter;\n }\n if (flex) {\n mergedStyle.flex = parseFlex(flex);\n // Hack for Firefox to avoid size issue\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n if (wrap === false && !mergedStyle.minWidth) {\n mergedStyle.minWidth = 0;\n }\n }\n // ==================== Render =====================\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n style: Object.assign(Object.assign(Object.assign({}, mergedStyle), style), sizeStyle),\n className: classes,\n ref: ref\n }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Col.displayName = 'Col';\n}\nexport default Col;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigContext","RowContext","useColStyle","parseFlex","flex","test","sizes","Col","forwardRef","props","ref","getPrefixCls","direction","useContext","gutter","wrap","prefixCls","customizePrefixCls","span","order","offset","push","pull","className","children","style","others","wrapCSSVar","hashId","cssVarCls","sizeStyle","sizeClassObj","forEach","size","sizeProps","propSize","assign","undefined","classes","mergedStyle","horizontalGutter","paddingLeft","paddingRight","minWidth","createElement","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/grid/col.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 classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport RowContext from './RowContext';\nimport { useColStyle } from './style';\nfunction parseFlex(flex) {\n if (typeof flex === 'number') {\n return `${flex} ${flex} auto`;\n }\n if (/^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(flex)) {\n return `0 0 ${flex}`;\n }\n return flex;\n}\nconst sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\nconst Col = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(ConfigContext);\n const {\n gutter,\n wrap\n } = React.useContext(RowContext);\n const {\n prefixCls: customizePrefixCls,\n span,\n order,\n offset,\n push,\n pull,\n className,\n children,\n flex,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"span\", \"order\", \"offset\", \"push\", \"pull\", \"className\", \"children\", \"flex\", \"style\"]);\n const prefixCls = getPrefixCls('col', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useColStyle(prefixCls);\n // ===================== Size ======================\n const sizeStyle = {};\n let sizeClassObj = {};\n sizes.forEach(size => {\n let sizeProps = {};\n const propSize = props[size];\n if (typeof propSize === 'number') {\n sizeProps.span = propSize;\n } else if (typeof propSize === 'object') {\n sizeProps = propSize || {};\n }\n delete others[size];\n sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {\n [`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,\n [`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,\n [`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,\n [`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,\n [`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n // Responsive flex layout\n if (sizeProps.flex) {\n sizeClassObj[`${prefixCls}-${size}-flex`] = true;\n sizeStyle[`--${prefixCls}-${size}-flex`] = parseFlex(sizeProps.flex);\n }\n });\n // ==================== Normal =====================\n const classes = classNames(prefixCls, {\n [`${prefixCls}-${span}`]: span !== undefined,\n [`${prefixCls}-order-${order}`]: order,\n [`${prefixCls}-offset-${offset}`]: offset,\n [`${prefixCls}-push-${push}`]: push,\n [`${prefixCls}-pull-${pull}`]: pull\n }, className, sizeClassObj, hashId, cssVarCls);\n const mergedStyle = {};\n // Horizontal gutter use padding\n if (gutter && gutter[0] > 0) {\n const horizontalGutter = gutter[0] / 2;\n mergedStyle.paddingLeft = horizontalGutter;\n mergedStyle.paddingRight = horizontalGutter;\n }\n if (flex) {\n mergedStyle.flex = parseFlex(flex);\n // Hack for Firefox to avoid size issue\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n if (wrap === false && !mergedStyle.minWidth) {\n mergedStyle.minWidth = 0;\n }\n }\n // ==================== Render =====================\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n style: Object.assign(Object.assign(Object.assign({}, mergedStyle), style), sizeStyle),\n className: classes,\n ref: ref\n }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Col.displayName = 'Col';\n}\nexport default Col;"],"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,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,CAAC,CAAC;EACnG;EACA,OAAOR,CAAC;AACV,CAAC;AACD,OAAO,KAAKW,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,cAAc;AACrC,SAASC,WAAW,QA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