@next-bricks/ai-portal 0.69.1 → 0.69.3
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 +21 -21
- package/dist/chunks/4459.dbfa8706.js +3 -0
- package/dist/chunks/{4459.0bc418fc.js.map → 4459.dbfa8706.js.map} +1 -1
- package/dist/chunks/{main.7b6a660f.js → main.f5e1e25a.js} +2 -2
- package/dist/chunks/{main.7b6a660f.js.map → main.f5e1e25a.js.map} +1 -1
- package/dist/examples.json +14 -14
- package/dist/{index.adae0454.js → index.025ef09e.js} +2 -2
- package/dist/{index.adae0454.js.map → index.025ef09e.js.map} +1 -1
- package/dist/manifest.json +150 -150
- package/dist/types.json +2469 -2469
- package/package.json +2 -2
- package/dist/chunks/4459.0bc418fc.js +0 -3
- /package/dist/chunks/{4459.0bc418fc.js.LICENSE.txt → 4459.dbfa8706.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/ai-portal",
|
|
3
3
|
"bricks": [
|
|
4
|
-
"ai-portal.chat-box",
|
|
5
4
|
"ai-portal.cruise-canvas",
|
|
6
5
|
"ai-portal.stat-with-mini-chart",
|
|
7
|
-
"ai-portal.home-container",
|
|
8
6
|
"ai-portal.elevo-sidebar",
|
|
7
|
+
"ai-portal.chat-box",
|
|
8
|
+
"ai-portal.home-container",
|
|
9
9
|
"ai-portal.icon-button",
|
|
10
10
|
"ai-portal.show-cases",
|
|
11
11
|
"ai-portal.mcp-tools",
|
|
12
12
|
"ai-portal.chat-stream",
|
|
13
13
|
"ai-portal.ai-employees",
|
|
14
14
|
"ai-portal.ai-agents",
|
|
15
|
+
"ai-portal.page-container",
|
|
15
16
|
"ai-portal.call-tool",
|
|
17
|
+
"ai-portal.tab-list",
|
|
16
18
|
"ai-portal.save-request-store",
|
|
17
19
|
"ai-portal.load-request-store",
|
|
18
20
|
"ai-portal.clear-request-store",
|
|
19
21
|
"ai-portal.set-chat-command",
|
|
20
22
|
"ai-portal.set-chat-mentioned-employee",
|
|
21
|
-
"ai-portal.page-container",
|
|
22
|
-
"ai-portal.tab-list",
|
|
23
23
|
"ai-portal.dropdown-select",
|
|
24
24
|
"ai-portal.preview-container",
|
|
25
|
+
"ai-portal.action-buttons",
|
|
25
26
|
"ai-portal.goal-card-list",
|
|
26
27
|
"ai-portal.project-conversations",
|
|
27
28
|
"ai-portal.project-knowledges",
|
|
28
|
-
"ai-portal.
|
|
29
|
+
"ai-portal.elevo-logo",
|
|
29
30
|
"ai-portal.activity-timeline",
|
|
30
31
|
"ai-portal.chat-input",
|
|
31
|
-
"ai-portal.elevo-logo",
|
|
32
32
|
"ai-portal.show-case",
|
|
33
33
|
"ai-portal.blank-state",
|
|
34
34
|
"ai-portal.sticky-container",
|
|
35
35
|
"ai-portal.elevo-card",
|
|
36
36
|
"ai-portal.flow-tabs",
|
|
37
|
-
"ai-portal.stage-flow",
|
|
38
37
|
"ai-portal.running-flow",
|
|
38
|
+
"ai-portal.stage-flow",
|
|
39
39
|
"ai-portal.notice-dropdown",
|
|
40
40
|
"ai-portal.notice-list",
|
|
41
|
-
"ai-portal.chat-panel",
|
|
42
41
|
"ai-portal.space-logo",
|
|
42
|
+
"ai-portal.chat-panel",
|
|
43
43
|
"ai-portal.chat-panel-welcome",
|
|
44
44
|
"ai-portal.space-chat-guide",
|
|
45
45
|
"ai-portal.space-workbench"
|
|
@@ -48,11 +48,6 @@
|
|
|
48
48
|
"processors": [],
|
|
49
49
|
"editors": [],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"ai-portal.chat-box": [
|
|
52
|
-
"eo-icon",
|
|
53
|
-
"eo-actions",
|
|
54
|
-
"ai-portal.icon-button"
|
|
55
|
-
],
|
|
56
51
|
"ai-portal.cruise-canvas": [
|
|
57
52
|
"eo-icon",
|
|
58
53
|
"eo-button",
|
|
@@ -83,6 +78,11 @@
|
|
|
83
78
|
"eo-mini-actions",
|
|
84
79
|
"ai-portal.icon-button"
|
|
85
80
|
],
|
|
81
|
+
"ai-portal.chat-box": [
|
|
82
|
+
"eo-icon",
|
|
83
|
+
"eo-actions",
|
|
84
|
+
"ai-portal.icon-button"
|
|
85
|
+
],
|
|
86
86
|
"ai-portal.icon-button": [
|
|
87
87
|
"eo-icon",
|
|
88
88
|
"eo-tooltip"
|
|
@@ -140,6 +140,10 @@
|
|
|
140
140
|
"eo-main-view",
|
|
141
141
|
"eo-narrow-view"
|
|
142
142
|
],
|
|
143
|
+
"ai-portal.action-buttons": [
|
|
144
|
+
"eo-icon",
|
|
145
|
+
"eo-button"
|
|
146
|
+
],
|
|
143
147
|
"ai-portal.goal-card-list": [
|
|
144
148
|
"eo-icon",
|
|
145
149
|
"eo-dropdown-actions",
|
|
@@ -158,10 +162,6 @@
|
|
|
158
162
|
"eo-easyops-avatar",
|
|
159
163
|
"eo-mini-actions"
|
|
160
164
|
],
|
|
161
|
-
"ai-portal.action-buttons": [
|
|
162
|
-
"eo-icon",
|
|
163
|
-
"eo-button"
|
|
164
|
-
],
|
|
165
165
|
"ai-portal.activity-timeline": [
|
|
166
166
|
"eo-link",
|
|
167
167
|
"eo-icon",
|
|
@@ -180,15 +180,15 @@
|
|
|
180
180
|
"eo-link",
|
|
181
181
|
"eo-icon"
|
|
182
182
|
],
|
|
183
|
+
"ai-portal.running-flow": [
|
|
184
|
+
"eo-icon"
|
|
185
|
+
],
|
|
183
186
|
"ai-portal.stage-flow": [
|
|
184
187
|
"eo-icon",
|
|
185
188
|
"eo-popover",
|
|
186
189
|
"eo-input",
|
|
187
190
|
"basic.show-dialog"
|
|
188
191
|
],
|
|
189
|
-
"ai-portal.running-flow": [
|
|
190
|
-
"eo-icon"
|
|
191
|
-
],
|
|
192
192
|
"ai-portal.notice-dropdown": [
|
|
193
193
|
"eo-popover",
|
|
194
194
|
"eo-icon",
|
|
@@ -258,5 +258,5 @@
|
|
|
258
258
|
"eo-counter-badge"
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
|
-
"filePath": "bricks/ai-portal/dist/index.
|
|
261
|
+
"filePath": "bricks/ai-portal/dist/index.025ef09e.js"
|
|
262
262
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 4459.dbfa8706.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[4459],{2608:(e,t,n)=>{n.d(t,{O:()=>i});var a=n(22919);const i=async(e,t,n)=>(await a.http.get(`api/gateway/logic.llm.aiops_service/api/v1/elevo/spaces/${e}/service-flows`,{...n,params:t})).data},3262:(e,t,n)=>{n.d(t,{z:()=>U});var a=n(18769),i=n.n(a),o=n(22919);const l=(e,t,n,a)=>o.http.put(`api/gateway/logic.llm.aiops_service/api/v1/elevo/objects/${e}/instances/${t}`,n,a);var s=n(30981),r=n(60128),c=n(63873),d=n(49325),p=n(12561),m=n(1380),u=n(62916);const f=async(e,t,n)=>(await o.http.get(`api/gateway/logic.llm.aiops_service/api/v1/elevo/spaces/${e}/activities`,{...n,params:t})).data,g=async(e,t,n)=>(await o.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/spaces/${e}/activities`,t,n)).data;var E=n(39035),b=n(30385),x=n(72591),I=n.n(x),h=n(1740),v=n.n(h),N=n(88128),S=n.n(N),T=n(30855),w=n.n(T),y=n(93051),A=n.n(y),C=n(73656),_=n.n(C),O=n(37914),D={};D.styleTagTransform=_(),D.setAttributes=w(),D.insert=S().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=A(),I()(O.A,D);const L=O.A&&O.A.locals?O.A.locals:void 0;function k(e){let{objectId:t,objectInstanceId:n,spaceId:o,onLinkConversation:l}=e;const[s,c]=(0,a.useState)([]),[p,x]=(0,a.useState)(!0),[I,h]=(0,a.useState)(0),[v,N]=(0,a.useState)(!1),[S,T]=(0,a.useState)(""),w=(0,a.useRef)(null),y=(0,a.useRef)(!1),A=(0,a.useCallback)((async()=>{x(!0);try{var e;const a=await f(o,{objectId:t,objectInstanceId:n,limit:200});c(a.list||[]),h((null===(e=a.list)||void 0===e?void 0:e.length)||0)}catch(e){(0,r.handleHttpError)(e)}finally{x(!1)}}),[o,t,n]);(0,a.useEffect)((()=>{A()}),[A]),(0,a.useEffect)((()=>{y.current&&w.current&&(w.current.scrollTop=0,y.current=!1)}),[s]);const C=(0,a.useCallback)((async()=>{if(S.trim()){N(!0),y.current=!0;try{const e=m.auth.getAuth().username||"Anonymous";await g(o,{objectId:t,objectInstanceId:n,actionType:"comment",userName:e,payload:{content:S}}),T(""),await A()}catch(e){y.current=!1,(0,r.handleHttpError)(e)}finally{N(!1)}}}),[o,t,n,S,A]),_=(0,a.useCallback)((e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),C())}),[C]);return i().createElement("div",{className:L.container},i().createElement("div",{className:L.header},i().createElement("h3",{className:L.title},(0,d.t)(d.K.ACTIVITY_RECORD)),I>0&&i().createElement("span",{className:L.countBadge},I)),p?i().createElement("div",{className:L.loadingState},(0,d.t)(d.K.LOADING)):0===s.length?i().createElement(b.p,{className:L.empty,title:(0,d.t)(d.K.NO_ACTIVITY_RECORD)}):i().createElement("div",{className:L.listContainer,ref:w},s.map((e=>{const t=(e=>"start_conversation"===e.actionType)(e),n=(e=>"start_conversation"===e.actionType?"conversation":"info")(e),{title:a,description:o,time:s}=(e=>{const{actionType:t,userName:n,payload:a}=e,i=(o=e.createTime,(0,u.P)(1e3*o,u.c.relative)||"");var o;switch(t){case"create_instance":return{title:(0,d.t)(d.K.CREATED_INSTANCE),description:`${n} ${(0,d.t)(d.K.CREATED_INSTANCE)}`,time:i};case"edit_instance":{const e=Object.keys((null==a?void 0:a.new)||{}).join(",");return{title:(0,d.t)(d.K.EDITED_INSTANCE),description:`${n} ${(0,d.t)(d.K.EDITED_INSTANCE)}${e?`-${e}`:""}`,time:i}}case"comment":return{title:(0,d.t)(d.K.COMMENTED),description:`${n} ${(0,d.t)(d.K.COMMENTED)}: ${(null==a?void 0:a.content)||""}`,time:i};case"start_conversation":return{title:(0,d.t)(d.K.STARTED_CONVERSATION),description:`${n} ${(0,d.t)(d.K.STARTED_CONVERSATION)}: ${(null==a?void 0:a.title)||""}`,time:i};case"status_change":return{title:(0,d.t)(d.K.STATUS_CHANGED),description:`${a.conversationTitle||(0,d.t)(d.K.CONVERSATION)} ${(0,d.t)(d.K.CHANGED_STATUS_TO)}${a.status||""}`,time:i};default:return{title:"",description:"",time:""}}})(e);return i().createElement("div",{key:e.activityId,className:`${L.activityCard} ${t?L.clickable:L.disabled}`,onClick:()=>t&&(e=>{"start_conversation"===e.actionType&&e.conversationId&&l({conversationId:e.conversationId})})(e)},i().createElement("div",{className:`${L.iconWrapper} ${L[n]}`},i().createElement(E.Bj,{lib:"lucide",icon:"conversation"===n?"message-square":"info",style:{fontSize:"18px"}})),i().createElement("div",{className:L.content},i().createElement("div",{className:L.titleRow},i().createElement("div",{className:L.activityTitle},a),i().createElement("div",{className:L.timeText},s)),i().createElement("div",{className:L.activityDesc,title:o},o)))}))),i().createElement("div",{className:L.footer},i().createElement(E.WM,{themeVariant:"elevo",placeholder:(0,d.t)(d.K.ADD_COMMENT_PLACEHOLDER),value:S,disabled:v,autoSize:{minRows:1,maxRows:4},onValueChange:e=>T(e.detail),onKeyDown:e=>_(e)})))}var R=n(38717),B=n(76720),j=n(7686),F={};F.styleTagTransform=_(),F.setAttributes=w(),F.insert=S().bind(null,"head"),F.domAPI=v(),F.insertStyleElement=A(),I()(j.A,F);const P=j.A&&j.A.locals?j.A.locals:void 0,V=(0,s.wrapBrick)("eo-icon"),H=(0,s.wrapBrick)("ai-portal.chat-input",{onChatSubmit:"chat.submit",onTerminate:"terminate"});function U(e){let{instance:t,businessObject:n,onClose:s,onNewConversation:m,onInstanceUpdate:u}=e;const{uploadOptions:f,spaceDetail:g}=(0,a.useContext)(p.v),[E,b]=(0,a.useState)(!1),[x,I]=(0,a.useState)(null),h=(0,a.useMemo)((()=>({setActiveFile:I})),[]),v=(0,a.useCallback)((async e=>{b(!0);try{const a=(await o.http.post("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{})).data.conversationId,i={...e.detail,agentId:"elevo-service_object_instance_manager",cmd:{type:"serviceObjectInstance-createOrEdit",payload:{spaceInstanceId:g.instanceId,serviceObjectId:n.objectId,instanceId:t.instanceId}},conversationId:a};m(i)}catch(e){(0,r.handleHttpError)(e)}finally{b(!1)}}),[n.objectId,t.instanceId,m,g.instanceId]),N=(0,a.useCallback)((async(e,a)=>{try{await l(n.objectId,t.instanceId,{data:{[e]:a}});const i={...t,[e]:a};null==u||u(i)}catch(e){(0,r.handleHttpError)(e)}}),[n.objectId,t,u]),S=(0,a.useCallback)((e=>{I(e)}),[]);return i().createElement(B.j.Provider,{value:h},i().createElement("div",{className:P.instanceDetailContainer},i().createElement("div",{className:P.instanceDetailHeader},i().createElement("h2",{className:P.instanceDetailTitle},n.objectName),i().createElement("button",{className:P.closeButton,onClick:s},i().createElement(V,{lib:"lucide",icon:"x"}))),i().createElement("div",{className:P.instanceDetailBody},i().createElement("div",{className:P.instanceDetailLeft},i().createElement("div",{className:P.instanceDetailLeftWrapper},i().createElement("div",{className:P.instanceDetailContent},i().createElement(c.x,{instance:t,attrs:n.attributes||[],onAttrChange:N,onFileClick:S})),i().createElement("div",{className:P.instanceDetailFooter},i().createElement(H,{placeholder:(0,d.t)(d.K.INSTANCE_DETAIL_CHAT_PLACEHOLDER),uploadOptions:f,submitDisabled:E,onChatSubmit:v})))),i().createElement("div",{className:P.instanceDetailRight},i().createElement(k,{objectId:n.objectId,objectInstanceId:t.instanceId,spaceId:g.instanceId,onLinkConversation:m}))),x&&i().createElement(R.d,{file:x})))}},7370:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".configListArea--cBQRLBI0{flex:0 0 260px;display:flex;flex-direction:column;background:rgba(184,187,205,0.15);box-shadow:1px 0 0 0 rgba(0,0,0,0.1);overflow:hidden}.configListTabs--r_ahrPl7{display:flex;padding:4px;background:rgba(0,0,0,0.02);border-radius:20px;margin:12px;gap:4px}.configListTab--hjD1AsUa{flex:1;padding:6px 12px;font-size:13px;color:rgba(0,0,0,0.65);background:transparent;border:none;border-radius:16px;cursor:pointer;transition:all 0.2s;font-weight:400;white-space:nowrap}.configListTab--hjD1AsUa:hover{color:#1d2129}.configListTab--hjD1AsUa.active--nMH4WLqM{background:#fff;color:#2540ff;font-weight:500;box-shadow:0 1px 2px rgba(0,0,0,0.08)}.cardList--T9oth7lT{flex:1;overflow-y:auto;padding:0 12px 12px;display:flex;flex-direction:column;gap:8px}.cardItem--zz0EMkNV{padding:12px;background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:8px;cursor:pointer;transition:all 0.2s}.cardItem--zz0EMkNV:hover{border-color:#a1b5ff;box-shadow:0 2px 6px rgba(37,64,255,0.1)}.cardItem--zz0EMkNV.active--nMH4WLqM{border-color:#2540ff;background:rgba(37,64,255,0.02)}.cardItemName--wsNGYzF9{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;color:rgba(0,0,0,0.85);margin-bottom:4px}.cardItemDesc--T678qa1w{font-size:12px;color:rgba(0,0,0,0.45);line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.configPreviewArea--JSSCXMJ_{flex:1;min-width:0;background:rgba(184,187,205,0.15);overflow:hidden;display:flex;flex-direction:column}",""]),l.locals={configListArea:"configListArea--cBQRLBI0",configListTabs:"configListTabs--r_ahrPl7",configListTab:"configListTab--hjD1AsUa",active:"active--nMH4WLqM",cardList:"cardList--T9oth7lT",cardItem:"cardItem--zz0EMkNV",cardItemName:"cardItemName--wsNGYzF9",cardItemDesc:"cardItemDesc--T678qa1w",configPreviewArea:"configPreviewArea--JSSCXMJ_"};const s=l},7686:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".instanceDetailContainer--glV_Uq7z{display:flex;flex-direction:column;height:100%;width:100%;background-color:#fff;border-radius:16px}.instanceDetailHeader--VksGr0PJ{display:flex;justify-content:space-between;align-items:center;padding:9px 16px;flex-shrink:0;border-bottom:1px solid #dadadd}.instanceDetailTitle--zbguNp_x{margin:0;font-size:16px;font-weight:500;color:rgba(0,0,0,0.65)}.closeButton--ph07Px8Y{display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:16px;border:none;background:transparent;cursor:pointer;border-radius:4px;color:#595959;transition:all 0.2s}.closeButton--ph07Px8Y:hover{color:rgba(0,0,0,0.85)}.instanceDetailBody--uFNFAgDa{display:flex;flex:1;overflow:hidden;min-height:0}.instanceDetailLeft--WpEgagvw{flex:0 0 70%;display:flex;flex-direction:column;overflow:hidden;min-height:0;background:rgba(184,187,205,0.15);border-bottom-left-radius:16px}.instanceDetailLeftWrapper--Y_sMuFsp{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0;margin:30px;border-radius:12px;background:#fff;border:1px solid rgba(0,0,0,0.15)}.instanceDetailContent--yVsVpGkI{flex:1;overflow-y:auto;min-height:0}.fieldsView--z5eHFdgV{flex:1;overflow-y:auto;min-height:0}.instanceDetailFooter--vmLjbYYy{flex-shrink:0;padding:12px;border-top:1px solid #dadadd;display:flex;align-items:flex-end}.instanceDetailFooter--vmLjbYYy > *{width:100%}.instanceDetailRight--JnQ3yRUs{flex:0 0 30%;overflow:hidden;display:flex;flex-direction:column;border-left:1px solid #dadadd}",""]),l.locals={instanceDetailContainer:"instanceDetailContainer--glV_Uq7z",instanceDetailHeader:"instanceDetailHeader--VksGr0PJ",instanceDetailTitle:"instanceDetailTitle--zbguNp_x",closeButton:"closeButton--ph07Px8Y",instanceDetailBody:"instanceDetailBody--uFNFAgDa",instanceDetailLeft:"instanceDetailLeft--WpEgagvw",instanceDetailLeftWrapper:"instanceDetailLeftWrapper--Y_sMuFsp",instanceDetailContent:"instanceDetailContent--yVsVpGkI",fieldsView:"fieldsView--z5eHFdgV",instanceDetailFooter:"instanceDetailFooter--vmLjbYYy",instanceDetailRight:"instanceDetailRight--JnQ3yRUs"};const s=l},9322:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".content--OPWgCa1W{display:flex;flex-direction:column;gap:28px;padding:24px}.section--UC5jTEp5{display:flex;flex-direction:column;gap:12px}.sectionTitle--wDWNfvWy{font-size:16px;font-weight:600;color:rgba(0,0,0,0.85);line-height:24px}.descriptionContent--Z424tU5l{font-size:14px;color:rgba(0,0,0,0.85);line-height:24px;padding:12px;border:1px dashed rgba(0,0,0,0.15);border-radius:8px}.select--WRTs5uAH{width:100%}.hitlRuleItem--iIE0sfBi{padding:12px;background-color:#fffbe6;border-radius:8px;font-size:14px;font-weight:500;color:#d48806;line-height:24px}.emptyDescription--ZPVpkQJk{font-size:14px;color:rgba(0,0,0,0.5);line-height:24px;text-align:center}.readOnlyDisplay--GZwrrrx7{display:flex;align-items:center;gap:8px;padding:8px 4px}.readOnlyIcon--ZsfgXuYV{font-size:28px;color:#1890ff}.readOnlyText--E5bEKxnw{font-size:14px;color:rgba(0,0,0,0.65);line-height:22px}",""]),l.locals={content:"content--OPWgCa1W",section:"section--UC5jTEp5",sectionTitle:"sectionTitle--wDWNfvWy",descriptionContent:"descriptionContent--Z424tU5l",select:"select--WRTs5uAH",hitlRuleItem:"hitlRuleItem--iIE0sfBi",emptyDescription:"emptyDescription--ZPVpkQJk",readOnlyDisplay:"readOnlyDisplay--GZwrrrx7",readOnlyIcon:"readOnlyIcon--ZsfgXuYV",readOnlyText:"readOnlyText--E5bEKxnw"};const s=l},9385:(e,t,n)=>{n.d(t,{X:()=>z});var a=n(18769),i=n.n(a),o=n(53373),l=n.n(o),s=n(72591),r=n.n(s),c=n(1740),d=n.n(c),p=n(88128),m=n.n(p),u=n(30855),f=n.n(u),g=n(93051),E=n.n(g),b=n(73656),x=n.n(b),I=n(66676),h={};h.styleTagTransform=x(),h.setAttributes=f(),h.insert=m().bind(null,"head"),h.domAPI=d(),h.insertStyleElement=E(),r()(I.A,h);const v=I.A&&I.A.locals?I.A.locals:void 0;function N(e){let{title:t,description:n,assignee:a,active:o=!1,onClick:s}=e;return i().createElement("div",{className:l()(v.activityCard,{[v.activityCardActive]:o}),onClick:s},i().createElement("div",{className:v.activityContent},i().createElement("div",{className:l()(v.activityName,{[v.activityNameActive]:o}),title:t},t),i().createElement("div",{className:v.activityDescription,title:n},n)),a&&i().createElement("div",{className:v.activityAssignee},a))}var S=n(30672),T=n(96465),w={};w.styleTagTransform=x(),w.setAttributes=f(),w.insert=m().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=E(),r()(T.A,w);const y=T.A&&T.A.locals?T.A.locals:void 0;var A=n(30981),C=n(60128),_=n(8798),O=n(9322),D={};D.styleTagTransform=x(),D.setAttributes=f(),D.insert=m().bind(null,"head"),D.domAPI=d(),D.insertStyleElement=E(),r()(O.A,D);const L=O.A&&O.A.locals?O.A.locals:void 0;var k=n(49325);const R=(0,A.wrapBrick)("eo-modal",{onClose:"close",onConfirm:"confirm",onCancel:"cancel",onOpen:"open"}),B=(0,A.wrapBrick)("eo-user-or-user-group-select",{onValueChange:"change"}),j=(0,A.wrapBrick)("eo-select",{onValueChange:"change"}),F=(0,A.wrapBrick)("eo-markdown-display"),P=(0,A.wrapBrick)("eo-icon"),V=(0,A.wrapBrick)("eo-easyops-avatar");function H(e){var t,n;let{activity:o,visible:l,onClose:s,onChange:r,onlyRead:c=!1}=e;const[d,p]=(0,a.useState)([]),[m,u]=(0,a.useState)(o),f=(0,a.useMemo)((()=>{var e;if(null==m||!m.aiEmployeeId)return"";const t=d.find((e=>e.employeeId===m.aiEmployeeId));return null!==(e=null==t?void 0:t.name)&&void 0!==e?e:""}),[null==m?void 0:m.aiEmployeeId,d]);return(0,a.useEffect)((()=>{l&&(async()=>{try{const e=(await(0,_.v)({page:1,page_size:100})).list.filter((e=>e.employeeId));p(e)}catch(e){(0,C.handleHttpError)(e)}})()}),[l]),(0,a.useEffect)((()=>{u(o)}),[o]),m?i().createElement(R,{modalTitle:m.name,width:700,visible:l,onCancel:s,onClose:s,noFooter:!0,maskClosable:!0},i().createElement("div",{className:L.content},i().createElement("div",{className:L.section},i().createElement("div",{className:L.sectionTitle},(0,k.t)(k.K.ACTIVITY_DESCRIPTION)),i().createElement("div",{className:L.descriptionContent},m.description?i().createElement(F,{content:m.description}):i().createElement("div",{className:L.emptyDescription},(0,k.t)(k.K.NO_DESCRIPTION)))),i().createElement("div",{className:L.section},i().createElement("div",{className:L.sectionTitle},(0,k.t)(k.K.RESPONSIBLE_AI_EMPLOYEE)),c?i().createElement("div",{className:L.readOnlyDisplay},i().createElement(P,{lib:"easyops",category:"image",icon:"employee-avatar-3-png",className:L.readOnlyIcon}),i().createElement("span",{className:L.readOnlyText},f||(0,k.t)(k.K.NOT_SET))):i().createElement(j,{value:m.aiEmployeeId,themeVariant:"elevo",options:null!==(t=null==d?void 0:d.map((e=>({label:e.name,value:e.employeeId}))))&&void 0!==t?t:[],placeholder:(0,k.t)(k.K.SELECT_AI_EMPLOYEE_PLACEHOLDER),onValueChange:e=>{const t=e.detail.value,n={...m,aiEmployeeId:t};u(n),null==r||r(n)},className:L.select})),m.hilRules&&i().createElement("div",{className:L.section},i().createElement("div",{className:L.sectionTitle},(0,k.t)(k.K.HITL_RULES)),i().createElement("div",{className:L.hitlRuleItem},m.hilRules)),i().createElement("div",{className:L.section},i().createElement("div",{className:L.sectionTitle},(0,k.t)(k.K.HITL_INTERVENTION_USER)),c?i().createElement("div",{className:L.readOnlyDisplay},m.hilUser?i().createElement(V,{nameOrInstanceId:m.hilUser,showName:!0,size:"xs"}):i().createElement("span",{className:L.readOnlyText},(0,k.t)(k.K.NOT_SET))):i().createElement(B,{value:[null!==(n=m.hilUser)&&void 0!==n?n:""],placeholder:(0,k.t)(k.K.SELECT_HITL_USER_PLACEHOLDER),optionsMode:"user",userKey:"name",isMultiple:!1,themeVariant:"elevo",onValueChange:e=>{const t=e.detail[0],n={...m,hilUser:t};u(n),null==r||r(n)}})))):null}var U=n(41643);const G=(0,A.wrapBrick)("eo-markdown-display");function z(e){var t;let{data:n,viewType:o="visual",activityOnlyRead:l}=e;const[s,r]=(0,a.useState)(null),{modifyActivity:c}=(0,a.useContext)(U.Q),d=(0,a.useRef)();return n?"json"===o?i().createElement("div",{className:y.jsonView},i().createElement("pre",null,JSON.stringify(n,null,2))):i().createElement(i().Fragment,null,i().createElement("div",{className:y.businessFlowPreview},i().createElement("div",{className:y.flowHeader},i().createElement("div",{className:y.flowTitleArea},i().createElement("div",{className:y.flowTitle},n.name),i().createElement("div",{className:y.flowDescription},n.description))),n.prerequisite&&i().createElement("div",{className:y.flowSection},i().createElement("div",{className:y.sectionTitle},i().createElement(S.Bj,{lib:"antd",icon:"filter",className:y.prerequisitesIcon}),i().createElement("span",null,(0,k.t)(k.K.PREREQUISITES))),i().createElement("div",{className:y.prerequisitesSubtitle},(0,k.t)(k.K.PREREQUISITES_SUBTITLE)),i().createElement("div",{className:y.prerequisitesList},i().createElement(G,{content:n.prerequisite}))),!(null===(t=n.spec)||void 0===t||!t.length)&&i().createElement("div",{className:y.flowSection},i().createElement("div",{className:y.stagesContainer},n.spec.map(((e,t)=>{var a;return i().createElement("div",{key:t,className:y.stageColumn},i().createElement("div",{className:y.stageIndicator},i().createElement("div",{className:y.stageIndicatorNumber},t+1),i().createElement("div",{className:y.stageIndicatorName},e.name),t<n.spec.length-1&&i().createElement("div",{className:y.stageIndicatorLine})),i().createElement("div",{className:y.stageActivities},null===(a=e.serviceFlowActivities)||void 0===a?void 0:a.map(((t,n)=>i().createElement(N,{key:n,title:t.name,description:t.description,assignee:t.aiEmployeeId,onClick:()=>((e,t)=>{d.current=t,r(e)})(t,e.name)})))))}))))),i().createElement(H,{onlyRead:l,activity:s,visible:!!s,onClose:()=>{r(null)},onChange:e=>null==c?void 0:c(d.current,e)})):null}},12561:(e,t,n)=>{n.d(t,{v:()=>a});const a=(0,n(18769).createContext)({})},13262:(e,t,n)=>{n.d(t,{u:()=>B});var a=n(18769),i=n.n(a),o=n(18796),l=n(72591),s=n.n(l),r=n(1740),c=n.n(r),d=n(88128),p=n.n(d),m=n(30855),u=n.n(m),f=n(93051),g=n.n(f),E=n(73656),b=n.n(E),x=n(55111),I={};I.styleTagTransform=b(),I.setAttributes=u(),I.insert=p().bind(null,"head"),I.domAPI=c(),I.insertStyleElement=g(),s()(x.A,I);const h=x.A&&x.A.locals?x.A.locals:void 0;var v=n(67101),N=n(13330),S=n(52208),T=n(40563),w=n(30621),y=n(30925),A=n(9442),C=n(69493),_=n(40177),O=n(30672),D=n(76720),L=n(51069),k=n(38717),R=n(6671);const B=(0,a.forwardRef)((function(e,t){let{conversationId:n,initialRequest:l,placeholder:s,uploadOptions:r,help:c,fromModal:d,submitDisabled:p,onChatSubmit:m,onData:u}=e;const f=(0,a.useRef)(null),[g,E]=(0,a.useState)(null),[b,x]=(0,a.useState)(null),{conversation:I,tasks:B,errors:j,humanInputRef:F}=(0,v.u)(n,l,void 0,void 0,u),P=!!I,V=null==I?void 0:I.state,H=_.QB.includes(V),U=null==I?void 0:I.finished,G=(null==I?void 0:I.finished)&&"resume"!==I.mode&&!_.Z5.includes(V),z=!n||H||"input-required"===V,{messages:M,jobMap:K}=(0,N.p)(P,V,B,j,{showHumanActions:!0,skipActivitySubTasks:!0}),W=(0,a.useCallback)(((e,t,n)=>{var a;null===(a=F.current)||void 0===a||a.call(F,e,t,n)}),[F]),[Y,q]=(0,a.useState)(!1);(0,a.useEffect)((()=>{let e=!1;return Promise.race([(0,S.L)("light-plus"),new Promise((e=>setTimeout(e,5e3)))]).finally((()=>{e||q(!0)})),()=>{e=!0}}),[]);const J=(0,a.useRef)(null),Q=(0,a.useRef)(null),{scrollable:X,scrollToBottom:Z,toggleAutoScroll:$}=(0,T.i)(P&&Y,J,Q),ee=(0,a.useCallback)((async e=>{if(n){const{content:t,...n}=e;W(t,void 0,n)}else m(e)}),[n,W,m]),te=(0,a.useMemo)((()=>({conversationState:V,finished:U,earlyFinished:G,tasks:B,jobMap:K,errors:j,setActiveFile:E,setActiveImages:x,humanInput:W})),[V,W,K,B,j,U,G]);(0,a.useImperativeHandle)(t,(()=>({setInputValue:e=>{var t;null===(t=f.current)||void 0===t||t.setValue(e)},focus:()=>{var e;null===(e=f.current)||void 0===e||e.focus()},showFile:e=>{E(e)}})),[]);const ne=(0,a.useMemo)((()=>({lastDetail:null,planMap:null,toggleAutoScroll:$,setUserClosedAside:()=>{}})),[$]);return i().createElement(i().Fragment,null,i().createElement(D.j.Provider,{value:te},i().createElement(L.W.Provider,{value:ne},i().createElement("div",{className:h.panel},n?P&&Y?i().createElement("div",{className:h.main},i().createElement("div",{className:h.chat,ref:J},i().createElement("div",{className:h.narrow},i().createElement("div",{className:h.messages,ref:Q},M.map(((e,t,n)=>i().createElement("div",{className:h.message,key:t},"user"===e.role?i().createElement(w.R,{content:e.content,files:e.files}):i().createElement(y.G,{chunks:e.chunks,scopeState:I.state,isLatest:t===n.length-1&&!G,finished:I.finished})))),G&&i().createElement("div",{className:h.message},i().createElement(y.G,{earlyFinished:!0}))))),i().createElement("button",{className:`${A.A["scroll-down"]} ${C.A["floating-button"]}`,style:{bottom:"30px"},hidden:!X,onClick:Z},i().createElement(O.Bj,{lib:"antd",icon:"down"}))):i().createElement("div",{className:h["loading-icon"]},i().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})):i().createElement("div",{className:h.main},i().createElement("div",{className:h.chat},i().createElement("div",{className:h.narrow},c?i().createElement(o.ReactUseMultipleBricks,{useBrick:c.useBrick}):null))),i().createElement("div",{className:h.narrow},i().createElement(O.IV,{ref:f,placeholder:s,suggestionsPlacement:"top",submitDisabled:p||!z,supportsTerminate:!0,uploadOptions:r,onChatSubmit:e=>ee(e.detail)}))),g&&i().createElement(k.d,{file:g,fromModal:d}),b&&i().createElement(R.f,{images:b,fromModal:d}))))}))},19212:(e,t,n)=>{n.d(t,{A:()=>b});var a=n(72591),i=n.n(a),o=n(1740),l=n.n(o),s=n(88128),r=n.n(s),c=n(30855),d=n.n(c),p=n(93051),m=n.n(p),u=n(73656),f=n.n(u),g=n(95850),E={};E.styleTagTransform=f(),E.setAttributes=d(),E.insert=r().bind(null,"head"),E.domAPI=l(),E.insertStyleElement=m(),i()(g.A,E);const b=g.A&&g.A.locals?g.A.locals:void 0},20026:(e,t,n)=>{n.d(t,{h:()=>y});var a=n(18769),i=n.n(a),o=n(30981),l=n(30385),s=n(9385),r=n(72591),c=n.n(r),d=n(1740),p=n.n(d),m=n(88128),u=n.n(m),f=n(30855),g=n.n(f),E=n(93051),b=n.n(E),x=n(73656),I=n.n(x),h=n(82587),v={};v.styleTagTransform=I(),v.setAttributes=g(),v.insert=u().bind(null,"head"),v.domAPI=p(),v.insertStyleElement=b(),c()(h.A,v);const N=h.A&&h.A.locals?h.A.locals:void 0;var S=n(49325);const T=(0,o.wrapBrick)("eo-icon"),w=(0,o.wrapBrick)("eo-modal",{onClose:"close",onConfirm:"confirm",onCancel:"cancel",onOpen:"open"});function y(e){const{businessFlows:t=[],onFlowClick:n}=e,[o,r]=(0,a.useState)(null),[c,d]=(0,a.useState)(!1),p=()=>{d(!1),r(null)};return i().createElement("div",{className:N.serviceFlows},i().createElement("div",{className:N.header},i().createElement("div",{className:N.titleContainer},i().createElement("h3",{className:N.title},(0,S.t)(S.K.FLOW_SIDEBAR_TITLE)),i().createElement("p",{className:N.subtitle},(0,S.t)(S.K.FLOW_SIDEBAR_SUBTITLE)))),null!=t&&t.length?i().createElement("div",{className:N.flowList},t.map((e=>i().createElement("div",{key:e.instanceId,className:N.flowCard,onClick:()=>(e=>{null==n||n(e)})(e)},i().createElement("div",{className:N.cardHeader},i().createElement("span",{className:N.flowName},e.name),i().createElement("button",{className:N.detailButton,onClick:t=>((e,t)=>{t.stopPropagation(),r(e),d(!0)})(e,t),title:(0,S.t)(S.K.NO_DESCRIPTION)},i().createElement(T,{lib:"antd",icon:"eye",theme:"outlined"}))),i().createElement("p",{className:N.flowDescription,title:e.description},e.description),e.spec&&e.spec.length>0&&i().createElement("div",{className:N.stageProgress},e.spec.map(((e,t)=>i().createElement("div",{key:t,className:N.progressBar,title:e.name})))))))):i().createElement(l.p,{title:(0,S.t)(S.K.NO_SERVICE_FLOWS)}),i().createElement(w,{modalTitle:null==o?void 0:o.name,width:700,visible:c,onCancel:p,onClose:p,noFooter:!0,maskClosable:!0},i().createElement(s.X,{activityOnlyRead:!0,data:null!=o?o:void 0,viewType:"visual"})))}},24357:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.spaceSidebar--Qf51HGPz{display:flex;flex-direction:column;flex:0 0 320px;height:100%;min-height:0;background:rgba(248,250,252,0.5);border-right:1px solid #fff;border-radius:16px;overflow:hidden}.tabList--o5YhR52t{display:grid;grid-template-columns:1fr 1fr;padding:4px;margin:12px 16px 0;background:rgba(0,0,0,0.04);border-radius:20px;gap:0;height:40px;flex-shrink:0}.tabButton--oxOcKWEf{height:30px;border:none;background:transparent;border-radius:16px;font-size:14px;font-weight:400;color:rgba(0,0,0,0.65);cursor:pointer;transition:all 0.2s ease;padding:5px 9px;font-family:"PingFang SC",sans-serif}.tabButton--oxOcKWEf.active--S7LRZpni{background:#fff;color:#2540ff;font-weight:500;box-shadow:0px 2px 3px 0px rgba(0,0,0,0.08)}.tabButton--oxOcKWEf:hover:not(.active--S7LRZpni){color:rgba(0,0,0,0.85)}.sidebarContent--ZDMbDjAV{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:10px}.businessObjectList--dclDhq4t{display:flex;flex-direction:column;gap:10px;height:100%;min-height:0}.objectGroup--hAy6zNQc{display:flex;flex-direction:column;padding-bottom:1px;flex-shrink:0;transition:flex 0.2s ease}.objectGroup--hAy6zNQc.expanded--X3nyCtbS{flex:1;min-height:0}.objectHeader--uz8e0r3k{display:flex;align-items:center;justify-content:space-between;height:28px;padding:5px 12px;border-radius:8px;cursor:pointer;transition:background-color 0.2s ease}.objectHeader--uz8e0r3k:hover{background-color:rgba(0,0,0,0.04)}.objectHeader--uz8e0r3k:hover .addIcon--Bgq17yLF{display:inline-block}.objectName--rorssrQO{font-size:12px;font-weight:400;color:rgba(0,0,0,0.65);font-family:"PingFang SC",sans-serif;line-height:14px}.objectHeaderActions--ZHF3Pgj4{display:inline-flex;gap:8px}.addIcon--Bgq17yLF{display:none}.expandIcon--l14w8nMn,\n.addIcon--Bgq17yLF{font-size:16px;color:rgba(0,0,0,0.45);transition:transform 0.2s ease}.expandIcon--l14w8nMn:hover,.addIcon--Bgq17yLF:hover{color:#2540ff}.objectGroup--hAy6zNQc.expanded--X3nyCtbS .expandIcon--l14w8nMn{transform:rotate(0deg)}.objectGroup--hAy6zNQc:not(.expanded--X3nyCtbS) .expandIcon--l14w8nMn{transform:rotate(-90deg)}.instanceList--KYKhU86j{display:flex;flex-direction:column;padding:8px 8px;gap:8px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.instanceCard--lq1neePr{display:flex;flex-direction:column;gap:10px;padding:12px;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;transition:all 0.2s ease;width:100%;height:70px;-webkit-user-select:none;user-select:none}.instanceCard--lq1neePr:hover{border-color:#a1b5ff;box-shadow:0px 2px 4px rgba(37,64,255,0.1)}.instanceCard--lq1neePr.active--S7LRZpni{border-color:#a1b5ff;box-shadow:0px 2px 4px rgba(37,64,255,0.2)}.instanceHeader--FtMXJSoE{display:flex;align-items:center;justify-content:space-between;gap:11px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.instanceName--oymTy9t_{flex:1;font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);font-family:"PingFang SC",sans-serif;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.instanceTime--yrpEWb2A{font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);line-height:14.286px;letter-spacing:0.1172px;white-space:nowrap;flex-shrink:0}.instanceStatus--OULXzKfn{display:flex;align-items:center;width:100%}.statusTag--pLbk_t5R{display:inline-flex;align-items:center;justify-content:center;height:18.281px;padding:2px 8px;background:rgba(37,64,255,0.05);border-radius:33554400px;font-size:10px;font-weight:500;color:#1e30cc;font-family:"PingFang SC",sans-serif;line-height:14px;letter-spacing:0.1172px;box-shadow:inset 0px 0px 0px 1px rgba(37,64,255,0.2)}.knowledgeList--REBBSycS{padding:20px 0}.emptyState--pNehIzG5{text-align:center;font-size:14px;color:rgba(0,0,0,0.45);padding:20px}.loadingContainer--L97L8IBe{display:flex;align-items:center;justify-content:center;gap:8px;padding:20px;color:rgba(0,0,0,0.45)}.loadingIcon--yalSuncE{font-size:16px;animation:spin--mXbX9faI 1s linear infinite}@keyframes spin--mXbX9faI{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.loadingText--aBetQoy1{font-size:14px;font-family:"PingFang SC",sans-serif}.errorContainer--OC0vGsb1{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px;cursor:pointer;transition:background-color 0.2s ease;border-radius:8px}.errorContainer--OC0vGsb1:hover{background-color:rgba(0,0,0,0.02)}.errorText--p_LnOj3L{font-size:14px;color:rgba(0,0,0,0.65);font-family:"PingFang SC",sans-serif}.retryText--UGXineMl{font-size:12px;color:#2540ff;font-family:"PingFang SC",sans-serif}@keyframes fadeIn--RpaeLkxV{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.tabContent--Xua0CHmU{height:100%;display:none}.tabContentActive--v9ocoLtZ{display:block;animation:fadeIn--RpaeLkxV 0.3s ease-in-out}',""]),l.locals={spaceSidebar:"spaceSidebar--Qf51HGPz",tabList:"tabList--o5YhR52t",tabButton:"tabButton--oxOcKWEf",active:"active--S7LRZpni",sidebarContent:"sidebarContent--ZDMbDjAV",businessObjectList:"businessObjectList--dclDhq4t",objectGroup:"objectGroup--hAy6zNQc",expanded:"expanded--X3nyCtbS",objectHeader:"objectHeader--uz8e0r3k",addIcon:"addIcon--Bgq17yLF",objectName:"objectName--rorssrQO",objectHeaderActions:"objectHeaderActions--ZHF3Pgj4",expandIcon:"expandIcon--l14w8nMn",instanceList:"instanceList--KYKhU86j",instanceCard:"instanceCard--lq1neePr",instanceHeader:"instanceHeader--FtMXJSoE",instanceName:"instanceName--oymTy9t_",instanceTime:"instanceTime--yrpEWb2A",instanceStatus:"instanceStatus--OULXzKfn",statusTag:"statusTag--pLbk_t5R",knowledgeList:"knowledgeList--REBBSycS",emptyState:"emptyState--pNehIzG5",loadingContainer:"loadingContainer--L97L8IBe",loadingIcon:"loadingIcon--yalSuncE",spin:"spin--mXbX9faI",loadingText:"loadingText--aBetQoy1",errorContainer:"errorContainer--OC0vGsb1",errorText:"errorText--p_LnOj3L",retryText:"retryText--UGXineMl",tabContent:"tabContent--Xua0CHmU",tabContentActive:"tabContentActive--v9ocoLtZ",fadeIn:"fadeIn--RpaeLkxV"};const s=l},25366:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.drawer--Qk6EoNTj .ant-drawer-body{padding:0;display:flex;flex-direction:column}.historyList--JUm6bl7Q{flex:1;overflow-y:auto;overflow-x:hidden}.historyItem--VGQliAcy{display:flex;flex-direction:column;gap:8px;padding:12px 16px;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;transition:all 0.2s ease;margin-bottom:8px}.historyItem--VGQliAcy:hover{border-color:#a1b5ff;box-shadow:0px 2px 4px rgba(37,64,255,0.1)}.historyItemHeader--x8w4xVU5{display:flex;align-items:center;justify-content:space-between;gap:8px}.historyItemTitle--owmB_DVt{flex:1;font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);font-family:"PingFang SC",sans-serif;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.historyItemPreview--D63i9Vni{margin:0;font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);font-family:"PingFang SC",sans-serif;line-height:18px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.historyItemFooter--B3kUXkuf{display:flex;align-items:center;gap:4px;margin-top:4px}.timeIcon--nG5_Rlu7{font-size:12px;color:rgba(0,0,0,0.45)}.historyItemTime--ZJ5LMXy0{font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);font-family:"Inter","Noto Sans JP","Noto Sans SC",sans-serif;line-height:15px}.loadMoreContainer--rzLIS8T1{display:flex;justify-content:center;padding:16px 0}.emptyState--DU6M3grO{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;color:rgba(0,0,0,0.45)}.emptyStateIcon--MxOYYUGV{font-size:48px;margin-bottom:16px;opacity:0.3}.emptyStateText--wumb7hGu{font-size:14px;font-family:"PingFang SC",sans-serif}',""]),l.locals={drawer:"drawer--Qk6EoNTj",historyList:"historyList--JUm6bl7Q",historyItem:"historyItem--VGQliAcy",historyItemHeader:"historyItemHeader--x8w4xVU5",historyItemTitle:"historyItemTitle--owmB_DVt",historyItemPreview:"historyItemPreview--D63i9Vni",historyItemFooter:"historyItemFooter--B3kUXkuf",timeIcon:"timeIcon--nG5_Rlu7",historyItemTime:"historyItemTime--ZJ5LMXy0",loadMoreContainer:"loadMoreContainer--rzLIS8T1",emptyState:"emptyState--DU6M3grO",emptyStateIcon:"emptyStateIcon--MxOYYUGV",emptyStateText:"emptyStateText--wumb7hGu"};const s=l},29042:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.knowledgesList--G3vEjNyL{display:flex;flex-direction:column;gap:8px;padding:4px 16px 0}.knowledgeCard--SewzgT45{display:flex;gap:12px;align-items:center;padding:12px 16px;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;transition:all 0.2s ease;width:100%}.knowledgeCard--SewzgT45:hover{border-color:#a1b5ff;box-shadow:0px 2px 4px rgba(37,64,255,0.1)}.fileIcon--AP9bfHxK{width:26px;height:32px;flex-shrink:0}.knowledgeInfo--RyILtgzJ{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.knowledgeName--MnKpkb6p{font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);font-family:"PingFang SC",sans-serif;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.knowledgeMeta--tGibX0r9{font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);font-family:"PingFang SC",sans-serif;line-height:16px}.loadingContainer--GXqWxmxZ{display:flex;align-items:center;justify-content:center;gap:8px;padding:40px 20px;color:rgba(0,0,0,0.45)}.loadingIcon--hdLHbm9J{font-size:16px;animation:spin--PtvQPLuM 1s linear infinite}@keyframes spin--PtvQPLuM{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.loadingText--JPUJyzvY{font-size:14px;font-family:"PingFang SC",sans-serif}.emptyState--jyRqW4K8{display:flex;align-items:center;justify-content:center;padding:40px 20px;font-size:14px;color:rgba(0,0,0,0.45);font-family:"PingFang SC",sans-serif}.addKnowledgeButton--I5Yzetyu{display:block;margin:0 10px}.addKnowledgeButton--I5Yzetyu::part(button){width:100%;margin-bottom:5px;background-color:transparent}',""]),l.locals={knowledgesList:"knowledgesList--G3vEjNyL",knowledgeCard:"knowledgeCard--SewzgT45",fileIcon:"fileIcon--AP9bfHxK",knowledgeInfo:"knowledgeInfo--RyILtgzJ",knowledgeName:"knowledgeName--MnKpkb6p",knowledgeMeta:"knowledgeMeta--tGibX0r9",loadingContainer:"loadingContainer--GXqWxmxZ",loadingIcon:"loadingIcon--hdLHbm9J",spin:"spin--PtvQPLuM",loadingText:"loadingText--JPUJyzvY",emptyState:"emptyState--jyRqW4K8",addKnowledgeButton:"addKnowledgeButton--I5Yzetyu"};const s=l},30385:(e,t,n)=>{n.d(t,{p:()=>T});var a=n(18769),i=n.n(a),o=n(72591),l=n.n(o),s=n(1740),r=n.n(s),c=n(88128),d=n.n(c),p=n(30855),m=n.n(p),u=n(93051),f=n.n(u),g=n(73656),E=n.n(g),b=n(59189),x={};x.styleTagTransform=E(),x.setAttributes=m(),x.insert=d().bind(null,"head"),x.domAPI=r(),x.insertStyleElement=f(),l()(b.A,x);const I=b.A&&b.A.locals?b.A.locals:void 0;var h=n(89575);const v=e=>a.createElement("svg",(0,h.A)({xmlns:"http://www.w3.org/2000/svg",width:51,height:50,fill:"none",viewBox:"0 0 51 50"},e),a.createElement("path",{fill:"#000",fillOpacity:.25,d:"m27.219 9.02 13.779 8.087a4.4 4.4 0 0 1 2.16 3.805l-.02 16.13a4.4 4.4 0 0 1-2.166 3.798l-13.766 8.04a4.25 4.25 0 0 1-4.298-.006L9.132 40.788a4.4 4.4 0 0 1-2.155-3.793L6.951 20.9a4.4 4.4 0 0 1 2.164-3.809l13.802-8.074a4.25 4.25 0 0 1 4.301.004m-3.444 1.518-13.8 8.072a2.64 2.64 0 0 0-1.298 2.285l.02 16.098c0 .94.496 1.807 1.294 2.276l13.776 8.086c.796.469 1.784.47 2.58.002l13.766-8.038a2.64 2.64 0 0 0 1.299-2.28l.02-16.13c0-.942-.493-1.81-1.294-2.283L26.356 10.54a2.55 2.55 0 0 0-2.58 0zM14.22 22.162a.856.856 0 0 1 1.15-.412l9.666 4.9 9.51-4.814a.85.85 0 0 1 1.069.28l.08.136a.885.885 0 0 1-.407 1.169l-9.39 4.751.019 10.449c0 .43-.304.79-.707.865l-.155.014a.87.87 0 0 1-.862-.876l-.018-10.448-9.551-4.845a.88.88 0 0 1-.459-1.02zm.236-18.15.123.098 2.753 2.552c.35.332.37.881.047 1.238a.85.85 0 0 1-1.097.134l-.122-.096-2.754-2.552a.886.886 0 0 1-.046-1.24.85.85 0 0 1 1.096-.134m22.293.135a.886.886 0 0 1-.046 1.24l-2.754 2.55a.853.853 0 0 1-1.218-.037.886.886 0 0 1 .046-1.238l2.754-2.552a.853.853 0 0 1 1.218.037M25.039.333c.422 0 .775.31.848.719l.014.158v3.945a.87.87 0 0 1-.862.88.87.87 0 0 1-.849-.721l-.014-.159V1.21a.87.87 0 0 1 .863-.877"}));var N=n(53373),S=n.n(N);function T(e){let{icon:t,title:n,description:a,className:o}=e;return i().createElement("div",{className:S()(I.emptyState,o)},t||i().createElement(v,{className:I.emptyStateIcon}),i().createElement("div",{className:I.emptyStateTitle},n),a&&i().createElement("div",{className:I.emptyStateDescription},a))}},31028:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".businessObjectPreview--LAPk0Y9B{background:#fff;border-radius:12px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}.objectHeader--NM6O6kt3{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.objectTitleArea--P3CiAz5R{display:flex;flex-direction:column;gap:4px}.objectTitle--RZsDy1mo{display:flex;align-items:center;gap:8px}.objectName--RLJVqunK{font-size:18px;font-weight:600;color:#1d2129}.objectNameEn--jyKDahH4{font-size:14px;color:rgba(0,0,0,0.45)}.objectDescription--NHhabBrz{font-size:13px;color:rgba(0,0,0,0.45)}.objectBadge--Rh4DV5J4{padding:4px 12px;font-size:12px;font-weight:500;color:#2540ff;background:rgba(37,64,255,0.08);border:1px solid rgba(37,64,255,0.2);border-radius:16px;white-space:nowrap}.objectSection--j5d1ncqN{margin-bottom:24px}.objectSection--j5d1ncqN:last-child{margin-bottom:0}.sectionTitle--AcHZ8EcX{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:500;color:#1d2129;margin-bottom:12px}.sectionIcon--JWh7zrUU{width:16px;height:16px;color:rgba(0,0,0,0.45)}.fieldGrid--kxszRZcD{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.fieldItem--CD2Xs9gj{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#f7f8fa;border-radius:8px}.fieldName--VmUsryx0{font-size:13px;font-weight:500;color:rgba(0,0,0,0.85)}.fieldType--dGVcWG8d{padding:2px 8px;font-size:11px;color:rgba(0,0,0,0.45);background:#fff;border-radius:4px}.linkIcon--kQjV3X_i{width:14px;height:14px;margin-left:6px;color:rgba(0,0,0,0.45);vertical-align:middle}.relationType--eeBsNBCg{padding:2px 8px;font-size:11px;color:#2540ff;background:rgba(37,64,255,0.08);border:1px solid rgba(37,64,255,0.2);border-radius:4px}.lifecycleContainer--UrOYnN33{padding:20px;background:#f7f8fa;border-radius:8px}.lifecycleStates--uWKrwvav{display:flex;align-items:center;gap:0;flex-wrap:wrap}.lifecycleState--ddOVvbrh{display:flex;align-items:center;padding:10px 20px;background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:8px;font-size:13px;color:#1d2129;white-space:nowrap}.lifecycleArrow--BsE3oEG7{display:flex;align-items:center;padding:0 8px;color:rgba(0,0,0,0.25)}.lifecycleArrowIcon--vZw0ZGA9{width:16px;height:16px}",""]),l.locals={businessObjectPreview:"businessObjectPreview--LAPk0Y9B",objectHeader:"objectHeader--NM6O6kt3",objectTitleArea:"objectTitleArea--P3CiAz5R",objectTitle:"objectTitle--RZsDy1mo",objectName:"objectName--RLJVqunK",objectNameEn:"objectNameEn--jyKDahH4",objectDescription:"objectDescription--NHhabBrz",objectBadge:"objectBadge--Rh4DV5J4",objectSection:"objectSection--j5d1ncqN",sectionTitle:"sectionTitle--AcHZ8EcX",sectionIcon:"sectionIcon--JWh7zrUU",fieldGrid:"fieldGrid--kxszRZcD",fieldItem:"fieldItem--CD2Xs9gj",fieldName:"fieldName--VmUsryx0",fieldType:"fieldType--dGVcWG8d",linkIcon:"linkIcon--kQjV3X_i",relationType:"relationType--eeBsNBCg",lifecycleContainer:"lifecycleContainer--UrOYnN33",lifecycleStates:"lifecycleStates--uWKrwvav",lifecycleState:"lifecycleState--ddOVvbrh",lifecycleArrow:"lifecycleArrow--BsE3oEG7",lifecycleArrowIcon:"lifecycleArrowIcon--vZw0ZGA9"};const s=l},33475:(e,t,n)=>{n.d(t,{F:()=>te});var a=n(18769),i=n.n(a),o=n(53373),l=n.n(o),s=n(30981),r=n(21302),c=n.n(r),d=n(22919);const p=async(e,t,n)=>(await d.http.get(`api/gateway/logic.llm.aiops_service/api/v1/elevo/workspaces/${e}/service-objects`,{...n,params:t})).data;var m=n(62916),u=n(72591),f=n.n(u),g=n(1740),E=n.n(g),b=n(88128),x=n.n(b),I=n(30855),h=n.n(I),v=n(93051),N=n.n(v),S=n(73656),T=n.n(S),w=n(24357),y={};y.styleTagTransform=T(),y.setAttributes=h(),y.insert=x().bind(null,"head"),y.domAPI=E(),y.insertStyleElement=N(),f()(w.A,y);const A=w.A&&w.A.locals?w.A.locals:void 0;var C=n(49325),_=n(12561),O=n(29042),D={};D.styleTagTransform=T(),D.setAttributes=h(),D.insert=x().bind(null,"head"),D.domAPI=E(),D.insertStyleElement=N(),f()(O.A,D);const L=O.A&&O.A.locals?O.A.locals:void 0;var k=n(30385),R=n(60136);const B=(0,s.wrapBrick)("eo-icon"),j=(0,s.wrapBrick)("eo-button");function F(e){const{knowledges:t,onKnowledgeClick:n,onAddKnowledge:a}=e;return t?i().createElement(i().Fragment,null,i().createElement(j,{className:L.addKnowledgeButton,type:"dashed",onClick:()=>{null==a||a()},icon:{lib:"lucide",icon:"plus"}},(0,C.t)(C.K.ADD_KNOWLEDGE)),t.length?i().createElement("div",{className:L.knowledgesList},t.map((e=>{const[t,a]=(0,R.NL)(void 0,e.name);return i().createElement("div",{key:e.instanceId,className:L.knowledgeCard,onClick:()=>(e=>{null==n||n(e)})(e)},i().createElement("img",{src:a,alt:t,className:L.fileIcon}),i().createElement("div",{className:L.knowledgeInfo},i().createElement("div",{className:L.knowledgeName},e.name),i().createElement("div",{className:L.knowledgeMeta},c()(e.mtime||e.ctime).format("YYYY-MM-DD"))))}))):i().createElement(k.p,{title:(0,C.t)(C.K.NO_KNOWLEDGE)})):i().createElement("div",{className:L.loadingContainer},i().createElement(B,{lib:"antd",icon:"loading",theme:"outlined",className:L.loadingIcon}),i().createElement("span",{className:L.loadingText},(0,C.t)(C.K.LOADING)))}var P=n(60128);const V=async(e,t,n)=>(await d.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/objects/${e}/instances/import`,t,n)).data;var H=n(13262),U=n(65966),G={};G.styleTagTransform=T(),G.setAttributes=h(),G.insert=x().bind(null,"head"),G.domAPI=E(),G.insertStyleElement=N(),f()(U.A,G);const z=U.A&&U.A.locals?U.A.locals:void 0,M=(0,s.wrapBrick)("eo-icon");function K(e){let{instances:t,businessObject:n,selectedInstanceId:a,onSelect:o,onDelete:l}=e;return 0===t.length?i().createElement(k.p,{title:(0,C.t)(C.K.NO_INSTANCES_IDENTIFIED),description:(0,C.t)(C.K.NO_INSTANCES_IDENTIFIED_DESCRIPTION)}):i().createElement("div",{className:z.instanceList},t.map((e=>i().createElement(W,{key:e._id_,instance:e,businessObject:n,isSelected:a===e._id_,onSelect:()=>o(e._id_),onDelete:()=>l(e._id_)}))))}function W(e){var t,n;let{instance:a,businessObject:o,isSelected:l,onSelect:s,onDelete:r}=e;const c=null===(t=o.attributes)||void 0===t?void 0:t[0],d=c?a[c.id]:a._id_,p=null===(n=o.attributes)||void 0===n?void 0:n.find((e=>"status"===e.id)),m=p?a[p.id]:null;return i().createElement("div",{className:`${z.instanceCard} ${l?z.selected:""}`,onClick:s},i().createElement("div",{className:z.cardHeader},i().createElement("span",{className:z.cardTitle},d),i().createElement("div",{className:z.cardActions},i().createElement("button",{className:z.deleteButton,onClick:e=>{e.stopPropagation(),r()},title:(0,C.t)(C.K.DELETE_INSTANCE)},i().createElement(M,{lib:"antd",icon:"delete",theme:"outlined"})))),m&&i().createElement("div",{className:z.cardStatus},i().createElement("span",{className:z.statusTag},m)))}var Y=n(48572),q={};q.styleTagTransform=T(),q.setAttributes=h(),q.insert=x().bind(null,"head"),q.domAPI=E(),q.insertStyleElement=N(),f()(Y.A,q);const J=Y.A&&Y.A.locals?Y.A.locals:void 0;var Q=n(63873);function X(e){return e._id_?e._id_:e.instanceId?e.instanceId:`temp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}const Z=(0,s.wrapBrick)("eo-modal",{onClose:"close",onConfirm:"confirm",onCancel:"cancel",onOpen:"open"});function $(e){let{visible:t,spaceDetail:n,businessObject:o,onSuccess:l,onCancel:s}=e;const[r,c]=(0,a.useState)(!1),[p,m]=(0,a.useState)(!1),[u,f]=(0,a.useState)(null),[g,E]=(0,a.useState)(null),[b,x]=(0,a.useState)(null),[I,h]=(0,a.useState)(null),{uploadOptions:v}=(0,a.useContext)(_.v),N=(null==I?void 0:I.imports)||[];(0,a.useEffect)((()=>{t&&(E(null),f(null),h(null),m(!1))}),[t]);const S=()=>{null==s||s()},T=(0,a.useCallback)((async e=>{c(!0);try{const t=(await d.http.post("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{})).data.conversationId;f(t),x({...e,agentId:"elevo-service_object_instance_schema",cmd:{type:"serviceObjectInstance-createOrEdit",payload:{spaceInstanceId:n.instanceId,serviceObjectId:o.objectId}},conversationId:t})}catch(e){(0,P.handleHttpError)(e)}finally{c(!1)}}),[n.instanceId,o.objectId]),w=(0,a.useCallback)((e=>{var t,n,a;const i=null==e||null===(t=e.tasks)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.jobs)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.messages)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.parts)||void 0===t?void 0:t[0];if("data"===(null==i?void 0:i.type)&&"easy_cmd_business_instance"===(null===(n=i.data)||void 0===n?void 0:n.type)&&null!==(a=i.data)&&void 0!==a&&a.content){const e=i.data.content;let t;try{t=JSON.parse(e)}catch(e){return void console.error(e)}h((e=>function(e,t){var n,a,i;if(!e)return{...t,imports:null===(i=t.imports)||void 0===i?void 0:i.map((e=>({...e,_id_:X(e)})))};const o=new Set(t.deletes||[]),l=new Map;null===(n=e.imports)||void 0===n||n.forEach((e=>{e._id_&&!o.has(e.instanceId||"")&&l.set(e._id_,e)})),null===(a=t.imports)||void 0===a||a.forEach((e=>{const t=X(e),n={...e,_id_:t};if(e.instanceId){const a=Array.from(l.entries()).find((t=>{let[n,a]=t;return a.instanceId===e.instanceId}));a?l.set(a[0],{...n,_id_:a[0]}):l.set(t,n)}else l.set(t,n)}));const s=new Set([...e.deletes||[],...t.deletes||[]]);return{objectId:t.objectId||e.objectId,imports:Array.from(l.values()),deletes:Array.from(s)}}(e,t)))}}),[]),y=(0,a.useCallback)((e=>{h((t=>null!=t&&t.imports?{...t,imports:t.imports.filter((t=>t._id_!==e))}:t)),E((t=>t===e?null:t))}),[]),A=(0,a.useCallback)((e=>{E(e)}),[]),O=N.find((e=>e._id_===g)),D=(0,a.useCallback)(((e,t)=>{g&&h((n=>null!=n&&n.imports?{...n,imports:n.imports.map((n=>n._id_===g?{...n,[e]:t}:n))}:n))}),[g]);return i().createElement(Z,{themeVariant:"elevo",headerBordered:!0,modalTitle:(0,C.t)(C.K.ADD_INSTANCE_MODAL_TITLE,{objectName:o.objectName}),width:"90%",visible:t,onCancel:S,onClose:S,closeWhenConfirm:!1,onConfirm:async()=>{if(0!==N.length){m(!0);try{var e;const t=null==I||null===(e=I.imports)||void 0===e?void 0:e.map((e=>{const{_id_:t,...n}=e;return n}));await V(o.objectId,{imports:t,deletes:null==I?void 0:I.deletes}),null==l||l()}catch(e){(0,P.handleHttpError)(e)}finally{m(!1)}}},maskClosable:!1,confirmText:(0,C.t)(C.K.CONFIRM_CREATE),cancelText:(0,C.t)(C.K.CANCEL),confirmDisabled:0===N.length||p},i().createElement("div",{className:J.modalContent},i().createElement("div",{className:J.aiAssistantArea},i().createElement(H.u,{uploadOptions:v,submitDisabled:r,onChatSubmit:T,conversationId:u,initialRequest:b,onData:w,placeholder:(0,C.t)(C.K.ADD_INSTANCE_ASSISTANT_PLACEHOLDER),help:{useBrick:{brick:"ai-portal.chat-panel-welcome",properties:{text:(0,C.t)(C.K.ADD_INSTANCE_ASSISTANT_WELCOME)}}}})),i().createElement("div",{className:J.instanceListArea},i().createElement("div",{className:J.instanceListHeader},i().createElement("span",{className:J.headerTitle},(0,C.t)(C.K.IDENTIFIED_INSTANCES)),i().createElement("div",{className:J.instanceCount},N.length)),i().createElement(K,{instances:N,businessObject:o,selectedInstanceId:g,onSelect:A,onDelete:y})),i().createElement("div",{className:J.detailArea},i().createElement(Q.U,{instance:O,attrs:o.attributes||[],title:(0,C.t)(C.K.INSTANCE_DETAIL),onAttrChange:D}))))}const ee=(0,s.wrapBrick)("eo-icon");function te(e){const{knowledgeList:t,onInstanceClick:n,onKnowledgeClick:o,onKnowledgeAdd:s,instanceUpdateTrigger:r}=e,[c,d]=(0,a.useState)("business"),p=e=>{d(e)};return i().createElement("div",{className:A.spaceSidebar},i().createElement("div",{className:A.tabList},i().createElement("button",{className:l()(A.tabButton,{[A.active]:"business"===c}),onClick:()=>p("business")},(0,C.t)(C.K.BUSINESS_OBJECTS)),i().createElement("button",{className:l()(A.tabButton,{[A.active]:"knowledge"===c}),onClick:()=>p("knowledge")},(0,C.t)(C.K.KNOWLEDGE))),i().createElement("div",{className:A.sidebarContent},i().createElement("div",{className:l()(A.tabContent,{[A.tabContentActive]:"business"===c})},i().createElement(ae,{onInstanceClick:n,instanceUpdateTrigger:r})),i().createElement("div",{className:l()(A.tabContent,{[A.tabContentActive]:"knowledge"===c})},i().createElement(F,{knowledges:t,onKnowledgeClick:o,onAddKnowledge:s}))))}const ne=(0,a.forwardRef)((function(e,t){let{businessObject:n,activeInstanceId:o,isExpanded:l,onToggleExpand:s,onInstanceClick:r,onAddClick:p,getShowAttrIds:u}=e;const[f,g]=(0,a.useState)(!1),[E,b]=(0,a.useState)(!1),[x,I]=(0,a.useState)([]),h=(0,a.useCallback)((async()=>{g(!0),b(!1);try{const e=(await(async e=>(await d.http.get(`api/gateway/logic.llm.aiops_service/api/v1/elevo/objects/${e}/instances`,{params:{page:1,pageSize:3e3}})).data)(n.objectId)).list;I(e)}catch(e){console.error("Failed to load instances:",e),b(!0)}finally{g(!1)}}),[n.objectId]);return(0,a.useImperativeHandle)(t,(()=>({refresh:h,updateInstance:(e,t)=>{I((n=>n.map((n=>n.instanceId===e?{...n,...t}:n))))}})),[h]),(0,a.useEffect)((()=>{l&&(x.length>0||h())}),[l,x.length,h]),i().createElement("div",{className:`${A.objectGroup} ${l?A.expanded:""}`},i().createElement("div",{className:A.objectHeader,onClick:()=>{s(n.objectId)}},i().createElement("span",{className:A.objectName},n.objectName),i().createElement("div",{className:A.objectHeaderActions},i().createElement(ee,{lib:"lucide",icon:"plus",className:A.addIcon,onClick:e=>{e.stopPropagation(),p(e,n.objectId)}}),i().createElement(ee,{lib:"lucide",icon:l?"chevron-down":"chevron-right",className:A.expandIcon}))),l&&i().createElement("div",{className:A.instanceList},f?i().createElement("div",{className:A.loadingContainer},i().createElement(ee,{lib:"antd",icon:"loading",theme:"outlined",className:A.loadingIcon}),i().createElement("span",{className:A.loadingText},(0,C.t)(C.K.LOADING))):E?i().createElement("div",{className:A.errorContainer,onClick:()=>{b(!1),h()}},i().createElement("span",{className:A.errorText},(0,C.t)(C.K.LOAD_FAILED)),i().createElement("span",{className:A.retryText},(0,C.t)(C.K.CLICK_TO_RETRY))):0===x.length?i().createElement("div",{className:A.emptyState},(0,C.t)(C.K.NO_INSTANCES)):x.map((e=>{var t,a;return i().createElement("div",{key:e.instanceId,className:`${A.instanceCard} ${o===e.instanceId?A.active:""}`,onClick:()=>(e=>{r(e,n)})(e)},i().createElement("div",{className:A.instanceHeader},i().createElement("span",{className:A.instanceName},null==e?void 0:e[null===(t=u(n.objectId))||void 0===t?void 0:t[0]]),i().createElement("span",{className:A.instanceTime},(0,m.P)(c()(e.ctime||e.mtime,"YYYY-MM-DD HH:mm:ss").valueOf(),m.c.relative))),(null===(a=u(n.objectId))||void 0===a?void 0:a[1])&&i().createElement("div",{className:A.instanceStatus},i().createElement("span",{className:A.statusTag},null==e?void 0:e[u(n.objectId)[1]])))}))))}));function ae(e){let{onInstanceClick:t,instanceUpdateTrigger:n}=e;const{spaceDetail:o}=(0,a.useContext)(_.v),[l,s]=(0,a.useState)([]),[r,c]=(0,a.useState)(!0),[d,m]=(0,a.useState)(null),[u,f]=(0,a.useState)(!1),[g,E]=(0,a.useState)(null),[b,x]=(0,a.useState)(null),I=(0,a.useRef)({}),h=(0,a.useCallback)(((e,n)=>{m(e.instanceId),null==t||t(e,n)}),[t]);(0,a.useEffect)((()=>{(async()=>{c(!0);try{const e=await p(o.instanceId,{includeDetails:!0});s(e.list),e.list&&e.list.length>0&&x(e.list[0].objectId||null)}catch(e){(0,P.handleHttpError)(e)}finally{c(!1)}})()}),[o.instanceId]);const v=(0,a.useCallback)((e=>{var t;const n=null===(t=l.find((t=>t.objectId===e)))||void 0===t?void 0:t.attributes;var a;return null!=n&&n.length?[n[0].id,null===(a=n.find((e=>"status"===e.id)))||void 0===a?void 0:a.id].filter(Boolean):[]}),[l]),N=(0,a.useCallback)(((e,t)=>{e.stopPropagation();const n=l.find((e=>e.objectId===t));n&&(E(n),f(!0))}),[l]),S=(0,a.useCallback)((()=>{var e;f(!1),g&&(null===(e=I.current[g.objectId])||void 0===e||e.refresh())}),[g]),T=(0,a.useCallback)((e=>{x((t=>t===e?null:e))}),[]);return(0,a.useEffect)((()=>{var e;if(!n)return;const{objectId:t,instanceId:a,updatedData:i}=n;null===(e=I.current[t])||void 0===e||e.updateInstance(a,i)}),[n]),r?i().createElement("div",{className:A.knowledgeList},i().createElement("div",{className:A.loadingContainer},i().createElement(ee,{lib:"antd",icon:"loading",theme:"outlined",className:A.loadingIcon}),i().createElement("span",{className:A.loadingText},(0,C.t)(C.K.LOADING)))):null!=l&&l.length?i().createElement(i().Fragment,null,i().createElement("div",{className:A.businessObjectList},l.map((e=>i().createElement(ne,{key:e.objectId,ref:t=>I.current[e.objectId]=t,businessObject:e,activeInstanceId:d,isExpanded:b===e.objectId,onToggleExpand:T,onInstanceClick:h,onAddClick:N,getShowAttrIds:v})))),g&&i().createElement($,{visible:u,spaceDetail:o,businessObject:g,onSuccess:S,onCancel:()=>{f(!1),E(null)}})):i().createElement(k.p,{title:(0,C.t)(C.K.NO_BUSINESS_OBJECTS)})}},33885:(e,t,n)=>{n.d(t,{E:()=>i});var a=n(22919);const i=async(e,t)=>(await a.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data},37914:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".container--_XAk9tox{display:flex;flex-direction:column;height:100%;padding:20px 24px 0}.header--bUDpPFJV{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.title--bqZw5mM0{margin:0;font-size:14px;font-weight:500;color:rgba(0,0,0,0.85)}.countBadge--_goWr0PL{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;background:rgba(0,0,0,0.04);border:1px solid rgba(0,0,0,0.15);border-radius:20px;font-size:10px;font-weight:500;color:rgba(0,0,0,0.45);line-height:14px}.listContainer--ItR1OH5U{flex:1;overflow-y:auto;margin-bottom:13px}.activityCard--dXzHU6n7{display:flex;gap:6px;align-items:center;padding:13px;margin-bottom:8px;border:1px solid rgba(0,0,0,0.1);border-radius:8px;min-height:70px;cursor:default}.activityCard--dXzHU6n7.clickable--UF4BKvhH{background:white;cursor:pointer;transition:all 0.2s}.activityCard--dXzHU6n7.clickable--UF4BKvhH:hover{box-shadow:0 2px 8px rgba(0,0,0,0.08)}.activityCard--dXzHU6n7.disabled--GXec_wcg{background:#fafafa;cursor:not-allowed}.iconWrapper--KprtgQe5{flex-shrink:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:8px}.iconWrapper--KprtgQe5.info--AqBwms_7{background:rgba(0,0,0,0.04)}.iconWrapper--KprtgQe5.conversation--wSUOmX1I{background:rgba(37,64,255,0.06)}.content--w4zmkz1Y{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.titleRow--JcAdyhON{display:flex;justify-content:space-between;align-items:center;gap:8px}.activityTitle--mw4GqHVz{font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.timeText--dO8PiouH{flex-shrink:0;font-size:12px;color:rgba(0,0,0,0.45);line-height:16px}.activityDesc--Yx_FJsWI{font-size:12px;color:rgba(0,0,0,0.45);line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer--DLjXXAjr{flex-shrink:0;border-top:1px solid #e2e8f0;padding:13px 0;margin:0 -24px;padding-left:24px;padding-right:24px}.loadingState--I56ZwUkL{flex:1;display:flex;align-items:center;justify-content:center;color:rgba(0,0,0,0.45);font-size:14px}.empty--EJ53z2xk{flex:1}",""]),l.locals={container:"container--_XAk9tox",header:"header--bUDpPFJV",title:"title--bqZw5mM0",countBadge:"countBadge--_goWr0PL",listContainer:"listContainer--ItR1OH5U",activityCard:"activityCard--dXzHU6n7",clickable:"clickable--UF4BKvhH",disabled:"disabled--GXec_wcg",iconWrapper:"iconWrapper--KprtgQe5",info:"info--AqBwms_7",conversation:"conversation--wSUOmX1I",content:"content--w4zmkz1Y",titleRow:"titleRow--JcAdyhON",activityTitle:"activityTitle--mw4GqHVz",timeText:"timeText--dO8PiouH",activityDesc:"activityDesc--Yx_FJsWI",footer:"footer--DLjXXAjr",loadingState:"loadingState--I56ZwUkL",empty:"empty--EJ53z2xk"};const s=l},39035:(e,t,n)=>{n.d(t,{Bj:()=>i,EM:()=>o,WM:()=>c,qr:()=>r,s8:()=>s,xb:()=>l});var a=n(30981);const i=(0,a.wrapBrick)("eo-icon"),o=((0,a.wrapBrick)("eo-button"),(0,a.wrapBrick)("eo-link")),l=(0,a.wrapBrick)("eo-drawer",{onClose:"close",onOpen:"open"}),s=((0,a.wrapBrick)("ai-portal.icon-button"),(0,a.wrapBrick)("eo-tag")),r=(0,a.wrapBrick)("eo-input",{onValueChange:"change"}),c=(0,a.wrapBrick)("eo-textarea",{onValueChange:"change"})},39152:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.instanceCardWrapper--YChTeaOL{display:flex;justify-content:center;align-items:flex-start;min-height:100%}.instanceCard--yimi55PI{width:100%;max-width:800px;background:#ffffff;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,0.1)}.instanceCardTitle--nVx1BQrD{margin:0;padding:20px 24px;font-size:20px;font-weight:600;color:#0f172b;border-bottom:1px solid #e5e6eb}.fieldsViewContainer--PWVmcDKi{padding:24px}.fieldsViewList--woJ19V1a{display:grid;grid-template-columns:repeat(1,1fr);gap:24px 32px}@media (min-width: 768px){.fieldsViewList--woJ19V1a{grid-template-columns:repeat(2,1fr)}}@media (min-width: 1200px){.fieldsViewList--woJ19V1a{grid-template-columns:repeat(3,1fr)}}.fieldsViewItem--BRU5ZIbs{display:flex;flex-direction:column;gap:8px;min-width:0}.fieldsViewLabelRow--dIoC1XV2{display:flex;align-items:center;gap:6px}.fieldsViewLabel--vMxg5D0I{color:rgba(0,0,0,0.65);font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0.5px}.fieldsViewValue--rYHGRpv3{color:#1d2129;font-size:14px;min-height:32px;display:flex;align-items:center;min-width:0}.editButton--YivrmJbF{background:none;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:#86909c;transition:all 0.2s ease;flex-shrink:0;width:20px;height:20px;font-size:14px}.editButton--YivrmJbF:hover{background-color:#f2f3f5;color:#165dff}.editButton--YivrmJbF:active{background-color:#e5e6eb}.fieldTextValue--db3F5bRL{flex:1;color:#1d2129;font-size:14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.fieldTextValue--db3F5bRL:empty::before{content:"-";color:#c9cdd4}.fieldsViewItem--BRU5ZIbs.fullWidth--MqVqSrjc{grid-column:1/-1}.fieldsViewSection--I79QVQn7{margin-top:32px}.fieldsViewSectionHeader--gDcXAeu5{display:flex;align-items:center;gap:6px;margin-bottom:12px;color:#1d2129;font-weight:600;font-size:14px}.fieldsViewSectionIcon--IQluLpxP{font-size:16px}.fieldsViewFileList--oaUvHg2x{display:flex;flex-wrap:wrap;gap:16px}.fieldsViewFileItem--ypHwKR58{display:flex;align-items:center;gap:12px;padding:12px 16px;background-color:#f7f8fa;border-radius:8px;border:1px solid rgba(0,0,0,0.1);cursor:pointer;transition:background-color 0.2s;width:280px}.fieldsViewFileItem--ypHwKR58:hover{background-color:#ebedf0}.fieldsViewFileIcon--SAXAmkN_{width:26px;height:32px;flex-shrink:0}.fieldsViewFileContent--mrryMS8h{display:flex;flex-direction:column;flex:1;min-width:0}.fieldsViewFileName--LCQ6a28z{color:#1d2129;font-size:14px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fieldsViewFileSize--DDada8cS{color:#86909c;font-size:12px;line-height:20px}.fieldsViewTextContent--P0uLMG_g{padding:16px;background:#f7f8fa;border-radius:4px;color:#1d2129;white-space:pre-wrap;word-break:break-word;font-size:14px}.emptyState--mBKl5jcR{margin-top:62px}.inputWrapper--gZ6qx476{width:100%}.inputWrapper--gZ6qx476 eo-input{width:100%}',""]),l.locals={instanceCardWrapper:"instanceCardWrapper--YChTeaOL",instanceCard:"instanceCard--yimi55PI",instanceCardTitle:"instanceCardTitle--nVx1BQrD",fieldsViewContainer:"fieldsViewContainer--PWVmcDKi",fieldsViewList:"fieldsViewList--woJ19V1a",fieldsViewItem:"fieldsViewItem--BRU5ZIbs",fieldsViewLabelRow:"fieldsViewLabelRow--dIoC1XV2",fieldsViewLabel:"fieldsViewLabel--vMxg5D0I",fieldsViewValue:"fieldsViewValue--rYHGRpv3",editButton:"editButton--YivrmJbF",fieldTextValue:"fieldTextValue--db3F5bRL",fullWidth:"fullWidth--MqVqSrjc",fieldsViewSection:"fieldsViewSection--I79QVQn7",fieldsViewSectionHeader:"fieldsViewSectionHeader--gDcXAeu5",fieldsViewSectionIcon:"fieldsViewSectionIcon--IQluLpxP",fieldsViewFileList:"fieldsViewFileList--oaUvHg2x",fieldsViewFileItem:"fieldsViewFileItem--ypHwKR58",fieldsViewFileIcon:"fieldsViewFileIcon--SAXAmkN_",fieldsViewFileContent:"fieldsViewFileContent--mrryMS8h",fieldsViewFileName:"fieldsViewFileName--LCQ6a28z",fieldsViewFileSize:"fieldsViewFileSize--DDada8cS",fieldsViewTextContent:"fieldsViewTextContent--P0uLMG_g",emptyState:"emptyState--mBKl5jcR",inputWrapper:"inputWrapper--gZ6qx476"};const s=l},41643:(e,t,n)=>{n.d(t,{Q:()=>a});const a=(0,n(18769).createContext)({})},42724:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".spaceWorkbenchHeader--NoSj8NLX{display:flex;align-items:center;justify-content:space-between;padding:12px 24px}.headerLeft--jWRjKNkz{display:flex;align-items:center;gap:12px;flex:1}.spaceIcon--_VeACn9l{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;background:#2540ff;box-shadow:0px 4px 4px 0px rgba(37,64,255,0.1);overflow:hidden;flex-shrink:0}.spaceIcon--_VeACn9l img{width:28px;height:28px;object-fit:cover}.spaceTitle--PPb6FXpz{margin:0;font-size:18px;font-weight:600;color:rgba(0,0,0,0.85);line-height:28px}.actionIcons--W4anjF4d{display:flex;align-items:center;gap:4px;margin-left:16px}.headerRight--PLLN5SYh{display:flex;align-items:center;gap:16px;position:relative}.divider--gSRDBGxh{width:1px;height:20px;background-color:rgba(0,0,0,0.15)}.iconButton--YlNsq3b3{display:flex;align-items:center;justify-content:center;font-size:18px;width:28px;height:28px;padding:0;border:none;border-radius:8px;background:none;cursor:pointer;color:inherit;flex-shrink:0;transition:background-color 0.2s ease}.iconButton--YlNsq3b3 eo-icon{font-size:16px;color:rgba(0,0,0,0.65);transition:color 0.2s ease}.iconButton--YlNsq3b3:hover{background:rgba(0,0,0,0.04)}.iconButton--YlNsq3b3:active{background:rgba(0,0,0,0.08)}.iconButton--YlNsq3b3:focus{outline:none}.iconButton--YlNsq3b3.active--rgCeXqMc{background:rgba(0,0,0,0.06)}.spaceDescription--ePhG2k53{background-color:rgba(184,187,205,0.2);border-radius:12px;display:flex;flex-direction:column;overflow:hidden;position:relative;max-height:0;opacity:0;margin:0 24px;padding:0 20px;gap:0;transform:translateY(-10px);transition:all 0.3s cubic-bezier(0.645,0.045,0.355,1)}.spaceDescriptionVisible--fnigGZCE{max-height:500px;opacity:1;margin:4px 24px 12px;padding:18px 20px;gap:11px;transform:translateY(0)}.descriptionHeader--j55xW95U{display:flex;align-items:center;justify-content:space-between}.descriptionTitle--oMCY5toR{font-size:14px;font-weight:500;line-height:15px;color:rgba(0,0,0,0.85);text-transform:uppercase;letter-spacing:0.6172px;margin:0}.descriptionEditButton--FTpj2u4B{display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:none;cursor:pointer;color:rgba(0,0,0,0.45);transition:all 0.2s ease;flex-shrink:0}.descriptionEditButton--FTpj2u4B eo-icon{font-size:14px;color:rgba(0,0,0,0.45);transition:color 0.2s ease}.descriptionEditButton--FTpj2u4B:hover{background:rgba(0,0,0,0.06)}.descriptionEditButton--FTpj2u4B:hover eo-icon{color:rgba(0,0,0,0.65)}.descriptionEditButton--FTpj2u4B:active{background:rgba(0,0,0,0.1)}.descriptionEditButton--FTpj2u4B:focus{outline:none}.descriptionContent--vNS05IGL{font-size:14px;font-weight:400;line-height:22.75px;color:rgba(0,0,0,0.45);margin:0}",""]),l.locals={spaceWorkbenchHeader:"spaceWorkbenchHeader--NoSj8NLX",headerLeft:"headerLeft--jWRjKNkz",spaceIcon:"spaceIcon--_VeACn9l",spaceTitle:"spaceTitle--PPb6FXpz",actionIcons:"actionIcons--W4anjF4d",headerRight:"headerRight--PLLN5SYh",divider:"divider--gSRDBGxh",iconButton:"iconButton--YlNsq3b3",active:"active--rgCeXqMc",spaceDescription:"spaceDescription--ePhG2k53",spaceDescriptionVisible:"spaceDescriptionVisible--fnigGZCE",descriptionHeader:"descriptionHeader--j55xW95U",descriptionTitle:"descriptionTitle--oMCY5toR",descriptionEditButton:"descriptionEditButton--FTpj2u4B",descriptionContent:"descriptionContent--vNS05IGL"};const s=l},48572:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".modalContent--dIoSJqb4{display:flex;height:calc(100vh - 200px);min-height:500px;max-height:700px;margin:-16px -20px;gap:0;overflow:hidden;border-bottom:1px solid rgba(0,0,0,0.06)}.aiAssistantArea--OO7TCUd8{flex:20;display:flex;flex-direction:column;border-right:1px solid rgba(0,0,0,0.1);padding:24px;background:white}.instanceListArea--ERaNqEwo{flex:14;display:flex;flex-direction:column;border-right:1px solid rgba(0,0,0,0.1);padding:24px 16px;background:rgba(184,187,205,0.15);overflow:hidden}.instanceListHeader--weSif_tm{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding:0 8px}.headerTitle--PWYXcuqF{font-size:14px;color:rgba(0,0,0,0.65);font-weight:400}.instanceCount--Php1Fz0f{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:2px 8px;background:rgba(0,0,0,0.04);border:1px solid rgba(0,0,0,0.15);border-radius:20px;font-size:10px;color:rgba(0,0,0,0.45);font-weight:500}.detailArea--Gbs1dNyR{flex:66;display:flex;padding:24px 16px;flex-direction:column;background:rgba(184,187,205,0.15);overflow-y:auto}.emptyDetail--HUuVAPkU{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.emptyIcon--tnLBlsng{font-size:48px;opacity:0.3}.emptyText--sLGCrWlm{font-size:14px;color:rgba(0,0,0,0.45)}.emptyHint--x1N3M44U{font-size:12px;color:rgba(0,0,0,0.3)}",""]),l.locals={modalContent:"modalContent--dIoSJqb4",aiAssistantArea:"aiAssistantArea--OO7TCUd8",instanceListArea:"instanceListArea--ERaNqEwo",instanceListHeader:"instanceListHeader--weSif_tm",headerTitle:"headerTitle--PWYXcuqF",instanceCount:"instanceCount--Php1Fz0f",detailArea:"detailArea--Gbs1dNyR",emptyDetail:"emptyDetail--HUuVAPkU",emptyIcon:"emptyIcon--tnLBlsng",emptyText:"emptyText--sLGCrWlm",emptyHint:"emptyHint--x1N3M44U"};const s=l},49325:(e,t,n)=>{n.d(t,{I:()=>l,K:()=>i,NS:()=>o,t:()=>s});var a=n(67177);let i=function(e){return e.DESCRIPTION="DESCRIPTION",e.SPACE_GUIDE_SECTION_TITLE="SPACE_GUIDE_SECTION_TITLE",e.SPACE_GUIDE_CARD_1_TITLE="SPACE_GUIDE_CARD_1_TITLE",e.SPACE_GUIDE_CARD_2_TITLE="SPACE_GUIDE_CARD_2_TITLE",e.SPACE_GUIDE_CARD_3_TITLE="SPACE_GUIDE_CARD_3_TITLE",e.BUSINESS_OBJECTS="BUSINESS_OBJECTS",e.BUSINESS_FLOWS="BUSINESS_FLOWS",e.NO_BUSINESS_OBJECTS_FLOWS="NO_BUSINESS_OBJECTS_FLOWS",e.GUIDE_AI_TO_GENERATE_CONFIG="GUIDE_AI_TO_GENERATE_CONFIG",e.NO_CONFIGURATION_DATA="NO_CONFIGURATION_DATA",e.FIELD_DEFINITIONS="FIELD_DEFINITIONS",e.LIFECYCLE_STATUS="LIFECYCLE_STATUS",e.PREREQUISITES="PREREQUISITES",e.PREREQUISITES_SUBTITLE="PREREQUISITES_SUBTITLE",e.ACTIVITY_DESCRIPTION="ACTIVITY_DESCRIPTION",e.NO_DESCRIPTION="NO_DESCRIPTION",e.RESPONSIBLE_AI_EMPLOYEE="RESPONSIBLE_AI_EMPLOYEE",e.SELECT_AI_EMPLOYEE_PLACEHOLDER="SELECT_AI_EMPLOYEE_PLACEHOLDER",e.HITL_RULES="HITL_RULES",e.HITL_INTERVENTION_USER="HITL_INTERVENTION_USER",e.SELECT_HITL_USER_PLACEHOLDER="SELECT_HITL_USER_PLACEHOLDER",e.SPACE_CONFIGURATION="SPACE_CONFIGURATION",e.SAVE_CONFIGURATION="SAVE_CONFIGURATION",e.CANCEL="CANCEL",e.PLEASE_ENTER="PLEASE_ENTER",e.CONFIG_ASSISTANT_PLACEHOLDER="CONFIG_ASSISTANT_PLACEHOLDER",e.ADD_INSTANCE_ASSISTANT_PLACEHOLDER="ADD_INSTANCE_ASSISTANT_PLACEHOLDER",e.CONFIG_ASSISTANT_WELCOME="CONFIG_ASSISTANT_WELCOME",e.KNOWLEDGE="KNOWLEDGE",e.NO_KNOWLEDGE="NO_KNOWLEDGE",e.MINUTES_AGO="MINUTES_AGO",e.HOURS_AGO="HOURS_AGO",e.DAYS_AGO="DAYS_AGO",e.NEW_SESSION="NEW_SESSION",e.HISTORY_SESSIONS="HISTORY_SESSIONS",e.CLOSE_TAB="CLOSE_TAB",e.FLOW_SIDEBAR_TITLE="FLOW_SIDEBAR_TITLE",e.FLOW_SIDEBAR_SUBTITLE="FLOW_SIDEBAR_SUBTITLE",e.NO_HISTORY="NO_HISTORY",e.LOADING="LOADING",e.LOAD_MORE="LOAD_MORE",e.NO_BUSINESS_OBJECTS="NO_BUSINESS_OBJECTS",e.LOAD_FAILED="LOAD_FAILED",e.CLICK_TO_RETRY="CLICK_TO_RETRY",e.NO_INSTANCES="NO_INSTANCES",e.ADD_KNOWLEDGE="ADD_KNOWLEDGE",e.ADD_INSTANCE_MODAL_TITLE="ADD_INSTANCE_MODAL_TITLE",e.ADD_INSTANCE_ASSISTANT_WELCOME="ADD_INSTANCE_ASSISTANT_WELCOME",e.IDENTIFIED_INSTANCES="IDENTIFIED_INSTANCES",e.NO_INSTANCES_IDENTIFIED="NO_INSTANCES_IDENTIFIED",e.NO_INSTANCES_IDENTIFIED_DESCRIPTION="NO_INSTANCES_IDENTIFIED_DESCRIPTION",e.INSTANCE_DETAIL="INSTANCE_DETAIL",e.NO_DETAIL="NO_DETAIL",e.CONFIRM_CREATE="CONFIRM_CREATE",e.EDIT_INSTANCE="EDIT_INSTANCE",e.DELETE_INSTANCE="DELETE_INSTANCE",e.NO_DETAIL_HINT="NO_DETAIL_HINT",e.ACTIVITY_RECORD="ACTIVITY_RECORD",e.NO_ACTIVITY_RECORD="NO_ACTIVITY_RECORD",e.NO_ACTIVITY_RECORD_DESCRIPTION="NO_ACTIVITY_RECORD_DESCRIPTION",e.INSTANCE_DETAIL_CHAT_PLACEHOLDER="INSTANCE_DETAIL_CHAT_PLACEHOLDER",e.NO_SERVICE_FLOWS="NO_SERVICE_FLOWS",e.INITIATING_SERVICE_FLOW="INITIATING_SERVICE_FLOW",e.ADD_COMMENT_PLACEHOLDER="ADD_COMMENT_PLACEHOLDER",e.CREATED_INSTANCE="CREATED_INSTANCE",e.EDITED_INSTANCE="EDITED_INSTANCE",e.COMMENTED="COMMENTED",e.STARTED_CONVERSATION="STARTED_CONVERSATION",e.CHANGED_STATUS_TO="CHANGED_STATUS_TO",e.CONVERSATION="CONVERSATION",e.STATUS_CHANGED="STATUS_CHANGED",e.NOT_SET="NOT_SET",e}({});const o="bricks/ai-portal/space-workbench",l={en:{DESCRIPTION:"Description",SPACE_GUIDE_SECTION_TITLE:"I can help you with:",SPACE_GUIDE_CARD_1_TITLE:"Manage Business Cases",SPACE_GUIDE_CARD_2_TITLE:"Initiate Business Flow",SPACE_GUIDE_CARD_3_TITLE:"Manage Space Knowledge",BUSINESS_OBJECTS:"Business Objects",BUSINESS_FLOWS:"Business Flows",NO_BUSINESS_OBJECTS_FLOWS:"No Business Objects/Flows",GUIDE_AI_TO_GENERATE_CONFIG:"Please guide AI to generate configuration through the left conversation",NO_CONFIGURATION_DATA:"No Configuration Data",FIELD_DEFINITIONS:"Field Definitions",LIFECYCLE_STATUS:"Lifecycle Status",PREREQUISITES:"Prerequisites",PREREQUISITES_SUBTITLE:"The following conditions must be met:",ACTIVITY_DESCRIPTION:"Activity Description",NO_DESCRIPTION:"No Description",RESPONSIBLE_AI_EMPLOYEE:"Responsible AI Employee",SELECT_AI_EMPLOYEE_PLACEHOLDER:"Please select AI employee",HITL_RULES:"HITL Rules",HITL_INTERVENTION_USER:"HITL Intervention User",SELECT_HITL_USER_PLACEHOLDER:"Please select HITL intervention user",SPACE_CONFIGURATION:"Space Configuration",SAVE_CONFIGURATION:"Save Configuration",CANCEL:"Cancel",PLEASE_ENTER:"Please enter",CONFIG_ASSISTANT_PLACEHOLDER:"Enter command to adjust configuration...",CONFIG_ASSISTANT_WELCOME:"Hello! I am the space configuration assistant. You can describe your business process, and I will automatically generate related business objects and flows for you. You can also explicitly tell me which business object or flow to modify.",KNOWLEDGE:"Knowledge",NO_KNOWLEDGE:"No Knowledge",MINUTES_AGO:" minutes ago",HOURS_AGO:" hours ago",DAYS_AGO:" days ago",NEW_SESSION:"New Session",HISTORY_SESSIONS:"History Sessions",CLOSE_TAB:"Close Tab",FLOW_SIDEBAR_TITLE:"Business Flows",FLOW_SIDEBAR_SUBTITLE:"Click to start business flow",NO_HISTORY:"No History",LOADING:"Loading...",LOAD_MORE:"Load More",NO_BUSINESS_OBJECTS:"No Business Objects",LOAD_FAILED:"Load Failed",CLICK_TO_RETRY:"Click to Retry",NO_INSTANCES:"No Instances",ADD_KNOWLEDGE:"Add Knowledge",ADD_INSTANCE_MODAL_TITLE:"Smart Create {{objectName}}",ADD_INSTANCE_ASSISTANT_WELCOME:"Hello! I am your instance creation assistant. You can directly provide me with the relevant information or upload files (such as PDF or Excel), and I will automatically parse and generate the instance for you.",IDENTIFIED_INSTANCES:"Identified Instances",NO_INSTANCES_IDENTIFIED:"No Instances",NO_INSTANCES_IDENTIFIED_DESCRIPTION:"You can create instances in the left conversation",INSTANCE_DETAIL:"Instance Detail",NO_DETAIL:"No Detail",CONFIRM_CREATE:"Confirm Create",EDIT_INSTANCE:"Edit",DELETE_INSTANCE:"Delete",NO_DETAIL_HINT:"You can select an instance on the left to view details",ADD_INSTANCE_ASSISTANT_PLACEHOLDER:"Enter information to create instance...",ACTIVITY_RECORD:"Activity Record",NO_ACTIVITY_RECORD:"No Activity Record",NO_ACTIVITY_RECORD_DESCRIPTION:"Activity records will appear here after interactions",INSTANCE_DETAIL_CHAT_PLACEHOLDER:"Chat about this instance, ask questions or make updates...",NO_SERVICE_FLOWS:"No Service Flows",INITIATING_SERVICE_FLOW:"Starting serviceflow: {{ name }}",ADD_COMMENT_PLACEHOLDER:"Add comment...",CREATED_INSTANCE:"created instance",EDITED_INSTANCE:"edited instance",COMMENTED:"commented",STARTED_CONVERSATION:"started conversation",CHANGED_STATUS_TO:"changed status to ",CONVERSATION:"Conversation",STATUS_CHANGED:"Status Changed",NOT_SET:"Not Set"},zh:{DESCRIPTION:"描述",SPACE_GUIDE_SECTION_TITLE:"我可以协助您完成:",SPACE_GUIDE_CARD_1_TITLE:"管理业务案例",SPACE_GUIDE_CARD_2_TITLE:"发起业务流",SPACE_GUIDE_CARD_3_TITLE:"管理空间知识",BUSINESS_OBJECTS:"业务对象",BUSINESS_FLOWS:"业务流",NO_BUSINESS_OBJECTS_FLOWS:"暂无业务对象/业务流",GUIDE_AI_TO_GENERATE_CONFIG:"请通过左侧对话引导 AI 生成配置",NO_CONFIGURATION_DATA:"暂无配置数据",FIELD_DEFINITIONS:"字段定义",LIFECYCLE_STATUS:"生命周期状态",PREREQUISITES:"先决条件",PREREQUISITES_SUBTITLE:"需要满足以下条件:",ACTIVITY_DESCRIPTION:"活动描述",NO_DESCRIPTION:"暂无描述",RESPONSIBLE_AI_EMPLOYEE:"负责数字人",SELECT_AI_EMPLOYEE_PLACEHOLDER:"请选择负责数字人",HITL_RULES:"HITL规则",HITL_INTERVENTION_USER:"HITL介入用户",SELECT_HITL_USER_PLACEHOLDER:"请选择HITL介入用户",SPACE_CONFIGURATION:"协作空间配置",SAVE_CONFIGURATION:"保存配置",CANCEL:"取消",PLEASE_ENTER:"请输入",CONFIG_ASSISTANT_PLACEHOLDER:"输入指令调整配置...",ADD_INSTANCE_ASSISTANT_PLACEHOLDER:"输入信息创建实例...",CONFIG_ASSISTANT_WELCOME:"您好!我是协作空间配置助手。您可以告诉我描述你的业务流程,我会为你自动生成相关的业务对象和业务流,你也可以明确让我修改哪个业务对象或业务流。",KNOWLEDGE:"知识",NO_KNOWLEDGE:"暂无知识",MINUTES_AGO:"分钟前",HOURS_AGO:"小时前",DAYS_AGO:"天前",NEW_SESSION:"新协作会话",HISTORY_SESSIONS:"历史会话列表",CLOSE_TAB:"关闭标签",FLOW_SIDEBAR_TITLE:"业务流",FLOW_SIDEBAR_SUBTITLE:"点击以启动业务流",NO_HISTORY:"暂无历史记录",LOADING:"加载中...",LOAD_MORE:"加载更多",NO_BUSINESS_OBJECTS:"暂无业务对象",LOAD_FAILED:"加载失败",CLICK_TO_RETRY:"点击重试",NO_INSTANCES:"暂无数据",ADD_KNOWLEDGE:"添加知识",ADD_INSTANCE_MODAL_TITLE:"智能创建{{objectName}}",ADD_INSTANCE_ASSISTANT_WELCOME:"您好!我是您的实例创建助手。您可以直接告诉我相关信息,或者上传文件(如PDF、Excel),我将自动为您解析并生成实例。",IDENTIFIED_INSTANCES:"已识别实例",NO_INSTANCES_IDENTIFIED:"暂无实例",NO_INSTANCES_IDENTIFIED_DESCRIPTION:"你可在左侧对话创建",INSTANCE_DETAIL:"详情预览",NO_DETAIL:"暂无详情",CONFIRM_CREATE:"确认创建",EDIT_INSTANCE:"编辑",DELETE_INSTANCE:"删除",NO_DETAIL_HINT:"你可在左侧选择实例查看详情",ACTIVITY_RECORD:"活动记录",NO_ACTIVITY_RECORD:"暂无活动记录",NO_ACTIVITY_RECORD_DESCRIPTION:"交互后的活动记录将显示在这里",INSTANCE_DETAIL_CHAT_PLACEHOLDER:"与此实例对话,提问或更新...",NO_SERVICE_FLOWS:"暂无业务流",INITIATING_SERVICE_FLOW:"发起业务流:{{ name }}",ADD_COMMENT_PLACEHOLDER:"添加评论...",CREATED_INSTANCE:"创建了实例",EDITED_INSTANCE:"编辑实例",COMMENTED:"评论",STARTED_CONVERSATION:"发起会话",CHANGED_STATUS_TO:"将状态改为",CONVERSATION:"会话",STATUS_CHANGED:"状态变更",NOT_SET:"未设置"}},s=a.i18n.getFixedT(null,o)},55111:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".panel--ukaGUcR2{display:flex;flex-direction:column;min-height:300px;height:100%}.narrow--NBtGp4vW{width:100%;max-width:800px;margin:0 auto}.main--K5R8dLH9{position:relative;flex:1;min-height:0}.chat--Drl2ThnZ{padding:0 0 20px;height:100%;overflow-y:auto}.messages--Bhaarj69{width:100%;margin:0 auto}.message--TP5bdFpZ + .message--TP5bdFpZ{margin-top:40px}.loading-icon--BjI0pCV1{flex:1;display:flex;align-items:center;justify-content:center;font-size:48px;color:#fff}",""]),l.locals={panel:"panel--ukaGUcR2",narrow:"narrow--NBtGp4vW",main:"main--K5R8dLH9",chat:"chat--Drl2ThnZ",messages:"messages--Bhaarj69",message:"message--TP5bdFpZ","loading-icon":"loading-icon--BjI0pCV1"};const s=l},55935:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.tabBar--_7stQAM5{display:flex;align-items:center;justify-content:space-between;gap:0;padding:8px 16px;border-bottom:none;min-height:48px;flex-shrink:0;position:relative;background:#f5f5f5}.tabList--Exlu8xQN{display:flex;align-items:center;gap:8px;overflow-x:auto;overflow-y:hidden;flex:1;min-width:0;margin-right:8px}.tabList--Exlu8xQN::-webkit-scrollbar{display:none}.tabList--Exlu8xQN{scrollbar-width:none}.tabList--Exlu8xQN{-ms-overflow-style:none}.tab--QYqy_eJM{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;white-space:nowrap;flex-shrink:0;position:relative;background:transparent;border:none;min-height:28px}.tab--QYqy_eJM:not(:first-child)::before{content:"";position:absolute;left:-4px;top:50%;transform:translateY(-50%);width:1px;height:14px;background:rgba(0,0,0,0.1)}.tab--QYqy_eJM.active--fA_KgbOF::before{display:none}.tab--QYqy_eJM.active--fA_KgbOF + .tab--QYqy_eJM::before{display:none}.tab--QYqy_eJM:not(.active--fA_KgbOF){color:rgba(0,0,0,0.65)}.tab--QYqy_eJM:not(.active--fA_KgbOF):hover{background:rgba(0,0,0,0.04);padding:8px 12px}.tab--QYqy_eJM.active--fA_KgbOF{color:rgba(0,0,0,0.85);background:#ffffff;box-shadow:0 1px 4px rgba(0,0,0,0.08);padding:8px 12px}.tabIcon--h3Ld8TFP{font-size:14px;flex-shrink:0;display:flex;align-items:center;position:relative}.tabIcon--h3Ld8TFP::before{content:"";position:absolute;top:-2px;right:-2px;width:6px;height:6px;border-radius:50%;background:transparent}.tab--QYqy_eJM.hasStatus--WyEGppQr .tabIcon--h3Ld8TFP::before{background:#ff8c00}.tabTitle--jiAFXD4o{font-size:14px;font-weight:400;font-family:"PingFang SC",sans-serif;line-height:16px;max-width:200px;overflow:hidden;text-overflow:ellipsis}.closeButton--znOzOuKD{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:none;cursor:pointer;color:rgba(0,0,0,0.45);opacity:1;transition:all 0.2s ease;flex-shrink:0}.closeButton--znOzOuKD:hover{color:rgba(0,0,0,0.85);background:transparent}.closeButton--znOzOuKD eo-icon{font-size:11px}.tabActions--Z_8Iq8Aj{display:flex;align-items:center;gap:0;flex-shrink:0;position:relative;z-index:1;padding-left:8px}.divider--krd_ZOMx{width:1px;height:17px;background:rgba(0,0,0,0.1);margin:0 5px}.actionButton--DvU8WJx0{display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;background:none;cursor:pointer;border-radius:4px;transition:background-color 0.2s ease;color:rgba(0,0,0,0.65)}.actionButton--DvU8WJx0:hover{background:rgba(0,0,0,0.04);color:rgba(0,0,0,0.85)}.actionButton--DvU8WJx0 eo-icon{font-size:14px}',""]),l.locals={tabBar:"tabBar--_7stQAM5",tabList:"tabList--Exlu8xQN",tab:"tab--QYqy_eJM",active:"active--fA_KgbOF",tabIcon:"tabIcon--h3Ld8TFP",hasStatus:"hasStatus--WyEGppQr",tabTitle:"tabTitle--jiAFXD4o",closeButton:"closeButton--znOzOuKD",tabActions:"tabActions--Z_8Iq8Aj",divider:"divider--krd_ZOMx",actionButton:"actionButton--DvU8WJx0"};const s=l},59189:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".emptyState--bxuHEsgY{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:rgba(0,0,0,0.45)}.emptyStateIcon--lgiof8G0{width:50px;height:50px;margin-bottom:16px;opacity:0.6}.emptyStateTitle--aIHUcnqk{font-size:14px;font-weight:500;color:rgba(0,0,0,0.65);margin-bottom:4px}.emptyStateDescription--YiVHqQCZ{font-size:12px;color:rgba(0,0,0,0.45);text-align:center}",""]),l.locals={emptyState:"emptyState--bxuHEsgY",emptyStateIcon:"emptyStateIcon--lgiof8G0",emptyStateTitle:"emptyStateTitle--aIHUcnqk",emptyStateDescription:"emptyStateDescription--YiVHqQCZ"};const s=l},63873:(e,t,n)=>{n.d(t,{U:()=>A,x:()=>y});var a=n(18769),i=n.n(a),o=n(72591),l=n.n(o),s=n(1740),r=n.n(s),c=n(88128),d=n.n(c),p=n(30855),m=n.n(p),u=n(93051),f=n.n(u),g=n(73656),E=n.n(g),b=n(39152),x={};x.styleTagTransform=E(),x.setAttributes=m(),x.insert=d().bind(null,"head"),x.domAPI=r(),x.insertStyleElement=f(),l()(b.A,x);const I=b.A&&b.A.locals?b.A.locals:void 0;var h=n(53373),v=n.n(h),N=n(39035),S=n(30385),T=n(49325),w=n(60136);function y(e){let{instance:t,attrs:n,className:o,onAttrChange:l,onFileClick:s}=e;const[r,c]=(0,a.useState)(null),[d,p]=(0,a.useState)(""),m=(0,a.useRef)(""),u=(0,a.useRef)(null),f=null==n?void 0:n.filter((e=>"file"===e.type)),g=null==n?void 0:n.filter((e=>"text"===e.type)),E=null==n?void 0:n.filter((e=>"file"!==e.type&&"text"!==e.type));(0,a.useEffect)((()=>{if(!r)return;const e=e=>{u.current&&!u.current.contains(e.target)&&(d!==m.current&&(null==l||l(r,d)),c(null))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[r,d,l]);const b=()=>{r&&d!==m.current&&(null==l||l(r,d)),c(null)};return i().createElement("div",{className:v()(I.fieldsViewContainer,o)},i().createElement("div",{className:I.fieldsViewList},E.map((e=>{const n="file"===e.type||e.isArray&&Array.isArray(t[e.id])&&t[e.id].some((e=>null==e?void 0:e.name)),a="string"===e.type&&!e.isArray;return i().createElement("div",{key:e.id,className:`${I.fieldsViewItem} ${n?I.fullWidth:""}`},i().createElement("div",{className:I.fieldsViewLabelRow},i().createElement("span",{className:I.fieldsViewLabel},e.name),a&&i().createElement("button",{className:I.editButton,onClick:()=>((e,t)=>{const n=null!=t?t:"";c(e),p(n),m.current=n})(e.id,t[e.id])},i().createElement(N.Bj,{lib:"lucide",icon:"edit"}))),i().createElement("div",{className:I.fieldsViewValue},((e,t)=>{if("string"===e.type&&!e.isArray){const n=r===e.id,a=n?d:null!=t?t:"";return n?i().createElement("div",{ref:u,className:I.inputWrapper},i().createElement(N.qr,{value:a,themeVariant:"elevo",autoFocus:!0,onValueChange:e=>(e=>{p(e)})(e.detail),onBlur:()=>b(),onKeyDown:e=>{"Enter"===e.key&&b()}})):i().createElement("span",{className:I.fieldTextValue,title:String(a)},a)}if(e.isArray&&Array.isArray(t))return 0===t.length?i().createElement("span",{className:I.fieldTextValue}):"file"===e.type?i().createElement("span",{style:{display:"flex",alignItems:"center",gap:"4px"}},i().createElement(N.Bj,{lib:"lucide",icon:"paperclip"}),t.length):i().createElement("span",null,t.join(", "));if("file"===e.type)return null==t?i().createElement("span",{className:I.fieldTextValue}):i().createElement(N.Bj,{lib:"lucide",icon:"paperclip"});if("enum"===e.type&&null!=t)return Array.isArray(t)?i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"}},t.map((e=>i().createElement(N.s8,{key:e},e)))):i().createElement(N.s8,null,t);const n=null!=t?t:"";return i().createElement("span",{className:I.fieldTextValue,title:String(n)},n)})(e,t[e.id])))}))),f.map((e=>!t[e.id]||Array.isArray(t[e.id])&&0===t[e.id].length?null:i().createElement("div",{key:e.id,className:I.fieldsViewSection},i().createElement("div",{className:I.fieldsViewSectionHeader},i().createElement(N.Bj,{lib:"lucide",icon:"paperclip",className:I.fieldsViewSectionIcon}),i().createElement("span",null,e.name)),i().createElement("div",{className:I.fieldsViewFileList},(Array.isArray(t[e.id])?t[e.id]:[t[e.id]]).map(((e,t)=>{const[n,a]=(0,w.NL)(e.mimeType,e.name);return i().createElement("div",{key:t,className:I.fieldsViewFileItem,onClick:()=>null==s?void 0:s(e)},i().createElement("img",{src:a,alt:n,className:I.fieldsViewFileIcon}),i().createElement("div",{className:I.fieldsViewFileContent},i().createElement("span",{className:I.fieldsViewFileName,title:e.name},e.name),e.size?i().createElement("span",{className:I.fieldsViewFileSize},(0,w.v7)(e.size)):null))})))))),g.map((e=>t[e.id]?i().createElement("div",{key:e.id,className:I.fieldsViewSection},i().createElement("div",{className:I.fieldsViewSectionHeader},e.name),i().createElement("div",{className:I.fieldsViewTextContent},t[e.id])):null)))}function A(e){let{instance:t,attrs:n,title:a,onAttrChange:o,onFileClick:l}=e;return t&&n?i().createElement("div",{className:I.instanceCardWrapper},i().createElement("div",{className:I.instanceCard},a&&i().createElement("h3",{className:I.instanceCardTitle},a),i().createElement(y,{instance:t,attrs:n,onAttrChange:o,onFileClick:l}))):i().createElement(S.p,{className:I.emptyState,title:(0,T.t)(T.K.NO_DETAIL),description:(0,T.t)(T.K.NO_DETAIL_HINT)})}},65904:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".modalContent--xJ8Ui4Lp{display:flex;height:calc(100vh - 200px);min-height:500px;max-height:700px;margin:-16px -20px;gap:0;overflow:hidden;border-bottom:1px solid rgba(0,0,0,0.06)}.aiAssistantArea--S13sfbOF{flex:1 0 360px;max-width:550px;display:flex;flex-direction:column;border-right:1px solid rgba(0,0,0,0.1);border-radius:0 0 0 16px;padding:24px}",""]),l.locals={modalContent:"modalContent--xJ8Ui4Lp",aiAssistantArea:"aiAssistantArea--S13sfbOF"};const s=l},65966:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".instanceList--P_1sgfxy{flex:1;display:flex;flex-direction:column;gap:8px;overflow-y:auto;padding:0 8px}.instanceCard--JXPltQWg{display:flex;flex-direction:column;gap:10px;padding:13px;background:white;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;transition:all 0.2s ease}.instanceCard--JXPltQWg:hover{border-color:rgba(37,64,255,0.3);box-shadow:0 2px 8px rgba(0,0,0,0.08)}.instanceCard--JXPltQWg.selected--BD70l6pV{border-color:#a1b5ff;background:rgba(37,64,255,0.02)}.cardHeader--Hz2_LOmU{display:flex;align-items:center;justify-content:space-between;gap:11px}.cardTitle--G0hHy6Kv{flex:1;font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cardActions--XH71GYga{display:flex;align-items:center;gap:8px}.deleteButton--uqj_zx62{display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;background:transparent;border:none;border-radius:4px;cursor:pointer;color:rgba(0,0,0,0.45);opacity:0;transition:all 0.2s ease}.instanceCard--JXPltQWg:hover .deleteButton--uqj_zx62{opacity:1}.deleteButton--uqj_zx62:hover{background:rgba(255,77,79,0.1);color:#ff4d4f}.cardStatus--wM14FLdf{display:flex;align-items:center}.statusTag--t446V_ZM{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;background:rgba(37,64,255,0.05);border:1px solid rgba(37,64,255,0.2);border-radius:20px;font-size:10px;color:#1e30cc;font-weight:500;line-height:14px}",""]),l.locals={instanceList:"instanceList--P_1sgfxy",instanceCard:"instanceCard--JXPltQWg",selected:"selected--BD70l6pV",cardHeader:"cardHeader--Hz2_LOmU",cardTitle:"cardTitle--G0hHy6Kv",cardActions:"cardActions--XH71GYga",deleteButton:"deleteButton--uqj_zx62",cardStatus:"cardStatus--wM14FLdf",statusTag:"statusTag--t446V_ZM"};const s=l},66676:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.activityCard--_cEfvEaB{display:flex;flex-direction:column;justify-content:space-between;gap:14px;padding:13px;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;z-index:1;transition:all 0.2s;min-width:236px;width:236px;height:120px}.activityCard--_cEfvEaB:hover{border-color:#a1b5ff;box-shadow:0 2px 8px rgba(37,64,255,0.1)}.activityCardActive--qdeGG8pw{border-color:#a1b5ff}.activityContent--jj94hGGW{display:flex;flex-direction:column;gap:8px}.activityName--Kzbe4gos{font-size:13px;font-weight:500;line-height:14px;color:rgba(0,0,0,0.85);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.activityNameActive--tWBatSPm{color:#2540ff}.activityDescription--uQc4FY15{font-family:"PingFang SC",sans-serif;font-size:12px;font-weight:400;line-height:12.5px;color:rgba(0,0,0,0.45);letter-spacing:0.1172px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.activityAssignee--wmWlB6OF{align-items:center;padding:2px 8px;font-family:"PingFang SC",sans-serif;font-size:10px;font-weight:500;line-height:14px;letter-spacing:0.1172px;border-radius:20px;border:1px solid;width:-moz-fit-content;width:fit-content;background:rgba(37,64,255,0.05);border-color:rgba(30,48,204,0.3);color:#1e30cc;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',""]),l.locals={activityCard:"activityCard--_cEfvEaB",activityCardActive:"activityCardActive--qdeGG8pw",activityContent:"activityContent--jj94hGGW",activityName:"activityName--Kzbe4gos",activityNameActive:"activityNameActive--tWBatSPm",activityDescription:"activityDescription--uQc4FY15",activityAssignee:"activityAssignee--wmWlB6OF"};const s=l},72375:(e,t,n)=>{n.d(t,{c:()=>ne});var a=n(18769),i=n.n(a),o=n(30981),l=n(22919);const s=async(e,t)=>(await l.http.get(`api/gateway/logic.llm.aiops_service/api/v1/elevo/spaces/${e}/schema`,t)).data;var r=n(60128);const c=(e,t,n)=>l.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/spaces/${e}/import`,t,n);var d=n(41643),p=n(13262),m=n(53373),u=n.n(m),f=n(30672),g=n(72591),E=n.n(g),b=n(1740),x=n.n(b),I=n(88128),h=n.n(I),v=n(30855),N=n.n(v),S=n(93051),T=n.n(S),w=n(73656),y=n.n(w),A=n(31028),C={};C.styleTagTransform=y(),C.setAttributes=N(),C.insert=h().bind(null,"head"),C.domAPI=x(),C.insertStyleElement=T(),E()(A.A,C);const _=A.A&&A.A.locals?A.A.locals:void 0;var O=n(49325);const D=(0,o.wrapBrick)("eo-markdown-display");function L(e){var t,n;let{data:a,viewType:o="visual"}=e;return a?"json"===o?i().createElement("div",{className:_.jsonView},i().createElement("pre",null,JSON.stringify(a,null,2))):i().createElement("div",{className:_.businessObjectPreview},i().createElement("div",{className:_.objectHeader},i().createElement("div",{className:_.objectTitleArea},i().createElement("div",{className:_.objectTitle},i().createElement("span",{className:_.objectName},a.objectName)),i().createElement("div",{className:_.objectDescription},a.description))),i().createElement("div",{className:_.objectSection},i().createElement("div",{className:_.sectionTitle},i().createElement(f.Bj,{lib:"antd",icon:"database",className:_.sectionIcon}),i().createElement("span",null,(0,O.t)(O.K.FIELD_DEFINITIONS))),i().createElement("div",{className:_.fieldGrid},null==a||null===(t=a.attributes)||void 0===t?void 0:t.map((e=>i().createElement("div",{key:e.id,className:_.fieldItem},i().createElement("span",{className:_.fieldName},e.name),i().createElement("span",{className:_.fieldType},e.type)))),null==a||null===(n=a.relations)||void 0===n?void 0:n.map((e=>i().createElement("div",{key:e.relation_id,className:_.fieldItem},i().createElement("span",{className:_.fieldName},e.name,i().createElement(f.Bj,{lib:"antd",icon:"link",className:_.linkIcon})),i().createElement("span",{className:_.relationType},"Relation")))))),a.lifecycle&&i().createElement("div",{className:_.objectSection},i().createElement("div",{className:_.sectionTitle},i().createElement(f.Bj,{lib:"antd",icon:"sync",className:_.sectionIcon}),i().createElement("span",null,(0,O.t)(O.K.LIFECYCLE_STATUS))),i().createElement("div",{className:_.lifecycleContainer},i().createElement(D,{content:`\`\`\`mermaid\n${a.lifecycle}\n\`\`\``})))):null}var k=n(9385),R=n(30385),B=n(94389),j={};j.styleTagTransform=y(),j.setAttributes=N(),j.insert=h().bind(null,"head"),j.domAPI=x(),j.insertStyleElement=T(),E()(B.A,j);const F=B.A&&B.A.locals?B.A.locals:void 0;function P(e){let{businessObject:t,businessFlow:n,viewType:o,onViewTypeChange:l}=e;const[s,r]=(0,a.useState)("visual"),c=null!=o?o:s,d=e=>{l?l(e):r(e)},p=!!t,m=p||!!n;return i().createElement("div",{className:F.configPreviewContainer},i().createElement("div",{className:F.configPreviewHeader},i().createElement("div",{className:F.viewSwitcher},i().createElement("button",{className:`${F.viewButton} ${"visual"===c?F.active:""}`,onClick:()=>d("visual")},i().createElement(f.Bj,{lib:"antd",icon:"eye",className:F.viewButtonIcon}),"Visual"),i().createElement("button",{className:`${F.viewButton} ${"json"===c?F.active:""}`,onClick:()=>d("json")},i().createElement(f.Bj,{lib:"antd",icon:"code",className:F.viewButtonIcon}),"JSON"))),i().createElement("div",{className:F.configPreviewBody},m?p?i().createElement(L,{data:t,viewType:c}):i().createElement(k.X,{data:null!=n?n:void 0,viewType:c}):i().createElement(R.p,{title:(0,O.t)(O.K.NO_CONFIGURATION_DATA),description:(0,O.t)(O.K.GUIDE_AI_TO_GENERATE_CONFIG)})))}var V=n(7370),H={};H.styleTagTransform=y(),H.setAttributes=N(),H.insert=h().bind(null,"head"),H.domAPI=x(),H.insertStyleElement=T(),E()(V.A,H);const U=V.A&&V.A.locals?V.A.locals:void 0;let G=function(e){return e.BUSINESS_OBJECTS="businessObjects",e.BUSINESS_FLOWS="businessFlows",e}({});function z(e){var t,n;let{configSchema:o}=e;const[l,s]=(0,a.useState)(G.BUSINESS_OBJECTS),[r,c]=(0,a.useState)(),[d,p]=(0,a.useState)("visual");(0,a.useEffect)((()=>{const e=l===G.BUSINESS_OBJECTS?null==o?void 0:o.businessObjects:null==o?void 0:o.businessFlows;e&&0!==e.length?c((t=>{if(t){const n=e=>l===G.BUSINESS_OBJECTS?e.objectId:e.instanceId,a=n(t);return e.find((e=>n(e)===a))||e[0]}return e[0]})):c(void 0)}),[o,l]);const m=e=>{s(e)},f=e=>{var t;const n=null==o||null===(t=o[l])||void 0===t?void 0:t.find((t=>e.id===(l===G.BUSINESS_OBJECTS?t.objectId:t.instanceId)));c(n)},g=l===G.BUSINESS_OBJECTS;return i().createElement(i().Fragment,null,i().createElement("div",{className:U.configListArea},i().createElement("div",{className:U.configListTabs},i().createElement("button",{className:u()(U.configListTab,{[U.active]:l===G.BUSINESS_OBJECTS}),onClick:()=>m(G.BUSINESS_OBJECTS)},(0,O.t)(O.K.BUSINESS_OBJECTS)),i().createElement("button",{className:u()(U.configListTab,{[U.active]:l===G.BUSINESS_FLOWS}),onClick:()=>m(G.BUSINESS_FLOWS)},(0,O.t)(O.K.BUSINESS_FLOWS))),l===G.BUSINESS_OBJECTS?i().createElement(M,{itemList:null==o||null===(t=o.businessObjects)||void 0===t?void 0:t.map((e=>({id:e.objectId,name:e.objectName,description:e.description}))),activeId:null==r?void 0:r.objectId,onItemClick:f}):i().createElement(M,{itemList:null==o||null===(n=o.businessFlows)||void 0===n?void 0:n.map((e=>({id:e.instanceId,name:e.name,description:e.description}))),activeId:null==r?void 0:r.instanceId,onItemClick:f})),i().createElement("div",{className:U.configPreviewArea},i().createElement(P,{businessObject:g?r:null,businessFlow:g?null:r,viewType:d,onViewTypeChange:p})))}function M(e){let{itemList:t,activeId:n,onItemClick:a}=e;return null!=t&&t.length?i().createElement("div",{className:U.cardList},null==t?void 0:t.map((e=>i().createElement("div",{key:e.id,className:u()(U.cardItem,{[U.active]:n===e.id}),onClick:()=>null==a?void 0:a(e)},i().createElement("div",{className:U.cardItemName,title:e.name},e.name),i().createElement("div",{className:U.cardItemDesc,title:e.description},e.description))))):i().createElement(R.p,{title:(0,O.t)(O.K.NO_BUSINESS_OBJECTS_FLOWS),description:(0,O.t)(O.K.GUIDE_AI_TO_GENERATE_CONFIG)})}var K=n(65904),W={};W.styleTagTransform=y(),W.setAttributes=N(),W.insert=h().bind(null,"head"),W.domAPI=x(),W.insertStyleElement=T(),E()(K.A,W);const Y=K.A&&K.A.locals?K.A.locals:void 0,q=(0,o.wrapBrick)("eo-modal",{onClose:"close",onConfirm:"confirm",onCancel:"cancel",onOpen:"open"});function J(e){let{visible:t,spaceDetail:n,configSchema:o,aiEmployeeId:s,onSave:m,onCancel:u}=e;const[f,g]=(0,a.useState)(!1),[E,b]=(0,a.useState)(null),[x,I]=(0,a.useState)(o),[h,v]=(0,a.useState)(null);(0,a.useEffect)((()=>{I(o)}),[o]);const N=()=>{null==u||u()},S=(0,a.useCallback)((async e=>{g(!0);try{const t=(await l.http.post("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{})).data.conversationId;b(t),v({...e,agentId:"elevo-service_object_schema",cmd:{type:"space-config",payload:{spaceInstanceId:n.instanceId}},...s?{aiEmployeeId:s}:null,conversationId:t})}catch(e){(0,r.handleHttpError)(e)}finally{g(!1)}}),[s,n.instanceId]),T=(0,a.useCallback)((e=>{var t,n,a;const i=null==e||null===(t=e.tasks)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.jobs)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.messages)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.parts)||void 0===t?void 0:t[0];if("data"===(null==i?void 0:i.type)&&"easy_cmd_business_object"===(null===(n=i.data)||void 0===n?void 0:n.type)&&null!==(a=i.data)&&void 0!==a&&a.content){const e=i.data.content;let t;try{t=JSON.parse(e)}catch(e){return void console.error(e)}const n=function(e,t){var n,a,i,o,l,s;let r=[...e.businessObjects||[]];null!==(n=t.deleteObjects)&&void 0!==n&&n.length&&(r=r.filter((e=>{var n;return!(null!==(n=t.deleteObjects)&&void 0!==n&&n.includes(e.objectId))})));let c=[...e.objectRelations||[]];null!==(a=t.deleteRelations)&&void 0!==a&&a.length&&(c=c.filter((e=>{var n;return!(null!==(n=t.deleteRelations)&&void 0!==n&&n.includes(e.name))})));let d=[...e.businessFlows||[]];if(null!==(i=t.deleteFlows)&&void 0!==i&&i.length&&(d=d.filter((e=>{var n;return!(null!==(n=t.deleteFlows)&&void 0!==n&&n.includes(e.name))}))),null!==(o=t.businessObjects)&&void 0!==o&&o.length){const e=new Map(r.map((e=>[e.objectId,e])));t.businessObjects.forEach((t=>{e.set(t.objectId,t)})),r=Array.from(e.values())}if(null!==(l=t.objectRelations)&&void 0!==l&&l.length){const e=new Map(c.map((e=>[e.name,e])));t.objectRelations.forEach((t=>{e.set(t.name,t)})),c=Array.from(e.values())}if(null!==(s=t.businessFlows)&&void 0!==s&&s.length){const e=new Map(d.map((e=>[e.name,e])));t.businessFlows.forEach((t=>{e.set(t.name,t)})),d=Array.from(e.values())}return{businessObjects:r,objectRelations:c,businessFlows:d,deleteObjects:Array.from(new Set([...e.deleteObjects||[],...t.deleteObjects||[]])),deleteRelations:Array.from(new Set([...e.deleteRelations||[],...t.deleteRelations||[]])),deleteFlows:Array.from(new Set([...e.deleteFlows||[],...t.deleteFlows||[]]))}}(x,t);I(n)}}),[x]),w=(0,a.useCallback)(((e,t)=>{I((n=>{const a=function(e,t,n){let a=!1;const i=e.businessFlows.map((e=>{if(!e.spec||0===e.spec.length)return e;const i=e.spec.findIndex((e=>e.name===t));if(-1===i)return e;const o=e.spec[i],l=o.serviceFlowActivities||[],s=l.findIndex((e=>e.name===n.name));if(-1===s)return e;a=!0;const r=[...l];r[s]=n;const c=[...e.spec];return c[i]={...o,serviceFlowActivities:r},{...e,spec:c}}));return a?{...e,businessFlows:i}:(console.warn(`Activity "${n.name}" not found in stage "${t}" across all business flows.`),e)}(n,e,t);return a}))}),[]);return i().createElement(d.Q.Provider,{value:{modifyActivity:w}},i().createElement(q,{themeVariant:"elevo",headerBordered:!0,modalTitle:(0,O.t)(O.K.SPACE_CONFIGURATION),width:"90%",visible:t,onCancel:N,onClose:N,onConfirm:async()=>{try{await c(n.instanceId,x),null==m||m(x)}catch(e){(0,r.handleHttpError)(e)}},maskClosable:!1,confirmText:(0,O.t)(O.K.SAVE_CONFIGURATION),cancelText:(0,O.t)(O.K.CANCEL)},i().createElement("div",{className:Y.modalContent},i().createElement("div",{className:Y.aiAssistantArea},i().createElement(p.u,{submitDisabled:f,onChatSubmit:S,conversationId:E,initialRequest:h,onData:T,placeholder:(0,O.t)(O.K.CONFIG_ASSISTANT_PLACEHOLDER),help:{useBrick:{brick:"ai-portal.chat-panel-welcome",properties:{text:(0,O.t)(O.K.CONFIG_ASSISTANT_WELCOME)}}}})),i().createElement(z,{configSchema:x}))))}var Q=n(42724),X={};X.styleTagTransform=y(),X.setAttributes=N(),X.insert=h().bind(null,"head"),X.domAPI=x(),X.insertStyleElement=T(),E()(Q.A,X);const Z=Q.A&&Q.A.locals?Q.A.locals:void 0,$=(0,o.wrapBrick)("eo-icon"),ee=(0,o.wrapBrick)("ai-portal.notice-dropdown",{onNoticeClick:"notice.click",onMarkAllRead:"mark.all.read"}),te=(0,o.wrapBrick)("ai-portal.space-logo");function ne(e){const{spaceDetail:t,notices:n=[],notifyCenterUrl:o,onBack:l,onMarkAllRead:c,onNoticeClick:d,onSpaceEdit:p,aiEmployeeId:m}=e,[u,f]=i().useState(!1),[g,E]=i().useState(!1),[b,x]=i().useState(null);return(0,a.useEffect)((()=>{(async()=>{try{const e=await s(t.instanceId);x(e)}catch(e){(0,r.handleHttpError)(e)}})()}),[t.instanceId]),i().createElement(i().Fragment,null,i().createElement("header",{className:Z.spaceWorkbenchHeader},i().createElement("div",{className:Z.headerLeft},i().createElement("button",{className:Z.iconButton,onClick:l},i().createElement($,{lib:"antd",icon:"arrow-left",theme:"outlined"})),i().createElement(te,{size:32}),i().createElement("h1",{className:Z.spaceTitle},t.name),i().createElement("div",{className:Z.actionIcons},i().createElement("button",{className:Z.iconButton,onClick:async()=>{E(!0)}},i().createElement($,{lib:"antd",icon:"setting",theme:"outlined"})),i().createElement("button",{className:`${Z.iconButton} ${u?Z.active:""}`,onClick:()=>{f(!u)}},i().createElement($,{lib:"antd",icon:"question-circle",theme:"outlined"})))),i().createElement("div",{className:Z.headerRight},i().createElement(ee,{dataSource:n,dropdownContentStyle:{minWidth:"300px"},hideNotifyCenterButton:!0,urlTarget:"_blank",notifyCenterUrl:o,onMarkAllRead:()=>c(),onNoticeClick:e=>d(e.detail)}))),(null==t?void 0:t.description)&&i().createElement("div",{className:`${Z.spaceDescription} ${u?Z.spaceDescriptionVisible:""}`},i().createElement("div",{className:Z.descriptionHeader},i().createElement("p",{className:Z.descriptionTitle},(0,O.t)(O.K.DESCRIPTION)),i().createElement("button",{className:Z.descriptionEditButton,onClick:p},i().createElement($,{lib:"antd",icon:"edit",theme:"outlined"}))),i().createElement("p",{className:Z.descriptionContent},t.description)),i().createElement(J,{visible:g,configSchema:b,spaceDetail:t,aiEmployeeId:m,onCancel:()=>E(!1)}))}},73463:(e,t,n)=>{n.d(t,{m:()=>U});var a=n(18769),i=n.n(a);class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){return JSON.parse(this.storage.getItem(this.prefix+e))}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}var l=n(60128),s=n(22919),r=n(13262),c=n(72591),d=n.n(c),p=n(1740),m=n.n(p),u=n(88128),f=n.n(u),g=n(30855),E=n.n(g),b=n(93051),x=n.n(b),I=n(73656),h=n.n(I),v=n(94588),N={};N.styleTagTransform=h(),N.setAttributes=E(),N.insert=f().bind(null,"head"),N.domAPI=m(),N.insertStyleElement=x(),d()(v.A,N);const S=v.A&&v.A.locals?v.A.locals:void 0;var T=n(49325),w=n(30981),y=n(55935),A={};A.styleTagTransform=h(),A.setAttributes=E(),A.insert=f().bind(null,"head"),A.domAPI=m(),A.insertStyleElement=x(),d()(y.A,A);const C=y.A&&y.A.locals?y.A.locals:void 0,_=(0,w.wrapBrick)("eo-icon"),O=e=>{let{id:t,title:n,active:o,onClick:l,onClose:s}=e;const r=(0,a.useRef)(null);return(0,a.useEffect)((()=>{o&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}),[o]),i().createElement("div",{ref:r,className:`${C.tab} ${o?C.active:""}`,onClick:()=>l(t)},i().createElement(_,{lib:"antd",icon:"message",theme:"outlined",className:C.tabIcon}),i().createElement("span",{className:C.tabTitle},n),i().createElement("button",{className:C.closeButton,onClick:e=>s(t,e),title:(0,T.t)(T.K.CLOSE_TAB)},i().createElement(_,{lib:"antd",icon:"close",theme:"outlined"})))},D=e=>{let{tabs:t,activeTabId:n,onTabClick:a,onTabClose:o,onAddSession:l,onHistoryClick:s}=e;return i().createElement("div",{className:C.tabBar},i().createElement("div",{className:C.tabList},t.map((e=>i().createElement(O,{key:e.id,id:e.id,title:e.title,active:n===e.id,onClick:a,onClose:o})))),i().createElement("div",{className:C.tabActions},i().createElement("button",{className:C.actionButton,onClick:l,title:(0,T.t)(T.K.NEW_SESSION)},i().createElement(_,{lib:"antd",icon:"plus",theme:"outlined"})),i().createElement("div",{className:C.divider}),i().createElement("button",{className:C.actionButton,onClick:s,title:(0,T.t)(T.K.HISTORY_SESSIONS)},i().createElement(_,{lib:"antd",icon:"history",theme:"outlined"}))))};var L=n(12561),k=n(33885),R=n(21302),B=n.n(R),j=n(39035),F=n(25366),P={};P.styleTagTransform=h(),P.setAttributes=E(),P.insert=f().bind(null,"head"),P.domAPI=m(),P.insertStyleElement=x(),d()(F.A,P);const V=F.A&&F.A.locals?F.A.locals:void 0;function H(e){const{visible:t,onClose:n,onConversationClick:o}=e,{spaceDetail:l}=(0,a.useContext)(L.v),[s,r]=(0,a.useState)([]),[c,d]=(0,a.useState)(!1),[p,m]=(0,a.useState)(!0),[u,f]=(0,a.useState)(),g=(0,a.useRef)(null),E=(0,a.useRef)(!0);return(0,a.useEffect)((()=>{t&&E.current&&(async()=>{d(!0);try{const e=await(0,k.E)({spaceInstanceId:null==l?void 0:l.instanceId,onlyOwner:!0,limit:20},{interceptorParams:{ignoreLoadingBar:!0}});r(e.conversations||[]),f(e.nextToken),m(!!e.nextToken),E.current=!1}catch(e){r([]),m(!1)}finally{d(!1)}})()}),[t]),i().createElement(j.xb,{visible:t,width:"400px",themeVariant:"elevo",placement:"right",onClose:n,customTitle:(0,T.t)(T.K.HISTORY_SESSIONS),className:V.drawer},i().createElement("div",{className:V.historyList,ref:g},0!==s.length||c?i().createElement(i().Fragment,null,s.map((e=>i().createElement("div",{key:e.conversationId,className:V.historyItem,onClick:()=>(e=>{null==o||o(e),n()})(e)},i().createElement("div",{className:V.historyItemHeader},i().createElement("span",{className:V.historyItemTitle},e.title)),e.description&&i().createElement("p",{className:V.historyItemPreview},e.description),i().createElement("div",{className:V.historyItemFooter},i().createElement(j.Bj,{lib:"antd",icon:"clock-circle",theme:"outlined",className:V.timeIcon}),i().createElement("span",{className:V.historyItemTime},B().unix(e.updatedAt||e.startTime).format("YYYY-MM-DD HH:mm:ss")))))),p&&i().createElement("div",{className:V.loadMoreContainer},i().createElement(j.EM,{type:"text",disabled:c,onClick:async()=>{if(!c&&p&&u){d(!0);try{const e=await(0,k.E)({spaceInstanceId:null==l?void 0:l.instanceId,token:u,onlyOwner:!0,limit:20},{interceptorParams:{ignoreLoadingBar:!0}});r((t=>[...t,...e.conversations||[]])),f(e.nextToken),m(!!e.nextToken)}catch(e){m(!1)}finally{d(!1)}}}},c?(0,T.t)(T.K.LOADING):(0,T.t)(T.K.LOAD_MORE)))):i().createElement("div",{className:V.emptyState},i().createElement(j.Bj,{lib:"antd",icon:"inbox",theme:"outlined",className:V.emptyStateIcon}),i().createElement("p",{className:V.emptyStateText},(0,T.t)(T.K.NO_HISTORY)))))}const U=(0,a.forwardRef)((function(e,t){const[n,c]=(0,a.useState)([]),[d,p]=(0,a.useState)(null),[m,u]=(0,a.useState)(!1),f=(0,a.useRef)(null),[g,E]=(0,a.useState)(!1),b=(0,a.useRef)(new Set),{uploadOptions:x,spaceDetail:I}=(0,a.useContext)(L.v),h=(0,a.useMemo)((()=>new o(localStorage)),[]),v=`space_workbench_active_tabs_${I.instanceId}`,N=`space_workbench_active_tab_id_${I.instanceId}`,[w,y]=(0,a.useState)(new Map),A=(0,a.useCallback)((()=>{const e={id:`session_${Date.now()}`,title:(0,T.t)(T.K.NEW_SESSION),conversationId:null};return c((t=>[...t,e])),p(e.id),y((t=>{const n=new Map(t);return n.set(e.id,{conversationId:null,initialRequest:null}),n})),e.id}),[]);(0,a.useEffect)((()=>{const e=h.getItem(v);if(null!=e&&e.length){c(e);const t=h.getItem(N),n=e.some((e=>e.id===t));p(n?t:e[0].id);const a=new Map;e.forEach((e=>{a.set(e.id,{conversationId:e.conversationId,initialRequest:null})})),y(a)}else A()}),[h,A,v,N]),(0,a.useEffect)((()=>{n.length>0&&h.setItem(v,n)}),[h,n,v]),(0,a.useEffect)((()=>{d&&h.setItem(N,d)}),[h,d,N]);const C=(0,a.useCallback)((async(e,t)=>{const n=t||d;if(!n)return;const a=w.get(n);if(null==a||!a.conversationId){u(!0);try{const t=(await s.http.post("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{})).data.conversationId;y((a=>{const i=new Map(a);return i.set(n,{conversationId:t,initialRequest:{...e,conversationId:t,spaceId:I.instanceId}}),i})),c((e=>e.map((e=>e.id===n?{...e,conversationId:t}:e))))}catch(e){(0,l.handleHttpError)(e)}finally{u(!1)}}}),[d,w]);(0,a.useImperativeHandle)(t,(()=>({addNewSession:e=>{const t=A(),n=(null==e?void 0:e.conversationId)||null,a=null==e?void 0:e.content;y((i=>{const o=new Map(i);return o.set(t,{conversationId:n,initialRequest:a?e:null}),o})),c((e=>e.map((e=>e.id===t?{...e,conversationId:n}:e))))},sendMessage:async e=>{const t=A();await C(e,t)}})),[A,C]);const _=(0,a.useCallback)((e=>{e.title&&e.id&&c((t=>t.map((t=>t.conversationId===e.id?{...t,title:e.title}:t)))),e.id&&b.current.add(e.id)}),[]),O=(0,a.useCallback)((e=>{const t=n.find((t=>t.conversationId===e.conversationId));if(t)p(t.id);else{const t={id:`session_${Date.now()}`,title:e.title||(0,T.t)(T.K.NEW_SESSION),conversationId:e.conversationId||null};c((e=>[...e,t])),p(t.id),y((n=>{const a=new Map(n);return a.set(t.id,{conversationId:e.conversationId||null,initialRequest:null}),a}))}E(!1)}),[n]),k=n.find((e=>e.id===d)),R=d?w.get(d):void 0,B=(0,a.useMemo)((()=>{const e=null==R?void 0:R.conversationId,t=null==R?void 0:R.initialRequest;return e&&t?b.current.has(e)?null:t:null}),[null==R?void 0:R.conversationId,null==R?void 0:R.initialRequest]);return i().createElement("div",{className:S.chatArea},i().createElement(D,{tabs:n,activeTabId:d,onTabClick:e=>{p(e)},onTabClose:(e,t)=>{t.stopPropagation();const a=n.findIndex((t=>t.id===e)),i=n.find((t=>t.id===e)),o=n.filter((t=>t.id!==e));if(c(o),y((t=>{const n=new Map(t);return n.delete(e),n})),null!=i&&i.conversationId&&b.current.delete(i.conversationId),d===e&&o.length>0){const e=Math.min(a,o.length-1);p(o[e].id)}0===o.length&&A()},onAddSession:A,onHistoryClick:()=>{E(!0)}}),i().createElement("div",{className:S.chatContent},k&&i().createElement(r.u,{key:k.id,ref:f,conversationId:(null==R?void 0:R.conversationId)||null,initialRequest:B,uploadOptions:x,submitDisabled:m,onChatSubmit:C,onData:_,placeholder:(0,T.t)(T.K.PLEASE_ENTER),help:{useBrick:{brick:"ai-portal.space-chat-guide",properties:{spaceDetail:I}}}})),i().createElement(H,{visible:g,onClose:()=>{E(!1)},onConversationClick:O}))}))},82587:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.serviceFlows--dghUrey_{display:flex;flex-direction:column;width:349px;height:100%;min-height:0;background:rgba(248,250,252,0.5);border-left:1px solid #fff;border-radius:16px;overflow:hidden}.header--HgBAtPFj{display:flex;align-items:center;justify-content:space-between;padding:16px;min-height:70px;flex-shrink:0}.titleContainer--hGtBJGvI{display:flex;flex-direction:column;gap:2px}.title--TYLb924W{margin:0;font-size:14px;font-weight:500;color:rgba(0,0,0,0.85);font-family:"PingFang SC",sans-serif;line-height:20px;letter-spacing:-0.1504px}.subtitle--n0EaQNXr{margin:0;font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);font-family:"Inter","Noto Sans JP","Noto Sans SC",sans-serif;line-height:15px;letter-spacing:0.1172px}.flowList--ip13G_aN{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 12px 20px;display:flex;flex-direction:column;gap:12px}.flowList--ip13G_aN::-webkit-scrollbar{width:6px}.flowList--ip13G_aN::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.15);border-radius:3px}.flowCard--wg5hpF0c{display:flex;flex-direction:column;gap:14px;padding:15px 13px 17px;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;cursor:pointer;transition:all 0.2s ease}.flowCard--wg5hpF0c:hover{border-color:#a1b5ff;box-shadow:0px 2px 4px rgba(37,64,255,0.1)}.cardHeader--rf2tfv8J{display:flex;align-items:center;justify-content:space-between;gap:8px}.flowName--nim4ZVKD{flex:1;font-size:13px;font-weight:500;color:rgba(0,0,0,0.85);font-family:"PingFang SC",sans-serif;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detailButton--cE02SjSK{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:none;cursor:pointer;color:rgba(0,0,0,0.45);transition:color 0.2s ease;flex-shrink:0}.detailButton--cE02SjSK:hover{color:#2540ff}.detailButton--cE02SjSK eo-icon{font-size:14px}.flowDescription--iszVp9Ni{margin:0;font-size:12px;font-weight:400;color:rgba(0,0,0,0.45);font-family:"PingFang SC",sans-serif;line-height:12.5px;letter-spacing:0.1172px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.stageProgress--q7IjLC9N{display:flex;gap:3px;height:4px;align-items:center;overflow:hidden}.progressBar--Lsi6PvRI{flex:1;height:4px;background:rgba(0,0,0,0.08);border-radius:2px;min-width:0}',""]),l.locals={serviceFlows:"serviceFlows--dghUrey_",header:"header--HgBAtPFj",titleContainer:"titleContainer--hGtBJGvI",title:"title--TYLb924W",subtitle:"subtitle--n0EaQNXr",flowList:"flowList--ip13G_aN",flowCard:"flowCard--wg5hpF0c",cardHeader:"cardHeader--rf2tfv8J",flowName:"flowName--nim4ZVKD",detailButton:"detailButton--cE02SjSK",flowDescription:"flowDescription--iszVp9Ni",stageProgress:"stageProgress--q7IjLC9N",progressBar:"progressBar--Lsi6PvRI"};const s=l},94389:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".configPreviewContainer--yNY3q35k{display:flex;flex-direction:column;height:100%;overflow:hidden}.configPreviewHeader--DNjrNlnV{display:flex;justify-content:flex-end;align-items:center;padding:12px 16px;background:transparent}.viewSwitcher--Gl55lnAi{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.8);padding:4px;border-radius:6px;border:1px solid rgba(0,0,0,0.06)}.viewButton--whi8DhXt{display:flex;align-items:center;gap:4px;padding:4px 10px;font-size:12px;color:rgba(0,0,0,0.65);background:transparent;border:none;border-radius:4px;cursor:pointer;transition:all 0.2s}.viewButton--whi8DhXt:hover{color:#1d2129;background:rgba(0,0,0,0.04)}.viewButton--whi8DhXt.active--_wR37vdn{color:#2540ff;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,0.06)}.viewButtonIcon--oU5oLu_G{width:14px;height:14px}.configPreviewBody--K4kW1OkP{flex:1;overflow:auto;padding:0 24px 24px}",""]),l.locals={configPreviewContainer:"configPreviewContainer--yNY3q35k",configPreviewHeader:"configPreviewHeader--DNjrNlnV",viewSwitcher:"viewSwitcher--Gl55lnAi",viewButton:"viewButton--whi8DhXt",active:"active--_wR37vdn",viewButtonIcon:"viewButtonIcon--oU5oLu_G",configPreviewBody:"configPreviewBody--K4kW1OkP"};const s=l},94588:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,".chatArea--YKYBTPRs{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;background:rgba(248,250,252,0.5);border-radius:16px;overflow:hidden;box-shadow:0px 0px 0px 1px rgba(0,0,0,0.06)}.chatContent--TopyzJBe{flex:1;min-height:0;overflow:hidden;position:relative;padding:20px}",""]),l.locals={chatArea:"chatArea--YKYBTPRs",chatContent:"chatContent--TopyzJBe"};const s=l},95850:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o),s=n(20062),r=n.n(s),c=new URL(n(32360),n.b),d=l()(i()),p=r()(c);d.push([e.id,`.container--IEVu6SwI{display:block;width:100%;height:100%;position:relative}.container--IEVu6SwI::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}.spaceWorkbenchContainer--gkoOVSLf{display:flex;flex-direction:column;height:100vh}.spaceWorkbenchContent--ccPayY4y{display:flex;gap:15px;flex:1;min-height:0;padding:0 24px 20px;overflow:hidden;align-items:stretch}`,""]),d.locals={container:"container--IEVu6SwI",spaceWorkbenchContainer:"spaceWorkbenchContainer--gkoOVSLf",spaceWorkbenchContent:"spaceWorkbenchContent--ccPayY4y"};const m=d},96465:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(36758),i=n.n(a),o=n(40935),l=n.n(o)()(i());l.push([e.id,'.businessFlowPreview--mNpMh7gZ{background:#fff;border-radius:12px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}.flowHeader--NE0UwE3g{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.flowTitleArea--_BBntwB4{display:flex;flex-direction:column;gap:4px}.flowTitle--iDw5rVFR{font-size:18px;font-weight:600;color:#1d2129}.flowDescription--IV2wzffp{font-size:13px;color:rgba(0,0,0,0.45)}.flowBadge--fiNjj0d0{padding:4px 12px;font-size:12px;font-weight:500;color:#2540ff;background:rgba(37,64,255,0.08);border:1px solid rgba(37,64,255,0.2);border-radius:16px;white-space:nowrap}.flowSection--i1oQlw1W{margin-bottom:24px}.flowSection--i1oQlw1W:last-child{margin-bottom:0}.sectionTitle--tELiGZeX{display:flex;align-items:center;gap:8px}.prerequisitesIcon--OfQsltW6{width:16px;height:16px;color:#2540ff}.prerequisitesSubtitle--kiyi4Euv{font-size:13px;color:rgba(0,0,0,0.65);margin-bottom:8px}.prerequisitesList--PrLQhk8U{display:flex;flex-direction:column;gap:8px;padding-left:4px}.prerequisiteItem--ByEEG3PH{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:rgba(0,0,0,0.65);line-height:1.5}.prerequisiteItem--ByEEG3PH::before{content:"•";color:rgba(0,0,0,0.25);flex-shrink:0}.stagesContainer--oWEV6pXE{display:flex;gap:24px;border:1px solid rgba(0,0,0,0.1);border-radius:12px;padding:23px 26px;background:#fff;overflow:hidden}.stageColumn--kV8p6j24{flex:1;min-width:0;display:flex;flex-direction:column;gap:15px}.stageActivities--rGeR247I{display:flex;flex-direction:column;gap:8px}.stageIndicator--V0xwXYtQ{display:flex;align-items:center;gap:12px;flex-shrink:0}.stageIndicatorNumber--sAzIQr3N{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:#e6ebef;border:2px solid #e6ebef;border-radius:50%;font-family:"PingFang SC",sans-serif;font-size:14px;font-weight:600;line-height:20px;color:#45556c;flex-shrink:0}.stageIndicatorName--mNJqDA6j{font-family:"PingFang SC",sans-serif;font-size:14px;font-weight:600;line-height:20px;color:#1d293d;letter-spacing:0.35px;white-space:nowrap;flex-shrink:0}.stageIndicatorLine--KEldEXve{height:0;border-top:1px dashed rgba(0,0,0,0.15);flex:1;min-width:40px}.jsonView--TxF2k1Ea{background:#fff;border-radius:12px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,0.04);overflow:auto;height:100%}.jsonView--TxF2k1Ea pre{margin:0;font-family:"SF Mono","Monaco","Inconsolata","Fira Mono","Droid Sans Mono",monospace;font-size:12px;line-height:1.6;color:#1d2129;white-space:pre-wrap;word-break:break-all}',""]),l.locals={businessFlowPreview:"businessFlowPreview--mNpMh7gZ",flowHeader:"flowHeader--NE0UwE3g",flowTitleArea:"flowTitleArea--_BBntwB4",flowTitle:"flowTitle--iDw5rVFR",flowDescription:"flowDescription--IV2wzffp",flowBadge:"flowBadge--fiNjj0d0",flowSection:"flowSection--i1oQlw1W",sectionTitle:"sectionTitle--tELiGZeX",prerequisitesIcon:"prerequisitesIcon--OfQsltW6",prerequisitesSubtitle:"prerequisitesSubtitle--kiyi4Euv",prerequisitesList:"prerequisitesList--PrLQhk8U",prerequisiteItem:"prerequisiteItem--ByEEG3PH",stagesContainer:"stagesContainer--oWEV6pXE",stageColumn:"stageColumn--kV8p6j24",stageActivities:"stageActivities--rGeR247I",stageIndicator:"stageIndicator--V0xwXYtQ",stageIndicatorNumber:"stageIndicatorNumber--sAzIQr3N",stageIndicatorName:"stageIndicatorName--mNJqDA6j",stageIndicatorLine:"stageIndicatorLine--KEldEXve",jsonView:"jsonView--TxF2k1Ea"};const s=l}}]);
|
|
3
|
+
//# sourceMappingURL=4459.dbfa8706.js.map
|