@next-bricks/ai-portal 0.56.2 → 0.57.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.
- package/dist/bricks.json +42 -32
- package/dist/chunks/7868.f4c744a7.js +2 -0
- package/dist/chunks/7868.f4c744a7.js.map +1 -0
- package/dist/chunks/{main.e3031a8c.js → main.a8c98afa.js} +2 -2
- package/dist/chunks/{main.e3031a8c.js.map → main.a8c98afa.js.map} +1 -1
- package/dist/chunks/notice-dropdown.37b8ffb2.js +2 -0
- package/dist/chunks/notice-dropdown.37b8ffb2.js.map +1 -0
- package/dist/examples.json +20 -17
- package/dist/images/0155287e.svg +18 -0
- package/dist/images/0e89dec0.svg +19 -0
- package/dist/images/218d5865.svg +18 -0
- package/dist/images/391238ae.png +0 -0
- package/dist/images/dcee4821.svg +12 -0
- package/dist/index.b1550ef8.js +2 -0
- package/dist/index.b1550ef8.js.map +1 -0
- package/dist/manifest.json +276 -208
- package/dist/types.json +499 -317
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/notice-dropdown/i18n.d.ts +18 -0
- package/dist-types/notice-dropdown/index.d.ts +61 -0
- package/dist-types/notice-dropdown/index.spec.d.ts +1 -0
- package/docs/notice-dropdown.md +101 -0
- package/package.json +2 -2
- package/dist/chunks/7517.f62fe00f.js +0 -2
- package/dist/chunks/7517.f62fe00f.js.map +0 -1
- package/dist/index.9a811707.js +0 -2
- package/dist/index.9a811707.js.map +0 -1
package/dist/bricks.json
CHANGED
|
@@ -2,39 +2,40 @@
|
|
|
2
2
|
"id": "bricks/ai-portal",
|
|
3
3
|
"bricks": [
|
|
4
4
|
"ai-portal.cruise-canvas",
|
|
5
|
-
"ai-portal.chat-box",
|
|
6
|
-
"ai-portal.home-container",
|
|
7
5
|
"ai-portal.stat-with-mini-chart",
|
|
8
6
|
"ai-portal.elevo-sidebar",
|
|
9
7
|
"ai-portal.icon-button",
|
|
10
8
|
"ai-portal.show-cases",
|
|
11
9
|
"ai-portal.mcp-tools",
|
|
10
|
+
"ai-portal.chat-stream",
|
|
12
11
|
"ai-portal.ai-employees",
|
|
13
|
-
"ai-portal.
|
|
12
|
+
"ai-portal.home-container",
|
|
14
13
|
"ai-portal.call-tool",
|
|
15
|
-
"ai-portal.
|
|
14
|
+
"ai-portal.ai-agents",
|
|
15
|
+
"ai-portal.set-chat-command",
|
|
16
16
|
"ai-portal.save-request-store",
|
|
17
17
|
"ai-portal.load-request-store",
|
|
18
18
|
"ai-portal.clear-request-store",
|
|
19
|
-
"ai-portal.set-chat-command",
|
|
20
19
|
"ai-portal.page-container",
|
|
20
|
+
"ai-portal.chat-box",
|
|
21
21
|
"ai-portal.tab-list",
|
|
22
|
-
"ai-portal.preview-container",
|
|
23
22
|
"ai-portal.dropdown-select",
|
|
23
|
+
"ai-portal.preview-container",
|
|
24
|
+
"ai-portal.action-buttons",
|
|
24
25
|
"ai-portal.goal-card-list",
|
|
25
26
|
"ai-portal.project-conversations",
|
|
26
|
-
"ai-portal.action-buttons",
|
|
27
27
|
"ai-portal.project-knowledges",
|
|
28
28
|
"ai-portal.activity-timeline",
|
|
29
|
-
"ai-portal.chat-input",
|
|
30
29
|
"ai-portal.elevo-logo",
|
|
30
|
+
"ai-portal.chat-input",
|
|
31
31
|
"ai-portal.show-case",
|
|
32
32
|
"ai-portal.blank-state",
|
|
33
33
|
"ai-portal.sticky-container",
|
|
34
34
|
"ai-portal.elevo-card",
|
|
35
35
|
"ai-portal.flow-tabs",
|
|
36
36
|
"ai-portal.stage-flow",
|
|
37
|
-
"ai-portal.running-flow"
|
|
37
|
+
"ai-portal.running-flow",
|
|
38
|
+
"ai-portal.notice-dropdown"
|
|
38
39
|
],
|
|
39
40
|
"elements": [],
|
|
40
41
|
"processors": [],
|
|
@@ -59,11 +60,6 @@
|
|
|
59
60
|
"presentational.code-wrapper",
|
|
60
61
|
"eo-avatar"
|
|
61
62
|
],
|
|
62
|
-
"ai-portal.chat-box": [
|
|
63
|
-
"eo-icon",
|
|
64
|
-
"eo-actions",
|
|
65
|
-
"ai-portal.icon-button"
|
|
66
|
-
],
|
|
67
63
|
"ai-portal.stat-with-mini-chart": [
|
|
68
64
|
"eo-mini-line-chart"
|
|
69
65
|
],
|
|
@@ -89,15 +85,6 @@
|
|
|
89
85
|
"ai-portal.tab-list",
|
|
90
86
|
"ai-portal.sticky-container"
|
|
91
87
|
],
|
|
92
|
-
"ai-portal.ai-employees": [
|
|
93
|
-
"eo-link",
|
|
94
|
-
"eo-icon",
|
|
95
|
-
"ai-portal.tab-list"
|
|
96
|
-
],
|
|
97
|
-
"ai-portal.ai-agents": [
|
|
98
|
-
"eo-icon",
|
|
99
|
-
"eo-link"
|
|
100
|
-
],
|
|
101
88
|
"ai-portal.chat-stream": [
|
|
102
89
|
"eo-icon",
|
|
103
90
|
"eo-button",
|
|
@@ -115,15 +102,23 @@
|
|
|
115
102
|
"basic.copy-to-clipboard",
|
|
116
103
|
"presentational.code-wrapper"
|
|
117
104
|
],
|
|
105
|
+
"ai-portal.ai-employees": [
|
|
106
|
+
"eo-link",
|
|
107
|
+
"eo-icon",
|
|
108
|
+
"ai-portal.tab-list"
|
|
109
|
+
],
|
|
110
|
+
"ai-portal.ai-agents": [
|
|
111
|
+
"eo-icon",
|
|
112
|
+
"eo-link"
|
|
113
|
+
],
|
|
118
114
|
"ai-portal.page-container": [
|
|
119
115
|
"eo-link",
|
|
120
116
|
"ai-portal.sticky-container"
|
|
121
117
|
],
|
|
122
|
-
"ai-portal.
|
|
118
|
+
"ai-portal.chat-box": [
|
|
123
119
|
"eo-icon",
|
|
124
|
-
"eo-
|
|
125
|
-
"
|
|
126
|
-
"eo-narrow-view"
|
|
120
|
+
"eo-actions",
|
|
121
|
+
"ai-portal.icon-button"
|
|
127
122
|
],
|
|
128
123
|
"ai-portal.dropdown-select": [
|
|
129
124
|
"eo-popover",
|
|
@@ -133,6 +128,16 @@
|
|
|
133
128
|
"eo-menu-item",
|
|
134
129
|
"eo-input"
|
|
135
130
|
],
|
|
131
|
+
"ai-portal.preview-container": [
|
|
132
|
+
"eo-icon",
|
|
133
|
+
"eo-page-title",
|
|
134
|
+
"eo-main-view",
|
|
135
|
+
"eo-narrow-view"
|
|
136
|
+
],
|
|
137
|
+
"ai-portal.action-buttons": [
|
|
138
|
+
"eo-icon",
|
|
139
|
+
"eo-button"
|
|
140
|
+
],
|
|
136
141
|
"ai-portal.goal-card-list": [
|
|
137
142
|
"eo-icon",
|
|
138
143
|
"eo-dropdown-actions",
|
|
@@ -145,10 +150,6 @@
|
|
|
145
150
|
"eo-easyops-avatar",
|
|
146
151
|
"eo-mini-actions"
|
|
147
152
|
],
|
|
148
|
-
"ai-portal.action-buttons": [
|
|
149
|
-
"eo-icon",
|
|
150
|
-
"eo-button"
|
|
151
|
-
],
|
|
152
153
|
"ai-portal.project-knowledges": [
|
|
153
154
|
"eo-link",
|
|
154
155
|
"eo-icon",
|
|
@@ -180,7 +181,16 @@
|
|
|
180
181
|
],
|
|
181
182
|
"ai-portal.running-flow": [
|
|
182
183
|
"eo-icon"
|
|
184
|
+
],
|
|
185
|
+
"ai-portal.notice-dropdown": [
|
|
186
|
+
"eo-popover",
|
|
187
|
+
"eo-icon",
|
|
188
|
+
"eo-link",
|
|
189
|
+
"eo-button",
|
|
190
|
+
"eo-counter-badge",
|
|
191
|
+
"ai-portal.icon-button",
|
|
192
|
+
"eo-tooltip"
|
|
183
193
|
]
|
|
184
194
|
},
|
|
185
|
-
"filePath": "bricks/ai-portal/dist/index.
|
|
195
|
+
"filePath": "bricks/ai-portal/dist/index.b1550ef8.js"
|
|
186
196
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[7868],{24:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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()},9884:(e,t,i)=>{i.d(t,{A:()=>h});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(17932),i.b),d=s()(n()),p=l()(c);d.push([e.id,`:host{display:inline-block}:host([hidden]){display:none}.popover::part(popup){border-radius:12px}.notice-dropdown-content{max-width:500px;border-radius:12px;display:flex;flex-direction:column;background-image:url(${p});background-size:cover}.header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px}.title{font-size:18px;font-weight:500;color:var(--text-color-title)}.close-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:#000}ul{list-style:none;margin:0;padding:4px}.content{flex:1;max-height:500px;overflow-y:auto}.link{display:block}.link::part(link){display:flex;align-items:start;gap:12px;padding:10px 16px}.link:hover::part(link):hover{background-color:rgba(0,0,0,0.04);border-radius:8px}.link:last-child{border-bottom:none}.icon-wrapper{position:relative;flex-shrink:0;width:18px;height:18px;padding:2px 0;display:flex;align-items:center;justify-content:center;font-size:18px}.message-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.primary-text{font-size:14px;font-weight:400;line-height:20px;color:var(--text-color-title)}.secondary-text{color:rgba(0,0,0,0.45)}.empty-state{padding:60px 20px;text-align:center;font-size:14px;color:var(--text-color-secondary)}.footer{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:9px 10px;box-shadow:0px -12px 16px -8px rgba(0,0,0,0.08);border-radius:0px 0px 12px 12px}.footer .footer-button::part(button){color:var(--text-color-secondary)}.footer .footer-button::part(button):hover{color:var(--text-color-default)!important}`,""]);const h=d.toString()},10335:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.button-container{display:flex;gap:6px}.action{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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}.activity:first-child:last-child .guide-line::before{height:0}.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()},17932:(e,t,i)=>{e.exports=i.p+"images/391238ae.png"},18338:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.card{display:block}.card::part(link){display:flex;flex-direction:column;gap:12px;background:rgba(255,255,255,0.6);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.04);border-radius:12px;border:1px solid #fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:16px;color:#262626}.card:not(.clickable)::part(link){cursor:auto}.card::part(link):hover{background:#fff}.header,\n.body,\n.footer{width:100%}.header{display:flex;gap:12px}.heading{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.avatar{width:42px;height:42px;border-radius:50%;border:1px solid rgba(0,0,0,0.15);font-size:24px;display:flex;align-items:center;justify-content:center}.title{font-weight:500;font-size:16px;color:#262626;line-height:22px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{margin:-8px -8px 0 0}.body{font-size:12px;color:rgba(0,0,0,0.45);line-height:17px;height:51px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.footer{align-items:center;justify-content:flex-end;gap:8px}.footer:not([hidden]){display:flex}",""]);const o=s.toString()},19428:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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;flex-wrap:wrap;gap:32px;row-gap:10px;font-size:16px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer;padding:0 0 4px;display:block;position:relative}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";position:absolute;bottom:0;left:0;right:0;height:4px;background-color:currentColor;border-radius:2px}',""]);const o=s.toString()},23677:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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()},24523:(e,t,i)=>{var a,n=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(52616)),A=i(2901),b=i(70916);let v,E,f,x,k,w,y,T,S,N,C,_,M,R,I,W,D,L,O,P,z,B,U,H,G,F,V,j,K,$,q,Y,X,J,Q,Z,ee,te,ie,ae,ne,re,se,oe,le,ce,de,pe,he,ue,me,ge,Ae,be,ve,Ee,fe,xe,ke,we,ye,Te;(0,g.initializeI18n)(A.NS,A.I);const{defineElement:Se,property:Ne,event:Ce,method:_e}=(0,u.createDecorators)(),Me=(0,p.forwardRef)(b.B);let Re;var Ie=new WeakMap,We=new WeakMap,De=new WeakMap,Le=new WeakMap,Oe=new WeakMap,Pe=new WeakMap,ze=new WeakMap,Be=new WeakMap,Ue=new WeakMap,He=new WeakMap,Ge=new WeakMap,Fe=new WeakMap,Ve=new WeakMap,je=new WeakMap,Ke=new WeakMap,$e=new WeakMap,qe=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Je=new WeakSet,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,at=new WeakMap,nt=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,n.A)(this,Je),(0,r.A)(this,Ie,(v(this),f(this))),(0,r.A)(this,We,(x(this),k(this))),(0,r.A)(this,De,(w(this),y(this))),(0,r.A)(this,Le,(T(this),S(this))),(0,r.A)(this,Oe,(N(this),C(this))),(0,r.A)(this,Pe,(_(this),M(this))),(0,r.A)(this,ze,(R(this),I(this))),(0,r.A)(this,Be,(W(this),D(this))),(0,r.A)(this,Ue,(L(this),O(this))),(0,r.A)(this,He,(P(this),z(this))),(0,r.A)(this,Ge,(B(this),U(this))),(0,r.A)(this,Fe,(H(this),G(this))),(0,r.A)(this,Ve,(F(this),V(this))),(0,r.A)(this,je,(j(this),K(this))),(0,r.A)(this,Ke,($(this),q(this))),(0,r.A)(this,$e,(Y(this),X(this))),(0,r.A)(this,qe,(J(this),Q(this))),(0,r.A)(this,Ye,(Z(this),ee(this))),(0,r.A)(this,Xe,(te(this),ie(this))),(0,r.A)(this,Qe,(re(this),()=>{(0,o.A)(Je,this,ae).emit()})),(0,r.A)(this,Ze,se(this)),(0,r.A)(this,et,(ce(this),()=>{(0,o.A)(Je,this,oe).emit()})),(0,r.A)(this,tt,de(this)),(0,r.A)(this,it,(ue(this),e=>{(0,o.A)(Je,this,pe).emit(e)})),(0,r.A)(this,at,me(this)),(0,r.A)(this,nt,(be(this),e=>{(0,o.A)(Je,this,ge).emit(e)})),(0,r.A)(this,rt,ve(this)),(0,r.A)(this,st,(xe(this),()=>{(0,o.A)(Je,this,Ee).emit("chat")})),(0,r.A)(this,ot,ke(this)),(0,r.A)(this,lt,(Te(this),e=>{(0,o.A)(Je,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)(De,this)}set replay(e){(0,l.A)(De,this,e)}get replayDelay(){return(0,c.A)(Le,this)}set replayDelay(e){(0,l.A)(Le,this,e)}get supports(){return(0,c.A)(Oe,this)}set supports(e){(0,l.A)(Oe,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)(Be,this)}set showFeedback(e){(0,l.A)(Be,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Ue,this)}set showFeedbackAfterFailed(e){(0,l.A)(Ue,this,e)}get showFeedbackOnView(){return(0,c.A)(He,this)}set showFeedbackOnView(e){(0,l.A)(He,this,e)}get showUiSwitch(){return(0,c.A)(Ge,this)}set showUiSwitch(e){(0,l.A)(Ge,this,e)}get hideMermaid(){return(0,c.A)(Fe,this)}set hideMermaid(e){(0,l.A)(Fe,this,e)}get showJsxEditor(){return(0,c.A)(Ve,this)}set showJsxEditor(e){(0,l.A)(Ve,this,e)}get previewUrlTemplate(){return(0,c.A)(je,this)}set previewUrlTemplate(e){(0,l.A)(je,this,e)}get showCases(){return(0,c.A)(Ke,this)}set showCases(e){(0,l.A)(Ke,this,e)}get exampleProjects(){return(0,c.A)($e,this)}set exampleProjects(e){(0,l.A)($e,this,e)}get tryItOutUrl(){return(0,c.A)(qe,this)}set tryItOutUrl(e){(0,l.A)(qe,this,e)}get separateInstructions(){return(0,c.A)(Ye,this)}set separateInstructions(e){(0,l.A)(Ye,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(Me,{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)(nt,this),onDetailChange:(0,c.A)(lt,this),ref:(0,c.A)(ct,this)})}}a=dt,({e:[f,x,k,w,y,T,S,N,C,_,M,R,I,W,D,L,O,P,z,B,U,H,G,F,V,j,K,$,q,Y,X,J,Q,Z,ee,te,ie,ae,ne,re,se,oe,le,ce,de,pe,he,ue,me,ge,Ae,be,ve,Ee,fe,xe,ke,we,ye,Te,v],c:[Re,E]}=(0,d.A)(a,[Se("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Ne(),1,"conversationId"],[Ne({attribute:!1,render:!1}),1,"initialRequest"],[Ne({type:Boolean,render:!1}),1,"replay"],[Ne({type:Number,render:!1}),1,"replayDelay"],[Ne({attribute:!1}),1,"supports"],[Ne({type:Boolean}),1,"showHiddenJobs"],[Ne({type:Boolean}),1,"showHumanActions"],[Ne({type:Boolean}),1,"showFeedback"],[Ne({type:Boolean}),1,"showFeedbackAfterFailed"],[Ne({type:Boolean}),1,"showFeedbackOnView"],[Ne({type:Boolean}),1,"showUiSwitch"],[Ne({type:Boolean,render:!1}),1,"hideMermaid"],[Ne({type:Boolean}),1,"showJsxEditor"],[Ne(),1,"previewUrlTemplate"],[Ne({attribute:!1}),1,"showCases"],[Ne({attribute:!1}),1,"exampleProjects"],[Ne(),1,"tryItOutUrl"],[Ne({type:Boolean}),1,"separateInstructions"],[Ce({type:"share"}),1,"shareEvent",e=>(0,c.A)(Xe,e),(e,t)=>(0,l.A)(Xe,e,t)],[Ce({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ze,e),(e,t)=>(0,l.A)(Ze,e,t)],[Ce({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(tt,e),(e,t)=>(0,l.A)(tt,e,t)],[Ce({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(at,e),(e,t)=>(0,l.A)(at,e,t)],[Ce({type:"ui.switch"}),1,"switch",e=>(0,c.A)(rt,e),(e,t)=>(0,l.A)(rt,e,t)],[Ce({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(ot,e),(e,t)=>(0,l.A)(ot,e,t)],[_e(),2,"resumed"],[_e(),2,"feedbackSubmitDone"],[_e(),2,"feedbackSubmitFailed"],[_e(),2,"feedbackOnViewDone"]],0,(e=>ct.has((0,s.A)(e))),m.ReactNextElement)),E();var pt=i(24586),ht=i(59435),ut=i(22919),mt=i(30348),gt=i(78404),At=i(86572),bt=i(92879),vt=i(16195),Et=i(47008),ft=i(77019);let xt=null;function kt(e){xt=e}function wt(){return xt}customElements.define("ai-portal.set-chat-command",(0,ft.createProviderClass)(kt));var yt,Tt=i(7450),St=i(89750),Nt=i(17753);let Ct,_t,Mt,Rt,It,Wt,Dt,Lt,Ot,Pt,zt,Bt,Ut,Ht,Gt,Ft,Vt,jt,Kt,$t,qt,Yt,Xt,Jt,Qt,Zt,ei,ti,ii,ai;(0,g.initializeI18n)(vt.NS,vt.I);const{defineElement:ni,property:ri,event:si,method:oi}=(0,u.createDecorators)(),li=(0,p.forwardRef)(Si);let ci;var di=new WeakMap,pi=new WeakMap,hi=new WeakMap,ui=new WeakMap,mi=new WeakMap,gi=new WeakMap,Ai=new WeakMap,bi=new WeakSet,vi=new WeakMap,Ei=new WeakMap,fi=new WeakMap,xi=new WeakMap,ki=new WeakMap,wi=new WeakMap,yi=new WeakMap;class Ti extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,bi),(0,pt.A)(this,"ref",(Ct(this),(0,p.createRef)())),(0,r.A)(this,di,Mt(this)),(0,r.A)(this,pi,(Rt(this),It(this))),(0,r.A)(this,hi,(Wt(this),Dt(this))),(0,r.A)(this,ui,(Lt(this),Ot(this))),(0,r.A)(this,mi,(Pt(this),zt(this))),(0,r.A)(this,gi,(Bt(this),Ut(this))),(0,r.A)(this,Ai,(Ht(this),Gt(this))),(0,r.A)(this,vi,(jt(this),e=>{(0,o.A)(bi,this,Ft).emit(e)})),(0,r.A)(this,Ei,Kt(this)),(0,r.A)(this,fi,(Yt(this),e=>{(0,o.A)(bi,this,$t).emit(e)})),(0,r.A)(this,xi,Xt(this)),(0,r.A)(this,ki,(Zt(this),e=>{(0,o.A)(bi,this,Jt).emit(e)})),(0,r.A)(this,wi,ei(this)),(0,r.A)(this,yi,(ai(this),e=>{(0,o.A)(bi,this,ti).emit(e)}))}get disabled(){return(0,c.A)(di,this)}set disabled(e){(0,l.A)(di,this,e)}get placeholder(){return(0,c.A)(pi,this)}set placeholder(e){(0,l.A)(pi,this,e)}get autoFocus(){return(0,c.A)(hi,this)}set autoFocus(e){(0,l.A)(hi,this,e)}get aiEmployees(){return(0,c.A)(ui,this)}set aiEmployees(e){(0,l.A)(ui,this,e)}get commands(){return(0,c.A)(mi,this)}set commands(e){(0,l.A)(mi,this,e)}get uploadFiles(){return(0,c.A)(gi,this)}set uploadFiles(e){(0,l.A)(gi,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(li,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,aiEmployees:this.aiEmployees,commands:this.commands,uploadFiles:this.uploadFiles,onMessageSubmit:(0,c.A)(vi,this),onChatSubmit:(0,c.A)(fi,this),onEmployeeMention:(0,c.A)(ki,this),onCommandSelect:(0,c.A)(yi,this),ref:this.ref})}}function Si(e,t){let{disabled:i,placeholder:a,autoFocus:n,aiEmployees:r,commands:s,uploadFiles:o,onMessageSubmit:l,onChatSubmit:c,onEmployeeMention:d,onCommandSelect:u}=e;const m=(0,p.useRef)(null),g=(0,p.useRef)(null),[A,b]=(0,p.useState)(""),v=(0,p.useRef)(""),[E,f]=(0,p.useState)(null),[x,k]=(0,p.useState)(""),[w,y]=(0,p.useState)(0),[T,S]=(0,p.useState)([0]),[N,C]=(0,p.useState)(null),[_,M]=(0,p.useState)(null),[R,I]=(0,p.useState)(""),W=(0,p.useRef)(null),[D,L]=(0,p.useState)(),O=!!D&&D.length>0;(0,p.useEffect)((()=>{null==D||D.forEach((async e=>{if("ready"===e.status){const t=new AbortController;L((i=>null==i?void 0:i.map((i=>i.uid===e.uid?{...i,status:"uploading",abortController:t}:i))));try{const i=new FormData;i.append("file",e.file);const a=await ut.http.request("api/gateway/logic.llm.aiops_service/api/v1/elevo/files/upload",{method:"POST",body:i,signal:t.signal});L((t=>null==t?void 0:t.map((t=>t.uid===e.uid?{...t,status:"done",fileInfo:a.data}:t))))}catch(t){L((t=>null==t?void 0:t.map((t=>t.uid===e.uid?{...t,status:"failed"}:t)))),(0,mt.handleHttpError)(t)}}}))}),[D]),(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)&&(v.current=e.content,b(e.content))}),[]),(0,p.useImperativeHandle)(t,(()=>({setValue:e=>{v.current=e,b(e)},getValue:()=>v.current,focusOnInput:()=>{var e;null===(e=g.current)||void 0===e||e.focus()}})));const[P,z]=(0,p.useState)(!0),[B,U]=(0,p.useState)(),H=(0,p.useRef)(!0);(0,p.useEffect)((()=>{const e=!D||D.every((e=>"done"===e.status));z(e),H.current?H.current=!1:e&&U(null==D?void 0:D.map((e=>e.fileInfo)))}),[D]);const G=(0,p.useCallback)((e=>{var t;const i=e.slice(null!==(t=null==R?void 0:R.length)&&void 0!==t?t:0);l(i),c({content:i,files:B})}),[null==R?void 0:R.length,B,c,l]),F=(0,p.useCallback)((e=>{e.currentTarget.value&&P&&G(e.currentTarget.value)}),[G,P]),V=(0,p.useCallback)((e=>{const{value:t,selectionStart:i,selectionEnd:a}=e.target;if(v.current=t,b(t),!x&&null!==i&&i===a&&null!=r&&r.length){const a=t.slice(0,i),n=a.lastIndexOf("@");if(n>=0){const t=a.slice(n+1).toLowerCase(),s=r.filter((e=>e.employeeId.toLowerCase().includes(t)||e.name.toLowerCase().includes(t))).slice(0,10);if(s.length>0){const t=(0,gt.U)(e.currentTarget,i),a=e.currentTarget.getBoundingClientRect();return f({style:{left:t.left+10+a.left,top:t.top+22+a.top,position:"absolute",zIndex:1},range:{start:n,end:i},actions:s.map((e=>({key:e.employeeId,text:e.name,data:e})))}),void y(0)}}}if(f(null),null!==i&&i===a&&null!=s&&s.length){const a=t.slice(0,i);if(a.startsWith("/")){const t=a.slice(1).toLowerCase(),n=s.filter((e=>e.label.toLowerCase().includes(t))).slice(0,10);if(n.length>0){const t=(0,gt.U)(e.currentTarget,i),a=e.currentTarget.getBoundingClientRect();return C({style:{left:t.left+10+a.left,top:t.top+22+a.top,position:"absolute",zIndex:1},range:{start:0,end:i},actions:n.map((e=>({key:e.value,text:e.label,data:e,ancestors:[],items:Ni(e,[]),payload:e.payload})))}),void S([0])}}}C(null)}),[r,s,x]);(0,p.useEffect)((()=>{x&&!A.includes(x)&&(k(""),d(null))}),[x,d,A]),(0,p.useEffect)((()=>{R&&!A.includes(R)&&(I(""),u(null))}),[R,u,A]);const j=(0,p.useCallback)((()=>{G(v.current)}),[G]);(0,p.useEffect)((()=>{n&&Promise.resolve().then((()=>{var e;null===(e=g.current)||void 0===e||e.focus()}))}),[]);const K=(0,p.useMemo)((()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.element;if(!x||!t)return"";const i=A.indexOf(x);return i<0?"":A.slice(0,i)}),[x,A]),$=(0,p.useMemo)((()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.element;return x&&t?(0,At.I)(t,K,x.slice(0,-1)).map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4}))):null}),[x,K]);(0,p.useEffect)((()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.element;if(!R||!t)return void M(null);const i=(0,At.I)(t,"",R.slice(0,-1));M(i.map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4}))))}),[R]);const q=(0,p.useMemo)((()=>{const e=wt();return e&&kt(null),e}),[]);(0,p.useEffect)((()=>{q&&u(q.payload)}),[q,u]),(0,p.useEffect)((()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.element;if(q&&t){const e=`/${q.command} `,i=(0,At.I)(t,"",e.slice(0,-1));M(i.map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4})))),v.current=e,W.current={start:e.length,end:e.length},b(e),I(e)}}),[q]);const Y=(0,p.useCallback)((e=>{var t;const i=`@${e.text} `,a=`${v.current.slice(0,E.range.start)}${i}`,n=`${a}${v.current.slice(E.range.end)}`;v.current=n,W.current={start:a.length,end:a.length},b(n),k(i),f(null),d(e.data),null===(t=g.current)||void 0===t||t.focus()}),[E,d]),X=(0,p.useCallback)((e=>{var t;const i=`/${[...e.ancestors.map((e=>e.label)),e.text].join(": ")} `,a=`${v.current.slice(0,N.range.start)}${i}`,n=`${a}${v.current.slice(N.range.end)}`;v.current=n,W.current={start:a.length,end:a.length},b(n),I(i),C(null),u(e.payload),null===(t=g.current)||void 0===t||t.focus()}),[N,u]),J=(0,p.useCallback)((e=>{switch(e.key){case"Escape":if(!E&&!N)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),f(null),C(null),!1;case"ArrowUp":case"ArrowDown":if(!E&&!N)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),E?y((t=>{const i=t+("ArrowUp"===e.key?-1:1),a=E.actions.length;return(a+i)%a})):S((t=>{let i=0,{actions:a}=N;const n=[];for(;i<t.length-1;){const e=a[t[i]];if(!Ci(e))break;a=e.items,n.push(t[i]),i+=1}const r=t[i]+("ArrowUp"===e.key?-1:1),s=a.length,o=(s+r)%s;return n.push(o),n})),!1;case"Enter":case"ArrowLeft":case"ArrowRight":if(E){if("Enter"===e.key)return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),Y(E.actions[w]),!1}else if(N){if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),"ArrowLeft"===e.key)return T.length>1&&S((e=>e.slice(0,-1))),!1;let t,i=0,{actions:a}=N;for(;i<T.length&&(t=a[T[i]],Ci(t));)a=t.items,i+=1;return t&&(Ci(t)?S((e=>[...e,0])):"Enter"===e.key&&X(t)),!1}break;case"Delete":case"Backspace":{const t=[{textLength:null==x?void 0:x.length,prefixLength:K.length},{textLength:null==R?void 0:R.length,prefixLength:0}];for(const{textLength:i,prefixLength:a}of t)if(i){let{selectionStart:t,selectionEnd:n}=e.currentTarget;t===n&&("Backspace"===e.key?t-=1:n+=1);const r=a,s=r+i;if(t<s&&n>r){const i=Math.min(t,r),a=Math.max(n,s),o=`${v.current.slice(0,i)}${v.current.slice(a)}`;return v.current=o,W.current={start:i,end:i},b(o),e.preventDefault(),e.stopPropagation(),!1}}break}}}),[w,T,N,null==R?void 0:R.length,Y,X,E,K.length,null==x?void 0:x.length]),Q=(0,p.useMemo)((()=>{if(!N)return[];let e=N.actions;const t=[];for(let i=0;i<T.length;i+=1){const a=e[T[i]];if(!a)break;if(!Ci(a)){t.push(a.key);break}t.push(a.key),e=a.items}return t}),[T,N]),Z=(0,p.useRef)(null);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:m},h().createElement(bt.e,{containerRef:m,ref:g,value:A,minRows:58/22,paddingSize:O?144:60,autoResize:!0,disabled:i,placeholder:null!=a?a:(0,vt.t)(vt.K.ASK_ANY_THING),submitWhen:"enter-without-shift",desiredSelectionRef:W,onSubmit:F,onChange:V,onKeyDown:J,style:{paddingTop:O?94:10}}),O&&h().createElement(St.Y,{files:D,onRemove:(e,t)=>{L((t=>null==t?void 0:t.filter((t=>t.uid!==e)))),null==t||t.abort()},onAdd:()=>{var e;null===(e=Z.current)||void 0===e||e.requestUpload()}}),h().createElement("div",{className:"actions-bar"},h().createElement("div",null,h().createElement("slot",{name:"actions"})),h().createElement("div",{className:"buttons"},null!=o&&o.enabled?h().createElement(h().Fragment,null,h().createElement(Tt.s,{ref:Z,accept:null==o?void 0:o.accept,onChange:e=>L((t=>[...null!=t?t:[],...null!=e?e:[]]))}),h().createElement("div",{className:"btn-divider"})):null,h().createElement("button",{className:"btn-send",disabled:!A||!P,onClick:j},h().createElement(Nt.Bj,{lib:"fa",prefix:"fas",icon:"arrow-up"})))),null==$?void 0:$.map(((e,t)=>h().createElement("div",{key:t,className:"mention-overlay",style:e}))),null==_?void 0:_.map(((e,t)=>h().createElement("div",{key:t,className:"mention-overlay",style:e}))),E&&(0,ht.createPortal)(h().createElement(Nt.Tl,{actions:E.actions,style:E.style,activeKeys:[E.actions[w].key],onActionClick:e=>Y(e.detail)}),document.body),N&&(0,ht.createPortal)(h().createElement(Nt.Tl,{actions:N.actions,style:N.style,activeKeys:Q,onActionClick:e=>X(e.detail)}),document.body)))}function Ni(e,t){var i;return null===(i=e.options)||void 0===i?void 0:i.map((i=>{const a=[...t,e];return{key:i.value,text:i.label,data:i,ancestors:a,items:Ni(i,a),payload:i.payload}}))}function Ci(e){var t;return!(null===(t=e.items)||void 0===t||!t.length)}yt=Ti,({e:[Mt,Rt,It,Wt,Dt,Lt,Ot,Pt,zt,Bt,Ut,Ht,Gt,Ft,Vt,jt,Kt,$t,qt,Yt,Xt,Jt,Qt,Zt,ei,ti,ii,ai,Ct],c:[ci,_t]}=(0,d.A)(yt,[ni("ai-portal.chat-box",{styleTexts:[Et.A],shadowOptions:{delegatesFocus:!0}})],[[ri({type:Boolean}),1,"disabled"],[ri(),1,"placeholder"],[ri({type:Boolean}),1,"autoFocus"],[ri({attribute:!1}),1,"aiEmployees"],[ri({attribute:!1}),1,"commands"],[ri({attribute:!1}),1,"uploadFiles"],[si({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(Ai,e),(e,t)=>(0,l.A)(Ai,e,t)],[si({type:"chat.submit"}),1,"chatSubmit",e=>(0,c.A)(Ei,e),(e,t)=>(0,l.A)(Ei,e,t)],[si({type:"ai-employee.mention"}),1,"employeeMention",e=>(0,c.A)(xi,e),(e,t)=>(0,l.A)(xi,e,t)],[si({type:"command.select"}),1,"commandSelect",e=>(0,c.A)(wi,e),(e,t)=>(0,l.A)(wi,e,t)],[oi(),2,"setValue"],[oi(),2,"getValue"],[oi(),2,"focusOnInput"]],0,(e=>yi.has((0,s.A)(e))),m.ReactNextElement)),_t();var _i,Mi=i(82165);let Ri,Ii,Wi;const{defineElement:Di,property:Li}=(0,u.createDecorators)();let Oi;var Pi=new WeakMap;class zi extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Pi,Ii(this)),Wi(this)}get sticky(){return(0,c.A)(Pi,this)}set sticky(e){(0,l.A)(Pi,this,e)}render(){return h().createElement(Bi,null)}}function Bi(){return h().createElement("slot",null)}_i=zi,({e:[Ii,Wi],c:[Oi,Ri]}=(0,d.A)(_i,[Di("ai-portal.home-container",{styleTexts:[Mi.A]})],[[Li({type:Boolean,render:!1}),1,"sticky"]],0,void 0,m.ReactNextElement)),Ri();var Ui,Hi=i(89575),Gi=i(24);let Fi,Vi,ji,Ki,$i,qi,Yi,Xi,Ji,Qi,Zi,ea,ta,ia,aa,na,ra,sa,oa,la,ca;const da=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:pa,property:ha}=(0,u.createDecorators)();let ua;var ma=new WeakMap,ga=new WeakMap,Aa=new WeakMap,ba=new WeakMap,va=new WeakMap,Ea=new WeakMap,fa=new WeakMap,xa=new WeakMap,ka=new WeakMap,wa=new WeakMap;class ya extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ma,Vi(this)),(0,r.A)(this,ga,(ji(this),Ki(this))),(0,r.A)(this,Aa,($i(this),qi(this))),(0,r.A)(this,ba,(Yi(this),Xi(this))),(0,r.A)(this,va,(Ji(this),Qi(this))),(0,r.A)(this,Ea,(Zi(this),ea(this))),(0,r.A)(this,fa,(ta(this),ia(this))),(0,r.A)(this,xa,(aa(this),na(this))),(0,r.A)(this,ka,(ra(this),sa(this))),(0,r.A)(this,wa,(oa(this),la(this))),ca(this)}get label(){return(0,c.A)(ma,this)}set label(e){(0,l.A)(ma,this,e)}get value(){return(0,c.A)(ga,this)}set value(e){(0,l.A)(ga,this,e)}get size(){return(0,c.A)(Aa,this)}set size(e){(0,l.A)(Aa,this,e)}get lineColor(){return(0,c.A)(ba,this)}set lineColor(e){(0,l.A)(ba,this,e)}get showArea(){return(0,c.A)(va,this)}set showArea(e){(0,l.A)(va,this,e)}get min(){return(0,c.A)(Ea,this)}set min(e){(0,l.A)(Ea,this,e)}get max(){return(0,c.A)(fa,this)}set max(e){(0,l.A)(fa,this,e)}get xField(){return(0,c.A)(xa,this)}set xField(e){(0,l.A)(xa,this,e)}get yField(){return(0,c.A)(ka,this)}set yField(e){(0,l.A)(ka,this,e)}get data(){return(0,c.A)(wa,this)}set data(e){(0,l.A)(wa,this,e)}render(){return h().createElement(Ta,{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 Ta(e){let{label:t,value:i,size:a,...n}=e;return"small"===a?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(da,(0,Hi.A)({},n,{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(da,(0,Hi.A)({},n,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}Ui=ya,({e:[Vi,ji,Ki,$i,qi,Yi,Xi,Ji,Qi,Zi,ea,ta,ia,aa,na,ra,sa,oa,la,ca],c:[ua,Fi]}=(0,d.A)(Ui,[pa("ai-portal.stat-with-mini-chart",{styleTexts:[Gi.A]})],[[ha(),1,"label"],[ha(),1,"value"],[ha(),1,"size"],[ha(),1,"lineColor"],[ha({type:Boolean}),1,"showArea"],[ha({type:Number}),1,"min"],[ha({type:Number}),1,"max"],[ha(),1,"xField"],[ha(),1,"yField"],[ha({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),Fi();var Sa,Na=i(53373),Ca=i.n(Na),_a=i(5813),Ma=i(61408),Ra=i(70579),Ia=i(75197),Wa=i(94504);let Da,La,Oa,Pa,za,Ba,Ua,Ha,Ga,Fa,Va,ja,Ka,$a,qa,Ya,Xa,Ja,Qa,Za,en,tn,an,nn,rn,sn,on,ln,cn,dn,pn,hn,un,mn,gn,An,bn,vn,En,fn,xn,kn;(0,g.initializeI18n)(_a.NS,_a.I);const wn={lib:"easyops",icon:"sidebar"},yn=(0,m.wrapBrick)("ai-portal.elevo-logo"),{defineElement:Tn,property:Sn,event:Nn,method:Cn}=(0,u.createDecorators)(),_n=(0,p.forwardRef)(er);let Mn;var Rn=new WeakMap,In=new WeakMap,Wn=new WeakMap,Dn=new WeakMap,Ln=new WeakMap,On=new WeakMap,Pn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Un=new WeakMap,Hn=new WeakMap,Gn=new WeakMap,Fn=new WeakMap,Vn=new WeakSet,jn=new WeakMap,Kn=new WeakMap,$n=new WeakMap,qn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap;class Zn extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Vn),(0,r.A)(this,Rn,(Da(this),Oa(this))),(0,r.A)(this,In,(Pa(this),za(this))),(0,r.A)(this,Wn,(Ba(this),Ua(this))),(0,r.A)(this,Dn,(Ha(this),Ga(this))),(0,r.A)(this,Ln,(Fa(this),Va(this))),(0,r.A)(this,On,(ja(this),Ka(this))),(0,r.A)(this,Pn,($a(this),qa(this))),(0,r.A)(this,zn,(Ya(this),Xa(this))),(0,r.A)(this,Bn,(Ja(this),Qa(this))),(0,r.A)(this,Un,(Za(this),en(this))),(0,r.A)(this,Hn,(tn(this),an(this,!0))),(0,r.A)(this,Gn,(nn(this),rn(this))),(0,r.A)(this,Fn,(sn(this),on(this))),(0,r.A)(this,jn,(dn(this),()=>{(0,o.A)(Vn,this,ln).emit()})),(0,r.A)(this,Kn,pn(this)),(0,r.A)(this,$n,(mn(this),e=>{(0,o.A)(Vn,this,hn).emit(e)})),(0,r.A)(this,qn,gn(this)),(0,r.A)(this,Yn,(vn(this),e=>{(0,o.A)(Vn,this,An).emit(e)})),(0,r.A)(this,Xn,En(this)),(0,r.A)(this,Jn,(kn(this),()=>{(0,o.A)(Vn,this,fn).emit()})),(0,r.A)(this,Qn,(0,p.createRef)())}get userInstanceId(){return(0,c.A)(Rn,this)}set userInstanceId(e){(0,l.A)(Rn,this,e)}get behavior(){return(0,c.A)(In,this)}set behavior(e){(0,l.A)(In,this,e)}get logoUrl(){return(0,c.A)(Wn,this)}set logoUrl(e){(0,l.A)(Wn,this,e)}get newChatUrl(){return(0,c.A)(Dn,this)}set newChatUrl(e){(0,l.A)(Dn,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(Ln,this)}set newChatLinkWhenCollapsed(e){(0,l.A)(Ln,this,e)}get historyUrlTemplate(){return(0,c.A)(On,this)}set historyUrlTemplate(e){(0,l.A)(On,this,e)}get historyActions(){return(0,c.A)(Pn,this)}set historyActions(e){(0,l.A)(Pn,this,e)}get projectUrlTemplate(){return(0,c.A)(zn,this)}set projectUrlTemplate(e){(0,l.A)(zn,this,e)}get projectActions(){return(0,c.A)(Bn,this)}set projectActions(e){(0,l.A)(Bn,this,e)}get links(){return(0,c.A)(Un,this)}set links(e){(0,l.A)(Un,this,e)}get canAddProject(){return(0,c.A)(Hn,this)}set canAddProject(e){(0,l.A)(Hn,this,e)}get myLinks(){return(0,c.A)(Gn,this)}set myLinks(e){(0,l.A)(Gn,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Qn,this).current)||void 0===e||e.pull()}),e)}open(){var e;null===(e=(0,c.A)(Qn,this).current)||void 0===e||e.open()}close(){var e;null===(e=(0,c.A)(Qn,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Qn,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)(Qn,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)(Qn,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return h().createElement(_n,{ref:(0,c.A)(Qn,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,canAddProject:this.canAddProject,myLinks:this.myLinks,onLogout:(0,c.A)(jn,this),onActionClick:(0,c.A)($n,this),onProjectActionClick:(0,c.A)(Yn,this),onAddProject:(0,c.A)(Jn,this)})}}function er(e,t){let{userInstanceId:i,behavior:a,logoUrl:n,newChatUrl:r,newChatLinkWhenCollapsed:s,historyUrlTemplate:o,historyActions:l,projectUrlTemplate:c,projectActions:d,links:u,canAddProject:m,myLinks:A,onLogout:b,onActionClick:v,onProjectActionClick:E,onAddProject:f}=e;const[x,k]=(0,p.useState)("drawer"===a),w=(0,p.useCallback)((()=>{k(!0)}),[]),y=(0,p.useCallback)((()=>{k(!1)}),[]);(0,p.useEffect)((()=>{"drawer"===a&&k(!0)}),[a]);const T=(0,p.useCallback)((()=>{k(!0)}),[]),S=(0,p.useCallback)((()=>{"drawer"===a&&k(!0)}),[a]),N=(0,p.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:(0,_a.t)(_a.K.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:(0,_a.t)(_a.K.SWITCH_LANGUAGE)}]),[]),C=(0,p.useRef)(null);return(0,p.useImperativeHandle)(t,(()=>({close:()=>{k(!0)},pull:()=>{var e;null===(e=C.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=C.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=C.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=C.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)},open:()=>{k(!1)}})),[]),h().createElement("div",{className:Ca()("container",{collapsed:x})},"drawer"===a&&!x&&h().createElement("div",{className:"mask",onClick:T}),h().createElement("div",{className:"alternative"},h().createElement(Ra.Py,{icon:wn,variant:"light",onClick:y}),s&&h().createElement(Ra.EM,{className:"new-chat",url:r},h().createElement(Ra.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,_a.t)(_a.K.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(Ra.EM,{url:n,className:"logo-link"},h().createElement(yn,null)),h().createElement(Ra.Py,{icon:wn,variant:"light",onClick:w})),h().createElement(Ra.EM,{className:"new-chat",url:r},h().createElement(Ra.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,_a.t)(_a.K.NEW_CHAT)),null!=u&&u.length?h().createElement("div",{className:"links"},u.map(((e,t)=>h().createElement(Wa.k,{key:t,url:e.url,activeIncludes:e.activeIncludes,render:i=>{let{active:a}=i;return h().createElement(Ra.EM,{key:t,className:Ca()("link",{active:a}),url:e.url},h().createElement(Ra.Bj,(0,Hi.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))}})))):null,h().createElement(Ia.D,{ref:C,canAddProject:m,historyUrlTemplate:o,historyActions:l,projectUrlTemplate:c,projectActions:d,myLinks:A,onActionClick:v,onHistoryClick:S,onProjectActionClick:E,onAddProject:f}),h().createElement("div",{className:"footer"},h().createElement(Ra.qb,{className:"dropdown",actions:N,onActionClick:async e=>{"logout"===e.detail.key?b():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,mt.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(Ra.JQ,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}Sa=Zn,({e:[Oa,Pa,za,Ba,Ua,Ha,Ga,Fa,Va,ja,Ka,$a,qa,Ya,Xa,Ja,Qa,Za,en,tn,an,nn,rn,sn,on,ln,cn,dn,pn,hn,un,mn,gn,An,bn,vn,En,fn,xn,kn,Da],c:[Mn,La]}=(0,d.A)(Sa,[Tn("ai-portal.elevo-sidebar",{styleTexts:[Ma.A]})],[[Sn(),1,"userInstanceId"],[Sn(),1,"behavior"],[Sn(),1,"logoUrl"],[Sn(),1,"newChatUrl"],[Sn({type:Boolean}),1,"newChatLinkWhenCollapsed"],[Sn(),1,"historyUrlTemplate"],[Sn({attribute:!1}),1,"historyActions"],[Sn(),1,"projectUrlTemplate"],[Sn({attribute:!1}),1,"projectActions"],[Sn({attribute:!1}),1,"links"],[Sn({type:Boolean}),1,"canAddProject"],[Sn({attribute:!1}),1,"myLinks"],[Nn({type:"logout"}),1,"logout",e=>(0,c.A)(Fn,e),(e,t)=>(0,l.A)(Fn,e,t)],[Nn({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Kn,e),(e,t)=>(0,l.A)(Kn,e,t)],[Nn({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)(qn,e),(e,t)=>(0,l.A)(qn,e,t)],[Nn({type:"add.project"}),1,"addProject",e=>(0,c.A)(Xn,e),(e,t)=>(0,l.A)(Xn,e,t)],[Cn(),2,"pullHistory"],[Cn(),2,"open"],[Cn(),2,"close"],[Cn(),2,"removeProject"],[Cn(),2,"addProject"],[Cn(),2,"moveConversation"]],0,(e=>Qn.has((0,s.A)(e))),m.ReactNextElement)),La();var tr,ir=i(47338);let ar,nr,rr,sr,or,lr,cr,dr,pr,hr,ur;const mr=(0,m.wrapBrick)("eo-icon"),gr=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Ar,property:br}=(0,u.createDecorators)();let vr;var Er=new WeakMap,fr=new WeakMap,xr=new WeakMap,kr=new WeakMap,wr=new WeakMap;class yr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Er,nr(this)),(0,r.A)(this,fr,(rr(this),sr(this))),(0,r.A)(this,xr,(or(this),lr(this))),(0,r.A)(this,kr,(cr(this),dr(this))),(0,r.A)(this,wr,(pr(this),hr(this))),ur(this)}get icon(){return(0,c.A)(Er,this)}set icon(e){(0,l.A)(Er,this,e)}get tooltip(){return(0,c.A)(fr,this)}set tooltip(e){(0,l.A)(fr,this,e)}get tooltipHoist(){return(0,c.A)(xr,this)}set tooltipHoist(e){(0,l.A)(xr,this,e)}get disabled(){return(0,c.A)(kr,this)}set disabled(e){(0,l.A)(kr,this,e)}get variant(){return(0,c.A)(wr,this)}set variant(e){(0,l.A)(wr,this,e)}render(){return h().createElement(Tr,{icon:this.icon,tooltip:this.tooltip,tooltipHoist:this.tooltipHoist,disabled:this.disabled})}}function Tr(e){let{icon:t,tooltip:i,tooltipHoist:a,disabled:n}=e;const r=h().createElement("button",{disabled:n},h().createElement(mr,t));return i?h().createElement(gr,{content:i,hoist:a},r):r}tr=yr,({e:[nr,rr,sr,or,lr,cr,dr,pr,hr,ur],c:[vr,ar]}=(0,d.A)(tr,[Ar("ai-portal.icon-button",{styleTexts:[ir.A]})],[[br({attribute:!1}),1,"icon"],[br(),1,"tooltip"],[br({type:Boolean}),1,"tooltipHoist"],[br({type:Boolean}),1,"disabled"],[br({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),ar();let Sr=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const Nr="bricks/ai-portal/show-cases",Cr={en:{[Sr.ALL]:"All",[Sr.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[Sr.ALL]:"全部",[Sr.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},_r=g.i18n.getFixedT(null,Nr);var Mr,Rr=i(42873);let Ir,Wr,Dr,Lr,Or;(0,g.initializeI18n)(Nr,Cr);const Pr=(0,m.wrapBrick)("ai-portal.show-case"),zr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Br,property:Ur}=(0,u.createDecorators)();let Hr;var Gr=new WeakMap,Fr=new WeakMap;class Vr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Gr,Wr(this)),(0,r.A)(this,Fr,(Dr(this),Lr(this))),Or(this)}get list(){return(0,c.A)(Gr,this)}set list(e){(0,l.A)(Gr,this,e)}get limit(){return(0,c.A)(Fr,this)}set limit(e){(0,l.A)(Fr,this,e)}render(){return h().createElement(jr,{list:this.list,limit:this.limit})}}function jr(e){let{list:t,limit:i}=e;const a=(0,p.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[n,r]=(0,p.useState)(""),s=(0,p.useMemo)((()=>{if(!t)return;let e=t;return n&&(e=e.filter((e=>e.scenario===n))),i&&(e=e.slice(0,i)),e}),[n,t,i]),o=(0,p.useMemo)((()=>a.map((e=>({id:e,label:""===e?_r(Sr.ALL):e})))),[a]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("div",{className:"tips"},`${_r(Sr.EXPLORE_EXCELLENT_CASES)} ↓`),h().createElement(zr,{tabs:o,activeTab:n,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(Pr,{caseTitle:e.title,summary:e.summary,url:e.url})))))):null}Mr=Vr,({e:[Wr,Dr,Lr,Or],c:[Hr,Ir]}=(0,d.A)(Mr,[Br("ai-portal.show-cases",{styleTexts:[Rr.A]})],[[Ur({attribute:!1}),1,"list"],[Ur({type:Number}),1,"limit"]],0,void 0,m.ReactNextElement)),Ir();let Kr=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 $r="bricks/ai-portal/mcp-tools",qr={en:{[Kr.MCP_HUB]:"MCP Hub",[Kr.ALL]:"All",[Kr.SERVER_cmdb]:"CMDB",[Kr.SERVER_cmdb_product_helper]:"CMDB",[Kr.SERVER_alert]:"Alert",[Kr.SERVER_web_builder]:"View",[Kr.SERVER_web_builder2]:"View",[Kr.SERVER_host_troubleshooting]:"Host Troubleshooting",[Kr.SERVER_system_inspection]:"System Inspection",[Kr.SERVER_grafana]:"Grafana",[Kr.SERVER_kubernetes]:"Kubernetes",[Kr.SERVER_llm]:"LLM"},zh:{[Kr.MCP_HUB]:"MCP 中心",[Kr.ALL]:"全部",[Kr.SERVER_cmdb]:"CMDB",[Kr.SERVER_cmdb_product_helper]:"CMDB",[Kr.SERVER_alert]:"告警",[Kr.SERVER_web_builder]:"视图",[Kr.SERVER_web_builder2]:"视图",[Kr.SERVER_host_troubleshooting]:"主机故障排查",[Kr.SERVER_system_inspection]:"系统巡检",[Kr.SERVER_grafana]:"Grafana",[Kr.SERVER_kubernetes]:"Kubernetes",[Kr.SERVER_llm]:"大模型"}},Yr=g.i18n.getFixedT(null,$r);var Xr,Jr=i(31748);let Qr,Zr,es,ts,is;(0,g.initializeI18n)($r,qr);const as={lib:"antd",icon:"tool"},ns=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"]}]]),rs=(0,m.wrapBrick)("eo-icon"),ss=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),os=(0,m.wrapBrick)("ai-portal.sticky-container"),{defineElement:ls,property:cs}=(0,u.createDecorators)();let ds;var ps=new WeakMap,hs=new WeakMap;class us extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ps,Zr(this)),(0,r.A)(this,hs,(es(this),ts(this))),is(this)}get list(){return(0,c.A)(ps,this)}set list(e){(0,l.A)(ps,this,e)}get stickyTop(){return(0,c.A)(hs,this)}set stickyTop(e){(0,l.A)(hs,this,e)}render(){return h().createElement(ms,{list:this.list,stickyTop:this.stickyTop})}}function ms(e){let{list:t,stickyTop:i}=e;const[a,n]=(0,p.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const a=Yr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let n=e.get(a);n||e.set(a,n=[]),n.push(t);const r=[...ns.entries()].find((e=>{let[i,{servers:a}]=e;return a.includes(t.server.id)})),s=r?r[0]:"其他";let o=i.get(s);o||i.set(s,o=[]),o.push(a)}));const a=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[n]=t;const r=a.indexOf(i),s=a.indexOf(n);return(r<0?a.length:r)-(s<0?a.length:s)}))),i]}),[t]),r=(0,p.useMemo)((()=>{const e=[...ns.keys()],t=[...n.keys()];return t.sort(((t,i)=>{const a=e.indexOf(t),n=e.indexOf(i);return(a<0?e.length:a)-(n<0?e.length:n)})),["",...t]}),[n]),[s,o]=(0,p.useState)(""),l=(0,p.useMemo)((()=>{const e=[...a];if(!s)return e;const t=n.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,a,n]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:""===e?Yr(Kr.ALL):e})))),[r]),d=h().createElement(ss,{tabs:c,activeTab:s,onTabClick:e=>o(e.detail.id)});return h().createElement(h().Fragment,null,null==i?h().createElement("div",{className:"non-sticky-tabs"},d):h().createElement(os,{className:"sticky-tabs",style:{top:i}},d),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(rs,(0,Hi.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:as,{fallback:as})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))))}Xr=us,({e:[Zr,es,ts,is],c:[ds,Qr]}=(0,d.A)(Xr,[ls("ai-portal.mcp-tools",{styleTexts:[Jr.A]})],[[cs({attribute:!1}),1,"list"],[cs({type:Number}),1,"stickyTop"]],0,void 0,m.ReactNextElement)),Qr();var gs,As=i(48952),bs=i(9270);let vs,Es,fs,xs,ks,ws,ys,Ts,Ss,Ns,Cs,_s,Ms,Rs,Is,Ws,Ds,Ls,Os,Ps,zs,Bs,Us,Hs,Gs,Fs,Vs,js,Ks,$s,qs,Ys,Xs,Js,Qs,Zs,eo,to,io,ao,no,ro,so,oo,lo,co,po,ho,uo,mo,go,Ao,bo,vo,Eo,fo;(0,g.initializeI18n)(As.NS,As.I);const{defineElement:xo,property:ko,event:wo,method:yo}=(0,u.createDecorators)(),To=(0,p.forwardRef)(bs.C);let So;var No=new WeakMap,Co=new WeakMap,_o=new WeakMap,Mo=new WeakMap,Ro=new WeakMap,Io=new WeakMap,Wo=new WeakMap,Do=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Po=new WeakMap,zo=new WeakMap,Bo=new WeakMap,Uo=new WeakMap,Ho=new WeakMap,Go=new WeakMap,Fo=new WeakSet,Vo=new WeakMap,jo=new WeakMap,Ko=new WeakMap,$o=new WeakMap,qo=new WeakMap,Yo=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,el=new WeakMap,tl=new WeakMap;class il extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Fo),(0,r.A)(this,No,(vs(this),fs(this))),(0,r.A)(this,Co,(xs(this),ks(this))),(0,r.A)(this,_o,(ws(this),ys(this))),(0,r.A)(this,Mo,(Ts(this),Ss(this))),(0,r.A)(this,Ro,(Ns(this),Cs(this))),(0,r.A)(this,Io,(_s(this),Ms(this))),(0,r.A)(this,Wo,(Rs(this),Is(this))),(0,r.A)(this,Do,(Ws(this),Ds(this))),(0,r.A)(this,Lo,(Ls(this),Os(this))),(0,r.A)(this,Oo,(Ps(this),zs(this))),(0,r.A)(this,Po,(Bs(this),Us(this))),(0,r.A)(this,zo,(Hs(this),Gs(this))),(0,r.A)(this,Bo,(Fs(this),Vs(this))),(0,r.A)(this,Uo,(js(this),Ks(this))),(0,r.A)(this,Ho,($s(this),qs(this))),(0,r.A)(this,Go,(Ys(this),Xs(this))),(0,r.A)(this,Vo,(Zs(this),()=>{(0,o.A)(Fo,this,Js).emit()})),(0,r.A)(this,jo,eo(this)),(0,r.A)(this,Ko,(ao(this),()=>{(0,o.A)(Fo,this,to).emit()})),(0,r.A)(this,$o,no(this)),(0,r.A)(this,qo,(oo(this),e=>{(0,o.A)(Fo,this,ro).emit(e)})),(0,r.A)(this,Yo,lo(this)),(0,r.A)(this,Xo,(ho(this),e=>{(0,o.A)(Fo,this,co).emit(e)})),(0,r.A)(this,Jo,uo(this)),(0,r.A)(this,Qo,(Ao(this),()=>{(0,o.A)(Fo,this,mo).emit("canvas")})),(0,r.A)(this,Zo,bo(this)),(0,r.A)(this,el,(fo(this),e=>{(0,o.A)(Fo,this,vo).emit(e)})),(0,r.A)(this,tl,(0,p.createRef)())}get conversationId(){return(0,c.A)(No,this)}set conversationId(e){(0,l.A)(No,this,e)}get initialRequest(){return(0,c.A)(Co,this)}set initialRequest(e){(0,l.A)(Co,this,e)}get replay(){return(0,c.A)(_o,this)}set replay(e){(0,l.A)(_o,this,e)}get replayDelay(){return(0,c.A)(Mo,this)}set replayDelay(e){(0,l.A)(Mo,this,e)}get supports(){return(0,c.A)(Ro,this)}set supports(e){(0,l.A)(Ro,this,e)}get showHumanActions(){return(0,c.A)(Io,this)}set showHumanActions(e){(0,l.A)(Io,this,e)}get showFeedback(){return(0,c.A)(Wo,this)}set showFeedback(e){(0,l.A)(Wo,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Do,this)}set showFeedbackAfterFailed(e){(0,l.A)(Do,this,e)}get showFeedbackOnView(){return(0,c.A)(Lo,this)}set showFeedbackOnView(e){(0,l.A)(Lo,this,e)}get showUiSwitch(){return(0,c.A)(Oo,this)}set showUiSwitch(e){(0,l.A)(Oo,this,e)}get hideMermaid(){return(0,c.A)(Po,this)}set hideMermaid(e){(0,l.A)(Po,this,e)}get previewUrlTemplate(){return(0,c.A)(zo,this)}set previewUrlTemplate(e){(0,l.A)(zo,this,e)}get showCases(){return(0,c.A)(Bo,this)}set showCases(e){(0,l.A)(Bo,this,e)}get exampleProjects(){return(0,c.A)(Uo,this)}set exampleProjects(e){(0,l.A)(Uo,this,e)}get tryItOutUrl(){return(0,c.A)(Ho,this)}set tryItOutUrl(e){(0,l.A)(Ho,this,e)}resumed(){var e,t;null===(e=(0,c.A)(tl,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(tl,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(tl,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(tl,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(To,{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)(Vo,this),onTerminate:(0,c.A)(Ko,this),onSubmitFeedback:(0,c.A)(qo,this),onSwitchToCanvas:(0,c.A)(Qo,this),onFeedbackOnView:(0,c.A)(Xo,this),onDetailChange:(0,c.A)(el,this)})}}gs=il,({e:[fs,xs,ks,ws,ys,Ts,Ss,Ns,Cs,_s,Ms,Rs,Is,Ws,Ds,Ls,Os,Ps,zs,Bs,Us,Hs,Gs,Fs,Vs,js,Ks,$s,qs,Ys,Xs,Js,Qs,Zs,eo,to,io,ao,no,ro,so,oo,lo,co,po,ho,uo,mo,go,Ao,bo,vo,Eo,fo,vs],c:[So,Es]}=(0,d.A)(gs,[xo("ai-portal.chat-stream",{shadowOptions:!1})],[[ko(),1,"conversationId"],[ko({attribute:!1,render:!1}),1,"initialRequest"],[ko({type:Boolean}),1,"replay"],[ko({type:Number}),1,"replayDelay"],[ko({attribute:!1}),1,"supports"],[ko({type:Boolean}),1,"showHumanActions"],[ko({type:Boolean}),1,"showFeedback"],[ko({type:Boolean}),1,"showFeedbackAfterFailed"],[ko({type:Boolean}),1,"showFeedbackOnView"],[ko({type:Boolean}),1,"showUiSwitch"],[ko({type:Boolean,render:!1}),1,"hideMermaid"],[ko(),1,"previewUrlTemplate"],[ko({attribute:!1}),1,"showCases"],[ko({attribute:!1}),1,"exampleProjects"],[ko(),1,"tryItOutUrl"],[wo({type:"share"}),1,"shareEvent",e=>(0,c.A)(Go,e),(e,t)=>(0,l.A)(Go,e,t)],[wo({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(jo,e),(e,t)=>(0,l.A)(jo,e,t)],[wo({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)($o,e),(e,t)=>(0,l.A)($o,e,t)],[wo({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Yo,e),(e,t)=>(0,l.A)(Yo,e,t)],[wo({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Jo,e),(e,t)=>(0,l.A)(Jo,e,t)],[wo({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(Zo,e),(e,t)=>(0,l.A)(Zo,e,t)],[yo(),2,"resumed"],[yo(),2,"feedbackSubmitDone"],[yo(),2,"feedbackSubmitFailed"],[yo(),2,"feedbackOnViewDone"]],0,(e=>tl.has((0,s.A)(e))),m.ReactNextElement)),Es();let al=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const nl="bricks/ai-portal/ai-employees",rl=g.i18n.getFixedT(null,nl);var sl,ol=i(98036),ll=i(65549);let cl,dl,pl,hl,ul,ml,gl,Al,bl;(0,g.initializeI18n)(nl,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const vl=(0,m.wrapBrick)("eo-link"),El=(0,m.wrapBrick)("eo-icon"),fl=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:xl,property:kl}=(0,u.createDecorators)();let wl;var yl=new WeakMap,Tl=new WeakMap,Sl=new WeakMap,Nl=new WeakMap;class Cl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,yl,dl(this)),(0,r.A)(this,Tl,(pl(this),hl(this))),(0,r.A)(this,Sl,(ul(this),ml(this))),(0,r.A)(this,Nl,(gl(this),Al(this,!0))),bl(this)}get list(){return(0,c.A)(yl,this)}set list(e){(0,l.A)(yl,this,e)}get industries(){return(0,c.A)(Tl,this)}set industries(e){(0,l.A)(Tl,this,e)}get urlTemplate(){return(0,c.A)(Sl,this)}set urlTemplate(e){(0,l.A)(Sl,this,e)}get withContainer(){return(0,c.A)(Nl,this)}set withContainer(e){(0,l.A)(Nl,this,e)}render(){return h().createElement(_l,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function _l(e){let{list:t,industries:i,urlTemplate:a,withContainer:n}=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||rl(al.UNTITLED)})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(fl,{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(vl,(0,Hi.A)({className:Ca()("link",{clickable:!!a})},a?{url:(0,ll.Q)(a,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},e.avatar?h().createElement("img",{src:e.avatar}):h().createElement(El,{lib:"antd",icon:"user"})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description)))))))}))));return n?h().createElement("div",{className:"container"},h().createElement("h1",null,rl(al.AI_EMPLOYEES)),d):d}sl=Cl,({e:[dl,pl,hl,ul,ml,gl,Al,bl],c:[wl,cl]}=(0,d.A)(sl,[xl("ai-portal.ai-employees",{styleTexts:[ol.A]})],[[kl({attribute:!1}),1,"list"],[kl({attribute:!1}),1,"industries"],[kl(),1,"urlTemplate"],[kl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),cl();let Ml=function(e){return e.AGENTS="AGENTS",e}({});const Rl="bricks/ai-portal/ai-agents",Il=g.i18n.getFixedT(null,Rl);var Wl,Dl=i(83059);let Ll,Ol,Pl,zl,Bl,Ul,Hl;const Gl={lib:"antd",icon:"tool"};(0,g.initializeI18n)(Rl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Fl=(0,m.wrapBrick)("eo-icon"),Vl=(0,m.wrapBrick)("eo-link"),{defineElement:jl,property:Kl}=(0,u.createDecorators)();let $l;var ql=new WeakMap,Yl=new WeakMap,Xl=new WeakMap;class Jl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ql,Ol(this)),(0,r.A)(this,Yl,(Pl(this),zl(this))),(0,r.A)(this,Xl,(Bl(this),Ul(this,!0))),Hl(this)}get list(){return(0,c.A)(ql,this)}set list(e){(0,l.A)(ql,this,e)}get urlTemplate(){return(0,c.A)(Yl,this)}set urlTemplate(e){(0,l.A)(Yl,this,e)}get withContainer(){return(0,c.A)(Xl,this)}set withContainer(e){(0,l.A)(Xl,this,e)}render(){return h().createElement(Ql,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Ql(e){let{list:t,urlTemplate:i,withContainer:a}=e;const n=h().createElement(h().Fragment,null,h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var a,n;return h().createElement("li",{key:t},h().createElement(Vl,(0,Hi.A)({className:Ca()("link",{clickable:!!i})},i?{url:(0,ll.Q)(i,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Fl,(0,Hi.A)({},null!==(a=e.icon)&&void 0!==a?a:Gl,{fallback:Gl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(n=e.tags)||void 0===n?void 0:n.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description)))}))));return a?h().createElement("div",{className:"container"},h().createElement("h1",null,Il(Ml.AGENTS)),n):n}Wl=Jl,({e:[Ol,Pl,zl,Bl,Ul,Hl],c:[$l,Ll]}=(0,d.A)(Wl,[jl("ai-portal.ai-agents",{styleTexts:[Dl.A]})],[[Kl({attribute:!1}),1,"list"],[Kl(),1,"urlTemplate"],[Kl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Ll();let Zl=null;customElements.define("ai-portal.save-request-store",(0,ft.createProviderClass)((function(e){Zl=e}))),customElements.define("ai-portal.load-request-store",(0,ft.createProviderClass)((function(){const e=Zl;return Zl=null,e}))),customElements.define("ai-portal.clear-request-store",(0,ft.createProviderClass)((function(){Zl=null})));var ec,tc=i(49041);let ic,ac,nc,rc,sc,oc,lc,cc,dc,pc,hc;const uc=(0,m.wrapBrick)("eo-link"),mc=(0,m.wrapBrick)("ai-portal.sticky-container"),{defineElement:gc,property:Ac}=(0,u.createDecorators)();let bc;var vc=new WeakMap,Ec=new WeakMap,fc=new WeakMap,xc=new WeakMap,kc=new WeakMap;class wc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,vc,ac(this)),(0,r.A)(this,Ec,(nc(this),rc(this))),(0,r.A)(this,fc,(sc(this),oc(this))),(0,r.A)(this,xc,(lc(this),cc(this))),(0,r.A)(this,kc,(dc(this),pc(this))),hc(this)}get pageTitle(){return(0,c.A)(vc,this)}set pageTitle(e){(0,l.A)(vc,this,e)}get breadcrumbs(){return(0,c.A)(Ec,this)}set breadcrumbs(e){(0,l.A)(Ec,this,e)}get size(){return(0,c.A)(fc,this)}set size(e){(0,l.A)(fc,this,e)}get variant(){return(0,c.A)(xc,this)}set variant(e){(0,l.A)(xc,this,e)}get sticky(){return(0,c.A)(kc,this)}set sticky(e){(0,l.A)(kc,this,e)}render(){return h().createElement(yc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs,sticky:this.sticky})}}function yc(e){let{breadcrumbs:t,pageTitle:i,sticky:a}=e;(0,p.useEffect)((()=>{"string"==typeof i&&(0,mt.getRuntime)().applyPageTitle(i)}),[i]);const n=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(uc,{url:e.url},e.text))))):null,i?h().createElement("h1",null,i):null),h().createElement("slot",{name:"toolbar"})):null;return h().createElement("div",{className:"container"},n&&a?h().createElement(mc,{className:"sticky-header"},n):h().createElement("div",{className:"non-sticky-header"},n),h().createElement("slot",null))}ec=wc,({e:[ac,nc,rc,sc,oc,lc,cc,dc,pc,hc],c:[bc,ic]}=(0,d.A)(ec,[gc("ai-portal.page-container",{styleTexts:[tc.A]})],[[Ac(),1,"pageTitle"],[Ac({attribute:!1}),1,"breadcrumbs"],[Ac({render:!1}),1,"size"],[Ac({render:!1}),1,"variant"],[Ac({type:Boolean}),1,"sticky"]],0,void 0,m.ReactNextElement)),ic();var Tc,Sc=i(20124);let Nc,Cc,_c,Mc,Rc,Ic,Wc,Dc,Lc;const{defineElement:Oc,property:Pc,event:zc}=(0,u.createDecorators)();let Bc;var Uc=new WeakMap,Hc=new WeakMap,Gc=new WeakMap,Fc=new WeakSet,Vc=new WeakMap;class jc extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Fc),(0,r.A)(this,Uc,Cc(this)),(0,r.A)(this,Hc,(_c(this),Mc(this))),(0,r.A)(this,Gc,(Rc(this),Ic(this))),(0,r.A)(this,Vc,(Lc(this),e=>{this.activeTab=e.id,(0,o.A)(Fc,this,Wc).emit(e)}))}get tabs(){return(0,c.A)(Uc,this)}set tabs(e){(0,l.A)(Uc,this,e)}get activeTab(){return(0,c.A)(Hc,this)}set activeTab(e){(0,l.A)(Hc,this,e)}render(){return h().createElement(Kc,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Vc,this)})}}function Kc(e){let{tabs:t,activeTab:i,onTabClick:a}=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:Ca()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>a(e)},e.label)))))}Tc=jc,({e:[Cc,_c,Mc,Rc,Ic,Wc,Dc,Lc],c:[Bc,Nc]}=(0,d.A)(Tc,[Oc("ai-portal.tab-list",{styleTexts:[Sc.A]})],[[Pc({attribute:!1}),1,"tabs"],[Pc({attribute:!1}),1,"activeTab"],[zc({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(Gc,e),(e,t)=>(0,l.A)(Gc,e,t)]],0,(e=>Vc.has((0,s.A)(e))),m.ReactNextElement)),Nc();var $c=i(41030);let qc=function(e){return e.PLEASE_SELECT="PLEASE_SELECT",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.SEARCH_NO_DATA="SEARCH_NO_DATA",e}({});const Yc="bricks/ai-portal/dropdown-select",Xc=g.i18n.getFixedT(null,Yc);var Jc,Qc=i(40138);let Zc,ed,td,id,ad,nd,rd,sd,od,ld,cd,dd,pd,hd,ud,md,gd,Ad,bd,vd,Ed;(0,g.initializeI18n)(Yc,{en:{PLEASE_SELECT:"Please Select",SEARCH_PLACEHOLDER:"Search",SEARCH_NO_DATA:"No Data"},zh:{PLEASE_SELECT:"请选择",SEARCH_PLACEHOLDER:"搜索",SEARCH_NO_DATA:"暂无结果"}});const{defineElement:fd,property:xd,event:kd}=(0,u.createDecorators)(),wd=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),yd=(0,m.wrapBrick)("eo-icon"),Td=(0,m.wrapBrick)("eo-loading-container"),Sd=(0,m.wrapBrick)("eo-menu"),Nd=(0,m.wrapBrick)("eo-menu-item"),Cd=(0,m.wrapBrick)("eo-input",{onValueChange:"change"});let _d;var Md=new WeakMap,Rd=new WeakMap,Id=new WeakMap,Wd=new WeakMap,Dd=new WeakMap,Ld=new WeakMap,Od=new WeakMap,Pd=new WeakMap,zd=new WeakMap,Bd=new WeakSet,Ud=new WeakMap;class Hd extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Bd),(0,r.A)(this,Md,ed(this)),(0,r.A)(this,Rd,(td(this),id(this))),(0,r.A)(this,Id,(ad(this),nd(this))),(0,r.A)(this,Wd,(rd(this),sd(this))),(0,r.A)(this,Dd,(od(this),ld(this))),(0,r.A)(this,Ld,(cd(this),dd(this))),(0,r.A)(this,Od,(pd(this),hd(this))),(0,r.A)(this,Pd,(ud(this),md(this))),(0,r.A)(this,zd,(gd(this),Ad(this))),(0,r.A)(this,Ud,(Ed(this),e=>{(0,o.A)(Bd,this,bd).emit(e)}))}get value(){return(0,c.A)(Md,this)}set value(e){(0,l.A)(Md,this,e)}get options(){return(0,c.A)(Rd,this)}set options(e){(0,l.A)(Rd,this,e)}get labelMaxWidth(){return(0,c.A)(Id,this)}set labelMaxWidth(e){(0,l.A)(Id,this,e)}get loading(){return(0,c.A)(Wd,this)}set loading(e){(0,l.A)(Wd,this,e)}get searchPlaceholder(){return(0,c.A)(Dd,this)}set searchPlaceholder(e){(0,l.A)(Dd,this,e)}get dropdownContentStyle(){return(0,c.A)(Ld,this)}set dropdownContentStyle(e){(0,l.A)(Ld,this,e)}get dropdownMaxWidth(){return(0,c.A)(Od,this)}set dropdownMaxWidth(e){(0,l.A)(Od,this,e)}get showSearch(){return(0,c.A)(Pd,this)}set showSearch(e){(0,l.A)(Pd,this,e)}render(){return h().createElement(Gd,{value:this.value,options:this.options,onChange:(0,c.A)(Ud,this),loading:this.loading,labelMaxWidth:this.labelMaxWidth,dropdownMaxWidth:this.dropdownMaxWidth,showSearch:this.showSearch,searchPlaceholder:this.searchPlaceholder,dropdownContentStyle:this.dropdownContentStyle})}}function Gd(e){let{value:t,options:i,labelMaxWidth:a,dropdownMaxWidth:n,showSearch:r,loading:s,searchPlaceholder:o,dropdownContentStyle:l,onChange:c}=e;const[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)(t),[A,b]=(0,p.useState)(""),[v,E]=(0,p.useState)(i);(0,p.useEffect)((()=>{E(i)}),[i]);const f=(0,p.useMemo)((()=>null==v?void 0:v.find((e=>e.value===m))),[v,m]),x=(0,p.useMemo)((()=>A&&v?null==v?void 0:v.filter((e=>e.label.toLowerCase().includes(A.toLowerCase()))):v),[v,A]),k=(0,p.useCallback)((e=>{u(e.detail),e.detail||b("")}),[]),w=(0,p.useMemo)((()=>(0,$c.debounce)((e=>{b(e.detail)}),300)),[]);return h().createElement(wd,{placement:"bottom-start",trigger:"click",active:d,arrow:!1,distance:5,onBeforeVisibleChange:k},h().createElement("span",{slot:"anchor",className:"trigger"},h().createElement("span",{className:"label",style:{maxWidth:a}},f?null==f?void 0:f.label:Xc(qc.PLEASE_SELECT)),h().createElement(yd,{lib:"lucide",icon:d?"chevron-up":"chevron-down"})),h().createElement("div",{className:"dropdown",style:{maxWidth:n}},r&&h().createElement("div",{className:"search-container"},h().createElement(Cd,{className:"search",value:A,placeholder:o||Xc(qc.SEARCH_PLACEHOLDER),onValueChange:w},h().createElement(yd,{slot:"prefix",lib:"antd",icon:"search"}))),h().createElement(Td,{loading:s,delay:500,style:{width:"100%"}},h().createElement("div",{className:"dropdown-inner",style:l},h().createElement("slot",{name:"prefix"}),!(null==x||!x.length)&&h().createElement(Sd,null,null==x?void 0:x.map((e=>h().createElement(Nd,{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!=x&&x.length)&&h().createElement("div",{className:"empty"},Xc(qc.SEARCH_NO_DATA))))))}Jc=Hd,({e:[ed,td,id,ad,nd,rd,sd,od,ld,cd,dd,pd,hd,ud,md,gd,Ad,bd,vd,Ed],c:[_d,Zc]}=(0,d.A)(Jc,[fd("ai-portal.dropdown-select",{styleTexts:[Qc.A]})],[[xd(),1,"value"],[xd({attribute:!1}),1,"options"],[xd({attribute:!1}),1,"labelMaxWidth"],[xd({type:Boolean}),1,"loading"],[xd({attribute:!1}),1,"searchPlaceholder"],[xd({attribute:!1}),1,"dropdownContentStyle"],[xd({attribute:!1}),1,"dropdownMaxWidth"],[xd({type:Boolean}),1,"showSearch"],[kd({type:"change"}),1,"changeEvent",e=>(0,c.A)(zd,e),(e,t)=>(0,l.A)(zd,e,t)]],0,(e=>Ud.has((0,s.A)(e))),m.ReactNextElement)),Zc();var Fd=i(71568);let Vd=function(e){return e.UNTITLED="UNTITLED",e}({});const jd="bricks/ai-portal/preview-container",Kd=g.i18n.getFixedT(null,jd);var $d=i(72591),qd=i.n($d),Yd=i(1740),Xd=i.n(Yd),Jd=i(88128),Qd=i.n(Jd),Zd=i(30855),ep=i.n(Zd),tp=i(93051),ip=i.n(tp),ap=i(73656),np=i.n(ap),rp=i(62522),sp={};sp.styleTagTransform=np(),sp.setAttributes=ep(),sp.insert=Qd().bind(null,"head"),sp.domAPI=Xd(),sp.insertStyleElement=ip(),qd()(rp.A,sp);const op=rp.A&&rp.A.locals?rp.A.locals:void 0;var lp,cp=i(43100),dp=i(23241);let pp,hp,up,mp,gp;(0,g.initializeI18n)(jd,{en:{UNTITLED:"Untitled"},zh:{UNTITLED:"无标题"}});const Ap=(0,m.wrapBrick)("eo-icon"),bp=(0,m.wrapBrick)("eo-page-title"),vp=(0,m.wrapBrick)("eo-main-view"),Ep=(0,m.wrapBrick)("eo-narrow-view"),{defineElement:fp,property:xp}=(0,u.createDecorators)();let kp;var wp=new WeakMap,yp=new WeakMap,Tp=new WeakMap;class Sp extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,wp,hp(this)),(0,r.A)(this,yp,(up(this),mp(this))),(0,r.A)(this,Tp,(gp(this),(0,$c.uniqueId)()))}get source(){return(0,c.A)(wp,this)}set source(e){(0,l.A)(wp,this,e)}get url(){return(0,c.A)(yp,this)}set url(e){(0,l.A)(yp,this,e)}render(){return h().createElement(p.Suspense,{fallback:h().createElement(Ap,{lib:"antd",icon:"loading-3-quarters",spinning:!0,className:op.loading})},h().createElement(Np,{rootId:(0,c.A)(Tp,this),source:this.source,url:this.url}))}}function Np(e){let{rootId:t,source:i,url:a}=e;const n=(0,p.useMemo)((()=>i?async function(e){const t=await(0,cp.f)();return await t.parseView(e)}(i).catch((e=>(console.error("Failed to parse view:",e),null))):Promise.resolve(null)),[i]),r=(0,p.use)(n),s=(0,p.useMemo)((()=>r?(0,Fd.z)(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)((()=>{var e;return null==r||null===(e=r.entry)||void 0===e||null===(e=e.defaultExport)||void 0===e?void 0:e.title}),[r]);return h().createElement(Cp,{rootId:t,pageTitle:l,convertedResult:o,url:a})}function Cp(e){let{rootId:t,pageTitle:i,convertedResult:a,url:n}=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,dp.d)(t),a=(0,mt.unstable_createRoot)(e,{portal:i,supportsUseChildren:!0});return s.current=a,()=>{a.unmount(),i.remove(),s.current=null}}),[t]),(0,p.useEffect)((()=>{var e;if(!a)return;const{brick:t,context:i,functions:r,templates:o}=a;null===(e=s.current)||void 0===e||e.render(t,{context:i,functions:r,templates:o,url:n})}),[a,n]),h().createElement(Ep,{size:"large",className:op.container},h().createElement(vp,null,h().createElement(bp,{slot:"pageTitle",pageTitle:i||Kd(Vd.UNTITLED)}),h().createElement("div",{className:op.main,ref:r,"data-root-id":t})))}lp=Sp,({e:[hp,up,mp,gp],c:[kp,pp]}=(0,d.A)(lp,[fp("ai-portal.preview-container",{shadowOptions:!1})],[[xp({attribute:!1}),1,"source"],[xp(),1,"url"]],0,void 0,m.ReactNextElement)),pp();const _p="bricks/ai-portal/action-buttons";g.i18n.getFixedT(null,_p);var Mp,Rp=i(11816);let Ip,Wp,Dp,Lp,Op,Pp,zp,Bp,Up;(0,g.initializeI18n)(_p,{en:{},zh:{}});const Hp=(0,m.wrapBrick)("eo-icon"),Gp=(0,m.wrapBrick)("eo-button"),{defineElement:Fp,property:Vp,event:jp}=(0,u.createDecorators)();let Kp;var $p=new WeakMap,qp=new WeakMap,Yp=new WeakMap,Xp=new WeakSet,Jp=new WeakMap;class Qp extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Xp),(0,r.A)(this,$p,Wp(this)),(0,r.A)(this,qp,(Dp(this),Lp(this))),(0,r.A)(this,Yp,(Op(this),Pp(this))),(0,r.A)(this,Jp,(Up(this),e=>{this.activeKey=e?e.key:null,(0,o.A)(Xp,this,zp).emit(e)}))}get items(){return(0,c.A)($p,this)}set items(e){(0,l.A)($p,this,e)}get activeKey(){return(0,c.A)(qp,this)}set activeKey(e){(0,l.A)(qp,this,e)}render(){return h().createElement(Zp,{items:this.items,activeKey:this.activeKey,onChange:(0,c.A)(Jp,this)})}}function Zp(e){let{items:t,activeKey:i,onChange:a}=e;const[n,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?a(n&&null!==(e=null==t?void 0:t.find((e=>!e.hidden&&e.key===n)))&&void 0!==e?e:null):s.current=!0}),[n,t,a]);const o=(0,p.useMemo)((()=>null==t?void 0:t.filter((e=>!e.hidden&&!n||e.key===n))),[t,n]);return h().createElement("div",{className:"button-container"},null==o?void 0:o.map((e=>{const{text:t,icon:i,key:a}=e;return h().createElement(Gp,{key:a,className:"action"+(n?" active":""),themeVariant:"elevo",type:"neutral",onClick:()=>{n||r(a)}},i?h().createElement(Hp,(0,Hi.A)({className:"icon"},i)):null,t,n?h().createElement(Hp,{className:"remove",lib:"lucide",icon:"x",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(null)}}):null)})))}Mp=Qp,({e:[Wp,Dp,Lp,Op,Pp,zp,Bp,Up],c:[Kp,Ip]}=(0,d.A)(Mp,[Fp("ai-portal.action-buttons",{styleTexts:[Rp.A]})],[[Vp({attribute:!1}),1,"items"],[Vp(),1,"activeKey"],[jp({type:"change"}),1,"change",e=>(0,c.A)(Yp,e),(e,t)=>(0,l.A)(Yp,e,t)]],0,(e=>Jp.has((0,s.A)(e))),m.ReactNextElement)),Ip();let eh=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 th="bricks/ai-portal/goal-card-list",ih={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:"新对话"}},ah=g.i18n.getFixedT(null,th);var nh=i(46342),rh=i(10335);let sh;(0,g.initializeI18n)(th,ih);const oh=(0,m.wrapBrick)("eo-icon"),lh=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),ch=(0,m.wrapBrick)("eo-easyops-avatar"),dh=(0,m.wrapBrick)("eo-button"),ph={ready:"uncheck-status",working:"active-status",completed:"check-status"},hh=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:ah(eh.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:ah(eh.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:ah(eh.COMPLETED_STATUS)}];function uh(e){let{goalItem:t,idWidth:i,cardStyle:a,onStatusChange:n,onTitleChange:r,onClick:s,onNewChat:o,onAppendChild:l,onRevokeAppendChild:c,isActive:d}=e;const{state:u,id:m,title:g,conversations:A,owner:b,pending:v}=t,E=(0,p.useRef)(!1),f=(0,p.useCallback)((()=>{E.current=!0}),[]),x=(0,p.useCallback)((()=>{E.current=!1}),[]),[k,w]=(0,p.useState)(!1),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((e=>{w(!1);const t=e.currentTarget.textContent;!v||null!=t&&t.trim()?null!==t&&g!==t&&(null==r||r(t)):null==c||c()}),[v,g,c,r]),S=(0,p.useCallback)((e=>{E.current||"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}),[]),N=(0,p.useRef)(null);return(0,p.useEffect)((()=>{var e;v&&(null===(e=N.current)||void 0===e||e.focus())}),[v]),h().createElement("div",{className:Ca()("goal-item",t.state,{editing:k},{active:d}),style:{paddingLeft:24*(t.level+1)+"px",...a},onClick:v?void 0:s},h().createElement("div",{className:"start"},h().createElement(lh,{actions:hh,disabled:v,onActionClick:e=>{var t;t=e.detail,null==n||n(t.key)}},h().createElement(oh,{className:"icon",lib:"easyops",category:"colored-common",icon:ph[u],onClick:e=>e.stopPropagation()})),h().createElement("span",{className:"serial-number",style:{width:i}},"#",v?"":m),h().createElement("span",{className:"title",ref:N,onClick:e=>e.stopPropagation(),onFocus:y,onBlur:T,onKeyDown:S,onCompositionStart:f,onCompositionEnd:x,contentEditable:(C=!0,C?function(){if("boolean"!=typeof sh){const e=document.createElement("div");e.setAttribute("contenteditable","PLAINTEXT-ONLY"),sh="plaintext-only"===e.contentEditable}return sh}()?"plaintext-only":"true":"false"),suppressContentEditableWarning:!0},g)),h().createElement("div",{className:"end"},h().createElement("div",{className:"info"},h().createElement("div",{className:"message"},h().createElement(oh,{lib:"easyops",category:"common",icon:"message"}),h().createElement("span",{className:"count"},A||0)),h().createElement(ch,{nameOrInstanceId:null==b?void 0:b.instanceId,size:"small"})),h().createElement("div",{className:"operation",onClick:e=>e.stopPropagation()},0===t.level&&h().createElement(dh,{className:"append-child",themeVariant:"elevo",type:"neutral",size:"small",onClick:l},h().createElement(oh,{lib:"lucide",icon:"plus"})),!v&&h().createElement(dh,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:o},ah(eh.NEW_CHAT)))));var C}var mh;let gh,Ah,bh,vh,Eh,fh,xh,kh,wh,yh,Th,Sh,Nh,Ch,_h,Mh,Rh,Ih,Wh,Dh,Lh,Oh,Ph,zh;(0,g.initializeI18n)(th,ih);const{defineElement:Bh,property:Uh,event:Hh,method:Gh}=(0,u.createDecorators)(),Fh=(0,m.wrapBrick)("eo-icon"),Vh=(0,p.forwardRef)(su);let jh;var Kh=new WeakMap,$h=new WeakMap,qh=new WeakMap,Yh=new WeakMap,Xh=new WeakSet,Jh=new WeakMap,Qh=new WeakMap,Zh=new WeakMap,eu=new WeakMap,tu=new WeakMap,iu=new WeakMap,au=new WeakMap,nu=new WeakMap;class ru extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Xh),(0,r.A)(this,Kh,(gh(this),bh(this))),(0,r.A)(this,$h,(vh(this),Eh(this))),(0,r.A)(this,qh,(fh(this),xh(this))),(0,r.A)(this,Yh,(kh(this),wh(this))),(0,r.A)(this,Jh,(Sh(this),e=>{(0,o.A)(Xh,this,yh).emit(e)})),(0,r.A)(this,Qh,Nh(this)),(0,r.A)(this,Zh,(Mh(this),e=>{(0,o.A)(Xh,this,Ch).emit(e)})),(0,r.A)(this,eu,Rh(this)),(0,r.A)(this,tu,(Dh(this),e=>{(0,o.A)(Xh,this,Ih).emit(e)})),(0,r.A)(this,iu,Lh(this)),(0,r.A)(this,au,(zh(this),e=>{(0,o.A)(Xh,this,Oh).emit(e)})),(0,r.A)(this,nu,(0,p.createRef)())}get goalList(){return(0,c.A)(Kh,this)}set goalList(e){(0,l.A)(Kh,this,e)}get cardStyle(){return(0,c.A)($h,this)}set cardStyle(e){(0,l.A)($h,this,e)}get activeKey(){return(0,c.A)(qh,this)}set activeKey(e){(0,l.A)(qh,this,e)}appendChildDone(e,t){var i;null===(i=(0,c.A)(nu,this).current)||void 0===i||i.appendChildDone(e,t)}render(){return h().createElement(Vh,{ref:(0,c.A)(nu,this),goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,c.A)(tu,this),onStatusChange:(0,c.A)(Zh,this),onItemClick:(0,c.A)(Jh,this),onNewChat:(0,c.A)(au,this),activeKey:this.activeKey})}}function su(e,t){let{goalList:i,cardStyle:a,onTitleChange:n,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,a)=>{const n={...e,[t]:i};d(null==c?void 0:c.map((e=>e.instanceId===n.instanceId?n:e))),null==a||a(n)};(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(uh,{key:e.instanceId,isActive:l===e.instanceId,goalItem:e,idWidth:m,cardStyle:a,onTitleChange:t=>((e,t)=>{u(t,"title",e,n)})(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,$c.uniqueId)("pending-"),pending:!0,id:0,title:"",state:"ready",level:1,pendingParentId:e.instanceId};d((i=>{var a;const n=null!==(a=null==i?void 0:i.findIndex((t=>t.instanceId===e.instanceId)))&&void 0!==a?a:-1;if(-1===n)return i;const r=i.slice(n+1).findIndex((e=>0===e.level))+1;return 0===r?[...i,t]:[...i.slice(0,n+r),t,...i.slice(n+r)]}))})(e),onRevokeAppendChild:()=>{d((t=>null==t?void 0:t.filter((t=>t.instanceId!==e.instanceId))))}})))):h().createElement("div",{className:"loading"},h().createElement(Fh,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}mh=ru,({e:[bh,vh,Eh,fh,xh,kh,wh,yh,Th,Sh,Nh,Ch,_h,Mh,Rh,Ih,Wh,Dh,Lh,Oh,Ph,zh,gh],c:[jh,Ah]}=(0,d.A)(mh,[Bh("ai-portal.goal-card-list",{styleTexts:[rh.A,nh.A]})],[[Uh({attribute:!1}),1,"goalList"],[Uh({attribute:!1}),1,"cardStyle"],[Uh(),1,"activeKey"],[Hh({type:"item.click"}),1,"itemClickEvent",e=>(0,c.A)(Yh,e),(e,t)=>(0,l.A)(Yh,e,t)],[Hh({type:"item.status.change"}),1,"itemStatusChangeEvent",e=>(0,c.A)(Qh,e),(e,t)=>(0,l.A)(Qh,e,t)],[Hh({type:"item.title.change"}),1,"itemTitleChangeEvent",e=>(0,c.A)(eu,e),(e,t)=>(0,l.A)(eu,e,t)],[Hh({type:"item.new.chat"}),1,"itemNewChatEvent",e=>(0,c.A)(iu,e),(e,t)=>(0,l.A)(iu,e,t)],[Gh(),2,"appendChildDone"]],0,(e=>nu.has((0,s.A)(e))),m.ReactNextElement)),Ah();var ou=i(62916);let lu=function(e){return e.PROJECT_OVERALL="PROJECT_OVERALL",e}({});const cu="bricks/ai-portal/project-conversations",du=g.i18n.getFixedT(null,cu);var pu,hu=i(79286);let uu,mu,gu,Au,bu,vu,Eu,fu,xu,ku,wu,yu,Tu,Su,Nu,Cu,_u;(0,g.initializeI18n)(cu,{en:{PROJECT_OVERALL:"Project overall"},zh:{PROJECT_OVERALL:"项目整体"}});const Mu=(0,m.wrapBrick)("eo-link"),Ru=(0,m.wrapBrick)("eo-icon"),Iu=(0,m.wrapBrick)("eo-easyops-avatar"),Wu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Du,property:Lu,event:Ou}=(0,u.createDecorators)();let Pu;var zu=new WeakMap,Bu=new WeakMap,Uu=new WeakMap,Hu=new WeakMap,Gu=new WeakMap,Fu=new WeakSet,Vu=new WeakMap,ju=new WeakMap,Ku=new WeakMap;class $u extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Fu),(0,r.A)(this,zu,mu(this)),(0,r.A)(this,Bu,(gu(this),Au(this))),(0,r.A)(this,Uu,(bu(this),vu(this))),(0,r.A)(this,Hu,(Eu(this),fu(this))),(0,r.A)(this,Gu,(xu(this),ku(this))),(0,r.A)(this,Vu,(Tu(this),e=>{(0,o.A)(Fu,this,wu).emit(e)})),(0,r.A)(this,ju,Su(this)),(0,r.A)(this,Ku,(_u(this),e=>{(0,o.A)(Fu,this,Nu).emit(e)}))}get list(){return(0,c.A)(zu,this)}set list(e){(0,l.A)(zu,this,e)}get urlTemplate(){return(0,c.A)(Bu,this)}set urlTemplate(e){(0,l.A)(Bu,this,e)}get actions(){return(0,c.A)(Uu,this)}set actions(e){(0,l.A)(Uu,this,e)}get goals(){return(0,c.A)(Hu,this)}set goals(e){(0,l.A)(Hu,this,e)}render(){return h().createElement(qu,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,goals:this.goals,onGoalClick:(0,c.A)(Vu,this),onActionClick:(0,c.A)(Ku,this)})}}function qu(e){let{list:t,urlTemplate:i,actions:a,goals:n,onGoalClick:r,onActionClick:s}=e;return t?h().createElement("ul",null,t.map((e=>h().createElement("li",{className:"item",key:e.conversationId},h().createElement(Yu,{conversation:e,urlTemplate:i,actions:a,goals:n,onGoalClick:r,onActionClick:s}))))):h().createElement("div",{className:"loading"},h().createElement(Ru,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Yu(e){var t;let{conversation:i,urlTemplate:a,actions:n,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(Mu,{className:Ca()("link",{"actions-active":d}),url:(0,ll.Q)(a,i)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(Ru,{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:Ca()("goal",{global:!i.goalInstanceId}),ref:l},i.goalInstanceId?null===(t=r.find((e=>e.instanceId===i.goalInstanceId)))||void 0===t?void 0:t.title:du(lu.PROJECT_OVERALL)),h().createElement(Iu,{className:"avatar",size:"small",nameOrInstanceId:i.username}),h().createElement("div",{className:`operations lang-${c}`},h().createElement(Wu,{className:"actions",actions:n,onActionClick:e=>{o({action:e.detail,item:i})},onVisibleChange:e=>{u(e.detail)}}),h().createElement("div",{className:"time",title:(0,ou.P)(1e3*i.startTime,ou.c.full)},(0,ou.P)(1e3*i.startTime,ou.c.relative))))}pu=$u,({e:[mu,gu,Au,bu,vu,Eu,fu,xu,ku,wu,yu,Tu,Su,Nu,Cu,_u],c:[Pu,uu]}=(0,d.A)(pu,[Du("ai-portal.project-conversations",{styleTexts:[hu.A]})],[[Lu({attribute:!1}),1,"list"],[Lu(),1,"urlTemplate"],[Lu({attribute:!1}),1,"actions"],[Lu({attribute:!1}),1,"goals"],[Ou({type:"goal.click"}),1,"goalClick",e=>(0,c.A)(Gu,e),(e,t)=>(0,l.A)(Gu,e,t)],[Ou({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ju,e),(e,t)=>(0,l.A)(ju,e,t)]],0,(e=>Ku.has((0,s.A)(e))),m.ReactNextElement)),uu();var Xu,Ju=i(23677);let Qu,Zu,em,tm,im,am,nm,rm,sm,om,lm,cm,dm,pm,hm;const um=(0,m.wrapBrick)("eo-link"),mm=(0,m.wrapBrick)("eo-icon"),gm=(0,m.wrapBrick)("eo-easyops-avatar"),Am=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:bm,property:vm,event:Em}=(0,u.createDecorators)();let fm;var xm=new WeakMap,km=new WeakMap,wm=new WeakMap,ym=new WeakMap,Tm=new WeakSet,Sm=new WeakMap,Nm=new WeakMap,Cm=new WeakMap;class _m extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Tm),(0,r.A)(this,xm,Zu(this)),(0,r.A)(this,km,(em(this),tm(this))),(0,r.A)(this,wm,(im(this),am(this))),(0,r.A)(this,ym,(nm(this),rm(this))),(0,r.A)(this,Sm,(lm(this),cm(this))),(0,r.A)(this,Nm,(hm(this),e=>{(0,o.A)(Tm,this,sm).emit(e)})),(0,r.A)(this,Cm,(e=>{(0,o.A)(Tm,this,dm).emit(e)}))}get list(){return(0,c.A)(xm,this)}set list(e){(0,l.A)(xm,this,e)}get urlTemplate(){return(0,c.A)(km,this)}set urlTemplate(e){(0,l.A)(km,this,e)}get actions(){return(0,c.A)(wm,this)}set actions(e){(0,l.A)(wm,this,e)}render(){return h().createElement(Mm,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,onActionClick:(0,c.A)(Nm,this),onItemClick:(0,c.A)(Cm,this)})}}function Mm(e){let{list:t,urlTemplate:i,actions:a,onActionClick:n,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(Rm,{knowledge:e,urlTemplate:i,actions:a,onActionClick:n,onItemClick:r}))))):h().createElement("div",{className:"loading"},h().createElement(mm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Rm(e){let{knowledge:t,urlTemplate:i,actions:a,onActionClick:n,onItemClick:r}=e;const[s,o]=(0,p.useState)(!1);return h().createElement(um,{className:Ca()("link",{"actions-active":s}),url:(0,ll.Q)(i,t),onClick:()=>null==r?void 0:r(t)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(mm,{className:"icon",lib:"easyops",icon:"lightbulb",category:"common"}),h().createElement("span",{className:"title"},t.name),h().createElement(mm,{className:"attachment",lib:"lucide",icon:"paperclip"})),t.description&&h().createElement("div",{className:"description"},t.description)),h().createElement("div",{className:"time"},(0,ou.P)(1e3*t.time,ou.c.relative)),h().createElement("div",{className:"operations"},h().createElement(Am,{className:"actions",actions:a,onActionClick:e=>{n({action:e.detail,item:t})},onVisibleChange:e=>{o(e.detail)}}),h().createElement(gm,{className:"avatar",size:"small",nameOrInstanceId:t.user})))}Xu=_m,({e:[Zu,em,tm,im,am,nm,rm,sm,om,lm,cm,dm,pm,hm],c:[fm,Qu]}=(0,d.A)(Xu,[bm("ai-portal.project-knowledges",{styleTexts:[Ju.A]})],[[vm({attribute:!1}),1,"list"],[vm(),1,"urlTemplate"],[vm({attribute:!1}),1,"actions"],[Em({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ym,e),(e,t)=>(0,l.A)(ym,e,t)],[Em({type:"item.click"}),1,"itemClick",e=>(0,c.A)(Sm,e),(e,t)=>(0,l.A)(Sm,e,t)]],0,(e=>Cm.has((0,s.A)(e))),m.ReactNextElement)),Qu();let Im=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 Wm="bricks/ai-portal/activity-timeline",Dm=g.i18n.getFixedT(null,Wm);var Lm,Om=i(14763);let Pm,zm,Bm,Um,Hm;(0,g.initializeI18n)(Wm,{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 Gm=(0,m.wrapBrick)("eo-link"),Fm=(0,m.wrapBrick)("eo-icon"),Vm=(0,m.wrapBrick)("eo-easyops-avatar"),{defineElement:jm,property:Km}=(0,u.createDecorators)();let $m;var qm=new WeakMap,Ym=new WeakMap;class Xm extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,qm,zm(this)),(0,r.A)(this,Ym,(Bm(this),Um(this))),Hm(this)}get list(){return(0,c.A)(qm,this)}set list(e){(0,l.A)(qm,this,e)}get chatUrlTemplate(){return(0,c.A)(Ym,this)}set chatUrlTemplate(e){(0,l.A)(Ym,this,e)}render(){return h().createElement(Jm,{list:this.list,chatUrlTemplate:this.chatUrlTemplate})}}function Jm(e){let{list:t,chatUrlTemplate:i}=e;return t?h().createElement("ul",null,t.map(((e,t)=>{var a,n;return h().createElement("li",{className:"activity",key:t},h().createElement("div",{className:"guide-line"}),h().createElement("div",{className:"main"},h().createElement(Vm,{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,Dm(Im.STARTED_A_CHAT)),h().createElement(Gm,{className:"conversation",url:(0,ll.Q)(i,e),target:"_blank"},null===(a=e.metadata)||void 0===a?void 0:a.conversation_title),h().createElement(Fm,{className:"external-link-icon",lib:"lucide",icon:"external-link"})):"create_goal"===e.action_type?Dm(Im.CREATED_THIS_GOAL):"edit_goal"===e.action_type?e.metadata.after.title?Dm(Im.CHANGED_THE_GOAL_TITLE,e.metadata.after):e.metadata.after.description?Dm(Im.CHANGED_THE_GOAL_DESCRIPTION,e.metadata.after):Dm(Im.CHANGED_THE_GOAL):"delete_goal"===e.action_type?Dm(Im.DELETED_THIS_GOAL):"decompose_goals"===e.action_type?`${Dm(Im.DECOMPOSED_THIS_GOAL,{count:e.metadata.sub_goals_count})}${e.metadata.sub_goals.map((e=>e.title)).join(Dm(Im.COMMA))}`:"alter_owner"===e.action_type?Dm(Im.SET_OWNER,{user:e.metadata.after.owner.user_name}):"alter_user"===e.action_type?function(e){const t=[],i=[],a=new Set(e.metadata.before.users.map((e=>e.user_name)));for(const t of e.metadata.after.users)a.has(t.user_name)||i.push(t.user_name);const n=new Set(e.metadata.after.users.map((e=>e.user_name)));for(const i of e.metadata.before.users)n.has(i.user_name)||t.push(i.user_name);const r=[];return t.length>0&&r.push(Dm(Im.REMOVED_GOAL_PARTICIPANTS,{count:t.length})+t.join(Dm(Im.COMMA))),i.length>0&&r.push(Dm(Im.ADDED_GOAL_PARTICIPANTS,{count:i.length})+i.join(Dm(Im.COMMA))),r.join(Dm(Im.SEMICOLON))}(e):"add_comment"===e.action_type?Dm(Im.COMMENTED):e.action_type),h().createElement("span",{className:"time",title:(0,ou.P)(e.time,ou.c.full)},(0,ou.P)(e.time,ou.c.relative))),"add_comment"===e.action_type&&h().createElement("div",{className:"comment"},null===(n=e.metadata)||void 0===n?void 0:n.comment_content))}))):h().createElement("div",{className:"loading"},h().createElement(Fm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}Lm=Xm,({e:[zm,Bm,Um,Hm],c:[$m,Pm]}=(0,d.A)(Lm,[jm("ai-portal.activity-timeline",{styleTexts:[Om.A]})],[[Km({attribute:!1}),1,"list"],[Km(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),Pm();var Qm=i(99126);let Zm=function(e){return e.TERMINATE_THE_TASK="TERMINATE_THE_TASK",e}({});const eg="bricks/ai-portal/chat-input",tg=g.i18n.getFixedT(null,eg);var ig,ag=i(84479);let ng,rg,sg,og,lg,cg,dg,pg,hg,ug,mg,gg,Ag,bg,vg,Eg,fg,xg,kg;(0,g.initializeI18n)(eg,{en:{TERMINATE_THE_TASK:"Terminate the task"},zh:{TERMINATE_THE_TASK:"终止任务"}});const wg={lib:"antd",icon:"loading-3-quarters",spinning:!0},yg={lib:"fa",prefix:"far",icon:"circle-stop"},Tg=(0,m.wrapBrick)("eo-icon"),Sg=(0,m.wrapBrick)("ai-portal.icon-button"),{defineElement:Ng,property:Cg,event:_g}=(0,u.createDecorators)();let Mg;var Rg=new WeakMap,Ig=new WeakMap,Wg=new WeakMap,Dg=new WeakMap,Lg=new WeakMap,Og=new WeakMap,Pg=new WeakSet,zg=new WeakMap,Bg=new WeakMap,Ug=new WeakMap;class Hg extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Pg),(0,r.A)(this,Rg,rg(this)),(0,r.A)(this,Ig,(sg(this),og(this))),(0,r.A)(this,Wg,(lg(this),cg(this))),(0,r.A)(this,Dg,(dg(this),pg(this))),(0,r.A)(this,Lg,(hg(this),ug(this))),(0,r.A)(this,Og,(mg(this),gg(this))),(0,r.A)(this,zg,(vg(this),e=>{(0,o.A)(Pg,this,Ag).emit(e)})),(0,r.A)(this,Bg,Eg(this)),(0,r.A)(this,Ug,(kg(this),()=>{(0,o.A)(Pg,this,fg).emit()}))}get placeholder(){return(0,c.A)(Rg,this)}set placeholder(e){(0,l.A)(Rg,this,e)}get autoFocus(){return(0,c.A)(Ig,this)}set autoFocus(e){(0,l.A)(Ig,this,e)}get submitDisabled(){return(0,c.A)(Wg,this)}set submitDisabled(e){(0,l.A)(Wg,this,e)}get supportsTerminate(){return(0,c.A)(Dg,this)}set supportsTerminate(e){(0,l.A)(Dg,this,e)}get terminating(){return(0,c.A)(Lg,this)}set terminating(e){(0,l.A)(Lg,this,e)}render(){return h().createElement(Gg,{placeholder:this.placeholder,autoFocus:this.autoFocus,submitDisabled:this.submitDisabled,supportsTerminate:this.supportsTerminate,terminating:this.terminating,onSubmit:(0,c.A)(zg,this),onTerminate:(0,c.A)(Ug,this)})}}function Gg(e){let{placeholder:t,autoFocus:i,submitDisabled:a,supportsTerminate:n,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,A]=(0,p.useState)(!1);(0,p.useEffect)((()=>{var e;i&&!a&&(null===(e=c.current)||void 0===e||e.focus())}),[i,a]);const b=(0,p.useCallback)((e=>{!a&&e&&(s(e),m.current="",u(""))}),[a,s]),v=(0,p.useCallback)((e=>{b(e.currentTarget.value)}),[b]),E=(0,p.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),f=(0,p.useCallback)((()=>{b(m.current)}),[b]);(0,p.useEffect)((()=>{const e=null==l?void 0:l.current;if(!e)return;const t=new Qm.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&&A(!0)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,p.useEffect)((()=>{d||A(!1)}),[d]);const x=(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:x},h().createElement("div",{className:Ca()("box",{wrap:g})},h().createElement("div",{className:"input",ref:l},h().createElement(bt.e,{containerRef:l,ref:c,value:d,minRows:1,maxRows:4,borderSize:0,paddingSize:16,autoResize:!0,placeholder:t,submitWhen:"enter-without-shift",onSubmit:v,onChange:E})),h().createElement("div",{className:"toolbar"},a&&n?h().createElement(h().Fragment,null,r?h().createElement(Sg,{icon:wg,disabled:!0}):h().createElement(Sg,{icon:yg,tooltip:tg(Zm.TERMINATE_THE_TASK),onClick:o})):h().createElement("button",{className:"btn-send",disabled:a||!d,onClick:f},h().createElement(Tg,{lib:"fa",icon:"arrow-up"})))))}ig=Hg,({e:[rg,sg,og,lg,cg,dg,pg,hg,ug,mg,gg,Ag,bg,vg,Eg,fg,xg,kg],c:[Mg,ng]}=(0,d.A)(ig,[Ng("ai-portal.chat-input",{styleTexts:[ag.A],shadowOptions:{delegatesFocus:!0}})],[[Cg(),1,"placeholder"],[Cg({type:Boolean}),1,"autoFocus"],[Cg({type:Boolean}),1,"submitDisabled"],[Cg({type:Boolean}),1,"supportsTerminate"],[Cg({type:Boolean}),1,"terminating"],[_g({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(Og,e),(e,t)=>(0,l.A)(Og,e,t)],[_g({type:"terminate"}),1,"terminate",e=>(0,c.A)(Bg,e),(e,t)=>(0,l.A)(Bg,e,t)]],0,(e=>Ug.has((0,s.A)(e))),m.ReactNextElement)),ng();const Fg=i.p+"images/e47076cc.png";var Vg,jg=i(31653);let Kg;const{defineElement:$g}=(0,u.createDecorators)();let qg;class Yg extends m.ReactNextElement{render(){return h().createElement("img",{className:"logo",alt:"Elevo",src:Fg,width:95,height:28})}}Vg=Yg,[qg,Kg]=(0,d.A)(Vg,[$g("ai-portal.elevo-logo",{styleTexts:[jg.A]})],[],0,void 0,m.ReactNextElement).c,Kg();let Xg=function(e){return e.WATCH_REPLAY="WATCH_REPLAY",e}({});const Jg="bricks/ai-portal/show-case",Qg={en:{[Xg.WATCH_REPLAY]:"Watch replay"},zh:{[Xg.WATCH_REPLAY]:"查看回放"}},Zg=g.i18n.getFixedT(null,Jg);var eA,tA=i(46122);let iA,aA,nA,rA,sA,oA,lA;(0,g.initializeI18n)(Jg,Qg);const cA=["purple","green","pink"],dA=(0,m.wrapBrick)("eo-icon"),pA=(0,m.wrapBrick)("eo-link"),{defineElement:hA,property:uA}=(0,u.createDecorators)();let mA;var gA=new WeakMap,AA=new WeakMap,bA=new WeakMap;class vA extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,gA,aA(this)),(0,r.A)(this,AA,(nA(this),rA(this))),(0,r.A)(this,bA,(sA(this),oA(this))),lA(this)}get caseTitle(){return(0,c.A)(gA,this)}set caseTitle(e){(0,l.A)(gA,this,e)}get summary(){return(0,c.A)(AA,this)}set summary(e){(0,l.A)(AA,this,e)}get url(){return(0,c.A)(bA,this)}set url(e){(0,l.A)(bA,this,e)}render(){return h().createElement(EA,{caseTitle:this.caseTitle,summary:this.summary,url:this.url})}}function EA(e){let{caseTitle:t,summary:i,url:a}=e;const n=(0,p.useMemo)((()=>{if(!t)return cA[0];let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const i=Math.abs(e)%cA.length;return cA[i]}),[t]);return h().createElement(pA,{className:`link ${n}`,url:a},h().createElement("span",{className:"title"},t),h().createElement("span",{className:"description"},i),h().createElement("span",{className:"mask"}),h().createElement("span",{className:"button"},h().createElement(dA,{lib:"easyops",icon:"replay"}),Zg(Xg.WATCH_REPLAY)))}eA=vA,({e:[aA,nA,rA,sA,oA,lA],c:[mA,iA]}=(0,d.A)(eA,[hA("ai-portal.show-case",{styleTexts:[tA.A]})],[[uA(),1,"caseTitle"],[uA(),1,"summary"],[uA(),1,"url"]],0,void 0,m.ReactNextElement)),iA(),customElements.define("ai-portal.call-tool",(0,ft.createProviderClass)((async function(e,t){return(await ut.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/conversation/${e.conversationId}/step/${e.stepId}/view`,{params:t})).data})));const fA=i.p+"images/449e2e64.png",xA=i.p+"images/fc2c99bb.png",kA=i.p+"images/27bd64e1.png",wA=i.p+"images/c19e3f37.png";var yA,TA=i(19428);let SA,NA,CA,_A,MA;const{defineElement:RA,property:IA}=(0,u.createDecorators)();let WA;var DA=new WeakMap,LA=new WeakMap;class OA extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,DA,NA(this)),(0,r.A)(this,LA,(CA(this),_A(this))),MA(this)}get illustration(){return(0,c.A)(DA,this)}set illustration(e){(0,l.A)(DA,this,e)}get description(){return(0,c.A)(LA,this)}set description(e){(0,l.A)(LA,this,e)}render(){return h().createElement(PA,{illustration:this.illustration,description:this.description})}}function PA(e){let{illustration:t,description:i}=e;return h().createElement(h().Fragment,null,h().createElement("img",{src:zA(t),width:184,height:138}),h().createElement("p",null,i))}function zA(e){switch(e){case"goals":return fA;case"collaboration-spaces":return kA;case"serviceflows":return wA;default:return xA}}yA=OA,({e:[NA,CA,_A,MA],c:[WA,SA]}=(0,d.A)(yA,[RA("ai-portal.blank-state",{styleTexts:[TA.A]})],[[IA(),1,"illustration"],[IA(),1,"description"]],0,void 0,m.ReactNextElement)),SA();var BA,UA=i(81129);let HA,GA,FA;const{defineElement:VA,property:jA}=(0,u.createDecorators)();let KA;var $A=new WeakMap;class qA extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,$A,GA(this)),FA(this)}get variant(){return(0,c.A)($A,this)}set variant(e){(0,l.A)($A,this,e)}render(){return h().createElement(YA,null)}}function YA(){return h().createElement("slot",null)}function XA(e){const[t,i]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const t=e.current;if(!t)return;const a=()=>{i(t.assignedNodes().length>0)};return a(),t.addEventListener("slotchange",a),()=>{t.removeEventListener("slotchange",a)}}),[e]),t}BA=qA,({e:[GA,FA],c:[KA,HA]}=(0,d.A)(BA,[VA("ai-portal.sticky-container",{styleTexts:[UA.A]})],[[jA({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),HA();var JA,QA=i(18338);let ZA,eb,tb,ib,ab,nb,rb,sb,ob,lb,cb;const db=(0,m.wrapBrick)("eo-link"),pb=(0,m.wrapBrick)("eo-icon"),{defineElement:hb,property:ub}=(0,u.createDecorators)();let mb;var gb=new WeakMap,Ab=new WeakMap,bb=new WeakMap,vb=new WeakMap,Eb=new WeakMap;class fb extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,gb,eb(this)),(0,r.A)(this,Ab,(tb(this),ib(this))),(0,r.A)(this,bb,(ab(this),nb(this))),(0,r.A)(this,vb,(rb(this),sb(this))),(0,r.A)(this,Eb,(ob(this),lb(this))),cb(this)}get cardTitle(){return(0,c.A)(gb,this)}set cardTitle(e){(0,l.A)(gb,this,e)}get description(){return(0,c.A)(Ab,this)}set description(e){(0,l.A)(Ab,this,e)}get url(){return(0,c.A)(bb,this)}set url(e){(0,l.A)(bb,this,e)}get avatar(){return(0,c.A)(vb,this)}set avatar(e){(0,l.A)(vb,this,e)}get avatarType(){return(0,c.A)(Eb,this)}set avatarType(e){(0,l.A)(Eb,this,e)}render(){return h().createElement(xb,{cardTitle:this.cardTitle,description:this.description,url:this.url,avatar:this.avatar,avatarType:this.avatarType})}}function xb(e){let{cardTitle:t,description:i,url:a,avatar:n,avatarType:r}=e;const s=(0,p.useRef)(null),o=XA(s),l=(0,p.useRef)(null),c=XA(l);return h().createElement(db,{className:Ca()("card",{clickable:!!a}),url:a},h().createElement("div",{className:"header"},h().createElement("div",{className:"heading"},"image"!==r&&n?h().createElement(kb,n):h().createElement("div",{className:"avatar"}),h().createElement("div",{className:"title"},t)),h().createElement("div",{className:"actions",hidden:!c},h().createElement("slot",{name:"actions",ref:l}))),h().createElement("div",{className:"body"},i),h().createElement("div",{className:"footer",hidden:!o},h().createElement("slot",{name:"footer",ref:s})))}function kb(e){let{color:t,...i}=e;return h().createElement("div",{className:"avatar",style:t?{borderColor:`rgba(var(--theme-${t}-color-rgb-channel), 0.15)`,color:`var(--theme-${t}-color)`}:void 0},h().createElement(pb,i))}JA=fb,({e:[eb,tb,ib,ab,nb,rb,sb,ob,lb,cb],c:[mb,ZA]}=(0,d.A)(JA,[hb("ai-portal.elevo-card",{styleTexts:[QA.A]})],[[ub(),1,"cardTitle"],[ub(),1,"description"],[ub(),1,"url"],[ub({attribute:!1}),1,"avatar"],[ub(),1,"avatarType"]],0,void 0,m.ReactNextElement)),ZA();const wb=window.devicePixelRatio||1,yb=40,Tb=12,Sb=36*Math.PI/180,Nb=Tb*(1-Math.sin(Sb)),Cb=Tb*Math.cos(Sb),_b=(yb-2*Nb)*Math.tan(Sb),Mb=Cb+_b/2;var Rb,Ib=i(29511);let Wb,Db,Lb,Ob,Pb,zb,Bb,Ub,Hb;const{defineElement:Gb,property:Fb,event:Vb}=(0,u.createDecorators)();let jb;var Kb=new WeakMap,$b=new WeakMap,qb=new WeakMap,Yb=new WeakSet,Xb=new WeakMap;class Jb extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Yb),(0,r.A)(this,Kb,Db(this)),(0,r.A)(this,$b,(Lb(this),Ob(this))),(0,r.A)(this,qb,(Pb(this),zb(this))),(0,r.A)(this,Xb,(Hb(this),e=>{this.activeTab=e.id,(0,o.A)(Yb,this,Bb).emit(e)}))}get tabs(){return(0,c.A)(Kb,this)}set tabs(e){(0,l.A)(Kb,this,e)}get activeTab(){return(0,c.A)($b,this)}set activeTab(e){(0,l.A)($b,this,e)}render(){return h().createElement(Qb,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Xb,this)})}}function Qb(e){let{tabs:t,activeTab:i,onTabClick:a}=e;const n=(0,p.useRef)(null),r=(0,p.useRef)(null),s=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=n.current,i=r.current,a=s.current;if(!(e&&i&&a&&null!=t&&t.length))return;const o=i.getContext("2d");if(!o)return;let l,c;const d=new Qm.A((t=>{for(const i of t)if(i.target===e){const e=Zb(i,"width"),t=Zb(i,"height");l=[e,t]}const n=Array.from(a.querySelectorAll(".tab")),r=n.find((e=>e.classList.contains("active")));if(!r)return;const s=r.getBoundingClientRect().width,d=0===n.indexOf(r);let p=0;if(!d){const e=a.getBoundingClientRect().left,t=r.getBoundingClientRect().left;p=t-e}c&&cancelAnimationFrame(c),c=requestAnimationFrame((()=>{l&&function(e,t,i,a,n,r,s){e.width=i*wb,e.height=a*wb,e.style.width=`${i}px`,e.style.height=`${a}px`,t.scale(wb,wb),t.clearRect(0,0,i,a),t.fillStyle="rgba(255,255,255,0.5)";const o=t.createLinearGradient(0,0,0,a);o.addColorStop(0,"rgba(255,255,255,0.9)"),o.addColorStop(1,"rgba(255,255,255,0.4)"),t.lineWidth=1,t.strokeStyle=o;const l=i-1,c=a-1;if(t.translate(.5,.5),t.beginPath(),n)t.moveTo(0,Tb),t.arcTo(0,0,Tb,0,Tb);else{t.moveTo(0,52),t.arcTo(0,yb,Tb,yb,Tb);const e=r-Mb;t.lineTo(e,yb),t.arc(e,28,Tb,Math.PI/2,Sb,!0),t.lineTo(e+Cb+_b,Nb),t.arc(e+2*Mb,Tb,Tb,Math.PI+Sb,1.5*Math.PI,!1)}const d=r+s-Mb;t.lineTo(d,0),t.arc(d,Tb,Tb,1.5*Math.PI,2*Math.PI-Sb,!1),t.lineTo(d+Cb+_b,yb-Nb),t.arc(d+2*Mb,28,Tb,Math.PI-Sb,Math.PI/2,!0),t.lineTo(l-Tb,yb),t.arcTo(l,yb,l,52,Tb),t.lineTo(l,c-Tb),t.arcTo(l,c,l-Tb,c,Tb),t.lineTo(Tb,c),t.arcTo(0,c,0,c-Tb,Tb),t.closePath(),t.fill(),t.stroke()}(i,o,l[0],l[1],d,p,s)}))}));return d.observe(e),d.observe(a),()=>{d.disconnect(),c&&cancelAnimationFrame(c)}}),[t,i]),h().createElement("div",{className:"container",ref:n},h().createElement("canvas",{className:"bg",ref:r}),h().createElement("div",{className:"header"},h().createElement("ul",{className:"tabs",ref:s},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:Ca()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>a(e)},e.label))))),h().createElement("div",{className:"toolbar"},h().createElement("slot",{name:"toolbar"}))),h().createElement("div",{className:"body"},h().createElement("slot",null)))}function Zb(e,t){const i="height"===t?"blockSize":"inlineSize";return e.contentBoxSize?e.contentBoxSize[0]?e.contentBoxSize[0][i]:e.contentBoxSize[i]:e.contentRect[t]}Rb=Jb,({e:[Db,Lb,Ob,Pb,zb,Bb,Ub,Hb],c:[jb,Wb]}=(0,d.A)(Rb,[Gb("ai-portal.flow-tabs",{styleTexts:[Ib.A]})],[[Fb({attribute:!1}),1,"tabs"],[Fb({attribute:!1}),1,"activeTab"],[Vb({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(qb,e),(e,t)=>(0,l.A)(qb,e,t)]],0,(e=>Xb.has((0,s.A)(e))),m.ReactNextElement)),Wb();let ev=function(e){return e.ADD_STAGE="ADD_STAGE",e.PLEASE_ENTER_NAME="PLEASE_ENTER_NAME",e.UNASSIGNED="UNASSIGNED",e.DELETE_STAGE="DELETE_STAGE",e.DELETE_STAGE_TIPS="DELETE_STAGE_TIPS",e.DELETE="DELETE",e.ADD_ACTIVITY="ADD_ACTIVITY",e.STAGE_NAME_EXISTS="STAGE_NAME_EXISTS",e.ACTIVITY_NAME_EXISTS="ACTIVITY_NAME_EXISTS",e}({});const tv="bricks/ai-portal/stage-flow",iv={en:{[ev.ADD_STAGE]:"Add stage",[ev.PLEASE_ENTER_NAME]:"Please enter name",[ev.UNASSIGNED]:"Unassigned",[ev.DELETE_STAGE]:"Delete stage",[ev.DELETE_STAGE_TIPS]:'Are you sure you want to delete stage "{{ name }}"?',[ev.DELETE]:"Delete",[ev.ADD_ACTIVITY]:"Add activity",[ev.STAGE_NAME_EXISTS]:'Stage with name "{{ name }}" already exists.',[ev.ACTIVITY_NAME_EXISTS]:'Activity with name "{{ name }}" already exists.'},zh:{[ev.ADD_STAGE]:"添加阶段",[ev.PLEASE_ENTER_NAME]:"请输入名称",[ev.UNASSIGNED]:"未设置",[ev.DELETE_STAGE]:"删除阶段",[ev.DELETE_STAGE_TIPS]:"您确定要删除阶段 “{{ name }}” 吗?",[ev.DELETE]:"删除",[ev.ADD_ACTIVITY]:"添加活动",[ev.STAGE_NAME_EXISTS]:'阶段名称 "{{ name }}" 已存在。',[ev.ACTIVITY_NAME_EXISTS]:'活动名称 "{{ name }}" 已存在。'}},av=g.i18n.getFixedT(null,tv);var nv,rv=i(66489);let sv,ov,lv,cv,dv,pv,hv,uv,mv,gv,Av,bv,vv,Ev,fv,xv,kv,wv,yv,Tv;(0,g.initializeI18n)(tv,iv);const Sv=(0,m.wrapBrick)("eo-icon"),Nv=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),Cv=(0,m.wrapBrick)("eo-input",{onChange:"change"}),_v=(0,ft.unwrapProvider)("basic.show-dialog"),{defineElement:Mv,property:Rv,event:Iv,method:Wv}=(0,u.createDecorators)(),Dv=(0,p.forwardRef)(qv);let Lv;var Ov=new WeakMap,Pv=new WeakMap,zv=new WeakMap,Bv=new WeakMap,Uv=new WeakSet,Hv=new WeakMap,Gv=new WeakMap,Fv=new WeakMap,Vv=new WeakMap,jv=new WeakMap,Kv=new WeakMap;class $v extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Uv),(0,r.A)(this,Ov,(sv(this),lv(this))),(0,r.A)(this,Pv,(cv(this),dv(this))),(0,r.A)(this,zv,(pv(this),hv(this))),(0,r.A)(this,Bv,(uv(this),mv(this))),(0,r.A)(this,Hv,(bv(this),e=>{(0,o.A)(Uv,this,gv).emit(e)})),(0,r.A)(this,Gv,vv(this)),(0,r.A)(this,Fv,(xv(this),e=>{(0,o.A)(Uv,this,Ev).emit({stage:e})})),(0,r.A)(this,Vv,kv(this)),(0,r.A)(this,jv,(Tv(this),e=>{(0,o.A)(Uv,this,wv).emit(e)})),(0,r.A)(this,Kv,(0,p.createRef)())}get spec(){return(0,c.A)(Ov,this)}set spec(e){(0,l.A)(Ov,this,e)}get aiEmployees(){return(0,c.A)(Pv,this)}set aiEmployees(e){(0,l.A)(Pv,this,e)}get readOnly(){return(0,c.A)(zv,this)}set readOnly(e){(0,l.A)(zv,this,e)}addActivity(e,t){var i;null===(i=(0,c.A)(Kv,this).current)||void 0===i||i.addActivity(e,t)}editActivity(e,t,i){var a;null===(a=(0,c.A)(Kv,this).current)||void 0===a||a.editActivity(e,t,i)}deleteActivity(e,t){var i;null===(i=(0,c.A)(Kv,this).current)||void 0===i||i.deleteActivity(e,t)}render(){return h().createElement(Dv,{ref:(0,c.A)(Kv,this),spec:this.spec,aiEmployees:this.aiEmployees,readOnly:this.readOnly,onChange:(0,c.A)(Hv,this),onAddActivity:(0,c.A)(Fv,this),onEditActivity:(0,c.A)(jv,this)})}}function qv(e,t){let{spec:i,aiEmployees:a,readOnly:n,onChange:r,onAddActivity:s,onEditActivity:o}=e;const[l,c]=(0,p.useState)(i),[d,u]=(0,p.useState)(!1),m=(0,p.useRef)(!0);(0,p.useEffect)((()=>{c(i)}),[i]),(0,p.useEffect)((()=>{m.current?m.current=!1:l&&r(l)}),[l,r]);const g=(0,p.useCallback)((e=>{if(!e)return av(ev.UNASSIGNED);const t=null==a?void 0:a.find((t=>t.employeeId===e));return t?t.name:e}),[a]);return(0,p.useImperativeHandle)(t,(()=>({addActivity(e,t){c((i=>{var a;const n=null!=i?i:[],r=n.findIndex((t=>t.name===e.name));if(-1===r)return n;const s={...n[r]},o=null!==(a=s.serviceFlowActivities)&&void 0!==a?a:[];if(o.find((e=>e.name===t.name)))return _v({type:"warn",content:av(ev.ACTIVITY_NAME_EXISTS,{name:t.name})}),n;const l=[...o,t];s.serviceFlowActivities=l;const c=[...n];return c[r]=s,c}))},editActivity(e,t,i){c((a=>{var n;const r=null!=a?a:[],s=r.findIndex((t=>t.name===e.name));if(-1===s)return r;const o={...r[s]},l=null!==(n=o.serviceFlowActivities)&&void 0!==n?n:[];if(l.find(((e,a)=>e.name===t.name&&a!==i)))return _v({type:"warn",content:av(ev.ACTIVITY_NAME_EXISTS,{name:t.name})}),r;const c=[...l];if(i<0||i>=c.length)return r;c[i]=t,o.serviceFlowActivities=c;const d=[...r];return d[s]=o,d}))},deleteActivity(e,t){c((i=>{var a;const n=null!=i?i:[],r=n.findIndex((t=>t.name===e.name));if(-1===r)return n;const s={...n[r]},o=[...null!==(a=s.serviceFlowActivities)&&void 0!==a?a:[]];if(t<0||t>=o.length)return n;o.splice(t,1),s.serviceFlowActivities=o;const l=[...n];return l[r]=s,l}))}})),[]),h().createElement("div",{className:"container"},h().createElement("ul",{className:"nav"},null==l?void 0:l.map(((e,t)=>h().createElement(Xv,{key:t,stage:e,readOnly:n,otherStageNames:l.filter((t=>t!==e)).map((e=>e.name)),onNameChange:i=>{c((a=>{const n=[...null!=a?a:[]];return n[t]={...e,name:i},n}))},onDelete:()=>{c((e=>(null!=e?e:[]).filter(((e,i)=>i!==t))))}}))),d&&h().createElement("li",{className:"nav-item pending"},h().createElement(Yv,{onDone:e=>{u(!1),e&&c((t=>{const i=null!=t?t:[];return i.find((t=>t.name===e))?(_v({type:"warn",content:av(ev.STAGE_NAME_EXISTS,{name:e})}),i):[...i,{name:e}]}))}})),!n&&h().createElement("li",{className:"nav-add"},h().createElement("button",{className:"btn-add-stage",onClick:()=>u(!0)},h().createElement(Sv,{lib:"antd",icon:"plus",className:"plus"}),av(ev.ADD_STAGE)))),h().createElement("div",{className:"lanes"},null==l?void 0:l.map(((e,t)=>{var i;return h().createElement("ul",{className:"lane",key:t},null===(i=e.serviceFlowActivities)||void 0===i?void 0:i.map(((t,i)=>h().createElement("li",{key:i},h().createElement("div",{className:"activity",onClick:()=>{n||o({stage:e,activity:t,activityIndex:i})}},h().createElement("div",{className:"title"},t.name),h().createElement("div",{className:"assignee"},h().createElement(Sv,{lib:"antd",icon:"user",className:"assignee-icon"}),g(t.aiEmployeeId)))))),!n&&h().createElement("li",null,h().createElement("button",{className:"btn-add-activity",onClick:()=>s(e)},h().createElement(Sv,{lib:"antd",icon:"plus"}),av(ev.ADD_ACTIVITY))))}))))}function Yv(e){let{onDone:t}=e;const i=(0,p.useRef)(!1);return h().createElement("input",{className:"input-new-stage",type:"text",placeholder:av(ev.PLEASE_ENTER_NAME),autoFocus:!0,onCompositionStart:()=>{i.current=!0},onCompositionEnd:()=>{i.current=!1},onKeyDown:e=>{if(!i.current)if("Enter"===e.key){e.preventDefault();const i=e.target.value.trim();t(i)}else"Escape"===e.key&&(e.preventDefault(),t(""))},onBlur:e=>{const i=e.target.value.trim();t(i)}})}function Xv(e){let{stage:t,otherStageNames:i,readOnly:a,onNameChange:n,onDelete:r}=e;const s=(0,p.useRef)(!1),o=(0,p.useRef)(null);return a?h().createElement("li",{className:"nav-item"},h().createElement("span",{className:"nav-link"},h().createElement("span",null,t.name))):h().createElement("li",{className:"nav-item"},h().createElement(Nv,{trigger:"click",placement:"bottom",sync:"width",arrow:!1,distance:8,themeVariant:"elevo",ref:o},h().createElement("button",{className:"nav-link",slot:"anchor"},h().createElement("span",null,t.name)),h().createElement("div",{className:"stage-settings"},h().createElement(Cv,{value:t.name,themeVariant:"elevo",onCompositionStart:()=>{s.current=!0},onCompositionEnd:()=>{s.current=!1},onBlur:e=>{var a;const r=null===(a=e.currentTarget.value)||void 0===a?void 0:a.trim();r&&r!==t.name?i.includes(r)?(_v({type:"warn",content:av(ev.STAGE_NAME_EXISTS,{name:r})}),e.currentTarget.value=t.name):n(r):r||(e.currentTarget.value=t.name)},onKeyDown:e=>{s.current||"Enter"===e.key&&(e.preventDefault(),o.current.active=!1)}}),h().createElement("div",{className:"divider"}),h().createElement("button",{onClick:async()=>{o.current.active=!1,await _v({type:"delete",title:av(ev.DELETE_STAGE),content:av(ev.DELETE_STAGE_TIPS,{name:t.name})}),r(t)}},av(ev.DELETE)))))}nv=$v,({e:[lv,cv,dv,pv,hv,uv,mv,gv,Av,bv,vv,Ev,fv,xv,kv,wv,yv,Tv,sv],c:[Lv,ov]}=(0,d.A)(nv,[Mv("ai-portal.stage-flow",{styleTexts:[rv.A]})],[[Rv({attribute:!1}),1,"spec"],[Rv({attribute:!1}),1,"aiEmployees"],[Rv({type:Boolean}),1,"readOnly"],[Iv({type:"change"}),1,"change",e=>(0,c.A)(Bv,e),(e,t)=>(0,l.A)(Bv,e,t)],[Iv({type:"add.activity"}),1,"addActivity",e=>(0,c.A)(Gv,e),(e,t)=>(0,l.A)(Gv,e,t)],[Iv({type:"edit.activity"}),1,"editActivity",e=>(0,c.A)(Vv,e),(e,t)=>(0,l.A)(Vv,e,t)],[Wv(),2,"addActivity"],[Wv(),2,"editActivity"],[Wv(),2,"deleteActivity"]],0,(e=>Kv.has((0,s.A)(e))),m.ReactNextElement)),ov();var Jv=i(65100);const Qv=e=>p.createElement("svg",(0,Hi.A)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",stroke:"currentColor","aria-hidden":"true",viewBox:"0 0 20 26"},e),p.createElement("g",{fillRule:"evenodd"},p.createElement("path",{d:"M12 9H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1zm0 10H8a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1zM10 7v9"}),p.createElement("path",{strokeLinecap:"round",d:"M17.112 16.112h-4.224"})));var Zv,eE=i(625);let tE,iE,aE,nE,rE,sE,oE,lE,cE;const dE=(0,m.wrapBrick)("eo-icon"),{defineElement:pE,property:hE,event:uE}=(0,u.createDecorators)();let mE;var gE=new WeakMap,AE=new WeakMap,bE=new WeakMap,vE=new WeakSet,EE=new WeakMap;class fE extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,vE),(0,r.A)(this,gE,iE(this)),(0,r.A)(this,AE,(aE(this),nE(this))),(0,r.A)(this,bE,(rE(this),sE(this))),(0,r.A)(this,EE,(cE(this),e=>{var t;null===(t=(0,o.A)(vE,this,oE))||void 0===t||t.emit(e)}))}get spec(){return(0,c.A)(gE,this)}set spec(e){(0,l.A)(gE,this,e)}get activeActivityId(){return(0,c.A)(AE,this)}set activeActivityId(e){(0,l.A)(AE,this,e)}render(){return h().createElement(xE,{spec:this.spec,activeActivityId:this.activeActivityId,onActiveChange:(0,c.A)(EE,this)})}}function xE(e){let{spec:t,activeActivityId:i,onActiveChange:a}=e;const[n,r]=(0,p.useState)(i||null);return(0,p.useEffect)((()=>{r(i||null)}),[i]),h().createElement("div",{className:"container"},h().createElement("ul",{className:"nav"},null==t?void 0:t.map(((e,t)=>h().createElement("li",{key:t,className:"nav-item"},h().createElement("div",{className:"nav-content"},h().createElement("span",{className:"icon"},h().createElement(Qv,null)),h().createElement("div",{className:"title"},e.name)))))),h().createElement("div",{className:"lanes"},null==t?void 0:t.map(((e,t)=>{var i;return h().createElement("ul",{className:"lane",key:t},null===(i=e.serviceFlowActivities)||void 0===i?void 0:i.map(((e,t)=>h().createElement("li",{key:t},h().createElement("div",{className:Ca()("activity",kE(e.state),{active:n&&e.taskId===n}),onClick:()=>{e.taskId&&n!==e.taskId&&(r(e.taskId),a(e.taskId))}},h().createElement(dE,(0,Hi.A)({},(0,eE.W)(e.state),{className:"icon"})),h().createElement("div",{className:"title"},e.name),null!=e.startTime&&null!=e.endTime&&h().createElement(wE,{startTime:e.startTime,endTime:e.endTime,state:e.state}))))))}))))}function kE(e){switch(e){case"input-required":return"paused";case"completed":return"completed";case"failed":return"failed";case"working":return"working";default:return"default"}}function wE(e){let{startTime:t,endTime:i,state:a}=e;const[n,r]=(0,p.useState)(i),s=null!=t&&null==i&&"working"===a;return(0,p.useEffect)((()=>{null!=i&&r(i)}),[i]),(0,p.useEffect)((()=>{if(s){const e=()=>{r(Date.now()/1e3)};e();const t=setInterval(e,1e3);return()=>clearInterval(t)}}),[s]),null==t||null==n?null:h().createElement("div",{className:"duration"},function(e){const t=Math.ceil(e),i=Math.floor(t/60),a=t%60;return`${String(i).padStart(2,"0")}:${String(a).padStart(2,"0")}`}(n-t))}Zv=fE,({e:[iE,aE,nE,rE,sE,oE,lE,cE],c:[mE,tE]}=(0,d.A)(Zv,[pE("ai-portal.running-flow",{styleTexts:[Jv.A]})],[[hE({attribute:!1}),1,"spec"],[hE(),1,"activeActivityId"],[uE({type:"active.change"}),1,"activeChange",e=>(0,c.A)(bE,e),(e,t)=>(0,l.A)(bE,e,t)]],0,(e=>EE.has((0,s.A)(e))),m.ReactNextElement)),tE();let yE=function(e){return e.MESSAGE_LIST="MESSAGE_LIST",e.NO_NEW_MESSAGE="NO_NEW_MESSAGE",e.MARK_ALL_READ="MARK_ALL_READ",e.ENTER_MESSAGE_CENTER="ENTER_MESSAGE_CENTER",e}({});const TE="bricks/ai-portal/notice-dropdown",SE=g.i18n.getFixedT(null,TE);var NE=i(9884);const CE=i.p+"images/0155287e.svg",_E=i.p+"images/218d5865.svg",ME=i.p+"images/dcee4821.svg",RE=i.p+"images/0e89dec0.svg";var IE;let WE,DE,LE,OE,PE,zE,BE,UE,HE,GE,FE,VE,jE,KE,$E,qE,YE,XE,JE,QE,ZE,ef,tf,af,nf;(0,g.initializeI18n)(TE,{en:{MESSAGE_LIST:"Message List",NO_NEW_MESSAGE:"No new messages for now",MARK_ALL_READ:"Mark all as read",ENTER_MESSAGE_CENTER:"Enter Message Center"},zh:{MESSAGE_LIST:"消息列表",NO_NEW_MESSAGE:"暂无新消息",MARK_ALL_READ:"全部已读",ENTER_MESSAGE_CENTER:"进入消息中心"}});const{defineElement:rf,property:sf,event:of}=(0,u.createDecorators)(),lf=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),cf=(0,m.wrapBrick)("eo-icon"),df=(0,m.wrapBrick)("eo-link"),pf=(0,m.wrapBrick)("eo-button"),hf=(0,m.wrapBrick)("eo-counter-badge"),uf=(0,m.wrapBrick)("ai-portal.icon-button");let mf;var gf=new WeakMap,Af=new WeakMap,bf=new WeakMap,vf=new WeakMap,Ef=new WeakMap,ff=new WeakMap,xf=new WeakMap,kf=new WeakMap,wf=new WeakMap,yf=new WeakSet,Tf=new WeakMap,Sf=new WeakMap,Nf=new WeakMap;class Cf extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,yf),(0,r.A)(this,gf,DE(this)),(0,r.A)(this,Af,(LE(this),OE(this))),(0,r.A)(this,bf,(PE(this),zE(this))),(0,r.A)(this,vf,(BE(this),UE(this))),(0,r.A)(this,Ef,(HE(this),GE(this))),(0,r.A)(this,ff,(FE(this),VE(this))),(0,r.A)(this,xf,(jE(this),KE(this))),(0,r.A)(this,kf,($E(this),qE(this))),(0,r.A)(this,wf,(YE(this),XE(this))),(0,r.A)(this,Tf,(ZE(this),ef(this))),(0,r.A)(this,Sf,(nf(this),e=>{(0,o.A)(yf,this,JE).emit(e)})),(0,r.A)(this,Nf,(()=>{(0,o.A)(yf,this,tf).emit()}))}get dataSource(){return(0,c.A)(gf,this)}set dataSource(e){(0,l.A)(gf,this,e)}get popoverPlacement(){return(0,c.A)(Af,this)}set popoverPlacement(e){(0,l.A)(Af,this,e)}get emptyText(){return(0,c.A)(bf,this)}set emptyText(e){(0,l.A)(bf,this,e)}get notifyCenterUrl(){return(0,c.A)(vf,this)}set notifyCenterUrl(e){(0,l.A)(vf,this,e)}get urlTemplate(){return(0,c.A)(Ef,this)}set urlTemplate(e){(0,l.A)(Ef,this,e)}get dropdownMaxWidth(){return(0,c.A)(ff,this)}set dropdownMaxWidth(e){(0,l.A)(ff,this,e)}get dropdownContentStyle(){return(0,c.A)(xf,this)}set dropdownContentStyle(e){(0,l.A)(xf,this,e)}get hideNotifyCenterButton(){return(0,c.A)(kf,this)}set hideNotifyCenterButton(e){(0,l.A)(kf,this,e)}render(){return h().createElement(_f,{dataSource:this.dataSource,popoverPlacement:this.popoverPlacement,emptyText:this.emptyText,onNoticeClick:(0,c.A)(Sf,this),urlTemplate:this.urlTemplate,dropdownMaxWidth:this.dropdownMaxWidth,notifyCenterUrl:this.notifyCenterUrl,dropdownContentStyle:this.dropdownContentStyle,onMarkAllRead:(0,c.A)(Nf,this),hideNotifyCenterButton:this.hideNotifyCenterButton})}}function _f(e){var t;let{dataSource:i=[],popoverPlacement:a,emptyText:n,notifyCenterUrl:r,urlTemplate:s,dropdownMaxWidth:o,dropdownContentStyle:l,onNoticeClick:c,onMarkAllRead:d,hideNotifyCenterButton:u}=e;const[m,g]=(0,p.useState)(!1),A=(0,p.useCallback)((e=>{g(e.detail)}),[]),b=(0,p.useCallback)((()=>{g(!1)}),[]),v=(0,p.useCallback)((e=>{c(e)}),[c]),E=(0,p.useCallback)((()=>{d()}),[d]);return h().createElement(lf,{className:"popover",placement:a,trigger:"click",active:m,arrow:!1,distance:8,onBeforeVisibleChange:A},h().createElement("span",{slot:"anchor"},h().createElement("slot",{name:"trigger"},h().createElement(hf,{showZero:!1,dot:!0,count:null!==(t=null==i?void 0:i.length)&&void 0!==t?t:0,offset:[-5,0]},h().createElement(uf,{icon:{lib:"antd",icon:"bell"}})))),h().createElement("div",{className:"notice-dropdown-content",style:{maxWidth:o}},h().createElement("div",{className:"header"},h().createElement("div",{className:"title"},SE(yE.MESSAGE_LIST)),h().createElement("div",{className:"close-btn",onClick:b},h().createElement(cf,{lib:"antd",icon:"close"}))),h().createElement("div",{className:"content",style:l},i.length>0?h().createElement("ul",{className:"message-list"},i.map((e=>h().createElement("li",{key:e.id},h().createElement(df,{className:"link",url:(0,ll.Q)(s,e),onClick:()=>v(e.id)},h().createElement("div",{className:"icon-wrapper"},h().createElement(cf,{imgSrc:Mf(e.type),keepSvgOriginalColor:!0})),h().createElement("div",{className:"message-content"},h().createElement("div",{className:"primary-text"},e.title),e.description&&h().createElement("div",{className:"secondary-text"},e.description))))))):h().createElement("div",{className:"empty-state"},n||SE(yE.NO_NEW_MESSAGE))),h().createElement("div",{className:"footer"},h().createElement(pf,{disabled:!(null!=i&&i.length),type:"text",className:"footer-button",onClick:E},SE(yE.MARK_ALL_READ)),!u&&h().createElement(pf,{href:r,type:"text",className:"footer-button"},SE(yE.ENTER_MESSAGE_CENTER)," >"))))}function Mf(e){switch(e){case"project":default:return CE;case"account":return _E;case"system":return ME;case"space":return RE}}IE=Cf,({e:[DE,LE,OE,PE,zE,BE,UE,HE,GE,FE,VE,jE,KE,$E,qE,YE,XE,JE,QE,ZE,ef,tf,af,nf],c:[mf,WE]}=(0,d.A)(IE,[rf("ai-portal.notice-dropdown",{styleTexts:[NE.A]})],[[sf({attribute:!1}),1,"dataSource"],[sf(),1,"popoverPlacement"],[sf(),1,"emptyText"],[sf(),1,"notifyCenterUrl"],[sf(),1,"urlTemplate"],[sf(),1,"dropdownMaxWidth"],[sf({attribute:!1}),1,"dropdownContentStyle"],[sf({type:Boolean}),1,"hideNotifyCenterButton"],[of({type:"notice.click"}),1,"noticeClickEvent",e=>(0,c.A)(wf,e),(e,t)=>(0,l.A)(wf,e,t)],[of({type:"mark.all.read"}),1,"markAllReadEvent",e=>(0,c.A)(Tf,e),(e,t)=>(0,l.A)(Tf,e,t)]],0,(e=>Nf.has((0,s.A)(e))),m.ReactNextElement)),WE()},29511:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{position:relative}.bg{position:absolute;top:0;left:0;z-index:-1;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.header{display:flex;align-items:center;justify-content:space-between}.tabs{list-style:none;padding:0;margin:0;display:flex}.tabs .tab{padding:0 18px}.tabs a{display:block;padding:9px 10px;color:rgba(0,0,0,0.55);line-height:20px;cursor:pointer}.tabs .active a{font-weight:500;color:#262626}.body{padding:23px 27px;overflow-x:auto}.toolbar{display:flex;align-items:center;gap:8px}",""]);const o=s.toString()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}h2{font-weight:500;margin:0;font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:17px}.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}.sticky-tabs{margin:0 -24px;padding:0 24px 10px}.non-sticky-tabs{padding:0 0 10px}",""]);const o=s.toString()},40138:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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()},44492:(e,t,i)=>{e.exports=i.p+"images/60cd488d.svg"},46121:(e,t,i)=>{e.exports=i.p+"images/69cf3ae2.png"},46122:(e,t,i)=>{i.d(t,{A:()=>A});var a=i(36758),n=i.n(a),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()(n()),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 A=h.toString()},46342:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(n()),p=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;color:#262626;padding:0 54px 48px;overflow:hidden;overflow-y:auto}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:rgb(205,206,207);background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}:host([variant="form"])::before{background:#fff}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}:host([size="full"]) .container{max-width:100%}.sticky-header{margin:0 -24px;padding:17px 24px 30px}.non-sticky-header{padding:17px 0 30px}.header{display:flex;justify-content:space-between;align-items:center}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;min-width:0;white-space:nowrap;flex-wrap:wrap}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}nav{margin-left:40px}}`,""]);const h=d.toString()},56791:(e,t,i)=>{e.exports=i.p+"images/3e0f6758.png"},61393:(e,t,i)=>{e.exports=i.p+"images/ecaecc18.svg"},62522:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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},65100:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());s.push([e.id,':host{display:block;color:#262626;--running-flow-lane-width:234px;--running-flow-status-color:#aeb3bc}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.nav,\n.lanes{display:flex;gap:40px}.nav-item,\n.lane{width:var(--running-flow-lane-width);flex-shrink:0}.nav-item{position:relative;background-color:#e3e4e5;border-top-left-radius:8px;border-bottom-left-radius:8px}.nav-item::after{content:"";position:absolute;top:0;right:-24px;border-color:transparent;border-style:solid;border-width:24px 0 24px 24px;border-left-color:#e3e4e5}.nav-content{height:48px;display:flex;align-items:center;padding-left:22px}.nav-content .icon{color:#8c8c8c;font-size:22px;display:contents}.nav-content .title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px}.lanes{margin-top:16px}.lane{display:flex;flex-direction:column;gap:8px}.lane > li{padding-left:4px}.activity{background:#fff;border-radius:8px;border:1px solid #d9d9d9;height:42px;display:flex;align-items:center;position:relative;padding-left:16px;cursor:pointer}.activity .icon{color:var(--running-flow-status-color);font-size:20px}.activity .title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#595959;padding:0 7px}.activity .duration{font-size:12px;color:#8c8c8c;background:#fafafa;border-radius:6px;padding:0 8px;height:100%;display:flex;align-items:center}.activity::before{content:"";position:absolute;top:50%;left:-1px;transform:translateY(-50%);width:3px;height:18px;background:var(--running-flow-status-color);border-radius:0 3px 3px 0}.activity:hover{box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08)}.activity.paused{--running-flow-status-color:#f0a22e}.activity.working{--running-flow-status-color:#4f69ff}.activity.completed{--running-flow-status-color:#08bf33}.activity.failed{--running-flow-status-color:var(--color-error)}.activity:not(.active) .icon{color:var(--running-flow-status-color)}.activity:not(.active)::before{background:var(--running-flow-status-color)}.activity.active{background:var(--running-flow-status-color);border-color:var(--running-flow-status-color)}.activity.active .icon,.activity.active .title,.activity.active .duration{color:#fff}.activity.active .duration{background:rgba(250,250,250,0.2)}.activity.active::before{display:none}',""]);const o=s.toString()},66489:(e,t,i)=>{i.d(t,{A:()=>m});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(61393),i.b),d=new URL(i(44492),i.b),p=s()(n()),h=l()(c),u=l()(d);p.push([e.id,`:host{display:block;--stage-flow-lane-width:268px}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}button{background:none;border:none;cursor:pointer;padding:0}.button:focus{outline:none}.nav,\n.lanes{display:flex;gap:40px}.nav-item,\n.nav-add,\n.lane{width:var(--stage-flow-lane-width);flex-shrink:0}.nav-item{position:relative;background-color:var(--stage-flow-nav-bg);--stage-flow-nav-bg:rgba(37,64,255,0.1)}.nav-item:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.nav-item.pending{--stage-flow-nav-bg:rgba(0,0,0,0.04)}.nav-item::after{content:"";position:absolute;top:0;right:-20px;border-color:transparent;border-style:solid;border-width:20px 0 20px 20px;border-left-color:var(--stage-flow-nav-bg)}.nav-item:not(:first-child)::before{content:"";position:absolute;top:0;left:-30px;width:30px;height:40px;background-color:var(--stage-flow-nav-bg);-webkit-clip-path:polygon(0 0,100% 0,100% 100%,0 100%,20px 50%);clip-path:polygon(0 0,100% 0,100% 100%,0 100%,20px 50%)}.nav-link,\n.btn-add-stage{width:100%;display:flex;align-items:center;justify-content:center;height:40px;font-size:16px}.nav-item.pending:first-child .input-new-stage{padding-left:20px}.nav-link{font-weight:600;color:#000}.nav-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-add-stage{font-weight:500;color:rgba(0,0,0,0.65);gap:8px;position:relative}.btn-add-stage .plus{margin-right:8px;font-size:14px}.nav-add:first-child .btn-add-stage{border-radius:20px;border:1px dashed rgba(0,0,0,0.1)}.nav-add:first-child .btn-add-stage:hover{background:rgba(0,0,0,0.04)}.nav-add:not(:first-child) .btn-add-stage::before{content:"";position:absolute;top:0;bottom:0;left:-30px;right:-20px;pointer-events:none;background:url(${h}) center center no-repeat}.nav-add:not(:first-child) .btn-add-stage:hover::before{background-image:url(${u})}.input-new-stage{width:100%;border:none;background:none;display:flex;align-items:center;height:40px;font-weight:600;font-size:16px;color:#000}.input-new-stage::placeholder{color:#8c8c8c;font-weight:400}.input-new-stage:focus{outline:none}.lanes{margin-top:16px}.lane{display:flex;flex-direction:column;gap:8px}.activity{background:#ffffff;box-shadow:0px 1px 2px 0px rgba(0,0,0,0.1);border-radius:8px;padding:12px 14px 10px}.activity .title{font-weight:600;color:#000000;line-height:20px;text-shadow:0px 1px 2px rgba(0,0,0,0.1)}:host(:not([read-only])) .activity{cursor:pointer}.assignee{display:flex;align-items:center;gap:4px;font-size:12px;color:#000000;line-height:17px;margin-top:10px}.assignee-icon{font-size:14px;color:rgba(0,0,0,0.45)}.btn-add-activity{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;height:34px;border:1px dashed rgba(0,0,0,0.1);border-radius:8px;color:rgba(0,0,0,0.45)}.btn-add-activity:hover{background:rgba(0,0,0,0.04);color:rgba(0,0,0,0.65)}.stage-settings{padding:4px;display:flex;flex-direction:column;align-items:stretch;gap:4px}.stage-settings eo-input{margin-bottom:5px}.stage-settings .divider{height:1px;background-color:rgba(0,0,0,0.1)}.stage-settings button{color:var(--color-error);border-radius:6px;padding:5px 8px;font-size:14px;line-height:22px;text-align:left}.stage-settings button:hover{background-color:var(--left-sidebar-item-hover-bg)}`,""]);const m=p.toString()},79286:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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()},81129:(e,t,i)=>{i.d(t,{A:()=>h});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(n()),p=l()(c);d.push([e.id,`:host{display:block;position:sticky;top:0}:host([hidden]){display:none}:host::before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background-color:rgb(205,206,207);background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;pointer-events:none}:host([variant="home"])::before{background-color:#f1f1f1}`,""]);const h=d.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(n()),p=l()(c);d.push([e.id,`:host{display:block;padding:24px 54px 72px}:host([sticky]){padding-top:0}: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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(n()),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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r)()(n());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 a=i(36758),n=i.n(a),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(n()),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;overflow:hidden}.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()}}]);
|
|
2
|
+
//# sourceMappingURL=7868.f4c744a7.js.map
|