@nocobase/plugin-ai 2.1.8 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -0
  2. package/dist/ai/docs/nocobase/api/cli/app/start.md +7 -0
  3. package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +6 -0
  4. package/dist/ai/docs/nocobase/api/cli/init.md +39 -2
  5. package/dist/ai/docs/nocobase/api/cli/source/download.md +19 -0
  6. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/validation.md +11 -8
  7. package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/validation-rules.md +6 -2
  8. package/dist/client/{406.9a530334eae8cede.js → 406.15c09d98faa2ccf1.js} +1 -1
  9. package/dist/client/{428.fdd0cc3cfd1632ef.js → 428.5eb4f53ddbb6a3b8.js} +1 -1
  10. package/dist/client/580.05dc0322d3a747be.js +10 -0
  11. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +57 -17
  12. package/dist/client/index.js +2 -2
  13. package/dist/client-v2/index.js +1 -1
  14. package/dist/collections/ai-mcp-clients.js +5 -0
  15. package/dist/externalVersion.js +16 -16
  16. package/dist/locale/en-US.json +6 -3
  17. package/dist/locale/zh-CN.json +6 -3
  18. package/dist/node_modules/@langchain/xai/package.json +1 -1
  19. package/dist/node_modules/fs-extra/package.json +1 -1
  20. package/dist/node_modules/jsonrepair/package.json +1 -1
  21. package/dist/node_modules/just-bash/package.json +1 -1
  22. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  23. package/dist/node_modules/openai/package.json +1 -1
  24. package/dist/node_modules/zod/package.json +1 -1
  25. package/dist/server/ai-employees/ai-employee.js +8 -3
  26. package/dist/server/plugin.d.ts +2 -0
  27. package/dist/server/plugin.js +30 -0
  28. package/dist/server/resource/aiConversations.js +1 -1
  29. package/dist/server/resource/aiMcpClients.js +2 -2
  30. package/dist/server/resource/aiTools.js +14 -9
  31. package/package.json +2 -2
  32. package/dist/client/580.e75f97fb883ad042.js +0 -10
@@ -35,6 +35,10 @@ If you explicitly pass `--env` and it differs from the current env, the CLI asks
35
35
 
36
36
  By default, when applicable, the CLI first runs `nb license plugins sync --skip-if-no-license` to synchronize the commercial plugins allowed by the current license. Then local envs automatically complete any required install or upgrade preparation before starting again, and Docker envs complete that step before recreating the container. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out.
37
37
 
38
+ ## Hook Scripts
39
+
40
+ If the current env saved a hook with `nb init --hook-script`, `nb app restart` runs `afterAppStart(context)` once after the app restarts and passes `__health_check`. It uses `context.phase = 'app-start'` and `context.command = 'app:restart'`.
41
+
38
42
  ## Related Commands
39
43
 
40
44
  - [`nb app start`](./start.md)
@@ -34,6 +34,13 @@ nb app start --env local-docker
34
34
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
35
35
 
36
36
  By default, when applicable, the CLI first runs `nb license plugins sync --skip-if-no-license` to synchronize the commercial plugins allowed by the current license. Then local envs automatically complete any required install or upgrade preparation before starting, and Docker envs recreate the app container from saved env config. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out.
37
+
38
+ ## Hook Scripts
39
+
40
+ If the current env saved a hook with `nb init --hook-script`, `nb app start` runs `afterAppStart(context)` after the app actually starts and passes `__health_check`. Installed envs use `context.phase = 'app-start'` and `context.command = 'app:start'`. If the app is already running, this command does not run the hook.
41
+
42
+ For prepared envs created with `--prepare-only`, the first `nb app start` runs `beforeAppInstall(context)`, completes the first install and startup, then runs `afterAppStart(context)`. Both hooks receive `context.phase = 'init'` and `context.command = 'app:start'`.
43
+
37
44
  ## Related Commands
38
45
 
39
46
  - [`nb app stop`](./stop.md)
@@ -58,6 +58,12 @@ Step 4 automatically completes any required upgrade preparation for the current
58
58
 
59
59
  If the final `nb env update` step fails, the upgrade still counts as successful. The CLI prints a warning and tells you to run `nb env update <envName>` manually afterward.
60
60
 
61
+ ## Hook Scripts
62
+
63
+ If the current env saved a hook with `nb init --hook-script`, `nb app upgrade` passes the upgrade lifecycle to the hook. For npm/Git source, source refresh runs `beforeDependencyInstall(context)` before dependency installation with `context.phase = 'upgrade'` and `context.command = 'app:upgrade'`.
64
+
65
+ The app upgrade startup step then runs `beforeAppInstall(context)`, and after the app starts and passes `__health_check`, it runs `afterAppStart(context)`. Both hooks also use `context.phase = 'upgrade'` and `context.command = 'app:upgrade'`. Docker source does not run `beforeDependencyInstall`, but it does run the app-level hooks.
66
+
61
67
  ## Related Commands
62
68
 
63
69
  - [`nb source download`](../source/download.md)
@@ -42,7 +42,7 @@ nb init --env app1 --resume
42
42
 
43
43
  `--prepare-only` is intended for flows where the env should be prepared first, then the license is activated, and only after that the app is installed and started.
44
44
 
45
- If you want to save the env config, prepare the source files or image, and get the database ready first, but delay the actual app installation and first startup, you can use:
45
+ If you want to save the env config and prepare the database first, while delaying dependency download, app installation, and first startup, you can use:
46
46
 
47
47
  ```bash
48
48
  nb init --env app1 --prepare-only
@@ -67,6 +67,7 @@ By default, the CLI organizes local files under `app-path` using the following c
67
67
 
68
68
  ```text
69
69
  <app-path>/
70
+ ├── .nb/ # CLI metadata for this env, such as hooks.mjs
70
71
  ├── source/ # Default directory for app source code or downloaded content
71
72
  ├── storage/ # Runtime data directory
72
73
  └── .env # Optional app environment variable file
@@ -74,6 +75,7 @@ By default, the CLI organizes local files under `app-path` using the following c
74
75
 
75
76
  Typically:
76
77
 
78
+ - `.nb/` stores CLI-managed metadata. A script passed with `--hook-script` is copied to `<app-path>/.nb/hooks.mjs`, so later `nb app upgrade` and local source restore can reuse it
77
79
  - `source/` mainly corresponds to the local app directory for npm / Git envs. For Docker envs, the CLI also keeps this default path derivation, but most of the time you do not need to care about it manually. Pay special attention during upgrades: the `source/` directory will be deleted and downloaded again, so do not put files you need to keep here
78
80
  - `storage/` is used for runtime data, such as built-in database data, plugins, logs, and more
79
81
  - `.env` is an optional app environment variable file. You only need to add it in `<app-path>/.env` when you want to customize environment variables; if this file exists, Docker, npm, and Git install sources will all read it by default
@@ -101,7 +103,7 @@ If you are following the local UI wizard step by step, you can first use the tab
101
103
  | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
102
104
  | `Getting started` | `--env`、`--yes`、`--ui`、`--locale`、`--verbose`、`--skip-skills`、`--resume` |
103
105
  | `App environment` | `--lang`、`--app-path`、`--app-port`、`--force` |
104
- | `App source and version` | `--source`、`--version`、`--skip-download`、`--git-url`、`--docker-registry`、`--docker-platform`、`--npm-registry`、`--replace`、`--dev-dependencies`、`--output-dir`、`--docker-save`、`--build`、`--build-dts` |
106
+ | `App source and version` | `--source`、`--version`、`--skip-download`、`--git-url`、`--docker-registry`、`--docker-platform`、`--npm-registry`、`--replace`、`--dev-dependencies`、`--output-dir`、`--docker-save`、`--build`、`--build-dts`、`--hook-script` |
105
107
  | `Configure the database` | `--builtin-db`、`--db-dialect`、`--builtin-db-image`、`--db-host`、`--db-port`、`--db-database`、`--db-user`、`--db-password`、`--db-schema`、`--db-table-prefix`、`--db-underscored` |
106
108
  | `Create an admin account` | `--root-username`、`--root-email`、`--root-password`、`--root-nickname` |
107
109
  | `Remote connection` | `--api-base-url`、`--auth-type`、`--access-token`、`--username`、`--password`、`--skip-auth` |
@@ -184,6 +186,7 @@ The “Default” below means the value or behavior that `nb init` usually uses
184
186
  | `--npm-registry` | string | Empty | Registry used for npm/Git download and dependency installation |
185
187
  | `--build` / `--no-build` | boolean | `true` | Whether to build after installing npm/Git dependencies |
186
188
  | `--build-dts` | boolean | `false` | Whether to generate TypeScript declaration files during npm/Git builds |
189
+ | `--hook-script` | string | None | Copy the specified hook module to `<app-path>/.nb/hooks.mjs` and save it in the env config; supports the `beforeDependencyInstall`, `beforeAppInstall`, and `afterAppStart` lifecycle hooks |
187
190
 
188
191
  ## Examples
189
192
 
@@ -233,6 +236,40 @@ nb init --env app1 --yes --source git --version latest \
233
236
  --git-url https://gitee.com/nocobase/nocobase.git
234
237
  ```
235
238
 
239
+ ### Extend the install flow with a hook script
240
+
241
+ If you need to prepare extra content during installation, pass a local ESM module with `--hook-script`:
242
+
243
+ ```bash
244
+ nb init --env app1 --yes --source git --hook-script ./hooks.mjs
245
+ ```
246
+
247
+ The CLI copies this file to `<app-path>/.nb/hooks.mjs` and saves `hookScript: ".nb/hooks.mjs"` in the env config. Later `nb app start`, `nb app restart`, and `nb app upgrade` reuse it from that location.
248
+
249
+ The hook file must default-export an object. Implement only the methods you need:
250
+
251
+ ```js
252
+ export default {
253
+ beforeDependencyInstall: async (context) => {
254
+ // Runs after git clone / npm scaffold and before yarn install.
255
+ },
256
+ beforeAppInstall: async (context) => {
257
+ // Runs before the app-level install or upgrade command.
258
+ },
259
+ afterAppStart: async (context) => {
260
+ // Runs after the app actually starts and passes the health check.
261
+ },
262
+ };
263
+ ```
264
+
265
+ - `beforeDependencyInstall` only applies to npm/Git source and runs right before the real `yarn install`; Docker source does not run it
266
+ - `beforeAppInstall` runs before app-level install or upgrade commands, and applies to npm/Git/Docker source
267
+ - `afterAppStart` runs after the app actually starts and passes `__health_check`; `nb app start`, `nb app restart`, and `nb app upgrade` may all trigger it
268
+
269
+ `--prepare-only` only saves the env config and copies the hook file. It does not execute hooks. When you later run `nb app start` for the first time, the CLI runs the first-install hooks with `context.phase` set to `init` and `context.command` set to `app:start`.
270
+
271
+ `context` includes lifecycle information such as `phase`, `command`, `source`, `version`, `appPath`, `sourcePath`, `storagePath`, `hookScript`, and `envConfig`. If a hook throws, the current CLI command fails. Because `afterAppStart` can run repeatedly during start, restart, and upgrade flows, keep it idempotent.
272
+
236
273
  ### Quick install and use basic authentication
237
274
 
238
275
  If you want to quickly install a local app in non-interactive mode and directly save `basic` authentication after installation, you can also write it like this. This way, you do not need to open a browser to complete OAuth.
@@ -33,6 +33,7 @@ nb source download [flags]
33
33
  | `--npm-registry` | string | Registry used for npm/Git downloads and dependency installation |
34
34
  | `--build` / `--no-build` | boolean | Whether to build after npm/Git dependency installation |
35
35
  | `--build-dts` | boolean | Whether to generate TypeScript declaration files during npm/Git build |
36
+ | `--hook-script` | string | Hook module to run after npm scaffold or Git clone and before dependency installation; only applies to npm/Git source |
36
37
 
37
38
  ## Examples
38
39
 
@@ -47,8 +48,26 @@ nb source download --source git --version alpha --git-url=git@github.com:nocobas
47
48
  nb source download --source git --version fix/cli-v2
48
49
  nb source download -y --source npm --version alpha --build-dts
49
50
  nb source download -y --source npm --version alpha --npm-registry=https://registry.npmmirror.com
51
+ nb source download -y --source git --version beta --hook-script ./hooks.mjs
50
52
  ```
51
53
 
54
+ ## Pre-install hook
55
+
56
+ `--hook-script` only affects the current `nb source download` run. If you want the hook to be saved with the env and reused by `nb app upgrade` or local source restore, pass it through [`nb init --hook-script`](../init.md) instead.
57
+
58
+ The hook file must default-export an object with `beforeDependencyInstall(context)`:
59
+
60
+ ```js
61
+ export default {
62
+ beforeDependencyInstall: async ({ sourcePath, version, envConfig }) => {
63
+ // Runs after git clone / npm scaffold and before yarn install.
64
+ },
65
+ };
66
+ ```
67
+
68
+ When you run `nb source download --hook-script` directly, `beforeDependencyInstall` receives `context.phase` as `source-download` and `context.command` as `source:download`. This command does not run `beforeAppInstall` or `afterAppStart`; those hooks belong to app install, start, restart, and upgrade flows.
69
+
70
+
52
71
  ## Version Aliases
53
72
 
54
73
  With Git source, common dist-tags are resolved to branches: `latest` -> `main`, `beta` -> `next`, `alpha` -> `develop`.
@@ -78,6 +78,9 @@ After configuring field rules, the corresponding validation rules will be trigge
78
78
 
