@next-bricks/ai-portal 0.49.0 → 0.50.0

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 (53) hide show
  1. package/dist/bricks.json +7 -4
  2. package/dist/chunks/8889.d377e773.js +3 -0
  3. package/dist/chunks/8889.d377e773.js.map +1 -0
  4. package/dist/chunks/action-buttons.44ddca46.js +2 -0
  5. package/dist/chunks/action-buttons.44ddca46.js.map +1 -0
  6. package/dist/chunks/chat-box.da1fbfc3.js +2 -0
  7. package/dist/chunks/chat-box.da1fbfc3.js.map +1 -0
  8. package/dist/chunks/{elevo-sidebar.dd588b6e.js → elevo-sidebar.d95cf869.js} +3 -3
  9. package/dist/chunks/{elevo-sidebar.dd588b6e.js.map → elevo-sidebar.d95cf869.js.map} +1 -1
  10. package/dist/chunks/home-container.3e8a670e.js +2 -0
  11. package/dist/chunks/home-container.3e8a670e.js.map +1 -0
  12. package/dist/chunks/{main.c18035c3.js → main.b7a210d1.js} +2 -2
  13. package/dist/chunks/{main.c18035c3.js.map → main.b7a210d1.js.map} +1 -1
  14. package/dist/chunks/mcp-tools.16acda69.js +2 -0
  15. package/dist/chunks/mcp-tools.16acda69.js.map +1 -0
  16. package/dist/chunks/page-container.e187d00a.js +2 -0
  17. package/dist/chunks/page-container.e187d00a.js.map +1 -0
  18. package/dist/chunks/sticky-container.b8ab2a25.js +2 -0
  19. package/dist/chunks/sticky-container.b8ab2a25.js.map +1 -0
  20. package/dist/chunks/tab-list.ee97567f.js +3 -0
  21. package/dist/chunks/tab-list.ee97567f.js.map +1 -0
  22. package/dist/examples.json +3 -0
  23. package/dist/index.83b29e4e.js +2 -0
  24. package/dist/index.83b29e4e.js.map +1 -0
  25. package/dist/manifest.json +46 -5
  26. package/dist/types.json +60 -3
  27. package/dist-types/bootstrap.d.ts +1 -0
  28. package/dist-types/home-container/index.d.ts +1 -0
  29. package/dist-types/mcp-tools/index.d.ts +2 -4
  30. package/dist-types/page-container/index.d.ts +2 -2
  31. package/dist-types/sticky-container/index.d.ts +21 -0
  32. package/dist-types/sticky-container/index.spec.d.ts +1 -0
  33. package/docs/sticky-container.md +11 -0
  34. package/package.json +2 -2
  35. package/dist/chunks/8551.af6f8818.js +0 -3
  36. package/dist/chunks/8551.af6f8818.js.map +0 -1
  37. package/dist/chunks/action-buttons.c8899284.js +0 -2
  38. package/dist/chunks/action-buttons.c8899284.js.map +0 -1
  39. package/dist/chunks/chat-box.690cfe37.js +0 -2
  40. package/dist/chunks/chat-box.690cfe37.js.map +0 -1
  41. package/dist/chunks/home-container.d2c68b4a.js +0 -2
  42. package/dist/chunks/home-container.d2c68b4a.js.map +0 -1
  43. package/dist/chunks/mcp-tools.64f00038.js +0 -2
  44. package/dist/chunks/mcp-tools.64f00038.js.map +0 -1
  45. package/dist/chunks/page-container.fe4474cb.js +0 -2
  46. package/dist/chunks/page-container.fe4474cb.js.map +0 -1
  47. package/dist/chunks/tab-list.7c595ef3.js +0 -3
  48. package/dist/chunks/tab-list.7c595ef3.js.map +0 -1
  49. package/dist/index.4517c026.js +0 -2
  50. package/dist/index.4517c026.js.map +0 -1
  51. /package/dist/chunks/{8551.af6f8818.js.LICENSE.txt → 8889.d377e773.js.LICENSE.txt} +0 -0
  52. /package/dist/chunks/{elevo-sidebar.dd588b6e.js.LICENSE.txt → elevo-sidebar.d95cf869.js.LICENSE.txt} +0 -0
  53. /package/dist/chunks/{tab-list.7c595ef3.js.LICENSE.txt → tab-list.ee97567f.js.LICENSE.txt} +0 -0
@@ -212,7 +212,12 @@
212
212
  },
213
213
  {
214
214
  "name": "ai-portal.home-container",
215
- "properties": [],
215
+ "properties": [
216
+ {
217
+ "name": "sticky",
218
+ "type": "boolean"
219
+ }
220
+ ],
216
221
  "events": [],
217
222
  "slots": [],
218
223
  "methods": [],
@@ -478,10 +483,8 @@
478
483
  "type": "McpTool[]"
479
484
  },
480
485
  {
481
- "name": "withContainer",
482
- "description": "",
483
- "deprecated": true,
484
- "default": "true"
486
+ "name": "stickyTop",
487
+ "type": "number"
485
488
  }
486
489
  ],
487
490
  "events": [],
@@ -698,6 +701,10 @@
698
701
  "name": "size",
699
702
  "type": "\"medium\" | \"small\""
700
703
  },
704
+ {
705
+ "name": "sticky",
706
+ "type": "boolean"
707
+ },
701
708
  {
702
709
  "name": "textContent",
703
710
  "type": "string",
@@ -1109,6 +1116,40 @@
1109
1116
  "methods": [],
1110
1117
  "parts": [],
1111
1118
  "description": "构件 `ai-portal.blank-state`"
1119
+ },
1120
+ {
1121
+ "name": "ai-portal.sticky-container",
1122
+ "properties": [
1123
+ {
1124
+ "name": "variant",
1125
+ "description": "",
1126
+ "default": "\"default\"",
1127
+ "type": "StickyContainerVariant"
1128
+ },
1129
+ {
1130
+ "name": "textContent",
1131
+ "type": "string",
1132
+ "description": "文本内容"
1133
+ }
1134
+ ],
1135
+ "events": [],
1136
+ "slots": [
1137
+ {
1138
+ "name": null,
1139
+ "description": "内容"
1140
+ },
1141
+ {
1142
+ "name": "header",
1143
+ "description": "头部"
1144
+ },
1145
+ {
1146
+ "name": "toolbar",
1147
+ "description": "工具栏"
1148
+ }
1149
+ ],
1150
+ "methods": [],
1151
+ "parts": [],
1152
+ "description": "构件 `ai-portal.sticky-container`"
1112
1153
  }
1113
1154
  ],
1114
1155
  "providers": [
package/dist/types.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "ai-portal.home-container": {
3
- "properties": [],
3
+ "properties": [
4
+ {
5
+ "name": "sticky",
6
+ "annotation": {
7
+ "type": "keyword",
8
+ "value": "boolean"
9
+ }
10
+ }
11
+ ],
4
12
  "events": [],
5
13
  "methods": []
6
14
  },
@@ -390,6 +398,13 @@
390
398
  ]
391
399
  }
392
400
  },
401
+ {
402
+ "name": "sticky",
403
+ "annotation": {
404
+ "type": "keyword",
405
+ "value": "boolean"
406
+ }
407
+ },
393
408
  {
394
409
  "name": "textContent",
395
410
  "annotation": {
@@ -551,6 +566,48 @@
551
566
  }
552
567
  ]
553
568
  },
569
+ "ai-portal.sticky-container": {
570
+ "properties": [
571
+ {
572
+ "name": "variant",
573
+ "annotation": {
574
+ "type": "reference",
575
+ "typeName": {
576
+ "type": "identifier",
577
+ "name": "StickyContainerVariant"
578
+ }
579
+ }
580
+ },
581
+ {
582
+ "name": "textContent",
583
+ "annotation": {
584
+ "type": "keyword",
585
+ "value": "string"
586
+ }
587
+ }
588
+ ],
589
+ "events": [],
590
+ "methods": [],
591
+ "types": [
592
+ {
593
+ "type": "typeAlias",
594
+ "name": "StickyContainerVariant",
595
+ "annotation": {
596
+ "type": "union",
597
+ "types": [
598
+ {
599
+ "type": "jsLiteral",
600
+ "value": "default"
601
+ },
602
+ {
603
+ "type": "jsLiteral",
604
+ "value": "home"
605
+ }
606
+ ]
607
+ }
608
+ }
609
+ ]
610
+ },
554
611
  "ai-portal.project-knowledges": {
555
612
  "properties": [
556
613
  {
@@ -959,10 +1016,10 @@
959
1016
  }
960
1017
  },
961
1018
  {
962
- "name": "withContainer",
1019
+ "name": "stickyTop",
963
1020
  "annotation": {
964
1021
  "type": "keyword",
965
- "value": "boolean"
1022
+ "value": "number"
966
1023
  }
967
1024
  }
968
1025
  ],
@@ -24,3 +24,4 @@ import "./elevo-logo/index.js";
24
24
  import "./show-case/index.js";
25
25
  import "./data-providers/call-tool.js";
26
26
  import "./blank-state/index.js";
27
+ import "./sticky-container/index.js";
@@ -5,6 +5,7 @@ import "@next-core/theme";
5
5
  * 构件 `ai-portal.home-container`
6
6
  */
7
7
  export declare class HomeContainer extends ReactNextElement {
8
+ accessor sticky: boolean | undefined;
8
9
  render(): React.JSX.Element;
9
10
  }
10
11
  export declare function HomeContainerComponent(): React.JSX.Element;
@@ -4,8 +4,7 @@ import "@next-core/theme";
4
4
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
5
5
  export interface McpToolsProps {
6
6
  list?: McpTool[];
7
- /** @deprecated */
8
- withContainer?: boolean;
7
+ stickyTop?: number;
9
8
  }
