diff --git a/asset-manifest.json b/asset-manifest.json
index f1887dec7c..fdccba1356 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.4bf8d5a2.css",
- "main.js": "/static/js/main.a81b3d32.js",
+ "main.js": "/static/js/main.8a4f19ab.js",
"static/css/9200.14abaeb3.chunk.css": "/static/css/9200.14abaeb3.chunk.css",
"static/js/9200.0a1f7353.chunk.js": "/static/js/9200.0a1f7353.chunk.js",
"static/css/6730.296853db.chunk.css": "/static/css/6730.296853db.chunk.css",
@@ -181,7 +181,7 @@
"static/js/9188.b7ce0cf2.chunk.js": "/static/js/9188.b7ce0cf2.chunk.js",
"static/js/4036.412a4652.chunk.js": "/static/js/4036.412a4652.chunk.js",
"static/js/2679.0780e749.chunk.js": "/static/js/2679.0780e749.chunk.js",
- "static/js/5146.8f167194.chunk.js": "/static/js/5146.8f167194.chunk.js",
+ "static/js/5146.9b213573.chunk.js": "/static/js/5146.9b213573.chunk.js",
"static/js/8915.82c6b45a.chunk.js": "/static/js/8915.82c6b45a.chunk.js",
"static/js/4781.4def496c.chunk.js": "/static/js/4781.4def496c.chunk.js",
"static/js/1971.d746cb8b.chunk.js": "/static/js/1971.d746cb8b.chunk.js",
@@ -226,7 +226,7 @@
"static/js/5183.ac2ca737.js": "/static/js/5183.ac2ca737.js",
"index.html": "/index.html",
"main.4bf8d5a2.css.map": "/static/css/main.4bf8d5a2.css.map",
- "main.a81b3d32.js.map": "/static/js/main.a81b3d32.js.map",
+ "main.8a4f19ab.js.map": "/static/js/main.8a4f19ab.js.map",
"9200.14abaeb3.chunk.css.map": "/static/css/9200.14abaeb3.chunk.css.map",
"9200.0a1f7353.chunk.js.map": "/static/js/9200.0a1f7353.chunk.js.map",
"6730.296853db.chunk.css.map": "/static/css/6730.296853db.chunk.css.map",
@@ -406,7 +406,7 @@
"9188.b7ce0cf2.chunk.js.map": "/static/js/9188.b7ce0cf2.chunk.js.map",
"4036.412a4652.chunk.js.map": "/static/js/4036.412a4652.chunk.js.map",
"2679.0780e749.chunk.js.map": "/static/js/2679.0780e749.chunk.js.map",
- "5146.8f167194.chunk.js.map": "/static/js/5146.8f167194.chunk.js.map",
+ "5146.9b213573.chunk.js.map": "/static/js/5146.9b213573.chunk.js.map",
"8915.82c6b45a.chunk.js.map": "/static/js/8915.82c6b45a.chunk.js.map",
"4781.4def496c.chunk.js.map": "/static/js/4781.4def496c.chunk.js.map",
"1971.d746cb8b.chunk.js.map": "/static/js/1971.d746cb8b.chunk.js.map",
@@ -454,6 +454,6 @@
"static/js/vendors-react.a09f50fb.js",
"static/js/5183.ac2ca737.js",
"static/css/main.4bf8d5a2.css",
- "static/js/main.a81b3d32.js"
+ "static/js/main.8a4f19ab.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 0d8bf0712b..8ce42cb6d9 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
uiw react, A high quality UI Toolkit, A Component Library for React 16+.
\ No newline at end of file
+uiw react, A high quality UI Toolkit, A Component Library for React 16+.
\ No newline at end of file
diff --git a/static/js/5146.8f167194.chunk.js b/static/js/5146.8f167194.chunk.js
deleted file mode 100644
index bdf69096d0..0000000000
--- a/static/js/5146.8f167194.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5146],{5146:function(n,e,t){t.r(e),e.default='Input \u8f93\u5165\u6846\n===\n\n[![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-input/file/README.md)\n[![NPM Downloads](https://img.shields.io/npm/dm/@uiw/react-input.svg?style=flat)](https://www.npmjs.com/package/@uiw/react-input)\n[![npm version](https://img.shields.io/npm/v/@uiw/react-input.svg?label=@uiw/react-input)](https://npmjs.com/@uiw/react-input)\n\n\u901a\u8fc7\u9f20\u6807\u6216\u952e\u76d8\u8f93\u5165\u5185\u5bb9\uff0c\u662f\u6700\u57fa\u7840\u7684\u8868\u5355\u57df\u7684\u5305\u88c5\u3002\n\n```jsx\nimport { Input } from \'uiw\';\n// or\nimport Input from \'@uiw/react-input\';\n```\n\n### \u57fa\u7840\u7528\u6cd5\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input } from \'uiw\';\n\nconst Demo = () => (\n \n \n
\n);\nReactDOM.render( , _mount_);\n```\n\n### \u6570\u5b57\u8f93\u5165\u6846\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { InputNumber } from \'uiw\';\n\nconst Demo = () => (\n \n \n
\n);\nReactDOM.render( , _mount_);\n```\n\n### Form \u4e2d\u4f7f\u7528 Input\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Form, Input, Row, Col, Button, Notify } from \'uiw\';\n\nconst Demo = () => (\n \n);\n\nReactDOM.render( , _mount_);\n```\n\n### \u63d2\u5165\u56fe\u6807\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col } from \'uiw\';\n\nconst stylItem = { margin: 20 };\nconst Demo = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u540e\u9762\u63d2\u5165\u5185\u5bb9\n\n\u5411\u540e\u9762\u63d2\u5165 [`Button`](#/components/button) \u6216\u8005 [`Tag`](#/components/tag)\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Button, Tag } from \'uiw\';\n\nconst Demo = () => (\n \n \n \n }\n />\n \n \n }\n />\n \n \n \u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u8f93\u5165\u6846\u5c3a\u5bf8\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Tag, Button } from \'uiw\';\n\nconst Demo = () => (\n \n \n \n }\n />\n \n \n }\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n }\n />\n \n \n \u4e38}\n />\n \n \n }\n />\n \n
\n \n \n \u6309\u94ae}\n />\n \n \n \u641c\u7d22}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n \u4eae\u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n \n \n \n \n \n \n \u6309\u94ae}\n />\n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u5bc6\u7801\u8f93\u5165\u6846\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Button } from \'uiw\';\n\nclass Demo extends React.Component {\n constructor() {\n super();\n this.state = {\n btnIcon: \'lock\',\n }\n }\n onClick() {\n this.setState({\n btnIcon: this.state.btnIcon === \'lock\' ? \'unlock\' : \'lock\',\n })\n }\n render() {\n return (\n \n \n {\n if (instance) {\n console.log(\'instance:\', instance);\n }\n }}\n preIcon="like-o"\n type={this.state.btnIcon === \'lock\' ? \'password\' : \'text\'}\n placeholder="\u8bf7\u8f93\u5165\u5bc6\u7801"\n addonAfter={ }\n />\n \n
\n )\n }\n}\nReactDOM.render( , _mount_);\n```\n\n### \u8f93\u5165\u6846\u88ab\u7981\u7528\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Icon, Input, Row, Col} from \'uiw\';\n\nconst stylItem = { margin: 20 };\nconst Demo = () => (\n <>\n \n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n
\n >\n);\nReactDOM.render( , _mount_);\n```\n\n## Input\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c |\n|--------- |-------- |--------- |-------- |\n| value | \u7ed1\u5b9a\u503c | String | - |\n| disabled | \u7981\u7528\u8f93\u5165\u6846 | Boolean | `false` |\n| preIcon | \u8f93\u5165\u6846`\u524d`\u9762\u653e\u7f6e\u56fe\u6807 | String/ReactNode | - |\n| addonAfter | \t\u5e26\u6807\u7b7e\u7684 input\uff0c\u8bbe\u7f6e\u540e\u7f6e\u6807\u7b7e | String/ReactNode | - |\n| size | \u6307\u5b9a\u8f93\u5165\u6846\u7684\u5c3a\u5bf8\uff0c\u9664\u4e86\u9ed8\u8ba4\u7684\u5927\u5c0f\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86 `large`\u3001`small` \u548c `default` \u4e09\u79cd\u5c3a\u5bf8\u3002 | String | - |\n\n## InputNumber\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u7248\u672c |\n|--------- |-------- |--------- |-------- |-------- |\n| min | \u6700\u5c0f\u503c | Number | - | v4.18.2 |\n| max | \u6700\u5927\u503c | Number | - | v4.18.2 |\n'}}]);
-//# sourceMappingURL=5146.8f167194.chunk.js.map
\ No newline at end of file
diff --git a/static/js/5146.8f167194.chunk.js.map b/static/js/5146.8f167194.chunk.js.map
deleted file mode 100644
index 5dfb0d02ff..0000000000
--- a/static/js/5146.8f167194.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/5146.8f167194.chunk.js","mappings":"+GAAA","sources":["../../packages/react-input/README.md"],"sourcesContent":["export default \"Input 输入框\\n===\\n\\n[![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-input/file/README.md)\\n[![NPM Downloads](https://img.shields.io/npm/dm/@uiw/react-input.svg?style=flat)](https://www.npmjs.com/package/@uiw/react-input)\\n[![npm version](https://img.shields.io/npm/v/@uiw/react-input.svg?label=@uiw/react-input)](https://npmjs.com/@uiw/react-input)\\n\\n通过鼠标或键盘输入内容,是最基础的表单域的包装。\\n\\n```jsx\\nimport { Input } from 'uiw';\\n// or\\nimport Input from '@uiw/react-input';\\n```\\n\\n### 基础用法\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n
\\n);\\nReactDOM.render( , _mount_);\\n```\\n\\n### 数字输入框\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { InputNumber } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n
\\n);\\nReactDOM.render( , _mount_);\\n```\\n\\n### Form 中使用 Input\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Form, Input, Row, Col, Button, Notify } from 'uiw';\\n\\nconst Demo = () => (\\n \\n);\\n\\nReactDOM.render( , _mount_);\\n```\\n\\n### 插入图标\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col } from 'uiw';\\n\\nconst stylItem = { margin: 20 };\\nconst Demo = () => (\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 后面插入内容\\n\\n向后面插入 [`Button`](#/components/button) 或者 [`Tag`](#/components/tag)\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Button, Tag } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n \\n }\\n />\\n \\n \\n }\\n />\\n \\n \\n 按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 输入框尺寸\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Tag, Button } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n \\n }\\n />\\n \\n \\n }\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n }\\n />\\n \\n \\n 丸}\\n />\\n \\n \\n }\\n />\\n \\n
\\n \\n \\n 按钮}\\n />\\n \\n \\n 搜索}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n 亮按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n 按钮}\\n />\\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 密码输入框\\n\\n\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Button } from 'uiw';\\n\\nclass Demo extends React.Component {\\n constructor() {\\n super();\\n this.state = {\\n btnIcon: 'lock',\\n }\\n }\\n onClick() {\\n this.setState({\\n btnIcon: this.state.btnIcon === 'lock' ? 'unlock' : 'lock',\\n })\\n }\\n render() {\\n return (\\n \\n \\n {\\n if (instance) {\\n console.log('instance:', instance);\\n }\\n }}\\n preIcon=\\\"like-o\\\"\\n type={this.state.btnIcon === 'lock' ? 'password' : 'text'}\\n placeholder=\\\"请输入密码\\\"\\n addonAfter={ }\\n />\\n \\n
\\n )\\n }\\n}\\nReactDOM.render( , _mount_);\\n```\\n\\n### 输入框被禁用\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Icon, Input, Row, Col} from 'uiw';\\n\\nconst stylItem = { margin: 20 };\\nconst Demo = () => (\\n <>\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n }\\n />\\n \\n \\n \\n \\n
\\n >\\n);\\nReactDOM.render( , _mount_);\\n```\\n\\n## Input\\n\\n| 参数 | 说明 | 类型 | 默认值 |\\n|--------- |-------- |--------- |-------- |\\n| value | 绑定值 | String | - |\\n| disabled | 禁用输入框 | Boolean | `false` |\\n| preIcon | 输入框`前`面放置图标 | String/ReactNode | - |\\n| addonAfter | \\t带标签的 input,设置后置标签 | String/ReactNode | - |\\n| size | 指定输入框的尺寸,除了默认的大小外,还提供了 `large`、`small` 和 `default` 三种尺寸。 | String | - |\\n\\n## InputNumber\\n\\n| 参数 | 说明 | 类型 | 默认值 | 版本 |\\n|--------- |-------- |--------- |-------- |-------- |\\n| min | 最小值 | Number | - | v4.18.2 |\\n| max | 最大值 | Number | - | v4.18.2 |\\n\";"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/static/js/5146.9b213573.chunk.js b/static/js/5146.9b213573.chunk.js
new file mode 100644
index 0000000000..2cf03f6575
--- /dev/null
+++ b/static/js/5146.9b213573.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5146],{5146:function(n,e,t){t.r(e),e.default='Input \u8f93\u5165\u6846\n===\n\n[![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-input/file/README.md)\n[![NPM Downloads](https://img.shields.io/npm/dm/@uiw/react-input.svg?style=flat)](https://www.npmjs.com/package/@uiw/react-input)\n[![npm version](https://img.shields.io/npm/v/@uiw/react-input.svg?label=@uiw/react-input)](https://npmjs.com/@uiw/react-input)\n\n\u901a\u8fc7\u9f20\u6807\u6216\u952e\u76d8\u8f93\u5165\u5185\u5bb9\uff0c\u662f\u6700\u57fa\u7840\u7684\u8868\u5355\u57df\u7684\u5305\u88c5\u3002\n\n```jsx\nimport { Input } from \'uiw\';\n// or\nimport Input from \'@uiw/react-input\';\n```\n\n### \u57fa\u7840\u7528\u6cd5\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input } from \'uiw\';\n\nconst Demo = () => (\n \n \n
\n);\nReactDOM.render( , _mount_);\n```\n\n### \u6570\u5b57\u8f93\u5165\u6846\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { InputNumber } from \'uiw\';\n\nconst Demo = () => {\n\n return(\n \n \n \n \n \n \u9650\u5236\u5927\u5c0f\n \n \n \n \u8d85\u51fa\u9650\u754c\u8b66\u544a\n \n \n \n \u8bbe\u7f6e\u6b65\u6da8\u503c\n \n \n \n
\n
\n )\n};\nReactDOM.render( , _mount_);\n```\n\n### Form \u4e2d\u4f7f\u7528 Input\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Form, Input, Row, Col, Button, Notify } from \'uiw\';\n\nconst Demo = () => (\n \n);\n\nReactDOM.render( , _mount_);\n```\n\n### \u63d2\u5165\u56fe\u6807\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col } from \'uiw\';\n\nconst stylItem = { margin: 20 };\nconst Demo = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u540e\u9762\u63d2\u5165\u5185\u5bb9\n\n\u5411\u540e\u9762\u63d2\u5165 [`Button`](#/components/button) \u6216\u8005 [`Tag`](#/components/tag)\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Button, Tag } from \'uiw\';\n\nconst Demo = () => (\n \n \n \n }\n />\n \n \n }\n />\n \n \n \u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u8f93\u5165\u6846\u5c3a\u5bf8\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Tag, Button } from \'uiw\';\n\nconst Demo = () => (\n \n \n \n }\n />\n \n \n }\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n }\n />\n \n \n \u4e38}\n />\n \n \n }\n />\n \n
\n \n \n \u6309\u94ae}\n />\n \n \n \u641c\u7d22}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n \u4eae\u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n \n \u6309\u94ae}\n />\n \n
\n \n \n \n \n \n \n \n \n \u6309\u94ae}\n />\n \n
\n
\n)\nReactDOM.render( , _mount_);\n```\n\n### \u5bc6\u7801\u8f93\u5165\u6846\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Input, Row, Col, Button } from \'uiw\';\n\nclass Demo extends React.Component {\n constructor() {\n super();\n this.state = {\n btnIcon: \'lock\',\n }\n }\n onClick() {\n this.setState({\n btnIcon: this.state.btnIcon === \'lock\' ? \'unlock\' : \'lock\',\n })\n }\n render() {\n return (\n \n \n {\n if (instance) {\n console.log(\'instance:\', instance);\n }\n }}\n preIcon="like-o"\n type={this.state.btnIcon === \'lock\' ? \'password\' : \'text\'}\n placeholder="\u8bf7\u8f93\u5165\u5bc6\u7801"\n addonAfter={ }\n />\n \n
\n )\n }\n}\nReactDOM.render( , _mount_);\n```\n\n### \u8f93\u5165\u6846\u88ab\u7981\u7528\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Icon, Input, Row, Col} from \'uiw\';\n\nconst stylItem = { margin: 20 };\nconst Demo = () => (\n <>\n \n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n
\n >\n);\nReactDOM.render( , _mount_);\n```\n\n## Input\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u7248\u672c |\n|--------- |-------- |--------- |-------- |-------- |\n| value | \u7ed1\u5b9a\u503c | String | - |\n| disabled | \u7981\u7528\u8f93\u5165\u6846 | Boolean | `false` |\n| preIcon | \u8f93\u5165\u6846`\u524d`\u9762\u653e\u7f6e\u56fe\u6807 | String/ReactNode | - |\n| addonAfter | \t\u5e26\u6807\u7b7e\u7684 input\uff0c\u8bbe\u7f6e\u540e\u7f6e\u6807\u7b7e | String/ReactNode | - |\n| size | \u6307\u5b9a\u8f93\u5165\u6846\u7684\u5c3a\u5bf8\uff0c\u9664\u4e86\u9ed8\u8ba4\u7684\u5927\u5c0f\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86 `large`\u3001`small` \u548c `default` \u4e09\u79cd\u5c3a\u5bf8\u3002 | String | - |\n| inputStyle | \u4f20\u9012\u7ed9input\u7684\u6837\u5f0f\uff0c\u5728\u9700\u8981\u52a8\u6001\u8bbe\u7f6e\u6837\u5f0f\u573a\u666f\u4e0b\u4f7f\u7528 | Object | - | v4.18.2 |\n\n## InputNumber\n\u5728v4.18.2\u4e2d\u589e\u52a0\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u7248\u672c |\n|--------- |-------- |--------- |-------- |-------- |\n| min | \u6700\u5c0f\u503c | Number | - |\n| max | \u6700\u5927\u503c | Number | - |\n| step | \u8bbe\u7f6e\u6b65\u957f\u503c | Number | - |\n| overLimitColor | \u5141\u8bb8\u8d85\u51fa`min`,`max`\u9650\u5236, \u4f7f\u7528\u8be5\u8b66\u544a\u8272\u663e\u793a | String | - |\n\n\u66f4\u591a\u5c5e\u6027\u6587\u6863\u8bf7\u53c2\u8003 Input\u3002\n'}}]);
+//# sourceMappingURL=5146.9b213573.chunk.js.map
\ No newline at end of file
diff --git a/static/js/5146.9b213573.chunk.js.map b/static/js/5146.9b213573.chunk.js.map
new file mode 100644
index 0000000000..b77f23c795
--- /dev/null
+++ b/static/js/5146.9b213573.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/5146.9b213573.chunk.js","mappings":"+GAAA","sources":["../../packages/react-input/README.md"],"sourcesContent":["export default \"Input 输入框\\n===\\n\\n[![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-input/file/README.md)\\n[![NPM Downloads](https://img.shields.io/npm/dm/@uiw/react-input.svg?style=flat)](https://www.npmjs.com/package/@uiw/react-input)\\n[![npm version](https://img.shields.io/npm/v/@uiw/react-input.svg?label=@uiw/react-input)](https://npmjs.com/@uiw/react-input)\\n\\n通过鼠标或键盘输入内容,是最基础的表单域的包装。\\n\\n```jsx\\nimport { Input } from 'uiw';\\n// or\\nimport Input from '@uiw/react-input';\\n```\\n\\n### 基础用法\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n
\\n);\\nReactDOM.render( , _mount_);\\n```\\n\\n### 数字输入框\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { InputNumber } from 'uiw';\\n\\nconst Demo = () => {\\n\\n return(\\n \\n \\n \\n \\n \\n 限制大小\\n \\n \\n \\n 超出限界警告\\n \\n \\n \\n 设置步涨值\\n \\n \\n \\n
\\n
\\n )\\n};\\nReactDOM.render( , _mount_);\\n```\\n\\n### Form 中使用 Input\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Form, Input, Row, Col, Button, Notify } from 'uiw';\\n\\nconst Demo = () => (\\n \\n);\\n\\nReactDOM.render( , _mount_);\\n```\\n\\n### 插入图标\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col } from 'uiw';\\n\\nconst stylItem = { margin: 20 };\\nconst Demo = () => (\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 后面插入内容\\n\\n向后面插入 [`Button`](#/components/button) 或者 [`Tag`](#/components/tag)\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Button, Tag } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n \\n }\\n />\\n \\n \\n }\\n />\\n \\n \\n 按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 输入框尺寸\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Tag, Button } from 'uiw';\\n\\nconst Demo = () => (\\n \\n \\n \\n }\\n />\\n \\n \\n }\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n }\\n />\\n \\n \\n 丸}\\n />\\n \\n \\n }\\n />\\n \\n
\\n \\n \\n 按钮}\\n />\\n \\n \\n 搜索}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n 亮按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n \\n 按钮}\\n />\\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n 按钮}\\n />\\n \\n
\\n
\\n)\\nReactDOM.render( , _mount_);\\n```\\n\\n### 密码输入框\\n\\n\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Input, Row, Col, Button } from 'uiw';\\n\\nclass Demo extends React.Component {\\n constructor() {\\n super();\\n this.state = {\\n btnIcon: 'lock',\\n }\\n }\\n onClick() {\\n this.setState({\\n btnIcon: this.state.btnIcon === 'lock' ? 'unlock' : 'lock',\\n })\\n }\\n render() {\\n return (\\n \\n \\n {\\n if (instance) {\\n console.log('instance:', instance);\\n }\\n }}\\n preIcon=\\\"like-o\\\"\\n type={this.state.btnIcon === 'lock' ? 'password' : 'text'}\\n placeholder=\\\"请输入密码\\\"\\n addonAfter={ }\\n />\\n \\n
\\n )\\n }\\n}\\nReactDOM.render( , _mount_);\\n```\\n\\n### 输入框被禁用\\n\\n\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Icon, Input, Row, Col} from 'uiw';\\n\\nconst stylItem = { margin: 20 };\\nconst Demo = () => (\\n <>\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n }\\n />\\n \\n \\n \\n \\n
\\n >\\n);\\nReactDOM.render( , _mount_);\\n```\\n\\n## Input\\n\\n| 参数 | 说明 | 类型 | 默认值 | 版本 |\\n|--------- |-------- |--------- |-------- |-------- |\\n| value | 绑定值 | String | - |\\n| disabled | 禁用输入框 | Boolean | `false` |\\n| preIcon | 输入框`前`面放置图标 | String/ReactNode | - |\\n| addonAfter | \\t带标签的 input,设置后置标签 | String/ReactNode | - |\\n| size | 指定输入框的尺寸,除了默认的大小外,还提供了 `large`、`small` 和 `default` 三种尺寸。 | String | - |\\n| inputStyle | 传递给input的样式,在需要动态设置样式场景下使用 | Object | - | v4.18.2 |\\n\\n## InputNumber\\n在v4.18.2中增加\\n\\n| 参数 | 说明 | 类型 | 默认值 | 版本 |\\n|--------- |-------- |--------- |-------- |-------- |\\n| min | 最小值 | Number | - |\\n| max | 最大值 | Number | - |\\n| step | 设置步长值 | Number | - |\\n| overLimitColor | 允许超出`min`,`max`限制, 使用该警告色显示 | String | - |\\n\\n更多属性文档请参考 Input。\\n\";"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/static/js/main.8a4f19ab.js b/static/js/main.8a4f19ab.js
new file mode 100644
index 0000000000..6a6b94aa6a
--- /dev/null
+++ b/static/js/main.8a4f19ab.js
@@ -0,0 +1,2 @@
+!function(){"use strict";var e={62545:function(e,n,t){t(41473);var r=t(69286),i=(0,r.jsx)("svg",{viewBox:"0 0 20 20",width:"23",height:"23",version:"1.1",children:(0,r.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,r.jsx)("path",{d:"M5.70480219,0 L10.4096044,3.41834667 L8.61252986,8.94934776 L2.79707453,8.94934776 L1,3.41834667 L5.70480219,0 Z M5.70480219,20 L1,16.5816533 L2.79707453,11.0506522 L8.61252986,11.0506522 L10.4096044,16.5816533 L5.70480219,20 Z M18.8709653,12.9678909 L13.3400514,14.7649021 L9.92167142,10.0599974 L13.3399103,5.35519519 L18.8708781,7.15237223 L18.8709653,12.9678909 Z",fill:"#FFFFFF"})})}),a=(0,r.jsx)("svg",{viewBox:"0 0 20 20",version:"1.1",children:(0,r.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,r.jsx)("path",{d:"M5.70480219,0 L10.4096044,3.41834667 L8.61252986,8.94934776 L2.79707453,8.94934776 L1,3.41834667 L5.70480219,0 Z M5.70480219,20 L1,16.5816533 L2.79707453,11.0506522 L8.61252986,11.0506522 L10.4096044,16.5816533 L5.70480219,20 Z M18.8709653,12.9678909 L13.3400514,14.7649021 L9.92167142,10.0599974 L13.3399103,5.35519519 L18.8708781,7.15237223 L18.8709653,12.9678909 Z",fill:"#FFFFFF"})})});n.Z={dark:i,light:a}},52744:function(e,n,t){var r=t(11026),i=t(41473),a=t(7510),o=t(64310),l=t(57261),s=(t(67251),t(50189)),c=t(69286);function d(){return(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{children:"It looks like you're lost..."}),(0,c.jsx)("p",{children:(0,c.jsx)(o.rU,{to:"/",children:"Go to the home page"})})]})}var u=t(32511);function f(){return(0,c.jsx)(u.Loader,{tip:"Loading...",indicator:(0,c.jsx)(u.Icon,{type:"loading",spin:!0,style:{verticalAlign:"text-top"}})})}var h=t(75752),p={};function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.useMemo)((function(){return(0,c.jsx)(u.Select.Option,{value:e.version,children:e.version})}),[e.version])}var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(e){var n=e.target.value,t="1"===n.split(".")[0];window.location.href=t?"https://unpkg.com/uiw@".concat(n,"/dist/index.html"):"https://unpkg.com/@uiw/doc@".concat(n,"/web/index.html")}var t=h.i8,r=e.data,a=r[0];return a!==t&&r.unshift(t),(0,i.useMemo)((function(){return(0,c.jsx)("div",{className:p.nav,children:(0,c.jsx)(u.Select,{defaultValue:r[0],onChange:n,children:r.map((function(e,n){return(0,c.jsx)(m,{version:e},n)}))})})}),[r])},x={sider:"index_sider__vrASx",menuWarpper:"index_menuWarpper__asOzy",subMenu:"index_subMenu__c4Mvo",layoutWrap:"index_layoutWrap__6CE3D",layoutSider:"index_layoutSider__1t-SG"},y=JSON.parse('["4.0.0","3.10.12","2.0.1","1.16.19"]'),g={title:"index_title__O5TzH",menu:"index_menu__9HE8I",divider:"index_divider__1cINS"},j=t(86646),b={home:(0,c.jsx)("svg",{width:"23",height:"24",viewBox:"0 0 23 24",children:(0,c.jsx)("path",{fill:"#555",d:"M7.95808665,21.4797568 L7.95808665,14.2926972 C7.95808665,13.872855 8.29729322,13.5325056 8.71572573,13.5325056 L14.7768383,13.5325056 C15.1952708,13.5325056 15.5344774,13.872855 15.5344774,14.2926972 L15.5344774,21.4800639 L18.3333605,21.4801773 C18.4412665,21.4760176 18.5251665,21.4671569 18.58271,21.4596448 C18.588514,21.3995182 18.5915777,21.3235793 18.5907536,21.2318213 L18.5909124,14.2893672 C18.590922,13.869525 18.9301364,13.5291834 19.3485689,13.5291931 C19.7670014,13.5292027 20.1062001,13.8695599 20.1061905,14.2894021 L20.1059996,21.2248359 C20.1119888,21.8771673 19.9896563,22.3494462 19.5993559,22.6516032 C19.3010239,22.8825616 18.9057568,22.9796164 18.3624477,23 L4.48346492,22.9997015 C3.86961191,22.9824374 3.38486601,22.8118189 3.07125061,22.4182996 C2.79329968,22.0695315 2.68322544,21.5965073 2.68425496,20.9934992 L2.68424909,14.2893853 C2.68424872,13.8695431 3.02345499,13.5291934 3.4418875,13.5291931 C3.86032001,13.5291927 4.19952687,13.8695418 4.19952724,14.289384 L4.199532,20.9947994 C4.19904359,21.2811808 4.23526541,21.4410529 4.2538782,21.4676906 C4.24030246,21.4480656 4.31738234,21.474056 4.50469304,21.4796169 L7.95808665,21.4797568 Z M9.4733648,21.4798183 L14.0191993,21.4800025 L14.0191993,15.0528888 L9.4733648,15.0528888 L9.4733648,21.4798183 Z M2.28332829,11.4133771 C1.98200714,11.7046849 1.50237937,11.6957445 1.21204968,11.3934082 C0.921719999,11.0910719 0.930630346,10.6098283 1.2319515,10.3185205 L10.4507678,1.41136668 C10.7833916,1.14885042 11.1310579,1 11.4999998,1 C11.9102569,1 12.2738276,1.19453217 12.5845816,1.51087139 L21.7658664,10.3164197 C22.0683439,10.6065186 22.0791684,11.0877227 21.7900436,11.3912192 C21.5009189,11.6947157 21.0213305,11.7055767 20.718853,11.4154779 L11.5218713,2.5944308 C11.4545418,2.52599021 11.4440624,2.52038312 11.4999998,2.52038312 C11.514622,2.52038312 11.4750696,2.53731716 11.4448602,2.55629655 L2.28332829,11.4133771 Z"})}),component:(0,c.jsxs)("svg",{viewBox:"0 0 1041 1024",width:"20",height:"20",children:[(0,c.jsx)("path",{d:"M133.498105 661.882904h31.175644v195.047619a34.373146 34.373146 0 0 0 34.373146 34.373146h109.514441a34.373146 34.373146 0 1 0 0-68.746292h-75.141295V627.509758a35.172521 35.172521 0 0 0-34.373146-35.172521h-65.54879a63.950039 63.950039 0 0 1 0-127.900079h65.54879a35.172521 35.172521 0 0 0 34.373146-35.172521V233.417642h195.846994a35.172521 35.172521 0 0 0 35.172522-34.373146v-65.54879a63.950039 63.950039 0 0 1 127.900078 0v65.54879a35.172521 35.172521 0 0 0 35.172521 34.373146h195.047619v74.341921a34.373146 34.373146 0 0 0 68.746292 0V199.044496a34.373146 34.373146 0 0 0-34.373146-34.373145H661.885302v-31.175645a133.495706 133.495706 0 0 0-266.991413 0v31.175645H199.046895a34.373146 34.373146 0 0 0-34.373146 34.373145v195.846995h-31.175644A132.696331 132.696331 0 0 0 0.002398 527.587822a133.495706 133.495706 0 0 0 133.495707 134.295082z",fill:"#6F737E"}),(0,c.jsx)("path",{d:"M1004.817386 840.943013a79.937549 79.937549 0 1 1 0-159.875097 34.373146 34.373146 0 0 0 34.373146-32.774395V533.982826a34.373146 34.373146 0 0 0-34.373146-34.373146H879.315435v-10.391881a103.119438 103.119438 0 1 0-206.238876 0v10.391881H549.972734a35.172521 35.172521 0 0 0-35.172522 34.373146v124.702576h-10.391881a103.119438 103.119438 0 1 0 0 206.238876h10.391881v124.702576a35.172521 35.172521 0 0 0 35.172522 34.373146H663.484053a34.373146 34.373146 0 0 0 34.373146-34.373146 79.937549 79.937549 0 0 1 159.875098 0 34.373146 34.373146 0 0 0 34.373146 34.373146h114.310694a34.373146 34.373146 0 0 0 34.373146-34.373146V879.313037a34.373146 34.373146 0 0 0-35.971897-38.370024z",fill:"#6F737E"})]}),github:(0,c.jsxs)("svg",{viewBox:"0 0 1049 1024",width:"20",height:"20",children:[(0,c.jsx)("path",{d:"M524.979332 0C234.676191 0 0 234.676191 0 524.979332c0 232.068678 150.366597 428.501342 358.967656 498.035028 26.075132 5.215026 35.636014-11.299224 35.636014-25.205961 0-12.168395-0.869171-53.888607-0.869171-97.347161-146.020741 31.290159-176.441729-62.580318-176.441729-62.580318-23.467619-60.841976-58.234462-76.487055-58.234463-76.487055-47.804409-32.15933 3.476684-32.15933 3.476685-32.15933 53.019436 3.476684 80.83291 53.888607 80.83291 53.888607 46.935238 79.963739 122.553122 57.365291 152.97411 43.458554 4.345855-33.897672 18.252593-57.365291 33.028501-70.402857-116.468925-12.168395-239.022047-57.365291-239.022047-259.012982 0-57.365291 20.860106-104.300529 53.888607-140.805715-5.215026-13.037566-23.467619-66.926173 5.215027-139.067372 0 0 44.327725-13.906737 144.282399 53.888607 41.720212-11.299224 86.917108-17.383422 131.244833-17.383422s89.524621 6.084198 131.244833 17.383422C756.178839 203.386032 800.506564 217.29277 800.506564 217.29277c28.682646 72.1412 10.430053 126.029806 5.215026 139.067372 33.897672 36.505185 53.888607 83.440424 53.888607 140.805715 0 201.64769-122.553122 245.975415-239.891218 259.012982 19.121764 16.514251 35.636014 47.804409 35.636015 97.347161 0 70.402857-0.869171 126.898978-0.869172 144.282399 0 13.906737 9.560882 30.420988 35.636015 25.205961 208.601059-69.533686 358.967656-265.96635 358.967655-498.035028C1049.958663 234.676191 814.413301 0 524.979332 0z",fill:"#191717"}),(0,c.jsx)("path",{d:"M199.040177 753.571326c-0.869171 2.607513-5.215026 3.476684-8.691711 1.738342s-6.084198-5.215026-4.345855-7.82254c0.869171-2.607513 5.215026-3.476684 8.691711-1.738342s5.215026 5.215026 4.345855 7.82254z m-6.953369-4.345856M219.900283 777.038945c-2.607513 2.607513-7.82254 0.869171-10.430053-2.607514-3.476684-3.476684-4.345855-8.691711-1.738342-11.299224 2.607513-2.607513 6.953369-0.869171 10.430053 2.607514 3.476684 4.345855 4.345855 9.560882 1.738342 11.299224z m-5.215026-5.215027M240.760389 807.459932c-3.476684 2.607513-8.691711 0-11.299224-4.345855-3.476684-4.345855-3.476684-10.430053 0-12.168395 3.476684-2.607513 8.691711 0 11.299224 4.345855 3.476684 4.345855 3.476684 9.560882 0 12.168395z m0 0M269.443034 837.011749c-2.607513 3.476684-8.691711 2.607513-13.906737-1.738342-4.345855-4.345855-6.084198-10.430053-2.607513-13.037566 2.607513-3.476684 8.691711-2.607513 13.906737 1.738342 4.345855 3.476684 5.215026 9.560882 2.607513 13.037566z m0 0M308.555733 853.526c-0.869171 4.345855-6.953369 6.084198-13.037566 4.345855-6.084198-1.738342-9.560882-6.953369-8.691711-10.430053 0.869171-4.345855 6.953369-6.084198 13.037566-4.345855 6.084198 1.738342 9.560882 6.084198 8.691711 10.430053z m0 0M351.145116 857.002684c0 4.345855-5.215026 7.82254-11.299224 7.82254-6.084198 0-11.299224-3.476684-11.299224-7.82254s5.215026-7.82254 11.299224-7.82254c6.084198 0 11.299224 3.476684 11.299224 7.82254z m0 0M391.126986 850.049315c0.869171 4.345855-3.476684 8.691711-9.560882 9.560882-6.084198 0.869171-11.299224-1.738342-12.168395-6.084197-0.869171-4.345855 3.476684-8.691711 9.560881-9.560882 6.084198-0.869171 11.299224 1.738342 12.168396 6.084197z m0 0",fill:"#191717"})]}),issue:(0,c.jsxs)("svg",{className:"issue",viewBox:"0 0 1024 1024",width:"23",height:"23",children:[(0,c.jsx)("path",{d:"M1022.976 698.368c0-58.88-24.064-113.664-64.512-155.648-44.544 175.616-223.744 307.2-438.784 310.784 51.712 55.296 131.072 90.624 219.648 90.624 21.504 0 41.984-2.048 61.952-6.144 54.784 75.776 121.856 72.192 121.856 72.192-24.064-14.848-27.136-69.632-26.112-108.032 76.288-44.032 125.952-119.296 125.952-203.776z m0 0",fill:"#558EFF"}),(0,c.jsx)("path",{d:"M458.24 13.824C205.312 13.824 0 191.488 0 410.624c0 137.216 80.384 258.048 202.24 329.216 1.536 61.44-3.584 150.016-41.984 174.592 0 0 108.544 5.632 197.12-116.736 32.256 6.144 66.048 9.728 100.352 9.728H465.92c215.04-3.584 394.24-135.168 438.784-310.784 7.168-27.648 10.752-56.32 10.752-86.016 0.512-219.136-204.288-396.8-457.216-396.8zM256 462.848c-33.792 0-60.928-27.136-60.928-60.928 0-33.792 27.136-60.928 60.928-60.928 33.792 0 60.928 27.136 60.928 60.928 0 33.792-27.136 60.928-60.928 60.928z m202.24 0c-33.792 0-60.928-27.136-60.928-60.928 0-33.792 27.136-60.928 60.928-60.928 33.792 0 60.928 27.136 60.928 60.928 0 33.792-27.136 60.928-60.928 60.928z m202.24 0c-33.792 0-60.928-27.136-60.928-60.928 0-33.792 27.136-60.928 60.928-60.928 33.792 0 60.928 27.136 60.928 60.928 0 33.792-27.136 60.928-60.928 60.928z m0 0",fill:"#549EFF"})]}),gitee:(0,c.jsx)("svg",{className:"gitee",viewBox:"0 0 1024 1024",width:"200",height:"200",children:(0,c.jsx)("path",{d:"M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z",fill:"#C71D23"})}),plugin:(0,c.jsxs)("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",children:[(0,c.jsx)("path",{d:"M937.6 251.3L538 69.7c-11.5-5.1-24.6-5.1-36.1 0L102.4 251.3c-22.4 9.9-32.5 32.2-22.6 54.6 4.5 10.1 12.5 15.1 22.6 19.6L502 506.1c11.5 5.1 24.6 5.1 36.1 0l399.6-180.6c22.4-9.9 32.5-33.2 22.6-55.6-4.6-10.1-12.6-14.1-22.7-18.6zM497.6 723.4l-398.7-165c-18.4-7.6-27.1-28.7-19.5-47 7.6-18.4 28.7-27.1 47-19.5l398.7 165c18.4 7.6 27.1 28.7 19.5 47-7.6 18.3-28.6 27.1-47 19.5z"}),(0,c.jsx)("path",{d:"M526.4 723.4l398.7-165c18.4-7.6 27.1-28.7 19.5-47-7.6-18.4-28.7-27.1-47-19.5l-398.7 165c-18.4 7.6-27.1 28.7-19.5 47 7.6 18.3 28.6 27.1 47 19.5z"}),(0,c.jsx)("path",{d:"M497.6 955.4l-398.7-165c-18.4-7.6-27.1-28.7-19.5-47 7.6-18.4 28.7-27.1 47-19.5l398.7 165c18.4 7.6 27.1 28.7 19.5 47-7.6 18.3-28.6 27.1-47 19.5z"}),(0,c.jsx)("path",{d:"M526.4 955.4l398.7-165c18.4-7.6 27.1-28.7 19.5-47-7.6-18.4-28.7-27.1-47-19.5l-398.7 165c-18.4 7.6-27.1 28.7-19.5 47 7.6 18.3 28.6 27.1 47 19.5z"})]})};function w(){var e=(0,l.TH)(),n=j.find((function(n){return new RegExp("^".concat(n.path||"")).test(e.pathname)}));return null!==n&&void 0!==n&&n.children?(0,c.jsxs)("div",{className:g.wapper,children:[(0,c.jsxs)("h2",{className:g.title,children:[b[n.icon],(0,c.jsx)("span",{children:n.name})]}),(0,c.jsx)("div",{className:g.menu,children:n.children&&n.children.map((function(e,n){return e.divider?(0,c.jsx)("div",{className:g.divider,children:e.name},n):/^http(?:|s):\/\//.test(e.path||"")?(0,c.jsxs)("a",{href:e.path,target:"__blank",children:[e.name,(0,c.jsxs)("svg",{viewBox:"0 0 1024 1024",width:14,children:[(0,c.jsx)("path",{d:"M821.1456 276.8384c-235.9296 25.1392-449.1776 226.7136-490.5472 452.352a38.4 38.4 0 1 1-75.5712-13.824c45.568-248.576 269.312-468.48 526.6944-510.6688l-117.8112-69.1712a38.4 38.4 0 0 1 38.912-66.2528l223.3344 131.1744a38.4 38.4 0 0 1 10.1376 57.6l-170.752 206.6432a38.4 38.4 0 1 1-59.1872-48.9472l114.7904-138.9056z"}),(0,c.jsx)("path",{d:"M832 620.0832a38.4 38.4 0 0 1 76.8 0v158.208c0 85.9648-61.5936 157.8496-140.8 157.8496H204.8c-79.2064 0-140.8-71.8848-140.8-157.9008V300.3904c0-86.016 61.5936-157.8496 140.8-157.8496h220.2112a38.4 38.4 0 1 1 0 76.8H204.8c-33.8944 0-64 35.072-64 81.0496V778.24c0 45.9776 30.1056 81.1008 64 81.1008h563.2c33.8944 0 64-35.1232 64-81.1008v-158.1568z"})]})]},n):(0,c.jsx)(o.OL,{to:e.path||"",replace:!0,children:e.name},n)}))})]}):null}var C={logo:"index_logo__kUQOi",top:"index_top__DLxV-",nav:"index_nav__SdXbb",navTop:"index_navTop__08yh1",btn:"index_btn__YYGUe",btnTop:"index_btnTop__PlNw6"},N={layout:"top"},Z=function(e,n){return(0,s.Z)((0,s.Z)({},e),n)},k=i.createContext({state:N,dispatch:function(){return null}}),S=t(62545),E={menu:(0,c.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 26 26",children:(0,c.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,c.jsx)("rect",{width:"26",height:"26",fill:"#9E9E9E",rx:"4"}),(0,c.jsx)("rect",{width:"5",height:"20",x:"3",y:"3",fill:"#202224",rx:"2.5"}),(0,c.jsx)("rect",{width:"12",height:"20",x:"11",y:"3",fill:"#FFF",fillOpacity:".657",rx:"2"})]})}),menutop:(0,c.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 26 26",children:(0,c.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,c.jsx)("rect",{width:"26",height:"26",fill:"#9E9E9E",rx:"4"}),(0,c.jsx)("rect",{width:"20",height:"5",x:"3",y:"3",fill:"#202224",rx:"2.5"}),(0,c.jsx)("rect",{width:"20",height:"12",x:"3",y:"11",fill:"#FFF",fillOpacity:".66",rx:"2"})]})}),china:(0,c.jsxs)("svg",{className:"flag",width:"19",height:"19",viewBox:"0 0 512 512",children:[(0,c.jsx)("defs",{children:(0,c.jsx)("path",{id:"a",fill:"#ffde00",d:"M1-.3L-.7.8 0-1 .6.8-1-.3z"})}),(0,c.jsx)("path",{fill:"#de2910",d:"M0 0h512v512H0z"}),(0,c.jsx)("use",{width:"30",height:"20",transform:"matrix(76.8 0 0 76.8 128 128)",xlinkHref:"#a"}),(0,c.jsx)("use",{width:"30",height:"20",transform:"rotate(-121 142.6 -47) scale(25.5827)",xlinkHref:"#a"}),(0,c.jsx)("use",{width:"30",height:"20",transform:"rotate(-98.1 198 -82) scale(25.6)",xlinkHref:"#a"}),(0,c.jsx)("use",{width:"30",height:"20",transform:"rotate(-74 272.4 -114) scale(25.6137)",xlinkHref:"#a"}),(0,c.jsx)("use",{width:"30",height:"20",transform:"matrix(16 -19.968 19.968 16 256 230.4)",xlinkHref:"#a"})]})};function M(){var e=(0,i.useContext)(k),n=e.state,t=e.dispatch;return(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)("div",{className:[C.logo,"left"===n.layout?null:C.top].filter(Boolean).join(" ").trim(),children:(0,c.jsxs)(o.rU,{to:"/",children:[S.Z.dark,"top"===n.layout&&(0,c.jsxs)("span",{children:["UIW",(0,c.jsx)("sup",{children:h.i8})]})]})}),(0,c.jsx)("div",{className:[C.nav,"left"===n.layout?null:C.navTop].filter(Boolean).join(" ").trim(),children:j.map((function(e,t){var r=e.path,i=e.name,a=e.icon;if(Object.keys(b).includes(a)&&(a=b[a]),/^https?:(?:\/\/)?/.test(r))return"top"===n.layout?(0,c.jsxs)("a",{target:"__blank",href:r,className:C.outerUrl,children:[a," ",(0,c.jsx)("span",{children:i})]},t):(0,c.jsx)(u.Tooltip,{usePortal:!1,placement:"left"===n.layout?"right":"bottom",content:(0,c.jsx)("span",{style:{whiteSpace:"nowrap"},children:i}),children:(0,c.jsx)("a",{target:"__blank",href:r,className:C.outerUrl,children:a})},t);var l={color:"#fff"};return"top"===n.layout?(0,c.jsxs)(o.OL,{to:r,style:function(e){return e.isActive?l:void 0},children:[a," ",(0,c.jsx)("span",{children:i})]},t):(0,c.jsx)(u.Tooltip,{usePortal:!1,placement:"left"===n.layout?"right":"bottom",content:(0,c.jsx)("span",{style:{whiteSpace:"nowrap"},children:i}),children:(0,c.jsx)(o.OL,{to:r,style:function(e){return e.isActive?l:void 0},children:a})},t)}))}),(0,c.jsxs)("div",{className:[C.btn,"left"===n.layout?null:C.btnTop].filter(Boolean).join(" ").trim(),children:[(0,c.jsx)(u.Tooltip,{placement:"left"===n.layout?"right":"bottom",content:"\u56fd\u5185\u955c\u50cf\u7ad9\u70b9",children:(0,c.jsx)("a",{href:"http://uiw.gitee.io",rel:"noopener noreferrer",target:"_blank",children:E.china})}),(0,c.jsx)("button",{onClick:function(){return t({layout:"left"===n.layout?"top":"left"})},children:"left"===n.layout?E.menu:E.menutop})]})]})}var P=u.Layout.Header,B=u.Layout.Sider,z=u.Layout.Content;function L(e){var n=e.siderMenu,t=void 0===n||n,r=(0,i.useContext)(k).state;return(0,c.jsx)(u.Layout,{className:x.layout,children:"top"===r.layout?(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)(u.Affix,{offsetTop:0,style:{zIndex:999},children:(0,c.jsx)(P,{style:{display:"flex",alignItems:"center"},children:(0,c.jsx)(M,{})})}),(0,c.jsxs)(u.Layout,{className:x.layoutWrap,children:[(0,c.jsx)(B,{width:t?260:0,className:x.layoutSider,children:(0,c.jsx)("div",{style:{width:t?260:0,height:"calc(100vh - 53px)"},children:(0,c.jsx)(w,{})})}),(0,c.jsx)(z,{style:{padding:20},className:x.layoutContent,children:(0,c.jsx)(l.j3,{})})]})]}):(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)(B,{width:t?330:64,children:(0,c.jsxs)(u.Layout,{className:x.sider,children:[(0,c.jsx)(B,{className:x.menuWarpper,width:64,children:(0,c.jsx)(M,{})}),(0,c.jsx)(u.Layout,{style:{position:"fixed",width:t?330:64,zIndex:1,left:0,top:0,bottom:0,overflow:"auto"},children:(0,c.jsx)(z,{className:x.subMenu,style:{paddingLeft:64},children:(0,c.jsx)(w,{})})})]})}),(0,c.jsxs)(u.Layout,{style:{position:"relative"},children:[(0,c.jsx)(P,{style:{height:"inherit",lineHeight:"32px",position:"absolute",padding:"5px 10px",width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",backgroundColor:"transparent",zIndex:99},children:(0,c.jsx)(v,{data:y})}),(0,c.jsx)(z,{style:{padding:20},className:x.layoutContent,children:(0,c.jsx)(l.j3,{})})]})]})})}var O=function(e){return function(n){return(0,c.jsx)(i.Suspense,{fallback:(0,c.jsx)(f,{}),children:(0,c.jsx)(e,(0,s.Z)({},n))})}},D=O((0,i.lazy)((function(){return t.e(9200).then(t.bind(t,69200))}))),R=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(6730)]).then(t.bind(t,29569))}))),A=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(875)]).then(t.bind(t,36074))}))),T=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(6715)]).then(t.bind(t,56238))}))),I=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(643)]).then(t.bind(t,667))}))),F=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4188)]).then(t.bind(t,39877))}))),H=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(163)]).then(t.bind(t,11314))}))),W=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7104)]).then(t.bind(t,19848))}))),V=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5308)]).then(t.bind(t,53510))}))),_=O((0,i.lazy)((function(){return t.e(4877).then(t.bind(t,64877))}))),K=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(3917)]).then(t.bind(t,81423))}))),Y=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1059)]).then(t.bind(t,96790))}))),$=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1820)]).then(t.bind(t,29206))}))),U=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9853)]).then(t.bind(t,17068))}))),J=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7834)]).then(t.bind(t,88412))}))),G=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(694)]).then(t.bind(t,53929))}))),q=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(6510)]).then(t.bind(t,62204))}))),X=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5263)]).then(t.bind(t,21750))}))),Q=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2230)]).then(t.bind(t,58123))}))),ee=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4503)]).then(t.bind(t,25534))}))),ne=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9763)]).then(t.bind(t,21072))}))),te=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(221)]).then(t.bind(t,96632))}))),re=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5933)]).then(t.bind(t,52174))}))),ie=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2782)]).then(t.bind(t,26519))}))),ae=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5408)]).then(t.bind(t,14198))}))),oe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7390)]).then(t.bind(t,26989))}))),le=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(8566)]).then(t.bind(t,20873))}))),se=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2582)]).then(t.bind(t,51374))}))),ce=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(8073)]).then(t.bind(t,4916))}))),de=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(8023)]).then(t.bind(t,78185))}))),ue=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2411)]).then(t.bind(t,57018))}))),fe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9776)]).then(t.bind(t,3536))}))),he=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2737)]).then(t.bind(t,63926))}))),pe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7884)]).then(t.bind(t,78844))}))),me=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9384)]).then(t.bind(t,38661))}))),ve=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9673)]).then(t.bind(t,20605))}))),xe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7157)]).then(t.bind(t,92106))}))),ye=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9777)]).then(t.bind(t,62787))}))),ge=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(3518)]).then(t.bind(t,51130))}))),je=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1619)]).then(t.bind(t,63390))}))),be=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2367)]).then(t.bind(t,23472))}))),we=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4128)]).then(t.bind(t,77380))}))),Ce=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1061)]).then(t.bind(t,58525))}))),Ne=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2190)]).then(t.bind(t,12036))}))),Ze=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2595)]).then(t.bind(t,93520))}))),ke=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5244)]).then(t.bind(t,91339))}))),Se=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7541)]).then(t.bind(t,88352))}))),Ee=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5595)]).then(t.bind(t,67774))}))),Me=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1169)]).then(t.bind(t,92003))}))),Pe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9253)]).then(t.bind(t,73255))}))),Be=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5393)]).then(t.bind(t,45171))}))),ze=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1317)]).then(t.bind(t,60717))}))),Le=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(8898)]).then(t.bind(t,77002))}))),Oe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(433)]).then(t.bind(t,69149))}))),De=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7875)]).then(t.bind(t,13902))}))),Re=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4010)]).then(t.bind(t,92425))}))),Ae=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(3812)]).then(t.bind(t,88915))}))),Te=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(3313)]).then(t.bind(t,50216))}))),Ie=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(748)]).then(t.bind(t,86726))}))),Fe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9260)]).then(t.bind(t,36770))}))),He=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4396)]).then(t.bind(t,90389))}))),We=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9503)]).then(t.bind(t,82186))}))),Ve=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(1584)]).then(t.bind(t,71937))}))),_e=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2156)]).then(t.bind(t,17292))}))),Ke=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(2316)]).then(t.bind(t,62462))}))),Ye=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(9121)]).then(t.bind(t,52287))}))),$e=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4948)]).then(t.bind(t,12357))}))),Ue=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4648)]).then(t.bind(t,40015))}))),Je=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4098)]).then(t.bind(t,92910))}))),Ge=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7761)]).then(t.bind(t,76733))}))),qe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(4405)]).then(t.bind(t,98680))}))),Xe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(5865)]).then(t.bind(t,8041))}))),Qe=O((0,i.lazy)((function(){return Promise.all([t.e(889),t.e(6982),t.e(782),t.e(7087)]).then(t.bind(t,28928))}))),en=[{path:"/extensions",element:(0,c.jsx)(L,{siderMenu:!1}),children:[{index:!0,element:(0,c.jsx)(R,{})},{path:"*",element:(0,c.jsx)(d,{})}]},{path:"/guide",element:(0,c.jsx)(L,{}),children:[{index:!0,element:(0,c.jsx)(A,{})},{path:"/guide/quick-start",element:(0,c.jsx)(A,{})},{path:"/guide/import",element:(0,c.jsx)(T,{})},{path:"/guide/create-react-app",element:(0,c.jsx)(I,{})},{path:"/guide/kkt",element:(0,c.jsx)(F,{})},{path:"/guide/vscode",element:(0,c.jsx)(W,{})},{path:"/guide/docs",element:(0,c.jsx)(H,{})},{path:"/guide/recommendation",element:(0,c.jsx)(V,{})},{path:"*",element:(0,c.jsx)(d,{})}]},{path:"/components",element:(0,c.jsx)(L,{}),children:[{index:!0,element:(0,c.jsx)(_,{})},{path:"/components/overview",element:(0,c.jsx)(_,{})},{path:"/components/colors",element:(0,c.jsx)(K,{})},{path:"/components/reset-css",element:(0,c.jsx)(U,{})},{path:"/components/alert",element:(0,c.jsx)(Y,{})},{path:"/components/auto-link",element:(0,c.jsx)($,{})},{path:"/components/avatar",element:(0,c.jsx)(J,{})},{path:"/components/affix",element:(0,c.jsx)(G,{})},{path:"/components/calendar",element:(0,c.jsx)(q,{})},{path:"/components/checkbox",element:(0,c.jsx)(Q,{})},{path:"/components/copy-to-clipboard",element:(0,c.jsx)(ee,{})},{path:"/components/collapse",element:(0,c.jsx)(ne,{})},{path:"/components/card",element:(0,c.jsx)(te,{})},{path:"/components/carousel",element:(0,c.jsx)(re,{})},{path:"/components/cascader",element:(0,c.jsx)(X,{})},{path:"/components/descriptions",element:(0,c.jsx)(ie,{})},{path:"/components/loader",element:(0,c.jsx)(ae,{})},{path:"/components/icon",element:(0,c.jsx)(oe,{})},{path:"/components/divider",element:(0,c.jsx)(le,{})},{path:"/components/drawer",element:(0,c.jsx)(se,{})},{path:"/components/date-picker",element:(0,c.jsx)(ce,{})},{path:"/components/date-input",element:(0,c.jsx)(de,{})},{path:"/components/dropdown",element:(0,c.jsx)(ue,{})},{path:"/components/badge",element:(0,c.jsx)(fe,{})},{path:"/components/progress",element:(0,c.jsx)(he,{})},{path:"/components/pagination",element:(0,c.jsx)(pe,{})},{path:"/components/pin-code",element:(0,c.jsx)(me,{})},{path:"/components/input",element:(0,c.jsx)(ve,{})},{path:"/components/button",element:(0,c.jsx)(xe,{})},{path:"/components/radio",element:(0,c.jsx)(ye,{})},{path:"/components/select",element:(0,c.jsx)(ge,{})},{path:"/components/search-select",element:(0,c.jsx)(je,{})},{path:"/components/split",element:(0,c.jsx)(be,{})},{path:"/components/switch",element:(0,c.jsx)(we,{})},{path:"/components/slider",element:(0,c.jsx)(Ce,{})},{path:"/components/grid",element:(0,c.jsx)(Ne,{})},{path:"/components/form",element:(0,c.jsx)(Ze,{})},{path:"/components/file-input",element:(0,c.jsx)(ke,{})},{path:"/components/breadcrumb",element:(0,c.jsx)(Se,{})},{path:"/components/list",element:(0,c.jsx)(Ee,{})},{path:"/components/layout",element:(0,c.jsx)(Me,{})},{path:"/components/notify",element:(0,c.jsx)(Pe,{})},{path:"/components/tree",element:(0,c.jsx)(Be,{})},{path:"/components/tree-checked",element:(0,c.jsx)(ze,{})},{path:"/components/search-tree",element:(0,c.jsx)(Le,{})},{path:"/components/transfer",element:(0,c.jsx)(Oe,{})},{path:"/components/tag",element:(0,c.jsx)(De,{})},{path:"/components/tabs",element:(0,c.jsx)(Re,{})},{path:"/components/tooltip",element:(0,c.jsx)(Ae,{})},{path:"/components/table",element:(0,c.jsx)(Te,{})},{path:"/components/time-picker",element:(0,c.jsx)(Ie,{})},{path:"/components/rate",element:(0,c.jsx)(Fe,{})},{path:"/components/overlay",element:(0,c.jsx)(He,{})},{path:"/components/back-top",element:(0,c.jsx)(We,{})},{path:"/components/portal",element:(0,c.jsx)(Ve,{})},{path:"/components/overlay-trigger",element:(0,c.jsx)(_e,{})},{path:"/components/popover",element:(0,c.jsx)(Ke,{})},{path:"/components/message",element:(0,c.jsx)(Ye,{})},{path:"/components/month-picker",element:(0,c.jsx)($e,{})},{path:"/components/textarea",element:(0,c.jsx)(Ue,{})},{path:"/components/modal",element:(0,c.jsx)(Je,{})},{path:"/components/formatter",element:(0,c.jsx)(Ge,{})},{path:"/components/steps",element:(0,c.jsx)(qe,{})},{path:"/components/menu",element:(0,c.jsx)(Xe,{})},{path:"/components/empty",element:(0,c.jsx)(Qe,{})},{path:"*",element:(0,c.jsx)(d,{})}]},{path:"/",element:(0,c.jsx)(D,{})}],nn=function(){return(0,l.V$)(en)},tn=function(e){var n=e.children,t=(0,i.useReducer)(Z,N),a=(0,r.Z)(t,2),o=a[0],l=a[1];return(0,c.jsx)(k.Provider,{value:{state:o,dispatch:l},children:n})};a.render((0,c.jsx)(o.UT,{children:(0,c.jsx)(tn,{children:(0,c.jsx)(nn,{})})}),document.getElementById("root"))},32511:function(e,n,t){t.r(n),t.d(n,{Affix:function(){return x},Alert:function(){return T},AutoLink:function(){return H},Avatar:function(){return V},BackTop:function(){return Y},Badge:function(){return U},Breadcrumb:function(){return Q},Button:function(){return z},ButtonGroup:function(){return ne},Calendar:function(){return Xe},Card:function(){return en},Carousel:function(){return tn},Cascader:function(){return gn},Checkbox:function(){return Ln},CheckboxGroup:function(){return Mn},Col:function(){return yt},Collapse:function(){return In},CopyToClipboard:function(){return Vn},DateInput:function(){return $n},DateInputRange:function(){return Kn},DatePicker:function(){return Ue},DatePickerCaption:function(){return Ke},DatePickerDay:function(){return Te},DatePickerMonth:function(){return Fe},DatePickerYear:function(){return We},DayRect:function(){return De},Descriptions:function(){return nt},Divider:function(){return rt},Drawer:function(){return ot},Dropdown:function(){return an},Empty:function(){return st},FileInput:function(){return vt},Form:function(){return kt},FormItem:function(){return wt},Icon:function(){return P},Input:function(){return Ne},InputNumber:function(){return we},Layout:function(){return Lt.ZP},LayoutContent:function(){return Lt.bU},LayoutContext:function(){return Lt.VY},LayoutFooter:function(){return Lt.D4},LayoutHeader:function(){return Lt.NC},LayoutSider:function(){return Lt.Ju},List:function(){return zt},ListItem:function(){return Et},Loader:function(){return Dt},Menu:function(){return yn},MenuDivider:function(){return un},MenuItem:function(){return cn},Message:function(){return At},Modal:function(){return R},MonthPicker:function(){return Ft},Notify:function(){return Ut},Overlay:function(){return S},OverlayTrigger:function(){return ye},Pagination:function(){return nr},PinCode:function(){return ir},Popover:function(){return je},Portal:function(){return Z},Progress:function(){return dr},Radio:function(){return wn},RadioAbstract:function(){return bn},RadioButton:function(){return Sn},RadioGroup:function(){return Nn},Rate:function(){return fr},Row:function(){return jt},SearchSelect:function(){return xr},SearchTree:function(){return hi},Select:function(){return Qt},Slider:function(){return Zr},Split:function(){return yr.Z},Steps:function(){return wr},SubMenu:function(){return pn},Switch:function(){return Sr},Table:function(){return Hr},Tabs:function(){return Kr},Tag:function(){return pr},Textarea:function(){return $r},TimePicker:function(){return Be},TimePickerTime:function(){return Me},Tooltip:function(){return Jr},Transfer:function(){return pi},Tree:function(){return ii},TreeChecked:function(){return oi},canUseDOM:function(){return N},formatter:function(){return te.Z},getChildKeys:function(){return ni},randomid:function(){return Lt.SH}});var r=t(22951),i=t(91976),a=t(47169),o=t(67591),l=t(43415),s=t(30808),c=t(25773),d=t(41473);function u(){}function f(e,n){if("undefined"===typeof window)return 0;var t=n?"scrollTop":"scrollLeft",r=e===window,i=r?e[n?"pageYOffset":"pageXOffset"]:e[t];return r&&"number"!==typeof i&&(i=document.documentElement[t]),i}var h=function(e,n){var t=e.getBoundingClientRect(),r=function(e){return e!==window?e.getBoundingClientRect():{top:0,left:0,bottom:0}}(n),i=f(n,!0),a=f(n),o=window.document.body,l=o.clientTop||0,s=o.clientLeft||0;return{top:t.top-r.top+i-l,left:t.left-r.left+a-s,width:t.width,height:t.height}},p=function(){return"undefined"!==typeof window?window:null},m=t(69286),v=["prefixCls","className","children","offsetTop","offsetBottom","target","onChange"],x=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(e){var i;return(0,r.Z)(this,t),(i=n.call(this,e)).state={placeholderStyle:void 0,affixStyle:void 0},i.box=void 0,i.target=void 0,i.events=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],i.eventHandlers={},i.timeout=void 0,i.getInstance=function(e){e&&(i.box=e)},i.updatePosition=i.updatePosition.bind((0,a.Z)(i)),i}return(0,i.Z)(t,[{key:"componentDidMount",value:function(){var e=this,n=this.props.target||p;this.timeout=window.setTimeout((function(){e.target=n(),e.setTargetEventListeners()}))}},{key:"componentWillUnmount",value:function(){this.clearEventListeners(),clearTimeout(this.timeout)}},{key:"updatePosition",value:function(){var e=this.props.offsetTop,n=this.props.offsetBottom;if(this.box&&this.box.offsetParent){var t={width:this.box.clientWidth,height:this.box.clientHeight},r={top:!0,bottom:!1};"number"!==typeof e&&"number"!==typeof n&&(r.top=!0,e=0),"number"===typeof n&&(r.top=!1,r.bottom=!0);var i=h(this.box,this.target),a=this.box.getBoundingClientRect(),o=document.documentElement.clientHeight-a.y-i.height;r.top&&a.y<0?(this.setPlaceholderStyle((0,c.Z)({},t)),this.setAffixStyle({position:"fixed",top:e||0,left:i.left,width:i.width})):r.bottom&&o<0?(this.setPlaceholderStyle((0,c.Z)({},t)),this.setAffixStyle({position:"fixed",bottom:n||0,left:i.left,width:i.width})):(this.setPlaceholderStyle(),this.setAffixStyle())}}},{key:"setAffixStyle",value:function(e){var n=this.props.onChange,t=!!this.state.affixStyle;this.setState({affixStyle:e},(function(){n&&n(t)}))}},{key:"setPlaceholderStyle",value:function(e){this.setState({placeholderStyle:e})}},{key:"setTargetEventListeners",value:function(){var e=this;this.clearEventListeners(),this.events.forEach((function(n){e.eventHandlers[n]=e.updatePosition,e.target&&e.target.addEventListener(n,e.updatePosition,!1)}))}},{key:"clearEventListeners",value:function(){var e=this;this.events.forEach((function(n){var t=e.eventHandlers[n];e.target&&e.target.removeEventListener(n,t,!1)}))}},{key:"render",value:function(){var e=this.props,n=e.prefixCls,t=e.className,r=e.children,i=(0,s.Z)(e,v),a=[t,n].filter(Boolean).join(" ").trim();return(0,m.jsx)("div",(0,c.Z)({},i,{ref:this.getInstance,style:(0,c.Z)({},this.state.placeholderStyle,this.props.style),children:(0,m.jsx)("div",{className:a,style:this.state.affixStyle,children:r})}))}}]),t}(d.Component);x.defaultProps={prefixCls:"w-affix",onChange:u};var y=t(11026),g=t(57135),j=t.n(g),b=t(27791),w=t(4250),C=t(7510),N=!("undefined"===typeof window||!window.document||!window.document.createElement);function Z(e){var n=e.container,t=(0,d.useRef)(),r=(0,d.useRef)(n);return(0,d.useEffect)((function(){return function(){t.current&&r.current&&(r.current.removeChild(t.current),t.current=void 0)}}),[]),N?(r.current||(r.current=document.body),t.current||(t.current=document.createElement("div"),r.current.appendChild(t.current)),C.createPortal(e.children,t.current)):null}var k=["className","style","isOpen","prefixCls","usePortal","maskClosable","backdropProps","portalProps","hasBackdrop","unmountOnExit","timeout","transitionName","onOpening","onOpened","onClosing","onClosed","onClose","children","dialogProps"];function S(e){var n=e.className,t=e.style,r=(e.isOpen,e.prefixCls),i=void 0===r?"w-overlay":r,a=e.usePortal,o=void 0===a||a,l=e.maskClosable,f=void 0===l||l,h=e.backdropProps,p=void 0===h?{}:h,v=e.portalProps,x=void 0===v?{}:v,g=e.hasBackdrop,j=void 0===g||g,b=e.unmountOnExit,C=void 0===b||b,N=e.timeout,S=void 0===N?300:N,E=e.transitionName,M=void 0===E?"w-overlay":E,P=e.onOpening,B=void 0===P?u:P,z=e.onOpened,L=void 0===z?u:z,O=e.onClosing,D=void 0===O?u:O,R=e.onClosed,A=void 0===R?u:R,T=e.onClose,I=void 0===T?u:T,F=e.children,H=e.dialogProps,W=void 0===H?{}:H,V=(0,s.Z)(e,k),_=(0,d.useState)(),K=(0,y.Z)(_,2),Y=K[0],$=K[1],U=(0,d.useState)(!1),J=(0,y.Z)(U,2),G=J[0],q=J[1],X=(0,d.useRef)(null),Q=(0,d.useRef)(null);(0,d.useEffect)((function(){Y!==e.isOpen&&e.isOpen&&q(!0),Y===e.isOpen||e.isOpen||(te(),$(!1))}),[e.isOpen]),(0,d.useEffect)((function(){G&&(j&&o&&document.body.classList.add(i+"-open"),$(!0))}),[G]);var ee="object"===typeof F?(0,d.cloneElement)(F,(0,c.Z)({},W,{style:(0,c.Z)({},F.props.style,W.style),className:[F.props.className,i+"-content"].filter(Boolean).join(" ").trim(),tabIndex:0})):(0,m.jsx)("span",(0,c.Z)({},W,{className:i+"-content",children:F}));function ne(e){e.target!==X.current&&o||(f&&j&&(te(),$(!1),I&&I(e)),p&&p.onMouseDown&&p.onMouseDown(e))}function te(){j&&o&&document.body.classList.remove(i+"-open")}var re=(0,m.jsx)(w.Z,(0,c.Z)({classNames:M,unmountOnExit:C,timeout:S,in:Y,onEntering:B,onEntered:L,onExiting:D,onExited:function(e){q(!1),A&&A(e)}},V,{children:function(e){return(0,m.jsxs)("div",{style:t,ref:Q,className:[i,n,o?null:i+"-inline",Y?i+"-enter-done":null].filter(Boolean).join(" ").trim(),children:[j&&(0,d.cloneElement)((0,m.jsx)("div",{}),(0,c.Z)({},p,{onMouseDown:ne,className:[i+"-backdrop",p.className].filter(Boolean).join(" ").trim(),tabIndex:f?0:null})),o?(0,m.jsx)("div",{ref:X,onMouseDown:ne,className:i+"-container",children:(0,d.cloneElement)(ee,{"data-status":e})}):(0,d.cloneElement)(ee,{"data-status":e})]})}}));return G&&o?(0,m.jsx)(Z,(0,c.Z)({},(0,c.Z)({},x),{children:re})):re}var E=t(22193),M=["className","prefixCls","verticalAlign","tagName","color","type","spin"];function P(e){var n=e.className,t=e.prefixCls,r=void 0===t?"w-icon":t,i=e.verticalAlign,a=void 0===i?"middle":i,o=e.tagName,l=void 0===o?"span":o,u=e.color,f=e.type,h=e.spin,p=void 0!==h&&h,v=(0,s.Z)(e,M),x=null;if("string"===typeof f)x=(0,m.jsx)("svg",{fill:u,viewBox:"0 0 20 20",children:(E[f]||[]).map((function(e,n){return(0,m.jsx)("path",{d:e,fillRule:"evenodd"},n)}))});else{if(!d.isValidElement(f))return null;x=d.cloneElement(f,{fill:u})}v.style=(0,c.Z)({fill:"currentColor"},v.style);var y=(0,c.Z)({},v,{className:[r,n,r&&a?r+"-"+a:null,p&&r?r+"-spin":null].filter(Boolean).join(" ").trim()});return d.createElement(l,(0,c.Z)({},y),x)}var B=["prefixCls","disabled","active","loading","block","basic","htmlType","type","size","icon","className","children"],z=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-btn":t,i=e.disabled,a=void 0!==i&&i,o=e.active,l=void 0!==o&&o,u=e.loading,f=void 0!==u&&u,h=e.block,p=void 0!==h&&h,v=e.basic,x=void 0!==v&&v,y=e.htmlType,g=void 0===y?"button":y,j=e.type,b=void 0===j?"light":j,w=e.size,C=void 0===w?"default":w,N=e.icon,Z=e.className,k=e.children,S=(0,s.Z)(e,B),E=[Z,r,C?r+"-size-"+C:null,b?r+"-"+b:null,x?r+"-basic":null,f?r+"-loading":null,a||f?"disabled":null,l?"active":null,p?"block":null].filter(Boolean).join(" ").trim();return(0,m.jsxs)("button",(0,c.Z)({},S,{ref:n,type:g,disabled:a||f,className:E,children:[N&&(0,m.jsx)(P,{type:N}),k&&d.Children.map(k,(function(e){return e?d.isValidElement(e)?e:(0,m.jsx)("span",{children:e}):e}))]}))})),L=["title","children"];var O=["prefixCls","className","children","useButton","usePortal","autoFocus","isOpen","title","cancelText","cancelButtonProps","confirmButtonProps","content","confirmText","type","icon","maxWidth","minWidth","width","isCloseButtonShown","onCancel","onConfirm","bodyStyle"],D=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-modal":t,i=e.className,a=e.children,o=e.useButton,l=void 0===o||o,f=e.usePortal,h=void 0===f||f,p=e.autoFocus,v=void 0!==p&&p,x=(e.isOpen,e.title),g=e.cancelText,w=e.cancelButtonProps,C=e.confirmButtonProps,N=e.content,Z=e.confirmText,k=void 0===Z?"\u786e\u8ba4":Z,E=e.type,M=void 0===E?"light":E,B=e.icon,L=e.maxWidth,D=void 0===L?500:L,R=e.minWidth,A=void 0===R?320:R,T=e.width,I=e.isCloseButtonShown,F=void 0===I||I,H=e.onCancel,W=void 0===H?u:H,V=e.onConfirm,_=void 0===V?u:V,K=e.bodyStyle,Y=(0,s.Z)(e,O),$=(0,d.useState)(e.isOpen),U=(0,y.Z)($,2),J=U[0],G=U[1];(0,d.useEffect)((function(){e.isOpen!==J&&G(e.isOpen)}),[e.isOpen]);var q=(0,d.useState)(!1),X=(0,y.Z)(q,2),Q=X[0],ee=X[1],ne=[r,i,M?""+M:null].filter(Boolean).join(" ").trim();function te(e){return re.apply(this,arguments)}function re(){return(re=(0,b.Z)(j().mark((function e(n){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ee(!0),e.prev=1,e.t0=W,!e.t0){e.next=6;break}return e.next=6,W(n);case 6:e.next=10;break;case 8:e.prev=8,e.t1=e.catch(1);case 10:G(!1),ee(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function ie(){return(ie=(0,b.Z)(j().mark((function e(n){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ee(!0),e.prev=1,e.t0=_,!e.t0){e.next=6;break}return e.next=6,_(n);case 6:e.next=10;break;case 8:e.prev=8,e.t1=e.catch(1);case 10:G(!1),ee(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}return(0,m.jsx)(S,(0,c.Z)({usePortal:h,isOpen:J},Y,{onClose:function(){G(!1)},className:ne,children:(0,m.jsx)("div",{className:r+"-container",children:(0,m.jsxs)("div",{className:[r+"-inner",x?r+"-shown-title":null,B?r+"-shown-icon":null].filter(Boolean).join(" ").trim(),style:{maxWidth:D,minWidth:A,width:T},children:[(x||B)&&(0,m.jsxs)("div",{className:r+"-header",children:[B&&(0,m.jsx)(P,{type:B}),x&&(0,m.jsx)("h4",{children:x}),F&&(0,m.jsx)(z,{basic:!0,onClick:function(e){return te(e)},icon:"close",type:"light"})]}),(0,m.jsx)("div",{className:r+"-body",style:K,children:a||N}),l&&(0,m.jsxs)("div",{className:r+"-footer",children:[(0,m.jsx)(z,(0,c.Z)({autoFocus:v,type:M,loading:Q,disabled:Q},C,{onClick:function(e){return function(e){return ie.apply(this,arguments)}(e)},children:k})),g&&(0,m.jsx)(z,(0,c.Z)({},w,{onClick:function(e){return te(e)},children:g}))]})]})})}))}));D.show=function(e){var n=e.title,t=void 0===n?"\u63d0\u793a\u6846":n,r=e.children,i=(0,s.Z)(e,L),a=document.createElement("div");a.id="uiw-modal-call-show-element",document.body.appendChild(a),C.render((0,m.jsx)(R,(0,c.Z)({},i,{title:t,isOpen:!0,onClosed:function(){document.getElementById("uiw-modal-call-show-element").remove()},children:r})),document.getElementById("uiw-modal-call-show-element"))};var R=D,A=["prefixCls","className","width"],T=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-alert":t,i=n.className,a=n.width,o=void 0===a?400:a,l=(0,s.Z)(e,A),d=[r,i].filter(Boolean).join(" ").trim();return(0,m.jsx)(R,(0,c.Z)({},l,{width:o,className:d,children:e.children}))},I=["text"],F=/((?:https?:\/\/)?(?:(?:[a-z0-9]?(?:[a-z0-9\-]{1,61}[a-z0-9])?\.[^\.|\s])+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?\-\\(\\)]*)/gi,H=function(e){void 0===e&&(e={});var n=e.text,t=void 0===n?"":n,r=(0,s.Z)(e,I);return(0,m.jsx)(d.Fragment,{children:t.split(F).map((function(e,n){var t=e.match(F);if(t&&t[0]){var i=t[0];return(0,d.createElement)("a",(0,c.Z)({},r,{key:n,href:i.startsWith("http")?i:"http://"+i}),i)}return(0,m.jsx)(d.Fragment,{children:e},n)}))})},W=["prefixCls","shape","size","className","src","alt","icon","onError"],V=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-avatar":t,i=e.shape,a=void 0===i?"circle":i,o=e.size,l=void 0===o?"default":o,f=e.className,h=e.src,p=e.alt,v=e.icon,x=e.onError,g=void 0===x?u:x,j=(0,s.Z)(e,W),b=e.children,w=(0,d.useState)(!0),C=(0,y.Z)(w,2),N=C[0],Z=C[1],k=[r,f,l?r+"-"+l:null,a?r+"-"+a:null,h?r+"-image":null].filter(Boolean).join(" ").trim();return(0,d.useEffect)((function(){Z(!0)}),[e.src]),N&&h?b=(0,m.jsx)("img",{src:h,alt:p,onError:function(e){!1!==(g?g(e):void 0)&&Z(!1)}}):v&&"string"===typeof v?b=(0,m.jsx)(P,{type:v}):v&&d.isValidElement(v)&&(b=v),(0,m.jsx)("span",(0,c.Z)({},j,{className:k,ref:n,children:b}))}));function _(){var e=0;return document&&document.documentElement&&document.documentElement.scrollTop?e=document.documentElement.scrollTop:document.body&&(e=document.body.scrollTop),e}var K=["prefixCls","className","content","children","offsetTop","fixed","speed","showBelow","clickable"],Y=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-back-top":t,i=e.className,a=e.content,o=e.children,l=e.offsetTop,u=void 0===l?0:l,f=e.fixed,h=void 0===f||f,p=e.speed,v=void 0===p?100:p,x=e.showBelow,g=void 0===x?1:x,j=e.clickable,b=void 0===j||j,w=(0,s.Z)(e,K),C=h&&g||0,N=(0,d.useState)(0),Z=(0,y.Z)(N,2),k=Z[0],S=Z[1],E=(0,d.useState)(0),M=(0,y.Z)(E,2),P=M[0],B=M[1],z=k>=C,L=[r,i,h?null:"no-fixed",z?r+"-show":null,z?null:r+"-hide"].filter(Boolean).join(" ").trim();function O(){S(function(e){void 0===e&&(e=0);var n=0;return e<_()&&(n=Math.round((_()-e)/(document.body.scrollHeight-e-window.innerHeight)*100)),n>100?100:n}(u)),B(_())}function D(){"number"===typeof u&&"number"===typeof v&&"number"===typeof P&&function(e,n,t){void 0===e&&(e=0),void 0===n&&(n=100),void 0===t&&(t=0);var r=0,i=setInterval((function(){t-r>=e?t-(r+=n)>=e?window.scrollTo(0,t-r):window.scrollTo(0,e):clearInterval(i)}),0)}(u,v,P)}return(0,d.useEffect)((function(){return window&&window.addEventListener("scroll",O),function(){window&&window.removeEventListener("scroll",O)}})),(0,m.jsxs)("div",(0,c.Z)({onClick:function(){return b&&D()},className:L},w,{ref:n,children:[a,"function"!==typeof o?o:o({percent:k,current:P,scrollToTop:D})]}))})),$=["prefixCls","className","style","color","max","dot","processing","count","children"],U=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-badge":t,i=e.className,a=e.style,o=void 0===a?{}:a,l=e.color,d=e.max,u=void 0===d?99:d,f=e.dot,h=void 0!==f&&f,p=e.processing,v=void 0!==p&&p,x=e.count,y=e.children,g=(0,s.Z)(e,$),j={className:[h?null:r+"-count",h?"dot":null].filter(Boolean).join(" ").trim(),style:{}},b=[i,r,y?null:"nowrap",y?null:r+"-status",v?r+"-processing":null].filter(Boolean).join(" ").trim(),w={};return x||0===x?j.style=(0,c.Z)({backgroundColor:l},o):w.style=o||{},(0,m.jsxs)("span",(0,c.Z)({className:b},g,w,{ref:n,children:[l&&(0,m.jsx)("span",{className:r+"-dot",style:{backgroundColor:l}}),y,0!==x&&!l&&(0,m.jsx)("sup",(0,c.Z)({},j,{children:!h&&x&&u&&x>u?u+"+":x}))]}))})),J=["prefixCls","className","tagName","active","separator"],G=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-breadcrumb":t,i=e.className,a=e.tagName,o=void 0===a?"span":a,l=e.active,u=e.separator,f=(0,s.Z)(e,J),h=d.isValidElement(u),p=[r+"-item",i,l?"active":null,u?null:"no-separator",h?"no-before":null].filter(Boolean).join(" ").trim(),v=(0,c.Z)({className:p},f);return h||(v["data-separator"]=u),d.createElement(o,(0,c.Z)({},v,{ref:n}),(0,m.jsxs)(d.Fragment,{children:[h&&(0,m.jsx)("span",{className:r+"-separator",children:u}),e.children]}))})),q=["prefixCls","className","separator"],X=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-breadcrumb":t,i=e.className,a=e.separator,o=void 0===a?"/":a,l=(0,s.Z)(e,q),u=[r,i].filter(Boolean).join(" ").trim();return(0,m.jsx)("div",(0,c.Z)({},(0,c.Z)({className:u},l),{ref:n,children:d.Children.map(e.children,(function(e){return d.cloneElement(e,Object.assign({separator:o},e.props,{}))}))}))}));X.Item=G;var Q=X,ee=["prefixCls","vertical","children","className"],ne=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-btn-group":t,i=e.vertical,a=void 0!==i&&i,o=e.children,l=e.className,d=(0,s.Z)(e,ee),u=[r,l,a&&r+"-vertical"].filter(Boolean).join(" ").trim();return(0,m.jsx)("div",(0,c.Z)({className:u},d,{ref:n,children:o}))})),te=t(89437),re=t(60726);function ie(e,n){if(n)do{if(n===e)return!0}while(n=n.parentNode);return!1}function ae(e){return"function"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}var oe=!("undefined"===typeof window||!window.document||!window.document.createElement)?function(e,n){return e&&e.contains&&"function"===typeof e.contains&&ae(n)?e.contains(n):e&&e.compareDocumentPosition&&ae(n)?e===n||!!e.compareDocumentPosition(n):ie(e,n)}:ie;function le(e,n){var t="x"===n?"Left":"Top",r="Left"===t?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+r+"Width"])}var se="undefined"!==typeof window&&"undefined"!==typeof document,ce=se&&!(!window.MSInputMethodContext||!document.documentMode),de=se&&/MSIE 10/.test(navigator.userAgent);function ue(e){return 11===e?ce:10===e?de:ce||de}function fe(e,n,t,r){return Math.max(n["offset"+e],n["scroll"+e],t["client"+e],t["offset"+e],t["scroll"+e],ue(10)?parseInt(t["offset"+e],10)+parseInt(r["margin"+("Height"===e?"Top":"Left")],10)+parseInt(r["margin"+("Height"===e?"Bottom":"Right")],10):0)}function he(e){var n={};try{if(ue(10)){n=e.getBoundingClientRect();var t=f(e,!0),r=f(e);n.top+=t,n.left+=r,n.bottom+=t,n.right+=r}else n=e.getBoundingClientRect()}catch(p){}var i,a={left:n.left,top:n.top,width:n.right-n.left,height:n.bottom-n.top},o="HTML"===e.nodeName?function(e){var n=e.body,t=e.documentElement,r=getComputedStyle(t);return{height:fe("Height",n,t,r),width:fe("Width",n,t,r)}}(e.ownerDocument):{},l=o.width||e.clientWidth||a.right-a.left,s=o.height||e.clientHeight||a.bottom-a.top,d=e.offsetWidth-l,u=e.offsetHeight-s;if(a.offsetLeft=e.offsetLeft||e.scrollLeft||0,a.offsetTop=e.offsetTop||e.offsetTop||0,d||u){var h=function(e,n){if(1!==e.nodeType)return[];var t=e.ownerDocument.defaultView.getComputedStyle(e,null);return n?t[n]:t}(e);d-=le(h,"x"),u-=le(h,"y"),a.width-=d,a.height-=u}return i=a,(0,c.Z)({},i,{right:i.left+i.width,bottom:i.top+i.height})}function pe(e){var n=e.getBoundingClientRect();return{width:e.offsetWidth||e.scrollWidth||n.width||0,height:e.offsetHeight||e.scrollHeight||n.height||0}}function me(e){var n=e||{},t=n.trigger,r=n.popup,i=n.placement,a=n.usePortal,o=n.autoAdjustOverflow,l={left:0,top:0,placement:i};if(!t||!r||!document)return l;var s=Math.max(document.documentElement.clientHeight,window.innerHeight||0),d=Math.max(document.documentElement.clientWidth,window.innerWidth||0);l.placement=i;var u=f(t.ownerDocument.documentElement,!0),h=f(t.ownerDocument.documentElement),p=(0,c.Z)({},he(t),pe(t)),m=(0,c.Z)({},he(r),pe(r)),v=s-p.bottom,x=d-p.left-p.width;switch(l.top=p.top+u,l.left=p.left,a||(l.top=p.offsetTop,l.left=p.offsetLeft),i&&/^(top)/.test(i)&&(l.top-=m.height),i&&/^(right)/.test(i)&&(l.left+=p.width),i&&/^(bottom)/.test(i)&&(l.top+=p.height),i&&/^(left)/.test(i)&&(l.left-=m.width),l.placement){case"bottomLeft":case"topLeft":case"rightTop":case"leftTop":default:break;case"bottom":case"top":l.left=l.left-(m.width-p.width)/2;break;case"bottomRight":case"topRight":l.left=l.left+h+p.width-m.width;break;case"right":case"left":l.top=l.top-(m.height-p.height)/2;break;case"rightBottom":case"leftBottom":l.top=l.top-m.height+p.height}return o&&(i&&/^(top)/.test(i)&&p.topm.height&&(l.placement=i.replace(/^top/,"bottom"),l.top=l.top+m.height+p.height),i&&/^(bottom)/.test(i)&&vm.height&&(l.placement=i.replace(/^bottom/,"top"),l.top=l.top-m.height-p.height),i&&/^(right)/.test(i)&&x0){var e,n=(0,re.Z)(O.current);try{for(n.s();!(e=n.n()).done;){var t=e.value;window.clearTimeout(t)}}catch(r){n.e(r)}finally{n.f()}O.current=[]}}function G(){J(),D.current="show";var n=xe(e.delay);if(n.show){var t=window.setTimeout((function(){"show"===D.current&&ee()}),n.show);O.current.push(t)}else ee()}function q(n){if(J(),n||!e.isOutside){D.current="hide";var t=xe(e.delay);if(t.hide){var r=window.setTimeout((function(){"hide"===D.current&&Q()}),t.hide);O.current.push(r)}else Q()}}function X(e,n,t){var r=n.currentTarget,i=n.relatedTarget||n.nativeEvent[t],a=!0;(L.current&&oe(L.current,i)||z.current&&oe(z.current,i))&&(a=!1),i&&i===r||oe(r,i)||e(a,n)}function Q(){T&&(B.current-=1,I(!1))}function ee(){T||(B.current+=1,I(!0))}return"click"!==x||p||(Y.onClick=function(e){var n=(_&&d.isValidElement(_)?_.props:{}).onClick;T?Q():ee(),n&&n(e,!T)}),"focus"!==x||p||(Y.onFocus=function(){return G()}),"hover"!==x||p||(Y.onMouseOver=Y.onMouseEnter=function(e){X(G,e,"fromElement")},Y.onMouseOut=Y.onMouseLeave=function(e){X(q,e,"toElement")},K.dialogProps&&(K.dialogProps.onMouseLeave=function(e){X(q,e,"toElement")})),K.style=(0,c.Z)({},K.style,W),(0,m.jsxs)(d.Fragment,{children:[(0,d.cloneElement)(_,Object.assign({},_.props,(0,c.Z)({},Y,{ref:z,className:[_.props.className,p?i+"-disabled":null].filter(Boolean).join(" ").trim()}))),(0,m.jsx)(S,(0,c.Z)({},K,{style:(0,c.Z)({},K.style,W),onEnter:function(e,n){M&&M(e,n);var t=me({placement:W.placement||j,trigger:z.current,popup:L.current,usePortal:o,autoAdjustOverflow:b});V((0,c.Z)({},t,{zIndex:B.current}))},className:[i,t,W.placement].filter(Boolean).join(" ").trim(),usePortal:o,transitionName:w,isOpen:T,hasBackdrop:!1,children:(0,d.cloneElement)(N,Object.assign((0,c.Z)({},N.props,{ref:L,className:[N.props&&N.props.className,j].filter(Boolean).join(" ").trim()})))}))]})})),ge=["prefixCls","className","content","visibleArrow"],je=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(){var e;return(0,r.Z)(this,t),(e=n.apply(this,arguments)).renderArrow=function(){var n=e.props.prefixCls;return(0,m.jsx)("div",{className:n+"-arrow",children:(0,m.jsxs)("svg",{viewBox:"0 0 30 30",children:[(0,m.jsx)("path",{fillOpacity:"0.2",d:"M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z"}),(0,m.jsx)("path",{fill:"#fff",d:"M8.787 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z"})]})})},e}return(0,i.Z)(t,[{key:"render",value:function(){var e=this.props,n=e.prefixCls,t=e.className,r=e.visibleArrow,i=(0,s.Z)(e,ge),a=[n,t,r?null:"no-arrow"].filter(Boolean).join(" ").trim();return(0,m.jsx)(ye,(0,c.Z)({},i,{overlay:(0,m.jsxs)("div",{className:a,children:[r&&this.renderArrow(),(0,m.jsx)("div",{className:n+"-inner",children:this.props.content})]}),children:"object"===typeof this.props.children&&"Icon"!==this.props.children.type.name?this.props.children:(0,m.jsx)("span",{style:{display:"block",writingMode:"vertical-rl"},children:this.props.children})}))}}]),t}(d.Component);je.defaultProps={prefixCls:"w-popover",placement:"top",usePortal:!0,isOpen:!1,visibleArrow:!0};var be=["className","min","max","step","overLimitColor","keyboard","formatter","prefixCls"],we=d.forwardRef((function(e,n){var t=e.className,r=e.min,i=e.max,a=e.step,o=e.overLimitColor,l=(e.keyboard,e.prefixCls),u=void 0===l?"w-input-number":l,f=(0,s.Z)(e,be),h=(0,d.useMemo)((function(){var n;return Number.parseFloat(null==(n=e.value||0)?void 0:n.toString())}),[e.value]),p=(0,d.useState)(j(h)),v=(0,y.Z)(p,2),x=v[0],g=v[1];function j(e){return"number"===typeof r&&ei}var b=(0,d.useMemo)((function(){if(!o)return{min:r,max:i}}),[]),w=[u,t].filter(Boolean).join(" ").trim(),C=(0,d.useMemo)((function(){return x?{color:null==o?void 0:o.toString()}:void 0}),[x]);return(0,m.jsx)(Ne,(0,c.Z)({},f,{className:w,type:"number",inputStyle:C,onChange:function(n){var t=j(Number.parseFloat(n.target.value));g(t),null==e.onChange||e.onChange(n)},step:a},b))})),Ce=["prefixCls","className","style","size","type","preIcon","addonAfter","inputStyle"],Ne=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-input":t,i=e.className,a=e.style,o=e.size,l=void 0===o?"default":o,u=e.type,f=void 0===u?"text":u,h=e.preIcon,p=void 0===h?null:h,v=e.addonAfter,x=e.inputStyle,y=(0,s.Z)(e,Ce),g=d.useRef(null),j=d.useRef(null);(0,d.useImperativeHandle)(n,(function(){return g.current}));var b=[r,i,l?r+"-"+l:null,v?r+"-addon":null,e.disabled?"disabled":null].filter(Boolean).join(" ").trim();return(0,d.useEffect)((function(){!function(){if(j.current&&g.current){var e=window&&window.getComputedStyle(j.current,null);g.current.style.paddingRight=j.current.clientWidth+2*parseInt(e.right,10)+"px"}}()})),(0,m.jsxs)("div",{className:b,style:a,children:[(0,m.jsx)(P,{type:p}),(0,m.jsx)("input",(0,c.Z)({ref:g,type:f,autoComplete:"off"},y,{style:x,className:r+"-inner"})),v&&(0,m.jsx)("span",{className:r+"-addon-after",ref:j,children:v})]})})),Ze=t(649),ke=["prefixCls","className","count","date","type","disabledHours","disabledMinutes","disabledSeconds","hideDisabled","onSelected"];function Se(e){var n=e.prefixCls,t=void 0===n?"w-timepicker":n,r=e.count,i=void 0===r?24:r,a=e.date,o=e.type,l=void 0===o?"Hours":o,u=e.hideDisabled,f=e.onSelected,h=(0,s.Z)(e,ke),p=(0,d.useRef)([]);function v(n){var t=e["disabled"+l];return!!t&&t(n,l,new Date(a))}var x=(0,d.useMemo)((function(){return(0,Ze.Z)(Array(i)).map((function(e,n){return v(n)&&p.current.push(n),{count:n,disabled:v(n)}})).filter((function(e){return!u||!e.disabled}))}),[u]);return(0,m.jsx)("div",(0,c.Z)({className:t+"-spinner"},h,{children:(0,m.jsx)("ul",{children:x.map((function(e,n){var t={};e.disabled||(t.onClick=function(n){return function(e,n){if(a){var t=new Date(a);t["set"+l](e),f&&f(l,e,p.current,t)}}(e.count)});var r=a&&l?new Date(a)["get"+l]():0;return(0,m.jsx)("li",(0,c.Z)({"data-index":r===e.count?n:void 0,ref:function(e){return e&&function(e){if(e&&e.parentNode&&e.dataset.index){var n=Number(e.dataset.index)*e.clientHeight;e.parentNode.parentNode&&(e.parentNode.parentNode.scrollTop=n)}}(e)}},t,{className:[e.disabled?"disabled":null,r===e.count?"selected":null,u&&e.disabled?"hide":null].filter(Boolean).join(" ").trim(),children:e.count<10?"0"+e.count:e.count}),n)}))})}))}var Ee=["prefixCls","className","precision"];function Me(e){var n=e.prefixCls,t=void 0===n?"w-timepicker":n,r=e.className,i=e.precision,a=void 0===i?"second":i,o=(0,s.Z)(e,Ee);return(0,m.jsxs)("div",{className:[t,r].filter(Boolean).join(" ").trim(),children:[/^(second|minute|hour)$/.test(a)&&(0,m.jsx)(Se,(0,c.Z)({type:"Hours",count:24},o)),/^(second|minute)$/.test(a)&&(0,m.jsx)(Se,(0,c.Z)({type:"Minutes",count:60},o)),/^(second)$/.test(a)&&(0,m.jsx)(Se,(0,c.Z)({type:"Seconds",count:60},o))]})}var Pe=["prefixCls","className","disabled","value","format","popoverProps","allowClear","onChange","disabledHours","disabledMinutes","disabledSeconds","hideDisabled","precision"];function Be(e){var n=e.prefixCls,t=void 0===n?"w-timepicker":n,r=e.className,i=e.disabled,a=e.format,o=void 0===a?"HH:mm:ss":a,l=e.popoverProps,u=e.allowClear,f=void 0===u||u,h=e.onChange,p=e.disabledHours,v=e.disabledMinutes,x=e.disabledSeconds,g=e.hideDisabled,j=e.precision,b=(0,s.Z)(e,Pe),w=(0,d.useState)(e.value),C=(0,y.Z)(w,2),N=C[0],Z=C[1];(0,d.useEffect)((function(){return Z(e.value)}),[e.value]);var k={disabledHours:p,disabledMinutes:v,disabledSeconds:x,hideDisabled:g,precision:j},S=N?(0,te.Z)(o,new Date(N)):"",E=N||new Date,M=(0,c.Z)({},b,{value:S});return f&&""!==S&&S&&(M.addonAfter=(0,m.jsx)(z,{className:t+"-close-btn",icon:"close",disabled:e.disabled,onClick:function(){Z(void 0),h&&h()},size:e.size,basic:!0,type:"light"})),(0,m.jsx)(je,(0,c.Z)({trigger:"focus",placement:"bottomLeft",autoAdjustOverflow:!0,visibleArrow:!1},l,{content:(0,m.jsx)(Me,(0,c.Z)({className:t+"-popover"},k,{date:E,onSelected:function(e,n,t,r){Z(new Date(r));var i=r?(0,te.Z)(o,r):"";h&&h(i,r,e,n,t)}})),children:(0,m.jsx)(Ne,(0,c.Z)({placeholder:"\u8bf7\u9009\u62e9\u65f6\u95f4",readOnly:!0,disabled:i},M,{className:[t+"-input",r].filter(Boolean).join(" ").trim()}))}))}var ze=["date","row","col","index","today","panelDate","disabledDate","renderDay","onSelectDay"],Le=["prefixCls","className","weekday","weekTitle","date","today","panelDate","disabledDate","renderDay","onSelectDay"];function Oe(e){return Object.keys(e||{}).map((function(n){return e[n]?n:null})).filter(Boolean).join(" ").trim()}function De(e){var n=e.date,t=e.col,r=e.index,i=e.today,a=e.panelDate,o=e.disabledDate,l=e.renderDay,u=e.onSelectDay,f=(0,s.Z)(e,ze),h={end:0===t||6===t,prev:!1,today:!1,selected:!1,next:!1,disabled:!1},p=a;p&&function(e){return e instanceof Date&&!isNaN(e.getTime())}(p)||(p=new Date);var v=p.getFullYear(),x=p.getMonth(),y=(0,d.useMemo)((function(){return new Date(new Date(p).setDate(1)).getDay()}),[p.toDateString()]),g=(0,d.useMemo)((function(){return new Date(v,0===x?12:x+1,0).getDate()}),[p.toDateString()]),j=r;p&&((j=j-y+1)<1&&(h.prev=!0),j>g&&(h.next=!0));var b=new Date(new Date(p).setDate(j));i&&i.toDateString()===b.toDateString()&&(h.today=!0),n&&n.toDateString()===b.toDateString()&&(h.selected=!0);var w={onClick:function(){var e=b.getMonth();u&&u(b,{year:b.getFullYear(),month:0===e?12:e+1,day:b.getDate()})}};return o&&o(b,(0,c.Z)({},e,h))&&(h.disabled=!0,delete w.onClick),(0,m.jsx)("div",(0,c.Z)({className:Oe(h)},f,w,{children:l?l(b.getDate(),(0,c.Z)({},e,h,{date:b})):(0,m.jsx)("div",{children:b.getDate()})}))}var Re=["\u661f\u671f\u5929","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],Ae=["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];function Te(e){var n=e.prefixCls,t=void 0===n?"w-datepicker":n,r=e.className,i=e.weekday,a=void 0===i?Ae:i,o=e.weekTitle,l=void 0===o?Re:o,u=e.date,f=e.today,h=e.panelDate,p=e.disabledDate,v=e.renderDay,x=e.onSelectDay,y=(0,s.Z)(e,Le),g=(0,d.useMemo)((function(){return(0,m.jsx)("div",{className:t+"-weekday",children:(a||[]).map((function(e,n){return(0,m.jsx)("div",{className:Oe({end:0===n||6===n}),title:l&&l[n],children:e},n)}))})}),[t,a,l]);return(0,m.jsxs)("div",(0,c.Z)({},y,{className:[t?t+"-body":null,r].filter(Boolean).join(" ").trim(),children:[g,(0,m.jsx)("div",{className:[t?t+"-day-body":null].filter(Boolean).join(" ").trim(),children:(0,Ze.Z)(Array(6)).map((function(e,n){return(0,m.jsx)("div",{className:t+"-week",children:(0,Ze.Z)(Array(7)).map((function(e,t){return(0,m.jsx)(De,{date:u,today:f,disabledDate:p,renderDay:v,panelDate:h,col:t,row:n,onSelectDay:function(e,n){x&&x(e,n)},index:7*n+t},t)}))},n)}))})]}))}var Ie=["prefixCls","className","panelDate","monthLabel","onSelected"];function Fe(e){var n=e.prefixCls,t=void 0===n?"w-datepicker":n,r=e.className,i=e.panelDate,a=void 0===i?new Date:i,o=e.monthLabel,l=e.onSelected,d=void 0===l?u:l,f=(0,s.Z)(e,Ie);return(0,m.jsx)("div",(0,c.Z)({className:[t?t+"-month":null,r].filter(Boolean).join(" ").trim()},f,{children:(0,Ze.Z)(Array(12)).map((function(e,n){var t=a.getMonth();return(0,m.jsx)("div",{className:[t===n?"selected":null].filter(Boolean).join(" ").trim(),children:(0,m.jsx)("span",{onClick:function(){return d(n,!1)},children:o&&o[n]||n})},n)}))}))}var He=["prefixCls","panelNum","className","panelDate","onSelected"];function We(e){var n=e.prefixCls,t=void 0===n?"w-datepicker":n,r=e.panelNum,i=void 0===r?[-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10]:r,a=e.className,o=e.onSelected,l=void 0===o?u:o,f=(0,s.Z)(e,He),h=(0,d.useState)(e.panelDate),p=(0,y.Z)(h,2),v=p[0],x=p[1];return(0,m.jsx)("div",(0,c.Z)({className:[t?t+"-year":null,a].filter(Boolean).join(" ").trim()},f,{children:i&&i.map((function(e,n){var t=v.getFullYear(),r=t+i[n];return(0,m.jsx)("div",{className:[t===r?"selected":null,0===n||n===i.length-1?"paging":null].filter(Boolean).join(" ").trim(),children:(0,m.jsx)("span",{onClick:function(){return function(e,n){if(0===n||n===i.length-1){var t=new Date(v);t.setFullYear(e),x(t),l(e,!0)}else l(e)}(r,n)},children:r})},n)}))}))}var Ve=["prefixCls","className","panelDate","monthLabel","onSelected","todayButton"];function _e(){for(var e=arguments.length,n=new Array(e),t=0;t0&&a.map((function(e,n){var t=e.label,r=(0,s.Z)(e,Je);return(0,m.jsx)("div",(0,c.Z)({},r,{children:t}),n)}))})]})}),[a,t])}var qe=["prefixCls","className","style","today","date","data","monthLabel","titleFormat","todayLabel","panelDate","onPaging","onSelectDay"];function Xe(e){var n=e.prefixCls,t=void 0===n?"w-calendar":n,r=e.className,i=e.style,a=e.today,o=void 0===a?new Date:a,l=e.date,u=e.data,f=(e.monthLabel,e.titleFormat),h=void 0===f?"YYYY/MM":f,p=e.todayLabel,v=void 0===p?"\u4eca\u5929":p,x=e.onPaging,g=e.onSelectDay,j=(0,s.Z)(e,qe),b=[t,r].filter(Boolean).join(" ").trim(),w=(0,d.useState)(e.panelDate||new Date),C=(0,y.Z)(w,2),N=C[0],Z=C[1];function k(e){var n=new Date;if("today"===e)n=o||new Date;else{var t=N.getMonth();N&&"prev"===e&&N.setMonth(t-1),N&&"next"===e&&N.setMonth(t+1),n=N}Z(new Date(n)),x&&x(e,n.getMonth()+1,n)}(0,d.useEffect)((function(){e.panelDate!==N&&Z(N)}),[e.panelDate]);var S=(0,d.useMemo)((function(){return(0,m.jsx)("div",{className:t+"-title",children:(0,te.Z)(h,N)})}),[t,h,N]),E=(0,d.useMemo)((function(){return(0,m.jsxs)("div",{className:t+"-btn-group",children:[(0,m.jsx)(P,{type:"down",onClick:function(){return k("prev")}}),(0,m.jsx)("span",{className:t+"-btn",onClick:function(){return k("today")},children:v}),(0,m.jsx)(P,{type:"down",onClick:function(){return k("next")}})]})}),[t,v]);return(0,m.jsxs)("div",{className:b,style:i,children:[(0,m.jsxs)("div",{className:t+"-caption",children:[S,E]}),(0,m.jsx)(Te,(0,c.Z)({onSelectDay:function(e,n){Z(e),g&&g(e,n)},renderDay:function(e,n){return(0,m.jsx)(Ge,{prefixCls:t,day:e,data:u,currentDate:n.date})},date:l,today:o,panelDate:N||new Date},j))]})}var Qe=["prefixCls","className","title","extra","footer","bordered","noHover","active","bodyStyle","bodyClassName","children"],en=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-card":t,i=e.className,a=e.title,o=e.extra,l=e.footer,u=e.bordered,f=void 0===u||u,h=e.noHover,p=void 0!==h&&h,v=e.active,x=void 0!==v&&v,y=e.bodyStyle,g=e.bodyClassName,j=e.children,b=(0,s.Z)(e,Qe),w=(0,d.useMemo)((function(){return[r,i,f?r+"-bordered":null,p?r+"-no-hover":null,x?"active":null].filter(Boolean).join(" ").trim()}),[r,i,f,p]);return(0,m.jsxs)("div",(0,c.Z)({},b,{className:w,ref:n,children:[(a||o)&&(0,m.jsxs)("div",{className:r+"-head",children:[a&&(0,m.jsx)("div",{className:r+"-head-title",children:a}),o&&(0,m.jsx)("div",{className:r+"-extra",children:o})]}),j&&(0,m.jsx)("div",{className:[r+"-body",g].filter(Boolean).join(" ").trim(),style:y,children:j}),l&&(0,m.jsx)("div",{className:r+"-footer",children:l})]}))}));function nn(e,n){var t=e.position,r=void 0===t?0:t,i=e.direction,a=void 0===i?"horizontal":i,o=e.width,l=void 0===o?400:o,s=e.height,u=void 0===s?200:s,f=e.palyTime,h=void 0===f?2e3:f,p=e.scrollTime,v=void 0===p?200:p,x=e.autoPlay,g=void 0===x||x,j=e.afterChange,b=e.beforeChange,w=e.prefixCls,C=void 0===w?"w-carousel":w,N=e.className,Z=e.style,k=(0,d.useMemo)((function(){return[C,N].filter(Boolean).join(" ").trim()}),[C,N]),S=(0,d.useState)(r),E=(0,y.Z)(S,2),M=E[0],P=E[1],B=(0,d.useState)(.001*v+"s ease-in-out"),z=(0,y.Z)(B,2),L=z[0],O=z[1],D=(0,d.useRef)(M),R=d.Children.count(e.children)+1,A=(0,d.useRef)({stop:function(){},after:j,before:b});d.useImperativeHandle(n,(function(){return{gotoSlide:T,prevSlide:function(){return T(D.current-1)},nextSlide:function(){return T(D.current+1)},stopPlay:function(){return A.current.stop()}}}),[n]);var T=function(e){A.current.stop();var n=R-1,t=e>n?n:e;t=e<0?0:t,D.current=t,P(t),I()},I=function(e){if(void 0===e&&(e=h),g){var n=setInterval((function(){null==A.current.after||A.current.after(D.current),D.current++,D.current>=R&&(D.current=0),P(D.current),null==A.current.before||A.current.before(D.current)}),e);A.current.stop=function(){clearInterval(n)}}};(0,d.useEffect)((function(){return I(),function(){A.current.stop()}}),[g]),(0,d.useEffect)((function(){var n;return R===M+1&&(n=setTimeout((function(){A.current.before=function(){O(.001*v+"s ease-in-out"),A.current.before=e.beforeChange},O("none"),T(0)}),v)),function(){clearTimeout(n)}}),[M]);var F=d.Children.map(e.children,(function(e){return(0,m.jsx)("div",{style:(0,c.Z)({width:l,height:u},Z),children:e})})),H=(0,d.useMemo)((function(){var e={transform:"",display:""};switch(a){case"horizontal":e.transform="translate3d("+-M*l+"px, 0px, 0px)",e.display="flex";break;case"vertical":e.transform="translate3d(0px, "+-M*u+"px, 0px)",e.display="block"}return e}),[a,M,l,u]);return(0,m.jsx)("div",{className:k,style:{width:l,height:u},children:(0,m.jsxs)("div",{className:k+"-content",style:(0,c.Z)({width:l*R,transition:L},H),children:[F,(0,m.jsx)("div",{style:(0,c.Z)({width:l,height:u},Z),children:null==F?void 0:F[0]})]})})}var tn=d.forwardRef(nn),rn=["prefixCls","placement","className","menu","children","disabled"];function an(e){var n=e.prefixCls,t=void 0===n?"w-dropdown":n,r=e.placement,i=void 0===r?"bottomLeft":r,a=e.className,o=e.menu,l=e.children,u=e.disabled,f=(0,s.Z)(e,rn),h=(0,d.useMemo)((function(){return[t,a].filter(Boolean).join(" ").trim()}),[t,a]);return(0,m.jsx)(ye,(0,c.Z)({isOutside:!0,autoAdjustOverflow:!0,className:h,disabled:u,placement:i},f,{overlay:o,children:d.cloneElement(l,Object.assign({},l.props))}))}var on=["prefixCls","className","tagName","children","disabled","multiline","icon","text","active","addonAfter","isSubMenuItem"],ln={href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1};function sn(e,n){var t=e.prefixCls,r=void 0===t?"w-menu-item":t,i=e.className,a=e.tagName,o=void 0===a?"a":a,l=e.disabled,u=void 0!==l&&l,f=e.multiline,h=void 0!==f&&f,p=e.icon,v=e.text,x=e.active,y=void 0!==x&&x,g=e.addonAfter,j=e.isSubMenuItem,b=(0,s.Z)(e,on),w=[r,y?"active":null,u?"w-disabled":null,i].filter(Boolean).join(" ").trim(),C=d.createElement(o,(0,c.Z)({},b,u?ln:{},{className:w,ref:n}),(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)(P,{className:r+"-icon",type:p}),(0,m.jsx)("div",{className:[r&&r+"-text",!h&&r+"-multiline"].filter(Boolean).join(" ").trim(),children:v}),g]}));return j?C:(0,m.jsxs)("li",{children:[" ",C," "]})}var cn=d.forwardRef(sn);cn.displayName="uiw.MenuItem";var dn=["prefixCls","className","title"],un=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-menu-divider":t,i=e.className,a=e.title,o=(0,s.Z)(e,dn),l=[r,i].filter(Boolean).join(" ").trim();return a?(0,m.jsx)("li",(0,c.Z)({},o,{ref:n,className:l,"data-menu":"divider",children:(0,m.jsx)("strong",{children:a})})):(0,m.jsx)("li",(0,c.Z)({},o,{ref:n,className:l}))}));un.displayName="uiw.MenuDivider";var fn=["prefixCls","className","disabled","overlayProps","children","collapse","inlineIndent","inlineCollapsed"];function hn(e){var n=e.prefixCls,t=e.collapse,r=e.isOpen;return(0,d.useMemo)((function(){return(0,m.jsx)(P,{type:"caret-right",className:[n?n+"-collapse-icon":null,!t&&r?"w-open":null,t||r?null:"w-close"].filter(Boolean).join(" ").trim()})}),[n,t,r])}var pn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-menu-subitem":t,i=e.className,a=e.disabled,o=e.overlayProps,l=void 0===o?{}:o,u=e.children,f=e.collapse,h=void 0!==f&&f,p=e.inlineIndent,v=(0,s.Z)(e,fn),x={},g={bordered:!0,children:u,inlineIndent:p,className:[r?r+"-overlay":null].filter(Boolean).join(" ").trim()},j=d.useRef(null),b=(0,d.useState)(!!l.isOpen),w=(0,y.Z)(b,2),C=w[0],N=w[1];return(0,d.useMemo)((function(){h&&N(!1)}),[h]),h?(x.className=r+"-popup",x.trigger="hover",x.usePortal=!0,g.onClick=function(e){var n=e.currentTarget,t=e.relatedTarget||e.nativeEvent.target;n.children.length<1||function(e){var n=!1;if(e)do{e.dataset.menu||(n=!0),e.dataset.menu&&/^(subitem|divider)$/.test(e.dataset.menu)&&(n=!1)}while(!e.dataset.menu&&(e=e.parentNode));return n}(t)&&j.current&&j.current.hide()}):(delete g.onClick,g.bordered=!1,x.className=r+"-collapse",x.appear=!1,x.isOutside=!0,x.isClickOutside=!1,x.unmountOnExit=!1,x.trigger="click",x.transitionName=""+r,x.onExit=function(e){e.style.height=e.scrollHeight+"px",N(!1)},x.onExiting=function(e){e.style.height="0px"},x.onEnter=function(e){e.style.height="1px",N(!0)},x.onEntered=function(e){e.style.height="initial"},x.onEntering=function(e){e.style.height=e.scrollHeight+"px"}),(0,m.jsx)("li",{"data-menu":"subitem",ref:n,children:(0,m.jsx)(ye,(0,c.Z)({placement:"rightTop",autoAdjustOverflow:!0,disabled:a,isOpen:C,usePortal:!1,isOutside:!0},x,l,{ref:j,overlay:(0,m.jsx)(xn,(0,c.Z)({},g,{style:h?{}:{paddingLeft:p}})),children:(0,m.jsx)(cn,(0,c.Z)({},v,{ref:null,disabled:a,isSubMenuItem:!0,addonAfter:(0,m.jsx)(hn,{collapse:h,prefixCls:r,isOpen:C}),className:[r?r+"-title":null,h?null:r+"-collapse-title",i].filter(Boolean).join(" ").trim()}))}))})}));pn.displayName="uiw.SubMenu";var mn=["prefixCls","className","children","bordered","theme","inlineIndent","inlineCollapsed"],vn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-menu":t,i=e.className,a=e.children,o=e.bordered,l=e.theme,u=void 0===l?"light":l,f=e.inlineIndent,h=void 0===f?10:f,p=e.inlineCollapsed,v=(0,s.Z)(e,mn),x=(0,d.useMemo)((function(){return[r,o?"w-bordered":null,p?r+"-inline-collapsed":null,u?r+"-"+u:null,i].filter(Boolean).join(" ").trim()}),[r,o,p,u,i]);return(0,m.jsx)("ul",(0,c.Z)({},v,{ref:n,className:x,"data-menu":"menu",children:d.Children.map(a,(function(e,n){if(!d.isValidElement(e))return e;var t={};return e.props.children&&e.type===pn&&(t.inlineIndent=h),d.cloneElement(e,Object.assign((0,c.Z)({},t),e.props,{key:""+n}))}))}))}));vn.displayName="uiw.Menu",vn.Item=cn,vn.SubMenu=pn,vn.Divider=un;var xn=vn,yn=xn;var gn=function(e){var n=e.value,t=e.onChange,r=e.onSearch,i=e.expandTrigger,a=void 0===i?"click":i,o=e.size,l=e.disabled,s=e.allowClear,u=e.placeholder,f=e.prefixCls,h=void 0===f?"w-cascader":f,p=e.className,v=e.style,x=void 0===v?{width:200}:v,g=e.option,j=void 0===g?[]:g,b=e.others,w=e.inputProps,C=[h,p].filter(Boolean).join(" ").trim(),N=(0,d.useState)(!1),Z=(0,y.Z)(N,2),k=Z[0],S=Z[1],E=(0,d.useState)([]),M=(0,y.Z)(E,2),B=M[0],z=M[1],L=(0,d.useState)(""),O=(0,y.Z)(L,2),D=O[0],R=O[1],A=(0,d.useState)(""),T=(0,y.Z)(A,2),I=T[0],F=T[1],H=(0,d.useState)(!1),W=(0,y.Z)(H,2),V=W[0],_=W[1],K=(0,d.useState)(""),Y=(0,y.Z)(K,2),$=Y[0],U=Y[1],J=(0,d.useState)(),G=(0,y.Z)(J,2),q=G[0],X=G[1];(0,d.useEffect)((function(){if(r){var e=[];Q(j,(function(n){var t=n.map((function(e){return e.label})).join(" / ");e.push({label:t,options:n})})),X(e)}}),[r]);var Q=function e(n,t,r){void 0===r&&(r=[]),n.map((function(n){var i=[].concat((0,Ze.Z)(r),[n]);n.children?e(n.children,t,i):null==t||t(i)}))};function ee(e){var n;n="enter"===e&&s&&B.length>0?"close":"",R(n)}(0,d.useEffect)((function(){if(n){var e=[],t=j;null==n||n.map((function(n){var r=t.find((function(e){return e.value===n}));t=(null==r?void 0:r.children)||[],e.push((0,c.Z)({label:n,value:n},r))})),z(e)}}),[n]);var ne=function(e,n){z((0,Ze.Z)(n));var r=n.map((function(e){return e.value}));null==t||t(e,r,n)},te=.7*(null==x?void 0:x.width)||void 0,re=(0,d.useMemo)((function(){return function(e,n){var t={onClick:function(){},onMouseOver:function(){}},r=function(){e()};return"click"===a||n?t.onClick=r:"hover"===a&&(t.onMouseOver=r),t}}),[]),ie=function(e,n){if(void 0===n&&(n=0),e)return(0,m.jsx)(yn,{bordered:!0,style:{minHeight:25,minWidth:te,overflowY:"scroll",width:te},children:e&&0!==e.length?e.map((function(e,t){var r,i,a=(null==(r=B[n])?void 0:r.value)===e.value;return(0,m.jsx)(yn.Item,(0,c.Z)({active:a,text:e.label,addonAfter:e.children?(0,m.jsx)(P,{type:"right"}):void 0},re((function(){!function(e,n){B.splice(n,B.length-n,e),e.children||S(!1),ne(!0,B)}(e,n)}),!(null!=(i=e.children)&&i.length))),t)})):(0,m.jsx)("div",{style:{color:"#c7c7c7",fontSize:12},children:"\u6ca1\u6709\u6570\u636e"})},n)};return(0,d.useEffect)((function(){var e=B.map((function(e){return e.label})).join(" / ");U(e)}),[B]),(0,m.jsx)(an,(0,c.Z)({className:C,trigger:"click",style:{marginTop:5},overlayStyl:{width:100},disabled:l},b,{onVisibleChange:function(e){S(e)},isOpen:k,menu:I?(0,m.jsx)(yn,{bordered:!0,style:{minHeight:25,minWidth:null==x?void 0:x.width,overflowY:"scroll",width:null==x?void 0:x.width},children:q&&0!==q.length?q.filter((function(e){return e.label.includes(I.trim())})).map((function(e,n){return(0,m.jsx)(yn.Item,{text:e.label,onClick:function(){return n=e.options,F(""),S(!1),void ne(!1,n);var n}},n)})):(0,m.jsx)("div",{style:{color:"#c7c7c7",fontSize:12},children:"\u6ca1\u6709\u6570\u636e"})}):(0,m.jsx)("div",{style:{display:"flex"},children:new Array(B.length+1).fill(0).map((function(e,n){var t,r=n?null==(t=B[n-1])?void 0:t.children:j;return ie(r,n)})).filter((function(e){return!!e}))}),children:(0,m.jsx)("span",{onMouseLeave:function(){return ee("leave")},onMouseOver:function(){return ee("enter")},children:(0,m.jsx)(Ne,(0,c.Z)({},w,{value:V?I:$,onChange:function(e){k||S(!k);var n=e.target.value;r&&function(e){F(e)}(n)},size:o,disabled:l,placeholder:V?$:u,style:x,onFocus:function(){return r&&_(!0)},onBlur:function(){return r&&_(!1)},readOnly:!r,addonAfter:(0,m.jsx)("span",{style:{width:"auto"},children:!l&&"close"===D&&(0,m.jsx)(P,{type:D,onClick:function(e){e.stopPropagation(),ne(!1,[])},className:h+"-close"})})}))})}))},jn=["prefixCls","type","disabled","value","className","style","children","size","checked","onChange"],bn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-radio":t,i=e.type,a=void 0===i?"radio":i,o=e.disabled,l=void 0!==o&&o,u=e.value,f=void 0===u?"":u,h=e.className,p=e.style,v=e.children,x=e.size,g=e.checked,j=void 0!==g&&g,b=e.onChange,w=(0,s.Z)(e,jn),C=(0,d.useState)(j),N=(0,y.Z)(C,2),Z=N[0],k=N[1],S=(0,d.useState)(),E=(0,y.Z)(S,2),M=E[0],P=E[1];j!==M&&P(j),(0,d.useMemo)((function(){j!==M&&k(j)}),[M]);var B=[r,h,l?"disabled":null,x?r+"-"+x:null].filter(Boolean).join(" ").trim();(0,d.useMemo)((function(){Z!==e.checked&&k(!!e.checked)}),[e.checked]);var z=v||f;return(0,m.jsxs)("label",{className:B,style:p,children:[(0,m.jsx)("input",(0,c.Z)({},(0,c.Z)({},w,{type:a,disabled:l,value:f}),{checked:Z,onChange:function(e){e.persist(),k(e.target.checked),b&&b(e)},ref:n})),z&&(0,m.jsx)("div",{className:r+"-text",children:z})]})})),wn=d.forwardRef((function(e,n){return(0,m.jsx)(bn,(0,c.Z)({ref:n},e))})),Cn=["prefixCls","className","name","value","onChange","children"],Nn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-radio-group":t,i=e.className,a=e.name,o=e.value,l=e.onChange,u=e.children,f=(0,s.Z)(e,Cn);return(0,m.jsx)("div",(0,c.Z)({},f,{ref:n,className:[r,i].filter(Boolean).join(" ").trim(),children:(0,m.jsx)(ne,{children:d.Children.toArray(u).map((function(e){if(e)return d.isValidElement(e)?d.cloneElement(e,(0,c.Z)({},e.props||{},{checked:e.props.value===o,name:a,onChange:l})):e}))})}))})),Zn=["prefixCls","type","disabled","value","className","style","children","size","checked","onChange"],kn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-radio":t,i=(e.type,e.disabled),a=void 0!==i&&i,o=e.value,l=void 0===o?"":o,u=e.className,f=e.style,h=e.children,p=e.size,v=void 0===p?"small":p,x=e.checked,g=void 0!==x&&x,j=e.onChange,b=(0,s.Z)(e,Zn),w=(0,d.useState)(g),C=(0,y.Z)(w,2),N=C[0],Z=C[1],k=(0,d.useState)(),S=(0,y.Z)(k,2),E=S[0],M=S[1];g!==E&&M(g),(0,d.useMemo)((function(){g!==E&&Z(g)}),[E]);var P=[r,u,a?"disabled":null,v?r+"-"+v:null].filter(Boolean).join(" ").trim();(0,d.useMemo)((function(){N!==e.checked&&Z(!!e.checked)}),[e.checked]),console.log("props.checked",e.checked);var B=h||l;return(0,m.jsx)(z,(0,c.Z)({},(0,c.Z)({},b,{className:P,style:f,disabled:a,value:l}),{type:N?"primary":"light",ref:n,onClick:function(e){e.persist(),Z(!N),j&&j(l)},children:B}))})),Sn=kn,En=["prefixCls","className","name","value","onChange"],Mn=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-checkbox-group":t,i=e.className,a=e.name,o=e.value,l=e.onChange,u=(0,s.Z)(e,En),f=(0,d.useRef)([]),h=[r,i].filter(Boolean).join(" ").trim(),p=d.Children.toArray(e.children);return(0,d.useMemo)((function(){return f.current=o||[]}),[o]),(0,m.jsx)("div",(0,c.Z)({},u,{className:h,ref:n,children:d.Children.map(p,(function(e){if(d.isValidElement(e))return Array.isArray(o)&&e&&e.props&&e.props.value&&o.includes(e.props.value)&&(f.current.includes(e.props.value)||f.current.push(e.props.value)),d.cloneElement(e,Object.assign({},e.props,{name:a,checked:f.current.includes(e.props.value),onChange:function(n){if(!n.target.type||"checkbox"===n.target.type){var t=n.target.checked,r=f.current.includes(e.props.value);!r&&t?f.current.push(e.props.value):r&&!t&&(f.current=f.current.filter((function(n){return n!==e.props.value}))),l&&l(n,f.current)}}}))}))}))})),Pn=["className","prefixCls","type","indeterminate","disabled","value"];function Bn(e,n){var t=e.className,r=e.prefixCls,i=void 0===r?"w-checkbox":r,a=e.type,o=void 0===a?"checkbox":a,l=e.indeterminate,d=void 0!==l&&l,u=e.disabled,f=void 0!==u&&u,h=e.value,p=void 0===h?"":h,v=(0,s.Z)(e,Pn),x=[t,d&&"indeterminate"].filter(Boolean).join(" ").trim();return(0,m.jsx)(bn,(0,c.Z)({ref:n},v,{type:o,prefixCls:i,disabled:f,value:p,className:x}))}var zn=d.forwardRef(Bn);zn.Group=Mn;var Ln=zn,On=["prefixCls","className","icon","children","isActive","onItemClick","disabled","showArrow","header","extra"];var Dn=["prefixCls","className","children","accordion","bordered","showArrow","activeKey","onChange"];function Rn(e){var n=e;return Array.isArray(n)||(n=n?[n]:[]),n}function An(e,n){var t=e.prefixCls,r=void 0===t?"w-collapse":t,i=e.className,a=e.children,o=e.accordion,l=void 0!==o&&o,u=e.bordered,f=e.showArrow,h=void 0===f||f,p=e.activeKey,v=e.onChange,x=(0,s.Z)(e,Dn),g=(0,d.useState)(Rn(p)),j=(0,y.Z)(g,2),b=j[0],w=j[1],C=[r,i,u?"w-noborder":null].filter(Boolean).join(" ").trim();return(0,d.useMemo)((function(){p!==b&&w(Rn(p))}),[p]),(0,d.useMemo)((function(){p!==b&&v&&v(b)}),[b,p]),(0,m.jsx)("div",(0,c.Z)({className:C},x,{ref:n,children:d.Children.map(a,(function(e,n){var t=e.key||String(n),i=e.props.disabled,a=!1;a=l?b[0]===t:b.indexOf(t)>-1;var o=(0,c.Z)({prefixCls:r,isActive:a,disabled:i,showArrow:h,onItemClick:i?function(){}:function(){return function(e){var n=b;if(l)n=n[0]===e?[]:[e];else{var t=(n=(0,Ze.Z)(n)).indexOf(e);t>-1?n.splice(t,1):n.push(e)}w(n)}(t)}},e.props);return d.cloneElement(e,o)}))}))}var Tn=d.forwardRef(An);Tn.Panel=function(e){var n=e.prefixCls,t=void 0===n?"w-collapse":n,r=e.className,i=e.icon,a=void 0===i?"down":i,o=e.children,l=e.isActive,u=e.onItemClick,f=e.disabled,h=void 0!==f&&f,p=e.showArrow,v=e.header,x=e.extra,y=(0,s.Z)(e,On),g=[t?t+"-item":null,r,l?t+"-active":null,h?t+"-disabled":null].filter(Boolean).join(" ").trim(),j="string"===typeof a?(0,m.jsx)(P,{type:a}):a;return(0,m.jsxs)("div",(0,c.Z)({className:g},y,{children:[(0,m.jsxs)("div",{className:t+"-header",onClick:u,children:[p&&j,(0,m.jsx)("span",{className:t+"-title",children:v}),x&&(0,m.jsx)("div",{className:t+"-extra",children:x})]}),(0,m.jsx)(w.Z,{in:l,unmountOnExit:!1,timeout:300,classNames:t+"-panel",children:function(e){return d.cloneElement((0,m.jsx)("div",{children:o}),{className:t+"-panel",style:(n=o,Object.assign({},n&&n.props?n.props.style:{},{transitionDuration:"300ms"})),ref:function(n){return function(e,n){n&&("exited"!==e&&"exiting"!==e||(n.style.height="1px"),"entered"!==e&&"entering"!==e||(n.style.height=n.scrollHeight+"px"))}(e,n)}});var n}})]}))};var In=Tn,Fn=t(70556),Hn=t.n(Fn),Wn=["prefixCls","className","text","children","onClick"];function Vn(e){var n=e.prefixCls,t=void 0===n?"w-copy-to-clipboard":n,r=e.className,i=e.text,a=void 0===i?"":i,o=e.children,l=e.onClick,d=void 0===l?function(){return null}:l,u=(0,s.Z)(e,Wn);var f=(0,c.Z)({},u,{className:[t,r].filter(Boolean).join(" ").trim(),onClick:function(e){if(!a)return d("",!1,e);Hn()(a,(function(n){d(a,n,e)}))}});return(0,m.jsxs)("span",(0,c.Z)({},f,{children:[(0,m.jsx)("span",{className:t+"-select",children:a}),o]}))}var _n=["prefixCls","bodyStyle","className","popoverProps","datePickerProps","allowClear","format","onChange","value"];function Kn(e){var n=e.prefixCls,t=void 0===n?"w-dateinputrange":n,r=e.bodyStyle,i=void 0===r?void 0:r,a=e.className,o=e.popoverProps,l=e.datePickerProps,u=e.allowClear,f=void 0===u||u,h=e.format,p=void 0===h?"YYYY/MM/DD":h,v=e.onChange,x=e.value,g=(0,s.Z)(e,_n),j=(0,d.useState)([]),b=(0,y.Z)(j,2),w=b[0],C=b[1];function N(e,n){var t=(0,Ze.Z)(w);t[n]=e,C(t),v&&v(e,t)}return(0,d.useEffect)((function(){var e=[],n=x;Array.isArray(n)&&null!=n&&n.length&&n.forEach((function(t,r){e[r]="string"===typeof n[r]?new Date(t):t})),C(e)}),[JSON.stringify(x)]),(0,m.jsxs)("div",{className:[t+"-contents",t+"-inner"].filter(Boolean).join(" ").trim(),style:(0,c.Z)({width:300},i),children:[(0,m.jsx)(je,(0,c.Z)({trigger:"focus",placement:"bottomLeft",autoAdjustOverflow:!0},o,{content:(0,m.jsx)(Ue,(0,c.Z)({date:w[0],className:t+"-popover"},l,{onChange:function(e){return N(e,0)}})),children:(0,m.jsx)(Ne,(0,c.Z)({placeholder:"\u8bf7\u9009\u62e9\u65e5\u671f",readOnly:!0},g,{value:w[0]?(0,te.Z)(p,w[0]):"",className:[t,a].filter(Boolean).join(" ").trim()}))})),(0,m.jsx)(P,{type:"swap-right",verticalAlign:"baseline",style:{fontSize:21,top:-1,margin:"0px 8px 0px 5px"}}),(0,m.jsx)(je,(0,c.Z)({trigger:"focus",placement:"bottomLeft",autoAdjustOverflow:!0},o,{content:(0,m.jsx)(Ue,(0,c.Z)({date:w[1],className:t+"-popover"},l,{onChange:function(e){return N(e,1)}})),children:(0,m.jsx)(Ne,(0,c.Z)({placeholder:"\u8bf7\u9009\u62e9\u65e5\u671f",readOnly:!0},g,{value:w[1]?(0,te.Z)(p,w[1]):"",className:[t,a].filter(Boolean).join(" ").trim()}))})),f&&w.length>0&&(0,m.jsx)(P,{className:t+"-close-btn",color:"#ccc",onClick:function(){return C([])},type:"close"})]})}var Yn=["prefixCls","className","popoverProps","datePickerProps","allowClear","autoClose","format","onChange"];function $n(e){var n=e.prefixCls,t=void 0===n?"w-dateinput":n,r=e.className,i=e.popoverProps,a=e.datePickerProps,o=e.allowClear,l=void 0===o||o,u=e.autoClose,f=void 0!==u&&u,h=e.format,p=void 0===h?"YYYY/MM/DD":h,v=e.onChange,x=(0,s.Z)(e,Yn),g=(0,d.useState)(e.value),j=(0,y.Z)(g,2),b=j[0],w=j[1],C=b||"";function N(e){f&&E(!1),w(e),v&&v(e)}x.value="string"===typeof C?C:(0,te.Z)(p,C),(0,d.useEffect)((function(){e.value!==b&&w(e.value)}),[e.value]),l&&x.value&&(x.addonAfter=(0,m.jsx)(P,{className:t+"-close-btn",onClick:function(){return N(void 0)},type:"close"}));var Z=(0,d.useState)(!1),k=(0,y.Z)(Z,2),S=k[0],E=k[1];return(0,m.jsx)(je,(0,c.Z)({trigger:"focus",placement:"bottomLeft",autoAdjustOverflow:!0,isOpen:S,onVisibleChange:function(e){return E(e)}},i,{content:(0,m.jsx)(Ue,(0,c.Z)({date:C&&new Date(C)||void 0,className:t+"-popover"},a,{onChange:function(e){return N(e)}})),children:(0,m.jsx)(Ne,(0,c.Z)({placeholder:"\u8bf7\u9009\u62e9\u65e5\u671f",readOnly:!0},x,{className:[t,r].filter(Boolean).join(" ").trim()}))}))}var Un=function(e){return e.children},Jn=["prefixCls","className","tagName","layout","bordered","label","isLastCell","colon","span","children","column"];var Gn=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=n.className,i=n.tagName,a=void 0===i?"td":i,o=n.layout,l=n.bordered,u=n.label,f=n.colon,h=n.span,p=n.children,v=(0,s.Z)(e,Jn),x={className:[t?t+"-item-label":null,r,f?t+"-item-colon":null,u?null:t+"-item-no-label"].filter(Boolean).join(" ").trim()};return"horizontal"===o?l?(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)("th",(0,c.Z)({},x,{children:u})),(0,m.jsx)(a,(0,c.Z)({},v,{colSpan:h?2*h-1:h,className:t?t+"-item-content":"",children:p}))]}):(0,m.jsxs)(a,(0,c.Z)({},v,{colSpan:h,children:[(0,m.jsx)("span",(0,c.Z)({},x,{children:u})),(0,m.jsx)("span",{className:t?t+"-item-content":"",children:p})]})):(0,m.jsx)(a,{colSpan:h,className:t+"-item-"+("td"===a?"content":"label"),children:p})};function qn(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=n.layout,i=n.bordered,a=n.column,o=n.colon,l=n.children,s=void 0===l?[]:l;function u(e){return s.map((function(n,l){return(0,d.createElement)(Gn,(0,c.Z)({},n.props,{prefixCls:t,key:l,column:a,tagName:e?"th":"td",isLastCell:s.length-1===l,layout:r,colon:o,bordered:i}),e?n.props.label:n.props.children)}))}var f=t?t+"-row":"";return(0,m.jsxs)(d.Fragment,{children:["vertical"===r&&(0,m.jsx)("tr",{className:f,children:u(!0)}),(0,m.jsx)("tr",{className:f,children:u()})]})}var Xn=["prefixCls","className","title","bordered","column","size","colon","children","layout"];function Qn(e,n){var t=e.prefixCls,r=void 0===t?"w-descriptions":t,i=e.className,a=e.title,o=e.bordered,l=e.column,u=void 0===l?3:l,f=e.size,h=e.colon,p=void 0===h||h,v=e.children,x=e.layout,y=void 0===x?"horizontal":x,g=(0,s.Z)(e,Xn),j=[r,i,r&&y?r+"-"+y:null,o?r+"-bordered":null,f?r+"-"+f:null].filter(Boolean).join(" ").trim(),b=function(e,n){var t,r=[],i=null;return e.forEach((function(a,o){var l=a;i||(t=n,i=[],r.push(i)),o===e.length-1&&(l=d.cloneElement(l,{span:t}));var s=l.props.span,c=void 0===s?1:s;i.push(l),(t-=c)<=0&&(i=null)})),r}(d.Children.toArray(v),u);return(0,m.jsx)("div",{className:j,ref:n,children:(0,m.jsxs)("table",(0,c.Z)({},g,{children:[a&&(0,m.jsx)("caption",{className:r+"-title",children:a}),(0,m.jsx)("tbody",{className:r+"-tbody",children:b.map((function(e,n){return(0,m.jsx)(qn,{prefixCls:r,bordered:o,colon:p,column:u,layout:y,children:e},n)}))})]}))})}var et=d.forwardRef(Qn);et.Item=Un;var nt=et,tt=["prefixCls","className","children","dashed","type","align"],rt=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-divider":t,i=e.className,a=e.children,o=e.dashed,l=void 0!==o&&o,d=e.type,u=void 0===d?"horizontal":d,f=e.align,h=void 0===f?"center":f,p=(0,s.Z)(e,tt),v=[i,r,r&&u?r+"-"+u:null,r&&h?r+"-"+h:null,a?r+"-with-text":null,l?r+"-dashed":null].filter(Boolean).join(" ").trim();return(0,m.jsx)("div",(0,c.Z)({className:v},p,{ref:n,children:a&&(0,m.jsx)("span",{className:r+"-inner-text",children:a})}))})),it=t(64649),at=["prefixCls","className","style","placement","size","title","footer","icon","isCloseButtonShown","bodyProps","timeout","isOpen","maskClosable"],ot=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-drawer":t,i=n.className,a=n.style,o=n.placement,l=void 0===o?"right":o,u=n.size,f=void 0===u?260:u,h=n.title,p=n.footer,v=n.icon,x=n.isCloseButtonShown,y=void 0===x||x,g=n.bodyProps,j=n.timeout,b=void 0===j?300:j,w=n.isOpen,C=void 0!==w&&w,N=n.maskClosable,Z=void 0===N||N,k=(0,s.Z)(e,at),E=[i,r,l].filter(Boolean).join(" ").trim(),M=[g?g.className:null,r?r+"-body-inner":null].filter(Boolean).join(" ").trim(),B=(0,c.Z)({},a,(0,it.Z)({},/^(top|bottom)$/.test(l)?"height":"width",f)),L=(0,d.useMemo)((function(){return p?(0,m.jsx)("div",{className:r+"-footer",children:p}):null}),[p]),O=(0,d.useMemo)((function(){return v?(0,m.jsx)(P,{type:v}):null}),[v]),D=(0,d.useMemo)((function(){return h?(0,m.jsx)("h4",{children:h}):null}),[h]);return(0,m.jsx)(S,(0,c.Z)({className:E,timeout:b,isOpen:C,maskClosable:Z},k,{children:(0,m.jsxs)("div",{className:r+"-wrapper",style:B,children:[(h||v)&&(0,m.jsxs)("div",{className:r+"-header",children:[O,D,h&&y&&(0,m.jsx)(z,{basic:!0,onClick:e.onClose,icon:"close",type:"light"})]}),(0,m.jsx)("div",{className:r+"-body",children:(0,m.jsx)("div",(0,c.Z)({},g,{className:M,children:e.children}))}),L]})}))},lt=["prefixCls","className","icon","iconProps","size","description","children"],st=function(e){var n=e.prefixCls,t=void 0===n?"w-empty":n,r=e.className,i=e.icon,a=e.iconProps,o=e.size,l=void 0===o?64:o,d=e.description,u=void 0===d?"\u6682\u65e0\u6570\u636e":d,f=e.children,h=(0,s.Z)(e,lt),p=[t,r].filter(Boolean).join(" ").trim();return(0,m.jsxs)("div",(0,c.Z)({className:p},h,{children:[(0,m.jsx)("div",{className:t+"-icon",children:i||(0,m.jsxs)("svg",(0,c.Z)({viewBox:"0 0 1024 1024",width:l,height:l},a,{children:[(0,m.jsx)("path",{d:"M20.48 860.16a491.52 102.4 0 1 0 983.04 0 491.52 102.4 0 1 0-983.04 0Z",fill:"#F5F5F5"}),(0,m.jsx)("path",{d:"M225.28 409.6l573.44-8.06912 112.78336 183.296H102.4z",fill:"#C4C5C7"}),(0,m.jsx)("path",{d:"M266.24 61.44h491.52a40.96 40.96 0 0 1 40.96 40.96v532.48a40.96 40.96 0 0 1-40.96 40.96H266.24a40.96 40.96 0 0 1-40.96-40.96V102.4a40.96 40.96 0 0 1 40.96-40.96z",fill:"#F5F5F7"}),(0,m.jsx)("path",{d:"M348.16 143.36h327.68a40.96 40.96 0 0 1 40.96 40.96v122.88a40.96 40.96 0 0 1-40.96 40.96H348.16a40.96 40.96 0 0 1-40.96-40.96V184.32a40.96 40.96 0 0 1 40.96-40.96zM327.68 409.6h368.64a20.48 20.48 0 0 1 0 40.96H327.68a20.48 20.48 0 0 1 0-40.96zM327.68 491.52h368.64a20.48 20.48 0 0 1 0 40.96H327.68a20.48 20.48 0 0 1 0-40.96z",fill:"#EBECEC"}),(0,m.jsx)("path",{d:"M673.44384 607.58016v13.43488c0 25.14944-20.0704 45.52704-44.8512 45.52704H382.95552l-2.2528-0.06144c-23.7568-1.16736-42.63936-21.07392-42.63936-45.4656v-13.45536c0-12.55424-10.0352-22.7328-22.44608-22.7328H102.4v250.30656C102.4 860.2624 122.49088 880.64 147.29216 880.64h719.31904c24.7808 0 44.89216-20.3776 44.89216-45.50656V584.82688H695.88992c-12.3904 0-22.44608 10.17856-22.44608 22.7328z",fill:"#E0E0E0"})]}))}),u&&(0,m.jsx)("div",{className:t+"-description",children:u}),f&&(0,m.jsx)("div",{className:t+"-footer",children:f})]}))},ct=["className","dataLabel","prefixCls"],dt=d.forwardRef((function(e,n){var t=e.className,r=e.dataLabel,i=void 0===r?"Browse":r,a=e.prefixCls,o=void 0===a?"w-fileinput":a,l=(0,s.Z)(e,ct),d=[o,t].filter(Boolean).join(" ").trim();return(0,m.jsx)(Ne,(0,c.Z)({ref:n,"data-label":i,className:d},l,{type:"file"}))})),ut=function(e){var n=e.className,t=e.prefixCls,r=void 0===t?"w-fileinput-list":t,i=e.dataList,a=void 0===i?[]:i,o=e.uploadType,l=e.size,s=void 0===l?"middle":l,c=e.shape,u=void 0===c?"round":c,f=e.readonly,h=e.children,p=e.showFileIcon,v=void 0===p?{showPreviewIcon:!0,showRemoveIcon:!0}:p,x=e.onPreview,y=e.onAdd,g=e.onRemove,j=[r,r+"-size-"+s,r+"-shape-"+u,n].filter(Boolean).join(" ").trim();return(0,m.jsxs)("div",{className:j,children:[h&&!f&&d.isValidElement(h)&&d.cloneElement(h,{onClick:y}),(0,m.jsx)("div",{children:a.map((function(e,n){return(0,m.jsxs)("div",{className:r+"-"+o,children:["picture"===o&&(0,m.jsxs)("div",{className:r+"-info "+r+"-"+o+"-info",children:[(0,m.jsx)("img",{src:e.dataURL,alt:""}),(null==v?void 0:v.showPreviewIcon)&&(0,m.jsx)("div",{className:r+"-actions",children:(0,m.jsx)("span",{className:r+"-actions-search",onClick:function(){return null==x?void 0:x(e)},children:(0,m.jsx)(P,{type:"search",style:{color:"#fff",fontSize:16}})})})]}),(0,m.jsx)("div",{className:r+"-"+o+"-text",children:e.name}),(null==v?void 0:v.showRemoveIcon)&&(0,m.jsx)("div",{className:r+"-"+o+"-icon",onClick:function(){return null==g?void 0:g(n)},children:(0,m.jsx)(P,{type:"delete",style:{color:"#999"}})})]},n)}))})]})},ft=function(e){var n=e.className,t=e.prefixCls,r=void 0===t?"w-fileinput-card":t,i=e.dataList,a=void 0===i?[]:i,o=e.maxNumber,l=void 0===o?3:o,s=e.shape,c=void 0===s?"round":s,d=e.size,u=void 0===d?"middle":d,f=e.readonly,h=e.children,p=e.showFileIcon,v=void 0===p?{showPreviewIcon:!0,showRemoveIcon:!0}:p,x=e.onAdd,y=e.onPreview,g=e.onRemove,j=[r,r+"-size-"+u,r+"-shape-"+c,n].filter(Boolean).join(" ").trim(),b=!(!v.showPreviewIcon&&!v.showRemoveIcon);return(0,m.jsxs)("div",{className:j,children:[a.map((function(e,n){return(0,m.jsxs)("div",{className:r+"-box",children:[(0,m.jsx)("div",{className:r+"-box-info",children:(0,m.jsx)("img",{src:e.dataURL,alt:""})}),(0,m.jsxs)("div",{className:b?r+"-actions":"",children:[(null==v?void 0:v.showPreviewIcon)&&(0,m.jsx)("span",{className:r+"-actions-remove",onClick:function(){return null==y?void 0:y(e)},children:(0,m.jsx)(P,{type:"search",style:{color:"#fff",fontSize:16}})}),(null==v?void 0:v.showRemoveIcon)&&(0,m.jsx)("span",{className:r+"-actions-remove",onClick:function(){return null==g?void 0:g(n)},children:(0,m.jsx)(P,{type:"delete",style:{color:"#fff",fontSize:16}})})]})]},n)})),l>a.length&&!f&&(0,m.jsx)("div",{className:r+"-box "+r+"-btn",onClick:x,children:h})]})},ht=function(e){var n=new FileReader;return new Promise((function(t){n.addEventListener("load",(function(){return t(String(n.result))})),n.readAsDataURL(e)}))},pt=function(e,n){for(var t=[],r=0;r0?S.map((function(e,n){return b(e,n)})):C;var M=d.Children.map(t,(function(e,n){return d.isValidElement(e)&&d.cloneElement(e,{key:n})})),P=[i,w,f?i+"-striped":null,p?i+"-no-hover":null,x?i+"-active":null,o?i+"-bordered":null,g&&"default"!==g?i+"-size-"+g:null].filter(Boolean).join(" ").trim();return(0,m.jsxs)("div",(0,c.Z)({className:P},E,{ref:n,children:[N&&(0,m.jsx)("div",{className:i+"-header",children:N}),M,Z&&(0,m.jsx)("div",{className:i+"-footer",children:Z})]}))}var Bt=d.forwardRef(Pt);Bt.Item=Et;var zt=Bt,Lt=t(56954),Ot=["prefixCls","className","size","loading","tip","vertical","color","bgColor","children","indicator","fullscreen"],Dt=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-loader":t,i=n.className,a=n.size,o=void 0===a?"default":a,l=n.loading,u=void 0===l||l,f=n.tip,h=n.vertical,p=n.color,v=n.bgColor,x=n.children,y=n.indicator,g=n.fullscreen,j=void 0!==g&&g,b=(0,s.Z)(e,Ot),w=[r,i,o?r+"-"+o:null].filter(Boolean).join(" ").trim(),C=(0,d.useMemo)((function(){return(0,m.jsx)("svg",{viewBox:"25 25 50 50",children:(0,m.jsx)("circle",{cx:"50",cy:"50",r:"20",fill:"none",strokeWidth:"5",strokeMiterlimit:"10"})})}),[]),N=(0,d.useMemo)((function(){return(0,m.jsx)("div",{className:[r+"-tips",j?r+"-fullscreen":null].filter(Boolean).join(" ").trim(),style:{color:p,backgroundColor:v},children:(0,m.jsxs)("div",{className:r+"-tips-nested",children:[y||C,f&&(0,m.jsx)("div",{className:[r+"-text",h?r+"-vertical":null].filter(Boolean).join(" ").trim(),children:f})]})})}),[j,v,r,h,f]);return(0,m.jsxs)("div",(0,c.Z)({className:w},b,{children:[(u||j)&&N,x&&d.cloneElement(x,Object.assign({},x.props,{className:[r+"-warp",u?r+"-blur":null].filter(Boolean).join(" ").trim()}))]}))},Rt=["prefixCls","className","type","title","description","showIcon","icon","rounded","isCloseButtonShown"],At=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(e){var i;return(0,r.Z)(this,t),(i=n.call(this,e)).handleClosed=function(e){var n=i.props.onClose;i.setState({isOpen:!1}),n&&n(e)},i.renderIcon=function(){var e=i.props,n=e.type,t=e.showIcon,r=i.props.icon;if(!r&&t)switch(n){case"success":r="circle-check";break;case"warning":r="warning";break;case"info":r="information";break;case"error":r="circle-close"}return r},i.state={isOpen:!0},i}return(0,i.Z)(t,[{key:"render",value:function(){var e=this.props,n=e.prefixCls,t=e.className,r=e.type,i=e.title,a=e.description,o=e.showIcon,l=e.rounded,d=e.isCloseButtonShown,u=(0,s.Z)(e,Rt),f=a||this.props.children,h=[n,t,n+"-"+r,l?n+"-rounded":null,o?n+"-icon":null,o?n+(i?"-title":"")+(f?"-description":""):null].filter(Boolean).join(" ").trim(),p=(0,m.jsxs)("div",(0,c.Z)({className:h},u,{children:[d&&(0,m.jsx)(z,{basic:!0,onClick:this.handleClosed,icon:"close",type:"light"}),o&&(0,m.jsx)(P,{type:this.renderIcon()}),(0,m.jsx)("span",{className:n+"-title",children:i}),(0,m.jsx)("span",{className:n+"-description",children:f})]}));return d?(0,m.jsx)(w.Z,{in:this.state.isOpen,unmountOnExit:!0,timeout:300,classNames:n,children:p}):p}}]),t}(d.Component);At.defaultProps={prefixCls:"w-message",rounded:!0,isCloseButtonShown:!1};var Tt=["prefixCls","format","onChange","className","popoverProps","pickerCaptionProps","allowClear","monthLabel"],It=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"];function Ft(e){var n=e.prefixCls,t=void 0===n?"w-monthpicker":n,r=e.format,i=void 0===r?"YYYY/MM":r,a=e.onChange,o=void 0===a?function(){}:a,l=e.className,u=e.popoverProps,f=e.pickerCaptionProps,h=void 0===f?{}:f,p=e.allowClear,v=void 0===p||p,x=e.monthLabel,g=void 0===x?It:x,j=(0,s.Z)(e,Tt),b=(0,d.useState)(!1),w=(0,y.Z)(b,2),C=w[0],N=w[1],Z=(0,d.useState)(new Date),k=(0,y.Z)(Z,2),S=k[0],E=k[1],M=(0,d.useState)("month"),P=(0,y.Z)(M,2),B=P[0],L=P[1],O=(0,d.useState)(e.value),D=(0,y.Z)(O,2),R=D[0],A=D[1];function T(e,n,t){var r=new Date(new Date(S)[e](n));t||L("month");var a=(0,te.Z)(i,new Date(r));A(a),E(r),o&&o(r,a),"setMonth"===e&&N(!1)}return(0,d.useEffect)((function(){return A(e.value)}),[e.value]),j.value=(0,d.useMemo)((function(){return"string"===typeof R?R:R?(0,te.Z)(i,R):""}),[i,R]),v&&j.value&&(j.addonAfter=(0,m.jsx)(z,{className:t+"-close-btn",icon:"close",onClick:function(){A(""),o&&o()},size:j.size,basic:!0,type:"light"})),(0,m.jsx)(je,(0,c.Z)({trigger:"focus",placement:"bottomLeft",autoAdjustOverflow:!0,isOpen:C},u,{onVisibleChange:function(e){return N(e)},content:(0,m.jsxs)("div",{className:t+"-popover",children:[(0,m.jsx)(Ke,(0,c.Z)({panelDate:S,monthLabel:g},h,{onSelected:function(e){if(/^(month|year)$/.test(e))L(e);else{var n=new Date(S).getFullYear(),t=new Date(new Date(S).setFullYear("next"===B?n+1:n-1));E(t)}}})),"month"===B&&(0,m.jsx)(Fe,{panelDate:S,monthLabel:g,onSelected:function(e,n){return T("setMonth",e,n)}}),"year"===B&&(0,m.jsx)(We,{panelDate:S,onSelected:function(e,n){return T("setFullYear",e,n)}})]}),children:(0,m.jsx)(Ne,(0,c.Z)({placeholder:"\u8bf7\u8f93\u5165\u65e5\u671f",readOnly:!0},j,{className:[t,l].filter(Boolean).join(" ").trim()}))}))}var Ht=["description","isOpen"],Wt={},Vt={},_t=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(){var e;return(0,r.Z)(this,t),(e=n.apply(this,arguments)).state={notifys:{}},e}return(0,i.Z)(t,[{key:"create",value:function(e){var n=this,t=e.placement,r=e.key;Wt[t]||(Wt[t]={}),e.isOpen=!1,Wt[t][r]=e,e.duration&&(Vt[r]=setTimeout((function(){n.closed(r,t)}),e.duration)),this.setState({notifys:Wt,placement:t},(function(){Wt[t][r].isOpen=!0,n.setState({notifys:Wt})}))}},{key:"closed",value:function(e,n){if(e&&n&&Wt[n][e]){Wt[n][e].isOpen=!1;var t=Wt[n][e];this.setState({notifys:Wt},(function(){clearTimeout(Vt[e]),delete Vt[e],delete Wt[n][e],t&&t.willUnmount&&t.willUnmount(t,Wt)}))}}},{key:"render",value:function(){var e=this,n=this.props.prefixCls,t=this.state.placement;return(0,m.jsx)(d.Fragment,{children:t&&Object.keys(this.state.notifys[t]).map((function(r){var i=e.state.notifys[t][r],a=i.description,o=i.isOpen,l=(0,s.Z)(i,Ht);return"open"===l.type&&delete l.type,(0,m.jsx)(T,(0,c.Z)({className:n,useButton:!1,width:320},l,{usePortal:!1,hasBackdrop:!1,isOpen:o,content:a}),r)}))})}}]),t}(d.Component);_t.defaultProps={prefixCls:"w-notify",placement:"topRight"};var Kt={},Yt={};function $t(e,n){if(void 0===n&&(n="open"),e.placement||(e.placement="topRight"),e.type=n,!e.icon&&null!==e.icon)switch(e.type){case"success":e.icon="circle-check";break;case"warning":e.icon="warning";break;case"info":e.icon="information";break;case"error":e.icon="circle-close"}switch(e.type){case"info":e.type="primary";break;case"error":e.type="danger"}if(e.placement&&!Kt[e.placement]){var t=document.createElement("div");document.body.appendChild(t),t.className=["w-notify-warpper",e.placement].filter(Boolean).join(" ").trim(),Yt[e.placement]=t,Kt[e.placement]=C.render((0,m.jsx)(_t,{}),t)}null!==e.duration&&(e.duration=1e3*(e.duration||4.5)),Kt[e.placement]&&Kt[e.placement].create((0,c.Z)({},e,{duration:e.duration,key:parseInt(String(1e15*Math.random()),10).toString(36),willUnmount:function(n,t){n&&(n.onClose&&n.onClose(),0===Object.keys(t[e.placement]).length&&Kt[e.placement]&&(delete Kt[e.placement],Yt[e.placement]&&document.body.removeChild(Yt[e.placement])))}}))}["open","success","warning","info","error"].forEach((function(e){$t[e]=function(n){return void 0===n&&(n={}),$t(n,e)}}));var Ut=$t,Jt=d.forwardRef((function(e,n){return(0,m.jsx)("option",(0,c.Z)({},e,{ref:n}))})),Gt=d.forwardRef((function(e,n){return(0,m.jsx)("optgroup",(0,c.Z)({},e,{ref:n}))})),qt=["prefixCls","className","size"],Xt=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-select":t,i=e.className,a=e.size,o=void 0===a?"default":a,l=(0,s.Z)(e,qt);return(0,m.jsx)("select",(0,c.Z)({},l,{ref:n,className:[r,i,o?r+"-"+o:null].filter(Boolean).join(" ").trim()}))}));Xt.Option=Jt,Xt.Group=Gt;var Qt=Xt,er=["className","style","prefixCls","alignment","size","total","pageSize","pageSizeOptions","current","onChange","onShowSizeChange","divider"];function nr(e){var n=e.className,t=e.style,r=e.prefixCls,i=void 0===r?"w-pagination":r,a=e.alignment,o=void 0===a?"left":a,l=e.size,u=void 0===l?"default":l,f=e.total,h=void 0===f?0:f,p=e.pageSize,v=void 0===p?10:p,x=e.pageSizeOptions,g=void 0===x?[]:x,j=e.current,b=void 0===j?1:j,w=e.onChange,C=void 0===w?function(){return null}:w,N=e.onShowSizeChange,Z=e.divider,k=(0,s.Z)(e,er),S=(0,d.useState)(b),E=(0,y.Z)(S,2),M=E[0],P=E[1];(0,d.useEffect)((function(){return P(b)}),[b]);var B=[i,n,Z?"divider":null,u].filter(Boolean).join(" ").trim(),z=(0,d.useMemo)((function(){var e=[{type:"prev",disabled:1===M}],n=Math.ceil(h/v),t=n<=5?n:5,r=0,i=0;for(M>3&&n>5&&e.push({label:1}),M>4&&n>6&&e.push({type:"jumpPrev",label:"\u2022\u2022\u2022",goto:5});r3&&n>5&&(i=M-3);var a=(r+=1)+i;n-M===0&&n>5&&(a-=2),n-M===1&&n>5&&(a-=1),a<=n&&e.push({label:a,active:M===a})}return M+36&&e.push({type:"jumpNext",label:"\u2022\u2022\u2022",goto:5}),M+25&&e.push({label:n}),e.push({type:"next",disabled:M===n}),e}),[M,h,v]);return(0,m.jsxs)("ul",(0,c.Z)({className:B,style:(0,c.Z)({},t,{textAlign:o})},k,{children:[z.map((function(e,n){var t=(0,m.jsx)("a",{children:e.label});return/^(prev|next)$/.test(e.type)&&(t=(0,m.jsx)("a",{className:"arrow "+e.type})),(0,m.jsx)("li",{className:[e.active?"active":null,e.disabled?"disabled":null].filter(Boolean).join(" ").trim(),onClick:function(){return function(e){if(!e.active&&!e.disabled){var n=Math.ceil(h/v),t={};e.label&&(t.current=e.label),"prev"===e.type&&(t.current=M-1>0?M-1:1),"next"===e.type&&(t.current=M+1<=n?M+1:n),/^(jumpPrev|jumpNext)/.test(e.type)&&e.goto&&(t.current="jumpPrev"===e.type?M-e.goto:M+e.goto,t.current>n&&(t.current=n),t.current<1&&(t.current=1)),P(t.current),C&&C(t.current,h,v)}}(e)},children:t},n)})),g.length>0&&(0,m.jsx)("li",{className:i+"-options",children:(0,m.jsx)(Qt,{size:u,defaultValue:v,onChange:function(e){var n=Number(e.target.value),t=Math.ceil(h/n);N&&N(M>t?t:M,n)},children:g.map((function(e,n){return(0,m.jsxs)(Qt.Option,{value:e,children:[e,"\u6761/\u9875"]},n)}))})})]}))}var tr=["prefixCls","placeholder","value","autoFocus","className","size","style","disabled","onChange","onBlur","onFocus"];function rr(e,n){void 0===e&&(e={});var t=e,r=t.prefixCls,i=void 0===r?"w-pin-code":r,a=t.placeholder,o=void 0===a?"\u25cb":a,l=t.value,f=void 0===l?[]:l,h=t.autoFocus,p=t.className,v=t.size,x=void 0===v?"default":v,g=t.style,j=t.disabled,b=t.onChange,w=void 0===b?u:b,C=t.onBlur,N=void 0===C?u:C,Z=t.onFocus,k=void 0===Z?u:Z,S=(0,s.Z)(e,tr),E=(0,d.useState)({}),M=(0,y.Z)(E,1)[0],P=(0,d.useState)(o),B=(0,y.Z)(P,2),z=B[0],L=B[1],O=(0,d.useState)(f),D=(0,y.Z)(O,2),R=D[0],A=D[1],T=[i,p,x?i+"-"+x:null,j?"disabled":null].filter(Boolean).join(" ").trim();function I(e){L(o),N(e)}function F(e){L(""),k(e)}return(0,d.useEffect)((function(){R!==f&&w(R)}),[R]),(0,m.jsx)("div",(0,c.Z)({className:T,style:g},S,{ref:n,children:(0,Ze.Z)(R).map((function(e,n){var t={min:0,type:"text",inputMode:"numeric",autoComplete:"off",value:e,onChange:function(e){return function(e,n){var t=e.target.value;t=t.charAt(t.length-1);var r=(0,Ze.Z)(R);Number(t)>-1&&t?(e.currentTarget.value=t,r[n]=t,M[n+1]&&M[n+1].focus(),A(r)):t||(r[n]="",A(r))}(e,n)},onKeyDown:function(e){return function(e,n){var t=e.currentTarget.value,r=e.key.toLocaleLowerCase();!t&&M[n-1]&&/(backspace|delete)/.test(r)&&M[n-1].focus()}(e,n)},onBlur:function(e){return I(e)},onFocus:function(e){return F(e)},className:i+"-inner",placeholder:z,disabled:j,size:x};return h&&0===n&&(t.autoFocus=!0),(0,d.createElement)(Ne,(0,c.Z)({ref:function(e){e&&(M[n]=e)}},t,{key:n}))}))}))}var ir=d.forwardRef(rr);function ar(e){return(0,m.jsx)(P,{type:e.type})}var or=["prefixCls","style","type","className","showText","percent","format","strokeWidth","width","status"],lr=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(){return(0,r.Z)(this,t),n.apply(this,arguments)}return(0,i.Z)(t,[{key:"relativeStrokeWidth",value:function(e,n){var t=this.props,r=t.strokeWidth,i=t.percent;if(n&&n.parentNode){var a=(r/n.parentNode.getBoundingClientRect().width*100).toFixed(1),o=parseInt((50-parseFloat(a)/2).toString(),10);if(n.setAttribute("stroke-width",a),n.setAttribute("d","M 50 50 m 0 -"+o+" a "+o+" "+o+" 0 1 1 0 "+2*o+" a "+o+" "+o+" 0 1 1 0 -"+2*o),"track"===e){var l=2*Math.PI*o;n.setAttribute("style","stroke-dasharray:"+l+"px,"+l+"px;stroke-dashoffset:"+(1-i/100)*l+"px;transition: stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease;")}}}},{key:"render",value:function(){var e,n=this.props,t=n.prefixCls,r=n.style,i=n.className,a=n.showText,o=n.percent,l=n.format,d=n.width,u=n.status,f=(0,s.Z)(n,or),h=[t,i,t+"-circle",a?t+"-show-text":null,u?t+"-status-"+u:null,parseInt(o.toString(),10)>=100?t+"-status-success":null].filter(Boolean).join(" ").trim(),p=parseInt(o.toString(),10)>=100&&!("status"in this.props)?"success":u;if(a){var v=o+"%";"exception"===p?v=(0,m.jsx)(ar,{type:"close"}):"success"===p&&(v=(0,m.jsx)(ar,{type:"check"})),e=(0,m.jsx)("span",{className:t+"-text",style:{fontSize:.16*d+6},children:l?l(o):v})}return(0,m.jsxs)("div",(0,c.Z)({className:h,style:r},f,{children:[(0,m.jsxs)("svg",{viewBox:"0 0 100 100",width:""+d,children:[(0,m.jsx)("path",{ref:this.relativeStrokeWidth.bind(this,"bg"),className:t+"-trail",fill:"none"}),(0,m.jsx)("path",{ref:this.relativeStrokeWidth.bind(this,"track"),strokeLinecap:"round",className:t+"-stroke",fill:"none"})]}),e]}))}}]),t}(d.Component);lr.defaultProps={prefixCls:"w-progress",showText:!0,percent:0,width:126,strokeWidth:6};var sr=["prefixCls","style","className","showText","percent","format","strokeWidth","width","status"],cr=function(e){(0,o.Z)(t,e);var n=(0,l.Z)(t);function t(){return(0,r.Z)(this,t),n.apply(this,arguments)}return(0,i.Z)(t,[{key:"render",value:function(){var e,n=this.props,t=n.prefixCls,r=n.style,i=n.className,a=n.showText,o=n.percent,l=n.format,d=n.strokeWidth,u=n.status,f=(0,s.Z)(n,sr),h=[t,i,t+"-line",a?t+"-show-text":null,u?t+"-status-"+u:null,parseInt(o.toString(),10)>=100?t+"-status-success":null].filter(Boolean).join(" ").trim();if(a){var p=parseInt(o.toString(),10)>=100&&!("status"in this.props)?"success":u,v=o+"%";"exception"===p?v=(0,m.jsx)(ar,{type:"circle-close"}):"success"===p&&(v=(0,m.jsx)(ar,{type:"circle-check"})),e=(0,m.jsx)("span",{className:t+"-text",children:l?l(o):v})}var x={width:o+"%",height:d};return(0,m.jsxs)("div",(0,c.Z)({className:h,style:r},f,{children:[(0,m.jsx)("div",{className:t+"-bar",children:(0,m.jsx)("div",{className:t+"-inner",children:(0,m.jsx)("div",{className:t+"-bg",style:x})})}),e]}))}}]),t}(d.Component);cr.defaultProps={prefixCls:"w-progress",showText:!0,percent:0,width:126,strokeWidth:6};var dr={Line:cr,Circle:lr},ur=["prefixCls","count","value","className","allowHalf","character","readOnly","disabled","onChange","onHoverChange","color"];function fr(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-rate":t,i=n.count,a=void 0===i?5:i,o=n.value,l=void 0===o?0:o,f=n.className,h=n.allowHalf,p=n.character,v=void 0===p?"\u2605":p,x=n.readOnly,g=void 0!==x&&x,j=n.disabled,b=n.onChange,w=void 0===b?u:b,C=n.onHoverChange,N=void 0===C?u:C,Z=n.color,k=(0,s.Z)(e,ur),S=(0,d.useState)(l),E=(0,y.Z)(S,2),M=E[0],P=E[1],B=(0,d.useState)(-1),z=(0,y.Z)(B,2),L=z[0],O=z[1],D=[r,f,j?"disabled":null].filter(Boolean).join(" ").trim(),R=(0,d.useState)(),A=(0,y.Z)(R,2),T=A[0],I=A[1];function F(e,n){e.persist();var t=n,r=e.clientX-e.currentTarget.getBoundingClientRect().left<=e.currentTarget.getBoundingClientRect().width/2;return h?(e.persist(),t=r?n+.5:n+1):t=n+1,t}return l!==T&&I(l),(0,d.useMemo)((function(){M!==T&&P(l)}),[T]),(0,m.jsx)("div",(0,c.Z)({},k,{className:D,onMouseLeave:function(){O(-1)},children:(0,Ze.Z)(Array(a)).map((function(e,n){var t=M<=n+.5&&Math.ceil(M)-1===n&&-1===L||L===n+.5,i=[r+"-hight",n+1<=M&&-1===L?"star-on":null,n+1<=L?"hover-on":null,t?"half-on":null].filter(Boolean).join(" ").trim(),a={};return g||(a.onClick=function(e){return function(e,n){if(!g){var t=F(e,n);P(t),w(t)}}(e,n)},a.onMouseMove=function(e){return function(e,n){var t=F(e,n);L!==t&&(O(t),N(t))}(e,n)}),(0,m.jsxs)("span",(0,c.Z)({},a,{children:[(0,m.jsx)("span",{style:{color:Z},className:i,children:v}),(0,m.jsx)("span",{className:r+"-bg",children:v})]}),n)}))}))}var hr=["prefixCls","className","style","title","children","visible","color","disabled","bordered","closable","light","onClose"],pr=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-tag":t,i=n.className,a=n.style,o=n.title,l=void 0===o?"":o,d=n.children,u=n.visible,f=void 0===u||u,h=n.color,p=void 0===h?"#6E6E6E":h,v=n.disabled,x=void 0!==v&&v,y=n.bordered,g=void 0===y||y,j=n.closable,b=n.light,w=void 0!==b&&b,C=n.onClose,N=(0,s.Z)(e,hr),Z=[r,i,w?r+"-light":null,x?"disabled":null].filter(Boolean).join(" ").trim(),k=(0,c.Z)({},a);return w?(k.color=p,k.borderColor=p,g&&w&&(k.boxShadow="inset 0 0 0 1px "+p)):(k.color="#fff",k.backgroundColor=p),f?(0,m.jsxs)("span",(0,c.Z)({className:Z,style:k},N,{children:[l||d,!x&&j?(0,m.jsx)("svg",{onClick:C,className:r+"-close",width:"15",height:"15",viewBox:"0 0 16 16",children:(0,m.jsx)("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z"})}):null]})):null},mr=["allowClear","disabled","valueAmount","size","option","maxTagCount","loading","labelInValue","prefixCls","className","mode","style","isOpen","value","defaultValue","showSearch","tagProps","placeholder","onSearch","onChange","onSelect"],vr={large:25,default:20,small:17};function xr(e){var n,t=e.allowClear,r=void 0!==t&&t,i=e.disabled,a=void 0!==i&&i,o=e.valueAmount,l=e.size,u=void 0===l?"default":l,f=e.option,h=void 0===f?[]:f,p=e.maxTagCount,v=e.loading,x=void 0!==v&&v,g=e.labelInValue,j=void 0!==g&&g,b=e.prefixCls,w=void 0===b?"w-search-select":b,C=e.className,N=e.mode,Z=void 0===N?"single":N,k=e.style,S=e.value,E=e.defaultValue,M=e.showSearch,B=void 0!==M&&M,z=e.tagProps,L=void 0===z?{}:z,O=e.placeholder,D=e.onSearch,R=e.onChange,A=e.onSelect,T=(0,s.Z)(e,mr),I=[w,C].filter(Boolean).join(" ").trim(),F=(0,d.useMemo)((function(){return"multiple"===Z}),[Z]),H=(0,d.useState)(!1),W=(0,y.Z)(H,2),V=W[0],_=W[1],K=(0,d.useState)([]),Y=(0,y.Z)(K,2),$=Y[0],U=Y[1],J=(0,d.useState)(""),G=(0,y.Z)(J,2),q=G[0],X=G[1],Q=(0,d.useState)(""),ee=(0,y.Z)(Q,2),ne=ee[0],te=ee[1],re=(0,d.useRef)(null),ie=(0,d.useMemo)((function(){return p&&$.length>p?$.length-p:0}),[$.length]),ae=(0,d.useRef)(null),oe=function(e){return void 0!==e&&""!==e},le=(0,d.useRef)();le.current=(0,d.useMemo)((function(){return $}),[$]),(0,d.useEffect)((function(){!oe(S)&&oe(E)&&ce(E)}),[]),(0,d.useEffect)((function(){a&&_(!1)}),[a]),(0,d.useEffect)((function(){oe(S)&&ce(S)}),[JSON.stringify(S)]);var se=function(e,n){var t=e.find((function(e){return e.value===n}));return t};function ce(e){var n=[];if(j)Array.isArray(e)?n=e:n.push(e);else if(Array.isArray(e))n=e.map((function(e){return se(h,e)})).filter((function(e){return!!e}));else{var t=se(h,e);t&&(X(t.label),n.push(t))}!F&&n.length>0&&X(n[0].label||""),U(n.slice(0,o))}var de=function(e){X(e),B&&(null==D||D(e))};function ue(e,n){var t=-1!==e?function(e){var n=le.current;return n.splice(e,1),(0,Ze.Z)(n)}(e):[].concat((0,Ze.Z)($.slice(0,o?o-1:void 0)),[n]),r=t.map((function(e){return e.value}));fe(r,t)}function fe(e,n){X(""),A&&A(e),ve(e,n),void 0===S&&U(n)}function he(e){var n;n="enter"===e&&r&&($.length>0||q)?"close":"",te(n)}function pe(e){_(!0),te(B&&e?"loading":""),de(e)}function me(e){var n;e.stopPropagation(),null==(n=re.current)||n.focus(),U([]),pe(""),_(!1),ve("",[])}function ve(e,n){R&&R(j?n:e)}return(0,m.jsx)(an,(0,c.Z)({className:I,trigger:"click",style:{marginTop:5},overlayStyl:{width:100},disabled:a},T,{onVisibleChange:function(e){var n=le.current;_(e),e||de(""),!F&&n.length>0&&X(n[0].label)},isOpen:V,menu:(0,m.jsx)(yn,{bordered:!0,style:{minHeight:25,maxHeight:280,minWidth:null!=(n=null==k?void 0:k.width)?n:200,overflowY:"scroll",width:null==k?void 0:k.width},children:h&&0!==h.length?h.map((function(e){var n=$.findIndex((function(n){return n.value===e.value}));return(0,m.jsx)(yn.Item,{active:-1!==n,text:e.label,onClick:function(){return F?ue(n,e):function(e){_(!1);var n=[e];X(e.label),fe(e.value,n)}(e)}},n)})):(0,m.jsx)("div",{style:{color:"#c7c7c7",fontSize:12},children:x?"\u6b63\u5728\u52a0\u8f7d\u6570\u636e...":"\u6ca1\u6709\u6570\u636e"})}),children:(0,m.jsx)("div",{ref:ae,onMouseOver:function(){return he("enter")},onMouseLeave:function(){return he("leave")},onClick:function(){var e;return null==(e=re.current)?void 0:e.focus()},style:(0,c.Z)({width:"100%",maxWidth:"none"},k),children:F?(0,m.jsxs)("div",{className:[w+"-inner",w+"-search-"+B,w+"-"+u].filter(Boolean).join(" ").trim(),children:[(0,m.jsxs)("div",{className:w+"-tag-content",style:{},children:[F&&$.slice(0,p).map((function(e,n){return(0,m.jsx)(pr,(0,c.Z)({style:(0,c.Z)({height:vr[u],margin:1,display:"flex",alignItems:"center"},L.style),color:"#393E48"},L,{closable:!0,disabled:a,onClose:function(t){t.stopPropagation(),ue(n,e)},children:e.label}),n)})),!!ie&&(0,m.jsxs)(pr,{style:{height:20,margin:1,display:"flex",alignItems:"center"},disabled:!0,children:["+",ie," \u2026"," "]}),(0,m.jsx)(Ne,{style:{flex:1,width:B?0:50},className:w+"-input-contents",readOnly:!B,size:u,ref:re,disabled:a,onKeyDown:function(e){F&&$.length>0&&!q&&8===e.keyCode&&ue($.length-1)},onChange:function(e){return pe(e.target.value)},value:q,placeholder:$.length?"":O})]}),!a&&("close"===ne||"loading"===ne&&x)&&(0,m.jsx)(P,{className:w+"-multiple-colse",type:ne,spin:x&&"loading"===ne,onClick:me})]}):(0,m.jsx)(Ne,{className:w+"-search-"+B,readOnly:!B,size:u,ref:re,disabled:a,onChange:function(e){return pe(e.target.value)},value:q,placeholder:O,addonAfter:!a&&("close"===ne||"loading"===ne&&x)&&(0,m.jsx)(P,{type:ne,className:w+"-singe-colse",color:"#393e48",spin:x&&"loading"===ne,onClick:me})})})}))}var yr=t(1064),gr=["prefixCls","className","style","status","itemWidth","icon","adjustMarginRight","stepNumber","title","description","progressDot"];var jr=["prefixCls","style","className","children","current","status","progressDot","direction"];function br(e){var n=e.prefixCls,t=void 0===n?"w-steps":n,r=e.style,i=void 0===r?{}:r,a=e.children,o=e.current,l=e.status,u=void 0===l?"process":l,f=e.progressDot,h=void 0!==f&&f,p=e.direction,v=void 0===p?"horizontal":p,x=(0,s.Z)(e,jr),g=(0,d.useRef)(null),j=(0,d.useState)(0),b=(0,y.Z)(j,2),w=b[0],C=b[1],N=d.Children.toArray(a).filter((function(e){return!!e})),Z=N.length-1,k=[t,t+"-"+v,h?t+"-dot":null].filter(Boolean).join(" ").trim();return(0,d.useEffect)((function(){return function(){var e=g.current;if(e&&e.lastChild){var n=(e.lastChild.offsetWidth||0)+1;if(n===w||Math.abs(n-w)<=3)return;C(n)}}()})),(0,m.jsx)("div",(0,c.Z)({className:k,style:i},x,{ref:g,children:d.Children.map(a,(function(e,n){var r=(0,c.Z)({stepNumber:""+(n+1),prefixCls:t,progressDot:h},e.props);return n!==Z&&"vertical"!==v&&(r.itemWidth=100/Z+"%",r.adjustMarginRight=-Math.round(w/Z+1)),h&&"vertical"!==v&&(r.itemWidth=100/N.length+"%",r.adjustMarginRight=0),"error"===u&&n===o-1&&(r.className=t+"-next-error"),e.props.status||(r.status=n===o?u:n=100&&(t=100);var r=n*(t/100)+.5;return Math.floor(r)*x+l}function K(e){if(T.current){var n=(0,Ze.Z)(H),t=_(e[E?"clientY":"clientX"]-O.current+R.current);if(t!==D.current){n[L.current]=t;var r=U(n);B.current&&(B.current.style[E?"top":"left"]=r.left,B.current.style[E?"bottom":"right"]=r.right),V(n),D.current=t}}}function Y(){T.current=void 0,window.removeEventListener("mousemove",K,!1),window.removeEventListener("mouseup",Y,!1)}(0,d.useEffect)((function(){return W(Array.isArray(a)?a:[a])}),[a]),P.onClick=function(e){if(void 0===T.current){var n=z.current.getBoundingClientRect();V(function(e){if(!Array.isArray(a))return Array.isArray(e)?e:[e];var n=(0,Ze.Z)(H),t=n[0],r=n[1];(te||t>r&&tr&&r>e)&&(n[1]=e);if(t>e&&r=e&&(n[1]=e),ie&&t=e&&(n[0]=e),oe[1]?e[1]:e[0],r=e[0]>e[1]?e[0]:e[1];n.left=$(t)+"%",n.right=100-$(r)+"%"}else n.right=100-$(e[0])+"%";return n}function J(e){return k&&!0!==k&&k[e]&&k[e].label?k[e].label:k&&!0!==k&&k[e]&&"string"===typeof k[e]?k[e]:S&&"function"===typeof S&&S(e)?S(e):e}var G=U();return j&&delete P.onClick,(0,m.jsxs)("div",(0,c.Z)({ref:z,className:[r,Z,j?"disabled":null,k?r+"-with-marks":null,E?r+"-vertical":null].filter(Boolean).join(" ").trim()},P,{children:[(0,m.jsx)("div",{ref:B,className:r+"-bar",style:(0,c.Z)((n={},(0,it.Z)(n,E?"top":"left",G.left),(0,it.Z)(n,E?"bottom":"right",G.right),n),!0!==w?{backgroundColor:w||"initial"}:{})}),(0,Ze.Z)(H).map((function(e,n){var t=$(e);return(0,m.jsx)("div",{className:r+"-handle",onMouseDown:function(e){return function(e,n){if(!j){L.current=e,T.current=!0,O.current=n[E?"clientY":"clientX"],B.current&&(R.current=B.current[E?"clientHeight":"clientWidth"],A.current=B.current[E?"offsetTop":"offsetLeft"]);var t=(0,Ze.Z)(H);Array.isArray(a)&&(R.current=1===L.current&&t[1]>t[0]||1!==L.current&&t[0]>t[1]?R.current+A.current:A.current),window.addEventListener("mousemove",K),window.addEventListener("mouseup",Y)}}(n,e)},style:(0,it.Z)({},E?"top":"left",t+"%"),children:(N||!1===N)&&(0,m.jsx)("div",{className:[r+"-tooltip",N?"open":null].filter(Boolean).join(" ").trim(),children:J(e)})},n)})),p&&(0,m.jsx)(Cr,{prefixCls:r,min:l,step:x,marks:k,vertical:!!E,data:function(){for(var e=(f-l)/x,n=100*x/(f-l),t=[0],r=1;r0&&(n=Er(t,n+1)),n}function Mr(e,n){void 0===e&&(e=[]),void 0===n&&(n=[]);for(var t=[],r=0;r0&&(t=t.concat(Mr(e[r].children,n))):t.push(e[r]);return t}function Pr(e,n){n||(n={header:[],render:{}}),n&&!n.header&&(n.header=[]),n&&!n.render&&(n.render={});for(var t=[],r=[],i=0;i0&&(e[i].colSpan=Mr(e[i].children).length),r.push(e[i])),e[i]&&e[i].children&&(t=t.concat(e[i].children.map((function(e){return e.children&&e.children.length>0&&(e.colSpan=Mr(e.children).length),e}))));if(0===n.header.length){var a=Er(r);n.header.push(r.map((function(e){return 1===a||(!e.children||e.children&&0===e.children.length)&&(e.rowSpan=a),e})))}if(t&&t.length>0){var o=Er(t);n.header.push(t.map((function(e){return 1===o||(!e.children||e.children&&0===e.children.length)&&(e.rowSpan=o),e}))),n=Pr(t,n)}return n}function Br(e,n){void 0===n&&(n=[]);for(var t=0;t0&&o.map((function(e,n){return(0,m.jsx)("tr",{children:(e||[]).map((function(e,t){var i=e.title,a=e.ellipsis,o=(e.fixed,(0,s.Z)(e,Rr)),l=(0,m.jsx)("span",{className:a?(o.className||"")+" "+r+"-ellipsis":void 0,children:"function"===typeof i?i(e,t,n):i});return 0===o.colSpan?null:(0,m.jsx)(Or,{colNum:t,item:e,prefixCls:r,onCellHead:d,rowNum:n,titleNode:l,locationWidth:f,updateLocation:h},t)}))},n)}))}))}function Tr(e){var n=e.defaultExpand,t=e.onClick,r=e.expandIcon,i=(0,d.useState)(n),a=(0,y.Z)(i,2),o=a[0],l=a[1];return(0,m.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(){l(!o),t(o)},children:r(o)})}function Ir(e){var n=e.rowKey,t=e.data,r=e.keys,i=e.render,a=e.ellipsis,o=e.prefixCls,l=e.onCell,s=void 0===l?u:l,f=e.isExpandedDom,h=e.hierarchy,p=e.indentSize,v=e.childrenColumnName,x=e.locationWidth,g=e.header,j=(0,d.useState)(!1),b=(0,y.Z)(j,2),w=b[0],C=b[1],N=(0,d.useState)(0),Z=(0,y.Z)(N,2),k=Z[0],S=Z[1],E=(0,d.useState)([]),M=(0,y.Z)(E,2),B=M[0],z=M[1];(0,d.useEffect)((function(){C(!(null==t||!t.find((function(e){return e[v]})))),S(-1===(null==r?void 0:r.findIndex((function(e){return"uiw-expanded"===e.key})))?0:1)}),[t]);var L=(0,d.useMemo)((function(){return function(e,n){var t=B.includes(e);return(0,m.jsx)(P,{type:t?"minus-square-o":"plus-square-o",style:{marginRight:10,opacity:n?1:0,marginLeft:h*p,float:"left",marginTop:3.24},onClick:function(){z(t?B.filter((function(n){return n!==e})):[].concat((0,Ze.Z)(B),[e]))}})}}),[B]),O=function(e){var n=0,t=g.findIndex((function(t){return n=t.findIndex((function(n){return n.key===e})),n>-1}));return""+t+n};return Array.isArray(t)&&t.length?(0,m.jsx)(d.Fragment,{children:t.map((function(t,l){var u=n?t[n]:l;return(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)("tr",{children:r.map((function(e,n){var r={children:t[e.key]};if(i[e.key]){var f=i[e.key](t[e.key],e.key,t,l,n);if(d.isValidElement(f))r.children=f;else{if(f.props&&(r=(0,c.Z)({},f.props,{children:r.children}),0===f.props.rowSpan||0===f.props.colSpan))return null;f.children&&(r.children=f.children)}}var y=Array.isArray(t[v]);return n===k&&(w||h||y)&&(r.children=(0,m.jsxs)(m.Fragment,{children:[L(u,y),(0,m.jsx)("span",{style:{paddingLeft:h*p}}),r.children]})),e.fixed&&("right"===e.fixed?r.className=o+"-fixed-right":r.className=o+"-fixed-true"),(0,d.createElement)("td",(0,c.Z)({},r,{style:e.fixed?(0,c.Z)({},zr(e.fixed,x,""+O(e.key||"undefined"))):{},children:(0,m.jsx)("span",{className:a&&a[e.key]?o+"-ellipsis":void 0,children:r.children}),key:n,className:[o+"-tr-children-"+(e.align||"left"),e.className,r.className].filter((function(e){return e})).join(" ").trim(),onClick:function(r){return s(t,{rowNum:l,colNum:n,keyName:e.key},r)}}))}))},u),f(t,l),B.includes(u)&&(0,m.jsx)(Ir,(0,c.Z)({},e,{data:t[v],hierarchy:h+1}))]},l)}))}):null}var Fr=["prefixCls","className","columns","data","title","footer","bordered","onCell","onCellHead","empty","children","expandable","rowKey","scroll"];function Hr(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-table":t,i=n.className,a=n.columns,o=void 0===a?[]:a,l=n.data,f=void 0===l?[]:l,h=n.title,p=n.footer,v=n.bordered,x=n.onCell,g=void 0===x?u:x,j=n.onCellHead,b=void 0===j?u:j,w=n.empty,C=n.expandable,N=n.rowKey,Z=n.scroll,k=(0,s.Z)(e,Fr),S=(0,d.useState)([]),E=(0,y.Z)(S,2),M=E[0],B=E[1],z=(0,d.useState)({}),L=(0,y.Z)(z,2),O=L[0],D=L[1],R=(0,d.useRef)({}),A=function e(n,t){var r=0,i=0,a=[];n.forEach((function(e,o){var l=""+t+i;if("number"===typeof n[o])return r=n[o]+r,void a.push(n[o]);R.current[l]&&(R.current[l].left=r,r=R.current[l].width+r,Array.isArray(n[o].children)?a.push.apply(a,(0,Ze.Z)(n[o].children)):a.push(R.current[l].width)),i+=1})),r=0,i=_[t].length-1;for(var o=n.length-1;o>=0;o--){var l=""+t+i;"number"!==typeof n[o]?(R.current[l]&&(R.current[l].right=r,r=R.current[l].width+r),i-=1):r=n[o]+r}a.filter((function(e){return"number"!==typeof e})).length&&e(a,t+1)},T=function(){return A(o,0),R.current};(0,d.useEffect)((function(){var e=(null==C?void 0:C.childrenColumnName)||"children";if(C){if(C.defaultExpandAllRows)return void B(function n(t){var r=[],i=t.map((function(t,i){return Array.isArray(t[e])&&r.push.apply(r,(0,Ze.Z)(n(t[e]))),N?t[N]:i}));return[].concat(r,(0,Ze.Z)(i))}(f));if(C.defaultExpandedRowKeys)return void B(C.defaultExpandedRowKeys)}}),[]),(0,d.useEffect)((function(){C&&C.expandedRowKeys&&JSON.stringify(C.expandedRowKeys)!==JSON.stringify(M)&&B(C.expandedRowKeys)}),[null==C?void 0:C.expandedRowKeys]);var I=(0,d.useMemo)((function(){return function(e,n){if(!C)return!1;if(!C.expandedRowRender)return!1;var t=!0;return C.rowExpandable&&(t=C.rowExpandable(e)),t&&(0,m.jsx)("tr",{style:M.includes(N?e[N]:n)?{}:{display:"none"},children:(0,m.jsx)("td",{style:{paddingLeft:16},colSpan:o.length+1,children:C.expandedRowRender(e,n,!0)})})}}),[C,M]),F=(0,d.useMemo)((function(){var e=Br(o),n=[];return null!=C&&C.expandedRowRender?(e=[{key:"uiw-expanded",align:"center"}].concat((0,Ze.Z)(e)),n=[{title:"",key:"uiw-expanded",width:50,align:"center",render:function(e,n,t,r){var i;return(0,m.jsx)(Tr,{defaultExpand:void 0===C.defaultExpandAllRows?!(null==(i=C.defaultExpandedRowKeys)||!i.includes(N?t[N]:r)):!!C.defaultExpandAllRows,onClick:function(e){if(null==C.onExpand||C.onExpand(e,t,r),e){var n=M.filter((function(e){return N?e!==t[N]:e!==r}));C.onExpandedRowsChange?C.onExpandedRowsChange(n):B(n)}else{var i=[].concat((0,Ze.Z)(M),[N?t[N]:r]);C.onExpandedRowsChange?C.onExpandedRowsChange(i):B(i)}},expandIcon:function(e){return!C.rowExpandable||null!=C.rowExpandable&&C.rowExpandable(t)?C.expandIcon?C.expandIcon(e,t,r):e?(0,m.jsx)(P,{type:"minus-square-o"}):(0,m.jsx)(P,{type:"plus-square-o"}):null}})}}].concat((0,Ze.Z)(o))):n=(0,Ze.Z)(o),{keys:e,selfColumns:n}}),[o,M]),H=(0,d.useMemo)((function(){var e={table:{},div:{}};return Z&&(void 0!==Z.x&&(e.table.minWidth="100%",e.table.width=Z.x,e.div.overflowX="auto",e.div.overflowY="hidden"),void 0!==Z.y&&(e.div.maxHeight=Z.y,e.div.overflowY="scroll")),e}),[Z]),W=[r,i,v?r+"-bordered":null].filter(Boolean).join(" ").trim(),V=Pr(F.selfColumns),_=V.header,K=V.render,Y=V.ellipsis;return(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)("div",(0,c.Z)({className:W},k,{style:(0,c.Z)({},k.style,H.div),children:(0,m.jsxs)("table",{style:(0,c.Z)({tableLayout:Y?"fixed":"auto"},H.table),children:[h&&(0,m.jsx)("caption",{children:h}),o&&o.length>0&&(0,m.jsx)(Ar,{onCellHead:b,data:_,locationWidth:O,updateLocation:function(e,n,t,r){void 0===r&&(r=0),R.current=(0,c.Z)({},R.current,(0,it.Z)({},n,(0,c.Z)({},R.current[n],e,{key:t,colSpan:r}))),n===""+(_.length-1)+(_[_.length-1].length-1)&&D(T())}}),f&&f.length>0&&(0,m.jsx)("tbody",{children:(0,m.jsx)(Ir,{rowKey:N,locationWidth:O,data:f,header:_,keys:F.keys,render:K,ellipsis:Y,prefixCls:r,onCell:g,hierarchy:0,isExpandedDom:I,indentSize:"number"===typeof(null==C?void 0:C.indentSize)?null==C?void 0:C.indentSize:16,childrenColumnName:(null==C?void 0:C.childrenColumnName)||"children"})}),f&&0===f.length&&w&&(0,m.jsx)("tbody",{children:(0,m.jsx)("tr",{children:(0,m.jsx)("td",{colSpan:o.length,style:{position:"relative",left:0},children:w})})}),e.children]})})),p&&(0,m.jsx)("div",{className:r+"-footer",children:p})]})}var Wr=["prefixCls","className","label"],Vr=["prefixCls","className","children","type","activeKey","onTabClick"];Kr.Pane=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-tabs-pane":t,i=n.className,a=(0,s.Z)(e,Wr);return(0,m.jsx)("div",(0,c.Z)({className:[r,i].filter(Boolean).join(" ").trim()},a))};var _r=0;function Kr(e){var n,t=e.prefixCls,r=void 0===t?"w-tabs":t,i=e.className,a=e.children,o=e.type,l=void 0===o?"default":o,u=e.onTabClick,f=(0,s.Z)(e,Vr),h=(0,d.useState)(e.activeKey),p=(0,y.Z)(h,2),v=p[0],x=p[1],g=(0,d.useState)({width:0,left:0}),j=(0,y.Z)(g,2),b=j[0],w=j[1],C=(0,d.useRef)(),N=[r,i,l?r+"-"+l:null].filter(Boolean).join(" ").trim(),Z=(0,d.useState)({content:0,nav:[],flowLeft:-1,displayStart:0,displayEnd:0}),k=(0,y.Z)(Z,2),S=k[0],E=k[1],M=(0,d.useState)([]),P=(0,y.Z)(M,2),B=P[0],z=P[1],L=(0,d.useState)(),O=(0,y.Z)(L,2),D=O[0],R=O[1],A=(0,d.useCallback)((function(e){null!==e&&(R(D),e.addEventListener("scroll",(function(e){var n=e.target,t=n.clientWidth,r=n.scrollLeft;S.displayStart=r,S.displayEnd=t+r,E((0,c.Z)({},S))})),S.displayEnd=e.getBoundingClientRect().width,E((0,c.Z)({},S)))}),[]),T=(0,d.useCallback)((function(n,t,r){null!==n&&(n.addEventListener("click",(function(e){C.current=n})),I(n.getBoundingClientRect().width,t),r===e.activeKey&&"line"===l&&0===_r&&(C.current=n))}),[]),I=function(e,n){var t=0;S.nav.slice(0,n+1).forEach((function(e){return t+=e.width})),S.nav[n]={width:e,curWidth:Math.floor(t),index:n},E(S)};(0,d.useEffect)((function(){F()}),[S.displayEnd>(null==(n=S.nav[S.nav.length-1])?void 0:n.curWidth)]);var F=function(){var e=[];S.nav.length>0&&(S.nav.forEach((function(n){var t=n.curWidth-15;(tS.displayEnd)&&e.push(n.index)})),z(e))};function H(){C.current&&"line"===l&&(_r=C.current.clientWidth,w({width:C.current.clientWidth,left:C.current.offsetLeft}))}return(0,d.useEffect)((function(){return x(e.activeKey)}),[e.activeKey]),(0,d.useEffect)((function(){return H()}),[v]),(0,m.jsxs)("div",(0,c.Z)({className:N},f,{children:[(0,m.jsxs)("div",{style:{display:"flex"},children:[(0,m.jsx)("div",{style:{overflow:"hidden"},children:(0,m.jsx)("div",{className:r+"-bar",ref:A,children:(0,m.jsxs)("div",{className:r+"-nav",style:{width:"max-content"},children:[W(a),(0,m.jsx)("div",{style:b,className:r+"-slide"})]})})}),B.length>0&&(0,m.jsx)(je,{trigger:"click",placement:"bottomRight",visibleArrow:!1,content:(0,m.jsx)("div",{className:r+"-nav-hidden",children:W(B.map((function(e){return a[e]})))}),children:(0,m.jsx)("div",{onClick:F,className:r+"-flow-content",children:(0,m.jsx)("span",{children:"\u2026"})})})]}),d.Children.map(a,(function(e){return e&&v===e.key?d.cloneElement(e,Object.assign({},e.props,{})):null}))]}));function W(e){return d.Children.map(e,(function(e,n){if(!e)return null;var t={className:[r+"-item",e.key===v?"active":null,e.props.disabled?"disabled":null].filter(Boolean).join(" ").trim(),children:e.props.label};return e.props.disabled||(t.onClick=function(n){x(e.key),u&&u(e.key,e,n),H()}),(0,m.jsx)("div",(0,c.Z)({ref:function(t){return T(t,n,e.key)}},t),n)}))}}var Yr=["prefixCls","className"],$r=d.forwardRef((function(e,n){var t=e.prefixCls,r=void 0===t?"w-textarea":t,i=e.className,a=(0,s.Z)(e,Yr);return(0,m.jsx)("textarea",(0,c.Z)({className:[r,i].filter(Boolean).join(" ").trim()},a,{ref:n,children:e.children}))})),Ur=["prefixCls","className","placement","isOpen","trigger","delay","usePortal","visibleArrow","onVisibleChange"],Jr=function(e){void 0===e&&(e={});var n=e,t=n.prefixCls,r=void 0===t?"w-tooltip":t,i=n.className,a=n.placement,o=void 0===a?"top":a,l=n.isOpen,d=void 0!==l&&l,u=n.trigger,f=n.delay,h=n.usePortal,p=void 0===h||h,v=n.visibleArrow,x=void 0===v||v,y=n.onVisibleChange,g=(0,s.Z)(e,Ur),j=[r,i,x?null:"no-arrow"].filter(Boolean).join(" ").trim();return(0,m.jsx)(ye,(0,c.Z)({usePortal:p,isOpen:d,trigger:u,delay:f,onVisibleChange:y,placement:o},g,{overlay:(0,m.jsxs)("div",{className:j,children:[x&&(0,m.jsx)("div",{className:r+"-arrow"}),(0,m.jsx)("div",{className:r+"-inner",children:e.content})]}),children:"object"===typeof e.children?e.children:(0,m.jsx)("span",{children:e.children})}))},Gr=["prefixCls","renderTitle","icon","iconAnimation","isSelected","openKeys","selectedKeys","data","level","parent","onItemClick","onItemSelected"],qr=function(e){var n=e.label;return(0,d.useMemo)((function(){return(0,m.jsx)("span",{children:n})}),[n])};function Xr(e){var n=e.prefixCls,t=e.renderTitle,r=e.icon,i=e.iconAnimation,a=e.isSelected,o=e.openKeys,l=e.selectedKeys,f=e.data,h=e.level,p=e.parent,v=e.onItemClick,x=void 0===v?u:v,y=e.onItemSelected,g=void 0===y?u:y,j=(0,s.Z)(e,Gr),b=!1;p&&(p.key||0===p.key)&&(b=!!(o&&o.indexOf(p.key)>-1));var C=(0,d.useCallback)((function(e){e.style.height=e.scrollHeight+"px"}),[]),N=(0,d.useCallback)((function(e){e.style.height="1px"}),[]),Z=(0,d.useCallback)((function(e,n){e.style.height="1px"}),[]),k=(0,d.useCallback)((function(e,n){e.style.height=e.scrollHeight+"px"}),[]),S=(0,d.useCallback)((function(e,n){e.style.height="initial"}),[]);return(0,m.jsx)(w.Z,{classNames:n,in:b,timeout:200,onExit:C,onExiting:N,onEnter:Z,onEntered:S,onEntering:k,children:(0,m.jsx)("ul",{className:[1!==h&&b?[n+"-open"]:null,1===h||b?null:[n+"-close"]].filter(Boolean).join(" ").trim(),children:f.map((function(e,s){var d;e.parent=p;var u=!!(l&&l.indexOf(e.key)>-1),f=!e.children,v=o&&o.indexOf(e.key)>-1&&!!e.children,y="function"===typeof r?r(e,{isOpen:!!v,noChild:f,openKeys:o,selectedKeys:l}):r,b=f?[]:ni(e.children),w=l?l.filter((function(e){return b.indexOf(e)>-1})):[],C=w.length>0&&b.length!==w.length;return(0,m.jsxs)("li",{style:{display:e.hideNode?"none":"block"},children:[(0,m.jsxs)("div",{className:n+"-label",children:[(0,m.jsx)("span",{style:{display:f?"none":"auto"},className:n+"-switcher",onClick:function(n){return x(e,n)},children:(0,m.jsx)(P,{type:y||"caret-right",className:["function"===typeof r?n+"-switcher-noop":null,f?"no-child":null,i?null:"no-animation",v?"open":null].filter(Boolean).join(" ").trim()})}),(0,m.jsx)("div",{onClick:function(n){return g(e,n)},className:[n+"-title",u&&a?"selected":null,e.disabled?"disabled":null].filter(Boolean).join(" ").trim(),children:t?t(e,{selected:u,noChild:f,openKeys:o,isHalfChecked:C,selectedKeys:l}):(0,m.jsx)(qr,{label:e.label})})]}),e.children&&(0,m.jsx)(Xr,(0,c.Z)({},j,(d={prefixCls:n,icon:r,iconAnimation:i,isSelected:a,openKeys:o,selectedKeys:l,onItemClick:x,onItemSelected:g,renderTitle:t},(0,it.Z)(d,"prefixCls",n),(0,it.Z)(d,"data",e.children),(0,it.Z)(d,"level",h+1),(0,it.Z)(d,"parent",e),d)))]},s)}))})})}var Qr=["prefixCls","icon","data","openKeys","selectedKeys","defaultExpandAll","showLine","iconAnimation","isSelected","checkStrictly","multiple","onExpand","onSelected","className","autoExpandParent","renderTitle","onChange","value"],ei=function(e,n){if(!(e instanceof Array)||!(n instanceof Array))return!1;if(e.length0&&(t=t.concat(e(n.children,void 0,r?r-1:void 0)))})),t},ti=function e(n,t){return void 0===n&&(n={}),void 0===t&&(t=[]),n.key&&t.push(n.key),n.parent&&(t=e(n.parent,t)),t},ri=function e(n,t,r){return void 0===n&&(n={}),void 0===t&&(t=[]),void 0===r&&(r=[]),n.key&&n.children&&ei(t,ni(n.children,void 0,1))&&(r.push(n.key),n.parent&&!n.parent.parent&&(ei(t,ni(n.children))&&(t=t.concat(r)),ei(t,ni(n.parent.children))&&r.push(n.parent.key))),n.parent&&(r=e(n.parent,t,r)),r};function ii(e){var n=e.prefixCls,t=void 0===n?"w-tree":n,r=e.icon,i=void 0===r?"caret-right":r,a=e.data,o=void 0===a?[]:a,l=e.openKeys,f=void 0===l?[]:l,h=e.selectedKeys,p=void 0===h?[]:h,v=e.defaultExpandAll,x=void 0!==v&&v,g=e.showLine,j=void 0!==g&&g,b=e.iconAnimation,w=void 0===b||b,C=e.isSelected,N=void 0===C||C,Z=e.checkStrictly,k=void 0!==Z&&Z,S=e.multiple,E=void 0!==S&&S,M=e.onExpand,P=void 0===M?u:M,B=e.onSelected,z=void 0===B?u:B,L=e.className,O=e.autoExpandParent,D=void 0===O||O,R=e.renderTitle,A=e.onChange,T=e.value,I=(0,s.Z)(e,Qr),F=(0,d.useState)(f),H=(0,y.Z)(F,2),W=H[0],V=H[1],_=(0,d.useState)(T||p),K=(0,y.Z)(_,2),Y=K[0],$=K[1];(0,d.useEffect)((function(){$(e.value||e.selectedKeys||[])}),[JSON.stringify(e.selectedKeys),JSON.stringify(e.value)]),(0,d.useEffect)((function(){var e=(0,Ze.Z)(W);if(x)e=ni(o);else if(D){var n;(n=e).push.apply(n,(0,Ze.Z)(ni(o||[],void 0,1)))}V(e)}),[]);var U=[L,t,j?t+"-line":null].filter(Boolean).join(" ").trim();return(0,m.jsx)("div",(0,c.Z)({className:U},I,{children:(0,m.jsx)(Xr,{icon:i,iconAnimation:w,isSelected:N,openKeys:W,selectedKeys:Y,prefixCls:t,renderTitle:R,onItemClick:function(e,n){if(e.children){var t=(0,Ze.Z)(W),r=t.find((function(n){return n===e.key})),i=n.currentTarget.className.replace(/(\s)open/g,""),a=!1;!r&&e.key?(t.push(e.key),n.currentTarget.className=[i,"open"].filter(Boolean).join(" ").trim(),a=!0):(t=t.filter((function(n){return n!==e.key})),n.currentTarget.className=i),V(t),P&&P(e.key,a,e,n)}},onItemSelected:function(e,n){var t=(0,Ze.Z)(Y),r=t.find((function(n){return n===e.key})),i=!1;r||0===r?t=t.filter((function(n){return n!==e.key})):(i=!0,t.push(e.key)),k&&(r?t=(t=t.filter((function(n){return-1===ni(e.children).indexOf(n)}))).filter((function(n){return-1===ti(e.parent).indexOf(n)})):(t=(t=t.concat(ni(e.children).filter((function(e){return-1===t.indexOf(e)})))).concat(ri(e,t)),t=Array.from(new Set(t)))),E||(t=r?[]:[e.key]),$(t),z&&z(t,e.key,i,e,n),null==A||A(e.key,t)},data:o,level:1})}))}var ai=["prefixCls"];function oi(e){var n=e.prefixCls,t=void 0===n?"w-treechecked":n,r=(0,s.Z)(e,ai);return r.className=[t,r.className].filter(Boolean).join(" ").trim(),r.checkStrictly=!0,r.isSelected=!1,r.multiple=!0,(0,m.jsx)(ii,(0,c.Z)({renderTitle:function(e,n){var r={};return n.isHalfChecked&&(r.indeterminate=!0),n.selected?r.checked=!0:r.checked=!1,(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)(Ln,(0,c.Z)({className:t+"-checked"},r)),e.label&&(0,m.jsx)("span",{children:e.label})]})}},r))}var li={large:25,default:20,small:17};var si=function(e){var n=e.prefixCls,t=void 0===n?"w-search-tree":n,r=e.size,i=void 0===r?"default":r,a=e.disabled,o=void 0!==a&&a,l=e.allowClear,s=void 0!==l&&l,u=e.loading,f=void 0!==u&&u,h=e.selectCloseDrop,p=void 0!==h&&h,v=e.className,x=e.style,g=e.placeholder,j=e.tagProps,b=void 0===j?{}:j,w=e.content,C=e.options,N=e.values,Z=e.onChange,k=e.onSearch,S=e.emptyOption,E=[t,v].filter(Boolean).join(" ").trim(),M=(0,d.useState)(!1),B=(0,y.Z)(M,2),z=B[0],L=B[1],O=(0,d.useState)(N),D=(0,y.Z)(O,2),R=D[0],A=D[1],T=(0,d.useRef)(),I=(0,d.useState)(""),F=(0,y.Z)(I,2),H=F[0],W=F[1];T.current=(0,d.useMemo)((function(){return R}),[R]);var V=(0,d.useState)(""),_=(0,y.Z)(V,2),K=_[0],Y=_[1],$=(0,d.useRef)(null);function U(e){var n="enter"===e&&s&&(R.length||H)?"close":"";Y(n)}(0,d.useEffect)((function(){A(N)}),[JSON.stringify(N)]);var J=function(e,n,t){void 0===t&&(t=!0),A(e),X(""),null==Z||Z(e,n,t)},G=function(e){var n=T.current,t=n[e];n.splice(e,1),J((0,Ze.Z)(n),t,!1)};function q(e){L(!0),X(e),Y(e?"loading":"")}var X=function(e){W(e),null==k||k(e)},Q=(0,d.useMemo)((function(){if(S)return"boolean"===typeof S?(0,m.jsx)(st,{style:{minWidth:200,width:null==x?void 0:x.width}}):S;var e=(0,c.Z)({},w.props,{onSelected:function(e,n,t){void 0===t&&(t=!0),L(!p),J(e,n,t)},values:R,options:C});return d.cloneElement(w,e)}),[JSON.parse(JSON.stringify(R)),C,S]);return(0,m.jsx)(an,{className:E,trigger:"click",onVisibleChange:function(e){L(e),e||X("")},disabled:o,isOpen:z,menu:(0,m.jsx)(en,{bodyStyle:!0===S?{padding:0}:void 0,children:Q}),children:(0,m.jsx)("div",{onMouseOver:function(){return U("enter")},onMouseLeave:function(){return U("leave")},onClick:function(){var e;return null==(e=$.current)?void 0:e.focus()},style:(0,c.Z)({minWidth:(null==x?void 0:x.width)||200,maxWidth:"none"},x),children:(0,m.jsxs)("div",{className:[t+"-inner",t+"-"+i].filter(Boolean).join(" ").trim(),children:[(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"wrap",width:"100%"},children:[R.map((function(e,n){return(0,m.jsx)(pr,(0,c.Z)({style:{height:li[i],margin:1,display:"flex",alignItems:"center"},className:t+"-tag",closable:!0,color:"#393E48"},b,{disabled:o,onClose:function(e){e.stopPropagation(),G(n)},children:e.label}),n)})),(0,m.jsx)(Ne,{ref:$,className:t+"-input-contents",size:i,disabled:o,onKeyDown:function(e){R.length>0&&!H&&8===e.keyCode&&G(R.length-1)},onChange:function(e){return q(e.target.value)},value:H,placeholder:R.length?"":g})]}),!o&&(0,m.jsx)("span",{style:{height:25,width:14},className:t+"-close-tag-contents",children:("close"===K||"loading"===K&&f)&&(0,m.jsx)(P,{type:K,spin:f&&"loading"===K,onClick:function(e){var n;e.stopPropagation(),null==(n=$.current)||n.focus(),q(""),L(!1),A([]),J([])}})})]})})})},ci=["onChange","onSearch","multiple","options","value","emptyOption","treeProps"];function di(e){var n=(0,d.useState)({}),t=(0,y.Z)(n,2),r=t[0],i=t[1],a=(0,d.useState)([]),o=(0,y.Z)(a,2),l=o[0],s=o[1];(0,d.useEffect)((function(){var n,t={},r=null==(n=e.values)?void 0:n.map((function(e){return t[e.key]=e.label,e.key}));i(t),s(r||[])}),[e.values]);var u=function e(n,t,r){var i=function(e,n,r){r?t[e]=n:delete t[e]},a=function e(n){if(n.parent){var r=n.parent.children.filter((function(e){return!t[e.key]})).length;i(n.parent.key,n.parent.label,0===r),e(n.parent)}};return n.forEach((function(n){var o,l;null!=(o=n.children)&&o.length&&(t=e(n.children,t,r)),i(n.key,null==(l=n.label)?void 0:l.toString(),r),a(n)})),t};return(0,m.jsx)(oi,(0,c.Z)({defaultExpandAll:!0},e,{data:e.options,selectedKeys:l,onSelected:function(n,t,i,a){var o=u([a],r,i),l=!1;"number"===typeof t&&(l=!0);var s=Object.entries(o).map((function(e){var n=(0,y.Z)(e,2),t=n[0],r=n[1];return{key:l?Number.parseInt(t):t,label:r}}));null==e.onSelected||e.onSelected(s,{key:a.key,label:a.label},i)}}))}function ui(e){var n=(0,d.useState)([]),t=(0,y.Z)(n,2),r=t[0],i=t[1];(0,d.useEffect)((function(){var n,t=[];null!=(n=e.values)&&n.length&&(t[0]=e.values[0].key),i(t)}),[e.values]);return(0,m.jsx)(ii,(0,c.Z)({defaultExpandAll:!0},e,{multiple:!1,data:e.options,selectedKeys:r,onSelected:function(n,t,r,i){var a={key:i.key,label:i.label};null==e.onSelected||e.onSelected(r?[a]:[],a,r)}}))}var fi,hi=function(e){var n=e.onChange,t=(e.onSearch,e.multiple),r=void 0===t||t,i=e.options,a=void 0===i?[]:i,o=e.value,l=void 0===o?[]:o,u=e.emptyOption,f=void 0===u?!a.length:u,h=e.treeProps,p=(0,s.Z)(e,ci),v=(0,d.useState)(Array.isArray(l)?l:[l]),x=(0,y.Z)(v,2),g=x[0],j=x[1],b=(0,d.useState)(a),w=(0,y.Z)(b,2),C=w[0],N=w[1],Z=(0,d.useState)(f),k=(0,y.Z)(Z,2),S=k[0],E=k[1];return(0,d.useEffect)((function(){j(Array.isArray(l)?l:[])}),[JSON.stringify(l)]),(0,m.jsx)(si,(0,c.Z)({},p,{emptyOption:S,selectCloseDrop:!r,onSearch:function(e){!function n(t,r){void 0===r&&(r=!0),t.forEach((function(t){var i,a=!t.label.includes(e.trim())&&r;if(null!=(i=t.children)&&i.length){n(t.children,a);var o=t.children.find((function(e){return!e.hideNode}));t.hideNode=a&&!o}else t.hideNode=a}))}(a),N((0,Ze.Z)(a));var n=!0;a.forEach((function(e){return n=n&&!!e.hideNode})),E("boolean"===typeof f&&n?n:f)},onChange:function(e,t,r){j(e),null==n||n(t,e,r)},values:g,options:C,content:r?(0,m.jsx)(di,(0,c.Z)({},h)):(0,m.jsx)(ui,(0,c.Z)({},h))}))};!function(e){e[e.UnChecked=0]="UnChecked",e[e.AllChecked=1]="AllChecked",e[e.Indeterminate=2]="Indeterminate"}(fi||(fi={}));var pi=function(e){var n=e.placeholder,t=e.options,r=e.value,i=void 0===r?[]:r,a=e.showSearch,o=void 0!==a&&a,l=e.selectedAll,s=void 0!==l&&l,u=e.bodyStyle,f=e.style,h=e.className,p=e.prefixCls,v=void 0===p?"w-transfer":p,x=[v,h].filter(Boolean).join(" ").trim(),g=(0,d.useState)(""),j=(0,y.Z)(g,2),b=j[0],w=j[1],C=(0,d.useState)(""),N=(0,y.Z)(C,2),Z=N[0],k=N[1],S=(0,d.useState)(t||[]),E=(0,y.Z)(S,2),M=E[0],B=E[1],z=(0,d.useRef)(0),L=(0,d.useState)(new Map),O=(0,y.Z)(L,2),D=O[0],R=O[1],A=(0,d.useState)(new Map),T=(0,y.Z)(A,2),I=T[0],F=T[1],H=(0,d.useState)([]),W=(0,y.Z)(H,2),V=W[0],_=W[1],K=(0,d.useState)([]),Y=(0,y.Z)(K,2),$=Y[0],U=Y[1],J=(0,d.useState)([]),G=(0,y.Z)(J,2),q=G[0],X=G[1],Q=(0,d.useState)({left:fi.UnChecked,right:fi.UnChecked}),ee=(0,y.Z)(Q,2),ne=ee[0],te=ee[1];(0,d.useEffect)((function(){i&&(X(i||[]),null==i||i.forEach((function(e){return D.set(e.key,e.label)})),re((function(e){return!(null==i||!i.find((function(n){return e.key===n.key})))})))}),[JSON.stringify(i)]);var re=function(e){z.current=0;!function n(t){t.forEach((function(t){var r,i=e(t);if(null!=(r=t.children)&&r.length){n(t.children);var a=t.children.find((function(e){return!e.hideNode}));t.hideNode=i&&!a}else t.hideNode=i;t.hideNode||z.current++}))}(M),B((0,Ze.Z)(M))},ie=function e(n,t,r){var i=function(e,n,r){r?t.set(e,n):t.delete(e)},a=function e(n){if(n.parent){var r=n.parent.children.filter((function(e){return!t.get(e.key)&&!e.hideNode})).length;i(n.parent.key,n.parent.label,0===r),e(n.parent)}};return n.forEach((function(n){var o,l;null!=(o=n.children)&&o.length&&(t=e(n.children,t,r)),i(n.key,null==(l=n.label)?void 0:l.toString(),r),a(n)})),t},ae=function(n){"left"===n?(I.forEach((function(e,n){D.set(n,e)})),F(new Map),_([])):($.forEach((function(e){D.delete(e)})),U([])),R(D);var t=[];D.forEach((function(e,n){return t.push({key:n,label:e})})),null==e.onChange||e.onChange(n,t)},oe=function(e){return(0,m.jsx)(P,{onClick:function(){return e.click()},type:"down-square-o",className:v+"-arrow",style:(0,c.Z)({fontSize:20,stroke:"#e9e9e9",fill:"#333"},e.style)})};return(0,m.jsxs)("div",{className:x,style:(0,c.Z)({width:400},f),children:[(0,m.jsxs)(en,{bodyStyle:{padding:"5px 9px"},title:(0,m.jsxs)("div",{children:[s&&(0,m.jsx)(Ln,{indeterminate:V.length=z.current&&!!V.length,onChange:function(e){var n=e.target.checked;if(ne.left=n?1:0,n){var t=[];!function e(n){n.forEach((function(n){var r;null!=(r=n.children)&&r.length&&e(n.children),n.hideNode||(I.set(n.key,n.label),t.push(n.key))}))}(M),F(I),_(t)}else _([]),F(new Map);te(ne)}}),(0,m.jsxs)("label",{style:{marginLeft:3},children:[V.length,"/",z.current]})]}),className:v+"-card",children:[o&&(0,m.jsx)(Ne,{placeholder:n,value:b,onChange:function(n){return t=n.target.value,re((function(e){var n=!e.label.includes(t.trim());return n||(n=!!q.find((function(n){return n.key===e.key}))),n})),w(t),void(null==e.onSearch||e.onSearch("left",t));var t}}),(0,m.jsx)("div",{className:v+"-cheked-content",children:(0,m.jsx)(oi,{defaultExpandAll:!0,placeholder:n||"\u641c\u7d22\u9009\u9879",data:M,selectedKeys:V,onSelected:function(e,n,t,r){_(e);var i=ie([r],I,t);F(i)}})})]}),(0,m.jsxs)("div",{className:v+"-arrow-content",children:[(0,m.jsx)(oe,{click:function(){return ae("left")},style:{transform:"rotate(-90deg)",background:V.length>0?"#393E48":"none"}}),(0,m.jsx)(oe,{click:function(){return ae("right")},style:{transform:"rotate(90deg)",background:$.length>0?"#393E48":"none"}})]}),(0,m.jsxs)(en,{bodyStyle:{padding:"5px 9px"},className:v+"-card",title:(0,m.jsxs)("div",{children:[s&&(0,m.jsx)(Ln,{indeterminate:$.length=a)&&Object.keys(t.O).every((function(e){return t.O[e](r[s])}))?r.splice(s--,1):(l=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[r,i,a]}}(),t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(n,r){return t.f[r](e,n),n}),[]))},t.u=function(e){return"static/js/"+({889:"vendors-prismjs",6982:"vendors-standalone"}[e]||e)+"."+{163:"d3530f01",207:"891adb65",221:"165726fd",433:"cbe03701",486:"fc977627",643:"c21950e3",694:"5c881a2e",745:"3a86c62c",747:"7519f1c0",748:"98647192",766:"139d6a2c",782:"19be4f5b",875:"a67c4d77",889:"b53bdc3b",922:"b1f148e3",1016:"a3866702",1059:"70cc4522",1061:"1d704eb8",1127:"d65f8357",1151:"3c560b1f",1169:"ed26a5f9",1317:"4ee75a40",1358:"e579baca",1584:"25c91c0b",1619:"757d1d8b",1756:"87f583cc",1820:"498b02b5",1892:"0f341f07",1971:"d746cb8b",2078:"53137233",2156:"8597d496",2190:"6b83e839",2230:"b89bcc25",2316:"adffc0e6",2367:"3e9ea190",2411:"972687a4",2448:"ae6c2b6c",2456:"624e63f5",2582:"35b5ecc3",2595:"d93782e1",2679:"0780e749",2692:"db178ecc",2737:"fea38fb6",2782:"883898ae",2795:"45c184a0",2926:"f11fdc77",3151:"59d27efa",3257:"5693b5c1",3259:"80ff41ab",3261:"d4120c57",3313:"a6d067a9",3450:"812a2002",3518:"bb643124",3769:"535a1903",3811:"ac38cada",3812:"e524030b",3917:"ad6c621b",3931:"088517c5",4010:"eea5864e",4036:"412a4652",4098:"e8ba2177",4128:"7a0774b3",4188:"ff72b2df",4396:"532af3c4",4405:"cc06d0a4",4503:"6a19e301",4648:"31d1bc6f",4663:"f34724f6",4781:"4def496c",4877:"d1c7b1b8",4948:"a0fb37a1",5146:"9b213573",5244:"f1f34471",5253:"7a8716a8",5263:"451d053b",5308:"188c6919",5364:"b95913d0",5393:"d46583a0",5408:"03fd799d",5468:"aef3688e",5595:"5adc1449",5821:"41b747c6",5865:"da780987",5930:"65ea3787",5933:"3327eab6",6019:"2d06a6af",6036:"289c2eb8",6510:"a485c911",6536:"e713d674",6566:"511e95c6",6659:"372695ec",6715:"ac7aee49",6730:"64253505",6869:"37ce78aa",6878:"c6cec0d9",6982:"2d38b63a",7079:"3aa94426",7087:"63297a6f",7104:"1d2ab7a9",7157:"92f1e8f8",7217:"1be488ae",7266:"bba9c51f",7313:"b857c0a6",7390:"857152af",7541:"11ca70cc",7664:"f92b74f7",7761:"4f86f4fc",7763:"444dce16",7834:"3d9aad80",7861:"757503f5",7875:"0f5194a8",7884:"05f33e8e",7970:"eba3f785",8023:"ab803b61",8073:"dfc6474a",8312:"58a5729e",8398:"cc6aa9ea",8488:"4330d151",8566:"7e6aa0e3",8586:"9d605493",8709:"44b46cf7",8747:"04252521",8768:"5facbb82",8849:"d5dd1a61",8898:"9bf4a82c",8915:"82c6b45a",9057:"b21f426b",9121:"b5862ff2",9137:"fdbcd423",9147:"d6a507a2",9188:"b7ce0cf2",9200:"0a1f7353",9253:"1934e571",9260:"82dd66dc",9384:"cc0e0188",9429:"3b8debbf",9503:"017b251d",9636:"279db5c1",9673:"13304703",9763:"09e7e474",9776:"761aa941",9777:"565166c4",9820:"39dfb9cc",9836:"8cd96a11",9853:"aca4f6a2",9900:"521825c9",9961:"9db8f620"}[e]+".chunk.js"},t.miniCssF=function(e){return"static/css/"+e+"."+{163:"296853db",221:"296853db",433:"296853db",643:"296853db",694:"296853db",748:"296853db",875:"296853db",1059:"296853db",1061:"296853db",1169:"296853db",1317:"296853db",1584:"296853db",1619:"296853db",1820:"296853db",2156:"296853db",2190:"296853db",2230:"296853db",2316:"296853db",2367:"296853db",2411:"296853db",2582:"296853db",2595:"296853db",2737:"296853db",2782:"296853db",3313:"296853db",3518:"296853db",3812:"296853db",3917:"296853db",4010:"296853db",4098:"296853db",4128:"296853db",4188:"296853db",4396:"774af801",4405:"296853db",4503:"296853db",4648:"296853db",4877:"6e864cd4",4948:"296853db",5244:"296853db",5263:"296853db",5308:"296853db",5393:"296853db",5408:"296853db",5595:"296853db",5865:"296853db",5933:"296853db",6510:"296853db",6715:"296853db",6730:"296853db",7087:"296853db",7104:"296853db",7157:"296853db",7390:"296853db",7541:"296853db",7761:"296853db",7834:"296853db",7875:"296853db",7884:"296853db",8023:"296853db",8073:"296853db",8566:"296853db",8898:"296853db",9121:"296853db",9200:"14abaeb3",9253:"296853db",9260:"296853db",9384:"296853db",9503:"296853db",9673:"296853db",9763:"296853db",9776:"296853db",9777:"296853db",9853:"296853db"}[e]+".chunk.css"},t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},function(){var e={},n="website:";t.l=function(r,i,a,o){if(e[r])e[r].push(i);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d\n \n \n \n \n);\n\nconst dark = logo;\n\nconst light = (\n \n \n \n \n \n);\n\nexport default {\n dark,\n light,\n};\n","import { Link } from 'react-router-dom';\n\nexport default function NoMatch() {\n return (\n \n
It looks like you're lost... \n
\n Go to the home page\n
\n
\n );\n}\n","import { Loader, Icon } from 'uiw';\n\nexport default function De() {\n return (\n } />\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {};","import React, { useMemo } from 'react';\nimport { Select } from 'uiw';\nimport pkg from 'uiw/package.json';\nimport styles from './index.module.less';\n\ntype OptionsProps = {\n version?: string;\n};\n\nfunction Options(props = {} as OptionsProps) {\n return useMemo(() => {props.version} , [props.version]);\n}\n\nexport type VersionSelectProps = {\n data: string[];\n};\n\nconst VersionSelect = (props = {} as VersionSelectProps) => {\n function onChange(e: React.ChangeEvent) {\n const version = e.target.value;\n const isV1 = version.split('.')[0] === '1';\n if (isV1) {\n window.location.href = `https://unpkg.com/uiw@${version}/dist/index.html`;\n } else {\n window.location.href = `https://unpkg.com/@uiw/doc@${version}/web/index.html`;\n }\n }\n // @ts-ignore\n // eslint-disable-next-line no-undef\n const currentVersion = pkg.version;\n const versionList = props.data;\n const firstVersion = versionList[0];\n if (firstVersion !== currentVersion) {\n versionList.unshift(currentVersion);\n }\n return useMemo(\n () => (\n \n \n {versionList.map((version, idx) => {\n return ;\n })}\n \n
\n ),\n [versionList],\n );\n};\n\nexport default VersionSelect;\n","// extracted by mini-css-extract-plugin\nexport default {\"sider\":\"index_sider__vrASx\",\"menuWarpper\":\"index_menuWarpper__asOzy\",\"subMenu\":\"index_subMenu__c4Mvo\",\"layoutWrap\":\"index_layoutWrap__6CE3D\",\"layoutSider\":\"index_layoutSider__1t-SG\"};","// extracted by mini-css-extract-plugin\nexport default {\"title\":\"index_title__O5TzH\",\"menu\":\"index_menu__9HE8I\",\"divider\":\"index_divider__1cINS\"};","import React from 'react';\n\nexport default {\n home: (\n \n \n \n ),\n component: (\n \n \n \n \n ),\n github: (\n \n \n \n \n ),\n issue: (\n \n \n \n \n ),\n gitee: (\n \n \n \n ),\n plugin: (\n \n \n \n \n \n \n ),\n};\n","import { NavLink } from 'react-router-dom';\nimport { useLocation } from 'react-router-dom';\nimport styles from './index.module.less';\nimport menu from '../../menu.json';\nimport nav from '../icons/nav';\n\nexport default function SiderMenu() {\n const location = useLocation();\n const data = menu.find((item) => new RegExp(`^${item.path || ''}`).test(location.pathname));\n\n if (!data?.children) {\n return null;\n }\n return (\n \n
\n {(nav as any)[data.icon]}\n {data.name} \n \n
\n {data.children &&\n data.children.map((item, idx) => {\n if (item.divider) {\n return (\n
\n {item.name}\n
\n );\n }\n if (/^http(?:|s):\\/\\//.test(item.path || '')) {\n return (\n
\n {item.name}\n \n \n \n \n \n );\n }\n return (\n
\n {item.name}\n \n );\n })}\n
\n
\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"logo\":\"index_logo__kUQOi\",\"top\":\"index_top__DLxV-\",\"nav\":\"index_nav__SdXbb\",\"navTop\":\"index_navTop__08yh1\",\"btn\":\"index_btn__YYGUe\",\"btnTop\":\"index_btnTop__PlNw6\"};","import React from 'react';\n\ntype InitialState = {\n layout: 'top' | 'left' | 'mix';\n};\n\nexport const initialState: InitialState = {\n layout: 'top',\n};\n\nexport const reducer = (state: InitialState, action: InitialState) => {\n return {\n ...state,\n ...action,\n };\n};\n\nexport interface Context {\n state: InitialState;\n dispatch: React.Dispatch;\n}\n\nexport const ThemeContext = React.createContext({\n state: initialState,\n dispatch: () => null,\n});\n","import React from 'react';\n\nexport default {\n menu: (\n \n \n \n \n \n \n \n ),\n menutop: (\n \n \n \n \n \n \n \n ),\n china: (\n \n \n \n \n \n \n \n \n \n \n \n ),\n};\n","import { Fragment, useContext } from 'react';\nimport { Tooltip } from 'uiw';\nimport { NavLink, Link } from 'react-router-dom';\nimport styles from './index.module.less';\nimport data from '../../menu.json';\nimport { ThemeContext } from '../../contexts';\nimport nav from '../icons/nav';\nimport logo from '../icons/logo';\nimport menu from '../icons/menu';\nimport pkg from 'uiw/package.json';\n\nexport default function Nav() {\n const { state, dispatch } = useContext(ThemeContext);\n return (\n \n \n \n {logo.dark}\n {state.layout === 'top' && (\n \n UIW{pkg.version} \n \n )}\n \n
\n \n {data.map(({ path, name, icon }, idx) => {\n if (Object.keys(nav).includes(icon)) {\n icon = (nav as any)[icon];\n }\n if (/^https?:(?:\\/\\/)?/.test(path)) {\n if (state.layout === 'top') {\n return (\n
\n {icon} {name} \n \n );\n }\n return (\n
{name}}\n >\n \n {icon}\n \n \n );\n }\n let activeStyle: React.CSSProperties = {\n color: '#fff',\n };\n if (state.layout === 'top') {\n return (\n
(isActive ? activeStyle : undefined)}\n >\n {icon} {name} \n \n );\n }\n\n return (\n
{name}}\n >\n (isActive ? activeStyle : undefined)}\n >\n {icon}\n \n \n );\n })}\n
\n \n
\n \n {menu.china}\n \n \n
dispatch({ layout: state.layout === 'left' ? 'top' : 'left' })}>\n {state.layout === 'left' ? menu.menu : menu.menutop}\n \n
\n \n );\n}\n","import { Fragment, useContext } from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { Layout, Affix } from 'uiw';\nimport VersionSelect from '../components/VersionSelect';\nimport styles from './index.module.less';\nimport version from '../version.json';\nimport SiderMenu from '../components/SiderMenu';\nimport Nav from '../components/Nav';\nimport { ThemeContext } from '../contexts';\n\nconst { Header, Sider, Content } = Layout;\nexport interface ComponentsProps {\n siderMenu?: boolean;\n}\n\nexport default function Components(props: ComponentsProps) {\n const { siderMenu = true } = props;\n const { state } = useContext(ThemeContext);\n return (\n \n {state.layout === 'top' ? (\n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n ) : (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n );\n}\n","import { lazy, Suspense } from 'react';\nimport { RouteObject } from 'react-router-dom';\nimport NoMatch from './components/NoMatch';\nimport Loading from './components/Loading';\nimport BaseLayout from './layouts/BaseLayout';\n\nconst Loadable = (Component: any) => (props: any) =>\n (\n }>\n \n \n );\n\nconst Home = Loadable(lazy(() => import('./routes/home')));\nconst Extensions = Loadable(lazy(() => import('./routes/extensions')));\n\nconst GuideQuickStart = Loadable(lazy(() => import('./routes/guide/quick-start')));\nconst GuideImport = Loadable(lazy(() => import('./routes/guide/import')));\nconst GuideCreateReactApp = Loadable(lazy(() => import('./routes/guide/create-react-app')));\nconst GuideKKT = Loadable(lazy(() => import('./routes/guide/kkt')));\nconst GuideDocs = Loadable(lazy(() => import('./routes/guide/docs')));\nconst GuideVscode = Loadable(lazy(() => import('./routes/guide/vscode')));\nconst GuideRecommendation = Loadable(lazy(() => import('./routes/guide/recommendation')));\n\nconst Overview = Loadable(lazy(() => import('./routes/overview')));\nconst Colors = Loadable(lazy(() => import('./routes/components/colors')));\nconst Alert = Loadable(lazy(() => import('./routes/components/alert')));\nconst AutoLink = Loadable(lazy(() => import('./routes/components/auto-link')));\nconst ResetCss = Loadable(lazy(() => import('./routes/components/reset-css')));\nconst Avatar = Loadable(lazy(() => import('./routes/components/avatar')));\nconst Affix = Loadable(lazy(() => import('./routes/components/affix')));\nconst Calendar = Loadable(lazy(() => import('./routes/components/calendar')));\nconst Cascader = Loadable(lazy(() => import('./routes/components/cascader')));\nconst Checkbox = Loadable(lazy(() => import('./routes/components/checkbox')));\nconst CopyToClipboard = Loadable(lazy(() => import('./routes/components/copy-to-clipboard')));\nconst Collapse = Loadable(lazy(() => import('./routes/components/collapse')));\nconst Card = Loadable(lazy(() => import('./routes/components/card')));\nconst Carousel = Loadable(lazy(() => import('./routes/components/carousel')));\nconst Descriptions = Loadable(lazy(() => import('./routes/components/descriptions')));\nconst Loader = Loadable(lazy(() => import('./routes/components/loader')));\nconst Icon = Loadable(lazy(() => import('./routes/components/icon')));\nconst Divider = Loadable(lazy(() => import('./routes/components/divider')));\nconst Drawer = Loadable(lazy(() => import('./routes/components/drawer')));\nconst DatePicker = Loadable(lazy(() => import('./routes/components/date-picker')));\nconst DateInput = Loadable(lazy(() => import('./routes/components/date-input')));\nconst Dropdown = Loadable(lazy(() => import('./routes/components/dropdown')));\nconst Badge = Loadable(lazy(() => import('./routes/components/badge')));\nconst Progress = Loadable(lazy(() => import('./routes/components/progress')));\nconst Pagination = Loadable(lazy(() => import('./routes/components/pagination')));\nconst PinCode = Loadable(lazy(() => import('./routes/components/pin-code')));\nconst Input = Loadable(lazy(() => import('./routes/components/input')));\nconst Button = Loadable(lazy(() => import('./routes/components/button')));\nconst Radio = Loadable(lazy(() => import('./routes/components/radio')));\nconst Select = Loadable(lazy(() => import('./routes/components/select')));\nconst SearchSelect = Loadable(lazy(() => import('./routes/components/search-select')));\nconst Split = Loadable(lazy(() => import('./routes/components/split')));\nconst Switch = Loadable(lazy(() => import('./routes/components/switch')));\nconst Slider = Loadable(lazy(() => import('./routes/components/slider')));\nconst Grid = Loadable(lazy(() => import('./routes/components/grid')));\nconst Form = Loadable(lazy(() => import('./routes/components/form')));\nconst FileInput = Loadable(lazy(() => import('./routes/components/file-input')));\nconst Breadcrumb = Loadable(lazy(() => import('./routes/components/breadcrumb')));\nconst List = Loadable(lazy(() => import('./routes/components/list')));\nconst Layout = Loadable(lazy(() => import('./routes/components/layout')));\nconst Notify = Loadable(lazy(() => import('./routes/components/notify')));\nconst Tree = Loadable(lazy(() => import('./routes/components/tree')));\nconst TreeChecked = Loadable(lazy(() => import('./routes/components/tree-checked')));\nconst SearchTree = Loadable(lazy(() => import('./routes/components/search-tree')));\nconst Transfer = Loadable(lazy(() => import('./routes/components/transfer')));\nconst Tag = Loadable(lazy(() => import('./routes/components/tag')));\nconst Tabs = Loadable(lazy(() => import('./routes/components/tabs')));\nconst Tooltip = Loadable(lazy(() => import('./routes/components/tooltip')));\nconst Table = Loadable(lazy(() => import('./routes/components/table')));\nconst TimePicker = Loadable(lazy(() => import('./routes/components/time-picker')));\nconst Rate = Loadable(lazy(() => import('./routes/components/rate')));\nconst Overlay = Loadable(lazy(() => import('./routes/components/overlay')));\nconst BackTop = Loadable(lazy(() => import('./routes/components/back-top')));\nconst Portal = Loadable(lazy(() => import('./routes/components/portal')));\nconst OverlayTrigger = Loadable(lazy(() => import('./routes/components/overlay-trigger')));\nconst Popover = Loadable(lazy(() => import('./routes/components/popover')));\nconst Message = Loadable(lazy(() => import('./routes/components/message')));\nconst MonthPicker = Loadable(lazy(() => import('./routes/components/month-picker')));\nconst Textarea = Loadable(lazy(() => import('./routes/components/textarea')));\nconst Modal = Loadable(lazy(() => import('./routes/components/modal')));\nconst Formatter = Loadable(lazy(() => import('./routes/components/formatter')));\nconst Steps = Loadable(lazy(() => import('./routes/components/steps')));\nconst Menu = Loadable(lazy(() => import('./routes/components/menu')));\nconst Empty = Loadable(lazy(() => import('./routes/components/empty')));\n\nexport const routes: RouteObject[] = [\n {\n path: '/extensions',\n element: ,\n children: [\n { index: true, element: },\n { path: '*', element: },\n ],\n },\n {\n path: '/guide',\n element: ,\n children: [\n { index: true, element: },\n { path: '/guide/quick-start', element: },\n { path: '/guide/import', element: },\n { path: '/guide/create-react-app', element: },\n { path: '/guide/kkt', element: },\n { path: '/guide/vscode', element: },\n { path: '/guide/docs', element: },\n { path: '/guide/recommendation', element: },\n { path: '*', element: },\n ],\n },\n {\n path: '/components',\n element: ,\n children: [\n { index: true, element: },\n { path: '/components/overview', element: },\n { path: '/components/colors', element: },\n { path: '/components/reset-css', element: },\n { path: '/components/alert', element: },\n { path: '/components/auto-link', element: },\n { path: '/components/avatar', element: },\n { path: '/components/affix', element: },\n { path: '/components/calendar', element: },\n { path: '/components/checkbox', element: },\n { path: '/components/copy-to-clipboard', element: },\n { path: '/components/collapse', element: },\n { path: '/components/card', element: },\n { path: '/components/carousel', element: },\n { path: '/components/cascader', element: },\n { path: '/components/descriptions', element: },\n { path: '/components/loader', element: },\n { path: '/components/icon', element: },\n { path: '/components/divider', element: },\n { path: '/components/drawer', element: },\n { path: '/components/date-picker', element: },\n { path: '/components/date-input', element: },\n { path: '/components/dropdown', element: },\n { path: '/components/badge', element: },\n { path: '/components/progress', element: },\n { path: '/components/pagination', element: },\n { path: '/components/pin-code', element: },\n { path: '/components/input', element: },\n { path: '/components/button', element: },\n { path: '/components/radio', element: },\n { path: '/components/select', element: },\n { path: '/components/search-select', element: },\n { path: '/components/split', element: },\n { path: '/components/switch', element: },\n { path: '/components/slider', element: },\n { path: '/components/grid', element: },\n { path: '/components/form', element: },\n { path: '/components/file-input', element: },\n { path: '/components/breadcrumb', element: },\n { path: '/components/list', element:
},\n { path: '/components/layout', element: },\n { path: '/components/notify', element: },\n { path: '/components/tree', element: },\n { path: '/components/tree-checked', element: },\n { path: '/components/search-tree', element: },\n { path: '/components/transfer', element: },\n { path: '/components/tag', element: },\n { path: '/components/tabs', element: },\n { path: '/components/tooltip', element: },\n { path: '/components/table', element: },\n { path: '/components/time-picker', element: },\n { path: '/components/rate', element: },\n { path: '/components/overlay', element: },\n { path: '/components/back-top', element: },\n { path: '/components/portal', element: },\n { path: '/components/overlay-trigger', element: },\n { path: '/components/popover', element: },\n { path: '/components/message', element: },\n { path: '/components/month-picker', element: },\n { path: '/components/textarea', element: },\n { path: '/components/modal', element: },\n { path: '/components/formatter', element: },\n { path: '/components/steps', element: },\n { path: '/components/menu', element: },\n { path: '/components/empty', element: },\n { path: '*', element: },\n ],\n },\n {\n path: '/',\n element: ,\n },\n];\n","import React, { useReducer } from 'react';\nimport ReactDOM from 'react-dom';\nimport { useRoutes, HashRouter } from 'react-router-dom';\nimport '@uiw/reset.css';\nimport { routes } from './routers';\nimport './styles/index.less';\nimport { ThemeContext, reducer, initialState } from './contexts';\n\nconst App = () => useRoutes(routes);\nexport const Provider = ({ children }: { children: React.ReactNode }) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n return {children} ;\n};\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root'),\n);\n","export function noop() {}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} top `true` or `false`\n * @returns {number} amount of scrolled pixels\n */\nexport function getScroll(target: HTMLElement | Window | null, top?: boolean) {\n if (typeof window === 'undefined') {\n return 0;\n }\n\n const prop = top ? 'pageYOffset' : 'pageXOffset';\n const method = top ? 'scrollTop' : 'scrollLeft';\n const isWindow: boolean = target === window;\n\n let ret = isWindow ? (target as Window)[prop] : (target as HTMLElement)[method];\n if (isWindow && typeof ret !== 'number') {\n ret = document.documentElement[method];\n }\n\n return ret;\n}\n","import { getScroll } from '@uiw/utils';\n\nexport const getTargetRect = (target: HTMLElement | Window | null) => {\n return target !== window\n ? (target as HTMLElement).getBoundingClientRect()\n : ({ top: 0, left: 0, bottom: 0 } as ClientRect);\n};\n\nexport const getOffset = (element: HTMLElement, target: HTMLElement | Window | null) => {\n const elemRect = element.getBoundingClientRect();\n const targetRect = getTargetRect(target);\n const scrollTop = getScroll(target, true);\n const scrollLeft = getScroll(target);\n\n const docElem = window.document.body;\n const clientTop = docElem.clientTop || 0;\n const clientLeft = docElem.clientLeft || 0;\n\n return {\n top: elemRect.top - targetRect.top + scrollTop - clientTop,\n left: elemRect.left - targetRect.left + scrollLeft - clientLeft,\n width: elemRect.width,\n height: elemRect.height,\n };\n};\n\nexport const getDefaultTarget = () => (typeof window !== 'undefined' ? window : null);\n","import React from 'react';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport { getDefaultTarget, getOffset } from './utils';\n\nexport interface AffixProps extends IProps, Omit {\n /**\n * 距离窗口顶部达到指定偏移量后触发\n */\n offsetTop?: number;\n /**\n * 距离窗口底部达到指定偏移量后触发\n */\n offsetBottom?: number;\n target?: () => Window | HTMLElement | null;\n /**\n * 固定状态改变时触发的回调函数\n */\n onChange?: (affixed?: boolean) => void;\n}\n\nexport interface AffixState {\n affixStyle?: React.CSSProperties;\n placeholderStyle?: React.CSSProperties;\n}\n\nexport default class Affix extends React.Component {\n public static defaultProps: AffixProps = {\n prefixCls: 'w-affix',\n onChange: noop,\n };\n public state: AffixState = {\n placeholderStyle: undefined,\n affixStyle: undefined,\n };\n private box: any;\n private target!: Window | HTMLElement | null;\n private readonly events = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];\n private eventHandlers: Record = {};\n private timeout?: number;\n constructor(props: AffixProps & HTMLDivProps) {\n super(props);\n this.updatePosition = this.updatePosition.bind(this);\n }\n componentDidMount() {\n const target = this.props.target || getDefaultTarget;\n // Wait for parent component ref has its value\n this.timeout = window.setTimeout(() => {\n this.target = target();\n this.setTargetEventListeners();\n });\n }\n componentWillUnmount() {\n this.clearEventListeners();\n clearTimeout(this.timeout);\n }\n updatePosition() {\n let { offsetTop } = this.props;\n const { offsetBottom } = this.props;\n if (!this.box || !this.box.offsetParent) {\n return;\n }\n\n const elemSize = {\n width: this.box.clientWidth,\n height: this.box.clientHeight,\n };\n const offsetMode = { top: true, bottom: false };\n if (typeof offsetTop !== 'number' && typeof offsetBottom !== 'number') {\n offsetMode.top = true;\n offsetTop = 0;\n }\n\n if (typeof offsetBottom === 'number') {\n offsetMode.top = false;\n offsetMode.bottom = true;\n }\n\n const elemOffset = getOffset(this.box, this.target);\n const box = this.box.getBoundingClientRect();\n const bottom = document.documentElement.clientHeight - box.y - elemOffset.height;\n\n if (offsetMode.top && box.y < 0) {\n this.setPlaceholderStyle({ ...elemSize });\n this.setAffixStyle({\n position: 'fixed',\n top: offsetTop || 0,\n left: elemOffset.left,\n width: elemOffset.width,\n });\n } else if (offsetMode.bottom && bottom < 0) {\n this.setPlaceholderStyle({ ...elemSize });\n this.setAffixStyle({\n position: 'fixed',\n bottom: offsetBottom || 0,\n left: elemOffset.left,\n width: elemOffset.width,\n });\n } else {\n this.setPlaceholderStyle();\n this.setAffixStyle();\n }\n }\n setAffixStyle(affixStyle?: React.CSSProperties) {\n const { onChange } = this.props;\n const affixed = !!this.state.affixStyle;\n this.setState({ affixStyle }, () => {\n onChange && onChange(affixed);\n });\n }\n setPlaceholderStyle(placeholderStyle?: React.CSSProperties) {\n this.setState({ placeholderStyle });\n }\n // 设置监听事件\n setTargetEventListeners() {\n this.clearEventListeners();\n this.events.forEach((eventName) => {\n this.eventHandlers[eventName] = this.updatePosition;\n this.target && this.target.addEventListener(eventName, this.updatePosition, false);\n });\n }\n clearEventListeners() {\n this.events.forEach((eventName) => {\n const handler = this.eventHandlers[eventName];\n this.target && this.target.removeEventListener(eventName, handler, false);\n });\n }\n getInstance = (node: HTMLDivElement) => {\n if (node) {\n this.box = node;\n }\n };\n public render() {\n const { prefixCls, className, children, offsetTop, offsetBottom, target, onChange, ...resetProps } = this.props;\n const cls = [className, prefixCls].filter(Boolean).join(' ').trim();\n return (\n \n );\n }\n}\n","import React, { useEffect, useRef } from 'react';\nimport ReactDOM from 'react-dom';\n\nexport const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport interface PortalProps {\n children?: React.ReactNode;\n /**\n * The HTML element that children will be mounted to.\n * @default document.body\n */\n container?: HTMLElement;\n /**\n * Callback invoked when the children of this `Portal` have been added to the DOM.\n * @deprecated v4.9.0+\n */\n onChildrenMount?: (portalElement: HTMLElement) => void;\n /** @deprecated v4.9.0+ */\n visible?: boolean;\n}\n\nexport default function Portal(props: PortalProps) {\n const { container } = props;\n const defaultNode = useRef();\n const containerRef = useRef(container);\n\n useEffect(() => {\n return () => {\n if (defaultNode.current && containerRef.current) {\n containerRef.current.removeChild(defaultNode.current);\n defaultNode.current = undefined;\n }\n };\n }, []);\n\n if (!canUseDOM) {\n return null;\n }\n if (!containerRef.current) {\n containerRef.current = document.body;\n }\n if (!defaultNode.current) {\n defaultNode.current = document.createElement('div');\n containerRef.current.appendChild(defaultNode.current);\n }\n return ReactDOM.createPortal(props.children, defaultNode.current);\n}\n","/**\n * Overlay 组件\n * ---------------\n * 动画库 react-transition-group 文档\n * 老的文档\n * https://facebook.github.io/react/docs/animation.html\n * 新的文档\n * https://reactcommunity.org/react-transition-group/\n * 动画效果\n * https://daneden.github.io/animate.css/\n */\nimport React, { cloneElement, useEffect, useRef, useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { TransitionProps } from 'react-transition-group/Transition';\nimport Portal, { PortalProps } from '@uiw/react-portal';\nimport { IProps, noop } from '@uiw/utils';\n\nimport './style/index.less';\n\nexport interface OverlayProps extends IProps, Omit {\n timeout?: TransitionProps['timeout'];\n isOpen?: boolean;\n usePortal?: boolean;\n maskClosable?: boolean;\n dialogProps?: React.HTMLProps;\n backdropProps?: React.HTMLProps;\n portalProps?: PortalProps;\n hasBackdrop?: boolean;\n unmountOnExit?: boolean;\n transitionName?: string;\n onEnter?: (node: HTMLElement, isAppearing: boolean) => void;\n onOpening?: (node: HTMLElement, isAppearing: boolean) => void;\n onOpened?: (node: HTMLElement, isAppearing: boolean) => void;\n onClosing?: (node: HTMLElement) => void;\n onClosed?: (node: HTMLElement | React.MouseEvent) => void;\n onClose?: (evn: React.MouseEvent) => void;\n}\n\nexport default function Overlay(props: OverlayProps) {\n const {\n className,\n style,\n isOpen: _ = false,\n prefixCls = 'w-overlay',\n usePortal = true,\n maskClosable = true,\n backdropProps = {},\n portalProps = {},\n hasBackdrop = true,\n unmountOnExit = true, // 设置 true 销毁根节点\n timeout = 300,\n transitionName = 'w-overlay',\n // onEnter = noop,\n onOpening = noop,\n onOpened = noop,\n onClosing = noop,\n onClosed = noop,\n onClose = noop,\n children,\n dialogProps = {},\n ...otherProps\n } = props;\n\n const [isOpen, setIsOpen] = useState();\n // const [isOpen, setIsOpen] = useState(props.isOpen || false);\n const [visible, setVisible] = useState(false);\n const container = useRef(null);\n const overlay = useRef(null);\n useEffect(() => {\n if (isOpen !== props.isOpen && props.isOpen) {\n setVisible(true);\n }\n if (isOpen !== props.isOpen && !props.isOpen) {\n overlayWillClose();\n setIsOpen(false);\n }\n }, [props.isOpen]);\n\n useEffect(() => {\n if (visible) {\n overlayWillOpen();\n setIsOpen(true);\n }\n }, [visible]);\n\n const decoratedChild =\n typeof children === 'object' ? (\n cloneElement(children, {\n ...dialogProps,\n style: { ...children.props.style, ...dialogProps.style },\n className: [children.props.className, `${prefixCls}-content`].filter(Boolean).join(' ').trim(),\n tabIndex: 0,\n })\n ) : (\n \n {children}\n \n );\n\n function handleClosed(node: HTMLElement | React.MouseEvent) {\n setVisible(false);\n onClosed && onClosed(node);\n }\n\n function handleBackdropMouseDown(e: React.MouseEvent) {\n if (e.target !== container.current && usePortal) {\n return;\n }\n if (maskClosable && hasBackdrop) {\n overlayWillClose();\n setIsOpen(false);\n onClose && onClose(e);\n }\n backdropProps && backdropProps.onMouseDown && backdropProps.onMouseDown(e);\n }\n\n function overlayWillOpen() {\n if (hasBackdrop && usePortal) {\n document.body.classList.add(`${prefixCls}-open`);\n }\n }\n\n function overlayWillClose() {\n if (hasBackdrop && usePortal) {\n document.body.classList.remove(`${prefixCls}-open`);\n }\n // if (unmountOnExit) {\n // setVisible(false)\n // }\n }\n const TransitionGroupComp = (\n \n {(status) => {\n return (\n \n {hasBackdrop &&\n cloneElement(
, {\n ...backdropProps,\n onMouseDown: handleBackdropMouseDown,\n className: [`${prefixCls}-backdrop`, backdropProps.className].filter(Boolean).join(' ').trim(),\n tabIndex: maskClosable ? 0 : null,\n })}\n {usePortal ? (\n
\n {cloneElement(decoratedChild, { 'data-status': status })}\n
\n ) : (\n cloneElement(decoratedChild, { 'data-status': status })\n )}\n
\n );\n }}\n \n );\n if (visible && usePortal) {\n return {TransitionGroupComp} ;\n } else {\n return TransitionGroupComp;\n }\n}\n","import React from 'react';\nimport svgPaths from '@uiw/icons/fonts/w-icon.json';\nimport './style/index.less';\n\nexport type IconsName = keyof typeof svgPaths;\ntype TagType = React.ComponentType | keyof JSX.IntrinsicElements;\n\nexport interface IconProps extends React.HTMLAttributes {\n style?: React.CSSProperties;\n className?: string;\n prefixCls?: string;\n /**\n * HTML tag to use for the rendered element.\n * @default \"span\"\n */\n tagName?: Tag;\n type?: IconsName | null | E;\n spin?: boolean;\n color?: string;\n verticalAlign?: 'middle' | 'baseline';\n}\n\nexport default function Icon(props: IconProps) {\n const {\n className,\n prefixCls = 'w-icon',\n verticalAlign = 'middle',\n tagName: TagName = 'span',\n color,\n type,\n spin = false,\n ...others\n } = props;\n\n let svg = null;\n if (typeof type === 'string') {\n svg = (\n \n {(svgPaths[type] || []).map((d, i) => (\n \n ))}\n \n );\n } else if (React.isValidElement(type)) {\n svg = React.cloneElement(type, {\n fill: color,\n });\n } else {\n return null;\n }\n others.style = { fill: 'currentColor', ...others.style };\n const propps = {\n ...others,\n className: [\n prefixCls,\n className,\n prefixCls && verticalAlign ? `${prefixCls}-${verticalAlign}` : null,\n spin && prefixCls ? `${prefixCls}-spin` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim(),\n };\n\n return React.createElement(TagName, { ...propps } as any, svg);\n}\n","import React from 'react';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport { IProps, HTMLButtonProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'link';\nexport type ButtonSize = 'large' | 'default' | 'small';\n\nexport interface ButtonProps extends IProps, Omit {\n basic?: boolean;\n disabled?: boolean;\n active?: boolean;\n loading?: boolean;\n block?: boolean;\n icon?: IconProps['type'];\n type?: ButtonType;\n size?: ButtonSize;\n htmlType?: 'button' | 'submit' | 'reset';\n onClick?: (e: React.MouseEvent & MouseEvent) => void;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-btn',\n disabled = false,\n active = false,\n loading = false,\n block = false,\n basic = false,\n htmlType = 'button',\n type = 'light',\n size = 'default',\n icon,\n className,\n children,\n ...others\n } = props;\n const cls = [\n className,\n prefixCls,\n size ? `${prefixCls}-size-${size}` : null,\n type ? `${prefixCls}-${type}` : null,\n basic ? `${prefixCls}-basic` : null,\n loading ? `${prefixCls}-loading` : null,\n disabled || loading ? 'disabled' : null,\n active ? 'active' : null,\n block ? 'block' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n return (\n \n {icon && }\n {children &&\n React.Children.map(children, (child: React.ReactNode) => {\n if (!child) return child;\n if (React.isValidElement(child)) return child;\n return {child} ;\n })}\n \n );\n});\n","import React, { useState, useEffect } from 'react';\nimport Overlay, { OverlayProps } from '@uiw/react-overlay';\nimport Button, { ButtonType, ButtonProps } from '@uiw/react-button';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport { IProps, noop } from '@uiw/utils';\nimport './style/index.less';\nimport CallShow from './CallShow';\n\nexport interface ModalProps extends IProps, OverlayProps {\n type?: ButtonType;\n cancelText?: string;\n confirmButtonProps?: Omit;\n cancelButtonProps?: Omit;\n content?: React.ReactNode;\n confirmText?: string;\n title?: string;\n icon?: IconProps['type'];\n useButton?: boolean;\n usePortal?: boolean;\n autoFocus?: boolean;\n isCloseButtonShown?: boolean;\n isOpen?: boolean;\n bodyStyle?: React.CSSProperties;\n maxWidth?: number;\n minWidth?: number;\n width?: number;\n onCancel?: (evn: React.MouseEvent & MouseEvent) => void;\n onConfirm?: (evn: React.MouseEvent & MouseEvent) => void;\n}\n\ntype ShowModalProps = {\n show?: (props: Omit & { children: React.ReactNode }) => void;\n};\n\nconst Modal: React.ForwardRefExoticComponent> & ShowModalProps =\n React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-modal',\n className,\n children,\n useButton = true,\n usePortal = true,\n autoFocus = false,\n isOpen: _ = false,\n title,\n cancelText,\n cancelButtonProps,\n confirmButtonProps,\n content,\n confirmText = '确认',\n type = 'light',\n icon,\n maxWidth = 500,\n minWidth = 320,\n width,\n isCloseButtonShown = true,\n onCancel = noop,\n onConfirm = noop,\n bodyStyle,\n ...other\n } = props;\n const [isOpen, setIsOpen] = useState(props.isOpen);\n useEffect(() => {\n if (props.isOpen !== isOpen) {\n setIsOpen(props.isOpen);\n }\n }, [props.isOpen]);\n\n const [loading, setLoading] = useState(false);\n const cls = [prefixCls, className, type ? `${type}` : null].filter(Boolean).join(' ').trim();\n function onClose() {\n setIsOpen(false);\n }\n async function handleCancel(e: React.MouseEvent & MouseEvent) {\n setLoading(true);\n try {\n onCancel && (await onCancel(e));\n } catch (e) {}\n setIsOpen(false);\n setLoading(false);\n }\n async function handleConfirm(e: React.MouseEvent & MouseEvent) {\n setLoading(true);\n try {\n onConfirm && (await onConfirm(e));\n } catch (e) {}\n setIsOpen(false);\n setLoading(false);\n }\n return (\n \n \n
\n {(title || icon) && (\n
\n {icon && }\n {title &&
{title} }\n {isCloseButtonShown && handleCancel(e)} icon=\"close\" type=\"light\" />}\n \n )}\n
\n {children || content}\n
\n {useButton && (\n
\n handleConfirm(e)}\n >\n {confirmText}\n \n {cancelText && (\n handleCancel(e)}>\n {cancelText}\n \n )}\n
\n )}\n
\n
\n \n );\n });\n\nModal.show = CallShow;\nexport default Modal;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal, { ModalProps } from './';\n\nexport default function CallShow(props: Omit & { children: React.ReactNode }) {\n const { title = '提示框', children, ...other } = props;\n const dv = document.createElement('div');\n dv.id = 'uiw-modal-call-show-element';\n document.body.appendChild(dv);\n ReactDOM.render(\n {\n document.getElementById('uiw-modal-call-show-element')!.remove();\n }}\n >\n {children}\n ,\n document.getElementById('uiw-modal-call-show-element'),\n );\n}\n","import React from 'react';\nimport Modal, { ModalProps } from '@uiw/react-modal';\nimport { IProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface AlertProps extends IProps, ModalProps {\n width?: number;\n}\n\nexport default (props: AlertProps = {}) => {\n const { prefixCls = 'w-alert', className, width = 400, ...other } = props;\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n return (\n \n {props.children}\n \n );\n};\n","import React, { Fragment } from 'react';\n\nconst delimiter =\n /((?:https?:\\/\\/)?(?:(?:[a-z0-9]?(?:[a-z0-9\\-]{1,61}[a-z0-9])?\\.[^\\.|\\s])+[a-z\\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\\d{1,5})*[a-z0-9.,_\\/~#&=;%+?\\-\\\\(\\\\)]*)/gi;\n\nexport type AutoLinkProps = {\n text?: string;\n} & React.AnchorHTMLAttributes;\n\nexport default (props: AutoLinkProps = {}) => {\n const { text = '', ...other } = props;\n return (\n \n {text.split(delimiter).map((word, idx) => {\n const match = word.match(delimiter);\n if (match && match[0]) {\n const url = match[0];\n return (\n \n {url}\n \n );\n }\n return {word} ;\n })}\n \n );\n};\n","import React from 'react';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport { HTMLSpanProps, noop } from '@uiw/utils';\nimport './style/index.less';\nimport { useState } from 'react';\nimport { useEffect } from 'react';\n\nexport interface AvatarProps extends HTMLSpanProps {\n style?: React.CSSProperties;\n className?: string;\n prefixCls?: string;\n icon?: IconProps['type'];\n alt?: string;\n src?: string;\n size?: 'large' | 'default' | 'small' | 'mini';\n shape?: 'square' | 'circle';\n onError?: (event: React.SyntheticEvent) => boolean;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-avatar',\n shape = 'circle',\n size = 'default',\n className,\n src,\n alt,\n icon,\n onError = noop,\n ...resetProps\n } = props;\n let children = props.children;\n const [isImgExist, setIsImgExist] = useState(true);\n const cls = [\n prefixCls,\n className,\n size ? `${prefixCls}-${size}` : null,\n shape ? `${prefixCls}-${shape}` : null,\n src ? `${prefixCls}-image` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n useEffect(() => {\n setIsImgExist(true);\n }, [props.src]);\n\n if (isImgExist && src) {\n children = (\n {\n const errorFlag = onError ? onError(evn) : undefined;\n if (errorFlag !== false) {\n setIsImgExist(false);\n }\n }}\n />\n );\n } else if (icon && typeof icon === 'string') {\n children = ;\n } else if (icon && React.isValidElement(icon)) {\n children = icon;\n }\n return (\n \n {children}\n \n );\n});\n","/**\n * 获取当前滚动条所在位置\n */\nexport function getScrollTop() {\n let scrollTop = 0;\n if (document && document.documentElement && document.documentElement.scrollTop) {\n scrollTop = document.documentElement.scrollTop;\n } else if (document.body) {\n scrollTop = document.body.scrollTop;\n }\n return scrollTop;\n}\n\n/**\n * TODO\n * @param {*} position 滚动到何处\n * @param {*} step 步长\n * @param {*} current 滚动条当前位置\n */\nexport function scrollToAnimate(position: number = 0, step: number = 100, current: number = 0) {\n let start = 0;\n const timer = setInterval(() => {\n if (current - start >= position) {\n start += step;\n if (current - start >= position) {\n window.scrollTo(0, current - start);\n } else {\n window.scrollTo(0, position);\n }\n } else {\n clearInterval(timer);\n }\n }, 0);\n}\n/**\n * 获取滚动条位置百分比\n */\nexport function getScrollPercent(offsetTop: number = 0) {\n let percent = 0;\n if (offsetTop < getScrollTop()) {\n percent = Math.round(\n ((getScrollTop() - offsetTop) / (document.body.scrollHeight - offsetTop - window.innerHeight)) * 100,\n );\n }\n return percent > 100 ? 100 : percent;\n}\n","import React, { useState, useEffect } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport { getScrollPercent, getScrollTop, scrollToAnimate } from './utils';\nimport './style/index.less';\n\nexport interface BackTopProps extends IProps, HTMLDivProps {\n offsetTop?: number;\n clickable?: boolean;\n content?: JSX.Element | string;\n fixed?: boolean;\n /**\n * 滚动距离多少时显示组件\n */\n showBelow?: number;\n speed?: number;\n}\n\nexport interface IBackTopState {\n percent: number;\n current: number;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-back-top',\n className,\n content,\n children,\n offsetTop = 0,\n fixed = true,\n speed = 100,\n showBelow = 1,\n clickable = true,\n ...other\n } = props;\n const topShowBelow = !fixed ? 0 : showBelow || 0;\n const [percent, setPercent] = useState(0);\n const [current, setCurrent] = useState(0);\n const visible = percent >= topShowBelow;\n const cls = [\n prefixCls,\n className,\n !fixed ? 'no-fixed' : null,\n visible ? `${prefixCls}-show` : null,\n !visible ? `${prefixCls}-hide` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n useEffect(() => {\n window && window.addEventListener('scroll', onScroll);\n return function () {\n window && window.removeEventListener('scroll', onScroll);\n };\n });\n function onScroll() {\n setPercent(getScrollPercent(offsetTop));\n setCurrent(getScrollTop());\n }\n function scrollToTop() {\n if (typeof offsetTop === 'number' && typeof speed === 'number' && typeof current === 'number') {\n scrollToAnimate(offsetTop, speed, current);\n }\n }\n return (\n clickable && scrollToTop()} className={cls} {...other} ref={ref}>\n {content}\n {typeof children !== 'function' ? children : children({ percent, current, scrollToTop: scrollToTop })}\n
\n );\n});\n","import React from 'react';\nimport { IProps, HTMLSpanProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface BadgeProps extends IProps, HTMLSpanProps {\n color?: string;\n dot?: boolean;\n processing?: boolean;\n max?: number;\n count?: number;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-badge',\n className,\n style = {},\n color,\n max = 99,\n dot = false,\n processing = false,\n count,\n children,\n ...other\n } = props;\n const supProps = {\n className: [!dot ? `${prefixCls}-count` : null, dot ? 'dot' : null].filter(Boolean).join(' ').trim(),\n style: {},\n };\n const cls = [\n className,\n prefixCls,\n !children ? 'nowrap' : null,\n !children ? `${prefixCls}-status` : null,\n processing ? `${prefixCls}-processing` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n const warpperProps: HTMLSpanProps = {};\n if (count || count === 0) {\n supProps.style = { backgroundColor: color, ...style };\n } else {\n warpperProps.style = style || {};\n }\n return (\n \n {color && }\n {children}\n {count !== 0 && !color && {!dot && count && max && count > max ? `${max}+` : count} }\n \n );\n});\n","import React, { Fragment } from 'react';\nimport { IProps } from '@uiw/utils';\nimport './style/item.less';\n\ntype ElementTag = T extends HTMLElement ? React.HTMLAttributes : T;\n\nexport interface BreadcrumbItemProps extends IProps, ElementTag {\n tagName?: T extends HTMLElement ? keyof JSX.IntrinsicElements : T;\n separator?: JSX.Element | string;\n active?: boolean;\n 'data-separator'?: JSX.Element | string;\n}\n\ntype RefElement = T extends HTMLElement ? T : never;\n\nconst BreadcrumbItem = React.forwardRef((props, ref) => {\n const { prefixCls = 'w-breadcrumb', className, tagName: TagName = 'span', active, separator, ...other } = props;\n const isElm = React.isValidElement(separator);\n const cls = [\n `${prefixCls}-item`,\n className,\n active ? 'active' : null,\n !separator ? 'no-separator' : null,\n isElm ? 'no-before' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n const otherProps = { className: cls, ...other };\n if (!isElm) {\n otherProps['data-separator'] = separator;\n }\n return React.createElement(\n TagName,\n {\n ...otherProps,\n ref,\n },\n \n {isElm && {separator} }\n {props.children}\n ,\n );\n});\n\nexport default BreadcrumbItem;\n","import React from 'react';\nimport { HTMLDivProps } from '@uiw/utils';\nimport Item from './Item';\nimport './style/index.less';\n\nexport interface BreadcrumbProps extends HTMLDivProps {\n style?: React.CSSProperties;\n className?: string;\n prefixCls?: string;\n separator?: JSX.Element | string;\n}\n\nconst Breadcrumb = React.forwardRef((props, ref) => {\n const { prefixCls = 'w-breadcrumb', className, separator = '/', ...other } = props;\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n return (\n \n {React.Children.map(props.children, (element: any) => {\n return React.cloneElement(element, Object.assign({ separator }, element.props, {}));\n })}\n
\n );\n});\ntype Breadcrumb = typeof Breadcrumb & {\n Item: typeof Item;\n};\n\n(Breadcrumb as Breadcrumb).Item = Item;\n\nexport default Breadcrumb as Breadcrumb;\n","import Breadcrumb from './Breadcrumb';\n\nexport * from './Item';\nexport * from './Breadcrumb';\n\nexport default Breadcrumb;\n","import React from 'react';\nimport { HTMLDivProps, IProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface ButtonGroupProps extends IProps, HTMLDivProps {\n vertical?: boolean;\n}\n\nexport default React.forwardRef((props, ref) => {\n const { prefixCls = 'w-btn-group', vertical = false, children, className, ...resetProps } = props;\n\n const cls = [prefixCls, className, vertical && `${prefixCls}-vertical`].filter(Boolean).join(' ').trim();\n\n return (\n \n {children}\n
\n );\n});\n","const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction fallback(context: HTMLElement, node: HTMLElement) {\n if (node) {\n do {\n if (node === context) return true;\n } while ((node = node.parentNode as HTMLElement));\n }\n\n return false;\n}\n\nfunction isDOM(item: Node) {\n return typeof HTMLElement === 'function'\n ? item instanceof HTMLElement\n : item && typeof item === 'object' && item.nodeType === 1 && typeof item.nodeName === 'string';\n}\n\nconst contains = (() => {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n return canUseDOM\n ? function (context: HTMLElement, node: HTMLElement) {\n if (context && context.contains && typeof context.contains === 'function' && isDOM(node)) {\n return context.contains(node);\n }\n if (context && context.compareDocumentPosition && isDOM(node)) {\n return context === node || !!(context.compareDocumentPosition(node) && 16);\n }\n return fallback(context, node);\n }\n : fallback;\n})();\n\nexport default contains;\n","export interface BordersSize extends CSSStyleDeclaration {\n [key: string]: any;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles: BordersSize, axis: 'x' | 'y'): number {\n const sideA: string = axis === 'x' ? 'Left' : 'Top';\n const sideB: string = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles[`border${sideA}Width`]) + parseFloat(styles[`border${sideB}Width`]);\n}\n","export default typeof window !== 'undefined' && typeof document !== 'undefined';\n","import isBrowser from './isBrowser';\n\ninterface Document {\n documentMode?: any;\n}\n\ninterface Window {\n MSInputMethodContext?: any;\n}\n\nconst isIE11 = isBrowser && !!((window as Window).MSInputMethodContext && (document as Document).documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version: number) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import isIE from './isIE';\n\ninterface BodyElement extends HTMLBodyElement {\n [key: string]: any;\n}\n\ninterface IHTMLElement extends HTMLElement {\n [key: string]: any;\n}\n\ninterface ComputedStyle extends CSSStyleDeclaration {\n [key: string]: any;\n}\n\nfunction getSize(axis: 'Height' | 'Width', body: BodyElement, html: IHTMLElement, computedStyle: ComputedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? parseInt(html[`offset${axis}`], 10) +\n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`], 10) +\n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`], 10)\n : 0,\n );\n}\n\nexport type WindowSize = { height?: number; width?: number };\n\nexport default function getWindowSizes(document: HTMLDocument): WindowSize {\n const body = document.body as HTMLBodyElement;\n const html = document.documentElement as HTMLElement;\n const computedStyle = getComputedStyle(html) as CSSStyleDeclaration;\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","import { getScroll } from '@uiw/utils';\nimport getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes, { WindowSize } from './getWindowSizes';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\nexport interface IBoundingClientRect {\n left: number;\n right: number;\n top: number;\n bottom: number;\n width: number;\n height: number;\n offsetLeft?: number;\n offsetTop?: number;\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element: HTMLElement) {\n let rect = {} as IBoundingClientRect;\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, true);\n const scrollLeft = getScroll(element);\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n // eslint-disable-next-line\n } catch (e) {}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n } as IBoundingClientRect;\n\n // subtract scrollbar size from sizes\n const sizes: WindowSize = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument!) : {};\n const width = sizes.width || element.clientWidth || result.right - result.left;\n const height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n result.offsetLeft = element.offsetLeft || element.scrollLeft || 0;\n result.offsetTop = element.offsetTop || element.offsetTop || 0;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result) as IBoundingClientRect;\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets: ClientRect): ClientRect {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(\n element: HTMLElement,\n property?: keyof CSSStyleDeclaration,\n): CSSStyleDeclaration | any {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument!.defaultView;\n const css: CSSStyleDeclaration = (window as Window).getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","export type Sizes = {\n width: number;\n height: number;\n};\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element: HTMLElement): Sizes {\n let rect = element.getBoundingClientRect();\n // const window = element.ownerDocument.defaultView;\n // const styles = window.getComputedStyle(element);\n // const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n // const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result: Sizes = {\n width: element.offsetWidth || element.scrollWidth || rect.width || 0,\n height: element.offsetHeight || element.scrollHeight || rect.height || 0,\n };\n return result;\n}\n","import { getScroll } from '@uiw/utils';\nimport getBoundingClientRect, { IBoundingClientRect } from './util/getBoundingClientRect';\nimport getOuterSizes from './util/getOuterSizes';\nimport { OverlayStyl, OverlayTriggerProps, Placement } from './';\n\ntype GetStyleOptions = {\n trigger: HTMLElement | IBoundingClientRect;\n popup: HTMLElement | IBoundingClientRect;\n placement: OverlayStyl['placement'];\n usePortal: OverlayTriggerProps['usePortal'];\n autoAdjustOverflow: OverlayTriggerProps['autoAdjustOverflow'];\n};\n\nexport function getStyle(options: GetStyleOptions) {\n let { trigger: triggerDom, popup: popupDom, placement, usePortal, autoAdjustOverflow } = options || {};\n const sty = {\n left: 0,\n top: 0,\n placement,\n } as OverlayStyl;\n\n if (!triggerDom || !popupDom || !document) {\n return sty;\n }\n\n const winSizeHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n const winSizeWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n\n sty.placement = placement;\n const scrollTop = getScroll((triggerDom as HTMLElement).ownerDocument!.documentElement, true);\n const scrollLeft = getScroll((triggerDom as HTMLElement).ownerDocument!.documentElement);\n const trigger = {\n ...getBoundingClientRect(triggerDom as HTMLElement),\n ...getOuterSizes(triggerDom as HTMLElement),\n };\n const popup = {\n ...getBoundingClientRect(popupDom as HTMLElement),\n ...getOuterSizes(popupDom as HTMLElement),\n };\n\n const bottom = winSizeHeight - trigger.bottom;\n const right = winSizeWidth - trigger.left - trigger.width;\n\n sty.top = trigger.top + scrollTop;\n sty.left = trigger.left;\n\n if (!usePortal) {\n sty.top = trigger.offsetTop as number;\n sty.left = trigger.offsetLeft as number;\n }\n\n if (placement && /^(top)/.test(placement)) {\n sty.top -= popup.height;\n }\n if (placement && /^(right)/.test(placement)) {\n sty.left += trigger.width;\n }\n if (placement && /^(bottom)/.test(placement)) {\n sty.top += trigger.height;\n }\n if (placement && /^(left)/.test(placement)) {\n sty.left -= popup.width;\n }\n switch (sty.placement) {\n case 'bottomLeft':\n case 'topLeft':\n break;\n case 'bottom':\n // eslint-disable-next-line\n case 'top':\n sty.left = sty.left - (popup.width - trigger.width) / 2;\n break;\n case 'bottomRight':\n case 'topRight':\n sty.left = sty.left + scrollLeft + trigger.width - popup.width;\n break;\n case 'rightTop':\n case 'leftTop':\n break;\n case 'right':\n // eslint-disable-next-line\n case 'left':\n sty.top = sty.top - (popup.height - trigger.height) / 2;\n break;\n case 'rightBottom':\n case 'leftBottom':\n sty.top = sty.top - popup.height + trigger.height;\n break;\n default:\n break;\n }\n if (autoAdjustOverflow) {\n if (placement && /^(top)/.test(placement) && trigger.top < popup.height && bottom > popup.height) {\n sty.placement = placement.replace(/^top/, 'bottom') as Placement;\n sty.top = sty.top + popup.height + trigger.height;\n }\n if (placement && /^(bottom)/.test(placement) && bottom < popup.height && trigger.top > popup.height) {\n sty.placement = placement.replace(/^bottom/, 'top') as Placement;\n sty.top = sty.top - popup.height - trigger.height;\n }\n if (placement && /^(right)/.test(placement) && right < popup.width) {\n sty.placement = placement.replace(/^right/, 'left') as Placement;\n sty.left = sty.left - trigger.width - popup.width;\n }\n if (placement && /^(left)/.test(placement) && trigger.left < popup.width) {\n sty.placement = placement.replace(/^left/, 'right') as Placement;\n sty.left = sty.left + trigger.width + popup.width;\n }\n\n if (placement && /^(left|right)/.test(placement) && usePortal) {\n // Top\n if (\n (/(Top)$/.test(placement) && trigger.top < 0) ||\n (/(right|left)$/.test(placement) && trigger.top + trigger.height / 2 < popup.height / 2) ||\n (/(Bottom)$/.test(placement) && trigger.top + trigger.height < popup.height)\n ) {\n sty.top = scrollTop;\n }\n } else {\n // Top\n if (placement && /(Top)$/.test(placement) && trigger.top < 0) {\n sty.top -= trigger.top;\n }\n if (placement && /(Bottom)$/.test(placement) && trigger.bottom < popup.height) {\n // eslint-disable-next-line\n sty.top = sty.top + (popup.height - trigger.bottom);\n }\n if (placement && /(right|left)$/.test(placement) && trigger.bottom - trigger.height / 2 < popup.height / 2) {\n sty.top = sty.top + popup.height / 2 - (trigger.bottom - trigger.height / 2);\n }\n }\n // Bottom Public Part\n if (placement && /^(left|right)/.test(placement)) {\n if (/(Top)$/.test(placement) && bottom + trigger.height < popup.height) {\n sty.top = sty.top - (popup.height - bottom - trigger.height); // eslint-disable-line\n }\n if (/(right|left)$/.test(placement) && bottom + trigger.height / 2 < popup.height / 2) {\n sty.top = sty.top - (popup.height / 2 - bottom - trigger.height / 2); // eslint-disable-line\n }\n if (/(Bottom)$/.test(placement) && bottom < 0) {\n sty.top = sty.top + bottom; // eslint-disable-line\n }\n }\n\n if (placement && /^(top|bottom)/.test(placement) && usePortal) {\n // left\n if (\n (/(Left)$/.test(placement) && trigger.left < 0) ||\n (/(top|bottom)$/.test(placement) && trigger.left + trigger.width / 2 < popup.width / 2) ||\n (/(Right)$/.test(placement) && trigger.left + trigger.width < popup.width)\n ) {\n sty.left = scrollLeft;\n }\n // right\n if (/(top|bottom)$/.test(placement) && right + trigger.width / 2 < popup.width / 2) {\n sty.left = trigger.left + trigger.width + right - popup.width;\n }\n } else if (placement && /(top|bottom)$/.test(placement) && right + trigger.width / 2 < popup.width / 2) {\n sty.left = sty.left + (right + trigger.width / 2 - popup.width / 2); // eslint-disable-line\n }\n if (placement && /^(top|bottom)/.test(placement)) {\n if (/(Left)$/.test(placement) && trigger.width + right < popup.width) {\n sty.left = sty.left - (popup.width - trigger.width - right);\n }\n if (/(Right)$/.test(placement) && right < 0) {\n sty.left = sty.left + right; // eslint-disable-line\n }\n }\n }\n return sty;\n}\n","import React, { cloneElement, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport { IProps, noop } from '@uiw/utils';\nimport Overlay, { OverlayProps } from '@uiw/react-overlay';\nimport contains from './utils';\nimport { IBoundingClientRect } from './util/getBoundingClientRect';\nimport { getStyle } from './getStyle';\nimport './style/index.less';\n\nexport interface OverlayTriggerProps extends IProps, OverlayProps {\n onVisibleChange?: (isVisbale: boolean) => void;\n onEnter?: (node: HTMLElement, isAppearing: boolean) => void;\n overlay?: React.ReactNode | any;\n trigger?: 'click' | 'hover' | 'focus';\n usePortal?: boolean;\n isOpen?: boolean;\n disabled?: boolean;\n isOutside?: boolean;\n isClickOutside?: boolean;\n autoAdjustOverflow?: boolean;\n placement?: Placement;\n delay?: Delay;\n}\n\nexport interface OverlayTriggerState {\n show: boolean;\n trigger: OverlayTriggerProps['trigger'];\n overlayStyl: OverlayStyl;\n transitionName: OverlayProps['transitionName'];\n}\n\nexport type Delay =\n | number\n | {\n show?: number;\n hide?: number;\n };\n\nexport type Placement =\n | 'top'\n | 'topLeft'\n | 'topRight'\n | 'left'\n | 'leftTop'\n | 'leftBottom'\n | 'right'\n | 'rightTop'\n | 'rightBottom'\n | 'bottom'\n | 'bottomLeft'\n | 'bottomRight';\n\nexport type OverlayStyl = {\n placement: Placement;\n top: number;\n bottom: number;\n left: number;\n right: number;\n zIndex: number;\n};\n\ninterface ITriggerProps {\n onClick?: (e: MouseEvent) => void;\n onFocus?: (e: MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseOut?: (e: React.MouseEvent) => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n}\n\nconst normalizeDelay = (delay?: Delay) => (delay && typeof delay === 'object' ? delay : { show: delay, hide: delay });\n\nexport type OverlayTriggerRef = {\n hide: () => void;\n show: () => void;\n};\n\nexport default React.forwardRef((props, ref) => {\n const {\n className,\n\n prefixCls = 'w-overlay-trigger',\n usePortal = true,\n isOutside = false,\n isClickOutside = true,\n disabled = false,\n isOpen: _ = false,\n trigger = 'hover',\n placement = 'top',\n\n autoAdjustOverflow,\n transitionName,\n\n children,\n overlay,\n onVisibleChange = noop,\n onEnter = noop,\n ...other\n } = props;\n\n const zIndex = useRef(999);\n const triggerRef = useRef();\n const popupRef = useRef();\n const timeoutRef = useRef([]);\n const hoverStateRef = useRef<'show' | 'hide' | null>(null);\n const [isOpen, setIsOpen] = useState(!!props.isOpen);\n const [overlayStyl, setOverlayStyl] = useState({\n placement,\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: zIndex.current,\n });\n useImperativeHandle(ref, () => ({\n hide: () => hide(),\n show: () => show(),\n }));\n\n const child: any = React.Children.only(children);\n const overlayProps: OverlayProps = {\n ...other,\n placement,\n isOpen,\n dialogProps: {},\n };\n const triggerProps: ITriggerProps = {};\n\n function getChildProps() {\n if (child && React.isValidElement(child)) {\n return child.props;\n }\n return {};\n }\n\n useEffect(() => {\n if (isClickOutside && isOpen) {\n document && document.addEventListener('mousedown', handleClickOutside);\n window.addEventListener('resize', handleResize);\n }\n return () => {\n document && isClickOutside && document.removeEventListener('mousedown', handleClickOutside);\n window.removeEventListener('resize', handleResize);\n };\n }, [isOpen]);\n\n useEffect(() => {\n if (props.isOpen !== isOpen) {\n setIsOpen(!!props.isOpen);\n }\n }, [props.isOpen]);\n\n useEffect(() => {\n const styls = getStyle({\n placement: overlayStyl.placement || placement,\n trigger: triggerRef.current as HTMLElement | IBoundingClientRect,\n popup: popupRef.current as HTMLElement | IBoundingClientRect,\n usePortal,\n autoAdjustOverflow,\n });\n setOverlayStyl({ ...styls, zIndex: zIndex.current });\n onVisibleChange(isOpen);\n }, [isOpen]);\n\n const handleResize = () => {\n if (isOpen) {\n zIndex.current -= 1;\n setIsOpen(false);\n onVisibleChange && onVisibleChange(false);\n }\n };\n\n const handleClickOutside = (e: MouseEvent) => {\n const popNode = popupRef.current;\n const childNode = triggerRef.current;\n if (\n popNode &&\n childNode &&\n e.target &&\n !contains(popNode, e.target as HTMLElement) &&\n !contains(childNode, e.target as HTMLElement)\n ) {\n zIndex.current -= 1;\n setIsOpen(false);\n onVisibleChange && onVisibleChange(false);\n }\n };\n\n function clearTimeouts() {\n if (timeoutRef.current.length > 0) {\n for (const timeoutId of timeoutRef.current) {\n window.clearTimeout(timeoutId);\n }\n timeoutRef.current = [];\n }\n }\n function handleShow() {\n clearTimeouts();\n hoverStateRef.current = 'show';\n\n const delay = normalizeDelay(props.delay);\n\n if (!delay.show) {\n show();\n return;\n }\n const handle = window.setTimeout(() => {\n if (hoverStateRef.current === 'show') show();\n }, delay.show);\n timeoutRef.current.push(handle);\n }\n\n function handleHide(isOutside: boolean) {\n clearTimeouts();\n if (!isOutside && props.isOutside) return;\n hoverStateRef.current = 'hide';\n\n const delay = normalizeDelay(props.delay);\n\n if (!delay.hide) {\n hide();\n return;\n }\n\n const handle = window.setTimeout(() => {\n if (hoverStateRef.current === 'hide') hide();\n }, delay.hide);\n\n timeoutRef.current.push(handle);\n }\n\n // Simple implementation of mouseEnter and mouseLeave.\n // React's built version is broken: https://github.com/facebook/react/issues/4251\n // for cases when the trigger is disabled and mouseOut/Over can cause flicker\n // moving from one child element to another.\n function handleMouseOverOut(handler: Function, e: React.MouseEvent, relatedNative: 'fromElement' | 'toElement') {\n const target = e.currentTarget as HTMLElement;\n const related = (e.relatedTarget || (e.nativeEvent as any)[relatedNative]) as HTMLElement;\n let isOutside = true;\n if (\n (popupRef.current && contains(popupRef.current, related)) ||\n (triggerRef.current && contains(triggerRef.current, related))\n ) {\n isOutside = false;\n }\n if ((!related || related !== target) && !contains(target, related)) {\n handler(isOutside, e);\n }\n }\n\n function hide() {\n if (!isOpen) return;\n zIndex.current -= 1;\n setIsOpen(false);\n }\n\n function show() {\n if (isOpen) return;\n zIndex.current += 1;\n setIsOpen(true);\n }\n\n function handleEnter(node: HTMLElement, isAppearing: boolean) {\n onEnter && onEnter(node, isAppearing);\n const styls = getStyle({\n placement: overlayStyl.placement || placement,\n trigger: triggerRef.current as HTMLElement | IBoundingClientRect,\n popup: popupRef.current as HTMLElement | IBoundingClientRect,\n usePortal,\n autoAdjustOverflow,\n });\n setOverlayStyl({ ...styls, zIndex: zIndex.current });\n }\n\n if (trigger === 'click' && !disabled) {\n triggerProps.onClick = (e) => {\n const { onClick } = getChildProps() as any;\n isOpen ? hide() : show();\n if (onClick) onClick(e, !isOpen);\n };\n }\n if (trigger === 'focus' && !disabled) {\n triggerProps.onFocus = () => handleShow();\n }\n\n if (trigger === 'hover' && !disabled) {\n triggerProps.onMouseOver = triggerProps.onMouseEnter = (e) => {\n handleMouseOverOut(handleShow, e, 'fromElement');\n };\n triggerProps.onMouseOut = triggerProps.onMouseLeave = (e) => {\n handleMouseOverOut(handleHide, e, 'toElement');\n };\n if (overlayProps.dialogProps) {\n overlayProps.dialogProps!.onMouseLeave = (e) => {\n handleMouseOverOut(handleHide, e, 'toElement');\n };\n }\n }\n overlayProps.style = { ...overlayProps.style, ...overlayStyl };\n return (\n \n {cloneElement(\n child,\n Object.assign({}, child.props, {\n ...triggerProps,\n ref: triggerRef,\n className: [child.props.className, disabled ? `${prefixCls}-disabled` : null]\n .filter(Boolean)\n .join(' ')\n .trim(),\n }),\n )}\n \n {cloneElement(\n overlay,\n Object.assign({\n ...overlay.props,\n ref: popupRef,\n className: [overlay.props && overlay.props.className, placement].filter(Boolean).join(' ').trim(),\n }),\n )}\n \n \n );\n});\n","import React from 'react';\nimport OverlayTrigger, { OverlayTriggerProps } from '@uiw/react-overlay-trigger';\nimport './style/index.less';\n\nexport interface PopoverProps extends OverlayTriggerProps {\n content?: React.ReactNode;\n visibleArrow?: boolean;\n}\n\nexport default class Popover extends React.Component {\n public static defaultProps: PopoverProps = {\n prefixCls: 'w-popover',\n placement: 'top',\n usePortal: true,\n isOpen: false,\n visibleArrow: true,\n };\n renderArrow = () => {\n const { prefixCls } = this.props;\n return (\n \n );\n };\n render() {\n const { prefixCls, className, content, visibleArrow, ...other } = this.props;\n const cls = [prefixCls, className, !visibleArrow ? 'no-arrow' : null].filter(Boolean).join(' ').trim();\n return (\n \n {visibleArrow && this.renderArrow()}\n {this.props.content}
\n \n }\n >\n {typeof this.props.children === 'object' && (this.props.children as JSX.Element).type.name !== 'Icon' ? (\n this.props.children\n ) : (\n {this.props.children} \n )}\n \n );\n }\n}\n","import React, { useState, useMemo } from 'react';\nimport Input, { InputProps } from './';\n\ninterface InputNumberProps extends InputProps {\n min?: number;\n max?: number;\n step?: number;\n overLimitColor?: string;\n formatter?: (value: number) => string;\n parser?: (value: number) => number;\n keyboard?: boolean;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n className,\n min,\n max,\n step,\n overLimitColor,\n keyboard = false,\n formatter,\n prefixCls = 'w-input-number',\n ...otherProps\n } = props;\n\n const value = useMemo(() => Number.parseFloat((props.value || 0)?.toString()), [props.value]);\n const [isOverLimit, isOverLimitSet] = useState(overLimitComp(value));\n\n function overLimitComp(value: number) {\n if (typeof min === 'number' && value < min) return true;\n if (typeof max === 'number' && value > max) return true;\n return false;\n }\n\n const onChange = (v: React.ChangeEvent) => {\n const isOverLimit = overLimitComp(Number.parseFloat(v.target.value));\n isOverLimitSet(isOverLimit);\n\n props.onChange?.(v);\n };\n\n const overLimitProps = useMemo(() => {\n if (!overLimitColor) return { min, max };\n }, []);\n\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n const inputStyle = useMemo(() => (isOverLimit ? { color: overLimitColor?.toString() } : undefined), [isOverLimit]);\n\n return (\n \n );\n});\n","import React, { useEffect, useImperativeHandle } from 'react';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport { IProps, HTMLInputProps } from '@uiw/utils';\nimport './style/input.less';\nexport * from './InputNumber';\nexport { default as InputNumber } from './InputNumber';\n\nexport interface InputProps extends IProps, Omit {\n preIcon?: IconProps['type'];\n addonAfter?: React.ReactNode;\n size?: 'large' | 'default' | 'small';\n inputStyle?: React.CSSProperties;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-input',\n className,\n style,\n size = 'default',\n type = 'text',\n preIcon = null,\n addonAfter,\n inputStyle,\n ...otherProps\n } = props;\n const inputRef = React.useRef(null);\n const addonRef = React.useRef(null);\n useImperativeHandle(ref, () => inputRef.current);\n const cls = [\n prefixCls,\n className,\n size ? `${prefixCls}-${size}` : null,\n addonAfter ? `${prefixCls}-addon` : null,\n props.disabled ? 'disabled' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n useEffect(() => {\n computedInputPadding();\n });\n\n function computedInputPadding() {\n if (addonRef.current && inputRef.current) {\n const input = window && window.getComputedStyle(addonRef.current, null);\n inputRef.current.style.paddingRight = `${\n addonRef.current.clientWidth + parseInt(input.right as string, 10) * 2\n }px`;\n }\n }\n return (\n \n \n \n {addonAfter && (\n \n {addonAfter}\n \n )}\n
\n );\n});\n","import React, { useMemo, useRef } from 'react';\nimport { IProps, HTMLDivProps, HTMLLiProps } from '@uiw/utils';\nimport './style/time-picker.less';\n\nexport interface TimePickerPanelProps extends IProps, HTMLDivProps {\n onSelected?: (\n type: TimePickerPanelProps['type'],\n num: number,\n disableds: number[],\n date: TimePickerPanelProps['date'],\n ) => void;\n count?: number;\n hideDisabled?: boolean;\n disabledHours?: (\n num: number,\n type: TimePickerPanelProps['type'],\n date: TimePickerPanelProps['date'],\n ) => boolean | undefined;\n disabledMinutes?: (\n num: number,\n type: TimePickerPanelProps['type'],\n date: TimePickerPanelProps['date'],\n ) => boolean | undefined;\n disabledSeconds?: (\n num: number,\n type: TimePickerPanelProps['type'],\n date: TimePickerPanelProps['date'],\n ) => boolean | undefined;\n type?: 'Hours' | 'Minutes' | 'Seconds';\n date?: Date;\n}\n\nexport default function TimePickerPanel(props: TimePickerPanelProps) {\n const {\n prefixCls = 'w-timepicker',\n className,\n count = 24,\n date,\n type = 'Hours',\n disabledHours,\n disabledMinutes,\n disabledSeconds,\n hideDisabled,\n onSelected,\n ...other\n } = props;\n const disableds = useRef([]);\n function getMaybeNumber() {\n if (date && type) {\n return new Date(date)[`get${type}` as 'getHours' | 'getMinutes' | 'getSeconds']();\n }\n return 0;\n }\n function handleClick(num: number, e: React.MouseEvent) {\n if (!date) return;\n const currentDate = new Date(date);\n currentDate[`set${type}` as 'setHours' | 'setMinutes' | 'setSeconds'](num);\n onSelected && onSelected(type, num, disableds.current, currentDate);\n }\n function getDisabledItem(num: number) {\n const disabled = props[`disabled${type}` as 'disabledHours' | 'disabledMinutes' | 'disabledSeconds'];\n if (disabled) {\n return disabled(num, type, new Date(date!));\n }\n return false;\n }\n function getItemInstance(tag: HTMLLIElement) {\n if (tag && tag.parentNode && tag.dataset['index']) {\n const offsetTop = Number(tag.dataset['index']) * tag.clientHeight;\n if (tag.parentNode.parentNode) {\n (tag.parentNode.parentNode as HTMLDivElement).scrollTop = offsetTop;\n }\n }\n }\n const data = useMemo(() => {\n return [...Array(count)]\n .map((_, idx) => {\n const disabled = getDisabledItem(idx);\n if (disabled) disableds.current.push(idx);\n return {\n count: idx,\n disabled: getDisabledItem(idx),\n };\n })\n .filter((item) => (hideDisabled && item.disabled ? false : true));\n }, [hideDisabled]);\n\n return (\n \n
\n {data.map((item, idx) => {\n const liProps = {} as HTMLLiProps;\n if (!item.disabled) {\n liProps.onClick = (e) => handleClick(item.count, e);\n }\n const currentCount = getMaybeNumber();\n return (\n tag && getItemInstance(tag)}\n {...liProps}\n className={[\n item.disabled ? 'disabled' : null,\n currentCount === item.count ? 'selected' : null,\n hideDisabled && item.disabled ? 'hide' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim()}\n >\n {item.count < 10 ? `0${item.count}` : item.count}\n \n );\n })}\n \n
\n );\n}\n","import React from 'react';\nimport { IProps } from '@uiw/utils';\nimport TimePanel, { TimePickerPanelProps } from './Panel';\nimport './style/time-picker.less';\n\nexport interface TimePickerTimeProps extends IProps, TimePickerPanelProps {\n precision?: Precision;\n}\n\nexport type Precision = 'hour' | 'minute' | 'second';\n\nexport function TimePickerTime(props: TimePickerTimeProps) {\n const { prefixCls = 'w-timepicker', className, precision = 'second', ...other } = props;\n return (\n \n {/^(second|minute|hour)$/.test(precision as Precision) && }\n {/^(second|minute)$/.test(precision as Precision) && }\n {/^(second)$/.test(precision as Precision) && }\n
\n );\n}\n","import React, { useEffect, useState } from 'react';\nimport Popover, { PopoverProps } from '@uiw/react-popover';\nimport Input, { InputProps } from '@uiw/react-input';\nimport Button from '@uiw/react-button';\nimport { IProps } from '@uiw/utils';\nimport formatter from '@uiw/formatter';\nimport { TimePickerTime, TimePickerTimeProps } from './Time';\nimport './style/index.less';\n\nexport * from './Panel';\nexport * from './Time';\n\nexport interface TimePickerProps extends IProps, Omit {\n value?: Date;\n format?: string;\n popoverProps?: PopoverProps;\n disabledHours?: TimePickerTimeProps['disabledHours'];\n precision?: TimePickerTimeProps['precision'];\n disabledMinutes?: TimePickerTimeProps['disabledMinutes'];\n disabledSeconds?: TimePickerTimeProps['disabledSeconds'];\n hideDisabled?: TimePickerTimeProps['hideDisabled'];\n allowClear?: boolean;\n disabled?: boolean;\n onChange?: (\n dataStr?: string,\n date?: Date | '',\n type?: TimePickerTimeProps['type'],\n num?: number,\n disableds?: number[],\n ) => void;\n}\n\nexport default function TimePicker(props: TimePickerProps) {\n const {\n prefixCls = 'w-timepicker',\n className,\n disabled,\n value,\n format = 'HH:mm:ss',\n popoverProps,\n allowClear = true,\n onChange,\n disabledHours,\n disabledMinutes,\n disabledSeconds,\n hideDisabled,\n precision,\n ...inputProps\n } = props;\n const [date, setDate] = useState(props.value);\n useEffect(() => setDate(props.value), [props.value]);\n const timeProps = {\n disabledHours,\n disabledMinutes,\n disabledSeconds,\n hideDisabled,\n precision,\n };\n const inputValue = date ? formatter(format, new Date(date)) : '';\n const datePickerTime = date || new Date();\n const _props: InputProps = { ...inputProps, value: inputValue };\n if (allowClear && inputValue !== '' && !!inputValue) {\n _props.addonAfter = (\n {\n setDate(undefined);\n onChange && onChange();\n }}\n size={props.size}\n basic\n type=\"light\"\n />\n );\n }\n return (\n {\n setDate(new Date(currentDate!));\n const dataStr = currentDate ? formatter(format, currentDate) : '';\n onChange && onChange(dataStr, currentDate, type, num, disableds);\n }}\n />\n }\n >\n \n \n );\n}\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/day.less';\n\nfunction isValidDate(date: Date) {\n return date instanceof Date && !isNaN(date.getTime());\n}\n\nexport interface DatePickerDayDateSource {\n day?: number;\n month?: number;\n year?: number;\n}\n\nfunction classnames(obj: Record) {\n return Object.keys(obj || {})\n .map((keyName) => (obj[keyName] ? keyName : null))\n .filter(Boolean)\n .join(' ')\n .trim();\n}\n\nexport interface DatePickerDayProps extends IProps, HTMLDivProps {\n weekday?: string[];\n weekTitle?: string[];\n panelDate?: Date;\n date?: Date;\n today?: Date;\n prefixCls?: string;\n onSelectDay?: (selectedDate?: Date, dateSource?: DatePickerDayDateSource) => void;\n renderDay?: (day: number, props: DatePickerDayRenderDay & DatePickerDayRenderDayProps) => React.ReactNode;\n disabledDate?: (cellDate: Date, props: DatePickerDayRenderDay & DatePickerDayRenderDayProps) => boolean;\n}\n\nexport interface PickerDayState {\n selected?: Date;\n panelDate?: Date;\n}\n\nexport type DatePickerDayRenderDay = {\n end: boolean;\n prev: boolean;\n today: boolean;\n selected: boolean;\n next: boolean;\n disabled: boolean;\n date?: Date;\n};\n\nexport type DatePickerDayRenderDayProps = {\n key?: number;\n date?: Date;\n onClick?: (cellDate: Date, event: React.MouseEvent) => void;\n};\n\nexport type DayRectProps = {\n col: number;\n row: number;\n index: number;\n date?: DatePickerDayProps['date'];\n today?: DatePickerDayProps['today'];\n disabledDate?: DatePickerDayProps['disabledDate'];\n renderDay?: DatePickerDayProps['renderDay'];\n panelDate?: DatePickerDayProps['panelDate'];\n onSelectDay?: DatePickerDayProps['onSelectDay'];\n};\n\nexport function DayRect(props: DayRectProps) {\n const {\n date: selectedDate,\n row,\n col,\n index,\n today,\n panelDate,\n disabledDate,\n renderDay,\n onSelectDay,\n ...other\n } = props;\n const cls: Omit = {\n end: col === 0 || col === 6,\n prev: false,\n today: false,\n selected: false,\n next: false,\n disabled: false,\n };\n let date = panelDate;\n if (!date || !isValidDate(date)) date = new Date();\n const year = date.getFullYear();\n const month = date.getMonth();\n const week = useMemo(() => new Date(new Date(date!).setDate(1)).getDay(), [date.toDateString()]);\n const lastDay = useMemo(() => new Date(year, month === 0 ? 12 : month + 1, 0).getDate(), [date.toDateString()]);\n let day = index;\n if (date) {\n day = day - week + 1;\n if (day < 1) {\n cls.prev = true;\n }\n if (day > lastDay) {\n cls.next = true;\n }\n }\n let cellDate = new Date(new Date(date!).setDate(day));\n if (today && today.toDateString() === cellDate.toDateString()) {\n cls.today = true;\n }\n if (selectedDate && selectedDate.toDateString() === cellDate.toDateString()) {\n cls.selected = true;\n }\n const divProps: React.HTMLAttributes = {\n onClick: () => {\n const cellMonth = cellDate.getMonth();\n onSelectDay &&\n onSelectDay!(cellDate, {\n year: cellDate.getFullYear(),\n month: cellMonth === 0 ? 12 : cellMonth + 1,\n day: cellDate.getDate(),\n });\n },\n };\n if (disabledDate && disabledDate(cellDate, { ...props, ...cls })) {\n cls.disabled = true;\n delete divProps.onClick;\n }\n return (\n \n {renderDay ? (\n renderDay(cellDate.getDate(), { ...props, ...cls, date: cellDate })\n ) : (\n
{cellDate.getDate()}
\n )}\n
\n );\n}\n\nconst WEEKTITLE = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];\nconst WEEKDAY = ['日', '一', '二', '三', '四', '五', '六'];\n\nexport function DatePickerDay(props: DatePickerDayProps) {\n const {\n prefixCls = 'w-datepicker',\n className,\n weekday = WEEKDAY,\n weekTitle = WEEKTITLE,\n date,\n today,\n panelDate,\n disabledDate,\n renderDay,\n onSelectDay,\n ...other\n } = props;\n\n const weekdayLabel = useMemo(\n () => (\n \n {(weekday || []).map((week, idx) => (\n
\n {week}\n
\n ))}\n
\n ),\n [prefixCls, weekday, weekTitle],\n );\n\n return (\n \n {weekdayLabel}\n
\n {[...Array(6)].map((_, idx) => (\n
\n {[...Array(7)].map((_, col) => (\n {\n onSelectDay && onSelectDay(curDate, data);\n }}\n index={idx * 7 + col}\n />\n ))}\n
\n ))}\n
\n
\n );\n}\n","import React from 'react';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport './style/year-month.less';\n\nexport interface DatePickerMonthProps extends IProps, HTMLDivProps {\n panelDate?: Date;\n onSelected?: (month: number, paging?: boolean) => void;\n monthLabel?: React.ReactNode[];\n}\n\nexport function DatePickerMonth(props: DatePickerMonthProps) {\n const {\n prefixCls = 'w-datepicker',\n className,\n panelDate = new Date(),\n monthLabel,\n onSelected = noop,\n ...other\n } = props;\n return (\n \n {[...Array(12)].map((_, idx) => {\n const selectedMonth = panelDate!.getMonth();\n return (\n
\n onSelected(idx, false)}>{(monthLabel && monthLabel[idx]) || idx} \n
\n );\n })}\n
\n );\n}\n","import React, { useState } from 'react';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport './style/year-month.less';\n\nexport interface DatePickerYearProps extends IProps, HTMLDivProps {\n panelDate?: Date;\n panelNum?: number[];\n onSelected?: (year: number, paging?: boolean) => void;\n}\n\nexport function DatePickerYear(props: DatePickerYearProps) {\n const {\n prefixCls = 'w-datepicker',\n panelNum = [-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n className,\n panelDate,\n onSelected = noop,\n ...other\n } = props;\n const [activeYear, setActiveYear] = useState(props.panelDate);\n function handleSelected(year: number, idx: number) {\n if (idx === 0 || idx === panelNum!.length - 1) {\n const date = new Date(activeYear!);\n date.setFullYear(year);\n setActiveYear(date);\n onSelected!(year, true);\n } else {\n onSelected!(year);\n }\n }\n return (\n \n {panelNum &&\n panelNum.map((_, idx) => {\n const selectedYear = activeYear!.getFullYear();\n const year = selectedYear + panelNum[idx];\n return (\n
\n handleSelected(year, idx)}>{year} \n
\n );\n })}\n
\n );\n}\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport './style/caption.less';\n\nfunction classnames(...arg: (string | null | undefined)[]) {\n return [...arg].filter(Boolean).join(' ').trim();\n}\n\nexport type DatePickerCaptionType = 'prev' | 'month' | 'year' | 'today' | 'next';\n\nexport interface DatePickerCaptionProps extends IProps, HTMLDivProps {\n panelDate?: Date;\n monthLabel?: React.ReactNode[];\n todayButton?: string;\n onSelected?: (captionType: DatePickerCaptionType) => void;\n}\n\nexport function DatePickerCaption(props: DatePickerCaptionProps) {\n const {\n prefixCls = 'w-datepicker',\n className,\n panelDate = new Date(),\n monthLabel,\n onSelected = noop,\n todayButton,\n ...other\n } = props;\n\n const renderMonth = useMemo(() => {\n const month = panelDate.getMonth();\n return (monthLabel && monthLabel[month]) || month + 1;\n }, [panelDate.toDateString(), monthLabel]);\n return (\n \n
onSelected('prev')}\n />\n
onSelected('month')}\n >\n {renderMonth}\n
\n
onSelected('year')}\n >\n {panelDate!.getFullYear()}\n
\n {todayButton && (\n
onSelected('today')}\n title={todayButton}\n />\n )}\n
onSelected('next')}\n />\n
\n );\n}\n","import React, { useEffect, useMemo, useState } from 'react';\nimport formatter from '@uiw/formatter';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport { TimePickerTime, TimePickerPanelProps } from '@uiw/react-time-picker';\nimport { DatePickerDay, DatePickerDayProps, DatePickerDayDateSource } from './DatePickerDay';\nimport { DatePickerMonth } from './DatePickerMonth';\nimport { DatePickerYear } from './DatePickerYear';\nimport { DatePickerCaption, DatePickerCaptionType } from './DatePickerCaption';\nimport './style/index.less';\n\nexport * from './DatePickerDay';\nexport * from './DatePickerMonth';\nexport * from './DatePickerYear';\nexport * from './DatePickerCaption';\n\nconst MONTH_LABEL = [\n '一月',\n '二月',\n '三月',\n '四月',\n '五月',\n '六月',\n '七月',\n '八月',\n '九月',\n '十月',\n '十一月',\n '十二月',\n];\n\nexport interface DatePickerShowTimeProps extends TimePickerPanelProps {\n format?: string;\n}\nexport interface DatePickerProps extends IProps, Omit
{\n onChange?: (selectedDate?: Date, dateSource?: DatePickerDayDateSource) => void;\n renderDay?: DatePickerDayProps['renderDay'];\n disabledDate?: DatePickerDayProps['disabledDate'];\n showTime?: DatePickerShowTimeProps | boolean;\n monthLabel?: React.ReactNode[];\n weekday?: string[];\n weekTitle?: string[];\n date?: Date;\n panelDate?: Date;\n today?: Date;\n todayButton?: string;\n onPanelChange?: (date?: Date, mode?: 'next' | 'prev') => void;\n}\nexport interface DatePickerState {\n panelDate?: Date;\n date?: Date;\n type?: 'day' | 'time' | DatePickerCaptionType;\n}\n\nexport default function DatePicker(props: DatePickerProps) {\n const {\n prefixCls = 'w-datepicker',\n className,\n weekday,\n weekTitle,\n monthLabel = MONTH_LABEL,\n date,\n today = new Date(),\n todayButton,\n panelDate = new Date(),\n disabledDate,\n renderDay,\n onChange = noop,\n onPanelChange = noop,\n showTime,\n ...other\n } = props;\n const [type, setType] = useState('day');\n const [selectDate, setSelectDate] = useState(date);\n const [selectPanelDate, setSelectPanelDate] = useState(panelDate);\n\n useEffect(() => {\n if (date) {\n setSelectDate(date);\n setSelectPanelDate(date);\n }\n }, [date]);\n\n const format = useMemo(\n () =>\n showTime && (showTime as DatePickerShowTimeProps).format\n ? (showTime as DatePickerShowTimeProps).format\n : 'HH:mm:ss',\n [showTime],\n );\n function handleSelected(curType: DatePickerState['type']) {\n if (curType && /^(year|month|time)$/.test(curType)) {\n if (type === 'time') {\n curType = 'day';\n }\n setType(curType);\n } else {\n let currentDate = new Date(selectPanelDate);\n let month = currentDate.getMonth();\n if (curType === 'prev') {\n month -= 1;\n }\n if (curType === 'next') {\n month += 1;\n }\n currentDate.setMonth(month);\n if (curType === 'prev' || curType === 'next') {\n onPanelChange && onPanelChange(new Date(currentDate), curType);\n }\n setSelectPanelDate(curType === 'today' ? today : currentDate);\n curType === 'today' && setSelectDate(today);\n\n setType('day');\n }\n }\n\n function onSelectedTime(type: TimePickerPanelProps['type'], num: number) {\n (selectPanelDate || new Date())[`set${type}` as 'setHours'](num);\n setSelectPanelDate(new Date(selectPanelDate));\n onChange && onChange(new Date(selectPanelDate));\n }\n\n function onSelectedDate(type: 'setMonth' | 'setFullYear', month: number, paging?: boolean) {\n (selectPanelDate || new Date())[type](month);\n setSelectPanelDate(new Date(selectPanelDate));\n setType('day');\n onChange && onChange(new Date(selectPanelDate));\n }\n return (\n \n
\n {type === 'day' && (\n
{\n setSelectPanelDate(selectedDate!);\n onChange(selectedDate, dateSource);\n }}\n renderDay={renderDay}\n date={selectDate}\n today={today || new Date()}\n panelDate={selectPanelDate}\n weekday={weekday}\n weekTitle={weekTitle}\n />\n )}\n {type === 'month' && (\n onSelectedDate('setMonth', num)}\n />\n )}\n {type === 'year' && (\n onSelectedDate('setFullYear', num)}\n />\n )}\n {type === 'time' && (\n \n )}\n {showTime && format && (\n handleSelected('time')}>\n {formatter(format!, selectDate || selectPanelDate)}\n
\n )}\n \n );\n}\n","import React, { useMemo } from 'react';\nimport { CalendarProps } from './';\n\nexport type RenderDayProps = {\n prefixCls?: string;\n day?: number;\n data?: CalendarProps['data'];\n currentDate?: Date;\n};\n\nexport default function RenderDay(props: RenderDayProps) {\n const { prefixCls, day, data, currentDate } = props;\n\n const dayData = useMemo(\n () =>\n (data || []).filter((item) => {\n let arr: number[] = ((item.date && item.date.split('/')) || []).map((num) => Number(num));\n if (arr.length === 1) {\n return day === arr[0];\n }\n if (currentDate && arr.length === 2) {\n return currentDate.getMonth() + 1 === arr[0] && day === arr[1];\n }\n if (currentDate && arr.length === 3) {\n return currentDate.getFullYear() === arr[0] && currentDate.getMonth() + 1 === arr[1] && day === arr[2];\n }\n return false;\n }),\n [currentDate, day, data],\n );\n\n return useMemo(\n () => (\n \n
{day}
\n
\n {dayData &&\n dayData.length > 0 &&\n dayData.map((item, idx) => {\n const { date, label, ...other } = item;\n return (\n
\n {label}\n
\n );\n })}\n
\n
\n ),\n [dayData, day],\n );\n}\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { DatePickerDay, DatePickerDayProps, DatePickerDayDateSource } from '@uiw/react-date-picker';\nimport Icon from '@uiw/react-icon';\nimport formatter from '@uiw/formatter';\nimport { IProps } from '@uiw/utils';\nimport RenderDay from './DayLabel';\nimport './style/index.less';\n\nexport interface CalendarProps extends IProps, DatePickerDayProps {\n /**\n * 设置日历面板上面的日期标题。\n */\n titleFormat?: string;\n /**\n * 点击选择日期回调\n */\n onSelectDay?: (selectDay?: Date, dateSource?: DatePickerDayDateSource) => void;\n /**\n * 日历面板默认展示哪一页\n */\n panelDate?: Date;\n /**\n * 默认高亮当天日期\n */\n today?: Date;\n /**\n * 在日历面板上面添加通知,数组中的对象可以设置 `ElementProps`,如:`style`, `onClick` 等属性。\n */\n data?: ICalendarData[];\n /**\n * 选中的日期\n */\n date?: Date;\n /**\n * `今天` 按钮的文本设置\n */\n todayLabel?: string;\n /**\n * 月份显示文本\n */\n monthLabel?: string[];\n /** 翻页触发事件 */\n onPaging?: (type: 'prev' | 'next' | 'today', month: number, panelDate?: Date) => void;\n}\n\nexport interface ICalendarData {\n label?: React.ReactNode;\n date?: string;\n [key: string]: any;\n}\n\nconst MONTH_LABEL = [\n '一月',\n '二月',\n '三月',\n '四月',\n '五月',\n '六月',\n '七月',\n '八月',\n '九月',\n '十月',\n '十一月',\n '十二月',\n];\n\nexport default function Calendar(props: CalendarProps) {\n const {\n prefixCls = 'w-calendar',\n className,\n style,\n today = new Date(),\n date,\n data,\n monthLabel = MONTH_LABEL,\n titleFormat = 'YYYY/MM',\n todayLabel = '今天',\n panelDate: _,\n onPaging,\n onSelectDay,\n ...otherProps\n } = props;\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n const [panelDate, setPanelDate] = useState(props.panelDate || new Date());\n\n useEffect(() => {\n if (props.panelDate !== panelDate) {\n setPanelDate(panelDate);\n }\n }, [props.panelDate]);\n\n function handlePaging(type: 'prev' | 'next' | 'today') {\n let currentDate = new Date();\n if (type === 'today') {\n currentDate = today || new Date();\n } else {\n const month = panelDate.getMonth();\n if (panelDate && type === 'prev') {\n panelDate.setMonth(month - 1);\n }\n if (panelDate && type === 'next') {\n panelDate.setMonth(month + 1);\n }\n currentDate = panelDate;\n }\n setPanelDate(new Date(currentDate));\n onPaging && onPaging(type, currentDate!.getMonth() + 1, currentDate);\n }\n\n const titleLable = useMemo(\n () => {formatter(titleFormat, panelDate)}
,\n [prefixCls, titleFormat, panelDate],\n );\n\n const btngroup = useMemo(\n () => (\n \n handlePaging('prev')} />\n handlePaging('today')}>\n {todayLabel}\n \n handlePaging('next')} />\n
\n ),\n [prefixCls, todayLabel],\n );\n\n return (\n \n
\n {titleLable}\n {btngroup}\n
\n
{\n setPanelDate(currentDate!);\n onSelectDay && onSelectDay(currentDate, dateSource);\n }}\n renderDay={(day, propsNext) => (\n \n )}\n date={date}\n today={today}\n panelDate={panelDate || new Date()}\n {...otherProps}\n />\n \n );\n}\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface CardProps extends IProps, Omit {\n active?: boolean;\n bordered?: boolean;\n bodyStyle?: React.CSSProperties;\n bodyClassName?: string;\n title?: React.ReactNode;\n noHover?: boolean;\n extra?: React.ReactNode;\n footer?: React.ReactNode;\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-card',\n className,\n title,\n extra,\n footer,\n bordered = true,\n noHover = false,\n active = false,\n bodyStyle,\n bodyClassName,\n children,\n ...resetProps\n } = props;\n const cls = useMemo(\n () =>\n [\n prefixCls,\n className,\n bordered ? `${prefixCls}-bordered` : null,\n noHover ? `${prefixCls}-no-hover` : null,\n active ? 'active' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim(),\n [prefixCls, className, bordered, noHover],\n );\n\n return (\n \n {(title || extra) && (\n
\n {title &&
{title}
}\n {extra &&
{extra}
}\n
\n )}\n {children && (\n
\n {children}\n
\n )}\n {footer &&
{footer}
}\n
\n );\n});\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface CarouselProps extends IProps, HTMLDivProps {\n width?: number;\n height?: number;\n position?: number;\n palyTime?: number;\n scrollTime?: number;\n autoPlay?: boolean;\n direction?: 'horizontal' | 'vertical';\n afterChange?: (current: number) => void;\n beforeChange?: (current: number) => void;\n}\n\nexport interface CarouselRef {\n gotoSlide: (slide: number, dontAnimate?: boolean) => void;\n prevSlide: () => void;\n nextSlide: () => void;\n stopPlay: () => void;\n}\n\nfunction Carousel(props: CarouselProps, ref: React.ForwardedRef) {\n const {\n position = 0,\n direction = 'horizontal',\n width = 400,\n height = 200,\n palyTime = 2000,\n scrollTime = 200,\n autoPlay = true,\n afterChange,\n beforeChange,\n\n prefixCls = 'w-carousel',\n className,\n style,\n } = props;\n\n const cls = useMemo(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);\n\n const [currentPosition, currentPositionSet] = useState(position);\n const [transitionInner, transitionInnerSet] = useState(`${scrollTime * 0.001}s ease-in-out`);\n const positionRef = useRef(currentPosition);\n const childCount = React.Children.count(props.children) + 1;\n const stopPlay = useRef({ stop: () => {}, after: afterChange, before: beforeChange });\n\n React.useImperativeHandle(\n ref,\n () => ({\n gotoSlide,\n prevSlide: () => gotoSlide(positionRef.current - 1),\n nextSlide: () => gotoSlide(positionRef.current + 1),\n stopPlay: () => stopPlay.current.stop(),\n }),\n [ref],\n );\n\n const gotoSlide = (slidNumber: number) => {\n stopPlay.current.stop();\n const maxSlid = childCount - 1;\n let slidNumberTemp = slidNumber > maxSlid ? maxSlid : slidNumber;\n slidNumberTemp = slidNumber < 0 ? 0 : slidNumberTemp;\n positionRef.current = slidNumberTemp;\n currentPositionSet(slidNumberTemp);\n play();\n };\n\n const play = (ms: number = palyTime) => {\n if (autoPlay) {\n const time = setInterval(() => {\n stopPlay.current.after?.(positionRef.current);\n positionRef.current++;\n if (positionRef.current >= childCount) {\n positionRef.current = 0;\n }\n currentPositionSet(positionRef.current);\n stopPlay.current.before?.(positionRef.current);\n }, ms);\n stopPlay.current.stop = () => {\n clearInterval(time);\n };\n }\n };\n\n useEffect(() => {\n play();\n return () => {\n stopPlay.current.stop();\n };\n }, [autoPlay]);\n\n useEffect(() => {\n let time: NodeJS.Timeout;\n if (childCount === currentPosition + 1) {\n time = setTimeout(() => {\n stopPlay.current.before = () => {\n transitionInnerSet(`${scrollTime * 0.001}s ease-in-out`);\n stopPlay.current.before = props.beforeChange;\n };\n transitionInnerSet('none');\n gotoSlide(0);\n }, scrollTime);\n }\n return () => {\n clearTimeout(time);\n };\n }, [currentPosition]);\n\n const childrens = React.Children.map(props.children, (child) => {\n return {child}
;\n });\n\n const innerStyle = useMemo(() => {\n const style = { transform: '', display: '' };\n switch (direction) {\n case 'horizontal':\n style.transform = `translate3d(${-(currentPosition * width)}px, 0px, 0px)`;\n style.display = 'flex';\n break;\n case 'vertical':\n style.transform = `translate3d(0px, ${-(currentPosition * height)}px, 0px)`;\n style.display = 'block';\n break;\n default:\n break;\n }\n return style;\n }, [direction, currentPosition, width, height]);\n\n return (\n \n
\n {childrens}\n
{childrens?.[0]}
\n
\n
\n );\n}\n\nexport default React.forwardRef(Carousel);\n","import React from 'react';\nimport OverlayTrigger, { OverlayTriggerProps } from '@uiw/react-overlay-trigger';\nimport { IProps } from '@uiw/utils';\nimport { useMemo } from 'react';\n\nexport interface DropdownProps extends IProps, OverlayTriggerProps {\n menu?: React.ReactNode;\n}\n\nexport default function Dropdown(props: DropdownProps) {\n const { prefixCls = 'w-dropdown', placement = 'bottomLeft', className, menu, children, disabled, ...other } = props;\n\n const cls = useMemo(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);\n\n return (\n \n {React.cloneElement(children, Object.assign({}, children.props))}\n \n );\n}\n","import React, { Fragment } from 'react';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport { IProps } from '@uiw/utils';\nimport './style/item.less';\n\nconst disabledProps = {\n href: undefined,\n onClick: undefined,\n onMouseDown: undefined,\n onMouseEnter: undefined,\n onMouseLeave: undefined,\n tabIndex: -1,\n};\n\nexport type TagType = React.ComponentType | keyof JSX.IntrinsicElements;\n\nexport interface MenuItemProps extends IProps, React.HTMLProps {\n text?: React.ReactNode;\n addonAfter?: React.ReactNode;\n tagName?: Tag;\n multiline?: boolean;\n isSubMenuItem?: boolean;\n disabled?: boolean;\n active?: boolean;\n icon?: IconProps['type'];\n children?: React.ReactNode;\n}\n\nfunction Internal(props: MenuItemProps, ref: React.Ref>) {\n const {\n prefixCls = 'w-menu-item',\n className,\n tagName: TagName = 'a',\n children,\n disabled = false,\n multiline = false,\n icon,\n text,\n active = false,\n addonAfter,\n isSubMenuItem,\n ...htmlProps\n } = props;\n const anchorCls = [prefixCls, active ? 'active' : null, disabled ? 'w-disabled' : null, className]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n const tagComp = React.createElement(\n TagName,\n {\n ...htmlProps,\n ...(disabled ? disabledProps : {}),\n className: anchorCls,\n ref,\n } as any,\n \n \n \n {text}\n
\n {addonAfter}\n ,\n );\n if (isSubMenuItem) {\n return tagComp;\n }\n return {tagComp} ;\n}\n\nexport const MenuItem = React.forwardRef(Internal);\n\nMenuItem.displayName = 'uiw.MenuItem';\n","import React from 'react';\nimport { IProps, HTMLLiProps } from '@uiw/utils';\n\nexport interface MenuDividerProps extends IProps, Omit {\n title?: React.ReactNode;\n}\n\nexport const MenuDivider = React.forwardRef((props, ref) => {\n const { prefixCls = 'w-menu-divider', className, title, ...htmlProps } = props;\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n if (!title) {\n return ;\n }\n return (\n \n {title} \n \n );\n});\n\nMenuDivider.displayName = 'uiw.MenuDivider';\n","import React, { useMemo, useState } from 'react';\nimport { CSSTransitionProps } from 'react-transition-group/CSSTransition';\nimport OverlayTrigger, { OverlayTriggerProps, OverlayTriggerRef } from '@uiw/react-overlay-trigger';\nimport Icon from '@uiw/react-icon';\nimport { IProps } from '@uiw/utils';\nimport { MenuItem, MenuItemProps, TagType } from './MenuItem';\nimport Menu, { MenuProps } from './Menu';\nimport './style/submenu.less';\n\nexport interface SubMenuProps extends IProps, MenuItemProps {\n overlayProps?: OverlayTriggerProps;\n collapse?: boolean;\n disabled?: boolean;\n inlineCollapsed?: boolean;\n inlineIndent?: number;\n}\n\nfunction checkedMenuItem(node?: HTMLElement) {\n let isCheck = false;\n if (node) {\n // eslint-disable-next-line\n do {\n if (!node.dataset.menu) {\n isCheck = true;\n }\n if (node.dataset.menu && /^(subitem|divider)$/.test(node.dataset.menu)) {\n isCheck = false;\n }\n } while (!node.dataset.menu && (node = node.parentNode as HTMLElement));\n }\n return isCheck;\n}\n\nfunction IconView({ prefixCls, collapse, isOpen }: { prefixCls?: string; collapse?: boolean; isOpen: boolean }) {\n return useMemo(\n () => (\n \n ),\n [prefixCls, collapse, isOpen],\n );\n}\nexport const SubMenu = React.forwardRef(function (\n props: SubMenuProps,\n ref: React.Ref,\n) {\n const {\n prefixCls = 'w-menu-subitem',\n className,\n disabled,\n overlayProps = {},\n children,\n collapse = false,\n inlineIndent,\n inlineCollapsed,\n ...other\n } = props;\n const overlayTriggerProps = {} as OverlayTriggerProps & CSSTransitionProps;\n const menuProps: MenuProps = {\n bordered: true,\n children,\n inlineIndent,\n className: [prefixCls ? `${prefixCls}-overlay` : null].filter(Boolean).join(' ').trim(),\n };\n const popupRef = React.useRef(null);\n const [isOpen, setIsOpen] = useState(!!overlayProps.isOpen);\n useMemo(() => {\n if (collapse) setIsOpen(false);\n }, [collapse]);\n\n function onClick(e: React.MouseEvent) {\n const target = e.currentTarget;\n const related = (e.relatedTarget || e.nativeEvent.target) as HTMLElement;\n if (target.children.length < 1) return;\n if (checkedMenuItem(related)) {\n if (popupRef.current) {\n popupRef.current!.hide();\n }\n }\n }\n function onExit(node: HTMLElement) {\n node.style.height = `${node.scrollHeight}px`;\n setIsOpen(false);\n }\n function onExiting(node: HTMLElement) {\n node.style.height = '0px';\n }\n function onEnter(node: HTMLElement) {\n node.style.height = '1px';\n setIsOpen(true);\n }\n function onEntering(node: HTMLElement) {\n node.style.height = `${node.scrollHeight}px`;\n }\n function onEntered(node: HTMLElement) {\n node.style.height = 'initial';\n }\n\n if (!collapse) {\n delete menuProps.onClick;\n menuProps.bordered = false;\n overlayTriggerProps.className = `${prefixCls}-collapse`;\n overlayTriggerProps.appear = false;\n overlayTriggerProps.isOutside = true;\n overlayTriggerProps.isClickOutside = false;\n overlayTriggerProps.unmountOnExit = false;\n overlayTriggerProps.trigger = 'click';\n overlayTriggerProps.transitionName = `${prefixCls}`;\n overlayTriggerProps.onExit = onExit;\n overlayTriggerProps.onExiting = onExiting;\n overlayTriggerProps.onEnter = onEnter;\n overlayTriggerProps.onEntered = onEntered;\n overlayTriggerProps.onEntering = onEntering;\n } else {\n overlayTriggerProps.className = `${prefixCls}-popup`;\n overlayTriggerProps.trigger = 'hover';\n overlayTriggerProps.usePortal = true;\n menuProps.onClick = onClick;\n }\n return (\n \n }\n >\n }\n className={[\n prefixCls ? `${prefixCls}-title` : null,\n !collapse ? `${prefixCls}-collapse-title` : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')\n .trim()}\n />\n \n \n );\n});\n\nSubMenu.displayName = 'uiw.SubMenu';\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLUlProps } from '@uiw/utils';\nimport { MenuItem } from './MenuItem';\nimport { MenuDivider } from './Divider';\nimport { SubMenu } from './SubMenu';\nimport './style/menu.less';\n\nexport interface MenuProps extends IProps, HTMLUlProps {\n /** 主题颜色 */\n theme?: 'light' | 'dark';\n /**\n * 垂直是否收起菜单\n * Default: `false`\n */\n inlineCollapsed?: boolean;\n /**\n * 菜单缩进宽度 Default: `10`\n */\n inlineIndent?: number;\n bordered?: boolean;\n}\n\nconst Menu = React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-menu',\n className,\n children,\n bordered,\n theme = 'light',\n inlineIndent = 10,\n inlineCollapsed,\n ...htmlProps\n } = props;\n const cls = useMemo(\n () =>\n [\n prefixCls,\n bordered ? 'w-bordered' : null,\n inlineCollapsed ? `${prefixCls}-inline-collapsed` : null,\n theme ? `${prefixCls}-${theme}` : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')\n .trim(),\n [prefixCls, bordered, inlineCollapsed, theme, className],\n );\n\n return (\n \n {React.Children.map(children, (child: React.ReactNode, key) => {\n if (!React.isValidElement(child)) return child;\n const props: { inlineIndent?: number; inlineCollapsed?: boolean } = {};\n // Sub Menu\n if (child.props.children && child.type === (SubMenu as any)) {\n props.inlineIndent = inlineIndent;\n }\n return React.cloneElement(child, Object.assign({ ...props }, child.props, { key: `${key}` }));\n })}\n \n );\n});\n\nMenu.displayName = 'uiw.Menu';\n\ntype Menu = typeof Menu & {\n Item: typeof MenuItem;\n SubMenu: typeof SubMenu;\n Divider: typeof MenuDivider;\n};\n\n(Menu as Menu).Item = MenuItem;\n(Menu as Menu).SubMenu = SubMenu;\n(Menu as Menu).Divider = MenuDivider;\n\nexport default Menu as Menu;\n","import Menu from './Menu';\n\nexport * from './Menu';\nexport * from './MenuItem';\nexport * from './SubMenu';\nexport * from './Divider';\n\nexport default Menu;\n","import React, { useState, useEffect, useMemo } from 'react';\nimport Input from '@uiw/react-input';\nimport { HTMLInputProps, IProps } from '@uiw/utils';\nimport Dropdown, { DropdownProps } from '@uiw/react-dropdown';\nimport Menu from '@uiw/react-menu';\nimport Icon from '@uiw/react-icon';\nimport './style/index.less';\n\ntype ValueType = Array;\ntype OptionType = { value: string | number; label: React.ReactNode; children?: Array };\ntype SearchOptionType = { label: string; options: Array };\n\nexport interface CascaderProps extends IProps, DropdownProps {\n size?: 'large' | 'default' | 'small';\n option?: Array;\n value?: ValueType;\n onChange?: (isSeleted: boolean, value: ValueType, selectedOptions: Array) => void;\n onSearch?: boolean | ((searchText: string) => void);\n allowClear?: boolean;\n placeholder?: string;\n disabled?: boolean;\n inputProps?: HTMLInputProps;\n expandTrigger: 'click' | 'hover';\n}\n\nfunction Cascader(props: CascaderProps) {\n const {\n value,\n onChange,\n onSearch,\n expandTrigger = 'click',\n size,\n disabled,\n allowClear,\n placeholder,\n prefixCls = 'w-cascader',\n className,\n style = { width: 200 },\n option = [],\n others,\n inputProps,\n } = props;\n\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n const [innerIsOpen, setInnerIsOpen] = useState(false);\n const [selectedValue, setSelectedValue] = useState>([]);\n const [selectIconType, setSelectIconType] = useState('');\n const [searchText, setSearchText] = useState('');\n const [searchOn, setSearchOn] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const [searchOption, setSearchOption] = useState>();\n\n useEffect(() => {\n if (onSearch) {\n const tempOptions: Array = [];\n iteratorOption(option, (opt) => {\n const label = opt.map((m) => m.label).join(' / ');\n tempOptions.push({ label, options: opt });\n });\n setSearchOption(tempOptions);\n }\n }, [onSearch]);\n\n const iteratorOption = (\n options: Array,\n cb: (opt: Array) => void,\n opts: Array = [],\n ) => {\n options.map((opt) => {\n const optsTemp = [...opts, opt];\n if (opt.children) {\n iteratorOption(opt.children, cb, optsTemp);\n } else {\n cb?.(optsTemp);\n }\n });\n };\n\n useEffect(() => {\n if (value) {\n const valueTemp: Array = [];\n let optChildren = option;\n value?.map((item) => {\n const findOpt = optChildren.find((opt) => opt.value === item);\n optChildren = findOpt?.children || [];\n valueTemp.push({ label: item, value: item, ...findOpt });\n });\n setSelectedValue(valueTemp);\n }\n }, [value]);\n\n function onVisibleChange(isOpen: boolean) {\n setInnerIsOpen(isOpen);\n }\n\n function renderSelectIcon(type: string) {\n let selectIconType;\n if (type === 'enter' && allowClear && selectedValue.length > 0) {\n selectIconType = 'close';\n } else {\n selectIconType = '';\n }\n setSelectIconType(selectIconType);\n }\n\n const searchItemClick = (options: Array) => {\n setSearchText('');\n setInnerIsOpen(false);\n handelChange(false, options);\n };\n\n const handleItemClick = (optionsItem: OptionType, level: number) => {\n selectedValue.splice(level, selectedValue.length - level, optionsItem);\n if (!optionsItem.children) setInnerIsOpen(false);\n\n handelChange(true, selectedValue);\n };\n\n const handelChange = (isSeleted: boolean, selectedValue: Array) => {\n setSelectedValue([...selectedValue]);\n const value = selectedValue.map((item) => item.value);\n onChange?.(isSeleted, value, selectedValue);\n };\n\n const onClear = (e: React.MouseEvent) => {\n e.stopPropagation();\n handelChange(false, []);\n };\n\n const handelSearch = (searchText: string) => {\n setSearchText(searchText);\n };\n\n const inputChange = (e: React.ChangeEvent) => {\n if (!innerIsOpen) {\n setInnerIsOpen(!innerIsOpen);\n }\n const value = e.target.value;\n onSearch && handelSearch(value);\n };\n\n const widths = (style?.width as number) * 0.7 || undefined;\n\n const trigger = useMemo(() => {\n return (cb: Function, click?: boolean) => {\n const triggers: Record<'onClick' | 'onMouseOver', () => void> = { onClick: () => {}, onMouseOver: () => {} };\n const callback = () => {\n cb();\n };\n if (expandTrigger === 'click' || click) {\n triggers.onClick = callback;\n } else if (expandTrigger === 'hover') {\n triggers.onMouseOver = callback;\n }\n return triggers;\n };\n }, []);\n\n const OptionIter = (option: Array, level: number = 0) => {\n if (!option) return;\n\n return (\n \n {!option || option.length === 0 ? (\n {'没有数据'}
\n ) : (\n option.map((opt, index) => {\n const active = selectedValue[level]?.value === opt.value;\n return (\n : undefined}\n {...trigger(() => {\n handleItemClick(opt, level);\n }, !opt.children?.length)}\n />\n );\n })\n )}\n \n ) as JSX.Element;\n };\n\n useEffect(() => {\n const inputValue = selectedValue.map((opt) => opt.label).join(' / ');\n setInputValue(inputValue);\n }, [selectedValue]);\n\n return (\n \n {new Array(selectedValue.length + 1)\n .fill(0)\n .map((_, index) => {\n const options = index ? selectedValue[index - 1]?.children! : option;\n return OptionIter(options, index);\n })\n .filter((m) => !!m)}\n \n ) : (\n
\n {!searchOption || searchOption.length === 0 ? (\n {'没有数据'}
\n ) : (\n searchOption\n .filter((opt) => opt.label.includes(searchText.trim()))\n .map((opt, index) => {\n return searchItemClick(opt.options)} />;\n })\n )}\n \n )\n }\n >\n
renderSelectIcon('leave')} onMouseOver={() => renderSelectIcon('enter')}>\n onSearch && setSearchOn(true)}\n onBlur={() => onSearch && setSearchOn(false)}\n readOnly={!onSearch}\n addonAfter={\n \n {!disabled && selectIconType === 'close' && (\n \n )}\n \n }\n />\n \n \n );\n}\n\nexport default Cascader;\n","import React, { useState, useMemo } from 'react';\nimport { IProps, HTMLInputProps } from '@uiw/utils';\n\n/**\n * Constructs a type by picking all properties from `HTMLInputProps` and then removing `size`.\n * Omit: https://www.typescriptlang.org/docs/handbook/utility-types.html#omittk\n */\nexport interface RadioAbstractProps extends IProps, Omit
{\n size?: 'large' | 'default' | 'small';\n checked?: boolean;\n disabled?: boolean;\n onChange?: (even: React.ChangeEvent) => void;\n}\n\nexport const RadioAbstract = React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-radio',\n type = 'radio',\n disabled = false,\n value = '',\n className,\n style,\n children,\n size,\n checked: prChecked = false,\n onChange,\n ...other\n } = props;\n\n const [checked, setChecked] = useState(prChecked);\n const [prevChecked, setPrevChecked] = useState();\n if (prChecked !== prevChecked) {\n setPrevChecked(prChecked);\n }\n useMemo(() => {\n if (prChecked !== prevChecked) {\n setChecked(prChecked);\n }\n }, [prevChecked]);\n\n const cls = [prefixCls, className, disabled ? 'disabled' : null, size ? `${prefixCls}-${size}` : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n useMemo(() => {\n if (checked !== props.checked) {\n setChecked(!!props.checked);\n }\n }, [props.checked]);\n\n function handleChange(e: React.ChangeEvent) {\n e.persist();\n setChecked(e.target.checked);\n onChange && onChange(e);\n }\n\n const label = children || value;\n return (\n \n \n {label && {label}
}\n \n );\n});\n","import React from 'react';\nimport { RadioAbstract, RadioAbstractProps } from './RadioAbstract';\nimport './style/index.less';\n\nexport interface RadioProps extends RadioAbstractProps {}\n\nexport default React.forwardRef((props, ref) => {\n return ;\n});\n","import React from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport { RadioProps } from './Radio';\nimport ButtonGroup from '@uiw/react-button-group';\nimport './style/group.less';\n\nexport interface RadioGroupProps extends IProps, HTMLDivProps {\n name?: RadioProps['name'];\n value?: RadioProps['value'];\n onChange?: RadioProps['onChange'];\n}\n\nexport default React.forwardRef((props, ref) => {\n const { prefixCls = 'w-radio-group', className, name, value, onChange, children, ...other } = props;\n return (\n \n \n {React.Children.toArray(children).map((child) => {\n if (!child) return;\n if (!React.isValidElement(child)) return child;\n return React.cloneElement(child, {\n ...(child.props || {}),\n ...{\n checked: child.props.value === value,\n name,\n onChange,\n },\n });\n })}\n \n
\n );\n});\n","import React, { useState, useMemo } from 'react';\nimport { IProps, HTMLButtonProps } from '@uiw/utils';\nimport Button from '@uiw/react-button';\n\n/**\n * Constructs a type by picking all properties from `HTMLInputProps` and then removing `size`.\n * Omit: https://www.typescriptlang.org/docs/handbook/utility-types.html#omittk\n */\nexport interface RadioButtonProps extends IProps, Omit {\n size?: 'large' | 'default' | 'small';\n checked?: boolean;\n disabled?: boolean;\n onChange?: (even: any) => void;\n}\n\nconst RadioButton = React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-radio',\n type = 'button',\n disabled = false,\n value = '',\n className,\n style,\n children,\n size = 'small',\n checked: prChecked = false,\n onChange,\n ...other\n } = props;\n\n const [checked, setChecked] = useState(prChecked);\n const [prevChecked, setPrevChecked] = useState();\n if (prChecked !== prevChecked) {\n setPrevChecked(prChecked);\n }\n useMemo(() => {\n if (prChecked !== prevChecked) {\n setChecked(prChecked);\n }\n }, [prevChecked]);\n\n const cls = [prefixCls, className, disabled ? 'disabled' : null, size ? `${prefixCls}-${size}` : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n useMemo(() => {\n if (checked !== props.checked) {\n setChecked(!!props.checked);\n }\n }, [props.checked]);\n console.log('props.checked', props.checked);\n\n function handleChange(e: React.MouseEvent & MouseEvent) {\n e.persist();\n setChecked(!checked);\n onChange && onChange(value);\n }\n\n const label = children || value;\n\n return (\n \n {label}\n \n );\n});\n\nexport default RadioButton;\n","import React, { useMemo, useRef } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/group.less';\n\nexport type Value = string | number;\nexport interface CheckboxGroupPorps extends IProps, Omit {\n value?: Value[];\n name?: string;\n onChange?: (e: React.ChangeEvent, values: Value[]) => void;\n}\n\nexport const CheckboxGroup = React.forwardRef((props, ref) => {\n const { prefixCls = 'w-checkbox-group', className, name, value, onChange, ...other } = props;\n const valueRef = useRef([]);\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n const childs = React.Children.toArray(props.children);\n useMemo(() => (valueRef.current = value || []), [value]);\n return (\n \n {React.Children.map(childs, (element: React.ReactNode) => {\n if (!React.isValidElement(element)) return;\n if (\n Array.isArray(value) &&\n element &&\n element.props &&\n element.props.value &&\n value.includes(element.props.value)\n ) {\n if (!valueRef.current.includes(element.props.value)) {\n valueRef.current.push(element.props.value);\n }\n }\n return React.cloneElement(\n element,\n Object.assign({}, element.props, {\n name,\n checked: valueRef.current.includes(element.props.value),\n onChange: (e: React.ChangeEvent) => {\n if (e.target.type && e.target.type !== 'checkbox') return;\n const checked = e.target.checked;\n const include = valueRef.current.includes(element.props.value);\n if (!include && checked) {\n valueRef.current.push(element.props.value);\n } else if (include && !checked) {\n valueRef.current = valueRef.current.filter((val) => val !== element.props.value);\n }\n onChange && onChange(e, valueRef.current);\n },\n }),\n );\n })}\n
\n );\n});\n","import React from 'react';\nimport { RadioAbstract, RadioAbstractProps } from '@uiw/react-radio';\nimport { CheckboxGroup } from './Group';\nimport './style/index.less';\n\nexport interface CheckboxProps extends RadioAbstractProps {\n indeterminate?: boolean;\n}\n\nfunction InternalCheckbox(props: CheckboxProps, ref: React.ForwardedRef) {\n const {\n className,\n prefixCls = 'w-checkbox',\n type = 'checkbox',\n indeterminate = false,\n disabled = false,\n value = '',\n ...other\n } = props;\n\n const cls = [className, indeterminate && 'indeterminate'].filter(Boolean).join(' ').trim();\n return (\n \n );\n}\n\nconst Checkbox = React.forwardRef(InternalCheckbox);\ntype Checkbox = typeof Checkbox & {\n Group: typeof CheckboxGroup;\n};\n\n(Checkbox as Checkbox).Group = CheckboxGroup;\n\nexport default Checkbox as Checkbox;\n","import Checkbox from './Checkbox';\n\nexport * from './Checkbox';\nexport * from './Group';\nexport default Checkbox;\n","import React, { useState, useMemo } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport Panel from './Panel';\nimport './style/index.less';\n\nexport interface CollapseProps extends IProps, Omit {\n accordion?: boolean;\n activeKey?: string | string[];\n bordered?: boolean;\n showArrow?: boolean;\n onChange?: (activeKey: string[]) => void;\n}\n\nexport interface CollapseState {\n activeKey: string[];\n}\n\nfunction toArray(activeKey: CollapseProps['activeKey']) {\n let currentActiveKey = activeKey;\n if (!Array.isArray(currentActiveKey)) {\n currentActiveKey = currentActiveKey ? [currentActiveKey] : [];\n }\n return currentActiveKey;\n}\n\nfunction InternalCollapse(props: CollapseProps, ref: React.ForwardedRef) {\n const {\n prefixCls = 'w-collapse',\n className,\n children,\n accordion = false,\n bordered,\n showArrow = true,\n activeKey: propsActiveKey,\n onChange,\n ...resetProps\n } = props;\n const [activeKey, setActiveKey] = useState(toArray(propsActiveKey));\n const cls = [prefixCls, className, bordered ? 'w-noborder' : null].filter(Boolean).join(' ').trim();\n function onItemClick(key: string) {\n let keys = activeKey;\n if (accordion) {\n keys = keys[0] === key ? [] : [key];\n } else {\n keys = [...keys];\n const index = keys.indexOf(key);\n const isActive = index > -1;\n if (isActive) {\n keys.splice(index, 1);\n } else {\n keys.push(key);\n }\n }\n setActiveKey(keys);\n }\n useMemo(() => {\n if (propsActiveKey !== activeKey) {\n setActiveKey(toArray(propsActiveKey));\n }\n }, [propsActiveKey]);\n useMemo(() => {\n if (propsActiveKey !== activeKey) {\n onChange && onChange(activeKey);\n }\n }, [activeKey, propsActiveKey]);\n return (\n \n {React.Children.map(children, (child: any, index) => {\n // 如果没有密钥提供,请使用面板顺序作为默认密钥\n const key = child.key || String(index);\n const { disabled } = child.props;\n let isActive = false;\n if (accordion) {\n // 手风琴模式下默认选择第一个\n isActive = activeKey[0] === key;\n } else {\n isActive = activeKey.indexOf(key) > -1;\n }\n const childProps = {\n prefixCls,\n isActive,\n disabled,\n showArrow,\n onItemClick: disabled ? () => {} : () => onItemClick(key),\n ...child.props,\n };\n return React.cloneElement(child, childProps);\n })}\n
\n );\n}\n\nconst Collapse = React.forwardRef(InternalCollapse);\ntype Collapse = typeof Collapse & {\n Panel: typeof Panel;\n};\n\n(Collapse as Collapse).Panel = Panel;\n\nexport default Collapse as Collapse;\n","import React from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { TransitionStatus } from 'react-transition-group/Transition';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport Icon, { IconProps } from '@uiw/react-icon';\n\nexport interface CollapsePanelProps extends IProps, HTMLDivProps {\n disabled?: boolean;\n showArrow?: boolean;\n isActive?: boolean;\n header?: React.ReactNode;\n icon?: IconProps['type'];\n extra?: React.ReactNode;\n onItemClick?: (evn: React.MouseEvent) => void;\n}\n\nexport default function Panel(props: CollapsePanelProps) {\n const {\n prefixCls = 'w-collapse',\n className,\n icon = 'down',\n children,\n isActive,\n onItemClick,\n disabled = false,\n showArrow,\n header,\n extra,\n ...resetProps\n } = props;\n const cls = [\n prefixCls ? `${prefixCls}-item` : null,\n className,\n isActive ? `${prefixCls}-active` : null,\n disabled ? `${prefixCls}-disabled` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n const iconRender = typeof icon === 'string' ? : icon;\n\n const childStyle = (child: React.ReactElement) => {\n return Object.assign({}, child && child.props ? child.props.style : {}, {\n transitionDuration: '300ms',\n });\n };\n function getInstance(status: TransitionStatus, instance: any) {\n if (!instance) {\n return;\n }\n if (status === 'exited' || status === 'exiting') {\n instance.style.height = '1px';\n }\n if (status === 'entered' || status === 'entering') {\n instance.style.height = `${instance.scrollHeight}px`;\n }\n }\n return (\n \n
\n {showArrow && iconRender}\n
{header} \n {extra &&
{extra}
}\n
\n
\n {(status: TransitionStatus) =>\n React.cloneElement({children}
, {\n className: `${prefixCls}-panel`,\n style: childStyle(children as React.ReactElement),\n ref: (e: any) => getInstance(status, e),\n })\n }\n \n
\n );\n}\n","import Collapse from './Collapse';\n\nexport * from './Collapse';\nexport * from './Panel';\n\nexport default Collapse;\n","import React from 'react';\nimport copy from '@uiw/copy-to-clipboard';\nimport { IProps, HTMLSpanProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface CopyToClipboardProps extends IProps, Omit {\n text?: string;\n onClick?: (text: string, isCopy: boolean, event: React.MouseEvent) => void;\n}\n\nexport default function CopyToClipboard(props: CopyToClipboardProps & T) {\n const {\n prefixCls = 'w-copy-to-clipboard',\n className,\n text = '',\n children,\n onClick = () => null,\n ...resetProps\n } = props;\n function handleClick(e: React.MouseEvent) {\n if (!text) {\n return onClick('', false, e);\n }\n copy(text, (isCopy: boolean) => {\n onClick(text, isCopy, e);\n });\n }\n const otherProps = {\n ...resetProps,\n className: [prefixCls, className].filter(Boolean).join(' ').trim(),\n onClick: handleClick,\n };\n return (\n \n {text} \n {children}\n \n );\n}\n","import React, { useEffect, useState } from 'react';\nimport Input, { InputProps } from '@uiw/react-input';\nimport Popover, { PopoverProps } from '@uiw/react-popover';\nimport DatePicker, { DatePickerProps } from '@uiw/react-date-picker';\nimport Icon from '@uiw/react-icon';\nimport { IProps } from '@uiw/utils';\nimport formatter from '@uiw/formatter';\nimport './style/date-input-range.less';\n\nexport interface DateInputRangeProps extends IProps, Omit {\n popoverProps?: PopoverProps;\n datePickerProps?: DatePickerProps;\n value?: Array;\n format?: string;\n allowClear?: boolean;\n bodyStyle?: object;\n onChange?: (selectedDate?: Date, dateRange?: Array) => void;\n}\n\nexport function DateInputRange(props: DateInputRangeProps) {\n const {\n prefixCls = 'w-dateinputrange',\n bodyStyle = undefined,\n className,\n popoverProps,\n datePickerProps,\n allowClear = true,\n format = 'YYYY/MM/DD',\n onChange,\n value,\n ...inputProps\n } = props;\n\n const [dateRange, setDateRange] = useState>([]);\n useEffect(() => {\n let valueTemp: Array = [];\n const propsValue = value;\n if (Array.isArray(propsValue) && !!propsValue?.length) {\n propsValue.forEach((date, index) => {\n valueTemp[index] = typeof propsValue[index] === 'string' ? new Date(date) : (date as Date);\n });\n }\n setDateRange(valueTemp);\n }, [JSON.stringify(value)]);\n\n function handleChange(cdate: Date | undefined, idx?: number) {\n const changeValue = [...dateRange];\n changeValue[idx!] = cdate;\n setDateRange(changeValue);\n onChange && onChange(cdate, changeValue);\n }\n\n return (\n \n );\n}\n","import React, { useEffect, useState } from 'react';\nimport Input, { InputProps } from '@uiw/react-input';\nimport Popover, { PopoverProps } from '@uiw/react-popover';\nimport DatePicker, { DatePickerProps } from '@uiw/react-date-picker';\nimport Icon from '@uiw/react-icon';\nimport { IProps } from '@uiw/utils';\nimport formatter from '@uiw/formatter';\nexport * from './DateInputRange';\nimport './style/index.less';\n\nexport interface DateInputProps extends IProps, Omit {\n popoverProps?: PopoverProps;\n datePickerProps?: DatePickerProps;\n value?: Date | string;\n format?: string;\n allowClear?: boolean;\n onChange?: (selectedDate?: Date) => void;\n autoClose?: boolean;\n}\n\nexport default function DateInput(props: DateInputProps) {\n const {\n prefixCls = 'w-dateinput',\n className,\n popoverProps,\n datePickerProps,\n allowClear = true,\n autoClose = false,\n format = 'YYYY/MM/DD',\n onChange,\n ...inputProps\n } = props;\n const [date, setDate] = useState(props.value);\n\n const value = date || '';\n inputProps.value = typeof value === 'string' ? value : formatter(format, value);\n\n useEffect(() => {\n if (props.value !== date) {\n setDate(props.value);\n }\n }, [props.value]);\n\n function handleChange(cdate?: Date) {\n autoClose && setIsOpen(false);\n setDate(cdate);\n onChange && onChange(cdate);\n }\n if (allowClear && inputProps.value) {\n inputProps.addonAfter = (\n handleChange(undefined)} type=\"close\" />\n );\n }\n\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n setIsOpen(open)}\n {...popoverProps}\n content={\n handleChange(selectedDate!)}\n />\n }\n >\n \n \n );\n}\n","import React from 'react';\nimport { IProps } from '@uiw/utils';\n\nexport interface DescriptionsItemProps extends IProps {\n label?: React.ReactNode;\n children: React.ReactNode;\n span?: number;\n}\n\nconst DescriptionsItem: React.FC = ({ children }) => children as JSX.Element;\n\nexport default DescriptionsItem;\n","import React, { Fragment } from 'react';\nimport { IProps } from '@uiw/utils';\nimport { DescriptionsItemProps } from './DescriptionsItem';\nimport { RowProps } from './Row';\n\nexport interface CellProps\n extends Omit,\n Omit,\n React.HTMLAttributes,\n IProps {\n children?: React.ReactElement | React.ReactNode;\n tagName?: 'td' | 'th';\n /**\n * 是否为一行的最后一个\n */\n isLastCell?: boolean;\n}\n\nfunction Cell(props: CellProps = {}) {\n const {\n prefixCls,\n className,\n tagName: TagName = 'td',\n layout,\n bordered,\n label,\n isLastCell,\n colon,\n span,\n children,\n column,\n ...other\n } = props;\n\n const labelProps: React.HTMLAttributes = {\n className: [\n prefixCls ? `${prefixCls}-item-label` : null,\n className,\n colon ? `${prefixCls}-item-colon` : null,\n !label ? `${prefixCls}-item-no-label` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim(),\n };\n if (layout === 'horizontal') {\n if (!bordered) {\n return (\n \n {label} \n {children} \n \n );\n }\n return (\n \n {label} \n \n {children}\n \n \n );\n }\n return (\n \n {children}\n \n );\n}\n\nexport default Cell;\n","import React, { Fragment } from 'react';\nimport { IProps } from '@uiw/utils';\nimport { DescriptionsItemProps } from './DescriptionsItem';\nimport Cell from './Cell';\n\nexport interface RowProps extends IProps {\n children?: React.ReactElement[];\n bordered?: boolean;\n layout?: 'horizontal' | 'vertical';\n colon?: boolean;\n column?: number;\n}\n\nexport default function Row(props: RowProps = {}) {\n const { prefixCls, layout, bordered, column, colon, children = [] } = props;\n function handleCell(isHead?: boolean) {\n return children.map((child, index) => (\n \n {isHead ? child.props.label : child.props.children}\n | \n ));\n }\n const cls = prefixCls ? `${prefixCls}-row` : '';\n return (\n \n {layout === 'vertical' && {handleCell(true)} }\n {handleCell()} \n \n );\n}\n","import React from 'react';\nimport { IProps } from '@uiw/utils';\nimport DescriptionsItem, { DescriptionsItemProps } from './DescriptionsItem';\nimport Row, { RowProps } from './Row';\nimport './style/index.less';\n\nexport * from './DescriptionsItem';\n\nexport interface DescriptionsProps extends IProps {\n column?: number;\n title?: React.ReactNode;\n children?: React.ReactNode;\n bordered?: boolean;\n colon?: boolean;\n size?: 'large' | 'small' | 'default';\n layout?: RowProps['layout'];\n}\n\nconst generateChildrenRows = (\n children: React.ReactElement[],\n column: number,\n): Array[]> => {\n const rows: React.ReactElement[][] = [];\n let columns: React.ReactElement[] | null = null;\n let leftSpans: number;\n\n children.forEach((node: React.ReactElement, index: number) => {\n let itemNode = node;\n\n if (!columns) {\n leftSpans = column;\n columns = [];\n rows.push(columns);\n }\n\n // Always set last span to align the end of Descriptions\n const lastItem = index === children.length - 1;\n if (lastItem) {\n itemNode = React.cloneElement(itemNode, {\n span: leftSpans,\n });\n }\n // Calculate left fill span\n const { span = 1 } = itemNode.props;\n columns.push(itemNode);\n leftSpans -= span;\n\n if (leftSpans <= 0) {\n columns = null;\n }\n });\n\n return rows;\n};\n\nfunction InternalDescriptions(props: DescriptionsProps, ref: React.ForwardedRef) {\n const {\n prefixCls = 'w-descriptions',\n className,\n title,\n bordered,\n column = 3,\n size,\n colon = true,\n children,\n layout = 'horizontal',\n ...other\n } = props;\n const cls = [\n prefixCls,\n className,\n prefixCls && layout ? `${prefixCls}-${layout}` : null,\n bordered ? `${prefixCls}-bordered` : null,\n size ? `${prefixCls}-${size}` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n const cloneChildren = React.Children.toArray(children) as JSX.Element[];\n const childs: Array[]> = generateChildrenRows(cloneChildren, column!);\n\n return (\n \n
\n {title && {title} }\n \n {childs.map((child, index) => (\n \n {child}\n
\n ))}\n \n
\n
\n );\n}\n\nconst Descriptions = React.forwardRef(InternalDescriptions);\ntype Descriptions = typeof Descriptions & {\n Item: typeof DescriptionsItem;\n};\n\n(Descriptions as Descriptions).Item = DescriptionsItem;\n\nexport default Descriptions as Descriptions;\n","import React from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface DividerProps extends IProps, HTMLDivProps {\n dashed?: boolean;\n type?: 'horizontal' | 'vertical';\n align?: 'left' | 'right' | 'center';\n}\n\nexport default React.forwardRef((props, ref) => {\n const {\n prefixCls = 'w-divider',\n className,\n children,\n dashed = false,\n type = 'horizontal',\n align = 'center',\n ...restProps\n } = props;\n const cls = [\n className,\n prefixCls,\n prefixCls && type ? `${prefixCls}-${type}` : null,\n prefixCls && align ? `${prefixCls}-${align}` : null,\n children ? `${prefixCls}-with-text` : null,\n !!dashed ? `${prefixCls}-dashed` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n return (\n \n {children && {children} }\n
\n );\n});\n","import React, { useMemo } from 'react';\nimport Overlay, { OverlayProps } from '@uiw/react-overlay';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport Button from '@uiw/react-button';\nimport { HTMLDivProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface DrawerProps extends OverlayProps {\n footer?: React.ReactNode;\n icon?: IconProps['type'];\n title?: React.ReactNode;\n bodyProps?: HTMLDivProps;\n placement?: 'top' | 'right' | 'bottom' | 'left';\n size?: number;\n isCloseButtonShown?: boolean;\n onClose?: (e: React.MouseEvent) => void;\n}\n\nexport default (props: DrawerProps = {}) => {\n const {\n prefixCls = 'w-drawer',\n className,\n style,\n placement = 'right',\n size = 260,\n title,\n footer,\n icon,\n isCloseButtonShown = true,\n bodyProps,\n timeout = 300,\n isOpen = false,\n maskClosable = true,\n ...overlayProps\n } = props;\n const cls = [className, prefixCls, placement].filter(Boolean).join(' ').trim();\n const bodyCls = [bodyProps ? bodyProps.className : null, prefixCls ? `${prefixCls}-body-inner` : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n const styl = {\n ...style,\n [/^(top|bottom)$/.test(placement!) ? 'height' : 'width']: size,\n };\n const footerView = useMemo(() => (footer ? {footer}
: null), [footer]);\n const iconView = useMemo(() => (icon ? : null), [icon]);\n const titleView = useMemo(() => (title ? {title} : null), [title]);\n return (\n \n \n {(title || icon) && (\n
\n {iconView}\n {titleView}\n {title && isCloseButtonShown && }\n
\n )}\n
\n
\n {props.children}\n
\n
\n {footerView}\n
\n \n );\n};\n","import React from 'react';\nimport './style/index.less';\n\nexport interface EmptyProps extends React.HTMLAttributes {\n prefixCls?: string;\n icon?: React.ReactNode;\n size?: number | string;\n iconProps?: React.SVGProps;\n /** 自定义描述内容 */\n description?: React.ReactNode;\n}\n\nconst Empty = (props: EmptyProps) => {\n const {\n prefixCls = 'w-empty',\n className,\n icon,\n iconProps,\n size = 64,\n description = '暂无数据',\n children,\n ...other\n } = props;\n\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n return (\n \n
\n {icon ? (\n icon\n ) : (\n
\n \n \n \n \n \n \n )}\n
\n {description &&
{description}
}\n {children &&
{children}
}\n
\n );\n};\n\nexport default Empty;\n","import React from 'react';\nimport Input, { InputProps } from '@uiw/react-input';\nimport { FileInputProps } from './';\n\nexport interface InputUploadProps extends FileInputProps, InputProps {}\n\nexport default React.forwardRef((props, ref) => {\n const { className, dataLabel = 'Browse', prefixCls = 'w-fileinput', ...other } = props;\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n return ;\n});\n","import React from 'react';\nimport Icon from '@uiw/react-icon';\nimport { FileInputListProps } from './';\nimport './style/index.less';\n\nconst Picture = (props: FileInputListProps) => {\n const {\n className,\n prefixCls = 'w-fileinput-list',\n dataList = [],\n uploadType,\n size = 'middle',\n shape = 'round',\n readonly,\n children,\n showFileIcon = {\n showPreviewIcon: true,\n showRemoveIcon: true,\n },\n onPreview,\n onAdd,\n onRemove,\n } = props;\n\n const cls = [prefixCls, `${prefixCls}-size-${size}`, `${prefixCls}-shape-${shape}`, className]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n return (\n \n {children &&\n !readonly &&\n React.isValidElement(children) &&\n React.cloneElement(children, {\n onClick: onAdd,\n })}\n
\n {dataList.map((item, index) => (\n
\n {uploadType === 'picture' && (\n
\n
\n {showFileIcon?.showPreviewIcon && (\n
\n onPreview?.(item)}>\n \n \n
\n )}\n
\n )}\n
{item.name}
\n {showFileIcon?.showRemoveIcon && (\n
onRemove?.(index)}>\n \n
\n )}\n
\n ))}\n
\n
\n );\n};\n\nexport default Picture;\n","import React from 'react';\nimport Icon from '@uiw/react-icon';\nimport { FileInputListProps } from './';\nimport './style/index.less';\n\nconst Card = (props: FileInputListProps) => {\n const {\n className,\n prefixCls = 'w-fileinput-card',\n dataList = [],\n maxNumber = 3,\n shape = 'round',\n size = 'middle',\n readonly,\n children,\n showFileIcon = {\n showPreviewIcon: true,\n showRemoveIcon: true,\n },\n onAdd,\n onPreview,\n onRemove,\n } = props;\n const cls = [prefixCls, `${prefixCls}-size-${size}`, `${prefixCls}-shape-${shape}`, className]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n const isAction = showFileIcon.showPreviewIcon || showFileIcon.showRemoveIcon ? true : false;\n\n return (\n \n {dataList.map((item, index) => (\n
\n
\n
\n
\n\n
\n {showFileIcon?.showPreviewIcon && (\n onPreview?.(item)}>\n \n \n )}\n {showFileIcon?.showRemoveIcon && (\n onRemove?.(index)}>\n \n \n )}\n
\n
\n ))}\n {maxNumber > dataList.length && !readonly && (\n
\n {children}\n
\n )}\n
\n );\n};\n\nexport default Card;\n","import { FileInputValue } from './';\n\nexport const openFileDialog = (inputRef: any): void => {\n if (inputRef.current) inputRef.current.click();\n};\n\nexport const getAcceptTypeString = (accept?: Array) => {\n return accept && accept.length > 0 ? accept.map((item) => `.${item}`).join(', ') : 'image/*';\n};\n\nexport const getBase64 = (file: File): Promise => {\n const reader = new FileReader();\n return new Promise((resolve) => {\n reader.addEventListener('load', () => resolve(String(reader.result)));\n reader.readAsDataURL(file);\n });\n};\n\nexport const getListFiles = (files: FileList, dataURLKey: string): Promise => {\n const promiseFiles: Array> = [];\n for (let i = 0; i < files.length; i += 1) {\n promiseFiles.push(getBase64(files[i]));\n }\n return Promise.all(promiseFiles).then((fileListBase64: Array) => {\n const fileList: FileInputValue[] = fileListBase64.map((base64, index) => ({\n [dataURLKey]: base64,\n file: files[index],\n name: files[index].name,\n }));\n return fileList;\n });\n};\n\nexport const isUploadType = (type: string) => {\n return ['picture', 'text', 'card'].includes(type);\n};\n","import React, { useRef, useCallback, useEffect, useState } from 'react';\nimport List from './List';\nimport Card from './Card';\nimport { FileInputValue, FileInputListProps } from './';\nimport { FileInputUploadProps } from './types';\nimport { openFileDialog, getListFiles } from './utils';\n\nexport const FileList = (props: FileInputUploadProps) => {\n const { uploadType, value = [], multiple = false, maxNumber = 3, onChange } = props;\n const inputRef = useRef(null);\n const inValue: FileInputValue[] = value || [];\n const [fileList, setFileList] = useState([]);\n\n useEffect(() => {\n setFileList(inValue);\n }, []);\n\n const handleClickInput = useCallback(() => openFileDialog(inputRef), [inputRef]);\n\n const onFileUpload = useCallback((): void => {\n if (inputRef.current) inputRef.current.value = '';\n handleClickInput();\n }, [handleClickInput]);\n\n const onInputChange = async (e: React.ChangeEvent) => {\n const files = e.target.files;\n if (!files) return;\n const updatedFileList = await getListFiles(files, 'dataURL');\n let updatedList = [...fileList, ...updatedFileList];\n if (maxNumber < updatedList.length) {\n updatedList = updatedList.slice(0, maxNumber);\n }\n setFileList(updatedList);\n onChange?.(updatedList);\n };\n\n const onRemove = (index: number) => {\n const updatedList = [...fileList];\n updatedList.splice(index, 1);\n setFileList(updatedList);\n onChange?.(updatedList);\n };\n\n let Comp: ((props: FileInputListProps) => JSX.Element) | undefined;\n\n if (uploadType === 'card') {\n Comp = Card;\n }\n if (uploadType === 'picture' || uploadType === 'text') {\n Comp = List;\n }\n\n return (\n \n \n {Comp && (\n \n )}\n \n );\n};\n\nexport default FileList;\n","import React from 'react';\nimport Input from './Input';\nimport FileList from './FileList';\nimport { isUploadType } from './utils';\nimport { InputProps } from '@uiw/react-input';\nimport { UploadType, FileInputBaseProps, FileInputUploadProps, FileInputShowIconProps } from './types';\nimport './style/index.less';\nexport interface FileInputValue {\n dataURL?: string;\n file?: File;\n name?: string;\n [key: string]: any;\n}\nexport interface FileInputProps extends FileInputBaseProps, InputProps {\n dataLabel?: string;\n}\nexport interface FileInputListProps extends FileInputUploadProps {\n shape?: 'circle' | 'round';\n size?: 'large' | 'middle' | 'small';\n showFileIcon?: FileInputShowIconProps;\n dataList: FileInputValue[];\n onAdd?: () => void;\n onRemove?: (index: number) => void;\n}\n\ninterface Props {\n uploadType?: UploadType;\n [key: string]: any;\n}\n\nfunction Upload(props: Props) {\n const { uploadType = 'input' } = props;\n\n if (uploadType === 'input') {\n return ;\n }\n\n if (isUploadType(uploadType)) {\n return ;\n }\n return null;\n}\n\nexport default Upload;\n","import React from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/col.less';\n\nexport interface ColProps extends IProps, HTMLDivProps {\n fixed?: boolean;\n span?: number | string;\n grow?: number | string;\n align?: 'top' | 'middle' | 'bottom' | 'baseline';\n}\n\nexport function Col(props: ColProps = {}) {\n const { prefixCls = 'w-col', className, fixed, span, grow, align, ...other } = props;\n const cls = [\n prefixCls,\n className,\n span ? `${prefixCls}-${span}` : null,\n fixed ? `${prefixCls}-fixed` : null,\n align ? `${prefixCls}-align-${align}` : null,\n fixed ? `${prefixCls}-grow-${grow}` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n return (\n \n {props.children}\n
\n );\n}\n","import React from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/row.less';\n\nexport interface RowProps extends IProps, HTMLDivProps {\n fixed?: boolean;\n gutter?: number;\n justify?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n align?: 'top' | 'middle' | 'bottom' | 'baseline';\n}\n\nexport function Row(props: RowProps = {}) {\n const { prefixCls = 'w-row', className, gutter = 0, justify, align, ...other } = props;\n const cls = [\n prefixCls,\n className,\n align ? `${prefixCls}-align-${align}` : null,\n justify ? `${prefixCls}-justify-${justify}` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n const gutterStyl = !gutter ? {} : { paddingLeft: gutter / 2, paddingRight: gutter / 2 };\n return (\n \n {React.Children.toArray(props.children).map((child) => {\n if (!React.isValidElement(child)) return child;\n return React.cloneElement(\n child,\n Object.assign({}, child.props, {\n style: { ...child.props.style, ...gutterStyl },\n }),\n );\n })}\n
\n );\n}\n","import React from 'react';\nimport { Col, Row } from '@uiw/react-grid';\nimport { IProps, HTMLInputProps } from '@uiw/utils';\nimport { FormFieldsProps } from './Form';\nimport './style/form-item.less';\n\nexport interface FormItemProps extends IProps, HTMLInputProps {\n inline?: boolean;\n hasError?: boolean;\n label?: React.ReactNode;\n required?: boolean;\n labelFor?: string;\n labelClassName?: string;\n help?: React.ReactNode;\n labelStyle?: React.CSSProperties;\n initialValue?: string | number | T;\n validator?: FormFieldsProps['validator'];\n}\n\nexport default class FormItem extends React.PureComponent> {\n public static defaultProps = {\n prefixCls: 'w-form-item',\n };\n render() {\n const {\n prefixCls,\n className,\n required,\n style,\n label,\n labelFor,\n labelClassName,\n labelStyle,\n help,\n inline,\n initialValue,\n validator,\n hasError,\n ...otherProps\n } = this.props;\n\n const cls = [prefixCls, className, hasError ? `${prefixCls}-error` : null].filter(Boolean).join(' ').trim();\n const labelCls = ['w-form-label', labelClassName].filter(Boolean).join(' ').trim();\n if (inline) {\n return (\n \n \n \n {required && * }\n \n {label}\n \n \n {this.props.children}\n
\n {help && (\n \n {help}\n
\n )}\n
\n );\n }\n return (\n \n {label && (\n
\n {required && * }\n \n {label}\n \n \n )}\n
{this.props.children}\n {help &&
{help}
}\n
\n );\n }\n}\n","import React, { useState, useImperativeHandle, useMemo } from 'react';\nimport { IProps } from '@uiw/utils';\nimport FormItem, { FormItemProps } from './FormItem';\nimport './style/form.less';\n\nexport interface FormProps extends IProps, Omit, 'onChange' | 'onSubmit'> {\n prefixCls?: string;\n fields?: Record>;\n onSubmit?: (state: FormSubmitProps, event: React.FormEvent) => any;\n afterSubmit?: (result: FormAfterSubmitProps) => any;\n onChange?: (state: FormState) => void;\n onSubmitError?: (evn: any) => any;\n resetOnSubmit?: boolean;\n children?: (handle: FormChildrenProps) => JSX.Element | JSX.Element | undefined;\n}\n\nexport interface FormState {\n submitting: boolean;\n initial: Record;\n current: FormState['initial'];\n errors: Record;\n}\n\nexport interface FormFieldsProps extends FormItemProps {\n name?: string;\n children?: React.ReactNode;\n help?: React.ReactNode;\n labelFor?: string;\n inline?: boolean;\n checked?: boolean;\n initialValue?: string | number | T;\n required?: boolean;\n validator?: (currentValue: any) => any;\n}\n\nexport interface FormSubmitProps {\n initial: FormState['initial'];\n current: FormState['current'];\n}\n\nexport interface FormAfterSubmitProps {\n state: FormState;\n response: any;\n reset: () => void;\n}\n\nexport interface FormChildrenProps {\n fields: Record;\n resetForm: () => void;\n canSubmit: () => boolean;\n state: FormState;\n}\n\nexport type FormElementProps = {\n id?: string;\n name?: string;\n value?: string | boolean;\n checked?: boolean;\n onChange?: (env: React.BaseSyntheticEvent, list?: string[]) => void;\n};\n\nexport type FormRefType = Record<'onSubmit' | 'resetForm' | 'getFieldValues' | 'setFields' | 'getError' | 'setFieldValue', Function>;\n\nfunction newFormState(\n fields: FormProps['fields'],\n cb: (porps: FormFieldsProps) => {\n initialValue: FormFieldsProps['initialValue'];\n currentValue: FormFieldsProps['initialValue'];\n },\n): FormState {\n const state: FormState = {\n initial: {},\n current: {},\n submitting: false,\n errors: {},\n };\n for (const name in fields) {\n const props = fields[name];\n if (!props) continue;\n const { initialValue, currentValue } = cb({ ...props, name });\n state.initial[name] = Array.isArray(initialValue) ? [...initialValue] : initialValue;\n state.current[name] = currentValue;\n }\n return state;\n}\n\nfunction newInitialValue(value: FormFieldsProps['initialValue']) {\n return value === null || value === undefined ? '' : value;\n}\n\nconst isPromise = (promise: Promise) => promise && typeof promise.then === 'function';\n\nfunction Form(\n {\n prefixCls = 'w-form',\n className,\n fields,\n children,\n resetOnSubmit,\n onSubmitError,\n onChange,\n onSubmit,\n afterSubmit,\n ...others\n }: FormProps,\n ref: React.ForwardedRef, //| React.RefObject,\n) {\n const initData = useMemo(\n () =>\n newFormState(fields, ({ initialValue }) => {\n initialValue = newInitialValue(initialValue);\n return { initialValue, currentValue: initialValue };\n }),\n [],\n );\n const [data, setData] = useState(initData);\n\n useImperativeHandle(\n ref,\n () => ({\n onSubmit: handleSubmit,\n resetForm: handleReset,\n getFieldValues: () => data.current,\n getError: () => data.errors,\n setFields: setFields,\n setFieldValue: setFieldValue,\n }),\n [data],\n );\n\n const formUnits: FormChildrenProps['fields'] = {};\n for (const name in fields) {\n const props = fields[name];\n if (!props) continue;\n const error = data.errors[name];\n if (typeof props.initialValue === 'boolean') {\n props.checked = props.initialValue;\n }\n const childField: FormFieldsProps = controlField({\n ...props,\n name,\n });\n const help = error || props.help;\n const labelFor = props.labelFor;\n formUnits[name] = (\n \n );\n }\n\n function setFields(fields: FormState['current']) {\n const tempData = { ...data, current: fields };\n setData(tempData);\n }\n\n function setFieldValue(fieldName: string, value: V) {\n const tempData = { ...data, current: { ...data.current, [fieldName]: value } };\n setData(tempData);\n }\n\n function handleChange(\n name: string,\n validator: FormFieldsProps['validator'],\n element?: React.ReactElement,\n cb?: (env: React.BaseSyntheticEvent) => void,\n ) {\n return (env: React.BaseSyntheticEvent, list?: string[]) => {\n let value = env && env.target && 'value' in env.target ? env.target.value : env;\n // 控件 Checkbox.Group 多选值的处理\n value = list || value;\n // 控件 Checkbox 值的处理\n if (!list && element && env && env.target && /(radio)/.test(env.target.type)) {\n // 控件 Switch/Radio/Checkbox 值的处理\n value = env.target.value ? env.target.value : env.target.checked;\n }\n if (!list && element && env && env.target && /(checkbox)/.test(env.target.type)) {\n // 控件 Switch/Radio/Checkbox 值的处理\n value = env.target.checked;\n }\n const nextState = {\n current: { ...data.current, [name]: value },\n } as FormState;\n const error = validator && validator(value);\n if (!error) {\n nextState.errors = { ...data.errors };\n delete nextState.errors[name];\n }\n if (env && env.persist && typeof env.persist === 'function') env.persist();\n setData({ ...data, ...nextState });\n if (cb) {\n cb(env);\n }\n onChange && onChange({ ...data, ...nextState });\n };\n }\n\n function handleSubmit(e: React.FormEvent) {\n e && e.preventDefault();\n const { initial, current } = data;\n setData({ ...data, submitting: true });\n const nextState = { submitting: false } as FormState;\n const onError = (evn: unknown) =>\n setData({\n ...data,\n ...nextState,\n errors: (onSubmitError && onSubmitError(evn)) || {},\n });\n const onSuccess = (response: any) => {\n if (resetOnSubmit) {\n nextState.current = initial;\n }\n setData({ ...data, ...nextState, errors: {} });\n afterSubmit && afterSubmit({ state: data, response, reset: handleReset });\n };\n try {\n const afterSubmitPromise = onSubmit ? onSubmit({ initial, current }, e) : undefined;\n if (afterSubmitPromise && isPromise(afterSubmitPromise)) {\n return afterSubmitPromise.then(onSuccess).catch(onError);\n } else {\n return onSuccess(afterSubmitPromise);\n }\n } catch (evn) {\n onError(evn);\n }\n }\n\n function canSubmit() {\n const { submitting, current = {} } = data;\n let passesValidators = true;\n for (const name in fields) {\n if (Object.prototype.hasOwnProperty.call(fields, name)) {\n const props: FormFieldsProps = fields[name];\n if (!props) continue;\n if (props.validator && props.validator(current[name])) {\n passesValidators = false;\n break;\n }\n }\n }\n return !submitting && passesValidators;\n }\n\n function handleReset() {\n let { initial } = data;\n const initials = { ...initial };\n Object.entries(initials).map(([key, value]) => {\n if (Array.isArray(value)) {\n initials[key] = [...value];\n }\n });\n setData({ ...data, initial, current: initials, errors: {} });\n }\n\n function controlField({\n children,\n validator,\n name,\n help,\n label,\n labelFor,\n labelClassName,\n labelStyle,\n inline,\n initialValue,\n ...other\n }: FormFieldsProps) {\n const element =\n typeof children !== 'function'\n ? children\n : children({\n onChange: handleChange(name!, validator),\n onSubmit: handleSubmit,\n canSubmit: canSubmit,\n });\n if (!element || React.Children.count(element) !== 1 || !name) return element;\n const props = {\n name: element.props.name || name,\n ...other,\n } as FormElementProps;\n const hasCurrentValue = Object.prototype.hasOwnProperty.call(data.current, name);\n props.id = element.props.id;\n props.value = hasCurrentValue ? data.current && data.current[name] : props.value;\n // : element.props.value;\n\n const type = element.props.type;\n // console.log('type', element)\n if (type === 'checkbox' || type === 'switch' || typeof props.value === 'boolean') {\n props.checked = !!props.value;\n delete props.value;\n }\n props.onChange = handleChange(name, validator, element, element.props.onChange) as FormElementProps['onChange'];\n return React.cloneElement(element, props as FormElementProps);\n }\n\n return (\n \n );\n}\n\nexport default React.forwardRef>(Form);\n","import Form from './Form';\n\nexport * from './Form';\nexport * from './FormItem';\nexport { default as FormItem } from './FormItem';\n\nexport default Form;\n","import React, { Fragment } from 'react';\nimport { IProps } from '@uiw/utils';\n\nexport type TagType = React.ComponentType | keyof JSX.IntrinsicElements;\n\nexport interface ListItemProps extends IProps, React.HTMLProps {\n disabled?: boolean;\n active?: boolean;\n extra?: React.ReactNode;\n href?: string;\n tagName?: Tag;\n}\n\nexport const ListItem = React.forwardRef(\n (props: ListItemProps, ref: React.Ref>) => {\n const {\n prefixCls = 'w-list-item',\n className,\n children,\n extra,\n tagName = 'div',\n active = false,\n ...resetProps\n } = props;\n const cls = [prefixCls, className, props.disabled ? 'w-disabled' : null, active ? 'w-active' : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n const TagName = props.href && typeof tagName === 'string' ? 'a' : tagName;\n return React.createElement(\n TagName,\n {\n ...resetProps,\n className: cls,\n ref,\n } as any,\n !extra || resetProps.href ? (\n children\n ) : (\n \n {children}
\n {extra}
\n \n ),\n );\n },\n);\n\nListItem.displayName = 'List.Item';\n","import React from 'react';\nimport { IProps, HTMLDivProps, noop } from '@uiw/utils';\nimport { ListItem } from './Item';\nimport './style/index.less';\n\nexport * from './Item';\n\nexport interface ListProps extends IProps, HTMLDivProps {\n bordered?: boolean;\n striped?: boolean;\n noHover?: boolean;\n active?: boolean;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n size?: 'small' | 'default' | 'large';\n renderItem?: (item: any, idx: number) => React.ReactNode;\n dataSource?: T[];\n}\n\nfunction InternalList(props: ListProps, ref: React.ForwardedRef) {\n const {\n prefixCls = 'w-list',\n bordered = true,\n striped = false,\n noHover = false,\n active = false,\n size = 'default',\n renderItem = noop,\n className,\n children,\n header,\n footer,\n dataSource = [],\n ...resetProps\n } = props;\n let items: React.ReactNode;\n if (dataSource && dataSource.length > 0) {\n items = dataSource.map((item: any, index: number) => renderItem!(item, index));\n } else {\n items = children;\n }\n let childrenList = React.Children.map(\n items,\n (child: React.ReactNode, index) =>\n React.isValidElement(child) &&\n React.cloneElement(child, {\n key: index,\n }),\n );\n const classString = [\n prefixCls,\n className,\n striped ? `${prefixCls}-striped` : null,\n noHover ? `${prefixCls}-no-hover` : null,\n active ? `${prefixCls}-active` : null,\n bordered ? `${prefixCls}-bordered` : null,\n size && size !== 'default' ? `${prefixCls}-size-${size}` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n return (\n \n {header &&
{header}
}\n {childrenList}\n {footer &&
{footer}
}\n
\n );\n}\n\nconst List = React.forwardRef>(InternalList);\ntype List = typeof List & {\n Item: typeof ListItem;\n};\n\n(List as List).Item = ListItem;\n\nexport default List as List;\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface LoaderProps extends IProps, HTMLDivProps {\n size?: 'small' | 'default' | 'large';\n loading?: boolean;\n fullscreen?: boolean;\n color?: string;\n bgColor?: string;\n vertical?: boolean;\n tip?: React.ReactNode;\n indicator?: React.ReactNode;\n children?: any | React.ReactNode;\n}\n\nexport default (props: LoaderProps = {}) => {\n const {\n prefixCls = 'w-loader',\n className,\n size = 'default',\n loading = true,\n tip,\n vertical,\n color,\n bgColor,\n children,\n indicator,\n fullscreen = false,\n ...otherProps\n } = props;\n const cls = [prefixCls, className, size ? `${prefixCls}-${size}` : null].filter(Boolean).join(' ').trim();\n\n const indicatorView = useMemo(\n () => (\n \n \n \n ),\n [],\n );\n\n const tipsView = useMemo(\n () => (\n \n
\n {indicator || indicatorView}\n {tip && (\n
\n {tip}\n
\n )}\n
\n
\n ),\n [fullscreen, bgColor, prefixCls, vertical, tip],\n );\n\n return (\n \n {(loading || fullscreen) && tipsView}\n {children &&\n React.cloneElement(\n children,\n Object.assign({}, children.props, {\n className: [`${prefixCls}-warp`, loading ? `${prefixCls}-blur` : null].filter(Boolean).join(' ').trim(),\n }),\n )}\n
\n );\n};\n","import React from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport Icon, { IconProps } from '@uiw/react-icon';\nimport Button from '@uiw/react-button';\nimport './style/index.less';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\n\nexport interface MessageProps extends IProps, Omit {\n title?: React.ReactNode;\n icon?: IconProps['type'];\n type?: 'success' | 'warning' | 'info' | 'error';\n description?: React.ReactNode;\n showIcon?: boolean;\n isCloseButtonShown?: boolean;\n rounded?: boolean;\n onClose?: (e: React.MouseEvent) => void;\n}\n\nexport interface IMessageState {\n isOpen: boolean;\n}\n\nexport default class Message extends React.Component {\n public static defaultProps: MessageProps = {\n prefixCls: 'w-message',\n rounded: true,\n isCloseButtonShown: false,\n };\n constructor(props: MessageProps) {\n super(props);\n this.state = {\n isOpen: true,\n };\n }\n handleClosed = (e: React.MouseEvent) => {\n const { onClose } = this.props;\n this.setState({ isOpen: false });\n onClose && onClose(e);\n };\n renderIcon = () => {\n const { type, showIcon } = this.props;\n let icon = this.props.icon;\n if (!icon && showIcon) {\n switch (type) {\n case 'success':\n icon = 'circle-check';\n break;\n case 'warning':\n icon = 'warning';\n break;\n case 'info':\n icon = 'information';\n break;\n case 'error':\n icon = 'circle-close';\n break;\n default:\n break;\n }\n }\n return icon;\n };\n render() {\n const {\n prefixCls,\n className,\n type,\n title,\n description,\n showIcon,\n icon,\n rounded,\n isCloseButtonShown,\n ...elementProps\n } = this.props;\n const children = description || this.props.children;\n const cls = [\n prefixCls,\n className,\n `${prefixCls}-${type}`,\n rounded ? `${prefixCls}-rounded` : null,\n showIcon ? `${prefixCls}-icon` : null,\n showIcon ? `${prefixCls}${title ? '-title' : ''}${children ? '-description' : ''}` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n const Child = (\n \n {isCloseButtonShown && }\n {showIcon && }\n {title} \n {children} \n
\n );\n if (!isCloseButtonShown) {\n return Child;\n }\n return (\n \n {Child}\n \n );\n }\n}\n","import React, { useEffect, useMemo, useState } from 'react';\nimport Input, { InputProps } from '@uiw/react-input';\nimport Popover, { PopoverProps } from '@uiw/react-popover';\nimport { IProps } from '@uiw/utils';\nimport Button from '@uiw/react-button';\nimport formatter from '@uiw/formatter';\nimport { DatePickerMonth, DatePickerYear, DatePickerCaption, DatePickerCaptionProps } from '@uiw/react-date-picker';\nimport './style/index.less';\n\nexport interface MonthPickerProps extends IProps, Omit {\n popoverProps?: PopoverProps;\n pickerCaptionProps?: DatePickerCaptionProps;\n value?: Date | string;\n format?: string;\n monthLabel?: string[];\n allowClear?: boolean;\n onChange?: (date?: Date, formatDate?: string) => void;\n}\n\nconst MONTH_LABEL = [\n '一月',\n '二月',\n '三月',\n '四月',\n '五月',\n '六月',\n '七月',\n '八月',\n '九月',\n '十月',\n '十一月',\n '十二月',\n];\n\nexport default function MonthPicker(props: MonthPickerProps) {\n const {\n prefixCls = 'w-monthpicker',\n format = 'YYYY/MM',\n onChange = () => {},\n className,\n popoverProps,\n pickerCaptionProps = {},\n allowClear = true,\n monthLabel = MONTH_LABEL,\n ...inputProps\n } = props;\n\n const [isOpen, setIsOpen] = useState(false);\n const [panelDate, setPanelDate] = useState(new Date());\n const [type, setType] = useState('month');\n const [date, setDate] = useState(props.value);\n\n useEffect(() => setDate(props.value), [props.value]);\n\n inputProps.value = useMemo(\n () => (typeof date === 'string' ? date : date ? formatter(format, date) : ''),\n [format, date],\n );\n\n if (allowClear && inputProps.value) {\n inputProps.addonAfter = (\n {\n setDate('');\n onChange && onChange();\n }}\n size={inputProps.size}\n basic\n type=\"light\"\n />\n );\n }\n\n function handleSelectedDate(type: 'setMonth' | 'setFullYear', num: number, paging?: boolean) {\n const curPanelDate = new Date(new Date(panelDate)[type](num));\n if (!paging) {\n setType('month');\n }\n const curDate = formatter(format, new Date(curPanelDate));\n setDate(curDate);\n setPanelDate(curPanelDate);\n onChange && onChange(curPanelDate, curDate);\n if (type === 'setMonth') {\n setIsOpen(false);\n }\n }\n\n return (\n setIsOpen(open)}\n content={\n \n {\n if (/^(month|year)$/.test(captionType as string)) {\n setType(captionType);\n } else {\n const year = new Date(panelDate).getFullYear();\n const curPanelDate = new Date(new Date(panelDate).setFullYear(type === 'next' ? year + 1 : year - 1));\n setPanelDate(curPanelDate);\n }\n }}\n />\n {type === 'month' && (\n handleSelectedDate('setMonth', month, paging)}\n />\n )}\n {type === 'year' && (\n handleSelectedDate('setFullYear', year, paging)}\n />\n )}\n
\n }\n >\n \n \n );\n}\n","import React from 'react';\nimport Alert, { AlertProps } from '@uiw/react-alert';\nimport { IProps } from '@uiw/utils';\nimport { NotificationCreateProps } from './index';\n\nexport type Placement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';\n\nexport interface ContainerProps extends IProps {\n placement?: Placement;\n}\nexport interface ContainerState {\n placement?: Placement;\n notifys: ContainerNotifys;\n}\n\nexport type ContainerNotifys = {\n [placement: string]: {\n [key: string]: NotificationCreateProps;\n };\n};\n\nconst notifys: ContainerNotifys = {};\nconst timer: { [key: string]: any } = {};\n\nexport default class Container extends React.Component {\n public static defaultProps: ContainerProps = {\n prefixCls: 'w-notify',\n placement: 'topRight',\n };\n public state: ContainerState = {\n notifys: {},\n };\n public create(props: NotificationCreateProps) {\n const { placement, key } = props;\n if (!notifys[placement as Placement]) {\n notifys[placement as Placement] = {};\n }\n props.isOpen = false;\n notifys[placement as Placement][key as string] = props;\n if (props.duration) {\n timer[key as string] = setTimeout(() => {\n this.closed(key as string, placement);\n }, props.duration);\n }\n this.setState(\n {\n notifys,\n placement,\n },\n () => {\n notifys[placement as Placement][key as string].isOpen = true;\n this.setState({ notifys });\n },\n );\n }\n public closed(key: string, placement?: Placement) {\n if (!key || !placement || !notifys[placement][key]) {\n return;\n }\n notifys[placement][key].isOpen = false;\n const props: NotificationCreateProps = notifys[placement][key];\n this.setState({ notifys }, () => {\n clearTimeout(timer[key]);\n delete timer[key];\n delete notifys[placement][key];\n if (props && props.willUnmount) {\n props.willUnmount(props, notifys);\n }\n });\n }\n render() {\n const { prefixCls } = this.props;\n const { placement } = this.state;\n return (\n \n {placement &&\n Object.keys(this.state.notifys[placement]).map((key) => {\n const { description, isOpen, ...alertProps } = this.state.notifys[placement][key];\n if (alertProps.type === 'open') {\n delete alertProps.type;\n }\n return (\n \n );\n })}\n \n );\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { AlertProps } from '@uiw/react-alert';\nimport { randomid } from '@uiw/utils';\nimport Container, { Placement, ContainerNotifys } from './Container';\nimport './style/index.less';\n\nexport interface NotificationCreateProps extends Omit {\n placement?: Placement;\n description?: React.ReactNode;\n type?: 'primary' | 'danger' | 'open' | 'success' | 'warning' | 'info' | 'error';\n duration?: number;\n key?: string;\n willUnmount?: (props: NotificationCreateProps, notifys: ContainerNotifys) => void;\n}\n\nexport type Notifys = { [key: string]: any };\nexport type NotifysDom = { [key: string]: HTMLDivElement };\n\nconst notifys: Notifys = {};\nconst notifysDom: NotifysDom = {};\n\nexport interface NotificationProps {\n (props: NotificationCreateProps, type: NotificationCreateProps['type']): void;\n [key: string]: () => void;\n}\n\nfunction NotificationCreate(props: NotificationCreateProps, type: NotificationCreateProps['type'] = 'open') {\n if (!props.placement) {\n props.placement = 'topRight';\n }\n props.type = type as NotificationCreateProps['type'];\n if (!props.icon && props.icon !== null) {\n switch (props.type) {\n case 'success':\n props.icon = 'circle-check';\n break;\n case 'warning':\n props.icon = 'warning';\n break;\n case 'info':\n props.icon = 'information';\n break;\n case 'error':\n props.icon = 'circle-close';\n break;\n default:\n break;\n }\n }\n switch (props.type) {\n case 'info':\n props.type = 'primary';\n break;\n case 'error':\n props.type = 'danger';\n break;\n default:\n break;\n }\n\n if (props.placement && !notifys[props.placement]) {\n const div = document.createElement('div');\n document.body.appendChild(div);\n div.className = ['w-notify-warpper', props.placement].filter(Boolean).join(' ').trim();\n notifysDom[props.placement] = div;\n notifys[props.placement] = ReactDOM.render( , div);\n }\n\n if (props.duration !== null) {\n props.duration = (props.duration || 4.5) * 1000;\n }\n\n if (notifys[props.placement]) {\n notifys[props.placement].create({\n ...props,\n duration: props.duration,\n key: randomid(),\n willUnmount(nprops: any, notifysChild: ContainerNotifys) {\n if (!nprops) return;\n nprops.onClose && nprops.onClose();\n const keys = Object.keys(notifysChild[props.placement as Placement]);\n if (keys.length === 0 && notifys[props.placement as Placement]) {\n delete notifys[props.placement as Placement];\n if (notifysDom[props.placement as Placement]) {\n document.body.removeChild(notifysDom[props.placement as Placement]);\n }\n }\n },\n });\n }\n}\n\n['open', 'success', 'warning', 'info', 'error'].forEach((type) => {\n (NotificationCreate as NotificationProps)[type] = (options: NotificationCreateProps = {}) => {\n return NotificationCreate(options, type as NotificationCreateProps['type']);\n };\n});\n\nexport interface NotificationApi {\n open(option: NotificationCreateProps): void;\n success(option: NotificationCreateProps): void;\n warning(option: NotificationCreateProps): void;\n info(option: NotificationCreateProps): void;\n error(option: NotificationCreateProps): void;\n}\n\nexport default NotificationCreate as unknown as NotificationApi;\n","/**\n * Returns a random text\n */\nexport function randomid(): string {\n return parseInt(String(Math.random() * 1e15), 10).toString(36);\n}\n","import React from 'react';\n\nexport default React.forwardRef>((props, ref) => (\n \n));\n","import React from 'react';\n\nexport default React.forwardRef>((props, ref) => (\n \n));\n","import React from 'react';\nimport { IProps } from '@uiw/utils';\nimport Option from './Option';\nimport Group from './Group';\nimport './style/index.less';\n\nexport interface SelectProps extends IProps, Omit, 'size'> {\n size?: 'large' | 'default' | 'small';\n}\n\nconst Select = React.forwardRef((props, ref) => {\n const { prefixCls = 'w-select', className, size = 'default', ...other } = props;\n return (\n \n );\n});\n\ntype Select = typeof Select & {\n Option: typeof Option;\n Group: typeof Group;\n};\n\n(Select as Select).Option = Option;\n(Select as Select).Group = Group;\n\nexport default Select as Select;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport Select from '@uiw/react-select';\nimport { IProps, HTMLUlProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface PaginationProps extends IProps, Omit {\n prefixCls?: string;\n alignment?: 'left' | 'center' | 'right';\n size?: 'default' | 'small';\n pageSizeOptions?: number[];\n total?: number;\n pageSize?: number;\n divider?: boolean;\n current?: number;\n onChange?: (current: number, total: number, pageSize: number) => void;\n onShowSizeChange?: (current: number, pageSize: number) => void;\n}\n\nexport interface PaginationState {\n current: number;\n}\n\nexport interface PaginationItemSourceData {\n type?: string;\n disabled?: boolean;\n active?: boolean;\n label?: number | string;\n goto?: number;\n}\n\nexport default function Pagination(props: PaginationProps) {\n const {\n className,\n style,\n prefixCls = 'w-pagination',\n alignment = 'left',\n size = 'default',\n total = 0,\n pageSize = 10, // The number of pages displayed.\n pageSizeOptions = [],\n current: currentNumber = 1,\n onChange = () => null,\n onShowSizeChange,\n divider,\n ...other\n } = props;\n\n const [current, setCurrent] = useState(currentNumber);\n useEffect(() => setCurrent(currentNumber), [currentNumber]);\n\n const cls = [prefixCls, className, divider ? 'divider' : null, size].filter(Boolean).join(' ').trim();\n\n const initPageSoure = useMemo(() => {\n const data: PaginationItemSourceData[] = [{ type: 'prev', disabled: current === 1 }];\n const count = Math.ceil(total / pageSize);\n const itemCount = count <= 5 ? count : 5;\n let num = 0;\n let basic = 0;\n if (current > 3 && count > 5) {\n data.push({ label: 1 });\n }\n if (current > 4 && count > 6) {\n data.push({ type: 'jumpPrev', label: '•••', goto: 5 });\n }\n while (num < itemCount) {\n num += 1;\n if (current > 3 && count > 5) {\n basic = current - 3;\n }\n let label = num + basic;\n if (count - current === 0 && count > 5) {\n label -= 2;\n }\n if (count - current === 1 && count > 5) {\n label -= 1;\n }\n if (label <= count) {\n data.push({ label, active: current === label });\n }\n }\n if (current + 3 < count && count > 6) {\n data.push({ type: 'jumpNext', label: '•••', goto: 5 });\n }\n if (current + 2 < count && count > 5) {\n data.push({ label: count });\n }\n data.push({ type: 'next', disabled: current === count });\n return data;\n // return [\n // { type: 'prev', disabled: true },\n // { type: 'jumpPrev', label: '•••', goto: 5 },\n // { label: 1 },\n // { label: 2, active: true },\n // { label: 3 },\n // { label: 4 },\n // { type: 'jumpPrev', label: '•••', goto: 5 },\n // { type: 'next' },\n // ];\n }, [current, total, pageSize]);\n\n function handleClick(item: PaginationItemSourceData) {\n if (item.active || item.disabled) {\n return;\n }\n const count = Math.ceil(total / pageSize);\n const state = {} as PaginationState;\n if (item.label) {\n state.current = item.label as number;\n }\n if (item.type === 'prev') {\n state.current = current - 1 > 0 ? current - 1 : 1;\n }\n if (item.type === 'next') {\n state.current = current + 1 <= count ? current + 1 : count;\n }\n if (/^(jumpPrev|jumpNext)/.test(item.type as string) && item.goto) {\n state.current = item.type === 'jumpPrev' ? current - item.goto : current + item.goto;\n if (state.current > count) {\n state.current = count;\n }\n if (state.current < 1) {\n state.current = 1;\n }\n }\n\n setCurrent(state.current);\n onChange && onChange(state.current, total as number, pageSize as number);\n }\n\n const onSizeChange: React.ChangeEventHandler = (e) => {\n const sizeCount: number = Number(e.target.value);\n const count = Math.ceil(total / sizeCount);\n const newCurrent: number = current > count ? count : current;\n onShowSizeChange && onShowSizeChange(newCurrent, sizeCount);\n };\n\n return (\n \n {initPageSoure.map((item: PaginationItemSourceData, idx) => {\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n let label = {item.label} ;\n if (/^(prev|next)$/.test(item.type as string)) {\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n label = ;\n }\n return (\n handleClick(item)}\n key={idx}\n >\n {label}\n \n );\n })}\n {pageSizeOptions.length > 0 && (\n \n \n {pageSizeOptions.map((item: number, index: number) => (\n \n {item}条/页\n \n ))}\n \n \n )}\n \n );\n}\n","import React, { useEffect, useState } from 'react';\nimport { IProps, noop } from '@uiw/utils';\nimport Input, { InputProps } from '@uiw/react-input';\nimport './style/input.less';\n\nexport interface PinCodeProps extends IProps {\n value?: string[];\n disabled?: boolean;\n onChange?: (value: string[]) => void;\n onBlur?: InputProps['onBlur'];\n onFocus?: InputProps['onFocus'];\n autoFocus?: boolean;\n size?: InputProps['size'];\n placeholder?: string;\n}\n\nfunction InternalPinCode(props: PinCodeProps = {}, ref: React.ForwardedRef) {\n const {\n prefixCls = 'w-pin-code',\n placeholder = '○',\n value = [],\n autoFocus,\n className,\n size = 'default',\n style,\n disabled,\n onChange = noop,\n onBlur = noop,\n onFocus = noop,\n ...otherProps\n } = props;\n const [input] = useState<{\n [key: string]: HTMLInputElement;\n }>({});\n const [placehold, setPlacehold] = useState(placeholder);\n const [values, setValues] = useState(value);\n const cls = [prefixCls, className, size ? `${prefixCls}-${size}` : null, disabled ? 'disabled' : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n\n function handleChange(e: React.ChangeEvent, idx: number) {\n let val = e.target.value;\n val = val.charAt(val.length - 1);\n const arr = [...values];\n if (Number(val) > -1 && val) {\n e.currentTarget.value = val;\n arr[idx] = val;\n if (input[idx + 1]) {\n input[idx + 1].focus();\n }\n setValues(arr);\n } else if (!val) {\n arr[idx] = '';\n setValues(arr);\n }\n }\n function handleKeyDown(e: React.KeyboardEvent, idx: number) {\n let val = e.currentTarget.value;\n const key = e.key.toLocaleLowerCase();\n if (!val && input[idx - 1] && /(backspace|delete)/.test(key)) {\n input[idx - 1].focus();\n }\n }\n useEffect(() => {\n if (values !== value) {\n onChange(values);\n }\n }, [values]);\n\n function handleBlur(event: React.FocusEvent) {\n setPlacehold(placeholder);\n onBlur(event);\n }\n function handleFocus(event: React.FocusEvent) {\n setPlacehold('');\n onFocus(event);\n }\n\n return (\n \n {[...values].map((val, key) => {\n const inpProps: InputProps = {\n min: 0,\n type: 'text',\n inputMode: 'numeric',\n autoComplete: 'off',\n value: val,\n onChange: (e) => handleChange(e, key),\n onKeyDown: (e) => handleKeyDown(e, key),\n onBlur: (e) => handleBlur(e),\n onFocus: (e) => handleFocus(e),\n className: `${prefixCls}-inner`,\n placeholder: placehold,\n disabled,\n size,\n };\n if (autoFocus && key === 0) {\n inpProps.autoFocus = true;\n }\n const child = (\n {\n if (instance) {\n input[key] = instance;\n }\n }}\n {...inpProps}\n key={key}\n />\n );\n return child;\n })}\n
\n );\n}\n\nexport default React.forwardRef(InternalPinCode);\n","import React from 'react';\nimport Icon, { IconProps } from '@uiw/react-icon';\n\nexport function IconProgress(props: { type: IconProps['type'] }): JSX.Element {\n return ;\n}\n","import React from 'react';\nimport { IconProps } from '@uiw/react-icon';\nimport { IProps, HTMLDivProps } from '@uiw/utils';\nimport { IconProgress } from './utils';\nimport './style/index.less';\nimport './style/circle.less';\n\nexport type Status = 'success' | 'active' | 'exception';\nexport interface ProgressCircleProps extends IProps, HTMLDivProps {\n type?: IconProps['type'];\n status?: Status;\n showText?: boolean; // 是否显示进度条文字内容\n percent?: number; // 百分比(必填)\n width?: number; // 圆圈进度条画布宽度\n strokeWidth?: number; // 进度条大小设置\n format?: (percent: number) => React.ReactNode;\n}\n\nexport default class Circle extends React.Component> {\n public static defaultProps: ProgressCircleProps<{}> = {\n prefixCls: 'w-progress',\n showText: true,\n percent: 0, // 百分比(必填)\n width: 126, // 圆圈进度条画布宽度\n strokeWidth: 6, // 进度条大小设置\n };\n relativeStrokeWidth(type: 'track' | 'bg' | undefined, elm: SVGPathElement) {\n const { strokeWidth, percent } = this.props;\n if (elm && elm.parentNode) {\n const { width } = (elm.parentNode as SVGAElement).getBoundingClientRect();\n const _strokeWidth: string = (((strokeWidth as number) / width) * 100).toFixed(1);\n const radius = parseInt((50 - parseFloat(_strokeWidth) / 2).toString(), 10);\n elm.setAttribute('stroke-width', _strokeWidth);\n elm.setAttribute(\n 'd',\n `M 50 50 m 0 -${radius} a ${radius} ${radius} 0 1 1 0 ${radius * 2} a ${radius} ${radius} 0 1 1 0 -${\n radius * 2\n }`,\n );\n if (type === 'track') {\n // 计算周长\n const perimeter = 2 * Math.PI * radius;\n elm.setAttribute(\n 'style',\n `stroke-dasharray:${perimeter}px,${perimeter}px;stroke-dashoffset:${\n (1 - (percent as number) / 100) * perimeter\n }px;transition: stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease;`,\n );\n }\n }\n }\n render() {\n const { prefixCls, style, type, className, showText, percent, format, strokeWidth, width, status, ...resetProps } =\n this.props;\n const cls = [\n prefixCls,\n className,\n `${prefixCls}-circle`,\n showText ? `${prefixCls}-show-text` : null,\n status ? `${prefixCls}-status-${status}` : null,\n parseInt((percent as number).toString(), 10) >= 100 ? `${prefixCls}-status-success` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n let progressInfo;\n const progressStatus =\n parseInt((percent as number).toString(), 10) >= 100 && !('status' in this.props) ? 'success' : status;\n if (showText) {\n let percentView: React.ReactNode = `${percent}%`;\n if (progressStatus === 'exception') {\n percentView = ;\n } else if (progressStatus === 'success') {\n percentView = ;\n }\n progressInfo = (\n \n {format ? format(percent as number) : percentView}\n \n );\n }\n return (\n \n
\n \n \n \n {progressInfo}\n
\n );\n }\n}\n","import React from 'react';\nimport { IconProgress } from './utils';\nimport { ProgressCircleProps } from './Circle';\nimport './style/index.less';\nimport './style/line.less';\n\nexport interface ProgressLineProp extends ProgressCircleProps {}\n\nexport default class Line extends React.Component> {\n public static defaultProps: ProgressLineProp<{}> = {\n prefixCls: 'w-progress',\n showText: true, // 是否显示进度条文字内容\n percent: 0, // 百分比(必填)\n width: 126, // 圆圈进度条画布宽度\n strokeWidth: 6, // 进度条大小设置\n };\n render() {\n const { prefixCls, style, className, showText, percent, format, strokeWidth, width, status, ...resetProps } =\n this.props;\n const cls = [\n prefixCls,\n className,\n `${prefixCls}-line`,\n showText ? `${prefixCls}-show-text` : null,\n status ? `${prefixCls}-status-${status}` : null,\n parseInt((percent as number).toString(), 10) >= 100 ? `${prefixCls}-status-success` : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n let progressInfo;\n if (showText) {\n const progressStatus =\n parseInt((percent as number).toString(), 10) >= 100 && !('status' in this.props) ? 'success' : status;\n let percentView: React.ReactNode = `${percent}%`;\n if (progressStatus === 'exception') {\n percentView = ;\n } else if (progressStatus === 'success') {\n percentView = ;\n }\n progressInfo = {format ? format(percent as number) : percentView} ;\n }\n const percentStyle = {\n width: `${percent}%`,\n height: strokeWidth,\n };\n return (\n \n );\n }\n}\n","import Circle from './Circle';\nimport Line from './Line';\n\nexport * from './Circle';\nexport * from './Line';\n\nexport default {\n Line,\n Circle,\n};\n","import React, { useState, useMemo } from 'react';\nimport { IProps, HTMLDivProps, HTMLSpanProps, noop } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface RateProps extends IProps, Omit {\n value?: number;\n readOnly?: boolean;\n allowHalf?: boolean;\n count?: number;\n color?: string;\n disabled?: boolean;\n character?: React.ReactNode;\n onChange?: (key: number) => void;\n onHoverChange?: (key: number) => void;\n}\n\nexport default function Rate(props: RateProps = {}) {\n const {\n prefixCls = 'w-rate',\n count = 5,\n value: defValue = 0,\n className,\n allowHalf,\n character = '★',\n readOnly = false,\n disabled,\n onChange = noop,\n onHoverChange = noop,\n color,\n ...other\n } = props;\n const [value, setValue] = useState(defValue);\n const [hoverCount, setHoverCount] = useState(-1);\n const cls = [prefixCls, className, disabled ? 'disabled' : null].filter(Boolean).join(' ').trim();\n const [prevValue, setPrevValue] = useState();\n if (defValue !== prevValue) {\n setPrevValue(defValue);\n }\n\n useMemo(() => {\n if (value !== prevValue) {\n setValue(defValue);\n }\n }, [prevValue]);\n\n function onMouseLeave() {\n setHoverCount(-1);\n }\n\n function getValue(e: React.MouseEvent, key: number) {\n e.persist();\n let currentValue = key;\n const isLeft =\n e.clientX - e.currentTarget.getBoundingClientRect().left <= e.currentTarget.getBoundingClientRect().width / 2;\n if (allowHalf) {\n e.persist();\n currentValue = isLeft ? key + 0.5 : key + 1;\n } else {\n currentValue = key + 1;\n }\n return currentValue;\n }\n\n function onMouseMove(e: React.MouseEvent, key: number) {\n const currentValue = getValue(e, key);\n if (hoverCount !== currentValue) {\n setHoverCount(currentValue);\n onHoverChange(currentValue);\n }\n }\n function onClick(e: React.MouseEvent, key: number) {\n if (readOnly) return;\n const currentValue = getValue(e, key);\n setValue(currentValue);\n onChange(currentValue);\n }\n return (\n onMouseLeave()}>\n {[...Array(count)].map((_, idx) => {\n const halfon =\n (value <= idx + 0.5 && Math.ceil(value) - 1 === idx && hoverCount === -1) || hoverCount === idx + 0.5;\n const activeCls = [\n `${prefixCls}-hight`,\n idx + 1 <= value && hoverCount === -1 ? 'star-on' : null,\n idx + 1 <= hoverCount ? 'hover-on' : null,\n halfon ? 'half-on' : null,\n ]\n .filter(Boolean)\n .join(' ')\n .trim();\n const props: HTMLSpanProps = {};\n if (!readOnly) {\n props.onClick = (e) => onClick(e, idx);\n props.onMouseMove = (e) => onMouseMove(e, idx);\n }\n return (\n \n \n {character}\n \n {character} \n \n );\n })}\n
\n );\n}\n","import React, { useMemo } from 'react';\nimport { IProps, HTMLSpanProps } from '@uiw/utils';\nimport './style/index.less';\n\nexport interface TagProps extends IProps, Omit {\n color?: string;\n disabled?: boolean;\n visible?: boolean;\n bordered?: boolean;\n light?: boolean;\n closable?: boolean;\n title?: React.ReactNode;\n onClose?: (e: React.MouseEvent) => void;\n}\n\nexport default (props: TagProps = {}) => {\n const {\n prefixCls = 'w-tag',\n className,\n style,\n title = '',\n children,\n visible = true,\n color = '#6E6E6E',\n disabled = false,\n bordered = true,\n closable,\n light = false,\n onClose,\n ...other\n } = props;\n const cls = [prefixCls, className, light ? `${prefixCls}-light` : null, disabled ? 'disabled' : null]\n .filter(Boolean)\n .join(' ')\n .trim();\n const styl: React.CSSProperties = { ...style };\n if (!light) {\n styl.color = '#fff';\n styl.backgroundColor = color;\n } else {\n styl.color = color;\n styl.borderColor = color;\n if (bordered && light) {\n styl.boxShadow = `inset 0 0 0 1px ${color}`;\n }\n }\n if (!visible) {\n return null;\n }\n\n return (\n \n {title || children}\n {!disabled && closable ? (\n \n \n \n ) : null}\n \n );\n};\n","import React, { useMemo } from 'react';\nimport Dropdown, { DropdownProps } from '@uiw/react-dropdown';\nimport Icon from '@uiw/react-icon';\nimport Menu from '@uiw/react-menu';\nimport Input from '@uiw/react-input';\nimport Tag, { TagProps } from '@uiw/react-tag';\nimport { IProps } from '@uiw/utils';\nimport { useState } from 'react';\nimport { useRef } from 'react';\nimport { useEffect } from 'react';\nimport './style/index.less';\n\ntype ValueType = string | number;\n\nconst TagSize = { large: 25, default: 20, small: 17 };\n\nexport interface SearchSelectProps extends IProps, DropdownProps {\n mode?: 'single' | 'multiple';\n size?: 'large' | 'default' | 'small';\n maxTagCount?: number;\n valueAmount?: number;\n labelInValue?: boolean;\n loading?: boolean;\n showSearch?: boolean;\n allowClear?: boolean;\n defaultValue?: ValueType | Array;\n tagProps?: TagProps;\n value?: ValueType | Array;\n option: SearchSelectOptionData[];\n onSelect?: (value: ValueType | Array | Array) => void;\n onSearch?: (value: string) => void;\n onChange?: (value: ValueType | Array | Array) => void;\n}\n\nexport interface SearchSelectOptionData {\n label: string;\n value: string | number;\n [keyName: string]: any;\n}\n\nexport default function SearchSelect(props: SearchSelectProps) {\n const {\n allowClear = false,\n disabled = false,\n valueAmount,\n size = 'default',\n option = [],\n maxTagCount,\n loading = false,\n labelInValue = false,\n prefixCls = 'w-search-select',\n className,\n mode = 'single',\n style,\n isOpen,\n value,\n defaultValue,\n showSearch = false,\n tagProps = {},\n placeholder,\n onSearch,\n onChange,\n onSelect,\n ...others\n } = props;\n\n const cls = [prefixCls, className].filter(Boolean).join(' ').trim();\n const isMultiple = useMemo(() => mode === 'multiple', [mode]);\n const [innerIsOpen, setInnerIsOpen] = useState(false);\n const [selectedValue, setSelectedValue] = useState>([]);\n const [selectedLabel, setSelectedLabel] = useState('');\n const [selectIconType, setSelectIconType] = useState('');\n const inputRef = useRef