PromoCursed/node_modules/.cache/babel-loader/0fd2faf96e23cc8dec2a342184cc4a52274abc9f90c8a8127160fc0192adb8b3.json
2024-08-20 23:25:37 +04:00

1 line
14 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"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 QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport Col from '../grid/col';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nfunction toTooltipProps(tooltip) {\n if (!tooltip) {\n return null;\n }\n if (typeof tooltip === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {\n return tooltip;\n }\n return {\n title: tooltip\n };\n}\nconst FormItemLabel = _ref => {\n let {\n prefixCls,\n label,\n htmlFor,\n labelCol,\n labelAlign,\n colon,\n required,\n requiredMark,\n tooltip,\n vertical\n } = _ref;\n var _a;\n const [formLocale] = useLocale('Form');\n const {\n labelAlign: contextLabelAlign,\n labelCol: contextLabelCol,\n labelWrap,\n colon: contextColon\n } = React.useContext(FormContext);\n if (!label) {\n return null;\n }\n const mergedLabelCol = labelCol || contextLabelCol || {};\n const mergedLabelAlign = labelAlign || contextLabelAlign;\n const labelClsBasic = `${prefixCls}-item-label`;\n const labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {\n [`${labelClsBasic}-wrap`]: !!labelWrap\n });\n let labelChildren = label;\n // Keep label is original where there should have no colon\n const computedColon = colon === true || contextColon !== false && colon !== false;\n const haveColon = computedColon && !vertical;\n // Remove duplicated user input colon\n if (haveColon && typeof label === 'string' && label.trim()) {\n labelChildren = label.replace(/[:|]\\s*$/, '');\n }\n // Tooltip\n const tooltipProps = toTooltipProps(tooltip);\n if (tooltipProps) {\n const {\n icon = /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)\n } = tooltipProps,\n restTooltipProps = __rest(tooltipProps, [\"icon\"]);\n const tooltipNode = /*#__PURE__*/React.createElement(Tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/React.cloneElement(icon, {\n className: `${prefixCls}-item-tooltip`,\n title: '',\n onClick: e => {\n // Prevent label behavior in tooltip icon\n // https://github.com/ant-design/ant-design/issues/46154\n e.preventDefault();\n },\n tabIndex: null\n }));\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);\n }\n // Required Mark\n const isOptionalMark = requiredMark === 'optional';\n const isRenderMark = typeof requiredMark === 'function';\n if (isRenderMark) {\n labelChildren = requiredMark(labelChildren, {\n required: !!required\n });\n } else if (isOptionalMark && !required) {\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-optional`,\n title: \"\"\n }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.optional)));\n }\n const labelClassName = classNames({\n [`${prefixCls}-item-required`]: required,\n [`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,\n [`${prefixCls}-item-no-colon`]: !computedColon\n });\n return /*#__PURE__*/React.createElement(Col, Object.assign({}, mergedLabelCol, {\n className: labelColClassName\n }), /*#__PURE__*/React.createElement(\"label\", {\n htmlFor: htmlFor,\n className: labelClassName,\n title: typeof label === 'string' ? label : ''\n }, labelChildren));\n};\nexport default FormItemLabel;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","QuestionCircleOutlined","classNames","Col","useLocale","defaultLocale","Tooltip","FormContext","toTooltipProps","tooltip","isValidElement","title","FormItemLabel","_ref","prefixCls","label","htmlFor","labelCol","labelAlign","colon","required","requiredMark","vertical","_a","formLocale","contextLabelAlign","contextLabelCol","labelWrap","contextColon","useContext","mergedLabelCol","mergedLabelAlign","labelClsBasic","labelColClassName","className","labelChildren","computedColon","haveColon","trim","replace","tooltipProps","icon","createElement","restTooltipProps","tooltipNode","assign","cloneElement","onClick","preventDefault","tabIndex","Fragment","isOptionalMark","isRenderMark","optional","Form","labelClassName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/form/FormItemLabel.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 QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport Col from '../grid/col';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nfunction toTooltipProps(tooltip) {\n if (!tooltip) {\n return null;\n }\n if (typeof tooltip === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {\n return tooltip;\n }\n return {\n title: tooltip\n };\n}\nconst FormItemLabel = _ref => {\n let {\n prefixCls,\n label,\n htmlFor,\n labelCol,\n labelAlign,\n colon,\n required,\n requiredMark,\n tooltip,\n vertical\n } = _ref;\n var _a;\n const [formLocale] = useLocale('Form');\n const {\n labelAlign: contextLabelAlign,\n labelCol: contextLabelCol,\n labelWrap,\n colon: contextColon\n } = React.useContext(FormContext);\n if (!label) {\n return null;\n }\n const mergedLabelCol = labelCol || contextLabelCol || {};\n const mergedLabelAlign = labelAlign || contextLabelAlign;\n const labelClsBasic = `${prefixCls}-item-label`;\n const labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {\n [`${labelClsBasic}-wrap`]: !!labelWrap\n });\n let labelChildren = label;\n // Keep label is original where there should have no colon\n const computedColon = colon === true || contextColon !== false && colon !== false;\n const haveColon = computedColon && !vertical;\n // Remove duplicated user input colon\n if (haveColon && typeof label === 'string' && label.trim()) {\n labelChildren = label.replace(/[:|]\\s*$/, '');\n }\n // Tooltip\n const tooltipProps = toTooltipProps(tooltip);\n if (tooltipProps) {\n const {\n icon = /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)\n } = tooltipProps,\n restTooltipProps = __rest(tooltipProps, [\"icon\"]);\n const tooltipNode = /*#__PURE__*/React.createElement(Tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/React.cloneElement(icon, {\n className: `${prefixCls}-item-tooltip`,\n title: '',\n onClick: e => {\n // Prevent label behavior in tooltip icon\n // https://github.com/ant-design/ant-design/issues/46154\n e.preventDefault();\n },\n tabIndex: null\n }));\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);\n }\n // Required Mark\n const isOptionalMark = requiredMark === 'optional';\n const isRenderMark = typeof requiredMark === 'function';\n if (isRenderMark) {\n labelChildren = requiredMark(labelChildren, {\n required: !!required\n });\n } else if (isOptionalMark && !required) {\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-optional`,\n title: \"\"\n }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.optional)));\n }\n const labelClassName = classNames({\n [`${prefixCls}-item-required`]: required,\n [`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,\n [`${prefixCls}-item-no-colon`]: !computedColon\n });\n return /*#__PURE__*/React.createElement(Col, Object.assign({}, mergedLabelCol, {\n className: labelColClassName\n }), /*#__PURE__*/React.createElement(\"label\", {\n htmlFor: htmlFor,\n className: labelClassName,\n title: typeof label === 'string' ? label : ''\n }, labelChildren));\n};\nexport default FormItemLabel;"],"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,GAA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