@next-bricks/ai-portal 0.58.12 → 0.58.13

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