{"ast":null,"code":"\"use client\";\n\nimport React, { forwardRef } from 'react';\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport IconWrapper from './IconWrapper';\nconst InnerLoadingIcon = /*#__PURE__*/forwardRef((_ref, ref) => {\n  let {\n    prefixCls,\n    className,\n    style,\n    iconClassName\n  } = _ref;\n  const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);\n  return /*#__PURE__*/React.createElement(IconWrapper, {\n    prefixCls: prefixCls,\n    className: mergedIconCls,\n    style: style,\n    ref: ref\n  }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n    className: iconClassName\n  }));\n});\nconst getCollapsedWidth = () => ({\n  width: 0,\n  opacity: 0,\n  transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n  width: node.scrollWidth,\n  opacity: 1,\n  transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n  const {\n    prefixCls,\n    loading,\n    existIcon,\n    className,\n    style\n  } = props;\n  const visible = !!loading;\n  if (existIcon) {\n    return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n      prefixCls: prefixCls,\n      className: className,\n      style: style\n    });\n  }\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    // We do not really use this motionName\n    motionName: `${prefixCls}-loading-icon-motion`,\n    motionLeave: visible,\n    removeOnLeave: true,\n    onAppearStart: getCollapsedWidth,\n    onAppearActive: getRealWidth,\n    onEnterStart: getCollapsedWidth,\n    onEnterActive: getRealWidth,\n    onLeaveStart: getRealWidth,\n    onLeaveActive: getCollapsedWidth\n  }, (_ref2, ref) => {\n    let {\n      className: motionCls,\n      style: motionStyle\n    } = _ref2;\n    return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n      prefixCls: prefixCls,\n      className: className,\n      style: Object.assign(Object.assign({}, style), motionStyle),\n      ref: ref,\n      iconClassName: motionCls\n    });\n  });\n};\nexport default LoadingIcon;","map":{"version":3,"names":["React","forwardRef","LoadingOutlined","classNames","CSSMotion","IconWrapper","InnerLoadingIcon","_ref","ref","prefixCls","className","style","iconClassName","mergedIconCls","createElement","getCollapsedWidth","width","opacity","transform","getRealWidth","node","scrollWidth","LoadingIcon","props","loading","existIcon","visible","motionName","motionLeave","removeOnLeave","onAppearStart","onAppearActive","onEnterStart","onEnterActive","onLeaveStart","onLeaveActive","_ref2","motionCls","motionStyle","Object","assign"],"sources":["/var/www/gavt/node_modules/antd/es/button/LoadingIcon.js"],"sourcesContent":["\"use client\";\n\nimport React, { forwardRef } from 'react';\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport IconWrapper from './IconWrapper';\nconst InnerLoadingIcon = /*#__PURE__*/forwardRef((_ref, ref) => {\n  let {\n    prefixCls,\n    className,\n    style,\n    iconClassName\n  } = _ref;\n  const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);\n  return /*#__PURE__*/React.createElement(IconWrapper, {\n    prefixCls: prefixCls,\n    className: mergedIconCls,\n    style: style,\n    ref: ref\n  }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n    className: iconClassName\n  }));\n});\nconst getCollapsedWidth = () => ({\n  width: 0,\n  opacity: 0,\n  transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n  width: node.scrollWidth,\n  opacity: 1,\n  transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n  const {\n    prefixCls,\n    loading,\n    existIcon,\n    className,\n    style\n  } = props;\n  const visible = !!loading;\n  if (existIcon) {\n    return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n      prefixCls: prefixCls,\n      className: className,\n      style: style\n    });\n  }\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    // We do not really use this motionName\n    motionName: `${prefixCls}-loading-icon-motion`,\n    motionLeave: visible,\n    removeOnLeave: true,\n    onAppearStart: getCollapsedWidth,\n    onAppearActive: getRealWidth,\n    onEnterStart: getCollapsedWidth,\n    onEnterActive: getRealWidth,\n    onLeaveStart: getRealWidth,\n    onLeaveActive: getCollapsedWidth\n  }, (_ref2, ref) => {\n    let {\n      className: motionCls,\n      style: motionStyle\n    } = _ref2;\n    return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n      prefixCls: prefixCls,\n      className: className,\n      style: Object.assign(Object.assign({}, style), motionStyle),\n      ref: ref,\n      iconClassName: motionCls\n    });\n  });\n};\nexport default LoadingIcon;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,eAAe,MAAM,4CAA4C;AACxE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,WAAW;AACjC,OAAOC,WAAW,MAAM,eAAe;AACvC,MAAMC,gBAAgB,GAAG,aAAaL,UAAU,CAAC,CAACM,IAAI,EAAEC,GAAG,KAAK;EAC9D,IAAI;IACFC,SAAS;IACTC,SAAS;IACTC,KAAK;IACLC;EACF,CAAC,GAAGL,IAAI;EACR,MAAMM,aAAa,GAAGV,UAAU,CAAE,GAAEM,SAAU,eAAc,EAAEC,SAAS,CAAC;EACxE,OAAO,aAAaV,KAAK,CAACc,aAAa,CAACT,WAAW,EAAE;IACnDI,SAAS,EAAEA,SAAS;IACpBC,SAAS,EAAEG,aAAa;IACxBF,KAAK,EAAEA,KAAK;IACZH,GAAG,EAAEA;EACP,CAAC,EAAE,aAAaR,KAAK,CAACc,aAAa,CAACZ,eAAe,EAAE;IACnDQ,SAAS,EAAEE;EACb,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AACF,MAAMG,iBAAiB,GAAGA,CAAA,MAAO;EAC/BC,KAAK,EAAE,CAAC;EACRC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE;AACb,CAAC,CAAC;AACF,MAAMC,YAAY,GAAGC,IAAI,KAAK;EAC5BJ,KAAK,EAAEI,IAAI,CAACC,WAAW;EACvBJ,OAAO,EAAE,CA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