{"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 { cloneElement } from '../_util/reactNode';\nimport { ConfigContext } from '../config-provider';\nimport SingleNumber from './SingleNumber';\nconst ScrollNumber = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n      prefixCls: customizePrefixCls,\n      count,\n      className,\n      motionClassName,\n      style,\n      title,\n      show,\n      component: Component = 'sup',\n      children\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n  // ============================ Render ============================\n  const newProps = Object.assign(Object.assign({}, restProps), {\n    'data-show': show,\n    style,\n    className: classNames(prefixCls, className, motionClassName),\n    title: title\n  });\n  // Only integer need motion\n  let numberNodes = count;\n  if (count && Number(count) % 1 === 0) {\n    const numberList = String(count).split('');\n    numberNodes = /*#__PURE__*/React.createElement(\"bdi\", null, numberList.map((num, i) => ( /*#__PURE__*/React.createElement(SingleNumber, {\n      prefixCls: prefixCls,\n      count: Number(count),\n      value: num,\n      // eslint-disable-next-line react/no-array-index-key\n      key: numberList.length - i\n    }))));\n  }\n  // allow specify the border\n  // mock border-color by box-shadow for compatible with old usage:\n  // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />\n  if (style && style.borderColor) {\n    newProps.style = Object.assign(Object.assign({}, style), {\n      boxShadow: `0 0 0 1px ${style.borderColor} inset`\n    });\n  }\n  if (children) {\n    return cloneElement(children, oriProps => ({\n      className: classNames(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n    }));\n  }\n  return /*#__PURE__*/React.createElement(Component, Object.assign({}, newProps, {\n    ref: ref\n  }), numberNodes);\n});\nexport default ScrollNumber;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","cloneElement","ConfigContext","SingleNumber","ScrollNumber","forwardRef","props","ref","prefixCls","customizePrefixCls","count","className","motionClassName","style","title","show","component","Component","children","restProps","getPrefixCls","useContext","newProps","assign","numberNodes","Number","numberList","String","split","createElement","map","num","value","key","borderColor","boxShadow","oriProps"],"sources":["D:/Project/UC_Trains_Voice/react-demo/node_modules/antd/es/badge/ScrollNumber.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 { cloneElement } from '../_util/reactNode';\nimport { ConfigContext } from '../config-provider';\nimport SingleNumber from './SingleNumber';\nconst ScrollNumber = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n      prefixCls: customizePrefixCls,\n      count,\n      className,\n      motionClassName,\n      style,\n      title,\n      show,\n      component: Component = 'sup',\n      children\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n  // ============================ Render ============================\n  const newProps = Object.assign(Object.assign({}, restProps), {\n    'data-show': show,\n    style,\n    className: classNames(prefixCls, className, motionClassName),\n    title: title\n  });\n  // Only integer need motion\n  let numberNodes = count;\n  if (count && Number(count) % 1 === 0) {\n    const numberList = String(count).split('');\n    numberNodes = /*#__PURE__*/React.createElement(\"bdi\", null, numberList.map((num, i) => ( /*#__PURE__*/React.createElement(SingleNumber, {\n      prefixCls: prefixCls,\n      count: Number(count),\n      value: num,\n      // eslint-disable-next-line react/no-array-index-key\n      key: numberList.length - i\n    }))));\n  }\n  // allow specify the border\n  // mock border-color by box-shadow for compatible with old usage:\n  // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />\n  if (style && style.borderColor) {\n    newProps.style = Object.assign(Object.assign({}, style), {\n      boxShadow: `0 0 0 1px ${style.borderColor} inset`\n    });\n  }\n  if (children) {\n    return cloneElement(children, oriProps => ({\n      className: classNames(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n    }));\n  }\n  return /*#__PURE__*/React.createElement(Component, Object.assign({}, newProps, {\n    ref: ref\n  }), numberNodes);\n});\nexport default ScrollNumber;"],"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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