10
9
  export interface McpTool {
11
10
  name: string;
@@ -23,7 +22,6 @@ export interface McpServer {
23
22
  */
24
23
  export declare class McpTools extends ReactNextElement implements McpToolsProps {
25
24
  accessor list: McpTool[] | undefined;
26
- /** @deprecated */
27
- accessor withContainer: boolean;
25
+ accessor stickyTop: number | undefined;
28
26
  render(): React.JSX.Element;
29
27
  }
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
- import type { Link, LinkProps } from "@next-bricks/basic/link";
5
- export declare const WrappedLink: import("@next-core/react-element").WrappedBrick<Link, LinkProps>;
6
4
  export interface PageContainerProps {
7
5
  pageTitle?: string;
8
6
  breadcrumbs?: Breadcrumb[];
9
7
  size?: "medium" | "small";
8
+ sticky?: boolean;
10
9
  }
11
10
  export interface Breadcrumb {
12
11
  text: string;
@@ -22,5 +21,6 @@ export declare class PageContainer extends ReactNextElement implements PageConta
22
21
  accessor pageTitle: string | undefined;
23
22
  accessor breadcrumbs: Breadcrumb[] | undefined;
24
23
  accessor size: "medium" | "small" | undefined;
24
+ accessor sticky: boolean | undefined;
25
25
  render(): React.JSX.Element;
26
26
  }
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { ReactNextElement } from "@next-core/react-element";
3
+ import "@next-core/theme";
4
+ export interface StickyContainerProps {
5
+ variant?: StickyContainerVariant;
6
+ }
7
+ export type StickyContainerVariant = "default" | "home";
8
+ /**
9
+ * 构件 `ai-portal.sticky-container`
10
+ *
11
+ * @slot - 内容
12
+ * @slot header - 头部
13
+ * @slot toolbar - 工具栏
14
+ */
15
+ export declare class StickyContainer extends ReactNextElement implements StickyContainerProps {
16
+ /**
17
+ * @default "default"
18
+ */
19
+ accessor variant: StickyContainerVariant | undefined;
20
+ render(): React.JSX.Element;
21
+ }
@@ -0,0 +1 @@
1
+ import "./";
@@ -0,0 +1,11 @@
1
+ 构件 `ai-portal.sticky-container`
2
+
3
+ ## Examples
4
+
5
+ ### Basic
6
+
7
+ ```yaml preview
8
+ brick: ai-portal.sticky-container
9
+ properties:
10
+ textContent: Hello world
11
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,5 +47,5 @@
47
47
  "@next-bricks/presentational": "*",
48
48
  "@next-bricks/vs": "*"
49
49
  },
50
- "gitHead": "336c6c2a05081e58823ac5283ea5171ed79f120a"
50
+ "gitHead": "ccc2cea967bcd6749b4939229125efe44e138af4"
51
51
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 8551.af6f8818.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[8551],{24:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const o=s.toString()},10335:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.goal-container{display:flex;flex-direction:column;gap:3px}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},11816:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.button-container{display:flex;gap:6px}.action::part(button){height:28px;font-size:13px;padding:5px 10px}.action.active::part(button){color:var(--elevo-color-brand);background-color:rgba(var(--elevo-color-brand-rgb-channel),0.04);border-color:#c9d7ff}.icon{font-size:16px;margin-right:4px}.remove{padding:1px;font-size:14px;margin-left:10px}",""]);const o=s.toString()},14763:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block;color:#262626}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.activity{position:relative;padding-left:27px}.activity + .activity{margin-top:20px}.main{display:flex;align-items:flex-start}.action{flex:1;min-width:0;display:flex;align-items:center;margin-left:6px;word-break:break-word}.time{color:#8c8c8c;margin-left:12px}.action,\n.time{padding:1px 0}.guide-line{position:absolute;left:8px;top:0;bottom:-20px;width:0;background-color:#d8d8d8}.guide-line::before{content:"";position:absolute;top:0;bottom:0;left:3.5px;width:1px;background-color:#d8d8d8}.guide-line::after{content:"";position:absolute;top:8px;left:0;width:8px;height:8px;border-radius:8px;background-color:#d8d8d8}.activity:first-child .guide-line::before{top:12px}.activity:last-child .guide-line::before{height:12px;bottom:auto}.comment{position:relative;font-size:13px;color:#595959;background-color:#f3f3f3;border-radius:8px;padding:8px 12px;margin-top:10px}.comment::before{content:"";position:absolute;top:-6px;left:36px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #f3f3f3}.conversation{margin:0 7px 0 10px}.conversation::part(link){background:#f9f0ff;border-radius:3px;font-weight:500;font-size:12px;color:#aa64f5;display:flex;align-items:center;height:24px;padding:0 8px}.external-link-icon{color:#8c8c8c}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}',""]);const o=s.toString()},19428:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:flex;flex-direction:column;align-items:center;gap:26px}:host([hidden]){display:none}p{color:rgba(0,0,0,0.45);margin:0}",""]);const o=s.toString()},20124:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.tabs{list-style:none;padding:0;margin:0;display:flex;font-size:16px}.tabs .tab + .tab{margin-left:32px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}',""]);const o=s.toString()},23677:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.item:not(:last-child){margin-bottom:4px}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.icon{font-size:20px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment{color:#1a7aff;margin-left:8px}.header{display:flex;align-items:center}.description{color:#595959;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);margin:0 16px}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:center;width:32px;height:32px}.link.actions-active .avatar,\n.link:hover .avatar,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},25676:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},31653:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}img{vertical-align:middle}",""]);const o=s.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(25676),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/72c24398.png"},38680:(e,t,i)=>{var n,a=i(74635),r=i(70918),s=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),p=i(18769),h=i.n(p),u=i(90870),m=i(30981),g=(i(34419),i(68443)),b=i(2901),A=i(30291);let x,k,E,f,v,w,y,T,C,S,_,N,R,M,I,W,O,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,se,oe,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we,ye,Te;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:Ce,property:Se,event:_e,method:Ne}=(0,u.createDecorators)(),Re=(0,p.forwardRef)(A.B);let Me;var Ie=new WeakMap,We=new WeakMap,Oe=new WeakMap,De=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ze=new WeakMap,Ue=new WeakMap,He=new WeakMap,Be=new WeakMap,Ve=new WeakMap,je=new WeakMap,Fe=new WeakMap,Ge=new WeakMap,Ye=new WeakMap,Ke=new WeakMap,Je=new WeakMap,$e=new WeakMap,qe=new WeakMap,Xe=new WeakSet,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,st=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap;class dt extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Xe),(0,r.A)(this,Ie,(x(this),E(this))),(0,r.A)(this,We,(f(this),v(this))),(0,r.A)(this,Oe,(w(this),y(this))),(0,r.A)(this,De,(T(this),C(this))),(0,r.A)(this,Le,(S(this),_(this))),(0,r.A)(this,Pe,(N(this),R(this))),(0,r.A)(this,ze,(M(this),I(this))),(0,r.A)(this,Ue,(W(this),O(this))),(0,r.A)(this,He,(D(this),L(this))),(0,r.A)(this,Be,(P(this),z(this))),(0,r.A)(this,Ve,(U(this),H(this))),(0,r.A)(this,je,(B(this),V(this))),(0,r.A)(this,Fe,(j(this),F(this))),(0,r.A)(this,Ge,(G(this),Y(this))),(0,r.A)(this,Ye,(K(this),J(this))),(0,r.A)(this,Ke,($(this),q(this))),(0,r.A)(this,Je,(X(this),Q(this))),(0,r.A)(this,$e,(Z(this),ee(this))),(0,r.A)(this,qe,(te(this),ie(this))),(0,r.A)(this,Qe,(re(this),()=>{(0,o.A)(Xe,this,ne).emit()})),(0,r.A)(this,Ze,se(this)),(0,r.A)(this,et,(ce(this),()=>{(0,o.A)(Xe,this,oe).emit()})),(0,r.A)(this,tt,de(this)),(0,r.A)(this,it,(ue(this),e=>{(0,o.A)(Xe,this,pe).emit(e)})),(0,r.A)(this,nt,me(this)),(0,r.A)(this,at,(Ae(this),e=>{(0,o.A)(Xe,this,ge).emit(e)})),(0,r.A)(this,rt,xe(this)),(0,r.A)(this,st,(fe(this),()=>{(0,o.A)(Xe,this,ke).emit("chat")})),(0,r.A)(this,ot,ve(this)),(0,r.A)(this,lt,(Te(this),e=>{(0,o.A)(Xe,this,we).emit(e)})),(0,r.A)(this,ct,(0,p.createRef)())}get conversationId(){return(0,c.A)(Ie,this)}set conversationId(e){(0,l.A)(Ie,this,e)}get initialRequest(){return(0,c.A)(We,this)}set initialRequest(e){(0,l.A)(We,this,e)}get replay(){return(0,c.A)(Oe,this)}set replay(e){(0,l.A)(Oe,this,e)}get replayDelay(){return(0,c.A)(De,this)}set replayDelay(e){(0,l.A)(De,this,e)}get supports(){return(0,c.A)(Le,this)}set supports(e){(0,l.A)(Le,this,e)}get showHiddenJobs(){return(0,c.A)(Pe,this)}set showHiddenJobs(e){(0,l.A)(Pe,this,e)}get showHumanActions(){return(0,c.A)(ze,this)}set showHumanActions(e){(0,l.A)(ze,this,e)}get showFeedback(){return(0,c.A)(Ue,this)}set showFeedback(e){(0,l.A)(Ue,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(He,this)}set showFeedbackAfterFailed(e){(0,l.A)(He,this,e)}get showFeedbackOnView(){return(0,c.A)(Be,this)}set showFeedbackOnView(e){(0,l.A)(Be,this,e)}get showUiSwitch(){return(0,c.A)(Ve,this)}set showUiSwitch(e){(0,l.A)(Ve,this,e)}get hideMermaid(){return(0,c.A)(je,this)}set hideMermaid(e){(0,l.A)(je,this,e)}get showJsxEditor(){return(0,c.A)(Fe,this)}set showJsxEditor(e){(0,l.A)(Fe,this,e)}get previewUrlTemplate(){return(0,c.A)(Ge,this)}set previewUrlTemplate(e){(0,l.A)(Ge,this,e)}get showCases(){return(0,c.A)(Ye,this)}set showCases(e){(0,l.A)(Ye,this,e)}get exampleProjects(){return(0,c.A)(Ke,this)}set exampleProjects(e){(0,l.A)(Ke,this,e)}get tryItOutUrl(){return(0,c.A)(Je,this)}set tryItOutUrl(e){(0,l.A)(Je,this,e)}get separateInstructions(){return(0,c.A)($e,this)}set separateInstructions(e){(0,l.A)($e,this,e)}resumed(){var e,t;null===(e=(0,c.A)(ct,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(ct,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(ct,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(ct,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(Re,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,separateInstructions:this.separateInstructions,onShare:(0,c.A)(Qe,this),onTerminate:(0,c.A)(et,this),onSubmitFeedback:(0,c.A)(it,this),onSwitchToChat:(0,c.A)(st,this),onFeedbackOnView:(0,c.A)(at,this),onDetailChange:(0,c.A)(lt,this),ref:(0,c.A)(ct,this)})}}n=dt,({e:[E,f,v,w,y,T,C,S,_,N,R,M,I,W,O,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,se,oe,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we,ye,Te,x],c:[Me,k]}=(0,d.A)(n,[Ce("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Se(),1,"conversationId"],[Se({attribute:!1,render:!1}),1,"initialRequest"],[Se({type:Boolean,render:!1}),1,"replay"],[Se({type:Number,render:!1}),1,"replayDelay"],[Se({attribute:!1}),1,"supports"],[Se({type:Boolean}),1,"showHiddenJobs"],[Se({type:Boolean}),1,"showHumanActions"],[Se({type:Boolean}),1,"showFeedback"],[Se({type:Boolean}),1,"showFeedbackAfterFailed"],[Se({type:Boolean}),1,"showFeedbackOnView"],[Se({type:Boolean}),1,"showUiSwitch"],[Se({type:Boolean,render:!1}),1,"hideMermaid"],[Se({type:Boolean}),1,"showJsxEditor"],[Se(),1,"previewUrlTemplate"],[Se({attribute:!1}),1,"showCases"],[Se({attribute:!1}),1,"exampleProjects"],[Se(),1,"tryItOutUrl"],[Se({type:Boolean}),1,"separateInstructions"],[_e({type:"share"}),1,"shareEvent",e=>(0,c.A)(qe,e),(e,t)=>(0,l.A)(qe,e,t)],[_e({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ze,e),(e,t)=>(0,l.A)(Ze,e,t)],[_e({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(tt,e),(e,t)=>(0,l.A)(tt,e,t)],[_e({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(nt,e),(e,t)=>(0,l.A)(nt,e,t)],[_e({type:"ui.switch"}),1,"switch",e=>(0,c.A)(rt,e),(e,t)=>(0,l.A)(rt,e,t)],[_e({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(ot,e),(e,t)=>(0,l.A)(ot,e,t)],[Ne(),2,"resumed"],[Ne(),2,"feedbackSubmitDone"],[Ne(),2,"feedbackSubmitFailed"],[Ne(),2,"feedbackOnViewDone"]],0,(e=>ct.has((0,s.A)(e))),m.ReactNextElement)),k();var pt=i(24586);const ht=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"];function ut(e){const t=window.getComputedStyle(e);return`${ht.map((e=>`${e}:${t.getPropertyValue(e)}`)).join(";")};\n min-height: 0!important;\n max-height: none!important;\n height: 0!important;\n visibility: hidden!important;\n overflow: hidden!important;\n position: absolute!important;\n z-index: -1000!important;\n top: 0!important;\n left: 0!important;\n pointer-events: none!important;\n`}let mt,gt;var bt=i(89575),At=i(59435),xt=i(99126);let kt;const Et=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey",ft=p.forwardRef(vt);function vt(e,t){let{autoResize:i,minRows:n,maxRows:a,borderSize:r,paddingSize:s,containerRef:o,value:l,style:c,submitWhen:d,desiredSelectionRef:h,onChange:u,onSubmit:m,onKeyDown:g,onCompositionStart:b,onCompositionEnd:A,...x}=e;const k=null==i||i,[E,f]=(0,p.useState)(null!=l?l:""),v=(0,p.useRef)(null),[w,y]=(0,p.useState)(null);(0,p.useImperativeHandle)(t,(()=>({focus:()=>{const e=v.current;if(e){var t;const i=null===(t=e.value)||void 0===t?void 0:t.length;e.focus(),i&&e.setSelectionRange(i,i)}},element:v.current})),[]);const T=(0,p.useCallback)((()=>{const e=v.current;if(e&&k){const t=function(e,t){const{minRows:i=null,maxRows:n=null,borderSize:a=2,paddingSize:r=8}=null!=t?t:{};let s,o,l;kt||(kt=document.createElement("textarea"),kt.setAttribute("tab-index","-1"),kt.setAttribute("aria-hidden","true"),document.body.appendChild(kt)),kt.setAttribute("style",ut(e)),kt.value=e.value||e.placeholder||"";let c=kt.scrollHeight+a;if(null!==i||null!==n){const e=parseFloat(window.getComputedStyle(kt).getPropertyValue("line-height"));null!==i&&(s=e*i+r+a,c=Math.max(s,c)),null!==n&&(o=e*n+r+a,c<=o&&(l="hidden"),c=Math.min(o,c))}const d={height:c,overflowY:l,resize:"none"};return s&&(d.minHeight=s),o&&(d.maxHeight=o),d}(e,{minRows:n,maxRows:a,borderSize:r,paddingSize:s});(0,At.flushSync)((()=>{y(t)}))}}),[k,a,n,r,s]);(0,p.useEffect)((()=>{f(null!=l?l:"")}),[l]),(0,p.useEffect)((()=>{T()}),[T,E]);const C=(0,p.useRef)(!1),S=(0,p.useCallback)((e=>{C.current=!0,null==b||b(e)}),[b]),_=(0,p.useCallback)((e=>{C.current=!1,null==A||A(e)}),[A]),N=(0,p.useCallback)((e=>{C.current||!1!==(null==g?void 0:g(e))&&"Enter"===e.key&&("enter-without-shift"===d?!e.shiftKey:"enter-with-mod"===d&&e[Et])&&(e.preventDefault(),e.stopPropagation(),null==m||m(e))}),[g,m,d]);return(0,p.useLayoutEffect)((()=>{const e=null==h?void 0:h.current,t=v.current;if(e&&t){const{start:i,end:n}=e;h.current=null,t.setSelectionRange(i,n)}}),[h,E]),(0,p.useEffect)((()=>{const e=null==o?void 0:o.current;if(!e||!k)return;let t;const i=new xt.A((i=>{for(const n of i)if(n.target===e){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width;if(void 0!==e&&e!==t){const i=!t;t=e,i||requestAnimationFrame(T)}}}));return i.observe(e),()=>{i.disconnect()}}),[k,o,T]),p.createElement("textarea",(0,bt.A)({},x,{ref:v,value:E,style:{...c,...w},onChange:e=>{f(e.target.value),null==u||u(e)},onCompositionStart:S,onCompositionEnd:_,onKeyDown:N}))}let wt=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const yt="bricks/ai-portal/chat-box",Tt={en:{[wt.ASK_ANY_THING]:"Ask anything",[wt.COMMON_TASKS]:"Common tasks"},zh:{[wt.ASK_ANY_THING]:"询问任何问题",[wt.COMMON_TASKS]:"常用任务"}},Ct=g.i18n.getFixedT(null,yt);var St,_t=i(47008);let Nt,Rt,Mt,It,Wt,Ot,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt,Ft,Gt,Yt;(0,g.initializeI18n)(yt,Tt);const Kt=(0,m.wrapBrick)("eo-icon"),Jt=(0,m.wrapBrick)("eo-actions",{onActionClick:"action.click",onItemDragEnd:"item.drag.end",onItemDragStart:"item.drag.start"}),{defineElement:$t,property:qt,event:Xt,method:Qt}=(0,u.createDecorators)(),Zt=(0,p.forwardRef)(pi);let ei;var ti=new WeakMap,ii=new WeakMap,ni=new WeakMap,ai=new WeakMap,ri=new WeakMap,si=new WeakSet,oi=new WeakMap,li=new WeakMap,ci=new WeakMap;class di extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,si),(0,pt.A)(this,"ref",(Nt(this),(0,p.createRef)())),(0,r.A)(this,ti,Mt(this)),(0,r.A)(this,ii,(It(this),Wt(this))),(0,r.A)(this,ni,(Ot(this),Dt(this))),(0,r.A)(this,ai,(Lt(this),Pt(this))),(0,r.A)(this,ri,(zt(this),Ut(this))),(0,r.A)(this,oi,(Vt(this),e=>{(0,o.A)(si,this,Ht).emit(e)})),(0,r.A)(this,li,jt(this)),(0,r.A)(this,ci,(Yt(this),e=>{(0,o.A)(si,this,Ft).emit(e)}))}get disabled(){return(0,c.A)(ti,this)}set disabled(e){(0,l.A)(ti,this,e)}get placeholder(){return(0,c.A)(ii,this)}set placeholder(e){(0,l.A)(ii,this,e)}get autoFocus(){return(0,c.A)(ni,this)}set autoFocus(e){(0,l.A)(ni,this,e)}get aiEmployees(){return(0,c.A)(ai,this)}set aiEmployees(e){(0,l.A)(ai,this,e)}setValue(e){var t;null===(t=this.ref.current)||void 0===t||t.setValue(e)}getValue(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.getValue()}focusOnInput(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.focusOnInput()}render(){return h().createElement(Zt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,aiEmployees:this.aiEmployees,onSubmit:(0,c.A)(oi,this),onEmployeeMention:(0,c.A)(ci,this),ref:this.ref})}}function pi(e,t){let{disabled:i,placeholder:n,autoFocus:a,aiEmployees:r,onSubmit:s,onEmployeeMention:o}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(null),[A,x]=(0,p.useState)(""),[k,E]=(0,p.useState)(0),f=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=window.__elevo_try_it_out;e&&delete window.__elevo_try_it_out,"string"==typeof(null==e?void 0:e.content)&&(m.current=e.content,u(e.content))}),[]),(0,p.useImperativeHandle)(t,(()=>({setValue:e=>{m.current=e,u(e)},getValue:()=>m.current,focusOnInput:()=>{var e;null===(e=c.current)||void 0===e||e.focus()}})));const v=(0,p.useCallback)((e=>{e.currentTarget.value&&s(e.currentTarget.value)}),[s]),w=(0,p.useCallback)((e=>{const{value:t,selectionStart:i,selectionEnd:n}=e.target;if(m.current=t,u(t),!A&&null!==i&&i===n&&null!=r&&r.length){const n=t.slice(0,i),a=n.lastIndexOf("@");if(a>=0){const t=n.slice(a+1).toLowerCase(),s=function(e,t){mt||(mt=document.createElement("div"),mt.setAttribute("tab-index","-1"),mt.setAttribute("aria-hidden","true"),document.body.appendChild(mt)),mt.setAttribute("style",ut(e)),mt.textContent=e.value.slice(0,t);const i=document.createElement("span");i.textContent="​",mt.appendChild(i);const n=i.getBoundingClientRect();return i.remove(),{top:n.top,left:n.left}}(e.currentTarget,i),o=r.filter((e=>e.employeeId.toLowerCase().includes(t)||e.name.toLowerCase().includes(t))).slice(0,10);if(o.length>0)return b({position:{left:s.left+10,top:s.top+22},range:{start:a,end:i},actions:o.map((e=>({key:e.employeeId,text:e.name,data:e})))}),void E(0)}}b(null)}),[r,A]);(0,p.useEffect)((()=>{A&&!d.includes(A)&&(x(""),o(null))}),[A,o,d]);const y=(0,p.useCallback)((()=>{s(m.current)}),[s]);(0,p.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=c.current)||void 0===e||e.focus()}))}),[]);const T=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return"";const i=d.indexOf(A);return i<0?"":d.slice(0,i)}),[A,d]),C=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return null;const i=function(e,t,i){gt||(gt=document.createElement("div"),gt.setAttribute("tab-index","-1"),gt.setAttribute("aria-hidden","true"),document.body.appendChild(gt)),gt.setAttribute("style",ut(e)),gt.textContent=t;const n=document.createElement("span");n.textContent=i,gt.appendChild(n);const a=n.getBoundingClientRect();return n.remove(),a}(t,T,A.slice(0,-1));return{left:i.left-1,top:i.top-1,width:i.width+4,height:i.height+4}}),[A,T]),S=(0,p.useCallback)((e=>{const t=`@${e.text} `,i=`${m.current.slice(0,g.range.start)}${t}`,n=`${i}${m.current.slice(g.range.end)}`;m.current=n,f.current={start:i.length,end:i.length},u(n),x(t),b(null),o(e.data)}),[g,o]),_=(0,p.useCallback)((e=>{switch(e.key){case"Escape":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),b(null),!1;case"ArrowUp":case"ArrowDown":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),E((t=>{const i=t+("ArrowUp"===e.key?-1:1),n=g.actions.length;return(n+i)%n})),!1;case"Enter":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),S(g.actions[k]),!1;case"Delete":case"Backspace":if(null!=A&&A.length){let{selectionStart:t,selectionEnd:i}=e.currentTarget;t===i&&("Backspace"===e.key?t-=1:i+=1);const n=T.length,a=n+A.length;if(t<a&&i>n){const r=Math.min(t,n),s=Math.max(i,a),o=`${m.current.slice(0,r)}${m.current.slice(s)}`;return m.current=o,f.current={start:r,end:r},u(o),e.preventDefault(),e.stopPropagation(),!1}}}}),[k,S,g,T.length,null==A?void 0:A.length]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:l},h().createElement(ft,{containerRef:l,ref:c,value:d,minRows:58/22,paddingSize:60,autoResize:!0,disabled:i,placeholder:null!=n?n:Ct(wt.ASK_ANY_THING),submitWhen:"enter-without-shift",desiredSelectionRef:f,onSubmit:v,onChange:w,onKeyDown:_}),h().createElement("div",{className:"actions-bar"},h().createElement("div",null,h().createElement("slot",{name:"actions"})),h().createElement("button",{className:"btn-send",disabled:!d,onClick:y},h().createElement(Kt,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),g&&h().createElement(Jt,{className:"mentions",actions:g.actions,style:g.position,onActionClick:e=>S(e.detail),checkedKeys:[g.actions[k].key]}),C&&h().createElement("div",{className:"mention-overlay",style:C})))}St=di,({e:[Mt,It,Wt,Ot,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt,Ft,Gt,Yt,Nt],c:[ei,Rt]}=(0,d.A)(St,[$t("ai-portal.chat-box",{styleTexts:[_t.A],shadowOptions:{delegatesFocus:!0}})],[[qt({type:Boolean}),1,"disabled"],[qt(),1,"placeholder"],[qt({type:Boolean}),1,"autoFocus"],[qt({attribute:!1}),1,"aiEmployees"],[Xt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(ri,e),(e,t)=>(0,l.A)(ri,e,t)],[Xt({type:"ai-employee.mention"}),1,"employeeMention",e=>(0,c.A)(li,e),(e,t)=>(0,l.A)(li,e,t)],[Qt(),2,"setValue"],[Qt(),2,"getValue"],[Qt(),2,"focusOnInput"]],0,(e=>ci.has((0,s.A)(e))),m.ReactNextElement)),Rt();var hi,ui=i(82165);let mi;const{defineElement:gi}=(0,u.createDecorators)();let bi;class Ai extends m.ReactNextElement{render(){return h().createElement(xi,null)}}function xi(){return h().createElement("slot",null)}hi=Ai,[bi,mi]=(0,d.A)(hi,[gi("ai-portal.home-container",{styleTexts:[ui.A]})],[],0,void 0,m.ReactNextElement).c,mi();var ki,Ei=i(24);let fi,vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Wi,Oi,Di,Li,Pi,zi,Ui,Hi,Bi;const Vi=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:ji,property:Fi}=(0,u.createDecorators)();let Gi;var Yi=new WeakMap,Ki=new WeakMap,Ji=new WeakMap,$i=new WeakMap,qi=new WeakMap,Xi=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,en=new WeakMap,tn=new WeakMap;class nn extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Yi,vi(this)),(0,r.A)(this,Ki,(wi(this),yi(this))),(0,r.A)(this,Ji,(Ti(this),Ci(this))),(0,r.A)(this,$i,(Si(this),_i(this))),(0,r.A)(this,qi,(Ni(this),Ri(this))),(0,r.A)(this,Xi,(Mi(this),Ii(this))),(0,r.A)(this,Qi,(Wi(this),Oi(this))),(0,r.A)(this,Zi,(Di(this),Li(this))),(0,r.A)(this,en,(Pi(this),zi(this))),(0,r.A)(this,tn,(Ui(this),Hi(this))),Bi(this)}get label(){return(0,c.A)(Yi,this)}set label(e){(0,l.A)(Yi,this,e)}get value(){return(0,c.A)(Ki,this)}set value(e){(0,l.A)(Ki,this,e)}get size(){return(0,c.A)(Ji,this)}set size(e){(0,l.A)(Ji,this,e)}get lineColor(){return(0,c.A)($i,this)}set lineColor(e){(0,l.A)($i,this,e)}get showArea(){return(0,c.A)(qi,this)}set showArea(e){(0,l.A)(qi,this,e)}get min(){return(0,c.A)(Xi,this)}set min(e){(0,l.A)(Xi,this,e)}get max(){return(0,c.A)(Qi,this)}set max(e){(0,l.A)(Qi,this,e)}get xField(){return(0,c.A)(Zi,this)}set xField(e){(0,l.A)(Zi,this,e)}get yField(){return(0,c.A)(en,this)}set yField(e){(0,l.A)(en,this,e)}get data(){return(0,c.A)(tn,this)}set data(e){(0,l.A)(tn,this,e)}render(){return h().createElement(an,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function an(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(Vi,(0,bt.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(Vi,(0,bt.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}ki=nn,({e:[vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Wi,Oi,Di,Li,Pi,zi,Ui,Hi,Bi],c:[Gi,fi]}=(0,d.A)(ki,[ji("ai-portal.stat-with-mini-chart",{styleTexts:[Ei.A]})],[[Fi(),1,"label"],[Fi(),1,"value"],[Fi(),1,"size"],[Fi(),1,"lineColor"],[Fi({type:Boolean}),1,"showArea"],[Fi({type:Number}),1,"min"],[Fi({type:Number}),1,"max"],[Fi(),1,"xField"],[Fi(),1,"yField"],[Fi({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),fi();var rn=i(51921),sn=i(53373),on=i.n(sn);let ln=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e.UNTITLED="UNTITLED",e.UNNAMED="UNNAMED",e}({});const cn="bricks/ai-portal/elevo-sidebar",dn={en:{[ln.NEW_CHAT]:"New chat",[ln.LOGOUT]:"Logout",[ln.TODAY]:"Today",[ln.YESTERDAY]:"Yesterday",[ln.PREVIOUS_7_DAYS]:"Previous 7 days",[ln.PREVIOUS_30_DAYS]:"Previous 30 days",[ln.SWITCH_LANGUAGE]:"中文",[ln.PROJECTS]:"Projects",[ln.HISTORY]:"Chats",[ln.CREATE_PROJECT]:"Create project",[ln.MOVE_TO_PROJECT]:"Move to project",[ln.UNTITLED]:"Untitled",[ln.UNNAMED]:"Unnamed"},zh:{[ln.NEW_CHAT]:"新对话",[ln.LOGOUT]:"登出",[ln.TODAY]:"今天",[ln.YESTERDAY]:"昨天",[ln.PREVIOUS_7_DAYS]:"过去7天",[ln.PREVIOUS_30_DAYS]:"过去30天",[ln.SWITCH_LANGUAGE]:"English",[ln.PROJECTS]:"项目",[ln.HISTORY]:"对话",[ln.CREATE_PROJECT]:"创建项目",[ln.MOVE_TO_PROJECT]:"移动到项目",[ln.UNTITLED]:"无标题",[ln.UNNAMED]:"未命名"}},pn=g.i18n.getFixedT(null,cn);var hn=i(61408);const un=(0,m.wrapBrick)("eo-icon"),mn=(0,m.wrapBrick)("eo-link"),gn=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),bn=(0,m.wrapBrick)("eo-easyops-avatar"),An=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),xn=(0,m.wrapBrick)("ai-portal.icon-button");var kn=i(22919);const En=async(e,t)=>(await kn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var fn=i(41030),vn=i(40177),wn=i(65549);const yn={lib:"fa",icon:"plus"},Tn=(0,p.forwardRef)(Cn);function Cn(e,t){let{historyActiveId:i,historyActions:n,historyUrlTemplate:a,projectActiveId:r,projectUrlTemplate:s,projectActions:o,canAddProject:l,onActionClick:c,onHistoryClick:d,onProjectActionClick:u,onAddProject:m}=e;const g=(0,p.useRef)(null),[b,A]=(0,p.useState)(null),[x,k]=(0,p.useState)(!1),[E,f]=(0,p.useState)(!1),[v,w]=(0,p.useState)(null),[y,T]=(0,p.useState)(!1),[C,S]=(0,p.useState)(),[_,N]=(0,p.useState)(),[R,M]=(0,p.useState)(!1),I=(0,p.useRef)(!0),[W,O]=(0,p.useState)([]),D=(0,p.useMemo)((()=>[...null!=n?n:[],{isDropdown:!0,text:pn(ln.MOVE_TO_PROJECT),disabled:!(null!=b&&b.length),items:null==b?void 0:b.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[n,b]);(0,p.useEffect)((()=>{(async()=>{try{const e=await(async()=>(await kn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();A(e.list)}catch(e){console.error("Error loading projects:",e),f(!0),A([])}})()}),[]),(0,p.useEffect)((()=>{Promise.all([En({token:_,limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...I.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;I.current=!1,w((e=>[...null!=e?e:[],...t.conversations])),S(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),w([]),M(!0)}))}),[_]);const[L,P]=(0,p.useState)(null),z=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=z.current,t=g.current;if(!e||!C||!t||y)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&N(C)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[C,y]);const U=(0,p.useRef)(0),H=(0,p.useCallback)((async()=>{try{const e=++U.current,t=await En({limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==U.current)return;w((e=>{const i=null!=e?e:[],n=t.conversations,a=new Set(n.map((e=>e.conversationId))),r=new Map(n.map((e=>[e.conversationId,e])));let s=!1,o=!1,l=!0;for(const e of i){const t=r.get(e.conversationId);if(!t)break;if(s=!0,o=l&&t!==n[0]||!(0,fn.isEqual)(t,e),o)break;l=!1}return s?o?[...n,...i.filter((e=>!a.has(e.conversationId)))]:e:(S(t.nextToken),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);(0,p.useImperativeHandle)(t,(()=>({pull:H,removeProject:e=>{A((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{A((t=>t?[...t,e]:[e]))},moveConversation:e=>{O((t=>[...t,e]))}})),[H]);const B=(0,p.useMemo)((()=>v&&v.length?v.filter((e=>!W.includes(e.conversationId))):v),[v,W]);return h().createElement("div",{className:"history",ref:g},h().createElement("div",{className:on()("section",{collapsed:x})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>k((e=>!e))},pn(ln.PROJECTS),h().createElement(un,{lib:"fa",icon:"angle-down"})),l&&h().createElement(xn,{icon:yn,variant:"mini-light",tooltip:pn(ln.CREATE_PROJECT),onClick:m})),h().createElement("ul",{className:"items"},E?h().createElement("li",{className:"error"},"Failed to load project"):b?b.map((e=>h().createElement("li",{key:e.instanceId},h().createElement(mn,(0,bt.A)({className:on()("item",{"actions-active":e.instanceId===L,active:e.instanceId===r}),onClick:d},s?{url:(0,wn.Q)(s,e)}:null),h().createElement("div",{className:"item-title",title:e.name},e.name||pn(ln.UNNAMED)),h().createElement(An,{className:"actions",actions:o,onActionClick:t=>{u({action:t.detail,project:e})},onVisibleChange:t=>{P(t.detail?e.instanceId:null)}}))))):h().createElement("li",{className:"loading"},h().createElement(un,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),h().createElement("div",{className:on()("section",{collapsed:y})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>T((e=>!e))},pn(ln.HISTORY),h().createElement(un,{lib:"fa",icon:"angle-down"}))),h().createElement("ul",{className:"items"},B?B.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(mn,(0,bt.A)({className:on()("item",{"actions-active":e.conversationId===L,active:e.conversationId===i}),onClick:d},a?{url:(0,wn.Q)(a,e)}:null),h().createElement("div",{className:"item-title",title:e.title},e.title||pn(ln.UNTITLED)),h().createElement(An,{className:"actions",actions:D,onActionClick:t=>{c({action:t.detail,item:e})},onVisibleChange:t=>{P(t.detail?e.conversationId:null)}}),!vn.QB.includes(e.state)&&h().createElement("div",{className:"working"}))))):h().createElement("li",{className:"loading"},h().createElement(un,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),R?h().createElement("li",{className:"error"},"Failed to load chat history"):null),!y&&C&&h().createElement("div",{className:"load-more",ref:z},h().createElement(un,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}var Sn;let _n,Nn,Rn,Mn,In,Wn,On,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,sa,oa,la,ca,da,pa,ha,ua,ma,ga,ba,Aa,xa,ka;(0,g.initializeI18n)(cn,dn);const Ea={lib:"easyops",icon:"sidebar"},fa=(0,m.wrapBrick)("ai-portal.elevo-logo"),{defineElement:va,property:wa,event:ya,method:Ta}=(0,u.createDecorators)(),Ca=(0,p.forwardRef)(Za);let Sa;var _a=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ia=new WeakMap,Wa=new WeakMap,Oa=new WeakMap,Da=new WeakMap,La=new WeakMap,Pa=new WeakMap,za=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,Ba=new WeakMap,Va=new WeakMap,ja=new WeakSet,Fa=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Ka=new WeakMap,Ja=new WeakMap,$a=new WeakMap,qa=new WeakMap,Xa=new WeakMap;class Qa extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ja),(0,r.A)(this,_a,(_n(this),Rn(this))),(0,r.A)(this,Na,(Mn(this),In(this))),(0,r.A)(this,Ra,(Wn(this),On(this))),(0,r.A)(this,Ma,(Dn(this),Ln(this))),(0,r.A)(this,Ia,(Pn(this),zn(this))),(0,r.A)(this,Wa,(Un(this),Hn(this))),(0,r.A)(this,Oa,(Bn(this),Vn(this))),(0,r.A)(this,Da,(jn(this),Fn(this))),(0,r.A)(this,La,(Gn(this),Yn(this))),(0,r.A)(this,Pa,(Kn(this),Jn(this))),(0,r.A)(this,za,($n(this),qn(this))),(0,r.A)(this,Ua,(Xn(this),Qn(this))),(0,r.A)(this,Ha,(Zn(this),ea(this))),(0,r.A)(this,Ba,(ta(this),ia(this,!0))),(0,r.A)(this,Va,(na(this),aa(this))),(0,r.A)(this,Fa,(oa(this),()=>{(0,o.A)(ja,this,ra).emit()})),(0,r.A)(this,Ga,la(this)),(0,r.A)(this,Ya,(pa(this),e=>{(0,o.A)(ja,this,ca).emit(e)})),(0,r.A)(this,Ka,ha(this)),(0,r.A)(this,Ja,(ga(this),e=>{(0,o.A)(ja,this,ua).emit(e)})),(0,r.A)(this,$a,ba(this)),(0,r.A)(this,qa,(ka(this),()=>{(0,o.A)(ja,this,Aa).emit()})),(0,r.A)(this,Xa,(0,p.createRef)())}get userInstanceId(){return(0,c.A)(_a,this)}set userInstanceId(e){(0,l.A)(_a,this,e)}get behavior(){return(0,c.A)(Na,this)}set behavior(e){(0,l.A)(Na,this,e)}get bordered(){return(0,c.A)(Ra,this)}set bordered(e){(0,l.A)(Ra,this,e)}get logoUrl(){return(0,c.A)(Ma,this)}set logoUrl(e){(0,l.A)(Ma,this,e)}get newChatUrl(){return(0,c.A)(Ia,this)}set newChatUrl(e){(0,l.A)(Ia,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(Wa,this)}set newChatLinkWhenCollapsed(e){(0,l.A)(Wa,this,e)}get historyActiveId(){return(0,c.A)(Oa,this)}set historyActiveId(e){(0,l.A)(Oa,this,e)}get historyUrlTemplate(){return(0,c.A)(Da,this)}set historyUrlTemplate(e){(0,l.A)(Da,this,e)}get historyActions(){return(0,c.A)(La,this)}set historyActions(e){(0,l.A)(La,this,e)}get projectActiveId(){return(0,c.A)(Pa,this)}set projectActiveId(e){(0,l.A)(Pa,this,e)}get projectUrlTemplate(){return(0,c.A)(za,this)}set projectUrlTemplate(e){(0,l.A)(za,this,e)}get projectActions(){return(0,c.A)(Ua,this)}set projectActions(e){(0,l.A)(Ua,this,e)}get links(){return(0,c.A)(Ha,this)}set links(e){(0,l.A)(Ha,this,e)}get canAddProject(){return(0,c.A)(Ba,this)}set canAddProject(e){(0,l.A)(Ba,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Xa,this).current)||void 0===e||e.pull()}),e)}open(){var e;null===(e=(0,c.A)(Xa,this).current)||void 0===e||e.open()}close(){var e;null===(e=(0,c.A)(Xa,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Xa,this).current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)}addProject(e){var t,i;null===(t=(0,c.A)(Xa,this).current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)}moveConversation(e){var t,i;null===(t=(0,c.A)(Xa,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return h().createElement(Ca,{ref:(0,c.A)(Xa,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectActiveId:this.projectActiveId,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,canAddProject:this.canAddProject,onLogout:(0,c.A)(Fa,this),onActionClick:(0,c.A)(Ya,this),onProjectActionClick:(0,c.A)(Ja,this),onAddProject:(0,c.A)(qa,this)})}}function Za(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:r,newChatLinkWhenCollapsed:s,historyActiveId:o,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,links:b,canAddProject:A,onLogout:x,onActionClick:k,onProjectActionClick:E,onAddProject:f}=e;const[v,w]=(0,p.useState)("drawer"===n),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((()=>{w(!1)}),[]);(0,p.useEffect)((()=>{"drawer"===n&&w(!0)}),[n]);const C=(0,p.useCallback)((()=>{w(!0)}),[]),S=(0,p.useCallback)((()=>{"drawer"===n&&w(!0)}),[n]),_=(0,p.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:pn(ln.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:pn(ln.SWITCH_LANGUAGE)}]),[]),N=(0,p.useRef)(null);return(0,p.useImperativeHandle)(t,(()=>({close:()=>{w(!0)},pull:()=>{var e;null===(e=N.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)},open:()=>{w(!1)}})),[]),h().createElement("div",{className:on()("container",{collapsed:v})},"drawer"===n&&!v&&h().createElement("div",{className:"mask",onClick:C}),h().createElement("div",{className:"alternative"},h().createElement(xn,{icon:Ea,variant:"light",onClick:T}),s&&h().createElement(mn,{className:"new-chat",url:r},h().createElement(un,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),pn(ln.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(mn,{url:a,className:"logo-link"},h().createElement(fa,null)),h().createElement(xn,{icon:Ea,variant:"light",onClick:y})),h().createElement(mn,{className:"new-chat",url:r},h().createElement(un,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),pn(ln.NEW_CHAT)),null!=b&&b.length?h().createElement("div",{className:"links"},b.map(((e,t)=>h().createElement(mn,{className:"link",key:t,url:e.url},h().createElement(un,(0,bt.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(Tn,{ref:N,canAddProject:A,historyActiveId:o,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,onActionClick:k,onHistoryClick:S,onProjectActionClick:E,onAddProject:f}),h().createElement("div",{className:"footer"},h().createElement(gn,{className:"dropdown",actions:_,onActionClick:async e=>{"logout"===e.detail.key?x():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,rn.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(bn,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}Sn=Qa,({e:[Rn,Mn,In,Wn,On,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,sa,oa,la,ca,da,pa,ha,ua,ma,ga,ba,Aa,xa,ka,_n],c:[Sa,Nn]}=(0,d.A)(Sn,[va("ai-portal.elevo-sidebar",{styleTexts:[hn.A]})],[[wa(),1,"userInstanceId"],[wa(),1,"behavior"],[wa({type:Boolean,render:!1}),1,"bordered"],[wa(),1,"logoUrl"],[wa(),1,"newChatUrl"],[wa({type:Boolean}),1,"newChatLinkWhenCollapsed"],[wa(),1,"historyActiveId"],[wa(),1,"historyUrlTemplate"],[wa({attribute:!1}),1,"historyActions"],[wa(),1,"projectActiveId"],[wa(),1,"projectUrlTemplate"],[wa({attribute:!1}),1,"projectActions"],[wa({attribute:!1}),1,"links"],[wa({type:Boolean}),1,"canAddProject"],[ya({type:"logout"}),1,"logout",e=>(0,c.A)(Va,e),(e,t)=>(0,l.A)(Va,e,t)],[ya({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Ga,e),(e,t)=>(0,l.A)(Ga,e,t)],[ya({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)(Ka,e),(e,t)=>(0,l.A)(Ka,e,t)],[ya({type:"add.project"}),1,"addProject",e=>(0,c.A)($a,e),(e,t)=>(0,l.A)($a,e,t)],[Ta(),2,"pullHistory"],[Ta(),2,"open"],[Ta(),2,"close"],[Ta(),2,"removeProject"],[Ta(),2,"addProject"],[Ta(),2,"moveConversation"]],0,(e=>Xa.has((0,s.A)(e))),m.ReactNextElement)),Nn();var er,tr=i(47338);let ir,nr,ar,rr,sr,or,lr,cr,dr;const pr=(0,m.wrapBrick)("eo-icon"),hr=(0,m.wrapBrick)("eo-tooltip"),{defineElement:ur,property:mr}=(0,u.createDecorators)();let gr;var br=new WeakMap,Ar=new WeakMap,xr=new WeakMap,kr=new WeakMap;class Er extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,br,nr(this)),(0,r.A)(this,Ar,(ar(this),rr(this))),(0,r.A)(this,xr,(sr(this),or(this))),(0,r.A)(this,kr,(lr(this),cr(this))),dr(this)}get icon(){return(0,c.A)(br,this)}set icon(e){(0,l.A)(br,this,e)}get tooltip(){return(0,c.A)(Ar,this)}set tooltip(e){(0,l.A)(Ar,this,e)}get disabled(){return(0,c.A)(xr,this)}set disabled(e){(0,l.A)(xr,this,e)}get variant(){return(0,c.A)(kr,this)}set variant(e){(0,l.A)(kr,this,e)}render(){return h().createElement(fr,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function fr(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(pr,t));return i?h().createElement(hr,{content:i},a):a}er=Er,({e:[nr,ar,rr,sr,or,lr,cr,dr],c:[gr,ir]}=(0,d.A)(er,[ur("ai-portal.icon-button",{styleTexts:[tr.A]})],[[mr({attribute:!1}),1,"icon"],[mr(),1,"tooltip"],[mr({type:Boolean}),1,"disabled"],[mr({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),ir();let vr=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const wr="bricks/ai-portal/show-cases",yr={en:{[vr.ALL]:"All",[vr.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[vr.ALL]:"全部",[vr.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},Tr=g.i18n.getFixedT(null,wr);var Cr,Sr=i(42873);let _r,Nr,Rr,Mr,Ir;(0,g.initializeI18n)(wr,yr);const Wr=(0,m.wrapBrick)("ai-portal.show-case"),Or=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Dr,property:Lr}=(0,u.createDecorators)();let Pr;var zr=new WeakMap,Ur=new WeakMap;class Hr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,zr,Nr(this)),(0,r.A)(this,Ur,(Rr(this),Mr(this))),Ir(this)}get list(){return(0,c.A)(zr,this)}set list(e){(0,l.A)(zr,this,e)}get limit(){return(0,c.A)(Ur,this)}set limit(e){(0,l.A)(Ur,this,e)}render(){return h().createElement(Br,{list:this.list,limit:this.limit})}}function Br(e){let{list:t,limit:i}=e;const n=(0,p.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,r]=(0,p.useState)(""),s=(0,p.useMemo)((()=>{if(!t)return;let e=t;return a&&(e=e.filter((e=>e.scenario===a))),i&&(e=e.slice(0,i)),e}),[a,t,i]),o=(0,p.useMemo)((()=>n.map((e=>({id:e,label:""===e?Tr(vr.ALL):e})))),[n]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("div",{className:"tips"},`${Tr(vr.EXPLORE_EXCELLENT_CASES)} ↓`),h().createElement(Or,{tabs:o,activeTab:a,onTabClick:e=>r(e.detail.id)}),h().createElement("ul",{className:"cases"},null==s?void 0:s.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(Wr,{caseTitle:e.title,summary:e.summary,url:e.url})))))):null}Cr=Hr,({e:[Nr,Rr,Mr,Ir],c:[Pr,_r]}=(0,d.A)(Cr,[Dr("ai-portal.show-cases",{styleTexts:[Sr.A]})],[[Lr({attribute:!1}),1,"list"],[Lr({type:Number}),1,"limit"]],0,void 0,m.ReactNextElement)),_r();let Vr=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const jr="bricks/ai-portal/mcp-tools",Fr={en:{[Vr.MCP_HUB]:"MCP Hub",[Vr.ALL]:"All",[Vr.SERVER_cmdb]:"CMDB",[Vr.SERVER_cmdb_product_helper]:"CMDB",[Vr.SERVER_alert]:"Alert",[Vr.SERVER_web_builder]:"View",[Vr.SERVER_web_builder2]:"View",[Vr.SERVER_host_troubleshooting]:"Host Troubleshooting",[Vr.SERVER_system_inspection]:"System Inspection",[Vr.SERVER_grafana]:"Grafana",[Vr.SERVER_kubernetes]:"Kubernetes",[Vr.SERVER_llm]:"LLM"},zh:{[Vr.MCP_HUB]:"MCP 中心",[Vr.ALL]:"全部",[Vr.SERVER_cmdb]:"CMDB",[Vr.SERVER_cmdb_product_helper]:"CMDB",[Vr.SERVER_alert]:"告警",[Vr.SERVER_web_builder]:"视图",[Vr.SERVER_web_builder2]:"视图",[Vr.SERVER_host_troubleshooting]:"主机故障排查",[Vr.SERVER_system_inspection]:"系统巡检",[Vr.SERVER_grafana]:"Grafana",[Vr.SERVER_kubernetes]:"Kubernetes",[Vr.SERVER_llm]:"大模型"}},Gr=g.i18n.getFixedT(null,jr);var Yr,Kr=i(31748);let Jr,$r,qr,Xr,Qr;(0,g.initializeI18n)(jr,Fr);const Zr={lib:"antd",icon:"tool"},es=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),ts=(0,m.wrapBrick)("eo-icon"),is=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:ns,property:as}=(0,u.createDecorators)();let rs;var ss=new WeakMap,os=new WeakMap;class ls extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ss,$r(this)),(0,r.A)(this,os,(qr(this),Xr(this,!0))),Qr(this)}get list(){return(0,c.A)(ss,this)}set list(e){(0,l.A)(ss,this,e)}get withContainer(){return(0,c.A)(os,this)}set withContainer(e){(0,l.A)(os,this,e)}render(){return h().createElement(cs,{list:this.list,withContainer:this.withContainer})}}function cs(e){let{list:t,withContainer:i}=e;const[n,a]=(0,p.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=Gr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const r=[...es.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),s=r?r[0]:"其他";let o=i.get(s);o||i.set(s,o=[]),o.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const r=n.indexOf(i),s=n.indexOf(a);return(r<0?n.length:r)-(s<0?n.length:s)}))),i]}),[t]),r=(0,p.useMemo)((()=>{const e=[...es.keys()],t=[...a.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),["",...t]}),[a]),[s,o]=(0,p.useState)(""),l=(0,p.useMemo)((()=>{const e=[...n];if(!s)return e;const t=a.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,n,a]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:""===e?Gr(Vr.ALL):e})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(is,{tabs:c,activeTab:s,onTabClick:e=>o(e.detail.id)}),h().createElement("ul",{className:"groups"},null==l?void 0:l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement(ts,(0,bt.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:Zr,{fallback:Zr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))));return i?h().createElement("div",{className:"container"},h().createElement("h1",null,Gr(Vr.MCP_HUB)),d):d}Yr=ls,({e:[$r,qr,Xr,Qr],c:[rs,Jr]}=(0,d.A)(Yr,[ns("ai-portal.mcp-tools",{styleTexts:[Kr.A]})],[[as({attribute:!1}),1,"list"],[as({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Jr();var ds,ps=i(48952),hs=i(68717);let us,ms,gs,bs,As,xs,ks,Es,fs,vs,ws,ys,Ts,Cs,Ss,_s,Ns,Rs,Ms,Is,Ws,Os,Ds,Ls,Ps,zs,Us,Hs,Bs,Vs,js,Fs,Gs,Ys,Ks,Js,$s,qs,Xs,Qs,Zs,eo,to,io,no,ao,ro,so,oo,lo,co,po,ho,uo,mo,go;(0,g.initializeI18n)(ps.NS,ps.I);const{defineElement:bo,property:Ao,event:xo,method:ko}=(0,u.createDecorators)(),Eo=(0,p.forwardRef)(hs.C);let fo;var vo=new WeakMap,wo=new WeakMap,yo=new WeakMap,To=new WeakMap,Co=new WeakMap,So=new WeakMap,_o=new WeakMap,No=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,Io=new WeakMap,Wo=new WeakMap,Oo=new WeakMap,Do=new WeakMap,Lo=new WeakMap,Po=new WeakMap,zo=new WeakSet,Uo=new WeakMap,Ho=new WeakMap,Bo=new WeakMap,Vo=new WeakMap,jo=new WeakMap,Fo=new WeakMap,Go=new WeakMap,Yo=new WeakMap,Ko=new WeakMap,Jo=new WeakMap,$o=new WeakMap,qo=new WeakMap;class Xo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,zo),(0,r.A)(this,vo,(us(this),gs(this))),(0,r.A)(this,wo,(bs(this),As(this))),(0,r.A)(this,yo,(xs(this),ks(this))),(0,r.A)(this,To,(Es(this),fs(this))),(0,r.A)(this,Co,(vs(this),ws(this))),(0,r.A)(this,So,(ys(this),Ts(this))),(0,r.A)(this,_o,(Cs(this),Ss(this))),(0,r.A)(this,No,(_s(this),Ns(this))),(0,r.A)(this,Ro,(Rs(this),Ms(this))),(0,r.A)(this,Mo,(Is(this),Ws(this))),(0,r.A)(this,Io,(Os(this),Ds(this))),(0,r.A)(this,Wo,(Ls(this),Ps(this))),(0,r.A)(this,Oo,(zs(this),Us(this))),(0,r.A)(this,Do,(Hs(this),Bs(this))),(0,r.A)(this,Lo,(Vs(this),js(this))),(0,r.A)(this,Po,(Fs(this),Gs(this))),(0,r.A)(this,Uo,(Js(this),()=>{(0,o.A)(zo,this,Ys).emit()})),(0,r.A)(this,Ho,$s(this)),(0,r.A)(this,Bo,(Qs(this),()=>{(0,o.A)(zo,this,qs).emit()})),(0,r.A)(this,Vo,Zs(this)),(0,r.A)(this,jo,(io(this),e=>{(0,o.A)(zo,this,eo).emit(e)})),(0,r.A)(this,Fo,no(this)),(0,r.A)(this,Go,(so(this),e=>{(0,o.A)(zo,this,ao).emit(e)})),(0,r.A)(this,Yo,oo(this)),(0,r.A)(this,Ko,(po(this),()=>{(0,o.A)(zo,this,lo).emit("canvas")})),(0,r.A)(this,Jo,ho(this)),(0,r.A)(this,$o,(go(this),e=>{(0,o.A)(zo,this,uo).emit(e)})),(0,r.A)(this,qo,(0,p.createRef)())}get conversationId(){return(0,c.A)(vo,this)}set conversationId(e){(0,l.A)(vo,this,e)}get initialRequest(){return(0,c.A)(wo,this)}set initialRequest(e){(0,l.A)(wo,this,e)}get replay(){return(0,c.A)(yo,this)}set replay(e){(0,l.A)(yo,this,e)}get replayDelay(){return(0,c.A)(To,this)}set replayDelay(e){(0,l.A)(To,this,e)}get supports(){return(0,c.A)(Co,this)}set supports(e){(0,l.A)(Co,this,e)}get showHumanActions(){return(0,c.A)(So,this)}set showHumanActions(e){(0,l.A)(So,this,e)}get showFeedback(){return(0,c.A)(_o,this)}set showFeedback(e){(0,l.A)(_o,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(No,this)}set showFeedbackAfterFailed(e){(0,l.A)(No,this,e)}get showFeedbackOnView(){return(0,c.A)(Ro,this)}set showFeedbackOnView(e){(0,l.A)(Ro,this,e)}get showUiSwitch(){return(0,c.A)(Mo,this)}set showUiSwitch(e){(0,l.A)(Mo,this,e)}get hideMermaid(){return(0,c.A)(Io,this)}set hideMermaid(e){(0,l.A)(Io,this,e)}get previewUrlTemplate(){return(0,c.A)(Wo,this)}set previewUrlTemplate(e){(0,l.A)(Wo,this,e)}get showCases(){return(0,c.A)(Oo,this)}set showCases(e){(0,l.A)(Oo,this,e)}get exampleProjects(){return(0,c.A)(Do,this)}set exampleProjects(e){(0,l.A)(Do,this,e)}get tryItOutUrl(){return(0,c.A)(Lo,this)}set tryItOutUrl(e){(0,l.A)(Lo,this,e)}resumed(){var e,t;null===(e=(0,c.A)(qo,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(qo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(qo,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(qo,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(Eo,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)(Uo,this),onTerminate:(0,c.A)(Bo,this),onSubmitFeedback:(0,c.A)(jo,this),onSwitchToCanvas:(0,c.A)(Ko,this),onFeedbackOnView:(0,c.A)(Go,this),onDetailChange:(0,c.A)($o,this)})}}ds=Xo,({e:[gs,bs,As,xs,ks,Es,fs,vs,ws,ys,Ts,Cs,Ss,_s,Ns,Rs,Ms,Is,Ws,Os,Ds,Ls,Ps,zs,Us,Hs,Bs,Vs,js,Fs,Gs,Ys,Ks,Js,$s,qs,Xs,Qs,Zs,eo,to,io,no,ao,ro,so,oo,lo,co,po,ho,uo,mo,go,us],c:[fo,ms]}=(0,d.A)(ds,[bo("ai-portal.chat-stream",{shadowOptions:!1})],[[Ao(),1,"conversationId"],[Ao({attribute:!1,render:!1}),1,"initialRequest"],[Ao({type:Boolean}),1,"replay"],[Ao({type:Number}),1,"replayDelay"],[Ao({attribute:!1}),1,"supports"],[Ao({type:Boolean}),1,"showHumanActions"],[Ao({type:Boolean}),1,"showFeedback"],[Ao({type:Boolean}),1,"showFeedbackAfterFailed"],[Ao({type:Boolean}),1,"showFeedbackOnView"],[Ao({type:Boolean}),1,"showUiSwitch"],[Ao({type:Boolean,render:!1}),1,"hideMermaid"],[Ao(),1,"previewUrlTemplate"],[Ao({attribute:!1}),1,"showCases"],[Ao({attribute:!1}),1,"exampleProjects"],[Ao(),1,"tryItOutUrl"],[xo({type:"share"}),1,"shareEvent",e=>(0,c.A)(Po,e),(e,t)=>(0,l.A)(Po,e,t)],[xo({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ho,e),(e,t)=>(0,l.A)(Ho,e,t)],[xo({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Vo,e),(e,t)=>(0,l.A)(Vo,e,t)],[xo({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Fo,e),(e,t)=>(0,l.A)(Fo,e,t)],[xo({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Yo,e),(e,t)=>(0,l.A)(Yo,e,t)],[xo({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(Jo,e),(e,t)=>(0,l.A)(Jo,e,t)],[ko(),2,"resumed"],[ko(),2,"feedbackSubmitDone"],[ko(),2,"feedbackSubmitFailed"],[ko(),2,"feedbackOnViewDone"]],0,(e=>qo.has((0,s.A)(e))),m.ReactNextElement)),ms();let Qo=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const Zo="bricks/ai-portal/ai-employees",el=g.i18n.getFixedT(null,Zo);var tl,il=i(98036);let nl,al,rl,sl,ol,ll,cl,dl,pl;(0,g.initializeI18n)(Zo,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const hl=(0,m.wrapBrick)("eo-link"),ul=(0,m.wrapBrick)("eo-icon"),ml=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:gl,property:bl}=(0,u.createDecorators)();let Al;var xl=new WeakMap,kl=new WeakMap,El=new WeakMap,fl=new WeakMap;class vl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,xl,al(this)),(0,r.A)(this,kl,(rl(this),sl(this))),(0,r.A)(this,El,(ol(this),ll(this))),(0,r.A)(this,fl,(cl(this),dl(this,!0))),pl(this)}get list(){return(0,c.A)(xl,this)}set list(e){(0,l.A)(xl,this,e)}get industries(){return(0,c.A)(kl,this)}set industries(e){(0,l.A)(kl,this,e)}get urlTemplate(){return(0,c.A)(El,this)}set urlTemplate(e){(0,l.A)(El,this,e)}get withContainer(){return(0,c.A)(fl,this)}set withContainer(e){(0,l.A)(fl,this,e)}render(){return h().createElement(wl,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function wl(e){let{list:t,industries:i,urlTemplate:n,withContainer:a}=e;const r=(0,p.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[s,o]=(0,p.useState)(r[0]),l=(0,p.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==s)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[s,t]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:e||el(Qo.UNTITLED)})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(ml,{tabs:c,activeTab:s,onTabClick:e=>o(e.detail.id)}),h().createElement("ul",{className:"groups"},l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>h().createElement("li",{key:t},h().createElement(hl,(0,bt.A)({className:on()("link",{clickable:!!n})},n?{url:(0,wn.Q)(n,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},e.avatar?h().createElement("img",{src:e.avatar}):h().createElement(ul,{lib:"antd",icon:"user"})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description)))))))}))));return a?h().createElement("div",{className:"container"},h().createElement("h1",null,el(Qo.AI_EMPLOYEES)),d):d}tl=vl,({e:[al,rl,sl,ol,ll,cl,dl,pl],c:[Al,nl]}=(0,d.A)(tl,[gl("ai-portal.ai-employees",{styleTexts:[il.A]})],[[bl({attribute:!1}),1,"list"],[bl({attribute:!1}),1,"industries"],[bl(),1,"urlTemplate"],[bl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),nl();let yl=function(e){return e.AGENTS="AGENTS",e}({});const Tl="bricks/ai-portal/ai-agents",Cl=g.i18n.getFixedT(null,Tl);var Sl,_l=i(83059);let Nl,Rl,Ml,Il,Wl,Ol,Dl;const Ll={lib:"antd",icon:"tool"};(0,g.initializeI18n)(Tl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Pl=(0,m.wrapBrick)("eo-icon"),zl=(0,m.wrapBrick)("eo-link"),{defineElement:Ul,property:Hl}=(0,u.createDecorators)();let Bl;var Vl=new WeakMap,jl=new WeakMap,Fl=new WeakMap;class Gl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Vl,Rl(this)),(0,r.A)(this,jl,(Ml(this),Il(this))),(0,r.A)(this,Fl,(Wl(this),Ol(this,!0))),Dl(this)}get list(){return(0,c.A)(Vl,this)}set list(e){(0,l.A)(Vl,this,e)}get urlTemplate(){return(0,c.A)(jl,this)}set urlTemplate(e){(0,l.A)(jl,this,e)}get withContainer(){return(0,c.A)(Fl,this)}set withContainer(e){(0,l.A)(Fl,this,e)}render(){return h().createElement(Yl,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Yl(e){let{list:t,urlTemplate:i,withContainer:n}=e;const a=h().createElement(h().Fragment,null,h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var n,a;return h().createElement("li",{key:t},h().createElement(zl,(0,bt.A)({className:on()("link",{clickable:!!i})},i?{url:(0,wn.Q)(i,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Pl,(0,bt.A)({},null!==(n=e.icon)&&void 0!==n?n:Ll,{fallback:Ll}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description)))}))));return n?h().createElement("div",{className:"container"},h().createElement("h1",null,Cl(yl.AGENTS)),a):a}Sl=Gl,({e:[Rl,Ml,Il,Wl,Ol,Dl],c:[Bl,Nl]}=(0,d.A)(Sl,[Ul("ai-portal.ai-agents",{styleTexts:[_l.A]})],[[Hl({attribute:!1}),1,"list"],[Hl(),1,"urlTemplate"],[Hl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Nl();var Kl=i(49936);let Jl=null;customElements.define("ai-portal.save-request-store",(0,Kl.createProviderClass)((function(e){Jl=e}))),customElements.define("ai-portal.load-request-store",(0,Kl.createProviderClass)((function(){const e=Jl;return Jl=null,e}))),customElements.define("ai-portal.clear-request-store",(0,Kl.createProviderClass)((function(){Jl=null})));var $l,ql=i(49041);let Xl,Ql,Zl,ec,tc,ic,nc;const ac=(0,m.wrapBrick)("eo-link"),{defineElement:rc,property:sc}=(0,u.createDecorators)();let oc;var lc=new WeakMap,cc=new WeakMap,dc=new WeakMap;class pc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,lc,Ql(this)),(0,r.A)(this,cc,(Zl(this),ec(this))),(0,r.A)(this,dc,(tc(this),ic(this))),nc(this)}get pageTitle(){return(0,c.A)(lc,this)}set pageTitle(e){(0,l.A)(lc,this,e)}get breadcrumbs(){return(0,c.A)(cc,this)}set breadcrumbs(e){(0,l.A)(cc,this,e)}get size(){return(0,c.A)(dc,this)}set size(e){(0,l.A)(dc,this,e)}render(){return h().createElement(hc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs})}}function hc(e){let{breadcrumbs:t,pageTitle:i}=e;return(0,p.useEffect)((()=>{"string"==typeof i&&(0,rn.getRuntime)().applyPageTitle(i)}),[i]),h().createElement("div",{className:"container"},i||null!=t&&t.length?h().createElement("div",{className:"header"},h().createElement("nav",null,null!=t&&t.length?h().createElement("ul",{className:"breadcrumbs"},t.map(((e,t)=>h().createElement("li",{key:t},h().createElement(ac,{url:e.url},e.text))))):null,i?h().createElement("h1",null,i):null),h().createElement("slot",{name:"toolbar"})):null,h().createElement("slot",null))}$l=pc,({e:[Ql,Zl,ec,tc,ic,nc],c:[oc,Xl]}=(0,d.A)($l,[rc("ai-portal.page-container",{styleTexts:[ql.A]})],[[sc(),1,"pageTitle"],[sc({attribute:!1}),1,"breadcrumbs"],[sc({render:!1}),1,"size"]],0,void 0,m.ReactNextElement)),Xl();var uc,mc=i(20124);let gc,bc,Ac,xc,kc,Ec,fc,vc,wc;const{defineElement:yc,property:Tc,event:Cc}=(0,u.createDecorators)();let Sc;var _c=new WeakMap,Nc=new WeakMap,Rc=new WeakMap,Mc=new WeakSet,Ic=new WeakMap;class Wc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Mc),(0,r.A)(this,_c,bc(this)),(0,r.A)(this,Nc,(Ac(this),xc(this))),(0,r.A)(this,Rc,(kc(this),Ec(this))),(0,r.A)(this,Ic,(wc(this),e=>{this.activeTab=e.id,(0,o.A)(Mc,this,fc).emit(e)}))}get tabs(){return(0,c.A)(_c,this)}set tabs(e){(0,l.A)(_c,this,e)}get activeTab(){return(0,c.A)(Nc,this)}set activeTab(e){(0,l.A)(Nc,this,e)}render(){return h().createElement(Oc,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Ic,this)})}}function Oc(e){let{tabs:t,activeTab:i,onTabClick:n}=e;return h().createElement("ul",{className:"tabs",part:"tabs"},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:on()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>n(e)},e.label)))))}uc=Wc,({e:[bc,Ac,xc,kc,Ec,fc,vc,wc],c:[Sc,gc]}=(0,d.A)(uc,[yc("ai-portal.tab-list",{styleTexts:[mc.A]})],[[Tc({attribute:!1}),1,"tabs"],[Tc({attribute:!1}),1,"activeTab"],[Cc({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(Rc,e),(e,t)=>(0,l.A)(Rc,e,t)]],0,(e=>Ic.has((0,s.A)(e))),m.ReactNextElement)),gc();let Dc=function(e){return e.PLEASE_SELECT="PLEASE_SELECT",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.SEARCH_NO_DATA="SEARCH_NO_DATA",e}({});const Lc="bricks/ai-portal/dropdown-select",Pc=g.i18n.getFixedT(null,Lc);var zc,Uc=i(40138);let Hc,Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed,td,id,nd,ad,rd,sd;(0,g.initializeI18n)(Lc,{en:{PLEASE_SELECT:"Please Select",SEARCH_PLACEHOLDER:"Search",SEARCH_NO_DATA:"No Data"},zh:{PLEASE_SELECT:"请选择",SEARCH_PLACEHOLDER:"搜索",SEARCH_NO_DATA:"暂无结果"}});const{defineElement:od,property:ld,event:cd}=(0,u.createDecorators)(),dd=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),pd=(0,m.wrapBrick)("eo-icon"),hd=(0,m.wrapBrick)("eo-loading-container"),ud=(0,m.wrapBrick)("eo-menu"),md=(0,m.wrapBrick)("eo-menu-item"),gd=(0,m.wrapBrick)("eo-input",{onValueChange:"change"});let bd;var Ad=new WeakMap,xd=new WeakMap,kd=new WeakMap,Ed=new WeakMap,fd=new WeakMap,vd=new WeakMap,wd=new WeakMap,yd=new WeakMap,Td=new WeakMap,Cd=new WeakSet,Sd=new WeakMap;class _d extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Cd),(0,r.A)(this,Ad,Bc(this)),(0,r.A)(this,xd,(Vc(this),jc(this))),(0,r.A)(this,kd,(Fc(this),Gc(this))),(0,r.A)(this,Ed,(Yc(this),Kc(this))),(0,r.A)(this,fd,(Jc(this),$c(this))),(0,r.A)(this,vd,(qc(this),Xc(this))),(0,r.A)(this,wd,(Qc(this),Zc(this))),(0,r.A)(this,yd,(ed(this),td(this))),(0,r.A)(this,Td,(id(this),nd(this))),(0,r.A)(this,Sd,(sd(this),e=>{(0,o.A)(Cd,this,ad).emit(e)}))}get value(){return(0,c.A)(Ad,this)}set value(e){(0,l.A)(Ad,this,e)}get options(){return(0,c.A)(xd,this)}set options(e){(0,l.A)(xd,this,e)}get labelMaxWidth(){return(0,c.A)(kd,this)}set labelMaxWidth(e){(0,l.A)(kd,this,e)}get loading(){return(0,c.A)(Ed,this)}set loading(e){(0,l.A)(Ed,this,e)}get searchPlaceholder(){return(0,c.A)(fd,this)}set searchPlaceholder(e){(0,l.A)(fd,this,e)}get dropdownContentStyle(){return(0,c.A)(vd,this)}set dropdownContentStyle(e){(0,l.A)(vd,this,e)}get dropdownMaxWidth(){return(0,c.A)(wd,this)}set dropdownMaxWidth(e){(0,l.A)(wd,this,e)}get showSearch(){return(0,c.A)(yd,this)}set showSearch(e){(0,l.A)(yd,this,e)}render(){return h().createElement(Nd,{value:this.value,options:this.options,onChange:(0,c.A)(Sd,this),loading:this.loading,labelMaxWidth:this.labelMaxWidth,dropdownMaxWidth:this.dropdownMaxWidth,showSearch:this.showSearch,searchPlaceholder:this.searchPlaceholder,dropdownContentStyle:this.dropdownContentStyle})}}function Nd(e){let{value:t,options:i,labelMaxWidth:n,dropdownMaxWidth:a,showSearch:r,loading:s,searchPlaceholder:o,dropdownContentStyle:l,onChange:c}=e;const[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)(t),[b,A]=(0,p.useState)(""),[x,k]=(0,p.useState)(i);(0,p.useEffect)((()=>{k(i)}),[i]);const E=(0,p.useMemo)((()=>null==x?void 0:x.find((e=>e.value===m))),[x,m]),f=(0,p.useMemo)((()=>b&&x?null==x?void 0:x.filter((e=>e.label.toLowerCase().includes(b.toLowerCase()))):x),[x,b]),v=(0,p.useCallback)((e=>{u(e.detail),e.detail||A("")}),[]),w=(0,p.useMemo)((()=>(0,fn.debounce)((e=>{A(e.detail)}),300)),[]);return h().createElement(dd,{placement:"bottom-start",trigger:"click",active:d,arrow:!1,distance:5,onBeforeVisibleChange:v},h().createElement("span",{slot:"anchor",className:"trigger"},h().createElement("span",{className:"label",style:{maxWidth:n}},E?null==E?void 0:E.label:Pc(Dc.PLEASE_SELECT)),h().createElement(pd,{lib:"lucide",icon:d?"chevron-up":"chevron-down"})),h().createElement("div",{className:"dropdown",style:{maxWidth:a}},r&&h().createElement("div",{className:"search-container"},h().createElement(gd,{className:"search",value:b,placeholder:o||Pc(Dc.SEARCH_PLACEHOLDER),onValueChange:w},h().createElement(pd,{slot:"prefix",lib:"antd",icon:"search"}))),h().createElement(hd,{loading:s,delay:500,style:{width:"100%"}},h().createElement("div",{className:"dropdown-inner",style:l},h().createElement("slot",{name:"prefix"}),!(null==f||!f.length)&&h().createElement(ud,null,null==f?void 0:f.map((e=>h().createElement(md,{key:e.value,disabled:e.disabled,className:m===e.value?"active":void 0,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(!1),m!==e.value&&(g(e.value),c(e))}},e.label)))),!(null!=f&&f.length)&&h().createElement("div",{className:"empty"},Pc(Dc.SEARCH_NO_DATA))))))}zc=_d,({e:[Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed,td,id,nd,ad,rd,sd],c:[bd,Hc]}=(0,d.A)(zc,[od("ai-portal.dropdown-select",{styleTexts:[Uc.A]})],[[ld(),1,"value"],[ld({attribute:!1}),1,"options"],[ld({attribute:!1}),1,"labelMaxWidth"],[ld({type:Boolean}),1,"loading"],[ld({attribute:!1}),1,"searchPlaceholder"],[ld({attribute:!1}),1,"dropdownContentStyle"],[ld({attribute:!1}),1,"dropdownMaxWidth"],[ld({type:Boolean}),1,"showSearch"],[cd({type:"change"}),1,"changeEvent",e=>(0,c.A)(Td,e),(e,t)=>(0,l.A)(Td,e,t)]],0,(e=>Sd.has((0,s.A)(e))),m.ReactNextElement)),Hc();var Rd=i(79858),Md=i(68648);let Id=function(e){return e.UNTITLED="UNTITLED",e}({});const Wd="bricks/ai-portal/preview-container",Od=g.i18n.getFixedT(null,Wd);var Dd=i(72591),Ld=i.n(Dd),Pd=i(1740),zd=i.n(Pd),Ud=i(88128),Hd=i.n(Ud),Bd=i(30855),Vd=i.n(Bd),jd=i(93051),Fd=i.n(jd),Gd=i(73656),Yd=i.n(Gd),Kd=i(62522),Jd={};Jd.styleTagTransform=Yd(),Jd.setAttributes=Vd(),Jd.insert=Hd().bind(null,"head"),Jd.domAPI=zd(),Jd.insertStyleElement=Fd(),Ld()(Kd.A,Jd);const $d=Kd.A&&Kd.A.locals?Kd.A.locals:void 0;var qd,Xd=i(43100),Qd=i(23241);let Zd,ep,tp,ip,np;(0,g.initializeI18n)(Wd,{en:{UNTITLED:"Untitled"},zh:{UNTITLED:"无标题"}});const ap=(0,m.wrapBrick)("eo-icon"),rp=(0,m.wrapBrick)("eo-page-title"),sp=(0,m.wrapBrick)("eo-main-view"),op=(0,m.wrapBrick)("eo-narrow-view"),{defineElement:lp,property:cp}=(0,u.createDecorators)();let dp;var pp=new WeakMap,hp=new WeakMap,up=new WeakMap;class mp extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,pp,ep(this)),(0,r.A)(this,hp,(tp(this),ip(this))),(0,r.A)(this,up,(np(this),(0,fn.uniqueId)()))}get source(){return(0,c.A)(pp,this)}set source(e){(0,l.A)(pp,this,e)}get url(){return(0,c.A)(hp,this)}set url(e){(0,l.A)(hp,this,e)}render(){return h().createElement(p.Suspense,{fallback:h().createElement(ap,{lib:"antd",icon:"loading-3-quarters",spinning:!0,className:$d.loading})},h().createElement(gp,{rootId:(0,c.A)(up,this),source:this.source,url:this.url}))}}function gp(e){let{rootId:t,source:i,url:n}=e;const a=(0,p.useMemo)((()=>i?async function(e){const t=await(0,Xd.f)();return await t.parse(e)}(i).catch((e=>(console.error("Failed to parse view:",e),null))):Promise.resolve(null)),[i]),r=(0,p.use)(a),s=(0,p.useMemo)((()=>r?(0,Rd.d)(r,{rootId:t,expanded:!0}).catch((e=>(console.error("Failed to convert view:",e),null))):Promise.resolve(null)),[r,t]),o=(0,p.use)(s),l=(0,p.useMemo)((()=>(0,Md.W)(r)),[r]);return h().createElement(bp,{rootId:t,pageTitle:l,convertedResult:o,url:n})}function bp(e){let{rootId:t,pageTitle:i,convertedResult:n,url:a}=e;const r=(0,p.useRef)(null),s=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=r.current;if(!e)return;const i=(0,Qd.d)(t),n=(0,rn.unstable_createRoot)(e,{portal:i,supportsUseChildren:!0});return s.current=n,()=>{n.unmount(),i.remove(),s.current=null}}),[t]),(0,p.useEffect)((()=>{var e;if(!n)return;const{brick:t,context:i,functions:r,templates:o}=n;null===(e=s.current)||void 0===e||e.render(t,{context:i,functions:r,templates:o,url:a})}),[n,a]),h().createElement(op,{size:"large",className:$d.container},h().createElement(sp,null,h().createElement(rp,{slot:"pageTitle",pageTitle:i||Od(Id.UNTITLED)}),h().createElement("div",{className:$d.main,ref:r,"data-root-id":t})))}qd=mp,({e:[ep,tp,ip,np],c:[dp,Zd]}=(0,d.A)(qd,[lp("ai-portal.preview-container",{shadowOptions:!1})],[[cp({attribute:!1}),1,"source"],[cp(),1,"url"]],0,void 0,m.ReactNextElement)),Zd();const Ap="bricks/ai-portal/action-buttons";g.i18n.getFixedT(null,Ap);var xp,kp=i(11816);let Ep,fp,vp,wp,yp,Tp,Cp,Sp,_p;(0,g.initializeI18n)(Ap,{en:{},zh:{}});const Np=(0,m.wrapBrick)("eo-icon"),Rp=(0,m.wrapBrick)("eo-button"),{defineElement:Mp,property:Ip,event:Wp}=(0,u.createDecorators)();let Op;var Dp=new WeakMap,Lp=new WeakMap,Pp=new WeakMap,zp=new WeakSet,Up=new WeakMap;class Hp extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,zp),(0,r.A)(this,Dp,fp(this)),(0,r.A)(this,Lp,(vp(this),wp(this))),(0,r.A)(this,Pp,(yp(this),Tp(this))),(0,r.A)(this,Up,(_p(this),e=>{this.activeKey=e?e.key:null,(0,o.A)(zp,this,Cp).emit(e)}))}get items(){return(0,c.A)(Dp,this)}set items(e){(0,l.A)(Dp,this,e)}get activeKey(){return(0,c.A)(Lp,this)}set activeKey(e){(0,l.A)(Lp,this,e)}render(){return h().createElement(Bp,{items:this.items,activeKey:this.activeKey,onChange:(0,c.A)(Up,this)})}}function Bp(e){let{items:t,activeKey:i,onChange:n}=e;const[a,r]=(0,p.useState)(null!=i?i:null),s=(0,p.useRef)(!1);(0,p.useEffect)((()=>{r(null!=i?i:null)}),[i]),(0,p.useEffect)((()=>{var e;s.current?n(a&&null!==(e=null==t?void 0:t.find((e=>!e.hidden&&e.key===a)))&&void 0!==e?e:null):s.current=!0}),[a,t,n]);const o=(0,p.useMemo)((()=>null==t?void 0:t.filter((e=>!e.hidden&&!a||e.key===a))),[t,a]);return h().createElement("div",{className:"button-container"},null==o?void 0:o.map((e=>{const{text:t,icon:i,key:n}=e;return h().createElement(Rp,{key:n,className:"action"+(a?" active":""),themeVariant:"elevo",type:"neutral",onClick:()=>{a||r(n)}},i?h().createElement(Np,(0,bt.A)({className:"icon"},i)):null,t,a?h().createElement(Np,{className:"remove",lib:"lucide",icon:"x",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(null)}}):null)})))}xp=Hp,({e:[fp,vp,wp,yp,Tp,Cp,Sp,_p],c:[Op,Ep]}=(0,d.A)(xp,[Mp("ai-portal.action-buttons",{styleTexts:[kp.A]})],[[Ip({attribute:!1}),1,"items"],[Ip(),1,"activeKey"],[Wp({type:"change"}),1,"change",e=>(0,c.A)(Pp,e),(e,t)=>(0,l.A)(Pp,e,t)]],0,(e=>Up.has((0,s.A)(e))),m.ReactNextElement)),Ep();let Vp=function(e){return e.UN_START_STATUS="UN_START_STATUS",e.RUNNING_STATUS="RUNNING_STATUS",e.COMPLETED_STATUS="COMPLETED_STATUS",e.NEW_CHAT="NEW_CHAT",e}({});const jp="bricks/ai-portal/goal-card-list",Fp={en:{UN_START_STATUS:"Not Start",RUNNING_STATUS:"Running",COMPLETED_STATUS:"Completed",NEW_CHAT:"New chat"},zh:{UN_START_STATUS:"未开始",RUNNING_STATUS:"运行中",COMPLETED_STATUS:"已完成",NEW_CHAT:"新对话"}},Gp=g.i18n.getFixedT(null,jp);var Yp=i(46342),Kp=i(10335);let Jp;(0,g.initializeI18n)(jp,Fp);const $p=(0,m.wrapBrick)("eo-icon"),qp=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),Xp=(0,m.wrapBrick)("eo-easyops-avatar"),Qp=(0,m.wrapBrick)("eo-button"),Zp={ready:"uncheck-status",working:"active-status",completed:"check-status"},eh=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:Gp(Vp.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:Gp(Vp.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:Gp(Vp.COMPLETED_STATUS)}];function th(e){let{goalItem:t,idWidth:i,cardStyle:n,onStatusChange:a,onTitleChange:r,onClick:s,onNewChat:o,onAppendChild:l,onRevokeAppendChild:c,isActive:d}=e;const{state:u,id:m,title:g,conversations:b,owner:A,pending:x}=t,k=(0,p.useRef)(!1),E=(0,p.useCallback)((()=>{k.current=!0}),[]),f=(0,p.useCallback)((()=>{k.current=!1}),[]),[v,w]=(0,p.useState)(!1),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((e=>{w(!1);const t=e.currentTarget.textContent;!x||null!=t&&t.trim()?null!==t&&g!==t&&(null==r||r(t)):null==c||c()}),[x,g,c,r]),C=(0,p.useCallback)((e=>{k.current||"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}),[]),S=(0,p.useRef)(null);return(0,p.useEffect)((()=>{var e;x&&(null===(e=S.current)||void 0===e||e.focus())}),[x]),h().createElement("div",{className:on()("goal-item",t.state,{editing:v},{active:d}),style:{paddingLeft:24*(t.level+1)+"px",...n},onClick:x?void 0:s},h().createElement("div",{className:"start"},h().createElement(qp,{actions:eh,disabled:x,onActionClick:e=>{var t;t=e.detail,null==a||a(t.key)}},h().createElement($p,{className:"icon",lib:"easyops",category:"colored-common",icon:Zp[u],onClick:e=>e.stopPropagation()})),h().createElement("span",{className:"serial-number",style:{width:i}},"#",x?"":m),h().createElement("span",{className:"title",ref:S,onClick:e=>e.stopPropagation(),onFocus:y,onBlur:T,onKeyDown:C,onCompositionStart:E,onCompositionEnd:f,contentEditable:(_=!0,_?function(){if("boolean"!=typeof Jp){const e=document.createElement("div");e.setAttribute("contenteditable","PLAINTEXT-ONLY"),Jp="plaintext-only"===e.contentEditable}return Jp}()?"plaintext-only":"true":"false"),suppressContentEditableWarning:!0},g)),h().createElement("div",{className:"end"},h().createElement("div",{className:"info"},h().createElement("div",{className:"message"},h().createElement($p,{lib:"easyops",category:"common",icon:"message"}),h().createElement("span",{className:"count"},b||0)),h().createElement(Xp,{nameOrInstanceId:null==A?void 0:A.instanceId,size:"small"})),h().createElement("div",{className:"operation",onClick:e=>e.stopPropagation()},0===t.level&&h().createElement(Qp,{className:"append-child",themeVariant:"elevo",type:"neutral",size:"small",onClick:l},h().createElement($p,{lib:"lucide",icon:"plus"})),!x&&h().createElement(Qp,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:o},Gp(Vp.NEW_CHAT)))));var _}var ih;let nh,ah,rh,sh,oh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh,fh,vh,wh,yh,Th,Ch;(0,g.initializeI18n)(jp,Fp);const{defineElement:Sh,property:_h,event:Nh,method:Rh}=(0,u.createDecorators)(),Mh=(0,m.wrapBrick)("eo-icon"),Ih=(0,p.forwardRef)(Jh);let Wh;var Oh=new WeakMap,Dh=new WeakMap,Lh=new WeakMap,Ph=new WeakMap,zh=new WeakSet,Uh=new WeakMap,Hh=new WeakMap,Bh=new WeakMap,Vh=new WeakMap,jh=new WeakMap,Fh=new WeakMap,Gh=new WeakMap,Yh=new WeakMap;class Kh extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,zh),(0,r.A)(this,Oh,(nh(this),rh(this))),(0,r.A)(this,Dh,(sh(this),oh(this))),(0,r.A)(this,Lh,(lh(this),ch(this))),(0,r.A)(this,Ph,(dh(this),ph(this))),(0,r.A)(this,Uh,(mh(this),e=>{(0,o.A)(zh,this,hh).emit(e)})),(0,r.A)(this,Hh,gh(this)),(0,r.A)(this,Bh,(xh(this),e=>{(0,o.A)(zh,this,bh).emit(e)})),(0,r.A)(this,Vh,kh(this)),(0,r.A)(this,jh,(vh(this),e=>{(0,o.A)(zh,this,Eh).emit(e)})),(0,r.A)(this,Fh,wh(this)),(0,r.A)(this,Gh,(Ch(this),e=>{(0,o.A)(zh,this,yh).emit(e)})),(0,r.A)(this,Yh,(0,p.createRef)())}get goalList(){return(0,c.A)(Oh,this)}set goalList(e){(0,l.A)(Oh,this,e)}get cardStyle(){return(0,c.A)(Dh,this)}set cardStyle(e){(0,l.A)(Dh,this,e)}get activeKey(){return(0,c.A)(Lh,this)}set activeKey(e){(0,l.A)(Lh,this,e)}appendChildDone(e,t){var i;null===(i=(0,c.A)(Yh,this).current)||void 0===i||i.appendChildDone(e,t)}render(){return h().createElement(Ih,{ref:(0,c.A)(Yh,this),goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,c.A)(jh,this),onStatusChange:(0,c.A)(Bh,this),onItemClick:(0,c.A)(Uh,this),onNewChat:(0,c.A)(Gh,this),activeKey:this.activeKey})}}function Jh(e,t){let{goalList:i,cardStyle:n,onTitleChange:a,onStatusChange:r,onItemClick:s,onNewChat:o,activeKey:l}=e;const[c,d]=(0,p.useState)(i);(0,p.useEffect)((()=>{d(i)}),[i]);const u=(e,t,i,n)=>{const a={...e,[t]:i};d(null==c?void 0:c.map((e=>e.instanceId===a.instanceId?a:e))),null==n||n(a)};(0,p.useImperativeHandle)(t,(()=>({appendChildDone:(e,t)=>{d((i=>null==i?void 0:i.map((i=>i.instanceId===e?{...t,level:i.level}:i))))}})),[]);const m=(0,p.useMemo)((()=>{var e;return 10*((null!==(e=null==c?void 0:c.reduce(((e,t)=>Math.max(e,t.id)),0))&&void 0!==e?e:0).toString().length+1)}),[c]);return c?h().createElement("div",{className:"goal-container"},null==c?void 0:c.map((e=>h().createElement(th,{key:e.instanceId,isActive:l===e.instanceId,goalItem:e,idWidth:m,cardStyle:n,onTitleChange:t=>((e,t)=>{u(t,"title",e,a)})(t,e),onStatusChange:t=>((e,t)=>{u(t,"state",e,r)})(t,e),onNewChat:()=>null==o?void 0:o(e),onClick:()=>null==s?void 0:s(e),onAppendChild:()=>(e=>{const t={instanceId:(0,fn.uniqueId)("pending-"),pending:!0,id:0,title:"",state:"ready",level:1,pendingParentId:e.instanceId};d((i=>{var n;const a=null!==(n=null==i?void 0:i.findIndex((t=>t.instanceId===e.instanceId)))&&void 0!==n?n:-1;if(-1===a)return i;const r=i.slice(a+1).findIndex((e=>0===e.level))+1;return 0===r?[...i,t]:[...i.slice(0,a+r),t,...i.slice(a+r)]}))})(e),onRevokeAppendChild:()=>{d((t=>null==t?void 0:t.filter((t=>t.instanceId!==e.instanceId))))}})))):h().createElement("div",{className:"loading"},h().createElement(Mh,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}ih=Kh,({e:[rh,sh,oh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh,fh,vh,wh,yh,Th,Ch,nh],c:[Wh,ah]}=(0,d.A)(ih,[Sh("ai-portal.goal-card-list",{styleTexts:[Kp.A,Yp.A]})],[[_h({attribute:!1}),1,"goalList"],[_h({attribute:!1}),1,"cardStyle"],[_h(),1,"activeKey"],[Nh({type:"item.click"}),1,"itemClickEvent",e=>(0,c.A)(Ph,e),(e,t)=>(0,l.A)(Ph,e,t)],[Nh({type:"item.status.change"}),1,"itemStatusChangeEvent",e=>(0,c.A)(Hh,e),(e,t)=>(0,l.A)(Hh,e,t)],[Nh({type:"item.title.change"}),1,"itemTitleChangeEvent",e=>(0,c.A)(Vh,e),(e,t)=>(0,l.A)(Vh,e,t)],[Nh({type:"item.new.chat"}),1,"itemNewChatEvent",e=>(0,c.A)(Fh,e),(e,t)=>(0,l.A)(Fh,e,t)],[Rh(),2,"appendChildDone"]],0,(e=>Yh.has((0,s.A)(e))),m.ReactNextElement)),ah();var $h=i(62916);let qh=function(e){return e.PROJECT_OVERALL="PROJECT_OVERALL",e}({});const Xh="bricks/ai-portal/project-conversations",Qh=g.i18n.getFixedT(null,Xh);var Zh,eu=i(79286);let tu,iu,nu,au,ru,su,ou,lu,cu,du,pu,hu,uu,mu,gu,bu,Au;(0,g.initializeI18n)(Xh,{en:{PROJECT_OVERALL:"Project overall"},zh:{PROJECT_OVERALL:"项目整体"}});const xu=(0,m.wrapBrick)("eo-link"),ku=(0,m.wrapBrick)("eo-icon"),Eu=(0,m.wrapBrick)("eo-easyops-avatar"),fu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:vu,property:wu,event:yu}=(0,u.createDecorators)();let Tu;var Cu=new WeakMap,Su=new WeakMap,_u=new WeakMap,Nu=new WeakMap,Ru=new WeakMap,Mu=new WeakSet,Iu=new WeakMap,Wu=new WeakMap,Ou=new WeakMap;class Du extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Mu),(0,r.A)(this,Cu,iu(this)),(0,r.A)(this,Su,(nu(this),au(this))),(0,r.A)(this,_u,(ru(this),su(this))),(0,r.A)(this,Nu,(ou(this),lu(this))),(0,r.A)(this,Ru,(cu(this),du(this))),(0,r.A)(this,Iu,(uu(this),e=>{(0,o.A)(Mu,this,pu).emit(e)})),(0,r.A)(this,Wu,mu(this)),(0,r.A)(this,Ou,(Au(this),e=>{(0,o.A)(Mu,this,gu).emit(e)}))}get list(){return(0,c.A)(Cu,this)}set list(e){(0,l.A)(Cu,this,e)}get urlTemplate(){return(0,c.A)(Su,this)}set urlTemplate(e){(0,l.A)(Su,this,e)}get actions(){return(0,c.A)(_u,this)}set actions(e){(0,l.A)(_u,this,e)}get goals(){return(0,c.A)(Nu,this)}set goals(e){(0,l.A)(Nu,this,e)}render(){return h().createElement(Lu,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,goals:this.goals,onGoalClick:(0,c.A)(Iu,this),onActionClick:(0,c.A)(Ou,this)})}}function Lu(e){let{list:t,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:s}=e;return t?h().createElement("ul",null,t.map((e=>h().createElement("li",{className:"item",key:e.conversationId},h().createElement(Pu,{conversation:e,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:s}))))):h().createElement("div",{className:"loading"},h().createElement(ku,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Pu(e){var t;let{conversation:i,urlTemplate:n,actions:a,goals:r,onGoalClick:s,onActionClick:o}=e;const l=(0,p.useRef)(null),c=g.i18n.language.split("-")[0];(0,p.useEffect)((()=>{const e=l.current;if(!e)return;const t=e=>{e.stopPropagation(),e.preventDefault(),s(i)};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[i,s]);const[d,u]=(0,p.useState)(!1);return h().createElement(xu,{className:on()("link",{"actions-active":d}),url:(0,wn.Q)(n,i)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(ku,{className:"icon",lib:"easyops",category:"common",icon:"clock"}),h().createElement("div",{className:"title"},i.title)),i.description&&h().createElement("div",{className:"description"},i.description)),r&&h().createElement("div",{className:on()("goal",{global:!i.goalInstanceId}),ref:l},i.goalInstanceId?null===(t=r.find((e=>e.instanceId===i.goalInstanceId)))||void 0===t?void 0:t.title:Qh(qh.PROJECT_OVERALL)),h().createElement(Eu,{className:"avatar",size:"small",nameOrInstanceId:i.username}),h().createElement("div",{className:`operations lang-${c}`},h().createElement(fu,{className:"actions",actions:a,onActionClick:e=>{o({action:e.detail,item:i})},onVisibleChange:e=>{u(e.detail)}}),h().createElement("div",{className:"time",title:(0,$h.P)(1e3*i.startTime,$h.c.full)},(0,$h.P)(1e3*i.startTime,$h.c.relative))))}Zh=Du,({e:[iu,nu,au,ru,su,ou,lu,cu,du,pu,hu,uu,mu,gu,bu,Au],c:[Tu,tu]}=(0,d.A)(Zh,[vu("ai-portal.project-conversations",{styleTexts:[eu.A]})],[[wu({attribute:!1}),1,"list"],[wu(),1,"urlTemplate"],[wu({attribute:!1}),1,"actions"],[wu({attribute:!1}),1,"goals"],[yu({type:"goal.click"}),1,"goalClick",e=>(0,c.A)(Ru,e),(e,t)=>(0,l.A)(Ru,e,t)],[yu({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Wu,e),(e,t)=>(0,l.A)(Wu,e,t)]],0,(e=>Ou.has((0,s.A)(e))),m.ReactNextElement)),tu();var zu,Uu=i(23677);let Hu,Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju,$u,qu,Xu,Qu,Zu,em;const tm=(0,m.wrapBrick)("eo-link"),im=(0,m.wrapBrick)("eo-icon"),nm=(0,m.wrapBrick)("eo-easyops-avatar"),am=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:rm,property:sm,event:om}=(0,u.createDecorators)();let lm;var cm=new WeakMap,dm=new WeakMap,pm=new WeakMap,hm=new WeakMap,um=new WeakSet,mm=new WeakMap,gm=new WeakMap,bm=new WeakMap;class Am extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,um),(0,r.A)(this,cm,Bu(this)),(0,r.A)(this,dm,(Vu(this),ju(this))),(0,r.A)(this,pm,(Fu(this),Gu(this))),(0,r.A)(this,hm,(Yu(this),Ku(this))),(0,r.A)(this,mm,(qu(this),Xu(this))),(0,r.A)(this,gm,(em(this),e=>{(0,o.A)(um,this,Ju).emit(e)})),(0,r.A)(this,bm,(e=>{(0,o.A)(um,this,Qu).emit(e)}))}get list(){return(0,c.A)(cm,this)}set list(e){(0,l.A)(cm,this,e)}get urlTemplate(){return(0,c.A)(dm,this)}set urlTemplate(e){(0,l.A)(dm,this,e)}get actions(){return(0,c.A)(pm,this)}set actions(e){(0,l.A)(pm,this,e)}render(){return h().createElement(xm,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,onActionClick:(0,c.A)(gm,this),onItemClick:(0,c.A)(bm,this)})}}function xm(e){let{list:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;return t?h().createElement("ul",null,null==t?void 0:t.map((e=>h().createElement("li",{className:"item",key:e.instanceId},h().createElement(km,{knowledge:e,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}))))):h().createElement("div",{className:"loading"},h().createElement(im,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function km(e){let{knowledge:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;const[s,o]=(0,p.useState)(!1);return h().createElement(tm,{className:on()("link",{"actions-active":s}),url:(0,wn.Q)(i,t),onClick:()=>null==r?void 0:r(t)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(im,{className:"icon",lib:"easyops",icon:"lightbulb",category:"common"}),h().createElement("span",{className:"title"},t.name),h().createElement(im,{className:"attachment",lib:"lucide",icon:"paperclip"})),t.description&&h().createElement("div",{className:"description"},t.description)),h().createElement("div",{className:"time"},(0,$h.P)(1e3*t.time,$h.c.relative)),h().createElement("div",{className:"operations"},h().createElement(am,{className:"actions",actions:n,onActionClick:e=>{a({action:e.detail,item:t})},onVisibleChange:e=>{o(e.detail)}}),h().createElement(nm,{className:"avatar",size:"small",nameOrInstanceId:t.user})))}zu=Am,({e:[Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju,$u,qu,Xu,Qu,Zu,em],c:[lm,Hu]}=(0,d.A)(zu,[rm("ai-portal.project-knowledges",{styleTexts:[Uu.A]})],[[sm({attribute:!1}),1,"list"],[sm(),1,"urlTemplate"],[sm({attribute:!1}),1,"actions"],[om({type:"action.click"}),1,"actionClick",e=>(0,c.A)(hm,e),(e,t)=>(0,l.A)(hm,e,t)],[om({type:"item.click"}),1,"itemClick",e=>(0,c.A)(mm,e),(e,t)=>(0,l.A)(mm,e,t)]],0,(e=>bm.has((0,s.A)(e))),m.ReactNextElement)),Hu();let Em=function(e){return e.STARTED_A_CHAT="STARTED_A_CHAT",e.CREATED_THIS_GOAL="CREATED_THIS_GOAL",e.CHANGED_THE_GOAL_TITLE="CHANGED_THE_GOAL_TITLE",e.CHANGED_THE_GOAL_DESCRIPTION="CHANGED_THE_GOAL_DESCRIPTION",e.CHANGED_THE_GOAL="CHANGED_THE_GOAL",e.DELETED_THIS_GOAL="DELETED_THIS_GOAL",e.DECOMPOSED_THIS_GOAL="DECOMPOSED_THIS_GOAL",e.SET_OWNER="SET_OWNER",e.REMOVED_GOAL_PARTICIPANTS="REMOVED_GOAL_PARTICIPANTS",e.ADDED_GOAL_PARTICIPANTS="ADDED_GOAL_PARTICIPANTS",e.COMMENTED="COMMENTED",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e}({});const fm="bricks/ai-portal/activity-timeline",vm=g.i18n.getFixedT(null,fm);var wm,ym=i(14763);let Tm,Cm,Sm,_m,Nm;(0,g.initializeI18n)(fm,{en:{STARTED_A_CHAT:"started a chat",CREATED_THIS_GOAL:"created this goal",CHANGED_THE_GOAL_TITLE:'changed the goal title to "{{ title }}"',CHANGED_THE_GOAL_DESCRIPTION:'changed the goal description to "{{ description }}"',CHANGED_THE_GOAL:"changed the goal",DELETED_THIS_GOAL:"deleted this goal",DECOMPOSED_THIS_GOAL:"decomposed this goal to {{ count }} sub-goal: ",DECOMPOSED_THIS_GOAL_plural:"decomposed this goal to {{ count }} sub-goals: ",SET_OWNER:"set {{ user }} as the owner",REMOVED_GOAL_PARTICIPANTS:"removed a goal participant: ",REMOVED_GOAL_PARTICIPANTS_plural:"removed {{ count }} goal participants: ",ADDED_GOAL_PARTICIPANTS:"added a goal participant: ",ADDED_GOAL_PARTICIPANTS_plural:"added {{ count }} goal participants: ",COMMENTED:"commented",COMMA:", ",SEMICOLON:"; "},zh:{STARTED_A_CHAT:"发起了对话",CREATED_THIS_GOAL:"创建了此目标",CHANGED_THE_GOAL_TITLE:"修改目标标题为 “{{ title }}”",CHANGED_THE_GOAL_DESCRIPTION:"修改目标描述为 “{{ description }}”",CHANGED_THE_GOAL:"修改了此目标",DELETED_THIS_GOAL:"删除了此目标",DECOMPOSED_THIS_GOAL:"将此目标分解为 {{ count }} 个子目标:",DECOMPOSED_THIS_GOAL_plural:"将此目标分解为 {{ count }} 个子目标:",SET_OWNER:"设定负责人为 {{ user }}",REMOVED_GOAL_PARTICIPANTS:"移除了目标参与成员:",ADDED_GOAL_PARTICIPANTS:"添加了目标参与成员:",COMMENTED:"评论",COMMA:",",SEMICOLON:";"}});const Rm=(0,m.wrapBrick)("eo-link"),Mm=(0,m.wrapBrick)("eo-icon"),Im=(0,m.wrapBrick)("eo-easyops-avatar"),{defineElement:Wm,property:Om}=(0,u.createDecorators)();let Dm;var Lm=new WeakMap,Pm=new WeakMap;class zm extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Lm,Cm(this)),(0,r.A)(this,Pm,(Sm(this),_m(this))),Nm(this)}get list(){return(0,c.A)(Lm,this)}set list(e){(0,l.A)(Lm,this,e)}get chatUrlTemplate(){return(0,c.A)(Pm,this)}set chatUrlTemplate(e){(0,l.A)(Pm,this,e)}render(){return h().createElement(Um,{list:this.list,chatUrlTemplate:this.chatUrlTemplate})}}function Um(e){let{list:t,chatUrlTemplate:i}=e;return t?h().createElement("ul",null,t.map(((e,t)=>{var n,a;return h().createElement("li",{className:"activity",key:t},h().createElement("div",{className:"guide-line"}),h().createElement("div",{className:"main"},h().createElement(Im,{className:"avatar",nameOrInstanceId:e.user_id,size:"xs"}),h().createElement("span",{className:"action"},e.user_name," ","start_conversation"===e.action_type?h().createElement(h().Fragment,null,h().createElement("span",null,vm(Em.STARTED_A_CHAT)),h().createElement(Rm,{className:"conversation",url:(0,wn.Q)(i,e),target:"_blank"},null===(n=e.metadata)||void 0===n?void 0:n.conversation_title),h().createElement(Mm,{className:"external-link-icon",lib:"lucide",icon:"external-link"})):"create_goal"===e.action_type?vm(Em.CREATED_THIS_GOAL):"edit_goal"===e.action_type?e.metadata.after.title?vm(Em.CHANGED_THE_GOAL_TITLE,e.metadata.after):e.metadata.after.description?vm(Em.CHANGED_THE_GOAL_DESCRIPTION,e.metadata.after):vm(Em.CHANGED_THE_GOAL):"delete_goal"===e.action_type?vm(Em.DELETED_THIS_GOAL):"decompose_goals"===e.action_type?`${vm(Em.DECOMPOSED_THIS_GOAL,{count:e.metadata.sub_goals_count})}${e.metadata.sub_goals.map((e=>e.title)).join(vm(Em.COMMA))}`:"alter_owner"===e.action_type?vm(Em.SET_OWNER,{user:e.metadata.after.owner.user_name}):"alter_user"===e.action_type?function(e){const t=[],i=[],n=new Set(e.metadata.before.users.map((e=>e.user_name)));for(const t of e.metadata.after.users)n.has(t.user_name)||i.push(t.user_name);const a=new Set(e.metadata.after.users.map((e=>e.user_name)));for(const i of e.metadata.before.users)a.has(i.user_name)||t.push(i.user_name);const r=[];return t.length>0&&r.push(vm(Em.REMOVED_GOAL_PARTICIPANTS,{count:t.length})+t.join(vm(Em.COMMA))),i.length>0&&r.push(vm(Em.ADDED_GOAL_PARTICIPANTS,{count:i.length})+i.join(vm(Em.COMMA))),r.join(vm(Em.SEMICOLON))}(e):"add_comment"===e.action_type?vm(Em.COMMENTED):e.action_type),h().createElement("span",{className:"time",title:(0,$h.P)(e.time,$h.c.full)},(0,$h.P)(e.time,$h.c.relative))),"add_comment"===e.action_type&&h().createElement("div",{className:"comment"},null===(a=e.metadata)||void 0===a?void 0:a.comment_content))}))):h().createElement("div",{className:"loading"},h().createElement(Mm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}wm=zm,({e:[Cm,Sm,_m,Nm],c:[Dm,Tm]}=(0,d.A)(wm,[Wm("ai-portal.activity-timeline",{styleTexts:[ym.A]})],[[Om({attribute:!1}),1,"list"],[Om(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),Tm();let Hm=function(e){return e.TERMINATE_THE_TASK="TERMINATE_THE_TASK",e}({});const Bm="bricks/ai-portal/chat-input",Vm=g.i18n.getFixedT(null,Bm);var jm,Fm=i(84479);let Gm,Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng,ag,rg,sg,og,lg,cg;(0,g.initializeI18n)(Bm,{en:{TERMINATE_THE_TASK:"Terminate the task"},zh:{TERMINATE_THE_TASK:"终止任务"}});const dg={lib:"antd",icon:"loading-3-quarters",spinning:!0},pg={lib:"fa",prefix:"far",icon:"circle-stop"},hg=(0,m.wrapBrick)("eo-icon"),ug=(0,m.wrapBrick)("ai-portal.icon-button"),{defineElement:mg,property:gg,event:bg}=(0,u.createDecorators)();let Ag;var xg=new WeakMap,kg=new WeakMap,Eg=new WeakMap,fg=new WeakMap,vg=new WeakMap,wg=new WeakMap,yg=new WeakSet,Tg=new WeakMap,Cg=new WeakMap,Sg=new WeakMap;class _g extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,yg),(0,r.A)(this,xg,Ym(this)),(0,r.A)(this,kg,(Km(this),Jm(this))),(0,r.A)(this,Eg,($m(this),qm(this))),(0,r.A)(this,fg,(Xm(this),Qm(this))),(0,r.A)(this,vg,(Zm(this),eg(this))),(0,r.A)(this,wg,(tg(this),ig(this))),(0,r.A)(this,Tg,(rg(this),e=>{(0,o.A)(yg,this,ng).emit(e)})),(0,r.A)(this,Cg,sg(this)),(0,r.A)(this,Sg,(cg(this),()=>{(0,o.A)(yg,this,og).emit()}))}get placeholder(){return(0,c.A)(xg,this)}set placeholder(e){(0,l.A)(xg,this,e)}get autoFocus(){return(0,c.A)(kg,this)}set autoFocus(e){(0,l.A)(kg,this,e)}get submitDisabled(){return(0,c.A)(Eg,this)}set submitDisabled(e){(0,l.A)(Eg,this,e)}get supportsTerminate(){return(0,c.A)(fg,this)}set supportsTerminate(e){(0,l.A)(fg,this,e)}get terminating(){return(0,c.A)(vg,this)}set terminating(e){(0,l.A)(vg,this,e)}render(){return h().createElement(Ng,{placeholder:this.placeholder,autoFocus:this.autoFocus,submitDisabled:this.submitDisabled,supportsTerminate:this.supportsTerminate,terminating:this.terminating,onSubmit:(0,c.A)(Tg,this),onTerminate:(0,c.A)(Sg,this)})}}function Ng(e){let{placeholder:t,autoFocus:i,submitDisabled:n,supportsTerminate:a,terminating:r,onSubmit:s,onTerminate:o}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(!1);(0,p.useEffect)((()=>{var e;i&&!n&&(null===(e=c.current)||void 0===e||e.focus())}),[i,n]);const A=(0,p.useCallback)((e=>{!n&&e&&(s(e),m.current="",u(""))}),[n,s]),x=(0,p.useCallback)((e=>{A(e.currentTarget.value)}),[A]),k=(0,p.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),E=(0,p.useCallback)((()=>{A(m.current)}),[A]);(0,p.useEffect)((()=>{const e=null==l?void 0:l.current;if(!e)return;const t=new xt.A((t=>{for(const i of t)i.target===e&&(i.contentBoxSize?i.contentBoxSize[0]?i.contentBoxSize[0].blockSize:i.contentBoxSize.blockSize:i.contentRect.height)>52&&b(!0)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,p.useEffect)((()=>{d||b(!1)}),[d]);const f=(0,p.useCallback)((e=>{var t;for(const t of e.nativeEvent.composedPath())if(t instanceof HTMLTextAreaElement||t instanceof HTMLButtonElement)return;null===(t=c.current)||void 0===t||t.focus()}),[]);return h().createElement("div",{className:"container",onClick:f},h().createElement("div",{className:on()("box",{wrap:g})},h().createElement("div",{className:"input",ref:l},h().createElement(ft,{containerRef:l,ref:c,value:d,minRows:1,maxRows:4,borderSize:0,paddingSize:16,autoResize:!0,placeholder:t,submitWhen:"enter-without-shift",onSubmit:x,onChange:k})),h().createElement("div",{className:"toolbar"},n&&a?h().createElement(h().Fragment,null,r?h().createElement(ug,{icon:dg,disabled:!0}):h().createElement(ug,{icon:pg,tooltip:Vm(Hm.TERMINATE_THE_TASK),onClick:o})):h().createElement("button",{className:"btn-send",disabled:n||!d,onClick:E},h().createElement(hg,{lib:"fa",icon:"arrow-up"})))))}jm=_g,({e:[Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng,ag,rg,sg,og,lg,cg],c:[Ag,Gm]}=(0,d.A)(jm,[mg("ai-portal.chat-input",{styleTexts:[Fm.A],shadowOptions:{delegatesFocus:!0}})],[[gg(),1,"placeholder"],[gg({type:Boolean}),1,"autoFocus"],[gg({type:Boolean}),1,"submitDisabled"],[gg({type:Boolean}),1,"supportsTerminate"],[gg({type:Boolean}),1,"terminating"],[bg({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(wg,e),(e,t)=>(0,l.A)(wg,e,t)],[bg({type:"terminate"}),1,"terminate",e=>(0,c.A)(Cg,e),(e,t)=>(0,l.A)(Cg,e,t)]],0,(e=>Sg.has((0,s.A)(e))),m.ReactNextElement)),Gm();const Rg=i.p+"images/e47076cc.png";var Mg,Ig=i(31653);let Wg;const{defineElement:Og}=(0,u.createDecorators)();let Dg;class Lg extends m.ReactNextElement{render(){return h().createElement("img",{className:"logo",alt:"Elevo",src:Rg,width:95,height:28})}}Mg=Lg,[Dg,Wg]=(0,d.A)(Mg,[Og("ai-portal.elevo-logo",{styleTexts:[Ig.A]})],[],0,void 0,m.ReactNextElement).c,Wg();let Pg=function(e){return e.WATCH_REPLAY="WATCH_REPLAY",e}({});const zg="bricks/ai-portal/show-case",Ug={en:{[Pg.WATCH_REPLAY]:"Watch replay"},zh:{[Pg.WATCH_REPLAY]:"查看回放"}},Hg=g.i18n.getFixedT(null,zg);var Bg,Vg=i(46122);let jg,Fg,Gg,Yg,Kg,Jg,$g;(0,g.initializeI18n)(zg,Ug);const qg=["purple","green","pink"],Xg=(0,m.wrapBrick)("eo-icon"),Qg=(0,m.wrapBrick)("eo-link"),{defineElement:Zg,property:eb}=(0,u.createDecorators)();let tb;var ib=new WeakMap,nb=new WeakMap,ab=new WeakMap;class rb extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ib,Fg(this)),(0,r.A)(this,nb,(Gg(this),Yg(this))),(0,r.A)(this,ab,(Kg(this),Jg(this))),$g(this)}get caseTitle(){return(0,c.A)(ib,this)}set caseTitle(e){(0,l.A)(ib,this,e)}get summary(){return(0,c.A)(nb,this)}set summary(e){(0,l.A)(nb,this,e)}get url(){return(0,c.A)(ab,this)}set url(e){(0,l.A)(ab,this,e)}render(){return h().createElement(sb,{caseTitle:this.caseTitle,summary:this.summary,url:this.url})}}function sb(e){let{caseTitle:t,summary:i,url:n}=e;return h().createElement(Qg,{className:`link ${qg[Math.floor(Math.random()*qg.length)]}`,url:n},h().createElement("span",{className:"title"},t),h().createElement("span",{className:"description"},i),h().createElement("span",{className:"mask"}),h().createElement("span",{className:"button"},h().createElement(Xg,{lib:"easyops",icon:"replay"}),Hg(Pg.WATCH_REPLAY)))}Bg=rb,({e:[Fg,Gg,Yg,Kg,Jg,$g],c:[tb,jg]}=(0,d.A)(Bg,[Zg("ai-portal.show-case",{styleTexts:[Vg.A]})],[[eb(),1,"caseTitle"],[eb(),1,"summary"],[eb(),1,"url"]],0,void 0,m.ReactNextElement)),jg(),customElements.define("ai-portal.call-tool",(0,Kl.createProviderClass)((async function(e,t){return(await kn.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/conversation/${e.conversationId}/step/${e.stepId}/view`,{params:t})).data})));const ob=i.p+"images/449e2e64.png",lb=i.p+"images/fc2c99bb.png";var cb,db=i(19428);let pb,hb,ub,mb,gb;const{defineElement:bb,property:Ab}=(0,u.createDecorators)();let xb;var kb=new WeakMap,Eb=new WeakMap;class fb extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,kb,hb(this)),(0,r.A)(this,Eb,(ub(this),mb(this))),gb(this)}get illustration(){return(0,c.A)(kb,this)}set illustration(e){(0,l.A)(kb,this,e)}get description(){return(0,c.A)(Eb,this)}set description(e){(0,l.A)(Eb,this,e)}render(){return h().createElement(vb,{illustration:this.illustration,description:this.description})}}function vb(e){let{illustration:t,description:i}=e;return h().createElement(h().Fragment,null,h().createElement("img",{src:wb(t),width:184,height:138}),h().createElement("p",null,i))}function wb(e){return"goals"===e?ob:lb}cb=fb,({e:[hb,ub,mb,gb],c:[xb,pb]}=(0,d.A)(cb,[bb("ai-portal.blank-state",{styleTexts:[db.A]})],[[Ab(),1,"illustration"],[Ab(),1,"description"]],0,void 0,m.ReactNextElement)),pb()},40138:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:inline-block}:host([hidden]){display:none}*{box-sizing:border-box}.trigger{display:flex;align-items:center;font-size:14px;cursor:pointer;position:relative;padding:4px 12px;border-radius:15px;color:var(--elevo-color-brand)}.trigger:hover{background-color:rgba(37,64,255,0.06)}.trigger::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;background:linear-gradient(145deg,rgba(37,64,255,1),rgba(180,95,248,1));border-radius:15px;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:xor;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor}.trigger .label{margin-right:0}.label{max-width:650px;margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown{max-width:500px;border-radius:4px;background:var(--antd-dropdown-menu-bg);box-shadow:var(--antd-box-shadow-base)}.dropdown-inner{padding:9px 4px}.search-container{padding:3px;border-bottom:1px solid rgba(0,0,0,0.08)}.search::part(affix-wrapper){box-shadow:none;border:none}eo-menu{border:0;padding:0;background:none;border-radius:0}eo-menu-item::part(menu-item){padding:5px 8px;line-height:22px;border-radius:var(--medius-border-radius)}eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.active::part(menu-item){font-weight:600;background-color:var(--left-sidebar-item-hover-bg)}.empty{display:flex;justify-content:center;align-items:center;color:var(--color-secondary-text)}',""]);const o=s.toString()},42873:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:flex;flex-direction:column;align-items:center;max-width:1020px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.tips{color:rgba(0,0,0,0.45);margin-bottom:27px}.cases{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px;margin-top:36px}",""]);const o=s.toString()},46121:(e,t,i)=>{e.exports=i.p+"images/69cf3ae2.png"},46122:(e,t,i)=>{i.d(t,{A:()=>b});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(56791),i.b),d=new URL(i(88786),i.b),p=new URL(i(46121),i.b),h=s()(a()),u=l()(c),m=l()(d),g=l()(p);h.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.link{display:block;background:rgba(255,255,255,0.6);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-size:cover;background-position:center;background-repeat:no-repeat;background-clip:padding-box;overflow:hidden}.purple{background-image:url(${u})}.green{background-image:url(${m})}.pink{background-image:url(${g})}.link::part(link){display:flex;flex-direction:column;gap:0;box-sizing:border-box;height:128px;padding:20px;position:relative}.title{width:100%;margin-bottom:8px;color:#262626;font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{width:100%;height:60px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;color:#18212f;line-height:20px}.link::part(link):hover{box-shadow:0px 4px 12px 0px rgba(96,96,138,0.15),0px 2px 4px 0px rgba(96,96,138,0.06)}.button{display:none;position:absolute;bottom:12px;left:20px;right:20px;height:32px;background:rgba(0,0,0,0.04);border-radius:8px;align-items:center;justify-content:center;gap:4px;color:#262626}.button:hover{background:rgba(0,0,0,0.08)}.link:hover .button{display:flex}.link:hover .description{-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 60%;mask-size:100% 60%}`,""]);const b=h.toString()},46342:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,".goal-item{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 24px;background-color:rgba(255,255,255,0.6);border-radius:8px;-webkit-user-select:none;user-select:none;border:1px solid transparent}.goal-item:hover,.goal-item:has(.title:focus){background-color:rgba(0,0,0,0.05)}.goal-item:has(.title:focus) .end .operation{display:flex}.goal-item:hover:not(.does-not-exist) .end .operation{display:flex}.goal-item:has(.title:focus) .end .info{display:none}.goal-item:hover:not(.does-not-exist) .end .info{display:none}.goal-item.completed .serial-number,.goal-item.completed .title{color:#bfbfbf}.goal-item.active{background:rgba(37,64,255,0.1);border:1px solid #2540ff}.goal-item > *{-webkit-user-select:auto;user-select:auto}.goal-item .start,.goal-item .end{display:flex;align-items:center}.goal-item .start{flex:1;min-width:0;column-gap:16px;min-width:0}.goal-item .end{flex-shrink:0;column-gap:30px}.goal-item .end .operation{display:none;align-items:center;gap:8px}.goal-item .end .operation eo-button::part(button){height:28px}.goal-item .end .operation .new-chat::part(button){padding:5px 10px;font-size:13px}.goal-item .end .operation .append-child::part(button){padding:5px 8px;font-size:14px}.goal-item .end .info{display:inline-flex;align-items:center;column-gap:24px}.goal-item .serial-number{font-weight:400;color:var(--palette-gray-7);font-size:16px;overflow:visible}.goal-item .title{font-weight:500;padding:2px 4px;font-size:16px;color:var(--palette-gray-10);border:1px solid transparent;border-radius:8px;cursor:pointer;min-width:80px}.goal-item .title:hover{background-color:rgba(255,255,255,0.6);border:1px solid var(--palette-gray-5);cursor:text}.goal-item .title:focus{outline:none;background-color:rgba(255,255,255,0.6);border:1px solid var(--elevo-color-brand)}.goal-item .icon{border-radius:8px;padding:6px;position:relative;top:2px}.goal-item .icon:hover{background-color:rgba(0,0,0,0.04)}.goal-item .message{color:var(--palette-gray-7);display:inline-flex;align-items:center;column-gap:6px}.goal-item .message .count{font-weight:500;color:var(--palette-gray-10)}.goal-item:not(.editing) .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",""]);const o=s.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(47336),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background:url(${p}) no-repeat center bottom;background-size:100% 104px;padding:12px 12px 29px;margin:0 -12px}.container{position:relative;background:#ffffff;box-shadow:0px 2px 4px 0px rgba(38,45,65,0.1);border-radius:16px;border:1px solid #dadfe8}.container:has(textarea:focus){border-color:#b7c3d8}textarea{display:block;width:100%;padding:10px 16px 50px;color:var(--antd-input-color);border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font:inherit;font-size:14px;line-height:22px;height:120px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.actions-bar{position:absolute;bottom:12px;left:14px;right:14px;display:flex;align-items:flex-end;justify-content:space-between}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff;flex-shrink:0}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.mentions{position:absolute}.mention-overlay{position:absolute;border-radius:4px;pointer-events:none;background:rgba(38,45,65,0.1)}`,""]);const h=d.toString()},47336:(e,t,i)=>{e.exports=i.p+"images/25c20165.png"},47338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}:host([variant="mini-light"]) button{color:#8c8c8c;width:20px;height:20px;font-size:14px;border-radius:4px}:host([variant="bordered"]) button{background:#ffffff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);color:#595959;width:32px;height:32px;font-size:18px}:host([variant="bordered"]) button:not(:disabled):hover{background:rgba(0,0,0,0.04)}',""]);const o=s.toString()},49041:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(25676),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:17px 54px 48px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}.header{margin-bottom:30px;display:flex;justify-content:space-between;align-items:center}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;min-width:0}h1{margin:0;font-size:inherit;line-height:inherit}.breadcrumbs{list-style:none;padding:0;margin:0;color:#bfbfbf}.breadcrumbs eo-link::part(link){color:inherit}.breadcrumbs eo-link::part(link):hover{color:#595959}.breadcrumbs li::after{content:"/";margin:0 8px}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}.header{margin-left:40px}}`,""]);const h=d.toString()},56791:(e,t,i)=>{e.exports=i.p+"images/3e0f6758.png"},61408:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const o=s.toString()},62522:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,"ai-portal\\.preview-container{display:block;background:rgba(247,248,250,1)}.loading--uD2jY9vX{position:absolute;top:50%;left:50%;font-size:48px;color:var(--palette-gray-5);margin:0 -24px}",""]),s.locals={loading:"loading--uD2jY9vX"};const o=s},79286:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;gap:16px;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.item:not(:last-child){margin-bottom:4px}.icon{font-size:18px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal{background:#f0fff8;border-radius:4px;font-weight:500;font-size:12px;color:#1dc897;line-height:20px;padding:2px 8px;white-space:nowrap}.goal.global{background:#e6f4ff;color:#1a7aff}.header{display:flex;align-items:center}.description{color:#595959;margin-top:6px;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);white-space:nowrap}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:right;width:100px}.operations.lang-zh{width:64px}.link.actions-active .time,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block;padding:24px 54px 72px}:host([hidden]){display:none}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:#f1f1f1;background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(25676),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px;margin-bottom:17px}.list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const h=d.toString()},84479:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{background-color:#fff;border:2px solid #7891ff;border-radius:12px;box-shadow:0px 9px 28px 8px rgba(0,0,0,0.05),0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);cursor:text}.container:not(:has(textarea:focus)){background-color:rgba(255,255,255,0.5);border-color:#99c4ff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.box{display:flex;flex-wrap:wrap;border-radius:10px;padding:8px}.input{min-width:0;flex:1}.wrap .input{flex-basis:100%}.input textarea{display:block;width:100%;padding:8px;font:inherit;font-size:16px;line-height:24px;color:var(--antd-input-color);border:none;background:none;height:24px;color:#262626}.input textarea::placeholder{color:#bfbfbf}.toolbar{padding:5px 0 5px 8px;margin-left:auto;display:flex;align-items:center;gap:2px}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send:disabled{background:rgba(0,0,0,0.15)}.btn-send:not(:disabled){cursor:pointer}.btn-send:not(:disabled):hover{background:#5166ff}.btn-send:not(:disabled):active{background:#1e33cc}",""]);const o=s.toString()},88786:(e,t,i)=>{e.exports=i.p+"images/e15a6988.png"},98036:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(25676),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto;margin-bottom:17px}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6;display:flex;align-items:center;justify-content:center;font-size:24px}.avatar img{width:100%;height:100%}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()}}]);
3
- //# sourceMappingURL=8551.af6f8818.js.map