79
79
  ![20250819201027](https://nocobase-docs.oss-cn-beijing.aliyuncs.com/20250819201027.png)
80
80
 
81
+ When the field is used in a form, field validation rules are also displayed in the field validation settings. These rules appear under **Server-side field validation rules** and are read-only there. If you need to change them, edit the field in Data source → Collection configuration.
82
+
83
+ You can still add extra rules for the current form field under **Client-side validation rules**. These rules only apply to the current field component. The final validation result combines **Server-side field validation rules** and **Client-side validation rules**.
81
84
 
82
85
  Validation rules also apply to sub-table and sub-form components:
83
86
 
@@ -93,12 +96,12 @@ Note that in sub-form or sub-table scenarios, required validation for associatio
93
96
  ![20250819203016](https://nocobase-docs.oss-cn-beijing.aliyuncs.com/20250819203016.png)
94
97
 
95
98
 
96
- ## Differences from Client-Side Field Validation
97
- Client-side and server-side field validation are applied in different scenarios, with significant differences in implementation and rule trigger timing, so they need to be managed separately.
99
+ ## Differences Between Server-Side Field Validation Rules and Client-Side Validation Rules
100
+ Server-side field validation rules and client-side validation rules are configured in different places and have different scopes.
98
101
 
99
102
  ### Configuration Method Differences
100
- - **Client-side validation**: Configure rules in edit forms (as shown in the figure below)
101
- - **Server-side field validation**: Set field rules in Data Source Collection Configuration
103
+ - **Server-side field validation rules**: Set field rules in Data source Collection configuration. These rules are the base rules of the field.
104
+ - **Client-side validation rules**: Configure extra rules in a form field's settings. These rules only affect the current field component.
102
105
 
103
106
  ![20250819203836](https://nocobase-docs.oss-cn-beijing.aliyuncs.com/20250819203836.png)
104
107
 
@@ -109,7 +112,7 @@ Client-side and server-side field validation are applied in different scenarios,
109
112
 
110
113
 
111
114
  ### Validation Trigger Timing Differences
112
- - **Client-side validation**: Triggers validation in real-time as users fill in fields, displaying error messages immediately.
113
- - **Server-side field validation**: Validates on the server side before data entry after data submission, with error messages returned through API responses.
114
- - **Application scope**: Server-side field validation takes effect not only during form submission but also triggers in all scenarios involving data addition or modification, such as workflows and data imports.
115
- - **Error messages**: Client-side validation supports custom error messages, while server-side validation does not currently support custom error messages.
115
+ - **Server-side field validation rules**: Trigger frontend validation when the field is used in a form, and also validate before data is written. They also apply to scenarios that create or update data, such as workflows and data imports.
116
+ - **Client-side validation rules**: Trigger frontend validation in the current form field only.
117
+ - **Rule display**: Server-side field validation rules are shown as inherited read-only rules. Client-side validation rules are shown separately and can be edited there.
118
+ - **Error messages**: Client-side validation rules support custom error messages, while server-side field validation rules do not currently support custom error messages.
@@ -30,10 +30,14 @@ Most fields support the configuration of validation rules. After a field is conf
30
30
  ![20251028230554](https://static-docs.nocobase.com/20251028230554.png)
31
31
 
32
32
 
33
- ### Frontend Validation in Field Configuration
33
+ ### Client-Side Validation Rules in Field Settings
34
34
 
35
35
  Validation rules set in the field configuration will trigger frontend validation to ensure user input complies with the regulations.
36
36
 
37
+ If the corresponding collection field already has validation rules, those rules are shown in the validation settings under **Server-side field validation rules**. They are inherited from the data source field configuration and are read-only here. If you need to change them, edit the collection field in Data source → Collection configuration.
38
+
39
+ Rules added under **Client-side validation rules** only apply to the current field component. They do not change the collection field configuration. When both groups exist, NocoBase applies the inherited field rules and client-side validation rules together.
40
+
37
41
 
38
42
  ![20251028230105](https://static-docs.nocobase.com/20251028230105.png)
39
43
 
@@ -45,4 +49,4 @@ Validation rules set in the field configuration will trigger frontend validation
45
49
  **Text fields** also support custom regex validation to meet specific format requirements.
46
50
 
47
51
 
48
- ![20251028230903](https://static-docs.nocobase.com/20251028230903.png)
52
+ ![20251028230903](https://static-docs.nocobase.com/20251028230903.png)
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- (self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["406"],{2341:function(e,t,n){"use strict";n.d(t,{A:function(){return A}});var r=n(1426),o=n(3059),i=n.n(o),a=n(9155),c=n.n(a),u=n(2059);let l=c().createContext(null);var s=({children:e})=>{let{prefixCls:t}=c().useContext(l);return c().createElement("div",{className:i()(`${t}-group-title`)},e&&c().createElement(u.Typography.Text,null,e))},f=n(7375),d=n(7782);let h=e=>{e.stopPropagation()};var p=e=>{let t,{prefixCls:n,info:o,className:l,direction:s,onClick:p,active:v,menu:m,...g}=e,y=(0,d.A)(g,{aria:!0,data:!0,attr:!0}),{disabled:b}=o,[w,E]=c().useState(!1),[A,S]=c().useState(!1),T=i()(l,`${n}-item`,{[`${n}-item-active`]:v&&!b},{[`${n}-item-disabled`]:b}),[O,x]=(0,a.useMemo)(()=>{let{trigger:e,...t}=m||{};return[e,t]},[m]);return c().createElement(u.Tooltip,{title:o.label,open:w&&A,onOpenChange:S,placement:"rtl"===s?"left":"right"},c().createElement("li",(0,r.A)({},y,{className:T,onClick:()=>{!b&&p&&p(o)}}),o.icon&&c().createElement("div",{className:`${n}-icon`},o.icon),c().createElement(u.Typography.Text,{className:`${n}-label`,ellipsis:{onEllipsis:E}},o.label),!b&&m&&c().createElement(u.Dropdown,{menu:x,placement:"rtl"===s?"bottomLeft":"bottomRight",trigger:["click"],disabled:b,onOpenChange:e=>{e&&S(!e)}},(t=c().createElement(f.EllipsisOutlined,{onClick:h,className:`${n}-menu-icon`}),O?"function"==typeof O?O(o,{originNode:t}):O:t))))},v=n(4921),m=n(5327),g=n(7790);let y="__ungrouped";var b=n(4400),w=n(9980),E=(0,n(7030).OF)("Conversations",e=>(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${(0,b.zA)(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${(0,b.zA)(e.paddingXS)}`}}}})((0,w.oX)(e,{})),()=>({})),A=e=>{let{prefixCls:t,rootClassName:n,items:o,activeKey:a,defaultActiveKey:u,onActiveChange:f,menu:h,styles:b={},classNames:w={},groupable:A,className:S,style:T,...O}=e,x=(0,d.A)(O,{attr:!0,aria:!0,data:!0}),[C,_]=(0,v.A)(u,{value:a}),[R,k]=((e,t=[])=>{let[n,r,o]=c().useMemo(()=>{if(!e)return[!1,void 0,void 0];let t={sort:void 0,title:void 0};return"object"==typeof e&&(t={...t,...e}),[!0,t.sort,t.title]},[e]);return c().useMemo(()=>{if(!n)return[[{name:y,data:t,title:void 0}],n];let e=t.reduce((e,t)=>{let n=t.group||y;return e[n]||(e[n]=[]),e[n].push(t),e},{});return[(r?Object.keys(e).sort(r):Object.keys(e)).map(t=>({name:t===y?void 0:t,title:o,data:e[t]})),n]},[t,e])})(A,o),{getPrefixCls:M,direction:j}=(0,g.A)(),L=M("conversations",t),N=(0,m.A)("conversations"),[P,$,I]=E(L),D=i()(L,N.className,S,n,$,I,{[`${L}-rtl`]:"rtl"===j}),H=e=>{_(e.key),f&&f(e.key)};return P(c().createElement("ul",(0,r.A)({},x,{style:{...N.style,...T},className:D}),R.map((e,t)=>{let n=e.data.map((e,t)=>c().createElement(p,{key:e.key||`key-${t}`,info:e,prefixCls:L,direction:j,className:i()(w.item,N.classNames.item),style:{...N.styles.item,...b.item},menu:"function"==typeof h?h(e):h,active:C===e.key,onClick:H}));return k?c().createElement("li",{key:e.name||`key-${t}`},c().createElement(l.Provider,{value:{prefixCls:L}},e.title?.(e.name,{components:{GroupTitle:s}})||c().createElement(s,{key:e.name},e.name)),c().createElement("ul",{className:`${L}-list`},n)):n})))}},606:function(e,t,n){"use strict";let r;n.d(t,{A:function(){return j}});var o=n(1426),i=n(2059),a=n(3059),c=n.n(a),u=n(8993),l=n(7782),s=n(9155),f=n.n(s),d=n(5327),h=n(7790),p=n(7375),v=n(2094);let m=s.createContext({}),g=()=>({height:0}),y=e=>({height:e.scrollHeight}),b=s.createContext(null);var w=s.forwardRef(function(e,t){let{className:n,action:r,onClick:a,...u}=e,l=s.useContext(b),{prefixCls:f,disabled:d}=l,h=l[r],p=d??u.disabled??l[`${r}Disabled`];return s.createElement(i.Button,(0,o.A)({type:"text"},u,{ref:t,onClick:e=>{!p&&(h&&h(),a&&a(e))},className:c()(f,n,{[`${f}-disabled`]:p})}))}),E=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ClearOutlined,null)},e,{action:"onClear",ref:t}))});let A=(0,s.memo)(e=>{let{className:t}=e;return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},f().createElement("title",null,"Stop Loading"),f().createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},f().createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))});var S=s.forwardRef(function(e,t){let{prefixCls:n}=s.useContext(b),{className:r}=e;return s.createElement(w,(0,o.A)({icon:null,color:"primary",variant:"text",shape:"circle"},e,{className:c()(r,`${n}-loading-button`),action:"onCancel",ref:t}),s.createElement(A,{className:`${n}-loading-icon`}))}),T=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ArrowUpOutlined,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))});function O({className:e}){return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:e},f().createElement("title",null,"Speech Recording"),Array.from({length:4}).map((e,t)=>f().createElement("rect",{fill:"currentColor",rx:70,ry:70,height:250,width:140,x:286.66666666666663*t,y:375,key:t},f().createElement("animate",{attributeName:"height",values:"250; 500; 250",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}),f().createElement("animate",{attributeName:"y",values:"375; 250; 375",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}))))}var x=s.forwardRef(function(e,t){let{speechRecording:n,onSpeechDisabled:r,prefixCls:i}=s.useContext(b),a=null;return a=n?s.createElement(O,{className:`${i}-recording-icon`}):r?s.createElement(p.AudioMutedOutlined,null):s.createElement(p.AudioOutlined,null),s.createElement(w,(0,o.A)({icon:a,color:"primary",variant:"text"},e,{action:"onSpeech",ref:t}))}),C=n(4400),_=n(9980),R=(0,n(7030).OF)("Sender",e=>{let{paddingXS:t,calc:n}=e,r=(0,_.oX)(e,{SenderContentMaxWidth:`calc(100% - ${(0,C.zA)(n(t).add(32).equal())})`});return[(e=>{let{componentCls:t,padding:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,lineWidthBold:c,calc:u}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:u(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:c}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${t}-footer`]:{paddingInlineStart:n,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}})(r),(e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(t=>`${t} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}})(r)]},()=>({}));!r&&"u">typeof window&&(r=window.SpeechRecognition||window.webkitSpeechRecognition);let k={SendButton:T,ClearButton:E,LoadingButton:S,SpeechButton:x},M=f().forwardRef((e,t)=>{var n,a;let{prefixCls:p,styles:v={},classNames:g={},className:y,rootClassName:w,style:E,defaultValue:A,value:O,readOnly:C,submitType:_="enter",onSubmit:M,loading:j,components:L,onCancel:N,onChange:P,actions:$,onKeyPress:I,onKeyDown:D,disabled:H,allowSpeech:z,prefix:B,footer:q,header:W,onPaste:Y,onPasteFile:F,autoSize:X={maxRows:8},...V}=e,{direction:K,getPrefixCls:G}=(0,h.A)(),U=G("sender",p),J=f().useRef(null),Q=f().useRef(null);(0,s.useImperativeHandle)(t,()=>{let e=(()=>({nativeElement:J.current,focus:Q.current?.focus,blur:Q.current?.blur}))(),{nativeElement:t}=e;return new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)})});let Z=(0,d.A)("sender"),ee=`${U}-input`,[et,en,er]=R(U),eo=c()(U,Z.className,y,w,en,er,{[`${U}-rtl`]:"rtl"===K,[`${U}-disabled`]:H}),ei=`${U}-actions-btn`,ea=`${U}-actions-list`,[ec,eu]=(0,u.vz)(A||"",{value:O}),el=(e,t)=>{eu(e),P&&P(e,t)},[es,ef,ed]=function(e,t){let n=(0,u._q)(e),[o,i,a]=f().useMemo(()=>"object"==typeof t?[t.recording,t.onRecordingChange,"boolean"==typeof t.recording]:[void 0,void 0,!1],[t]),[c,l]=f().useState(null);f().useEffect(()=>{if("u">typeof navigator&&"permissions"in navigator){let e=null;return navigator.permissions.query({name:"microphone"}).then(t=>{l(t.state),t.onchange=function(){l(this.state)},e=t}),()=>{e&&(e.onchange=null)}}},[]);let s=r&&"denied"!==c,d=f().useRef(null),[h,p]=(0,u.vz)(!1,{value:o}),v=f().useRef(!1),m=(0,u._q)(e=>{if(!e||h)if(v.current=e,a)i?.(!h);else{if(s&&!d.current){let e=new r;e.onstart=()=>{p(!0)},e.onend=()=>{p(!1)},e.onresult=e=>{v.current||n(e.results?.[0]?.[0]?.transcript),v.current=!1},d.current=e}d.current&&(h?(d.current.stop(),i?.(!1)):(d.current.start(),i?.(!0)))}});return[s,m,h]}(e=>{el(`${ec} ${e}`)},z),eh=(n=["input"],a=i.Input.TextArea,function(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}(L,n)||a),ep={...(0,l.A)(V,{attr:!0,aria:!0,data:!0}),ref:Q},ev=()=>{ec&&M&&!j&&M(ec)},em=f().useRef(!1),eg=f().createElement(i.Flex,{className:`${ea}-presets`},z&&f().createElement(x,null),j?f().createElement(S,null):f().createElement(T,null));"function"==typeof $?eg=$(eg,{components:k}):($||!1===$)&&(eg=$);let ey=null;return"function"==typeof q?ey=q({components:k}):q&&(ey=q),et(f().createElement("div",{ref:J,className:eo,style:{...Z.style,...E}},W&&f().createElement(m.Provider,{value:{prefixCls:U}},W),f().createElement(b.Provider,{value:{prefixCls:ei,onSend:ev,onSendDisabled:!ec,onClear:()=>{el("")},onClearDisabled:!ec,onCancel:N,onCancelDisabled:!j,onSpeech:()=>ef(!1),onSpeechDisabled:!es,speechRecording:ed,disabled:H}},f().createElement("div",{className:`${U}-content`,onMouseDown:e=>{e.target!==J.current?.querySelector(`.${ee}`)&&e.preventDefault(),Q.current?.focus()}},B&&f().createElement("div",{className:c()(`${U}-prefix`,Z.classNames.prefix,g.prefix),style:{...Z.styles.prefix,...v.prefix}},B),f().createElement(eh,(0,o.A)({},ep,{disabled:H,style:{...Z.styles.input,...v.input},className:c()(ee,Z.classNames.input,g.input),autoSize:X,value:ec,onChange:e=>{el(e.target.value,e),ef(!0)},onPressEnter:e=>{let t="Enter"===e.key&&!em.current;switch(_){case"enter":t&&!e.shiftKey&&(e.preventDefault(),ev());break;case"shiftEnter":t&&e.shiftKey&&(e.preventDefault(),ev())}I&&I(e)},onCompositionStart:()=>{em.current=!0},onCompositionEnd:()=>{em.current=!1},onKeyDown:D,onPaste:e=>{let t=e.clipboardData?.files;t?.length&&F&&(F(t[0],t),e.preventDefault()),Y?.(e)},variant:"borderless",readOnly:C})),eg&&f().createElement("div",{className:c()(ea,Z.classNames.actions,g.actions),style:{...Z.styles.actions,...v.actions}},eg)),ey&&f().createElement("div",{className:c()(`${U}-footer`,Z.classNames.footer,g.footer),style:{...Z.styles.footer,...v.footer}},ey))))});M.Header=function(e){let{title:t,onOpenChange:n,open:r,children:o,className:a,style:u,classNames:l={},styles:f={},closable:d,forceRender:h}=e,{prefixCls:b}=s.useContext(m),w=`${b}-header`;return s.createElement(v.Ay,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:g,onEnterActive:y,onLeaveStart:y,onLeaveActive:g,visible:r,forceRender:h},({className:e,style:h})=>s.createElement("div",{className:c()(w,e,a),style:{...h,...u}},(!1!==d||t)&&s.createElement("div",{className:c()(`${w}-header`,l.header),style:{...f.header}},s.createElement("div",{className:`${w}-title`},t),!1!==d&&s.createElement("div",{className:`${w}-close`},s.createElement(i.Button,{type:"text",icon:s.createElement(p.CloseOutlined,null),size:"small",onClick:()=>{n?.(!r)}}))),o&&s.createElement("div",{className:c()(`${w}-content`,l.content),style:{...f.content}},o)))};var j=M},1911:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,o){for(var i,a,c=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))n.call(i,l)&&(c[l]=i[l]);if(t){a=t(i);for(var s=0;s<a.length;s++)r.call(i,a[s])&&(c[a[s]]=i[a[s]])}}return c}:Object.assign},8405:function(e,t,n){"use strict";var r=n(5126);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7465:function(e,t,n){e.exports=n(8405)()},5126:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6768:function(e,t,n){"use strict";n.d(t,{A:function(){return eh}});var r=n(2549),o=n(942),i=n(5739),a=n(1114),c=n(2256),u=n(9155),l=n.n(u),s=n(9514),f=n.n(s),d=n(3059),h=n.n(d),p=n(8578);function v(e){return e instanceof HTMLElement||e instanceof SVGElement?e:e instanceof l().Component?f().findDOMNode(e):null}n(3455);var m=n(1834),g=u.createContext(null),y=function(){if("u">typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}(),b="u">typeof window&&"u">typeof document&&window.document===document,w=void 0!==n.g&&n.g.Math===Math?n.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),E="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(w):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},A=["top","right","bottom","left","width","height","size","weight"],S="u">typeof MutationObserver,T=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){E(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){b&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),S?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){b&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;A.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),O=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},x=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||w},C=M(0,0,0,0);function _(e){return parseFloat(e)||0}function R(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+_(e["border-"+n+"-width"])},0)}var k="u">typeof SVGGraphicsElement?function(e){return e instanceof x(e).SVGGraphicsElement}:function(e){return e instanceof x(e).SVGElement&&"function"==typeof e.getBBox};function M(e,t,n,r){return{x:e,y:t,width:n,height:r}}var j=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=M(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!b)return C;if(k(e)){var t;return M(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return C;var o=x(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=_(i)}return t}(o),a=i.left+i.right,c=i.top+i.bottom,u=_(o.width),l=_(o.height);if("border-box"===o.boxSizing&&(Math.round(u+a)!==n&&(u-=R(o,"left","right")+a),Math.round(l+c)!==r&&(l-=R(o,"top","bottom")+c)),(t=e)!==x(t).document.documentElement){var s=Math.round(u+a)-n,f=Math.round(l+c)-r;1!==Math.abs(s)&&(u-=s),1!==Math.abs(f)&&(l-=f)}return M(i.left,i.top,u,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),L=function(e,t){var n,r,o,i,a,c=(n=t.x,r=t.y,o=t.width,i=t.height,O(a=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:o,height:i,top:r,right:n+o,bottom:i+r,left:n}),a);O(this,{target:e,contentRect:c})},N=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new y,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new j(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new L(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),P="u">typeof WeakMap?new WeakMap:new y,$=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new N(t,T.getInstance(),this);P.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){$.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}});var I=void 0!==w.ResizeObserver?w.ResizeObserver:$,D=new Map,H=new I(function(e){e.forEach(function(e){var t,n=e.target;null==(t=D.get(n))||t.forEach(function(e){return e(n)})})}),z=n(582),B=n(9520),q=n(126),W=n(6439),Y=function(e){(0,q.A)(n,e);var t=(0,W.A)(n);function n(){return(0,z.A)(this,n),t.apply(this,arguments)}return(0,B.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component),F=u.forwardRef(function(e,t){var n=e.children,r=e.disabled,a=u.useRef(null),c=u.useRef(null),l=u.useContext(g),s="function"==typeof n,f=s?n(a):n,d=u.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!s&&u.isValidElement(f)&&(0,m.f3)(f),p=h?f.ref:null,y=(0,m.xK)(p,a),b=function(){var e;return v(a.current)||(a.current&&"object"===(0,i.A)(a.current)?v(null==(e=a.current)?void 0:e.nativeElement):null)||v(c.current)};u.useImperativeHandle(t,function(){return b()});var w=u.useRef(e);w.current=e;var E=u.useCallback(function(e){var t=w.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,c=i.height,u=e.offsetWidth,s=e.offsetHeight,f=Math.floor(a),h=Math.floor(c);if(d.current.width!==f||d.current.height!==h||d.current.offsetWidth!==u||d.current.offsetHeight!==s){var p={width:f,height:h,offsetWidth:u,offsetHeight:s};d.current=p;var v=u===Math.round(a)?a:u,m=s===Math.round(c)?c:s,g=(0,o.A)((0,o.A)({},p),{},{offsetWidth:v,offsetHeight:m});null==l||l(g,e,r),n&&Promise.resolve().then(function(){n(g,e)})}},[]);return u.useEffect(function(){var e=b();return e&&!r&&(D.has(e)||(D.set(e,new Set),H.observe(e)),D.get(e).add(E)),function(){D.has(e)&&(D.get(e).delete(E),!D.get(e).size&&(H.unobserve(e),D.delete(e)))}},[a.current,r]),u.createElement(Y,{ref:c},h?u.cloneElement(f,{ref:y}):f)}),X=u.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return l().Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?r=r.concat(e(t)):(0,p.isFragment)(t)&&t.props?r=r.concat(e(t.props.children,n)):r.push(t))}),r}(n)).map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return u.createElement(F,(0,r.A)({},e,{key:i,ref:0===o?t:void 0}),n)})});X.Collection=function(e){var t=e.children,n=e.onBatchResize,r=u.useRef(0),o=u.useRef([]),i=u.useContext(g),a=u.useCallback(function(e,t,a){r.current+=1;var c=r.current;o.current.push({size:e,element:t,data:a}),Promise.resolve().then(function(){c===r.current&&(null==n||n(o.current),o.current=[])}),null==i||i(e,t,a)},[n,i]);return u.createElement(g.Provider,{value:a},t)};var V=u.forwardRef(function(e,t){var n,i=e.height,a=e.offsetY,l=e.offsetX,s=e.children,f=e.prefixCls,d=e.onInnerResize,p=e.innerProps,v=e.rtl,m=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==a&&(g={height:i,position:"relative",overflow:"hidden"},y=(0,o.A)((0,o.A)({},y),{},(n={transform:"translateY(".concat(a,"px)")},(0,c.A)(n,v?"marginRight":"marginLeft",-l),(0,c.A)(n,"position","absolute"),(0,c.A)(n,"left",0),(0,c.A)(n,"right",0),(0,c.A)(n,"top",0),n))),u.createElement("div",{style:g},u.createElement(X,{onResize:function(e){e.offsetHeight&&d&&d()}},u.createElement("div",(0,r.A)({style:y,className:h()((0,c.A)({},"".concat(f,"-holder-inner"),f)),ref:t},p),s,m)))});V.displayName="Filler";var K=function(e){return+setTimeout(e,16)},G=function(e){return clearTimeout(e)};"u">typeof window&&"requestAnimationFrame"in window&&(K=function(e){return window.requestAnimationFrame(e)},G=function(e){return window.cancelAnimationFrame(e)});var U=0,J=new Map,Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=U+=1;return!function t(r){if(0===r)J.delete(n),e();else{var o=K(function(){t(r-1)});J.set(n,o)}}(t),n};function Z(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}Q.cancel=function(e){var t=J.get(e);return J.delete(e),G(t)};var ee=u.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.rtl,l=e.scrollOffset,s=e.scrollRange,f=e.onStartMove,d=e.onStopMove,p=e.onScroll,v=e.horizontal,m=e.spinSize,g=e.containerSize,y=e.style,b=e.thumbStyle,w=u.useState(!1),E=(0,a.A)(w,2),A=E[0],S=E[1],T=u.useState(null),O=(0,a.A)(T,2),x=O[0],C=O[1],_=u.useState(null),R=(0,a.A)(_,2),k=R[0],M=R[1],j=!i,L=u.useRef(),N=u.useRef(),P=u.useState(!1),$=(0,a.A)(P,2),I=$[0],D=$[1],H=u.useRef(),z=function(){clearTimeout(H.current),D(!0),H.current=setTimeout(function(){D(!1)},3e3)},B=s-g||0,q=g-m||0,W=u.useMemo(function(){return 0===l||0===B?0:l/B*q},[l,B,q]),Y=u.useRef({top:W,dragging:A,pageY:x,startTop:k});Y.current={top:W,dragging:A,pageY:x,startTop:k};var F=function(e){S(!0),C(Z(e,v)),M(Y.current.top),f(),e.stopPropagation(),e.preventDefault()};u.useEffect(function(){var e=function(e){e.preventDefault()},t=L.current,n=N.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",F),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}},[]);var X=u.useRef();X.current=B;var V=u.useRef();V.current=q,u.useEffect(function(){if(A){var e,t=function(t){var n=Y.current,r=n.dragging,o=n.pageY,i=n.startTop;if(Q.cancel(e),r){var a=Z(t,v)-o,c=i;!j&&v?c-=a:c+=a;var u=X.current,l=V.current,s=Math.ceil((l?c/l:0)*u);s=Math.min(s=Math.max(s,0),u),e=Q(function(){p(s,v)})}},n=function(){S(!1),d()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Q.cancel(e)}}},[A]),u.useEffect(function(){z()},[l]),u.useImperativeHandle(t,function(){return{delayHidden:z}});var K="".concat(r,"-scrollbar"),G={position:"absolute",visibility:I&&B>0?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(G.height=8,G.left=0,G.right=0,G.bottom=0,U.height="100%",U.width=m,j?U.left=W:U.right=W):(G.width=8,G.top=0,G.bottom=0,j?G.right=0:G.left=0,U.width="100%",U.height=m,U.top=W),u.createElement("div",{ref:L,className:h()(K,(n={},(0,c.A)(n,"".concat(K,"-horizontal"),v),(0,c.A)(n,"".concat(K,"-vertical"),!v),(0,c.A)(n,"".concat(K,"-visible"),I),n)),style:(0,o.A)((0,o.A)({},G),y),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:z},u.createElement("div",{ref:N,className:h()("".concat(K,"-thumb"),(0,c.A)({},"".concat(K,"-thumb-moving"),A)),style:(0,o.A)((0,o.A)({},U),b),onMouseDown:F}))});function et(e){var t=e.children,n=e.setRef,r=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:r})}var en=function(){function e(){(0,z.A)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,B.A)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),er=n(4148),eo=n(2761),ei=("u"<typeof navigator?"undefined":(0,i.A)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ea=function(e,t){var n=(0,u.useRef)(!1),r=(0,u.useRef)(null),o=(0,u.useRef)({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e<0&&o.current.top||e>0&&o.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):(!i||n.current)&&(clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)),!n.current&&i}},ec=14/15;function eu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var el=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],es=[],ef={overflowY:"auto",overflowAnchor:"none"},ed=u.forwardRef(function(e,t){var n,l,f,d,p,m,g,y,b,w,E,A,S,T,O,x,C,_,R,k,M,j,L,N,P,$,I,D,H,z,B,q,W,Y,F,K=e.prefixCls,G=void 0===K?"rc-virtual-list":K,U=e.className,J=e.height,Z=e.itemHeight,ed=e.fullHeight,eh=e.style,ep=e.data,ev=e.children,em=e.itemKey,eg=e.virtual,ey=e.direction,eb=e.scrollWidth,ew=e.component,eE=e.onScroll,eA=e.onVirtualScroll,eS=e.onVisibleChange,eT=e.innerProps,eO=e.extraRender,ex=e.styles,eC=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||({}).propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,el),e_=!!(!1!==eg&&J&&Z),eR=e_&&ep&&(Z*ep.length>J||!!eb),ek="rtl"===ey,eM=h()(G,(0,c.A)({},"".concat(G,"-rtl"),ek),U),ej=ep||es,eL=(0,u.useRef)(),eN=(0,u.useRef)(),eP=(0,u.useState)(0),e$=(0,a.A)(eP,2),eI=e$[0],eD=e$[1],eH=(0,u.useState)(0),ez=(0,a.A)(eH,2),eB=ez[0],eq=ez[1],eW=(0,u.useState)(!1),eY=(0,a.A)(eW,2),eF=eY[0],eX=eY[1],eV=function(){eX(!0)},eK=function(){eX(!1)},eG=u.useCallback(function(e){return"function"==typeof em?em(e):null==e?void 0:e[em]},[em]);function eU(e){eD(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(ts.current)||(n=Math.min(n,ts.current)),n=Math.max(n,0));return eL.current.scrollTop=r,r})}var eJ=(0,u.useRef)({start:0,end:ej.length}),eQ=(0,u.useRef)(),eZ=(n=u.useState(ej),f=(l=(0,a.A)(n,2))[0],d=l[1],p=u.useState(null),g=(m=(0,a.A)(p,2))[0],y=m[1],u.useEffect(function(){var e=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):c}for(var l=null,s=1!==Math.abs(i-a),f=0;f<o.length;f+=1){var d=u(r[f]);if(d!==u(o[f])){l=f,s=s||d!==u(o[f+1]);break}}return null===l?null:{index:l,multiple:s}}(f||[],ej||[],eG);(null==e?void 0:e.index)!==void 0&&y(ej[e.index]),d(ej)},[ej]),[g]);eQ.current=(0,a.A)(eZ,1)[0];var e0=function(e,t,n){var r=u.useState(0),o=(0,a.A)(r,2),i=o[0],c=o[1],l=(0,u.useRef)(new Map),s=(0,u.useRef)(new en),f=(0,u.useRef)();function d(){Q.cancel(f.current)}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){l.current.forEach(function(e,t){if(e&&e.offsetParent){var n=v(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}}),c(function(e){return e+1})};e?t():f.current=Q(t)}return(0,u.useEffect)(function(){return d},[]),[function(r,o){var i=e(r),a=l.current.get(i);o?(l.current.set(i,o),h()):l.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},h,s.current,i]}(eG,null,null),e1=(0,a.A)(e0,4),e5=e1[0],e2=e1[1],e9=e1[2],e6=e1[3],e3=u.useMemo(function(){if(!e_)return{scrollHeight:void 0,start:0,end:ej.length-1,offset:void 0};if(!eR)return{scrollHeight:(null==(e=eN.current)?void 0:e.offsetHeight)||0,start:0,end:ej.length-1,offset:void 0};for(var e,t,n,r,o=0,i=ej.length,a=0;a<i;a+=1){var c=eG(ej[a]),u=e9.get(c),l=o+(void 0===u?Z:u);l>=eI&&void 0===t&&(t=a,n=o),l>eI+J&&void 0===r&&(r=a),o=l}return void 0===t&&(t=0,n=0,r=Math.ceil(J/Z)),void 0===r&&(r=ej.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,ej.length-1),offset:n}},[eR,e_,eI,ej,e6,J]),e4=e3.scrollHeight,e7=e3.start,e8=e3.end,te=e3.offset;eJ.current.start=e7,eJ.current.end=e8;var tt=u.useState({width:0,height:J}),tn=(0,a.A)(tt,2),tr=tn[0],to=tn[1],ti=(0,u.useRef)(),ta=(0,u.useRef)(),tc=u.useMemo(function(){return eu(tr.width,eb)},[tr.width,eb]),tu=u.useMemo(function(){return eu(tr.height,e4)},[tr.height,e4]),tl=e4-J,ts=(0,u.useRef)(tl);ts.current=tl;var tf=eI<=0,td=eI>=tl,th=ea(tf,td),tp=function(){return{x:ek?-eB:eB,y:eI}},tv=(0,u.useRef)(tp()),tm=(0,eo._q)(function(){if(eA){var e=tp();(tv.current.x!==e.x||tv.current.y!==e.y)&&(eA(e),tv.current=e)}});function tg(e,t){t?((0,s.flushSync)(function(){eq(e)}),tm()):eU(e)}var ty=function(e){var t=e,n=eb-tr.width;return Math.min(t=Math.max(t,0),n)},tb=(0,eo._q)(function(e,t){t?((0,s.flushSync)(function(){eq(function(t){return ty(t+(ek?-e:e))})}),tm()):eU(function(t){return t+e})}),tw=(b=!!eb,w=(0,u.useRef)(0),E=(0,u.useRef)(null),A=(0,u.useRef)(null),S=(0,u.useRef)(!1),T=ea(tf,td),O=(0,u.useRef)(null),x=(0,u.useRef)(null),[function(e){if(e_){Q.cancel(x.current),x.current=Q(function(){O.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,i=n,a=r;("sx"===O.current||!O.current&&o&&r&&!n)&&(i=r,a=0,O.current="sx");var c=Math.abs(i),u=Math.abs(a);(null===O.current&&(O.current=b&&c>u?"x":"y"),"y"===O.current)?(t=a,Q.cancel(E.current),w.current+=t,A.current=t,T(t)||(ei||e.preventDefault(),E.current=Q(function(){var e=S.current?10:1;tb(w.current*e),w.current=0}))):(tb(i,!0),ei||e.preventDefault())}},function(e){e_&&(S.current=e.detail===A.current)}]),tE=(0,a.A)(tw,2),tA=tE[0],tS=tE[1];C=function(e,t){return!th(e,t)&&(tA({preventDefault:function(){},deltaY:e}),!0)},R=(0,u.useRef)(!1),k=(0,u.useRef)(0),M=(0,u.useRef)(null),j=(0,u.useRef)(null),L=function(e){if(R.current){var t=Math.ceil(e.touches[0].pageY),n=k.current-t;k.current=t,C(n)&&e.preventDefault(),clearInterval(j.current),j.current=setInterval(function(){(!C(n*=ec,!0)||.1>=Math.abs(n))&&clearInterval(j.current)},16)}},N=function(){R.current=!1,_()},P=function(e){_(),1!==e.touches.length||R.current||(R.current=!0,k.current=Math.ceil(e.touches[0].pageY),M.current=e.target,M.current.addEventListener("touchmove",L),M.current.addEventListener("touchend",N))},_=function(){M.current&&(M.current.removeEventListener("touchmove",L),M.current.removeEventListener("touchend",N))},(0,er.A)(function(){return e_&&eL.current.addEventListener("touchstart",P),function(){var e;null==(e=eL.current)||e.removeEventListener("touchstart",P),_(),clearInterval(j.current)}},[e_]),(0,er.A)(function(){function e(e){e_&&e.preventDefault()}var t=eL.current;return t.addEventListener("wheel",tA),t.addEventListener("DOMMouseScroll",tS),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tA),t.removeEventListener("DOMMouseScroll",tS),t.removeEventListener("MozMousePixelScroll",e)}},[e_]),(0,er.A)(function(){eb&&eq(function(e){return ty(e)})},[tr.width,eb]);var tT=function(){var e,t;null==(e=ti.current)||e.delayHidden(),null==(t=ta.current)||t.delayHidden()},tO=($=function(){return e2(!0)},I=u.useRef(),D=u.useState(null),z=(H=(0,a.A)(D,2))[0],B=H[1],(0,er.A)(function(){if(z&&z.times<10){if(!eL.current)return void B(function(e){return(0,o.A)({},e)});$();var e=z.targetAlign,t=z.originAlign,n=z.index,r=z.offset,i=eL.current.clientHeight,a=!1,c=e,u=null;if(i){for(var l=e||t,s=0,f=0,d=0,h=Math.min(ej.length-1,n),p=0;p<=h;p+=1){var v=eG(ej[p]);f=s;var m=e9.get(v);s=d=f+(void 0===m?Z:m)}for(var g="top"===l?r:i-r,y=h;y>=0;y-=1){var b=eG(ej[y]),w=e9.get(b);if(void 0===w){a=!0;break}if((g-=w)<=0)break}switch(l){case"top":u=f-r;break;case"bottom":u=d-i+r;break;default:var E=eL.current.scrollTop;f<E?c="top":d>E+i&&(c="bottom")}null!==u&&eU(u),u!==z.lastTop&&(a=!0)}a&&B((0,o.A)((0,o.A)({},z),{},{times:z.times+1,targetAlign:c,lastTop:u}))}},[z,eL.current]),function(e){if(null==e)return void tT();if(Q.cancel(I.current),"number"==typeof e)eU(e);else if(e&&"object"===(0,i.A)(e)){var t,n=e.align;t="index"in e?e.index:ej.findIndex(function(t){return eG(t)===e.key});var r=e.offset;B({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});u.useImperativeHandle(t,function(){return{getScrollInfo:tp,scrollTo:function(e){e&&"object"===(0,i.A)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eq(ty(e.left)),tO(e.top)):tO(e)}}}),(0,er.A)(function(){eS&&eS(ej.slice(e7,e8+1),ej)},[e7,e8,ej]);var tx=(q=u.useMemo(function(){return[new Map,[]]},[ej,e9.id,Z]),Y=(W=(0,a.A)(q,2))[0],F=W[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Y.get(e),r=Y.get(t);if(void 0===n||void 0===r)for(var o=ej.length,i=F.length;i<o;i+=1){var a,c=eG(ej[i]);Y.set(c,i);var u=null!=(a=e9.get(c))?a:Z;if(F[i]=(F[i-1]||0)+u,c===e&&(n=i),c===t&&(r=i),void 0!==n&&void 0!==r)break}return{top:F[n-1]||0,bottom:F[r]}}),tC=null==eO?void 0:eO({start:e7,end:e8,virtual:eR,offsetX:eB,offsetY:te,rtl:ek,getSize:tx}),t_=ej.slice(e7,e8+1).map(function(e,t){var n=ev(e,e7+t,{style:{width:eb}}),r=eG(e);return u.createElement(et,{key:r,setRef:function(t){return e5(e,t)}},n)}),tR=null;J&&(tR=(0,o.A)((0,c.A)({},void 0===ed||ed?"height":"maxHeight",J),ef),e_&&(tR.overflowY="hidden",eb&&(tR.overflowX="hidden"),eF&&(tR.pointerEvents="none")));var tk={};return ek&&(tk.dir="rtl"),u.createElement("div",(0,r.A)({style:(0,o.A)((0,o.A)({},eh),{},{position:"relative"}),className:eM},tk,eC),u.createElement(X,{onResize:function(e){to({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},u.createElement(void 0===ew?"div":ew,{className:"".concat(G,"-holder"),style:tR,ref:eL,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eI&&eU(t),null==eE||eE(e),tm()},onMouseEnter:tT},u.createElement(V,{prefixCls:G,height:e4,offsetX:eB,offsetY:te,scrollWidth:eb,onInnerResize:e2,ref:eN,innerProps:eT,rtl:ek,extra:tC},t_))),eR&&e4>J&&u.createElement(ee,{ref:ti,prefixCls:G,scrollOffset:eI,scrollRange:e4,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tu,containerSize:tr.height,style:null==ex?void 0:ex.verticalScrollBar,thumbStyle:null==ex?void 0:ex.verticalScrollBarThumb}),eR&&eb&&u.createElement(ee,{ref:ta,prefixCls:G,scrollOffset:eB,scrollRange:eb,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tc,containerSize:tr.width,horizontal:!0,style:null==ex?void 0:ex.horizontalScrollBar,thumbStyle:null==ex?void 0:ex.horizontalScrollBarThumb}))});ed.displayName="List";var eh=ed},5098:function(e){var t="u">typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var c,u,l,s;if(i.constructor!==a.constructor)return!1;if(Array.isArray(i)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(!e(i[u],a[u]))return!1;return!0}if(n&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;for(s=i.entries();!(u=s.next()).done;)if(!e(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(i[u]!==a[u])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof a.valueOf)return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof a.toString)return i.toString()===a.toString();if((c=(l=Object.keys(i)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,l[u]))return!1;if(t&&i instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!i.$$typeof)&&!e(i[l[u]],a[l[u]]))return!1;return!0}return i!=i&&a!=a}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},5195:function(e,t,n){"use strict";n.d(t,{m:function(){return eo}});var r,o,i,a,c=n(7465),u=n.n(c),l=n(3813),s=n.n(l),f=n(5098),d=n.n(f),h=n(9155),p=n.n(h),v=n(1911),m=n.n(v),g="bodyAttributes",y="htmlAttributes",b={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(b).map(function(e){return b[e]});var w="cssText",E="href",A="innerHTML",S="itemprop",T={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O=Object.keys(T).reduce(function(e,t){return e[T[t]]=t,e},{}),x=[b.NOSCRIPT,b.SCRIPT,b.STYLE],C="data-react-helmet",_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},L=function(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},N=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},P=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},$=function(e){var t=H(e,b.TITLE),n=H(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=H(e,"defaultTitle");return t||r||void 0},I=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return M({},e,t)},{})},D=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&Y("Helmet: "+e+' should be of type "Array". Instead found type "'+_(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var o={};n.filter(function(e){for(var n=void 0,i=Object.keys(e),a=0;a<i.length;a++){var c=i[a],u=c.toLowerCase();-1!==t.indexOf(u)&&("rel"!==n||"canonical"!==e[n].toLowerCase())&&("rel"!==u||"stylesheet"!==e[u].toLowerCase())&&(n=u),-1!==t.indexOf(c)&&(c===A||c===w||c===S)&&(n=c)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][l]&&(o[n][l]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var i=Object.keys(o),a=0;a<i.length;a++){var c=i[a],u=m()({},r[c],o[c]);r[c]=u}return e},[]).reverse()},H=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},z=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout(function(){z(e)},0)}),B=function(e){return clearTimeout(e)},q="u">typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||z:n.g.requestAnimationFrame||z,W="u">typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||B:n.g.cancelAnimationFrame||B,Y=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},F=null,X=function(e,t){var n=e.baseTag,r=e.bodyAttributes,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,s=e.styleTags,f=e.title,d=e.titleAttributes;G(b.BODY,r),G(b.HTML,o),K(f,d);var h={baseTag:U(b.BASE,n),linkTags:U(b.LINK,i),metaTags:U(b.META,a),noscriptTags:U(b.NOSCRIPT,c),scriptTags:U(b.SCRIPT,l),styleTags:U(b.STYLE,s)},p={},v={};Object.keys(h).forEach(function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(v[e]=h[e].oldTags)}),t&&t(),u(e,p,v)},V=function(e){return Array.isArray(e)?e.join(""):e},K=function(e,t){void 0!==e&&document.title!==e&&(document.title=V(e)),G(b.TITLE,t)},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(C),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(t),c=0;c<a.length;c++){var u=a[c],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===o.indexOf(u)&&o.push(u);var s=i.indexOf(u);-1!==s&&i.splice(s,1)}for(var f=i.length-1;f>=0;f--)n.removeAttribute(i[f]);o.length===i.length?n.removeAttribute(C):n.getAttribute(C)!==a.join(",")&&n.setAttribute(C,a.join(","))}},U=function(e,t){var n=document.head||document.querySelector(b.HEAD),r=n.querySelectorAll(e+"["+C+"]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===A)n.innerHTML=t.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute(C,"true"),o.some(function(e,t){return a=t,n.isEqualNode(e)})?o.splice(a,1):i.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:i}},J=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Q=function(e,t,n,r){var o=J(n),i=V(t);return o?"<"+e+" "+C+'="true" '+o+">"+P(i,r)+"</"+e+">":"<"+e+" "+C+'="true">'+P(i,r)+"</"+e+">"},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[T[n]||n]=e[n],t},t)},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[O[n]||n]=e[n],t},t)},et=function(e,t,n){var r,o=Z(n,((r={key:t})[C]=!0,r));return[p().createElement(b.TITLE,o,t)]},en=function(e,t,n){switch(e){case b.TITLE:return{toComponent:function(){return et(e,t.title,t.titleAttributes,n)},toString:function(){return Q(e,t.title,t.titleAttributes,n)}};case g:case y:return{toComponent:function(){return Z(t)},toString:function(){return J(t)}};default:return{toComponent:function(){return t.map(function(t,n){var r,o=((r={key:n})[C]=!0,r);return Object.keys(t).forEach(function(e){var n=T[e]||e;n===A||n===w?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),p().createElement(e,o)})},toString:function(){return t.reduce(function(t,r){var o=Object.keys(r).filter(function(e){return e!==A&&e!==w}).reduce(function(e,t){var o=void 0===r[t]?t:t+'="'+P(r[t],n)+'"';return e?e+" "+o:o},""),i=r.innerHTML||r.cssText||"",a=-1===x.indexOf(e);return t+"<"+e+" "+C+'="true" '+o+(a?"/>":">"+i+"</"+e+">")},"")}}}},er=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.scriptTags,l=e.styleTags,s=e.title,f=e.titleAttributes;return{base:en(b.BASE,t,r),bodyAttributes:en(g,n,r),htmlAttributes:en(y,o,r),link:en(b.LINK,i,r),meta:en(b.META,a,r),noscript:en(b.NOSCRIPT,c,r),script:en(b.SCRIPT,u,r),style:en(b.STYLE,l,r),title:en(b.TITLE,{title:void 0===s?"":s,titleAttributes:f},r)}},eo=(o=s()(function(e){var t;return{baseTag:(t=[E,"target"],e.filter(function(e){return void 0!==e[b.BASE]}).map(function(e){return e[b.BASE]}).reverse().reduce(function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o].toLowerCase();if(-1!==t.indexOf(i)&&n[i])return e.concat(n)}return e},[])),bodyAttributes:I(g,e),defer:H(e,"defer"),encode:H(e,"encodeSpecialCharacters"),htmlAttributes:I(y,e),linkTags:D(b.LINK,["rel",E],e),metaTags:D(b.META,["name","charset","http-equiv","property",S],e),noscriptTags:D(b.NOSCRIPT,[A],e),onChangeClientState:H(e,"onChangeClientState")||function(){},scriptTags:D(b.SCRIPT,["src",A],e),styleTags:D(b.STYLE,[w],e),title:$(e),titleAttributes:I("titleAttributes",e)}},function(e){F&&W(F),e.defer?F=q(function(){X(e,function(){F=null})}):(X(e),F=null)},er)(function(){return null}),a=i=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case b.SCRIPT:case b.NOSCRIPT:return{innerHTML:t};case b.STYLE:return{cssText:t}}throw Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,o=e.newChildProps,i=e.nestedChildren;return M({},r,((t={})[n.type]=[].concat(r[n.type]||[],[M({},o,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,i=e.newChildProps,a=e.nestedChildren;switch(r.type){case b.TITLE:return M({},o,((t={})[r.type]=a,t.titleAttributes=M({},i),t));case b.BODY:return M({},o,{bodyAttributes:M({},i)});case b.HTML:return M({},o,{htmlAttributes:M({},i)})}return M({},o,((n={})[r.type]=M({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=M({},t);return Object.keys(e).forEach(function(t){var r;n=M({},n,((r={})[t]=e[t],r))}),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return p().Children.forEach(e,function(e){if(e&&e.props){var o=e.props,i=o.children,a=ee(L(o,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case b.LINK:case b.META:case b.NOSCRIPT:case b.SCRIPT:case b.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:i})}}}),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=M({},L(e,["children"]));return t&&(n=this.mapChildrenToProps(t,n)),p().createElement(o,n)},k(t,null,[{key:"canUseDOM",set:function(e){o.canUseDOM=e}}]),t}(p().Component),i.propTypes={base:u().object,bodyAttributes:u().object,children:u().oneOfType([u().arrayOf(u().node),u().node]),defaultTitle:u().string,defer:u().bool,encodeSpecialCharacters:u().bool,htmlAttributes:u().object,link:u().arrayOf(u().object),meta:u().arrayOf(u().object),noscript:u().arrayOf(u().object),onChangeClientState:u().func,script:u().arrayOf(u().object),style:u().arrayOf(u().object),title:u().string,titleAttributes:u().object,titleTemplate:u().string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var e=o.rewind();return e||(e=er({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);eo.renderStatic=eo.rewind},3813:function(e,t,n){"use strict";var r=n(9155),o=r&&"object"==typeof r&&"default"in r?r.default:r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=!!("u">typeof window&&window.document&&window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw Error("Expected mapStateOnServer to either be undefined or a function.");return function(c){if("function"!=typeof c)throw Error("Expected WrappedComponent to be a React component.");var u,l=[];function s(){u=e(l.map(function(e){return e.props})),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t.peek=function(){return u},t.rewind=function(){if(t.canUseDOM)throw Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var n=t.prototype;return n.UNSAFE_componentWillMount=function(){l.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),s()},n.render=function(){return o.createElement(c,this.props)},t}(r.PureComponent);return i(f,"displayName","SideEffect("+(c.displayName||c.name||"Component")+")"),i(f,"canUseDOM",a),f}}}}]);
10
+ (self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["406"],{2341:function(e,t,n){"use strict";n.d(t,{A:function(){return A}});var r=n(1426),o=n(3059),i=n.n(o),a=n(9155),c=n.n(a),u=n(2059);let l=c().createContext(null);var s=({children:e})=>{let{prefixCls:t}=c().useContext(l);return c().createElement("div",{className:i()(`${t}-group-title`)},e&&c().createElement(u.Typography.Text,null,e))},f=n(7375),d=n(7782);let h=e=>{e.stopPropagation()};var p=e=>{let t,{prefixCls:n,info:o,className:l,direction:s,onClick:p,active:v,menu:m,...g}=e,y=(0,d.A)(g,{aria:!0,data:!0,attr:!0}),{disabled:b}=o,[w,E]=c().useState(!1),[A,S]=c().useState(!1),T=i()(l,`${n}-item`,{[`${n}-item-active`]:v&&!b},{[`${n}-item-disabled`]:b}),[O,x]=(0,a.useMemo)(()=>{let{trigger:e,...t}=m||{};return[e,t]},[m]);return c().createElement(u.Tooltip,{title:o.label,open:w&&A,onOpenChange:S,placement:"rtl"===s?"left":"right"},c().createElement("li",(0,r.A)({},y,{className:T,onClick:()=>{!b&&p&&p(o)}}),o.icon&&c().createElement("div",{className:`${n}-icon`},o.icon),c().createElement(u.Typography.Text,{className:`${n}-label`,ellipsis:{onEllipsis:E}},o.label),!b&&m&&c().createElement(u.Dropdown,{menu:x,placement:"rtl"===s?"bottomLeft":"bottomRight",trigger:["click"],disabled:b,onOpenChange:e=>{e&&S(!e)}},(t=c().createElement(f.EllipsisOutlined,{onClick:h,className:`${n}-menu-icon`}),O?"function"==typeof O?O(o,{originNode:t}):O:t))))},v=n(4921),m=n(5327),g=n(7790);let y="__ungrouped";var b=n(2019),w=n(9980),E=(0,n(7030).OF)("Conversations",e=>(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${(0,b.zA)(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${(0,b.zA)(e.paddingXS)}`}}}})((0,w.oX)(e,{})),()=>({})),A=e=>{let{prefixCls:t,rootClassName:n,items:o,activeKey:a,defaultActiveKey:u,onActiveChange:f,menu:h,styles:b={},classNames:w={},groupable:A,className:S,style:T,...O}=e,x=(0,d.A)(O,{attr:!0,aria:!0,data:!0}),[C,_]=(0,v.A)(u,{value:a}),[R,k]=((e,t=[])=>{let[n,r,o]=c().useMemo(()=>{if(!e)return[!1,void 0,void 0];let t={sort:void 0,title:void 0};return"object"==typeof e&&(t={...t,...e}),[!0,t.sort,t.title]},[e]);return c().useMemo(()=>{if(!n)return[[{name:y,data:t,title:void 0}],n];let e=t.reduce((e,t)=>{let n=t.group||y;return e[n]||(e[n]=[]),e[n].push(t),e},{});return[(r?Object.keys(e).sort(r):Object.keys(e)).map(t=>({name:t===y?void 0:t,title:o,data:e[t]})),n]},[t,e])})(A,o),{getPrefixCls:M,direction:j}=(0,g.A)(),L=M("conversations",t),N=(0,m.A)("conversations"),[P,$,I]=E(L),D=i()(L,N.className,S,n,$,I,{[`${L}-rtl`]:"rtl"===j}),H=e=>{_(e.key),f&&f(e.key)};return P(c().createElement("ul",(0,r.A)({},x,{style:{...N.style,...T},className:D}),R.map((e,t)=>{let n=e.data.map((e,t)=>c().createElement(p,{key:e.key||`key-${t}`,info:e,prefixCls:L,direction:j,className:i()(w.item,N.classNames.item),style:{...N.styles.item,...b.item},menu:"function"==typeof h?h(e):h,active:C===e.key,onClick:H}));return k?c().createElement("li",{key:e.name||`key-${t}`},c().createElement(l.Provider,{value:{prefixCls:L}},e.title?.(e.name,{components:{GroupTitle:s}})||c().createElement(s,{key:e.name},e.name)),c().createElement("ul",{className:`${L}-list`},n)):n})))}},606:function(e,t,n){"use strict";let r;n.d(t,{A:function(){return j}});var o=n(1426),i=n(2059),a=n(3059),c=n.n(a),u=n(8993),l=n(7782),s=n(9155),f=n.n(s),d=n(5327),h=n(7790),p=n(7375),v=n(2094);let m=s.createContext({}),g=()=>({height:0}),y=e=>({height:e.scrollHeight}),b=s.createContext(null);var w=s.forwardRef(function(e,t){let{className:n,action:r,onClick:a,...u}=e,l=s.useContext(b),{prefixCls:f,disabled:d}=l,h=l[r],p=d??u.disabled??l[`${r}Disabled`];return s.createElement(i.Button,(0,o.A)({type:"text"},u,{ref:t,onClick:e=>{!p&&(h&&h(),a&&a(e))},className:c()(f,n,{[`${f}-disabled`]:p})}))}),E=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ClearOutlined,null)},e,{action:"onClear",ref:t}))});let A=(0,s.memo)(e=>{let{className:t}=e;return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},f().createElement("title",null,"Stop Loading"),f().createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},f().createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))});var S=s.forwardRef(function(e,t){let{prefixCls:n}=s.useContext(b),{className:r}=e;return s.createElement(w,(0,o.A)({icon:null,color:"primary",variant:"text",shape:"circle"},e,{className:c()(r,`${n}-loading-button`),action:"onCancel",ref:t}),s.createElement(A,{className:`${n}-loading-icon`}))}),T=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ArrowUpOutlined,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))});function O({className:e}){return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:e},f().createElement("title",null,"Speech Recording"),Array.from({length:4}).map((e,t)=>f().createElement("rect",{fill:"currentColor",rx:70,ry:70,height:250,width:140,x:286.66666666666663*t,y:375,key:t},f().createElement("animate",{attributeName:"height",values:"250; 500; 250",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}),f().createElement("animate",{attributeName:"y",values:"375; 250; 375",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}))))}var x=s.forwardRef(function(e,t){let{speechRecording:n,onSpeechDisabled:r,prefixCls:i}=s.useContext(b),a=null;return a=n?s.createElement(O,{className:`${i}-recording-icon`}):r?s.createElement(p.AudioMutedOutlined,null):s.createElement(p.AudioOutlined,null),s.createElement(w,(0,o.A)({icon:a,color:"primary",variant:"text"},e,{action:"onSpeech",ref:t}))}),C=n(2019),_=n(9980),R=(0,n(7030).OF)("Sender",e=>{let{paddingXS:t,calc:n}=e,r=(0,_.oX)(e,{SenderContentMaxWidth:`calc(100% - ${(0,C.zA)(n(t).add(32).equal())})`});return[(e=>{let{componentCls:t,padding:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,lineWidthBold:c,calc:u}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:u(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:c}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${t}-footer`]:{paddingInlineStart:n,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}})(r),(e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(t=>`${t} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}})(r)]},()=>({}));!r&&"u">typeof window&&(r=window.SpeechRecognition||window.webkitSpeechRecognition);let k={SendButton:T,ClearButton:E,LoadingButton:S,SpeechButton:x},M=f().forwardRef((e,t)=>{var n,a;let{prefixCls:p,styles:v={},classNames:g={},className:y,rootClassName:w,style:E,defaultValue:A,value:O,readOnly:C,submitType:_="enter",onSubmit:M,loading:j,components:L,onCancel:N,onChange:P,actions:$,onKeyPress:I,onKeyDown:D,disabled:H,allowSpeech:z,prefix:B,footer:q,header:W,onPaste:Y,onPasteFile:F,autoSize:X={maxRows:8},...V}=e,{direction:K,getPrefixCls:G}=(0,h.A)(),U=G("sender",p),J=f().useRef(null),Q=f().useRef(null);(0,s.useImperativeHandle)(t,()=>{let e=(()=>({nativeElement:J.current,focus:Q.current?.focus,blur:Q.current?.blur}))(),{nativeElement:t}=e;return new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)})});let Z=(0,d.A)("sender"),ee=`${U}-input`,[et,en,er]=R(U),eo=c()(U,Z.className,y,w,en,er,{[`${U}-rtl`]:"rtl"===K,[`${U}-disabled`]:H}),ei=`${U}-actions-btn`,ea=`${U}-actions-list`,[ec,eu]=(0,u.vz)(A||"",{value:O}),el=(e,t)=>{eu(e),P&&P(e,t)},[es,ef,ed]=function(e,t){let n=(0,u._q)(e),[o,i,a]=f().useMemo(()=>"object"==typeof t?[t.recording,t.onRecordingChange,"boolean"==typeof t.recording]:[void 0,void 0,!1],[t]),[c,l]=f().useState(null);f().useEffect(()=>{if("u">typeof navigator&&"permissions"in navigator){let e=null;return navigator.permissions.query({name:"microphone"}).then(t=>{l(t.state),t.onchange=function(){l(this.state)},e=t}),()=>{e&&(e.onchange=null)}}},[]);let s=r&&"denied"!==c,d=f().useRef(null),[h,p]=(0,u.vz)(!1,{value:o}),v=f().useRef(!1),m=(0,u._q)(e=>{if(!e||h)if(v.current=e,a)i?.(!h);else{if(s&&!d.current){let e=new r;e.onstart=()=>{p(!0)},e.onend=()=>{p(!1)},e.onresult=e=>{v.current||n(e.results?.[0]?.[0]?.transcript),v.current=!1},d.current=e}d.current&&(h?(d.current.stop(),i?.(!1)):(d.current.start(),i?.(!0)))}});return[s,m,h]}(e=>{el(`${ec} ${e}`)},z),eh=(n=["input"],a=i.Input.TextArea,function(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}(L,n)||a),ep={...(0,l.A)(V,{attr:!0,aria:!0,data:!0}),ref:Q},ev=()=>{ec&&M&&!j&&M(ec)},em=f().useRef(!1),eg=f().createElement(i.Flex,{className:`${ea}-presets`},z&&f().createElement(x,null),j?f().createElement(S,null):f().createElement(T,null));"function"==typeof $?eg=$(eg,{components:k}):($||!1===$)&&(eg=$);let ey=null;return"function"==typeof q?ey=q({components:k}):q&&(ey=q),et(f().createElement("div",{ref:J,className:eo,style:{...Z.style,...E}},W&&f().createElement(m.Provider,{value:{prefixCls:U}},W),f().createElement(b.Provider,{value:{prefixCls:ei,onSend:ev,onSendDisabled:!ec,onClear:()=>{el("")},onClearDisabled:!ec,onCancel:N,onCancelDisabled:!j,onSpeech:()=>ef(!1),onSpeechDisabled:!es,speechRecording:ed,disabled:H}},f().createElement("div",{className:`${U}-content`,onMouseDown:e=>{e.target!==J.current?.querySelector(`.${ee}`)&&e.preventDefault(),Q.current?.focus()}},B&&f().createElement("div",{className:c()(`${U}-prefix`,Z.classNames.prefix,g.prefix),style:{...Z.styles.prefix,...v.prefix}},B),f().createElement(eh,(0,o.A)({},ep,{disabled:H,style:{...Z.styles.input,...v.input},className:c()(ee,Z.classNames.input,g.input),autoSize:X,value:ec,onChange:e=>{el(e.target.value,e),ef(!0)},onPressEnter:e=>{let t="Enter"===e.key&&!em.current;switch(_){case"enter":t&&!e.shiftKey&&(e.preventDefault(),ev());break;case"shiftEnter":t&&e.shiftKey&&(e.preventDefault(),ev())}I&&I(e)},onCompositionStart:()=>{em.current=!0},onCompositionEnd:()=>{em.current=!1},onKeyDown:D,onPaste:e=>{let t=e.clipboardData?.files;t?.length&&F&&(F(t[0],t),e.preventDefault()),Y?.(e)},variant:"borderless",readOnly:C})),eg&&f().createElement("div",{className:c()(ea,Z.classNames.actions,g.actions),style:{...Z.styles.actions,...v.actions}},eg)),ey&&f().createElement("div",{className:c()(`${U}-footer`,Z.classNames.footer,g.footer),style:{...Z.styles.footer,...v.footer}},ey))))});M.Header=function(e){let{title:t,onOpenChange:n,open:r,children:o,className:a,style:u,classNames:l={},styles:f={},closable:d,forceRender:h}=e,{prefixCls:b}=s.useContext(m),w=`${b}-header`;return s.createElement(v.Ay,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:g,onEnterActive:y,onLeaveStart:y,onLeaveActive:g,visible:r,forceRender:h},({className:e,style:h})=>s.createElement("div",{className:c()(w,e,a),style:{...h,...u}},(!1!==d||t)&&s.createElement("div",{className:c()(`${w}-header`,l.header),style:{...f.header}},s.createElement("div",{className:`${w}-title`},t),!1!==d&&s.createElement("div",{className:`${w}-close`},s.createElement(i.Button,{type:"text",icon:s.createElement(p.CloseOutlined,null),size:"small",onClick:()=>{n?.(!r)}}))),o&&s.createElement("div",{className:c()(`${w}-content`,l.content),style:{...f.content}},o)))};var j=M},1911:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,o){for(var i,a,c=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))n.call(i,l)&&(c[l]=i[l]);if(t){a=t(i);for(var s=0;s<a.length;s++)r.call(i,a[s])&&(c[a[s]]=i[a[s]])}}return c}:Object.assign},8405:function(e,t,n){"use strict";var r=n(5126);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7465:function(e,t,n){e.exports=n(8405)()},5126:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6768:function(e,t,n){"use strict";n.d(t,{A:function(){return eh}});var r=n(2549),o=n(942),i=n(5739),a=n(1114),c=n(2256),u=n(9155),l=n.n(u),s=n(9514),f=n.n(s),d=n(3059),h=n.n(d),p=n(8578);function v(e){return e instanceof HTMLElement||e instanceof SVGElement?e:e instanceof l().Component?f().findDOMNode(e):null}n(3455);var m=n(1834),g=u.createContext(null),y=function(){if("u">typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}(),b="u">typeof window&&"u">typeof document&&window.document===document,w=void 0!==n.g&&n.g.Math===Math?n.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),E="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(w):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},A=["top","right","bottom","left","width","height","size","weight"],S="u">typeof MutationObserver,T=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){E(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){b&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),S?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){b&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;A.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),O=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},x=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||w},C=M(0,0,0,0);function _(e){return parseFloat(e)||0}function R(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+_(e["border-"+n+"-width"])},0)}var k="u">typeof SVGGraphicsElement?function(e){return e instanceof x(e).SVGGraphicsElement}:function(e){return e instanceof x(e).SVGElement&&"function"==typeof e.getBBox};function M(e,t,n,r){return{x:e,y:t,width:n,height:r}}var j=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=M(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!b)return C;if(k(e)){var t;return M(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return C;var o=x(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=_(i)}return t}(o),a=i.left+i.right,c=i.top+i.bottom,u=_(o.width),l=_(o.height);if("border-box"===o.boxSizing&&(Math.round(u+a)!==n&&(u-=R(o,"left","right")+a),Math.round(l+c)!==r&&(l-=R(o,"top","bottom")+c)),(t=e)!==x(t).document.documentElement){var s=Math.round(u+a)-n,f=Math.round(l+c)-r;1!==Math.abs(s)&&(u-=s),1!==Math.abs(f)&&(l-=f)}return M(i.left,i.top,u,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),L=function(e,t){var n,r,o,i,a,c=(n=t.x,r=t.y,o=t.width,i=t.height,O(a=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:o,height:i,top:r,right:n+o,bottom:i+r,left:n}),a);O(this,{target:e,contentRect:c})},N=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new y,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new j(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new L(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),P="u">typeof WeakMap?new WeakMap:new y,$=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new N(t,T.getInstance(),this);P.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){$.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}});var I=void 0!==w.ResizeObserver?w.ResizeObserver:$,D=new Map,H=new I(function(e){e.forEach(function(e){var t,n=e.target;null==(t=D.get(n))||t.forEach(function(e){return e(n)})})}),z=n(582),B=n(9520),q=n(126),W=n(6439),Y=function(e){(0,q.A)(n,e);var t=(0,W.A)(n);function n(){return(0,z.A)(this,n),t.apply(this,arguments)}return(0,B.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component),F=u.forwardRef(function(e,t){var n=e.children,r=e.disabled,a=u.useRef(null),c=u.useRef(null),l=u.useContext(g),s="function"==typeof n,f=s?n(a):n,d=u.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!s&&u.isValidElement(f)&&(0,m.f3)(f),p=h?f.ref:null,y=(0,m.xK)(p,a),b=function(){var e;return v(a.current)||(a.current&&"object"===(0,i.A)(a.current)?v(null==(e=a.current)?void 0:e.nativeElement):null)||v(c.current)};u.useImperativeHandle(t,function(){return b()});var w=u.useRef(e);w.current=e;var E=u.useCallback(function(e){var t=w.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,c=i.height,u=e.offsetWidth,s=e.offsetHeight,f=Math.floor(a),h=Math.floor(c);if(d.current.width!==f||d.current.height!==h||d.current.offsetWidth!==u||d.current.offsetHeight!==s){var p={width:f,height:h,offsetWidth:u,offsetHeight:s};d.current=p;var v=u===Math.round(a)?a:u,m=s===Math.round(c)?c:s,g=(0,o.A)((0,o.A)({},p),{},{offsetWidth:v,offsetHeight:m});null==l||l(g,e,r),n&&Promise.resolve().then(function(){n(g,e)})}},[]);return u.useEffect(function(){var e=b();return e&&!r&&(D.has(e)||(D.set(e,new Set),H.observe(e)),D.get(e).add(E)),function(){D.has(e)&&(D.get(e).delete(E),!D.get(e).size&&(H.unobserve(e),D.delete(e)))}},[a.current,r]),u.createElement(Y,{ref:c},h?u.cloneElement(f,{ref:y}):f)}),X=u.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return l().Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?r=r.concat(e(t)):(0,p.isFragment)(t)&&t.props?r=r.concat(e(t.props.children,n)):r.push(t))}),r}(n)).map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return u.createElement(F,(0,r.A)({},e,{key:i,ref:0===o?t:void 0}),n)})});X.Collection=function(e){var t=e.children,n=e.onBatchResize,r=u.useRef(0),o=u.useRef([]),i=u.useContext(g),a=u.useCallback(function(e,t,a){r.current+=1;var c=r.current;o.current.push({size:e,element:t,data:a}),Promise.resolve().then(function(){c===r.current&&(null==n||n(o.current),o.current=[])}),null==i||i(e,t,a)},[n,i]);return u.createElement(g.Provider,{value:a},t)};var V=u.forwardRef(function(e,t){var n,i=e.height,a=e.offsetY,l=e.offsetX,s=e.children,f=e.prefixCls,d=e.onInnerResize,p=e.innerProps,v=e.rtl,m=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==a&&(g={height:i,position:"relative",overflow:"hidden"},y=(0,o.A)((0,o.A)({},y),{},(n={transform:"translateY(".concat(a,"px)")},(0,c.A)(n,v?"marginRight":"marginLeft",-l),(0,c.A)(n,"position","absolute"),(0,c.A)(n,"left",0),(0,c.A)(n,"right",0),(0,c.A)(n,"top",0),n))),u.createElement("div",{style:g},u.createElement(X,{onResize:function(e){e.offsetHeight&&d&&d()}},u.createElement("div",(0,r.A)({style:y,className:h()((0,c.A)({},"".concat(f,"-holder-inner"),f)),ref:t},p),s,m)))});V.displayName="Filler";var K=function(e){return+setTimeout(e,16)},G=function(e){return clearTimeout(e)};"u">typeof window&&"requestAnimationFrame"in window&&(K=function(e){return window.requestAnimationFrame(e)},G=function(e){return window.cancelAnimationFrame(e)});var U=0,J=new Map,Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=U+=1;return!function t(r){if(0===r)J.delete(n),e();else{var o=K(function(){t(r-1)});J.set(n,o)}}(t),n};function Z(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}Q.cancel=function(e){var t=J.get(e);return J.delete(e),G(t)};var ee=u.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.rtl,l=e.scrollOffset,s=e.scrollRange,f=e.onStartMove,d=e.onStopMove,p=e.onScroll,v=e.horizontal,m=e.spinSize,g=e.containerSize,y=e.style,b=e.thumbStyle,w=u.useState(!1),E=(0,a.A)(w,2),A=E[0],S=E[1],T=u.useState(null),O=(0,a.A)(T,2),x=O[0],C=O[1],_=u.useState(null),R=(0,a.A)(_,2),k=R[0],M=R[1],j=!i,L=u.useRef(),N=u.useRef(),P=u.useState(!1),$=(0,a.A)(P,2),I=$[0],D=$[1],H=u.useRef(),z=function(){clearTimeout(H.current),D(!0),H.current=setTimeout(function(){D(!1)},3e3)},B=s-g||0,q=g-m||0,W=u.useMemo(function(){return 0===l||0===B?0:l/B*q},[l,B,q]),Y=u.useRef({top:W,dragging:A,pageY:x,startTop:k});Y.current={top:W,dragging:A,pageY:x,startTop:k};var F=function(e){S(!0),C(Z(e,v)),M(Y.current.top),f(),e.stopPropagation(),e.preventDefault()};u.useEffect(function(){var e=function(e){e.preventDefault()},t=L.current,n=N.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",F),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}},[]);var X=u.useRef();X.current=B;var V=u.useRef();V.current=q,u.useEffect(function(){if(A){var e,t=function(t){var n=Y.current,r=n.dragging,o=n.pageY,i=n.startTop;if(Q.cancel(e),r){var a=Z(t,v)-o,c=i;!j&&v?c-=a:c+=a;var u=X.current,l=V.current,s=Math.ceil((l?c/l:0)*u);s=Math.min(s=Math.max(s,0),u),e=Q(function(){p(s,v)})}},n=function(){S(!1),d()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Q.cancel(e)}}},[A]),u.useEffect(function(){z()},[l]),u.useImperativeHandle(t,function(){return{delayHidden:z}});var K="".concat(r,"-scrollbar"),G={position:"absolute",visibility:I&&B>0?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(G.height=8,G.left=0,G.right=0,G.bottom=0,U.height="100%",U.width=m,j?U.left=W:U.right=W):(G.width=8,G.top=0,G.bottom=0,j?G.right=0:G.left=0,U.width="100%",U.height=m,U.top=W),u.createElement("div",{ref:L,className:h()(K,(n={},(0,c.A)(n,"".concat(K,"-horizontal"),v),(0,c.A)(n,"".concat(K,"-vertical"),!v),(0,c.A)(n,"".concat(K,"-visible"),I),n)),style:(0,o.A)((0,o.A)({},G),y),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:z},u.createElement("div",{ref:N,className:h()("".concat(K,"-thumb"),(0,c.A)({},"".concat(K,"-thumb-moving"),A)),style:(0,o.A)((0,o.A)({},U),b),onMouseDown:F}))});function et(e){var t=e.children,n=e.setRef,r=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:r})}var en=function(){function e(){(0,z.A)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,B.A)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),er=n(4148),eo=n(2761),ei=("u"<typeof navigator?"undefined":(0,i.A)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ea=function(e,t){var n=(0,u.useRef)(!1),r=(0,u.useRef)(null),o=(0,u.useRef)({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e<0&&o.current.top||e>0&&o.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):(!i||n.current)&&(clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)),!n.current&&i}},ec=14/15;function eu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var el=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],es=[],ef={overflowY:"auto",overflowAnchor:"none"},ed=u.forwardRef(function(e,t){var n,l,f,d,p,m,g,y,b,w,E,A,S,T,O,x,C,_,R,k,M,j,L,N,P,$,I,D,H,z,B,q,W,Y,F,K=e.prefixCls,G=void 0===K?"rc-virtual-list":K,U=e.className,J=e.height,Z=e.itemHeight,ed=e.fullHeight,eh=e.style,ep=e.data,ev=e.children,em=e.itemKey,eg=e.virtual,ey=e.direction,eb=e.scrollWidth,ew=e.component,eE=e.onScroll,eA=e.onVirtualScroll,eS=e.onVisibleChange,eT=e.innerProps,eO=e.extraRender,ex=e.styles,eC=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||({}).propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,el),e_=!!(!1!==eg&&J&&Z),eR=e_&&ep&&(Z*ep.length>J||!!eb),ek="rtl"===ey,eM=h()(G,(0,c.A)({},"".concat(G,"-rtl"),ek),U),ej=ep||es,eL=(0,u.useRef)(),eN=(0,u.useRef)(),eP=(0,u.useState)(0),e$=(0,a.A)(eP,2),eI=e$[0],eD=e$[1],eH=(0,u.useState)(0),ez=(0,a.A)(eH,2),eB=ez[0],eq=ez[1],eW=(0,u.useState)(!1),eY=(0,a.A)(eW,2),eF=eY[0],eX=eY[1],eV=function(){eX(!0)},eK=function(){eX(!1)},eG=u.useCallback(function(e){return"function"==typeof em?em(e):null==e?void 0:e[em]},[em]);function eU(e){eD(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(ts.current)||(n=Math.min(n,ts.current)),n=Math.max(n,0));return eL.current.scrollTop=r,r})}var eJ=(0,u.useRef)({start:0,end:ej.length}),eQ=(0,u.useRef)(),eZ=(n=u.useState(ej),f=(l=(0,a.A)(n,2))[0],d=l[1],p=u.useState(null),g=(m=(0,a.A)(p,2))[0],y=m[1],u.useEffect(function(){var e=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):c}for(var l=null,s=1!==Math.abs(i-a),f=0;f<o.length;f+=1){var d=u(r[f]);if(d!==u(o[f])){l=f,s=s||d!==u(o[f+1]);break}}return null===l?null:{index:l,multiple:s}}(f||[],ej||[],eG);(null==e?void 0:e.index)!==void 0&&y(ej[e.index]),d(ej)},[ej]),[g]);eQ.current=(0,a.A)(eZ,1)[0];var e0=function(e,t,n){var r=u.useState(0),o=(0,a.A)(r,2),i=o[0],c=o[1],l=(0,u.useRef)(new Map),s=(0,u.useRef)(new en),f=(0,u.useRef)();function d(){Q.cancel(f.current)}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){l.current.forEach(function(e,t){if(e&&e.offsetParent){var n=v(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}}),c(function(e){return e+1})};e?t():f.current=Q(t)}return(0,u.useEffect)(function(){return d},[]),[function(r,o){var i=e(r),a=l.current.get(i);o?(l.current.set(i,o),h()):l.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},h,s.current,i]}(eG,null,null),e1=(0,a.A)(e0,4),e5=e1[0],e2=e1[1],e9=e1[2],e6=e1[3],e3=u.useMemo(function(){if(!e_)return{scrollHeight:void 0,start:0,end:ej.length-1,offset:void 0};if(!eR)return{scrollHeight:(null==(e=eN.current)?void 0:e.offsetHeight)||0,start:0,end:ej.length-1,offset:void 0};for(var e,t,n,r,o=0,i=ej.length,a=0;a<i;a+=1){var c=eG(ej[a]),u=e9.get(c),l=o+(void 0===u?Z:u);l>=eI&&void 0===t&&(t=a,n=o),l>eI+J&&void 0===r&&(r=a),o=l}return void 0===t&&(t=0,n=0,r=Math.ceil(J/Z)),void 0===r&&(r=ej.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,ej.length-1),offset:n}},[eR,e_,eI,ej,e6,J]),e7=e3.scrollHeight,e4=e3.start,e8=e3.end,te=e3.offset;eJ.current.start=e4,eJ.current.end=e8;var tt=u.useState({width:0,height:J}),tn=(0,a.A)(tt,2),tr=tn[0],to=tn[1],ti=(0,u.useRef)(),ta=(0,u.useRef)(),tc=u.useMemo(function(){return eu(tr.width,eb)},[tr.width,eb]),tu=u.useMemo(function(){return eu(tr.height,e7)},[tr.height,e7]),tl=e7-J,ts=(0,u.useRef)(tl);ts.current=tl;var tf=eI<=0,td=eI>=tl,th=ea(tf,td),tp=function(){return{x:ek?-eB:eB,y:eI}},tv=(0,u.useRef)(tp()),tm=(0,eo._q)(function(){if(eA){var e=tp();(tv.current.x!==e.x||tv.current.y!==e.y)&&(eA(e),tv.current=e)}});function tg(e,t){t?((0,s.flushSync)(function(){eq(e)}),tm()):eU(e)}var ty=function(e){var t=e,n=eb-tr.width;return Math.min(t=Math.max(t,0),n)},tb=(0,eo._q)(function(e,t){t?((0,s.flushSync)(function(){eq(function(t){return ty(t+(ek?-e:e))})}),tm()):eU(function(t){return t+e})}),tw=(b=!!eb,w=(0,u.useRef)(0),E=(0,u.useRef)(null),A=(0,u.useRef)(null),S=(0,u.useRef)(!1),T=ea(tf,td),O=(0,u.useRef)(null),x=(0,u.useRef)(null),[function(e){if(e_){Q.cancel(x.current),x.current=Q(function(){O.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,i=n,a=r;("sx"===O.current||!O.current&&o&&r&&!n)&&(i=r,a=0,O.current="sx");var c=Math.abs(i),u=Math.abs(a);(null===O.current&&(O.current=b&&c>u?"x":"y"),"y"===O.current)?(t=a,Q.cancel(E.current),w.current+=t,A.current=t,T(t)||(ei||e.preventDefault(),E.current=Q(function(){var e=S.current?10:1;tb(w.current*e),w.current=0}))):(tb(i,!0),ei||e.preventDefault())}},function(e){e_&&(S.current=e.detail===A.current)}]),tE=(0,a.A)(tw,2),tA=tE[0],tS=tE[1];C=function(e,t){return!th(e,t)&&(tA({preventDefault:function(){},deltaY:e}),!0)},R=(0,u.useRef)(!1),k=(0,u.useRef)(0),M=(0,u.useRef)(null),j=(0,u.useRef)(null),L=function(e){if(R.current){var t=Math.ceil(e.touches[0].pageY),n=k.current-t;k.current=t,C(n)&&e.preventDefault(),clearInterval(j.current),j.current=setInterval(function(){(!C(n*=ec,!0)||.1>=Math.abs(n))&&clearInterval(j.current)},16)}},N=function(){R.current=!1,_()},P=function(e){_(),1!==e.touches.length||R.current||(R.current=!0,k.current=Math.ceil(e.touches[0].pageY),M.current=e.target,M.current.addEventListener("touchmove",L),M.current.addEventListener("touchend",N))},_=function(){M.current&&(M.current.removeEventListener("touchmove",L),M.current.removeEventListener("touchend",N))},(0,er.A)(function(){return e_&&eL.current.addEventListener("touchstart",P),function(){var e;null==(e=eL.current)||e.removeEventListener("touchstart",P),_(),clearInterval(j.current)}},[e_]),(0,er.A)(function(){function e(e){e_&&e.preventDefault()}var t=eL.current;return t.addEventListener("wheel",tA),t.addEventListener("DOMMouseScroll",tS),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tA),t.removeEventListener("DOMMouseScroll",tS),t.removeEventListener("MozMousePixelScroll",e)}},[e_]),(0,er.A)(function(){eb&&eq(function(e){return ty(e)})},[tr.width,eb]);var tT=function(){var e,t;null==(e=ti.current)||e.delayHidden(),null==(t=ta.current)||t.delayHidden()},tO=($=function(){return e2(!0)},I=u.useRef(),D=u.useState(null),z=(H=(0,a.A)(D,2))[0],B=H[1],(0,er.A)(function(){if(z&&z.times<10){if(!eL.current)return void B(function(e){return(0,o.A)({},e)});$();var e=z.targetAlign,t=z.originAlign,n=z.index,r=z.offset,i=eL.current.clientHeight,a=!1,c=e,u=null;if(i){for(var l=e||t,s=0,f=0,d=0,h=Math.min(ej.length-1,n),p=0;p<=h;p+=1){var v=eG(ej[p]);f=s;var m=e9.get(v);s=d=f+(void 0===m?Z:m)}for(var g="top"===l?r:i-r,y=h;y>=0;y-=1){var b=eG(ej[y]),w=e9.get(b);if(void 0===w){a=!0;break}if((g-=w)<=0)break}switch(l){case"top":u=f-r;break;case"bottom":u=d-i+r;break;default:var E=eL.current.scrollTop;f<E?c="top":d>E+i&&(c="bottom")}null!==u&&eU(u),u!==z.lastTop&&(a=!0)}a&&B((0,o.A)((0,o.A)({},z),{},{times:z.times+1,targetAlign:c,lastTop:u}))}},[z,eL.current]),function(e){if(null==e)return void tT();if(Q.cancel(I.current),"number"==typeof e)eU(e);else if(e&&"object"===(0,i.A)(e)){var t,n=e.align;t="index"in e?e.index:ej.findIndex(function(t){return eG(t)===e.key});var r=e.offset;B({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});u.useImperativeHandle(t,function(){return{getScrollInfo:tp,scrollTo:function(e){e&&"object"===(0,i.A)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eq(ty(e.left)),tO(e.top)):tO(e)}}}),(0,er.A)(function(){eS&&eS(ej.slice(e4,e8+1),ej)},[e4,e8,ej]);var tx=(q=u.useMemo(function(){return[new Map,[]]},[ej,e9.id,Z]),Y=(W=(0,a.A)(q,2))[0],F=W[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Y.get(e),r=Y.get(t);if(void 0===n||void 0===r)for(var o=ej.length,i=F.length;i<o;i+=1){var a,c=eG(ej[i]);Y.set(c,i);var u=null!=(a=e9.get(c))?a:Z;if(F[i]=(F[i-1]||0)+u,c===e&&(n=i),c===t&&(r=i),void 0!==n&&void 0!==r)break}return{top:F[n-1]||0,bottom:F[r]}}),tC=null==eO?void 0:eO({start:e4,end:e8,virtual:eR,offsetX:eB,offsetY:te,rtl:ek,getSize:tx}),t_=ej.slice(e4,e8+1).map(function(e,t){var n=ev(e,e4+t,{style:{width:eb}}),r=eG(e);return u.createElement(et,{key:r,setRef:function(t){return e5(e,t)}},n)}),tR=null;J&&(tR=(0,o.A)((0,c.A)({},void 0===ed||ed?"height":"maxHeight",J),ef),e_&&(tR.overflowY="hidden",eb&&(tR.overflowX="hidden"),eF&&(tR.pointerEvents="none")));var tk={};return ek&&(tk.dir="rtl"),u.createElement("div",(0,r.A)({style:(0,o.A)((0,o.A)({},eh),{},{position:"relative"}),className:eM},tk,eC),u.createElement(X,{onResize:function(e){to({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},u.createElement(void 0===ew?"div":ew,{className:"".concat(G,"-holder"),style:tR,ref:eL,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eI&&eU(t),null==eE||eE(e),tm()},onMouseEnter:tT},u.createElement(V,{prefixCls:G,height:e7,offsetX:eB,offsetY:te,scrollWidth:eb,onInnerResize:e2,ref:eN,innerProps:eT,rtl:ek,extra:tC},t_))),eR&&e7>J&&u.createElement(ee,{ref:ti,prefixCls:G,scrollOffset:eI,scrollRange:e7,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tu,containerSize:tr.height,style:null==ex?void 0:ex.verticalScrollBar,thumbStyle:null==ex?void 0:ex.verticalScrollBarThumb}),eR&&eb&&u.createElement(ee,{ref:ta,prefixCls:G,scrollOffset:eB,scrollRange:eb,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tc,containerSize:tr.width,horizontal:!0,style:null==ex?void 0:ex.horizontalScrollBar,thumbStyle:null==ex?void 0:ex.horizontalScrollBarThumb}))});ed.displayName="List";var eh=ed},5098:function(e){var t="u">typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var c,u,l,s;if(i.constructor!==a.constructor)return!1;if(Array.isArray(i)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(!e(i[u],a[u]))return!1;return!0}if(n&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;for(s=i.entries();!(u=s.next()).done;)if(!e(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(i[u]!==a[u])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof a.valueOf)return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof a.toString)return i.toString()===a.toString();if((c=(l=Object.keys(i)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,l[u]))return!1;if(t&&i instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!i.$$typeof)&&!e(i[l[u]],a[l[u]]))return!1;return!0}return i!=i&&a!=a}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},5195:function(e,t,n){"use strict";n.d(t,{m:function(){return eo}});var r,o,i,a,c=n(7465),u=n.n(c),l=n(3813),s=n.n(l),f=n(5098),d=n.n(f),h=n(9155),p=n.n(h),v=n(1911),m=n.n(v),g="bodyAttributes",y="htmlAttributes",b={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(b).map(function(e){return b[e]});var w="cssText",E="href",A="innerHTML",S="itemprop",T={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O=Object.keys(T).reduce(function(e,t){return e[T[t]]=t,e},{}),x=[b.NOSCRIPT,b.SCRIPT,b.STYLE],C="data-react-helmet",_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},L=function(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},N=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},P=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},$=function(e){var t=H(e,b.TITLE),n=H(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=H(e,"defaultTitle");return t||r||void 0},I=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return M({},e,t)},{})},D=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&Y("Helmet: "+e+' should be of type "Array". Instead found type "'+_(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var o={};n.filter(function(e){for(var n=void 0,i=Object.keys(e),a=0;a<i.length;a++){var c=i[a],u=c.toLowerCase();-1!==t.indexOf(u)&&("rel"!==n||"canonical"!==e[n].toLowerCase())&&("rel"!==u||"stylesheet"!==e[u].toLowerCase())&&(n=u),-1!==t.indexOf(c)&&(c===A||c===w||c===S)&&(n=c)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][l]&&(o[n][l]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var i=Object.keys(o),a=0;a<i.length;a++){var c=i[a],u=m()({},r[c],o[c]);r[c]=u}return e},[]).reverse()},H=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},z=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout(function(){z(e)},0)}),B=function(e){return clearTimeout(e)},q="u">typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||z:n.g.requestAnimationFrame||z,W="u">typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||B:n.g.cancelAnimationFrame||B,Y=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},F=null,X=function(e,t){var n=e.baseTag,r=e.bodyAttributes,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,s=e.styleTags,f=e.title,d=e.titleAttributes;G(b.BODY,r),G(b.HTML,o),K(f,d);var h={baseTag:U(b.BASE,n),linkTags:U(b.LINK,i),metaTags:U(b.META,a),noscriptTags:U(b.NOSCRIPT,c),scriptTags:U(b.SCRIPT,l),styleTags:U(b.STYLE,s)},p={},v={};Object.keys(h).forEach(function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(v[e]=h[e].oldTags)}),t&&t(),u(e,p,v)},V=function(e){return Array.isArray(e)?e.join(""):e},K=function(e,t){void 0!==e&&document.title!==e&&(document.title=V(e)),G(b.TITLE,t)},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(C),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(t),c=0;c<a.length;c++){var u=a[c],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===o.indexOf(u)&&o.push(u);var s=i.indexOf(u);-1!==s&&i.splice(s,1)}for(var f=i.length-1;f>=0;f--)n.removeAttribute(i[f]);o.length===i.length?n.removeAttribute(C):n.getAttribute(C)!==a.join(",")&&n.setAttribute(C,a.join(","))}},U=function(e,t){var n=document.head||document.querySelector(b.HEAD),r=n.querySelectorAll(e+"["+C+"]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===A)n.innerHTML=t.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute(C,"true"),o.some(function(e,t){return a=t,n.isEqualNode(e)})?o.splice(a,1):i.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:i}},J=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Q=function(e,t,n,r){var o=J(n),i=V(t);return o?"<"+e+" "+C+'="true" '+o+">"+P(i,r)+"</"+e+">":"<"+e+" "+C+'="true">'+P(i,r)+"</"+e+">"},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[T[n]||n]=e[n],t},t)},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[O[n]||n]=e[n],t},t)},et=function(e,t,n){var r,o=Z(n,((r={key:t})[C]=!0,r));return[p().createElement(b.TITLE,o,t)]},en=function(e,t,n){switch(e){case b.TITLE:return{toComponent:function(){return et(e,t.title,t.titleAttributes,n)},toString:function(){return Q(e,t.title,t.titleAttributes,n)}};case g:case y:return{toComponent:function(){return Z(t)},toString:function(){return J(t)}};default:return{toComponent:function(){return t.map(function(t,n){var r,o=((r={key:n})[C]=!0,r);return Object.keys(t).forEach(function(e){var n=T[e]||e;n===A||n===w?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),p().createElement(e,o)})},toString:function(){return t.reduce(function(t,r){var o=Object.keys(r).filter(function(e){return e!==A&&e!==w}).reduce(function(e,t){var o=void 0===r[t]?t:t+'="'+P(r[t],n)+'"';return e?e+" "+o:o},""),i=r.innerHTML||r.cssText||"",a=-1===x.indexOf(e);return t+"<"+e+" "+C+'="true" '+o+(a?"/>":">"+i+"</"+e+">")},"")}}}},er=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.scriptTags,l=e.styleTags,s=e.title,f=e.titleAttributes;return{base:en(b.BASE,t,r),bodyAttributes:en(g,n,r),htmlAttributes:en(y,o,r),link:en(b.LINK,i,r),meta:en(b.META,a,r),noscript:en(b.NOSCRIPT,c,r),script:en(b.SCRIPT,u,r),style:en(b.STYLE,l,r),title:en(b.TITLE,{title:void 0===s?"":s,titleAttributes:f},r)}},eo=(o=s()(function(e){var t;return{baseTag:(t=[E,"target"],e.filter(function(e){return void 0!==e[b.BASE]}).map(function(e){return e[b.BASE]}).reverse().reduce(function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o].toLowerCase();if(-1!==t.indexOf(i)&&n[i])return e.concat(n)}return e},[])),bodyAttributes:I(g,e),defer:H(e,"defer"),encode:H(e,"encodeSpecialCharacters"),htmlAttributes:I(y,e),linkTags:D(b.LINK,["rel",E],e),metaTags:D(b.META,["name","charset","http-equiv","property",S],e),noscriptTags:D(b.NOSCRIPT,[A],e),onChangeClientState:H(e,"onChangeClientState")||function(){},scriptTags:D(b.SCRIPT,["src",A],e),styleTags:D(b.STYLE,[w],e),title:$(e),titleAttributes:I("titleAttributes",e)}},function(e){F&&W(F),e.defer?F=q(function(){X(e,function(){F=null})}):(X(e),F=null)},er)(function(){return null}),a=i=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case b.SCRIPT:case b.NOSCRIPT:return{innerHTML:t};case b.STYLE:return{cssText:t}}throw Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,o=e.newChildProps,i=e.nestedChildren;return M({},r,((t={})[n.type]=[].concat(r[n.type]||[],[M({},o,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,i=e.newChildProps,a=e.nestedChildren;switch(r.type){case b.TITLE:return M({},o,((t={})[r.type]=a,t.titleAttributes=M({},i),t));case b.BODY:return M({},o,{bodyAttributes:M({},i)});case b.HTML:return M({},o,{htmlAttributes:M({},i)})}return M({},o,((n={})[r.type]=M({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=M({},t);return Object.keys(e).forEach(function(t){var r;n=M({},n,((r={})[t]=e[t],r))}),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return p().Children.forEach(e,function(e){if(e&&e.props){var o=e.props,i=o.children,a=ee(L(o,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case b.LINK:case b.META:case b.NOSCRIPT:case b.SCRIPT:case b.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:i})}}}),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=M({},L(e,["children"]));return t&&(n=this.mapChildrenToProps(t,n)),p().createElement(o,n)},k(t,null,[{key:"canUseDOM",set:function(e){o.canUseDOM=e}}]),t}(p().Component),i.propTypes={base:u().object,bodyAttributes:u().object,children:u().oneOfType([u().arrayOf(u().node),u().node]),defaultTitle:u().string,defer:u().bool,encodeSpecialCharacters:u().bool,htmlAttributes:u().object,link:u().arrayOf(u().object),meta:u().arrayOf(u().object),noscript:u().arrayOf(u().object),onChangeClientState:u().func,script:u().arrayOf(u().object),style:u().arrayOf(u().object),title:u().string,titleAttributes:u().object,titleTemplate:u().string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var e=o.rewind();return e||(e=er({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);eo.renderStatic=eo.rewind},3813:function(e,t,n){"use strict";var r=n(9155),o=r&&"object"==typeof r&&"default"in r?r.default:r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=!!("u">typeof window&&window.document&&window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw Error("Expected mapStateOnServer to either be undefined or a function.");return function(c){if("function"!=typeof c)throw Error("Expected WrappedComponent to be a React component.");var u,l=[];function s(){u=e(l.map(function(e){return e.props})),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t.peek=function(){return u},t.rewind=function(){if(t.canUseDOM)throw Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var n=t.prototype;return n.UNSAFE_componentWillMount=function(){l.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),s()},n.render=function(){return o.createElement(c,this.props)},t}(r.PureComponent);return i(f,"displayName","SideEffect("+(c.displayName||c.name||"Component")+")"),i(f,"canUseDOM",a),f}}}}]);