@glodon-aiot/agent-cli-ui 3.6.2-alpha.16 → 3.6.2-alpha.17

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.
@@ -1,14 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useRef as n, useEffect as u } from "react";
2
+ import { useRef as u, useEffect as e } from "react";
3
3
  /* empty css */const l = ({
4
- visible: e = !0,
5
- text: f = "所有内容均由 AecGPT 人工智能模型生成,请仔细甄别。",
4
+ visible: f = !0,
5
+ text: n = "所有内容均由人工智能模型生成,请仔细甄别。",
6
6
  element: r
7
7
  }) => {
8
- if (!e)
8
+ if (!f)
9
9
  return null;
10
- const t = n(null);
11
- return u(() => {
10
+ const t = u(null);
11
+ return e(() => {
12
12
  var i;
13
13
  r && ((i = t.current) == null || i.replaceWith(r));
14
14
  }, [r]), r ? /* @__PURE__ */ o("div", {
@@ -16,7 +16,7 @@ import { useRef as n, useEffect as u } from "react";
16
16
  }) : /* @__PURE__ */ o("div", {
17
17
  className: "footer-warning",
18
18
  ref: t,
19
- children: f
19
+ children: n
20
20
  });
21
21
  };
22
22
  export {
@@ -1,4 +1,4 @@
1
- const e = "@glodon-aiot/agent-cli-ui", t = "3.6.2-alpha.16", s = "./dist/es/index.mjs", i = "./dist/lib/index.js", o = "./dist/src/index.d.ts", n = {
1
+ const e = "@glodon-aiot/agent-cli-ui", t = "3.6.2-alpha.17", s = "./dist/es/index.mjs", i = "./dist/lib/index.js", o = "./dist/src/index.d.ts", n = {
2
2
  import: "./dist/es/index.mjs",
3
3
  require: "./dist/lib/index.js",
4
4
  types: "./dist/src/index.d.ts"
@@ -25,8 +25,8 @@ const e = "@glodon-aiot/agent-cli-ui", t = "3.6.2-alpha.16", s = "./dist/es/inde
25
25
  webpack: "*"
26
26
  }, p = {
27
27
  "@ant-design/icons": "^5.3.4",
28
- "@glodon-aiot/apis": "^3.6.2-alpha.16",
29
- "@glodon-aiot/bot-client-sdk": "^3.6.2-alpha.16",
28
+ "@glodon-aiot/apis": "^3.6.2-alpha.17",
29
+ "@glodon-aiot/bot-client-sdk": "^3.6.2-alpha.17",
30
30
  "@matejmazur/react-mathjax": "^0.1.10",
31
31
  "@react-pdf-viewer/core": "^3.12.0",
32
32
  "@react-pdf-viewer/default-layout": "^3.12.0",
@@ -1 +1 @@
1
- .gbot-dialog-modal .quill-editor{position:relative}.gbot-dialog-modal .quill-editor .ql-container{border-radius:4px}.gbot-dialog-modal .quill-editor .ql-container:hover{border:1px solid none;outline:0}.gbot-dialog-modal .quill-editor .quill-editor-send{position:absolute;left:8px;right:8px;bottom:34px;height:0;display:flex;justify-content:space-between}.gbot-dialog-modal .quill-editor .ql-editor:before{font-style:normal;font-weight:400}.gbot-dialog-modal .quill-editor .ql-editor.hide-placeholder:before{display:none!important}.gbot-dialog-modal .quill-editor .shortcut-direct{width:15px;height:15px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .quill-editor .shortcut-direct .gbot-popover-inner-content{padding:0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel{width:180px;padding:4px 0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:pointer}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .title{color:#393939}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .text{color:#84868c}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item:hover{background:#f9f2ff}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:not-allowed}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .title,.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .text{color:#b8babf}.gbot-dialog-modal .quill-editor__active .ql-container{transition:all .3s,height 0;border:1px solid #b452ff;outline:0;box-shadow:none}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper{max-height:344px;position:relative}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:32px}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper{max-height:200px;position:relative}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:24px}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}
1
+ .gbot-dialog-modal .history-item{margin-bottom:16px}.gbot-dialog-modal .history-item .history-item-user{width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel{display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main{max-width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main .item-user-content{background:#f9f2ff;padding:12px;border-radius:12px 2px 12px 12px;border:1px solid #9c24f2;display:inline-block;width:auto;max-width:100%;color:#070c14;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-user .item-user-file{display:flex-end;margin-top:10px}.gbot-dialog-modal .history-item .history-item-user .item-user-images{display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user ::selection{background-color:#b1d7ffb3;color:#fff}.gbot-dialog-modal .history-item .history-item-bot{width:100%;border-radius:2px 12px 12px;background:white;padding:0 12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-success{display:inline-block;width:14px;height:14px;color:#fff;background:#47d1cb;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-error{display:inline-block;width:14px;height:14px;color:#fff;background:#f95b81;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-loading{display:inline-block;width:14px;height:14px;color:#477bff;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-title{font-weight:700;color:#000000a6}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-action{border:1px solid #00000026;border-radius:4px;color:#000000e0;padding:1px 8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-header{padding:0;height:38px;display:flex;align-items:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-content-box{padding:0}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-content{height:32px;line-height:32px;font-weight:700}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-json{background:white}.gbot-dialog-modal .history-item .history-item-bot .item-bot-net{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content{width:100%;border-radius:2px 12px 12px;background:white;padding:12px 0;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think{margin-bottom:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top{font-size:14px;line-height:24px;color:#070c14;display:flex;align-items:center;margin-bottom:12px;cursor:pointer}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top img{width:24px;margin-right:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top .think-action{margin-left:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom{font-size:14px;line-height:150%;color:#999;position:relative}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left{background:#d9d9d9;width:1px;position:absolute;left:10px;top:4px;bottom:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinking{position:absolute;left:-5px;top:0;width:12px;height:12px;background:#b752ea;border-radius:50%}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinked{position:absolute;z-index:100;left:-5px;top:0;width:12px;height:12px;background:#04d68d;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-right{padding-left:22px}.gbot-dialog-modal .history-item .gbot-collapse-item{border-radius:4px;background-color:#f5f5f5;margin-bottom:8px;padding:0 0 0 8px}.gbot-dialog-modal .history-item .gbot-collapse-item .gbot-collapse-content{padding-bottom:8px}.gbot-dialog-modal .history-item .gbot-collapse-item:last-child{margin-bottom:0}.gbot-dialog-modal .history-item .gbot-collapse-header-text{width:100%}.gbot-dialog-modal.inlay .history-item__user{display:flex;justify-content:flex-end}.gbot-dialog-modal.inlay .history-item-user,.gbot-dialog-modal.inlay .history-item-bot{max-width:calc(100% - 64px)}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-inner-content{padding:6px}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-arrow{display:none}
@@ -1 +1 @@
1
- .gbot-dialog-modal .home-footer{background:#f5f5f5;width:100%;max-width:824px;margin:0 auto}.gbot-dialog-modal .home-footer .footer-warning{display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:400;line-height:18px;text-align:left;color:#999}
1
+ .gbot-dialog-modal .quill-editor{position:relative}.gbot-dialog-modal .quill-editor .ql-container{border-radius:4px}.gbot-dialog-modal .quill-editor .ql-container:hover{border:1px solid none;outline:0}.gbot-dialog-modal .quill-editor .quill-editor-send{position:absolute;left:8px;right:8px;bottom:34px;height:0;display:flex;justify-content:space-between}.gbot-dialog-modal .quill-editor .ql-editor:before{font-style:normal;font-weight:400}.gbot-dialog-modal .quill-editor .ql-editor.hide-placeholder:before{display:none!important}.gbot-dialog-modal .quill-editor .shortcut-direct{width:15px;height:15px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .quill-editor .shortcut-direct .gbot-popover-inner-content{padding:0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel{width:180px;padding:4px 0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:pointer}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .title{color:#393939}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .text{color:#84868c}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item:hover{background:#f9f2ff}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:not-allowed}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .title,.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .text{color:#b8babf}.gbot-dialog-modal .quill-editor__active .ql-container{transition:all .3s,height 0;border:1px solid #b452ff;outline:0;box-shadow:none}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper{max-height:344px;position:relative}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:32px}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper{max-height:200px;position:relative}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:24px}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}
@@ -1 +1 @@
1
- .gbot-dialog-modal.inlay .questions,.gbot-dialog-modal.float .questions{width:100%}.gbot-dialog-modal .questions .question-tip{display:flex;align-items:center;margin-bottom:10px;height:24px;color:#84868c}.gbot-dialog-modal .questions .question-tip img{width:24px;height:24px}.gbot-dialog-modal .questions .question-row{max-height:260px;overflow-y:auto}.gbot-dialog-modal .questions .question-pannel{background:white;padding:12px;border-radius:8px;width:100%;cursor:pointer;border:1px solid transparent}.gbot-dialog-modal .questions .question-pannel .question-top{font-size:16px;height:32px;color:#070c14;font-weight:700;display:flex;width:100%}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-tip{flex:0 0 24px;margin-right:8px}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-title{flex:0 0 1;overflow:hidden;display:flex;align-items:center}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-type{margin-left:8px;flex:0 0 24px}.gbot-dialog-modal .questions .question-pannel .question-top .question-only-plus-file{margin-left:0}.gbot-dialog-modal .questions .question-pannel .question-top img{width:24px}.gbot-dialog-modal .questions .question-pannel .not-have-top{display:none}.gbot-dialog-modal .questions .question-pannel .question-bottom{font-size:14px;color:#070c14;line-height:21px}.gbot-dialog-modal .questions .question-pannel .multiline-question{height:56px;margin-top:-7px}.gbot-dialog-modal .questions .question-pannel__active{border:1px solid #b452ff;transition:all .25s}.gbot-dialog-modal .questions .multiline-question-pannel{padding:16px 12px}.gbot-dialog-modal .recommend-tooltip-overlay .gbot-tooltip-inner{max-width:400px;max-height:300px;overflow-y:auto}
1
+ .gbot-dialog-modal .home-footer{background:#f5f5f5;width:100%;max-width:824px;margin:0 auto}.gbot-dialog-modal .home-footer .footer-warning{display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:400;line-height:18px;text-align:left;color:#999}
@@ -1 +1 @@
1
- .gbot-dialog-modal .greeting{display:flex;flex-direction:column;align-items:center;flex:1;margin:0 auto;max-width:824px;width:100%;padding:16px 0}.gbot-dialog-modal .greeting-icon{width:74px;height:74px;border-radius:50%;box-shadow:0 6px 16px 2px #070c1414;padding:5px;margin-bottom:24px}.gbot-dialog-modal .greeting-icon img{width:64px;height:64px}.gbot-dialog-modal .greeting-word{font-weight:700;font-size:24px;line-height:30px;margin-bottom:24px}.gbot-dialog-modal .greeting-questions{width:100%;padding:0 12px}.gbot-dialog-modal.inlay .greeting{margin-top:40px}.gbot-dialog-modal.float .greeting{overflow-y:auto;flex:none}
1
+ .gbot-dialog-modal.inlay .questions,.gbot-dialog-modal.float .questions{width:100%}.gbot-dialog-modal .questions .question-tip{display:flex;align-items:center;margin-bottom:10px;height:24px;color:#84868c}.gbot-dialog-modal .questions .question-tip img{width:24px;height:24px}.gbot-dialog-modal .questions .question-row{max-height:260px;overflow-y:auto}.gbot-dialog-modal .questions .question-pannel{background:white;padding:12px;border-radius:8px;width:100%;cursor:pointer;border:1px solid transparent}.gbot-dialog-modal .questions .question-pannel .question-top{font-size:16px;height:32px;color:#070c14;font-weight:700;display:flex;width:100%}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-tip{flex:0 0 24px;margin-right:8px}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-title{flex:0 0 1;overflow:hidden;display:flex;align-items:center}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-type{margin-left:8px;flex:0 0 24px}.gbot-dialog-modal .questions .question-pannel .question-top .question-only-plus-file{margin-left:0}.gbot-dialog-modal .questions .question-pannel .question-top img{width:24px}.gbot-dialog-modal .questions .question-pannel .not-have-top{display:none}.gbot-dialog-modal .questions .question-pannel .question-bottom{font-size:14px;color:#070c14;line-height:21px}.gbot-dialog-modal .questions .question-pannel .multiline-question{height:56px;margin-top:-7px}.gbot-dialog-modal .questions .question-pannel__active{border:1px solid #b452ff;transition:all .25s}.gbot-dialog-modal .questions .multiline-question-pannel{padding:16px 12px}.gbot-dialog-modal .recommend-tooltip-overlay .gbot-tooltip-inner{max-width:400px;max-height:300px;overflow-y:auto}
@@ -1 +1 @@
1
- .gbot-dialog-modal .prompt-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .prompt-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
1
+ .gbot-dialog-modal .greeting{display:flex;flex-direction:column;align-items:center;flex:1;margin:0 auto;max-width:824px;width:100%;padding:16px 0}.gbot-dialog-modal .greeting-icon{width:74px;height:74px;border-radius:50%;box-shadow:0 6px 16px 2px #070c1414;padding:5px;margin-bottom:24px}.gbot-dialog-modal .greeting-icon img{width:64px;height:64px}.gbot-dialog-modal .greeting-word{font-weight:700;font-size:24px;line-height:30px;margin-bottom:24px}.gbot-dialog-modal .greeting-questions{width:100%;padding:0 12px}.gbot-dialog-modal.inlay .greeting{margin-top:40px}.gbot-dialog-modal.float .greeting{overflow-y:auto;flex:none}
@@ -1 +1 @@
1
- .gbot-dialog-modal .history-item{margin-bottom:16px}.gbot-dialog-modal .history-item .history-item-user{width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel{display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main{max-width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main .item-user-content{background:#f9f2ff;padding:12px;border-radius:12px 2px 12px 12px;border:1px solid #9c24f2;display:inline-block;width:auto;max-width:100%;color:#070c14;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-user .item-user-file{display:flex-end;margin-top:10px}.gbot-dialog-modal .history-item .history-item-user .item-user-images{display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user ::selection{background-color:#b1d7ffb3;color:#fff}.gbot-dialog-modal .history-item .history-item-bot{width:100%;border-radius:2px 12px 12px;background:white;padding:0 12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-success{display:inline-block;width:14px;height:14px;color:#fff;background:#47d1cb;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-error{display:inline-block;width:14px;height:14px;color:#fff;background:#f95b81;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-loading{display:inline-block;width:14px;height:14px;color:#477bff;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-title{font-weight:700;color:#000000a6}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-action{border:1px solid #00000026;border-radius:4px;color:#000000e0;padding:1px 8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-header{padding:0;height:38px;display:flex;align-items:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-content-box{padding:0}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-content{height:32px;line-height:32px;font-weight:700}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-json{background:white}.gbot-dialog-modal .history-item .history-item-bot .item-bot-net{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content{width:100%;border-radius:2px 12px 12px;background:white;padding:12px 0;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think{margin-bottom:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top{font-size:14px;line-height:24px;color:#070c14;display:flex;align-items:center;margin-bottom:12px;cursor:pointer}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top img{width:24px;margin-right:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top .think-action{margin-left:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom{font-size:14px;line-height:150%;color:#999;position:relative}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left{background:#d9d9d9;width:1px;position:absolute;left:10px;top:4px;bottom:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinking{position:absolute;left:-5px;top:0;width:12px;height:12px;background:#b752ea;border-radius:50%}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinked{position:absolute;z-index:100;left:-5px;top:0;width:12px;height:12px;background:#04d68d;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-right{padding-left:22px}.gbot-dialog-modal .history-item .gbot-collapse-item{border-radius:4px;background-color:#f5f5f5;margin-bottom:8px;padding:0 0 0 8px}.gbot-dialog-modal .history-item .gbot-collapse-item .gbot-collapse-content{padding-bottom:8px}.gbot-dialog-modal .history-item .gbot-collapse-item:last-child{margin-bottom:0}.gbot-dialog-modal .history-item .gbot-collapse-header-text{width:100%}.gbot-dialog-modal.inlay .history-item__user{display:flex;justify-content:flex-end}.gbot-dialog-modal.inlay .history-item-user,.gbot-dialog-modal.inlay .history-item-bot{max-width:calc(100% - 64px)}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-inner-content{padding:6px}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-arrow{display:none}
1
+ .gbot-dialog-modal .prompt-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .prompt-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
@@ -1 +1 @@
1
- .gbot-dialog-modal .prompt-setting-panel{display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .agent-prompt{margin:12px 12px 0;padding:12px;border-radius:4px;border:1px solid #e8e9eb;background:#fff;flex:1;max-width:824px}.gbot-dialog-modal .agent-prompt .prompt-header{font-size:16px;line-height:24px;font-weight:600;color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-btn{color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-title{color:#5c5f66;font-style:normal;line-height:150%}.gbot-dialog-modal .agent-prompt .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .agent-prompt .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .agent-prompt .icon-prompt-question{cursor:pointer}.gbot-dialog-modal .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .icon-prompt-question{cursor:pointer}
1
+ .gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper{height:calc(100% - 54px)!important;border-radius:12px 12px 0 0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header{padding:12px 16px;border-bottom:none}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title{justify-content:space-between;flex-direction:row-reverse;font-size:16px;color:#393939}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title .gbot-drawer-close{margin:0;padding:0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-body{padding:0 16px 26px}.gbot-dialog-modal .session-history-drawer.loading-panel .gbot-drawer-body{display:flex;justify-content:center;align-items:center}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions{width:100%}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions .sessions-main{border:none}
@@ -1 +1 @@
1
- .gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper{height:calc(100% - 54px)!important;border-radius:12px 12px 0 0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header{padding:12px 16px;border-bottom:none}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title{justify-content:space-between;flex-direction:row-reverse;font-size:16px;color:#393939}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title .gbot-drawer-close{margin:0;padding:0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-body{padding:0 16px 26px}.gbot-dialog-modal .session-history-drawer.loading-panel .gbot-drawer-body{display:flex;justify-content:center;align-items:center}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions{width:100%}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions .sessions-main{border:none}
1
+ .gbot-dialog-modal .prompt-setting-panel{display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .agent-prompt{margin:12px 12px 0;padding:12px;border-radius:4px;border:1px solid #e8e9eb;background:#fff;flex:1;max-width:824px}.gbot-dialog-modal .agent-prompt .prompt-header{font-size:16px;line-height:24px;font-weight:600;color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-btn{color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-title{color:#5c5f66;font-style:normal;line-height:150%}.gbot-dialog-modal .agent-prompt .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .agent-prompt .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .agent-prompt .icon-prompt-question{cursor:pointer}.gbot-dialog-modal .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .icon-prompt-question{cursor:pointer}
@@ -1 +1 @@
1
- .gbot-dialog-modal .session-action{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e8e9eb;color:#84868c}.gbot-dialog-modal .session-action .session-action-again{cursor:pointer;user-select:none}.gbot-dialog-modal .session-action .session-action-again:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment{border-radius:4px;padding:4px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback{font-size:16px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item{display:inline-block;width:100%;height:100%;cursor:pointer}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item__active{color:#9c24f2}.gbot-dialog-modal .cai-pannel{width:260px;overflow:hidden}.gbot-dialog-modal .cai-pannel .cai-error{color:#f33e3e;margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title{margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title .cai-require{color:#f33e3e}.gbot-dialog-modal .cai-pannel .cai-title .cai-question{color:#070c14;text-align:center;font-size:14px}.gbot-dialog-modal .cai-pannel .cai-list{display:flex;flex-wrap:wrap}.gbot-dialog-modal .cai-pannel .cai-list .cai-item{padding:6px 8px;border-radius:4px;border:1px solid #e8e9eb;margin-bottom:12px;margin-right:12px;cursor:pointer}.gbot-dialog-modal .cai-pannel .cai-list .cai-item:hover{color:#b452ff;border:1px solid #b452ff}.gbot-dialog-modal .cai-pannel .cai-list .cai-item__active{color:#8614cc;border:1px solid #8614cc}.gbot-dialog-modal .chat-item:last-child{margin-bottom:0}
1
+ .gbot-dialog-modal .file-item{height:64px;border-radius:6px;overflow:hidden;padding:12px;display:flex;background:white;cursor:pointer}.gbot-dialog-modal .file-item .item-left{flex:0 0 40px;margin-right:8px}.gbot-dialog-modal .file-item .item-left .file-icon{width:100%}.gbot-dialog-modal .file-item .item-main{flex:1;overflow:hidden}.gbot-dialog-modal .file-item .item-main .file-name{width:100%;font-size:14px;color:#070c14;font-weight:700;line-height:18px;margin-bottom:4px}.gbot-dialog-modal .file-item .item-main .file-desc{font-size:12px;height:15px;color:#84868c}
@@ -1 +1 @@
1
- .gbot-dialog-modal .file-item{height:64px;border-radius:6px;overflow:hidden;padding:12px;display:flex;background:white;cursor:pointer}.gbot-dialog-modal .file-item .item-left{flex:0 0 40px;margin-right:8px}.gbot-dialog-modal .file-item .item-left .file-icon{width:100%}.gbot-dialog-modal .file-item .item-main{flex:1;overflow:hidden}.gbot-dialog-modal .file-item .item-main .file-name{width:100%;font-size:14px;color:#070c14;font-weight:700;line-height:18px;margin-bottom:4px}.gbot-dialog-modal .file-item .item-main .file-desc{font-size:12px;height:15px;color:#84868c}
1
+ .gbot-dialog-modal .session-action{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e8e9eb;color:#84868c}.gbot-dialog-modal .session-action .session-action-again{cursor:pointer;user-select:none}.gbot-dialog-modal .session-action .session-action-again:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment{border-radius:4px;padding:4px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback{font-size:16px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item{display:inline-block;width:100%;height:100%;cursor:pointer}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item__active{color:#9c24f2}.gbot-dialog-modal .cai-pannel{width:260px;overflow:hidden}.gbot-dialog-modal .cai-pannel .cai-error{color:#f33e3e;margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title{margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title .cai-require{color:#f33e3e}.gbot-dialog-modal .cai-pannel .cai-title .cai-question{color:#070c14;text-align:center;font-size:14px}.gbot-dialog-modal .cai-pannel .cai-list{display:flex;flex-wrap:wrap}.gbot-dialog-modal .cai-pannel .cai-list .cai-item{padding:6px 8px;border-radius:4px;border:1px solid #e8e9eb;margin-bottom:12px;margin-right:12px;cursor:pointer}.gbot-dialog-modal .cai-pannel .cai-list .cai-item:hover{color:#b452ff;border:1px solid #b452ff}.gbot-dialog-modal .cai-pannel .cai-list .cai-item__active{color:#8614cc;border:1px solid #8614cc}.gbot-dialog-modal .chat-item:last-child{margin-bottom:0}
@@ -1 +1 @@
1
- .gbot-dialog-modal .clear-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .clear-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
1
+ .gbot-dialog-modal .file-card{height:38px;min-width:232px;max-width:600px;display:flex;padding:6px 12px 6px 6px;align-items:center;gap:4px;border-radius:6px;background:#ffffff;position:relative}.gbot-dialog-modal .file-card .analysis{display:flex;justify-content:center;align-items:center;gap:8px;font-size:12px;font-weight:400;line-height:22px;text-align:left;color:#84868c}.gbot-dialog-modal .file-card .file-icon{height:100%;width:24px}.gbot-dialog-modal .file-card.small{height:30px;width:150px;padding:3px 6px 3px 3px}.gbot-dialog-modal .file-card.small .file-icon{width:24px}.gbot-dialog-modal .file-card .file-desc{flex:1;overflow:hidden}.gbot-dialog-modal .file-card .file-desc .file-desc-name{color:#5c5f66;font-size:12px;font-style:normal;font-weight:700;line-height:150%}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover{cursor:pointer}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover .gbot-typography{color:#b452ff}.gbot-dialog-modal .file-card .file-desc .file-desc-size{color:#84868c;font-size:10px;font-style:normal;font-weight:400;line-height:150%}.gbot-dialog-modal .file-card .file-process{background-color:#f7f7f9;border-radius:8px;width:16px;height:16px;line-height:16px;text-align:center;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove{cursor:pointer;display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#151b26;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove:hover{background-color:#fff;color:#b452ff}.gbot-dialog-modal .file-card .file-failed{display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#dc4446;display:inline-flex;align-items:center;justify-content:center}
@@ -1 +1 @@
1
- .gbot-dialog-modal .file-card{height:38px;min-width:232px;max-width:600px;display:flex;padding:6px 12px 6px 6px;align-items:center;gap:4px;border-radius:6px;background:#ffffff;position:relative}.gbot-dialog-modal .file-card .analysis{display:flex;justify-content:center;align-items:center;gap:8px;font-size:12px;font-weight:400;line-height:22px;text-align:left;color:#84868c}.gbot-dialog-modal .file-card .file-icon{height:100%;width:24px}.gbot-dialog-modal .file-card.small{height:30px;width:150px;padding:3px 6px 3px 3px}.gbot-dialog-modal .file-card.small .file-icon{width:24px}.gbot-dialog-modal .file-card .file-desc{flex:1;overflow:hidden}.gbot-dialog-modal .file-card .file-desc .file-desc-name{color:#5c5f66;font-size:12px;font-style:normal;font-weight:700;line-height:150%}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover{cursor:pointer}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover .gbot-typography{color:#b452ff}.gbot-dialog-modal .file-card .file-desc .file-desc-size{color:#84868c;font-size:10px;font-style:normal;font-weight:400;line-height:150%}.gbot-dialog-modal .file-card .file-process{background-color:#f7f7f9;border-radius:8px;width:16px;height:16px;line-height:16px;text-align:center;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove{cursor:pointer;display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#151b26;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove:hover{background-color:#fff;color:#b452ff}.gbot-dialog-modal .file-card .file-failed{display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#dc4446;display:inline-flex;align-items:center;justify-content:center}
1
+ .gbot-dialog-modal .clear-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .clear-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
package/dist/lib/index.js CHANGED
@@ -313,10 +313,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
313
313
  ]))(?:`+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|'+a+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source)+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:r,quoted:{pattern:RegExp(/(^|\s)/.source+a),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}})(t)}return Up}var Pp,LE;function xm(){if(LE)return Pp;LE=1,Pp=e,e.displayName="t4Templating",e.aliases=[];function e(t){(function(n){function r(i,s,o){return{pattern:RegExp("<#"+i+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+i+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:s,alias:o}}}}function a(i){var s=n.languages[i],o="language-"+i;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:r("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:r("=",s,o),"class-feature":r("\\+",s,o),standard:r("",s,o)}}}}n.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:a})})(t)}return Pp}var Qp,wE;function bee(){if(wE)return Qp;wE=1;var e=xm(),t=ic();Qp=n,n.displayName="t4Cs",n.aliases=[];function n(r){r.register(e),r.register(t),r.languages.t4=r.languages["t4-cs"]=r.languages["t4-templating"].createT4("csharp")}return Qp}var Bp,CE;function Cx(){if(CE)return Bp;CE=1;var e=jx();Bp=t,t.displayName="vbnet",t.aliases=[];function t(n){n.register(e),n.languages.vbnet=n.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}return Bp}var Fp,xE;function Eee(){if(xE)return Fp;xE=1;var e=xm(),t=Cx();Fp=n,n.displayName="t4Vb",n.aliases=[];function n(r){r.register(e),r.register(t),r.languages["t4-vb"]=r.languages["t4-templating"].createT4("vbnet")}return Fp}var Gp,SE;function xx(){if(SE)return Gp;SE=1,Gp=e,e.displayName="yaml",e.aliases=["yml"];function e(t){(function(n){var r=/[*&][^\s[\]{},]+/,a=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+a.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+a.source+")?)",s=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(l,c){c=(c||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return l});return RegExp(d,c)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+s+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(o),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:a,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(t)}return Gp}var Hp,OE;function jee(){if(OE)return Hp;OE=1;var e=xx();Hp=t,t.displayName="tap",t.aliases=[];function t(n){n.register(e),n.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:n.languages.yaml,alias:"language-yaml"}}}return Hp}var Wp,vE;function zee(){if(vE)return Wp;vE=1,Wp=e,e.displayName="tcl",e.aliases=[];function e(t){t.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}return Wp}var qp,kE;function Lee(){if(kE)return qp;kE=1,qp=e,e.displayName="textile",e.aliases=[];function e(t){(function(n){var r=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,a=/\)|\((?![^|()\n]+\))/.source;function i(M,g){return RegExp(M.replace(/<MOD>/g,function(){return"(?:"+r+")"}).replace(/<PAR>/g,function(){return"(?:"+a+")"}),g||"")}var s={css:{pattern:/\{[^{}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},o=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:i(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:i(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:s},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:i(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:i(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:s},punctuation:/^[*#]+/}},table:{pattern:i(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:i(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:s},punctuation:/\||^\./}},inline:{pattern:i(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:i(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:i(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:i(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:i(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:i(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:i(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:i(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:i(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:s},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:i(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:i(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:i(/(^")<MOD>+/.source),lookbehind:!0,inside:s},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:i(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:i(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:i(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:s},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),u=o.phrase.inside,l={inline:u.inline,link:u.link,image:u.image,footnote:u.footnote,acronym:u.acronym,mark:u.mark};o.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var c=u.inline.inside;c.bold.inside=l,c.italic.inside=l,c.inserted.inside=l,c.deleted.inside=l,c.span.inside=l;var d=u.table.inside;d.inline=l.inline,d.link=l.link,d.image=l.image,d.footnote=l.footnote,d.acronym=l.acronym,d.mark=l.mark})(t)}return qp}var $p,_E;function wee(){if(_E)return $p;_E=1,$p=e,e.displayName="toml",e.aliases=[];function e(t){(function(n){var r=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function a(i){return i.replace(/__/g,function(){return r})}n.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(a(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(a(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}return $p}var Vp,RE;function Cee(){if(RE)return Vp;RE=1,Vp=e,e.displayName="tremor",e.aliases=[];function e(t){(function(n){n.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var r=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;n.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+r+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+r+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(r),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.tremor}}},string:/[\s\S]+/}},n.languages.troy=n.languages.tremor,n.languages.trickle=n.languages.tremor})(t)}return Vp}var Zp,YE;function xee(){if(YE)return Zp;YE=1;var e=Lx(),t=Lm();Zp=n,n.displayName="tsx",n.aliases=[];function n(r){r.register(e),r.register(t),function(a){var i=a.util.clone(a.languages.typescript);a.languages.tsx=a.languages.extend("jsx",i),delete a.languages.tsx.parameter,delete a.languages.tsx["literal-property"];var s=a.languages.tsx.tag;s.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+s.pattern.source+")",s.pattern.flags),s.lookbehind=!0}(r)}return Zp}var Xp,UE;function See(){if(UE)return Xp;UE=1;var e=Fn();Xp=t,t.displayName="tt2",t.aliases=[];function t(n){n.register(e),function(r){r.languages.tt2=r.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),r.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),r.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),r.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete r.languages.tt2.string,r.hooks.add("before-tokenize",function(a){var i=/\[%[\s\S]+?%\]/g;r.languages["markup-templating"].buildPlaceholders(a,"tt2",i)}),r.hooks.add("after-tokenize",function(a){r.languages["markup-templating"].tokenizePlaceholders(a,"tt2")})}(n)}return Xp}var Jp,PE;function Oee(){if(PE)return Jp;PE=1;var e=Fn();Jp=t,t.displayName="twig",t.aliases=[];function t(n){n.register(e),n.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},n.hooks.add("before-tokenize",function(r){if(r.language==="twig"){var a=/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g;n.languages["markup-templating"].buildPlaceholders(r,"twig",a)}}),n.hooks.add("after-tokenize",function(r){n.languages["markup-templating"].tokenizePlaceholders(r,"twig")})}return Jp}var Kp,QE;function vee(){if(QE)return Kp;QE=1,Kp=e,e.displayName="typoscript",e.aliases=["tsconfig"];function e(t){(function(n){var r=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;n.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern:/<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:r}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:r,number:/^\d+$/,punctuation:/[,|:]/}},keyword:r,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},n.languages.tsconfig=n.languages.typoscript})(t)}return Kp}var ef,BE;function kee(){if(BE)return ef;BE=1,ef=e,e.displayName="unrealscript",e.aliases=["uc","uscript"];function e(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}return ef}var tf,FE;function _ee(){if(FE)return tf;FE=1,tf=e,e.displayName="uorazor",e.aliases=[];function e(t){t.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}return tf}var nf,GE;function Ree(){if(GE)return nf;GE=1,nf=e,e.displayName="uri",e.aliases=["url"];function e(t){t.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")")+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},t.languages.url=t.languages.uri}return nf}var rf,HE;function Yee(){if(HE)return rf;HE=1,rf=e,e.displayName="v",e.aliases=[];function e(t){(function(n){var r={pattern:/[\s\S]+/,inside:null};n.languages.v=n.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":r}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),r.inside=n.languages.v,n.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),n.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),n.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:n.languages.v.generic.inside}}}})})(t)}return rf}var af,WE;function Uee(){if(WE)return af;WE=1,af=e,e.displayName="vala",e.aliases=[];function e(t){t.languages.vala=t.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),t.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:t.languages.vala}},string:/[\s\S]+/}}}),t.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}return af}var sf,qE;function Pee(){if(qE)return sf;qE=1,sf=e,e.displayName="velocity",e.aliases=[];function e(t){(function(n){n.languages.velocity=n.languages.extend("markup",{});var r={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};r.variable.inside={string:r.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:r.number,boolean:r.boolean,punctuation:r.punctuation},n.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:r}},variable:r.variable}),n.languages.velocity.tag.inside["attr-value"].inside.rest=n.languages.velocity})(t)}return sf}var of,$E;function Qee(){if($E)return of;$E=1,of=e,e.displayName="verilog",e.aliases=[];function e(t){t.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}return of}var uf,VE;function Bee(){if(VE)return uf;VE=1,uf=e,e.displayName="vhdl",e.aliases=[];function e(t){t.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}return uf}var lf,ZE;function Fee(){if(ZE)return lf;ZE=1,lf=e,e.displayName="vim",e.aliases=[];function e(t){t.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}return lf}var cf,XE;function Gee(){if(XE)return cf;XE=1,cf=e,e.displayName="visualBasic",e.aliases=[];function e(t){t.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},t.languages.vb=t.languages["visual-basic"],t.languages.vba=t.languages["visual-basic"]}return cf}var df,JE;function Hee(){if(JE)return df;JE=1,df=e,e.displayName="warpscript",e.aliases=[];function e(t){t.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}return df}var Mf,KE;function Wee(){if(KE)return Mf;KE=1,Mf=e,e.displayName="wasm",e.aliases=[];function e(t){t.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}return Mf}var gf,e2;function qee(){if(e2)return gf;e2=1,gf=e,e.displayName="webIdl",e.aliases=[];function e(t){(function(n){var r=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,a="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+r+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,i={};n.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+r),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:i},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+a),lookbehind:!0,inside:i},{pattern:RegExp("("+/\bcallback\s+/.source+r+/\s*=\s*/.source+")"+a),lookbehind:!0,inside:i},{pattern:RegExp(/(\btypedef\b\s*)/.source+a),lookbehind:!0,inside:i},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+r),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+r),lookbehind:!0},RegExp(r+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+r),lookbehind:!0},{pattern:RegExp(a+"(?="+/\s*(?:\.{3}\s*)?/.source+r+/\s*[(),;=]/.source+")"),inside:i}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/};for(var s in n.languages["web-idl"])s!=="class-name"&&(i[s]=n.languages["web-idl"][s]);n.languages.webidl=n.languages["web-idl"]})(t)}return gf}var pf,t2;function $ee(){if(t2)return pf;t2=1,pf=e,e.displayName="wiki",e.aliases=[];function e(t){t.languages.wiki=t.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:t.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),t.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:t.languages.markup.tag.inside}}}})}return pf}var ff,n2;function Vee(){if(n2)return ff;n2=1,ff=e,e.displayName="wolfram",e.aliases=["mathematica","wl","nb"];function e(t){t.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.mathematica=t.languages.wolfram,t.languages.wl=t.languages.wolfram,t.languages.nb=t.languages.wolfram}return ff}var hf,r2;function Zee(){if(r2)return hf;r2=1,hf=e,e.displayName="wren",e.aliases=[];function e(t){t.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},t.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:t.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}return hf}var Nf,a2;function Xee(){if(a2)return Nf;a2=1,Nf=e,e.displayName="xeora",e.aliases=["xeoracube"];function e(t){(function(n){n.languages.xeora=n.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),n.languages.insertBefore("inside","punctuation",{variable:n.languages.xeora["function-inline"].inside.variable},n.languages.xeora["function-block"]),n.languages.xeoracube=n.languages.xeora})(t)}return Nf}var mf,i2;function Jee(){if(i2)return mf;i2=1,mf=e,e.displayName="xmlDoc",e.aliases=[];function e(t){(function(n){function r(o,u){n.languages[o]&&n.languages.insertBefore(o,"comment",{"doc-comment":u})}var a=n.languages.markup.tag,i={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:a}},s={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:a}};r("csharp",i),r("fsharp",i),r("vbnet",s)})(t)}return mf}var Tf,s2;function Kee(){if(s2)return Tf;s2=1,Tf=e,e.displayName="xojo",e.aliases=[];function e(t){t.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}return Tf}var yf,o2;function ete(){if(o2)return yf;o2=1,yf=e,e.displayName="xquery",e.aliases=[];function e(t){(function(n){n.languages.xquery=n.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),n.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,n.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,n.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,n.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:n.languages.xquery,alias:"language-xquery"};var r=function(i){return typeof i=="string"?i:typeof i.content=="string"?i.content:i.content.map(r).join("")},a=function(i){for(var s=[],o=0;o<i.length;o++){var u=i[o],l=!1;if(typeof u!="string"&&(u.type==="tag"&&u.content[0]&&u.content[0].type==="tag"?u.content[0].content[0].content==="</"?s.length>0&&s[s.length-1].tagName===r(u.content[0].content[1])&&s.pop():u.content[u.content.length-1].content==="/>"||s.push({tagName:r(u.content[0].content[1]),openedBraces:0}):s.length>0&&u.type==="punctuation"&&u.content==="{"&&(!i[o+1]||i[o+1].type!=="punctuation"||i[o+1].content!=="{")&&(!i[o-1]||i[o-1].type!=="plain-text"||i[o-1].content!=="{")?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&u.type==="punctuation"&&u.content==="}"?s[s.length-1].openedBraces--:u.type!=="comment"&&(l=!0)),(l||typeof u=="string")&&s.length>0&&s[s.length-1].openedBraces===0){var c=r(u);o<i.length-1&&(typeof i[o+1]=="string"||i[o+1].type==="plain-text")&&(c+=r(i[o+1]),i.splice(o+1,1)),o>0&&(typeof i[o-1]=="string"||i[o-1].type==="plain-text")&&(c=r(i[o-1])+c,i.splice(o-1,1),o--),/^\s+$/.test(c)?i[o]=c:i[o]=new n.Token("plain-text",c,null,c)}u.content&&typeof u.content!="string"&&a(u.content)}};n.hooks.add("after-tokenize",function(i){i.language==="xquery"&&a(i.tokens)})})(t)}return yf}var If,u2;function tte(){if(u2)return If;u2=1,If=e,e.displayName="yang",e.aliases=[];function e(t){t.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}return If}var Df,l2;function nte(){if(l2)return Df;l2=1,Df=e,e.displayName="zig",e.aliases=[];function e(t){(function(n){function r(c){return function(){return c}}var a=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,i="\\b(?!"+a.source+")(?!\\d)\\w+\\b",s=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,o=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g,r(s)),u=/(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g,r(i)),l="(?!\\s)(?:!?\\s*(?:"+o+"\\s*)*"+u+")+";n.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g,r(l)).replace(/<ALIGN>/g,r(s))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g,r(l)).replace(/<ALIGN>/g,r(s))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:a,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(c){c.inside===null&&(c.inside=n.languages.zig)})})(t)}return Df}var O=cZ,rte=O;O.register(IZ());O.register(DZ());O.register(AZ());O.register(bZ());O.register(EZ());O.register(jZ());O.register(zZ());O.register(LZ());O.register(wZ());O.register(CZ());O.register(xZ());O.register(SZ());O.register(OZ());O.register(vZ());O.register(kZ());O.register(_Z());O.register(RZ());O.register(YZ());O.register(UZ());O.register(PZ());O.register(QZ());O.register(BZ());O.register(Ex());O.register(jx());O.register(FZ());O.register(GZ());O.register(HZ());O.register(WZ());O.register(qZ());O.register($Z());O.register(VZ());O.register(ZZ());O.register(XZ());O.register(JZ());O.register(ji());O.register(KZ());O.register(eX());O.register(tX());O.register(nX());O.register(rX());O.register(aX());O.register(iX());O.register(sX());O.register(oX());O.register(Em());O.register(uX());O.register(ic());O.register(lX());O.register(cX());O.register(dX());O.register(MX());O.register(gX());O.register(pX());O.register(fX());O.register(hX());O.register(NX());O.register(mX());O.register(TX());O.register(yX());O.register(IX());O.register(DX());O.register(AX());O.register(bX());O.register(EX());O.register(jX());O.register(zX());O.register(LX());O.register(wX());O.register(CX());O.register(xX());O.register(SX());O.register(OX());O.register(vX());O.register(kX());O.register(_X());O.register(RX());O.register(YX());O.register(UX());O.register(PX());O.register(QX());O.register(BX());O.register(FX());O.register(GX());O.register(HX());O.register(WX());O.register(qX());O.register($X());O.register(VX());O.register(ZX());O.register(XX());O.register(JX());O.register(KX());O.register(eJ());O.register(tJ());O.register(jm());O.register(nJ());O.register(rJ());O.register(aJ());O.register(iJ());O.register(sJ());O.register(oJ());O.register(uJ());O.register(lJ());O.register(cJ());O.register(dJ());O.register(MJ());O.register(gJ());O.register(pJ());O.register(fJ());O.register(hJ());O.register(NJ());O.register(mJ());O.register(zm());O.register(TJ());O.register(oc());O.register(yJ());O.register(IJ());O.register(DJ());O.register(AJ());O.register(bJ());O.register(EJ());O.register(jJ());O.register(wm());O.register(zJ());O.register(LJ());O.register(wJ());O.register(Lx());O.register(CJ());O.register(xJ());O.register(SJ());O.register(OJ());O.register(vJ());O.register(kJ());O.register(_J());O.register(RJ());O.register(YJ());O.register(UJ());O.register(PJ());O.register(QJ());O.register(BJ());O.register(FJ());O.register(GJ());O.register(HJ());O.register(zx());O.register(WJ());O.register(qJ());O.register($J());O.register(Fn());O.register(VJ());O.register(ZJ());O.register(XJ());O.register(JJ());O.register(KJ());O.register(eK());O.register(tK());O.register(nK());O.register(rK());O.register(aK());O.register(iK());O.register(sK());O.register(oK());O.register(uK());O.register(lK());O.register(cK());O.register(dK());O.register(MK());O.register(gK());O.register(pK());O.register(fK());O.register(hK());O.register(NK());O.register(mK());O.register(TK());O.register(yK());O.register(IK());O.register(DK());O.register(AK());O.register(bK());O.register(EK());O.register(jK());O.register(uc());O.register(zK());O.register(LK());O.register(wK());O.register(CK());O.register(xK());O.register(SK());O.register(OK());O.register(vK());O.register(kK());O.register(_K());O.register(RK());O.register(YK());O.register(UK());O.register(PK());O.register(QK());O.register(BK());O.register(FK());O.register(GK());O.register(HK());O.register(WK());O.register(qK());O.register($K());O.register(VK());O.register(ZK());O.register(XK());O.register(JK());O.register(KK());O.register(eee());O.register(tee());O.register(nee());O.register(sc());O.register(ree());O.register(aee());O.register(iee());O.register(see());O.register(Cm());O.register(oee());O.register(uee());O.register(lee());O.register(cee());O.register(dee());O.register(Mee());O.register(gee());O.register(pee());O.register(fee());O.register(hee());O.register(Nee());O.register(mee());O.register(bm());O.register(Tee());O.register(yee());O.register(Iee());O.register(Dee());O.register(Aee());O.register(bee());O.register(xm());O.register(Eee());O.register(jee());O.register(zee());O.register(Lee());O.register(wee());O.register(Cee());O.register(xee());O.register(See());O.register(wx());O.register(Oee());O.register(Lm());O.register(vee());O.register(kee());O.register(_ee());O.register(Ree());O.register(Yee());O.register(Uee());O.register(Cx());O.register(Pee());O.register(Qee());O.register(Bee());O.register(Fee());O.register(Gee());O.register(Hee());O.register(Wee());O.register(qee());O.register($ee());O.register(Vee());O.register(Zee());O.register(Xee());O.register(Jee());O.register(Kee());O.register(ete());O.register(xx());O.register(tte());O.register(nte());const ate=qh(rte);var Sx=eW(ate,yZ);Sx.supportedLanguages=tW;const ite=Sx,ste=At.createFromIconfontCN({scriptUrl:new URL("data:application/javascript;base64,d2luZG93Ll9pY29uZm9udF9zdmdfc3RyaW5nXzM5MjkyMDkgPSAnPHN2Zz48c3ltYm9sIGlkPSJpY29uLXNhbmppYW8teGlhIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0Ij48cGF0aCBkPSJNMTkyLjk1NzAzMTI1IDM1NC42NDA2MjVoNDMzLjc0MDIzNDM4YzQyLjEzNDc2NTYzIDAgODAuODQxNzk2ODgtMC4xNTgyMDMxMyAxMTYuMjI2NTYyNDktMC40MjE4NzVDNzc4LjMwODU5Mzc1IDM1My45NTUwNzgxMiA4MD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E9NQ29udGVudExvYWRlZCIsIGUsICExKSkgOiBkb2N1bWVudC5hdHRhY2hFdmVudCAmJiAoaCA9IGksIGwgPSBvLmRvY3VtZW50LCBuID0gITEsIGQoKSwgbC5vbnJlYWR5c3RhdGVjaGFuZ2UgPSBmdW5jdGlvbiAoKSB7ICJjb21wbGV0ZSIgPT0gbC5yZWFkeVN0YXRlICYmIChsLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IG51bGwsIHYoKSkgfSkgfSBmdW5jdGlvbiB2KCkgeyBuIHx8IChuID0gITAsIGgoKSkgfSBmdW5jdGlvbiBkKCkgeyB0cnkgeyBsLmRvY3VtZW50RWxlbWVudC5kb1Njcm9sbCgibGVmdCIpIH0gY2F0Y2ggKGEpIHsgcmV0dXJuIHZvaWQgc2V0VGltZW91dChkLCA1MCkgfSB2KCkgfSB9KHdpbmRvdyk7",self.location).href});var ote=(e,t,n)=>new Promise((r,a)=>{var i=u=>{try{o(n.next(u))}catch(l){a(l)}},s=u=>{try{o(n.throw(u))}catch(l){a(l)}},o=u=>u.done?r(u.value):Promise.resolve(u.value).then(i,s);o((n=n.apply(e,t)).next())});const ute=e=>ote(void 0,[e],function*({target:t,value:n}){try{let r="";if(!navigator.clipboard)return console.warn("Browser don't have support for native clipboard."),!1;if(t){const a=document.querySelector(t);if(!a||!a.textContent)return console.warn("Element not found"),!1;n=a.textContent}return n&&(r=n),yield navigator.clipboard.writeText(r),!0}catch(r){return!1}}),lte=({text:e})=>{const[t,n]=z.useState();return z.useEffect(()=>{t&&setTimeout(()=>n(void 0),2e3)},[t]),t?N.jsx("div",{className:"copy-tip",children:t==="success"?N.jsx(At.CheckOutlined,{style:{color:"rgba(48, 191, 19, 1)"}}):N.jsx(At.CloseOutlined,{style:{color:"#dc4446"}})}):N.jsx(R.Tooltip,{title:"复制",children:N.jsx("div",{className:"copy-btn",onClick:()=>{ute({value:e}).then(r=>{n(r?"success":"failed")})},children:N.jsx(ste,{type:"icon-fuzhi"})})})};var cte=Object.defineProperty,dte=Object.defineProperties,Mte=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,Ox=Object.prototype.hasOwnProperty,vx=Object.prototype.propertyIsEnumerable,c2=(e,t,n)=>t in e?cte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d2=(e,t)=>{for(var n in t||(t={}))Ox.call(t,n)&&c2(e,n,t[n]);if(yl)for(var n of yl(t))vx.call(t,n)&&c2(e,n,t[n]);return e},M2=(e,t)=>dte(e,Mte(t)),gte=(e,t)=>{var n={};for(var r in e)Ox.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&vx.call(e,r)&&(n[r]=e[r]);return n};const pte=e=>{var t=e,{node:n,inline:r,className:a,children:i}=t,s=gte(t,["node","inline","className","children"]);const o=/language-(\w+)/.exec(a||""),u=o?o[1]:null;return!r&&u?N.jsxs("div",{className:"markdown-code",children:[N.jsxs("div",{className:"markdown-code-title",children:[N.jsx("span",{className:"markdown-code-title-text",children:u}),N.jsx(R.Space,{className:"markdown-code-title-action",children:N.jsx(lte,{text:String(i)})})]}),N.jsx(ite,M2(d2({className:"markdown-code-context",language:u},s),{wrapLongLines:!0,showLineNumbers:!0,PreTag:"div",children:String(i).replace(/\n$/,"")}))]}):N.jsx("code",M2(d2({className:a},s),{children:i}))},fte=pte;var hte=Object.defineProperty,Nte=Object.defineProperties,mte=Object.getOwnPropertyDescriptors,Il=Object.getOwnPropertySymbols,kx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,g2=(e,t,n)=>t in e?hte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Af=(e,t)=>{for(var n in t||(t={}))kx.call(t,n)&&g2(e,n,t[n]);if(Il)for(var n of Il(t))_x.call(t,n)&&g2(e,n,t[n]);return e},Tte=(e,t)=>Nte(e,mte(t)),yte=(e,t)=>{var n={};for(var r in e)kx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Il)for(var r of Il(e))t.indexOf(r)<0&&_x.call(e,r)&&(n[r]=e[r]);return n};const Ite=e=>{var t,n;const r=e,{node:a}=r,i=yte(r,["node"]);if(a.tagName==="a"&&((t=a.children)==null?void 0:t.length)>0){const s=((n=a.children[0])==null?void 0:n.value)||"";let o=/(^https?:\/\/|^www\.)(?:www\.)?[\w\-]+(\.[\w\-]+)+(\/[\w\- .\/?%&=]*)?/g,u=s.match(o),l=s.replace(o,"").trim();if(!(u!=null&&u.length))return N.jsx("a",Af({},i));const c=u[0];return N.jsxs(N.Fragment,{children:[N.jsx("a",Tte(Af({href:/^www\./.test(c)?"//"+c:c,onClick:()=>window.open(e.href,e.target||"_blank")},i),{children:c})),l]})}return N.jsx("a",Af({},i))},Dte=Ite;var Ate=Object.defineProperty,bte=Object.defineProperties,Ete=Object.getOwnPropertyDescriptors,Dl=Object.getOwnPropertySymbols,Rx=Object.prototype.hasOwnProperty,Yx=Object.prototype.propertyIsEnumerable,p2=(e,t,n)=>t in e?Ate(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kr=(e,t)=>{for(var n in t||(t={}))Rx.call(t,n)&&p2(e,n,t[n]);if(Dl)for(var n of Dl(t))Yx.call(t,n)&&p2(e,n,t[n]);return e},jte=(e,t)=>bte(e,Ete(t)),zte=(e,t)=>{var n={};for(var r in e)Rx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dl)for(var r of Dl(e))t.indexOf(r)<0&&Yx.call(e,r)&&(n[r]=e[r]);return n};const lc=e=>{var t=e,{showLatex:n=!0,components:r={},componentProps:a,children:i}=t,s=zte(t,["showLatex","components","componentProps","children"]);const o=z.useRef(null),u=kr({img(l){return N.jsx(UH,kr(kr({},l),a==null?void 0:a.img))},code(l){return N.jsx(fte,kr(kr({},l),a==null?void 0:a.code))},video(l){return N.jsx(XC,kr(kr({},l),a==null?void 0:a.video))},a(l){return N.jsx(Dte,kr(kr({},l),a==null?void 0:a.a))}},r);return N.jsx("div",{ref:o,children:N.jsx(V5,jte(kr({className:"markdown",rehypePlugins:[YP,$U,[s7,{target:"_blank"}]],remarkPlugins:[NP,[uR,{singleTilde:!1}]]},s),{children:n?xH(i):i,components:u}))})};(function(){try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.storybook-button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}.storybook-button--primary{color:#fff;background-color:#027bf4}.storybook-button--secondary{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}.markdown{word-break:break-all}.markdown :last-child{margin-bottom:0}.markdown div,.markdown hr,.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6,.markdown p,.markdown table,.markdown code,.markdown img,.markdown address,.markdown blockquote,.markdown dir,.markdown menu,.markdown pre,.markdown ul,.markdown ol,.markdown li,.markdown dl{margin-bottom:12px;line-height:150%;white-space:pre-wrap}.markdown div:last-child,.markdown hr:last-child,.markdown h1:last-child,.markdown h2:last-child,.markdown h3:last-child,.markdown h4:last-child,.markdown h5:last-child,.markdown h6:last-child,.markdown p:last-child,.markdown table:last-child,.markdown code:last-child,.markdown img:last-child,.markdown address:last-child,.markdown blockquote:last-child,.markdown dir:last-child,.markdown menu:last-child,.markdown pre:last-child,.markdown ul:last-child,.markdown ol:last-child,.markdown li:last-child,.markdown dl:last-child{margin-bottom:0}.markdown ul,.markdown ol{padding-inline-start:20px}.markdown ul{list-style-type:disc}.markdown ol{list-style-type:decimal}.markdown ul,.markdown li{white-space:normal;margin-bottom:8px}.markdown table{display:block;border-collapse:collapse;border-radius:4px;max-width:100%;overflow:auto;width:max-content}.markdown td,.markdown th{border:1px solid #e8e9eb;padding:6px 13px;text-align:left}.markdown tr{color:#151b26;background-color:#fff}.markdown th{background-color:#f9f2ff;color:#000}.markdown tr:hover td{background-color:#fff}.markdown p code{background:#f9f2ff;border-radius:4px;padding:4px;display:inline;font-size:12px;color:#070c14}.markdown .markdown-code-title{margin:0;padding:0 16px;height:36px;border-radius:8px 8px 0 0;background:#f9f2ff;display:flex;align-items:center;justify-content:space-between;line-height:21px;font-weight:500;color:#070c14}.markdown .markdown-code-context{padding:16px;background:rgba(249,242,255,.3)!important;margin:0!important;border-radius:0 0 8px 8px}.markdown .markdown-code-context code{margin:0;font-size:85%;background:none;font-size:14px}.markdown .markdown-code-context code>span{flex-wrap:wrap}.markdown p{white-space:pre-line}.markdown pre code.hljs{display:block;overflow-x:auto;padding:1em}.markdown p{line-height:150%;height:auto!important}.markdown img{max-width:100%}.markdown a,.markdown a:hover{color:#0f64ff}.markdown code.hljs{padding:3px 5px}.markdown .hljs{background:rgba(249,242,255,.3);color:#000}.markdown .hljs-comment{color:#697070}.markdown .hljs-tag,.markdown .hljs-punctuation{color:#000a}.markdown .hljs-tag .hljs-name,.markdown .hljs-tag .hljs-attr{color:#000}.markdown .hljs-keyword,.markdown .hljs-attribute,.markdown .hljs-selector-tag,.markdown .hljs-meta .hljs-keyword,.markdown .hljs-doctag,.markdown .hljs-name{font-weight:700}.markdown .hljs-type,.markdown .hljs-string,.markdown .hljs-number,.markdown .hljs-selector-id,.markdown .hljs-selector-class,.markdown .hljs-quote,.markdown .hljs-template-tag,.markdown .hljs-deletion{color:#800}.markdown .hljs-title,.markdown .hljs-section{color:#800;font-weight:700}.markdown .hljs-regexp,.markdown .hljs-symbol,.markdown .hljs-variable,.markdown .hljs-template-variable,.markdown .hljs-link,.markdown .hljs-selector-attr,.markdown .hljs-operator,.markdown .hljs-selector-pseudo{color:#ab5656}.markdown .hljs-literal{color:#695}.markdown .hljs-built_in,.markdown .hljs-bullet,.markdown .hljs-code,.markdown .hljs-addition{color:#397300}.markdown .hljs-meta{color:#1f7199}.markdown .hljs-meta .hljs-string{color:#38a}.markdown .hljs-emphasis{font-style:italic}.markdown .hljs-strong{font-weight:700}.markdown .ant-image{margin-bottom:6px!important}.markdown .ant-image .ant-image-img{margin-bottom:0!important}.g-expandable-pannel-wrap{inset:0;z-index:999}.g-expandable-pannel-wrap .g-expandable-pannel-expand-bar{position:absolute;right:0;top:0;background-color:#222836;z-index:9999}.g-expandable-pannel-wrap .g-expandable-pannel-expand-bar.collapsed{position:absolute;top:0;right:0;z-index:9;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.g-expandable-pannel-wrap .g-expandable-pannel-expand-bar.expaned{padding:0}.g-expandable-pannel-wrap .g-expandable-pannel-expand-bar.expaned .g-icon-btn{background-color:#0000}.g-expandable-pannel-wrap .g-expandable-pannel{width:100%;height:100%;border:.5px solid #313A4D}.g-expandable-pannel-wrap .g-expandable-pannel-header{position:absolute;right:0;top:0;z-index:9;padding-right:28px;height:28px;display:flex;flex-direction:row-reverse}.g-expandable-pannel-wrap .g-expandable-pannel-body{opacity:.85;width:100%;height:100%}.g-expandable-pannel-wrap .g-expandable-pannel-body .icon{width:16px;height:16px}.g-expandable-pannel-wrap .g-expandable-pannel.full{width:100%!important;height:100%!important;inset:0 55px;z-index:9}.g-expandable-pannel-wrap .g-expandable-pannel.hidden{inset:0 -20000px}.g-expandable-pannel-wrap .g-expandable-pannel.hidden+.bar-btn{position:absolute;right:0!important;background:rgba(58,63,76,.5);border-radius:20px 0 0 20px}.g-expandable-pannel-wrap .g-expandable-pannel.normal{height:250px;overflow:hidden;padding:0}.g-expandable-pannel-wrap .g-expandable-pannel.full+.bar-btn{top:0;right:55px;z-index:99}.g-expandable-pannel-wrap .g-expandable-pannel.full~.cover{display:block;position:absolute;width:100vw;height:100vh;top:0;left:0;background:#00000066}.g-expandable-pannel-wrap .g-expandable-pannel.hiddern~.cover{display:none}.g-expandable-pannel-wrap .g-expandable-pannel .minimap-menu-pannel{width:134px;background:#ffffff;border:1px solid #ececec;box-shadow:2px 2px 6px #c0c0c040;border-radius:4px;padding:6px 12px}.g-expandable-pannel-wrap .g-expandable-pannel .minimap-menu-pannel .item-row{width:100%;display:flex;height:32px;align-items:center}.g-expandable-pannel-wrap .g-expandable-pannel .minimap-menu-pannel .item-row img{width:16px;height:16px;margin:0 8px}.g-expandable-pannel-wrap .g-expandable-pannel .status{display:block}.g-expandable-pannel-wrap .g-expandable-pannel .status.success:before{display:inline-block;content:"";width:12px;height:12px;background-color:#52c41a}.g-expandable-pannel-wrap .g-expandable-pannel .status.error:before{display:inline-block;content:"";width:12px;height:12px;background-color:#ff4d4f}.g-expandable-pannel-wrap .g-expandable-pannel .pass-confirm-wrap{position:absolute}.g-icon-btn{height:28px;width:28px;line-height:28px;background-color:#222836;color:#b8c1d0;cursor:pointer;text-align:center;padding:0;border:none;font-size:16px;display:block}.g-icon-btn:hover{color:#fff;background:linear-gradient(180deg,#4e5b73 0%,#222836 100%);border-image:linear-gradient(180deg,#4e5b73 0%,#222836 100%),linear-gradient(180deg,#ffffff 16.67%,#d2d2d2 49.48%,#000000 73.44%,#e4e4e4 92.71%)}.g-icon-btn:disabled{color:#68707e;cursor:not-allowed;background:linear-gradient(180deg,#0a111d 0%,#222836 100%)}.g-mouse-tip{display:inline-flex;justify-content:center;align-items:center;gap:4px;box-shadow:0 1px 10px #0000000d,0 4px 5px #00000014,0 2px 4px -1px #0000001f;border-radius:4px;background:#000;position:fixed;z-index:2000;padding:8px 12px}.g-mouse-tip-content{font-size:12px;font-style:normal;font-weight:400;color:#fff}.copy-btn{font-size:16px;cursor:pointer}.copy-btn:hover{color:#b452ff}.image-map{position:relative;width:100%;height:100%;overflow:hidden;user-select:none;display:flex;justify-content:center}.image-map .image-map-pannel{width:100%;height:100%;user-select:none;display:flex;justify-content:center;align-items:center}.image-map .image-map-toolbar{position:absolute;width:auto;height:auto;bottom:12px;z-index:99;display:flex;align-items:center;gap:12px;background-color:#393939;padding:10px;border-radius:6px}.image-map .image-map-toolbar .zoom-controller{display:flex;height:100%;align-items:center;gap:12px;color:#fff}.image-map .image-map-toolbar .zoom-controller .g-icon-btn,.image-map .image-map-toolbar .zoom-controller .g-icon-btn button{background-color:unset;font-size:16px;border:.5px solid #6f6f6f;border-radius:2px;font-size:14px}.image-map .image-map-toolbar .zoom-controller .g-icon-btn .anticon,.image-map .image-map-toolbar .zoom-controller .g-icon-btn button .anticon{font-size:14px}.image-map .image-map-toolbar .zoom-controller.vertical{flex-direction:column}.image-map .image-map-toolbar .zoom-controller.vertical .g-icon-btn{background-color:red;margin-top:6px;border:none}.image-map .image-map-toolbar .zoom-controller.vertical .g-icon-btn .anticon{font-size:16px}.image-map .image-map-toolbar .zoom-controller.horizontal{flex-direction:row}.image-map .image-map-toolbar .line{width:1px;height:12px;border:.5px solid #e0e0e0}.image-map .image-map-toolbar .moveable-controller{background-color:unset;height:100%;border:.5px solid #6f6f6f;border-radius:2px}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn{position:relative;border:none;border-radius:2px;background-color:unset;padding:0;display:flex;height:100%}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn .btn-change{display:flex;align-items:center;color:#fff;gap:10px;height:100%;margin-inline-end:unset;padding:4px 8px}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn .btn-change svg{font-size:16px}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn .anticon{font-size:24px}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn.active{color:#fff}.image-map .image-map-toolbar .moveable-controller .moveable-controller-btn:hover{background:linear-gradient(180deg,#4e5b73 0%,#222836 100%)}.image-map .image-map-toolbar .editing-controller{display:flex;gap:12px;align-items:center;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left}.image-map .image-map-toolbar .editing-controller .ant-btn-default{border:.5px solid #6f6f6f;border-radius:2px;background-color:unset;color:#fff;padding:4px 8px}.image-map .image-map-toolbar .editing-controller .ant-btn-default:hover{background:linear-gradient(180deg,#4e5b73 0%,#222836 100%)}.image-map .image-map-toolbar .editing-controller .ant-btn-primary{border-radius:2px;background-color:#0532a6;border:.5px solid #6f6f6f;color:#fff;padding:4px 8px}.image-map .image-map-toolbar .editing-controller .ant-btn-primary:hover{background:#0949d2}.image-map .image-map-toolbar .editing-controller .ant-btn-primary .save-detail{display:flex;align-items:center;color:#fff;gap:10px;height:100%}.image-map .image-map-toolbar .editing-controller .ant-btn-primary .save-detail svg{font-size:16px}.pass-map{background:transparent}.pass-map .pass-area{position:absolute;background:rgba(255,77,79,.21);border:1px solid #00000000;z-index:1}.pass-map .pass-area-circle{border-radius:50%}.pass-map .pass-area__active{background:rgba(255,77,79,.25);border:1px solid #ff4d4f}.track-map{z-index:10;position:relative}.track-map .point{cursor:pointer}.track-map .bottom-action{position:fixed;left:50%;bottom:10px;transform:translate(-50%);z-index:1000;display:flex;justify-content:center;align-items:flex-end;padding-bottom:12px}.track-map .bottom-action .bottom-pannel{background:white;height:48px;background:rgba(255,255,255,.9);border:1px solid #f8f8f8;box-shadow:2px 2px 4px #c0c0c040;border-radius:4px;padding:0 12px}:where(.css-ed5zg0)[class^=ant-popconfirm],:where(.css-ed5zg0)[class*=" ant-popconfirm"]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popconfirm]:before,:where(.css-ed5zg0)[class*=" ant-popconfirm"]:before,:where(.css-ed5zg0)[class^=ant-popconfirm]:after,:where(.css-ed5zg0)[class*=" ant-popconfirm"]:after{box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popconfirm] [class^=ant-popconfirm],:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class^=ant-popconfirm],:where(.css-ed5zg0)[class^=ant-popconfirm] [class*=" ant-popconfirm"],:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class*=" ant-popconfirm"]{box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popconfirm] [class^=ant-popconfirm]:before,:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class^=ant-popconfirm]:before,:where(.css-ed5zg0)[class^=ant-popconfirm] [class*=" ant-popconfirm"]:before,:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class*=" ant-popconfirm"]:before,:where(.css-ed5zg0)[class^=ant-popconfirm] [class^=ant-popconfirm]:after,:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class^=ant-popconfirm]:after,:where(.css-ed5zg0)[class^=ant-popconfirm] [class*=" ant-popconfirm"]:after,:where(.css-ed5zg0)[class*=" ant-popconfirm"] [class*=" ant-popconfirm"]:after{box-sizing:border-box}:where(.css-ed5zg0).ant-popconfirm{z-index:1060}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-inner-content{color:#000000e0}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-message{position:relative;margin-bottom:8px;color:#000000e0;font-size:14px;display:flex;flex-wrap:nowrap;align-items:start}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-message>.ant-popconfirm-message-icon .anticon{color:#faad14;font-size:14px;flex:none;line-height:1;padding-top:4px}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-message-title{flex:auto;margin-inline-start:8px}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-message-title-only{font-weight:600}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-description{position:relative;margin-inline-start:22px;margin-bottom:8px;color:#000000e0;font-size:14px}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-buttons{text-align:end}:where(.css-ed5zg0).ant-popconfirm .ant-popconfirm-buttons button{margin-inline-start:8px}:where(.css-ed5zg0)[class^=ant-popover],:where(.css-ed5zg0)[class*=" ant-popover"]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popover]:before,:where(.css-ed5zg0)[class*=" ant-popover"]:before,:where(.css-ed5zg0)[class^=ant-popover]:after,:where(.css-ed5zg0)[class*=" ant-popover"]:after{box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popover] [class^=ant-popover],:where(.css-ed5zg0)[class*=" ant-popover"] [class^=ant-popover],:where(.css-ed5zg0)[class^=ant-popover] [class*=" ant-popover"],:where(.css-ed5zg0)[class*=" ant-popover"] [class*=" ant-popover"]{box-sizing:border-box}:where(.css-ed5zg0)[class^=ant-popover] [class^=ant-popover]:before,:where(.css-ed5zg0)[class*=" ant-popover"] [class^=ant-popover]:before,:where(.css-ed5zg0)[class^=ant-popover] [class*=" ant-popover"]:before,:where(.css-ed5zg0)[class*=" ant-popover"] [class*=" ant-popover"]:before,:where(.css-ed5zg0)[class^=ant-popover] [class^=ant-popover]:after,:where(.css-ed5zg0)[class*=" ant-popover"] [class^=ant-popover]:after,:where(.css-ed5zg0)[class^=ant-popover] [class*=" ant-popover"]:after,:where(.css-ed5zg0)[class*=" ant-popover"] [class*=" ant-popover"]:after{box-sizing:border-box}:where(.css-ed5zg0).ant-popover{box-sizing:border-box;margin:0;padding:0;color:#000000e0;font-size:14px;line-height:1.57142857;list-style:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";position:absolute;top:0;left:0;z-index:1030;font-weight:400;white-space:normal;text-align:start;cursor:auto;user-select:text;--antd-arrow-background-color: #ffffff}:where(.css-ed5zg0).ant-popover-rtl{direction:rtl}:where(.css-ed5zg0).ant-popover-hidden{display:none}:where(.css-ed5zg0).ant-popover .ant-popover-content{position:relative}:where(.css-ed5zg0).ant-popover .ant-popover-inner{background-color:#fff;background-clip:padding-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:12px}:where(.css-ed5zg0).ant-popover .ant-popover-title{min-width:177px;margin-bottom:8px;color:#000000e0;font-weight:600}:where(.css-ed5zg0).ant-popover .ant-popover-inner-content{color:#000000e0;padding:0}:where(.css-ed5zg0).ant-popover .ant-popover-arrow{position:absolute;z-index:1;display:block;pointer-events:none;width:16px;height:16px;overflow:hidden;border:0}:where(.css-ed5zg0).ant-popover .ant-popover-arrow:before{position:absolute;bottom:0;inset-inline-start:0;width:16px;height:8px;background:var(--antd-arrow-background-color);clip-path:polygon(1.65685425px 100%,50% 1.65685425px,14.34314575px 100%,1.65685425px 100%);clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:""}:where(.css-ed5zg0).ant-popover .ant-popover-arrow:after{content:"";position:absolute;width:8.97056275px;height:8.97056275px;bottom:0;inset-inline:0;margin:auto;border-radius:0 0 2px;transform:translateY(50%) rotate(-135deg);box-shadow:2px 2px 5px #0000000d;z-index:0;background:transparent}:where(.css-ed5zg0).ant-popover .ant-popover-arrow:before{background:var(--antd-arrow-background-color)}:where(.css-ed5zg0).ant-popover-placement-top .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-topLeft .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-topRight .ant-popover-arrow{bottom:0;transform:translateY(100%) rotate(180deg)}:where(.css-ed5zg0).ant-popover-placement-top .ant-popover-arrow{left:50%;transform:translate(-50%) translateY(100%) rotate(180deg)}:where(.css-ed5zg0).ant-popover-placement-topLeft .ant-popover-arrow{left:12px}:where(.css-ed5zg0).ant-popover-placement-topRight .ant-popover-arrow{right:12px}:where(.css-ed5zg0).ant-popover-placement-bottom .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-bottomLeft .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-bottomRight .ant-popover-arrow{top:0;transform:translateY(-100%)}:where(.css-ed5zg0).ant-popover-placement-bottom .ant-popover-arrow{left:50%;transform:translate(-50%) translateY(-100%)}:where(.css-ed5zg0).ant-popover-placement-bottomLeft .ant-popover-arrow{left:12px}:where(.css-ed5zg0).ant-popover-placement-bottomRight .ant-popover-arrow{right:12px}:where(.css-ed5zg0).ant-popover-placement-left .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-leftTop .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-leftBottom .ant-popover-arrow{right:0;transform:translate(100%) rotate(90deg)}:where(.css-ed5zg0).ant-popover-placement-left .ant-popover-arrow{top:50%;transform:translateY(-50%) translate(100%) rotate(90deg)}:where(.css-ed5zg0).ant-popover-placement-leftTop .ant-popover-arrow{top:12px}:where(.css-ed5zg0).ant-popover-placement-leftBottom .ant-popover-arrow{bottom:12px}:where(.css-ed5zg0).ant-popover-placement-right .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-rightTop .ant-popover-arrow,:where(.css-ed5zg0).ant-popover-placement-rightBottom .ant-popover-arrow{left:0;transform:translate(-100%) rotate(-90deg)}:where(.css-ed5zg0).ant-popover-placement-right .ant-popover-arrow{top:50%;transform:translateY(-50%) translate(-100%) rotate(-90deg)}:where(.css-ed5zg0).ant-popover-placement-rightTop .ant-popover-arrow{top:12px}:where(.css-ed5zg0).ant-popover-placement-rightBottom .ant-popover-arrow{bottom:12px}:where(.css-ed5zg0).ant-popover-pure{position:relative;max-width:none;margin:16px;display:inline-block}:where(.css-ed5zg0).ant-popover-pure .ant-popover-content{display:inline-block}:where(.css-ed5zg0).ant-popover.ant-popover-blue{--antd-arrow-background-color: #1677ff}:where(.css-ed5zg0).ant-popover.ant-popover-blue .ant-popover-inner{background-color:#1677ff}:where(.css-ed5zg0).ant-popover.ant-popover-blue .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-purple{--antd-arrow-background-color: #722ed1}:where(.css-ed5zg0).ant-popover.ant-popover-purple .ant-popover-inner{background-color:#722ed1}:where(.css-ed5zg0).ant-popover.ant-popover-purple .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-cyan{--antd-arrow-background-color: #13c2c2}:where(.css-ed5zg0).ant-popover.ant-popover-cyan .ant-popover-inner{background-color:#13c2c2}:where(.css-ed5zg0).ant-popover.ant-popover-cyan .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-green{--antd-arrow-background-color: #52c41a}:where(.css-ed5zg0).ant-popover.ant-popover-green .ant-popover-inner{background-color:#52c41a}:where(.css-ed5zg0).ant-popover.ant-popover-green .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-magenta{--antd-arrow-background-color: #eb2f96}:where(.css-ed5zg0).ant-popover.ant-popover-magenta .ant-popover-inner{background-color:#eb2f96}:where(.css-ed5zg0).ant-popover.ant-popover-magenta .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-pink{--antd-arrow-background-color: #eb2f96}:where(.css-ed5zg0).ant-popover.ant-popover-pink .ant-popover-inner{background-color:#eb2f96}:where(.css-ed5zg0).ant-popover.ant-popover-pink .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-red{--antd-arrow-background-color: #f5222d}:where(.css-ed5zg0).ant-popover.ant-popover-red .ant-popover-inner{background-color:#f5222d}:where(.css-ed5zg0).ant-popover.ant-popover-red .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-orange{--antd-arrow-background-color: #fa8c16}:where(.css-ed5zg0).ant-popover.ant-popover-orange .ant-popover-inner{background-color:#fa8c16}:where(.css-ed5zg0).ant-popover.ant-popover-orange .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-yellow{--antd-arrow-background-color: #fadb14}:where(.css-ed5zg0).ant-popover.ant-popover-yellow .ant-popover-inner{background-color:#fadb14}:where(.css-ed5zg0).ant-popover.ant-popover-yellow .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-volcano{--antd-arrow-background-color: #fa541c}:where(.css-ed5zg0).ant-popover.ant-popover-volcano .ant-popover-inner{background-color:#fa541c}:where(.css-ed5zg0).ant-popover.ant-popover-volcano .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-geekblue{--antd-arrow-background-color: #2f54eb}:where(.css-ed5zg0).ant-popover.ant-popover-geekblue .ant-popover-inner{background-color:#2f54eb}:where(.css-ed5zg0).ant-popover.ant-popover-geekblue .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-lime{--antd-arrow-background-color: #a0d911}:where(.css-ed5zg0).ant-popover.ant-popover-lime .ant-popover-inner{background-color:#a0d911}:where(.css-ed5zg0).ant-popover.ant-popover-lime .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-popover.ant-popover-gold{--antd-arrow-background-color: #faad14}:where(.css-ed5zg0).ant-popover.ant-popover-gold .ant-popover-inner{background-color:#faad14}:where(.css-ed5zg0).ant-popover.ant-popover-gold .ant-popover-arrow{background:transparent}:where(.css-ed5zg0).ant-zoom-big-enter,:where(.css-ed5zg0).ant-zoom-big-appear{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}:where(.css-ed5zg0).ant-zoom-big-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}:where(.css-ed5zg0).ant-zoom-big-enter.ant-zoom-big-enter-active,:where(.css-ed5zg0).ant-zoom-big-appear.ant-zoom-big-appear-active{animation-name:css-ed5zg0-antZoomBigIn;animation-play-state:running}:where(.css-ed5zg0).ant-zoom-big-leave.ant-zoom-big-leave-active{animation-name:css-ed5zg0-antZoomBigOut;animation-play-state:running;pointer-events:none}:where(.css-ed5zg0).ant-zoom-big-enter,:where(.css-ed5zg0).ant-zoom-big-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}:where(.css-ed5zg0).ant-zoom-big-enter-prepare,:where(.css-ed5zg0).ant-zoom-big-appear-prepare{transform:none}:where(.css-ed5zg0).ant-zoom-big-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.track-map .tooltip-container{pointer-events:none!important}.track-map .tooltip-container>*{pointer-events:initial}.g-expandable-pannel-wrap.collapsed .tooltip-container{display:none}.g-rc-tooltip{position:absolute!important}.g-rc-tooltip .g-rc-tooltip-arrow{height:10px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const{Text:Lte}=R.Typography,wte=e=>{const{href:t,onClick:n}=e,r=new URL(t).origin;return N.jsxs(R.Space,{onClick:n,children:[N.jsx("img",{style:{width:16,height:16},src:`${r}/favicon.ico`}),N.jsx(Lte,{ellipsis:!0,children:t})]})},Cte=e=>{var u,l;const{data:t,onClick:n,loadPage:r}=e,{transform:a}=z.useContext(nn),i=()=>et(exports,null,function*(){return r?yield r(t.knowledgeId,t.docId,t.textId):0}),s=t.sourceType===Fe.ISourceType.WebLink&&!!t.webLink,o=t.sourceType===Fe.ISourceType.SourceFile&&!!t.sourceFileName&&(t==null?void 0:t.versionInfo)!==Fe.IversionInfo.ProtectUnauthorize;return N.jsxs(R.Space,{className:"session-refer-panel",children:[N.jsx("span",{className:"refer-panel-item",children:(t.knowledgeSourceName||"")+(t.knowledgeTitleName||"")||"-"}),s&&((u=a==null?void 0:a.reference)==null?void 0:u.iconVisible)&&N.jsx(R.Tooltip,{overlayStyle:{maxWidth:"90vw"},title:N.jsx(wte,{href:t.webLink,onClick:c=>{c.stopPropagation()}}),children:N.jsx(R.Button,{icon:N.jsx(ct,{type:t.sourceType===Fe.ISourceType.WebLink?"icon-lianjie":"icon-doc-link",style:{fontSize:16}}),type:"link",size:"small",onClick:c=>et(exports,null,function*(){c.stopPropagation(),n(t)})})}),o&&((l=a==null?void 0:a.reference)==null?void 0:l.iconVisible)&&N.jsx(R.Button,{icon:N.jsx(ct,{type:"icon-doc-link",style:{fontSize:16}}),type:"link",size:"small",onClick:c=>et(exports,null,function*(){c.stopPropagation();const d=(yield i())||0;n(t,d)})})]})},{Panel:xte}=R.Collapse,Ux=e=>{var o,u,l,c;const{history:t,docViewerUrl:n,markdown:r}=e,{transform:a,service:i}=z.useContext(nn),s=(d,M)=>{if(!(!(d!=null&&d.knowledgeId)||!(d!=null&&d.docId))){if(d.sourceType===Fe.ISourceType.WebLink){window.open(d.webLink);return}d.sourceType===Fe.ISourceType.SourceFile&&window.open(`${n}#/doc?url=${encodeURIComponent(d.sourceFileUrl)}&page=${M||0}`)}};return N.jsxs("div",{className:"session-refer",children:[N.jsxs(R.Space,{className:"session-refer-header",size:8,children:[N.jsx(ct,{type:"icon-cankaolaiyuan",style:{color:"#0A51D1",fontSize:16}}),N.jsx("span",{className:"refer-header-title",children:"参考来源"}),N.jsxs("span",{children:["(共 ",((o=t==null?void 0:t.reference)==null?void 0:o.length)||0," 项)"]})]}),N.jsx("div",{className:"session-refer-content",children:N.jsx(R.Collapse,{ghost:!0,defaultActiveKey:(u=a==null?void 0:a.reference)!=null&&u.isExpand?(l=t==null?void 0:t.reference)==null?void 0:l.map((d,M)=>d.docId+M):[],children:(c=t==null?void 0:t.reference)==null?void 0:c.map((d,M)=>N.jsx(xte,{header:N.jsxs(R.Space,{className:"session-refer-panel",children:[N.jsxs("span",{className:"refer-panel-item",children:[M+1,"."]}),i&&N.jsx(Cte,{data:d,loadPage:(g,f,m)=>i.getKnowledgeIdFileIdData(g,f,m).then(I=>{const y=(I||[]).find(D=>D.key==="pages_from");return(y==null?void 0:y.value)||0}),onClick:s})]}),children:N.jsx("div",{className:"refer-markdown",children:N.jsx(lc,bt(ae({},r),{children:d.text||"-"}))})},d.docId+M))})})]})};const Ste=[{id:1,name:"展示信息不正确"},{id:2,name:"答非所问"},{id:3,name:"答案包含有害信息"},{id:4,name:"其他原因"}],Ote=e=>{var Y;const{appId:t,history:n,isLastHistory:r=!1,sessionId:a,currentSession:i,onAgainClick:s}=e,[o,u]=z.useState([]),[l,c]=z.useState(),[d,M]=z.useState(!1),[g,f]=z.useState(!1),{service:m,popupContainer:I,transform:A,onComment:y}=z.useContext(nn),[D,j]=z.useState(()=>{var W;return(W=n==null?void 0:n.comment)==null?void 0:W.isAgree}),[L,E]=z.useState(400);z.useEffect(()=>{var W;j((W=n==null?void 0:n.comment)==null?void 0:W.isAgree)},[(Y=n==null?void 0:n.comment)==null?void 0:Y.isAgree]);const F=()=>{R.message.config({getContainer:()=>(I==null?void 0:I.current)||document.body,prefixCls:"gbot-message"}),x2(n.content),R.message.success("复制成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})},H=W=>{if(!a||!(n!=null&&n.messageId))return;const te={messageId:n.messageId,isAgree:W};i==null||i.postMessageComment(te).then(()=>{j(W),n!=null&&n.comment&&(n.comment.isAgree=W),!(W<=0)&&(f(!0),setTimeout(()=>{f(!1)},2e3))}),y&&y({applicationId:t,sessionId:a,comment:te})},S=W=>{if(o.some(te=>te.id===W.id)){const te=o.filter(oe=>oe.id!==W.id);u([...te])}else u([...o,W])},v=W=>{c(W.target.value)},B=()=>{if(!a)return;if(!(o!=null&&o.length))return M(!0),Promise.reject();let W=[];o!=null&&o.length&&(W=[...W,...o.map(oe=>oe.name)]),l&&(W=[...W,l]);const te={messageId:n.messageId,isAgree:-1,againstReason:W};R.notification.config({getContainer:()=>(I==null?void 0:I.current)||document.body,prefixCls:"gbot-notification"}),i==null||i.postMessageComment(te).then(()=>{j(-1),n!=null&&n.comment&&(n.comment.isAgree=-1);const oe=`open${Date.now()}`;R.notification.success({message:"提交反馈成功",description:"感谢您的参与,我们会认真评估每一条建议!",duration:2,btn:N.jsx(R.Button,{type:"primary",onClick:()=>R.notification.close(oe),children:"我知道了"}),key:oe,onClose:()=>R.notification.close(oe)})}),y&&y({applicationId:t,sessionId:a,comment:te})};return z.useEffect(()=>{let W=null;return W=requestAnimationFrame(()=>{const oe=document.getElementById("chat-main");if(oe){const K=oe.offsetHeight;E(K*.8)}}),()=>{W&&cancelAnimationFrame(W)}},[n]),N.jsxs("div",{className:"session-action",children:[A!=null&&A.again&&r?N.jsxs(R.Space,{className:"session-action-again",onClick:()=>s==null?void 0:s(),children:[N.jsx(ct,{type:"icon-zaicihuida"}),N.jsx("span",{style:{fontSize:12},children:"重新生成"})]}):N.jsx("span",{}),N.jsx("div",{className:"session-action-comment",children:N.jsxs(R.Space,{size:8,className:"action-comment-feedback",children:[!n.isSuspend&&N.jsx("span",{className:"comment-feedback-item comment-feedback-copy",onClick:F,children:N.jsx(ct,{type:"icon-fuzhi"})}),D===0&&!n.isSuspend&&N.jsx("span",{className:"comment-feedback-item",children:N.jsx(ct,{type:"icon-zan",onClick:()=>H(1)})}),D===1&&N.jsx(R.Popover,{open:g,getPopupContainer:W=>W.parentNode,content:N.jsx("div",{className:"zan-text",children:"感谢您的认可"}),trigger:"click",children:N.jsx("span",{className:"comment-feedback-item comment-feedback-item__active",children:N.jsx(ct,{type:"icon-zan"})})}),D===0&&!n.isSuspend&&N.jsx(R.Popconfirm,{showArrow:!1,arrowPointAtCenter:!0,okText:"确定",cancelText:"取消",getPopupContainer:W=>W.parentNode,onOpenChange:W=>{W&&(u([]),c(""),M(!1))},icon:!1,title:N.jsxs("div",{className:"cai-pannel",children:[N.jsxs("div",{className:"cai-title",children:[N.jsx("span",{className:"cai-require",children:"*"}),N.jsx("span",{className:"cai-question",children:"你认为此答案存在哪方面的问题?"})]}),N.jsx("div",{className:"cai-list",children:Ste.map(W=>N.jsx("span",{className:wn({"cai-item":!0,"cai-item__active":o.some(te=>te.id===W.id)}),onClick:()=>S(W),children:W.name},W.id))}),d&&N.jsx("div",{className:"cai-error",children:N.jsx("span",{className:"cai-error-text",children:"请选择您不满意的原因"})}),N.jsx("div",{className:"cai-title",children:N.jsx("span",{className:"cai-question",children:"您还有哪些建议?"})}),N.jsx(R.Input.TextArea,{onChange:v,value:l,autoSize:{minRows:3,maxRows:6},placeholder:`[需求场景]:\r
314
314
  [改进建议]:`,autoComplete:"off",showCount:!0,maxLength:300})]}),onConfirm:()=>B(),cancelButtonProps:{size:"middle"},okButtonProps:{size:"middle"},overlayStyle:{maxHeight:`${L}px`,overflow:"auto"},children:N.jsx("span",{className:"comment-feedback-item",children:N.jsx(ct,{type:"icon-cai"})})}),D===-1&&N.jsx("span",{className:"comment-feedback-item comment-feedback-item__active",children:N.jsx(ct,{type:"icon-cai"})})]})})]})};const Al=e=>{if(e)return e.split(".").pop()},vte=e=>{var t=e.match(/^.*\.(jpg|jpeg|png|bmp|JPG|JPEG|PNG|BMP)$/);return t?t[1]:null},kte=e=>e<xT?e+" B":e<Vu?(e/xT).toFixed(1)+" KB":e<ST?(e/Vu).toFixed(1)+" MB":(e/ST).toFixed(1)+" GB",_te=e=>e==null?void 0:e.replace(/[\r\n]+/gm,""),Rte=e=>{const t=/(.+)(?=\.\w+$)/,n=e==null?void 0:e.match(t);return n&&n[1]?n[1]:""},Yte=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=a=>n(a)}),Sm=e=>JSON.parse(window.atob(e.split(".")[1])),Ute=e=>{const t=Sm(e).exp;return new Date().valueOf()/1e3>=t};var Xs=(e=>(e.NETWORK="请你优先从网络中搜索",e.DOCUMENT="请你优先从以上文件中搜索",e))(Xs||{});const f2=40,Px=e=>/^https?:\/\/.*?\..+$/.test(e),Pte=["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/wps-office.docx"];function Qte(e){return e.replace(/([\\])/g,"\\$1")}const Bte=e=>{const{currentSession:t,fileId:n,file:r,docViewerUrl:a}=e,{service:i,popupContainer:s}=z.useContext(nn),[o,u]=z.useState(),[l,c]=z.useState("");z.useEffect(()=>{var M;if(r!=null&&r.id){u(r);const g=Al(r==null?void 0:r.name)||"";c(g)}else{if(!n||!((M=t==null?void 0:t.data)!=null&&M.id))return;i==null||i.getSessionKnowledgeFile(t.data.id,n).then(g=>{u(g);const f=Al(g==null?void 0:g.name)||"";c(f)})}},[]);const d=M=>{if(!(M!=null&&M.url)){R.message.config({getContainer:()=>(s==null?void 0:s.current)||document.body,prefixCls:"gbot-message"}),R.message.error("链接不存在"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Px(M.url)){R.message.config({getContainer:()=>(s==null?void 0:s.current)||document.body,prefixCls:"gbot-message"}),R.message.error("链接格式不正确"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}window.open(`${a}#/doc?url=${encodeURIComponent(M==null?void 0:M.url)}`)};return N.jsxs("div",{className:"file-item",onClick:()=>d(o),children:[N.jsx("div",{className:"item-left",children:N.jsx("img",{className:"file-icon",src:wl[l]})}),N.jsxs("div",{className:"item-main",children:[N.jsx("div",{className:"file-name",children:N.jsx(R.Typography.Paragraph,{style:{margin:0,width:"100%"},ellipsis:{rows:1,tooltip:o==null?void 0:o.name},children:o==null?void 0:o.name})}),N.jsxs("div",{className:"file-desc",children:[N.jsx("span",{children:l==null?void 0:l.toUpperCase()}),N.jsx("span",{children:","}),N.jsx("span",{children:kte((o==null?void 0:o.size)||0)})]})]})]})};const{Panel:Fte}=R.Collapse,Gte=e=>{var u,l,c,d,M,g;const{history:t,openTarget:n="_blank",container:r,onShowList:a}=e,[i,s]=z.useState(!1),o=t.searchingStatus?t.searchingStatus:(u=t.searchReference)!=null&&u.length?"end":"";return o?N.jsx("div",{className:"search-reference",children:N.jsxs("div",{className:"item-bot-plugin",onClick:()=>{s(!i)},children:[o==="start"&&N.jsxs(N.Fragment,{children:[N.jsx("img",{src:k2,alt:""}),N.jsx("span",{children:"正在搜索…"})]}),o==="end"&&N.jsx(R.Collapse,{ghost:!0,expandIconPosition:"right",onChange:a&&(()=>{o==="end"&&a(t.searchReference,t.messageId)}),children:N.jsx(Fte,{collapsible:r?"disabled":"icon",showArrow:!!(o==="end"&&((l=t.searchReference)!=null&&l.length)),header:N.jsxs(R.Space,{size:8,style:{width:"100%"},children:[N.jsxs("span",{className:"bot-plugin-status",children:[o==="end"&&((c=t.searchReference)==null?void 0:c.length)>0&&N.jsx("span",{className:"plugin-status-success",children:N.jsx(At.CheckOutlined,{})}),o==="end"&&!((d=t.searchReference)!=null&&d.length)&&N.jsx("span",{className:"plugin-status-error",children:N.jsx(At.CloseOutlined,{})})]}),o==="end"&&N.jsx("span",{className:"bot-plugin-title",children:(M=t.searchReference)!=null&&M.length?`已搜索到${t.searchReference.length}个网页`:"未找到搜索内容,请检查搜索服务"})]}),children:!r&&N.jsx("div",{className:"search-reference-list",children:(g=t.searchReference)==null?void 0:g.map((f,m)=>N.jsxs(R.Space,{direction:"vertical",className:"search-reference-list-item",onClick:()=>{window.open(f.link,n)},size:12,children:[N.jsxs("span",{className:"search-reference-list-item-title",children:[N.jsxs("span",{className:"number",children:[m+1,"."]}),f.title]}),f.snippet&&N.jsx("span",{className:"search-reference-list-item-content",children:f.snippet}),N.jsxs("div",{className:"search-reference-list-item-footer",children:[N.jsxs(R.Space,{children:[(f==null?void 0:f.siteIcon)&&N.jsx("img",{className:"logo",src:f==null?void 0:f.siteIcon}),N.jsx("span",{className:"name",children:f.siteName})]}),N.jsx("span",{className:"time",children:fn(f.ts||f.datePublished).format("YYYY-MM-DD")})]})]},f.link))})},"")})]})}):null};const Cu=e=>{const{josn:t}=e,n=JSON.stringify(t,null,2);return N.jsx("pre",{className:"json-display",children:N.jsx("code",{children:n})})};const Hte=e=>{const{history:t,onRelatedClick:n,relatedQuesion:r}=e;return N.jsxs(R.Space,{className:"session-related",direction:"vertical",size:12,children:[N.jsxs(R.Space,{className:"session-related-header",size:8,children:[N.jsx(ct,{type:"icon-xiangguanwenti",style:{color:"#0A51D1",fontSize:16}}),N.jsx("span",{className:"question-header-title",children:"相关问题"})]}),N.jsx(R.Space,{className:"session-related-main",direction:"vertical",size:12,children:r.map((a,i)=>N.jsx("div",{className:"question-main-item",onClick:()=>n==null?void 0:n(_te(a)),children:N.jsx(lc,{children:a})},i))})]})},Wte=e=>{if(!e)return e;try{return JSON.parse(e)}catch(t){return e}},qte=z.memo(Gte),h2=z.memo(Ux),xu=z.memo(lc),$te=z.memo(Bte),Su=e=>{if(!e)return!1;try{const t=JSON.parse(e);return!(t!=null&&t.code&&(t.code<200||t.code>300))}catch(t){return!0}},N2=e=>{var r;const t=JSON.parse(JSON.stringify(e))||[],n=(r=t==null?void 0:t.pop())==null?void 0:r.pop();return n?(n==null?void 0:n.type)==="BEFORE_CALL"||(n==null?void 0:n.type)==="FUNCTION_CALL":!1},Qx=e=>{var L,E,F,H,S,v,B,Y,W,te,oe;const{application:t,currentSession:n,history:r,isLastHistory:a,onRelatedClick:i,onAgainClick:s,isLoading:o,docViewerUrl:u,onEditClick:l,actions:c=!0,markdown:d}=e,{debug:M,transform:g,popupContainer:f}=z.useContext(nn),m=r.role===Fe.IHistoryRole.User,I=r.role===Fe.IHistoryRole.Robot,{Panel:A}=R.Collapse,[y,D]=z.useState(!0),j=()=>{R.message.config({getContainer:()=>(f==null?void 0:f.current)||document.body,prefixCls:"gbot-message"}),x2(r.content),R.message.success("复制成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})};return N.jsxs("div",{className:wn({"history-item":!0,"history-item__user":m,"history-item__bot":I}),children:[m&&N.jsxs("div",{className:"history-item-user",children:[t.type===0&&((L=r==null?void 0:r.imageContent)==null?void 0:L.length)&&N.jsx("div",{className:"item-user-images",children:N.jsx(xu,{children:r.imageContent.map((K,Ye)=>`![](${K})`).join(`
315
315
 
316
- `)})}),N.jsx("div",{className:"item-user-panel",children:N.jsx(R.Popover,{placement:"topLeft",overlayStyle:{padding:4},overlayClassName:"session-item-overlay-popover",getPopupContainer:K=>K.parentNode,content:g!=null&&g.userEdit||g!=null&&g.userCopy?N.jsxs(R.Space,{className:"item-user-popover",size:4,children:[(g==null?void 0:g.userEdit)&&N.jsx("div",{className:"user-pannel-item",onClick:()=>l==null?void 0:l(r.content),children:N.jsx(R.Button,{type:"link",size:"small",icon:N.jsx(ct,{type:"icon-bianji2"})})}),(g==null?void 0:g.userCopy)&&N.jsx("div",{className:"user-pannel-item",onClick:j,children:N.jsx(R.Button,{type:"link",size:"small",icon:N.jsx(ct,{type:"icon-fuzhi",style:{fontSize:"16px"}})})})]}):null,children:N.jsx("div",{className:"user-panel-main",children:N.jsx("span",{className:"item-user-content",children:N.jsx(xu,{showLatex:!1,children:Qte(r.content)})})})})}),N.jsx("div",{className:"item-user-file",children:N.jsx(R.Row,{gutter:[12,12],justify:"end",wrap:!0,children:(E=r.files)==null?void 0:E.map(K=>N.jsx(R.Col,{className:"user-file-col",children:N.jsx($te,{docViewerUrl:u,currentSession:n,file:K})},K.id))})})]}),I&&N.jsx("div",{className:"history-item-bot",children:N.jsxs("div",{className:"bot-content-wrapper",children:[t.type===2&&N.jsxs("div",{className:"item-bot-plugin",children:[N.jsx(R.Collapse,{ghost:!0,expandIconPosition:"right",children:(F=r.actions)==null?void 0:F.map((K,Ye)=>{var he,be,k,ze,X,w,ee,Ce,De,ne,re,Ae;return N.jsxs(A,{collapsible:M?"header":"icon",showArrow:M,header:N.jsxs(R.Space,{size:8,style:{width:"100%"},children:[N.jsxs("span",{className:"bot-plugin-status",children:[(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&Su((he=K.find(ce=>ce.type==="RESULT"))==null?void 0:he.data.result)&&N.jsx("span",{className:"plugin-status-success",children:N.jsx(At.CheckOutlined,{})}),K[K.length-1].type==="ABORT"&&N.jsx("span",{className:"plugin-status-error",children:N.jsx(At.CloseOutlined,{})}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&!Su((be=K.find(ce=>ce.type==="RESULT"))==null?void 0:be.data.result)&&N.jsx("span",{className:"plugin-status-error",children:N.jsx(At.CloseOutlined,{})}),(K[K.length-1].type==="BEFORE_CALL"||K[K.length-1].type==="FUNCTION_CALL")&&N.jsx("span",{className:"plugin-status-loading",children:N.jsx(At.LoadingOutlined,{})})]}),N.jsx("span",{className:"bot-plugin-title",children:((k=K[K.length-1].data)==null?void 0:k.pluginName)||((ze=K[K.length-1].data)==null?void 0:ze.pluginCode)}),N.jsx("span",{className:"bot-plugin-action",children:((X=K[K.length-1].data)==null?void 0:X.funcName)||((w=K[K.length-1].data)==null?void 0:w.funcCode)}),(K[K.length-1].type==="BEFORE_CALL"||K[K.length-1].type==="FUNCTION_CALL")&&N.jsx("span",{className:"bot-plugin-result",children:"执行中"}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&Su((ee=K.find(ce=>ce.type==="RESULT"))==null?void 0:ee.data.result)&&N.jsx("span",{className:"bot-plugin-result",children:"执行成功"}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&!Su((Ce=K.find(ce=>ce.type==="RESULT"))==null?void 0:Ce.data.result)&&N.jsx("span",{className:"bot-plugin-result",children:"执行失败"}),K[K.length-1].type==="ABORT"&&N.jsx("span",{className:"bot-plugin-result",children:"执行中止"})]}),children:[N.jsx("div",{className:"bot-plugin-content",children:"thought"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(De=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:De.data.thought})}),N.jsx("div",{className:"bot-plugin-content",children:"parameters"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(ne=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:ne.data.parameters})}),N.jsx("div",{className:"bot-plugin-content",children:"requestBody"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(re=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:re.data.requestBody})}),N.jsx("div",{className:"bot-plugin-content",children:"Response"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:Wte((Ae=K.find(ce=>ce.type==="RESULT"))==null?void 0:Ae.data.result)})})]},Ye)})}),r.isLoading&&N.jsx("div",{className:"history-input-progress",style:{padding:"4px 0"},children:r.content||N2(r.actions)?null:N.jsx(lu,{size:4,text:"思考中"})})]}),!!((H=r.searchReference)!=null&&H.length)&&N.jsx("div",{className:"item-bot-net",children:N.jsx(qte,{history:r})}),(S=r==null?void 0:r.reference)!=null&&S.length&&((v=g==null?void 0:g.reference)!=null&&v.referenceFirst)?N.jsx(h2,{history:r,docViewerUrl:u,markdown:d}):null,N.jsxs("div",{className:"item-bot-content",children:[(r==null?void 0:r.reasoningContent)&&N.jsxs("div",{className:"content-think",children:[(r==null?void 0:r.reasoningContent)&&N.jsxs("div",{className:"think-top",onClick:()=>{D(!y)},children:[N.jsx("img",{src:k2,alt:""}),(r==null?void 0:r.reasoningContent)&&!(r!=null&&r.content)&&N.jsx("span",{children:"我正在推理思考…"}),(r==null?void 0:r.reasoningContent)&&r.content&&N.jsxs("span",{children:["已完成推理(用时 ",(r==null?void 0:r.thinkingSecs)||0," 秒)"]}),N.jsx("span",{className:"think-action",children:y?N.jsx(ct,{type:"icon-zhankai",style:{fontSize:16}}):N.jsx(ct,{type:"icon-shouqi",style:{fontSize:16}})})]}),!!((B=r==null?void 0:r.reasoningContent)!=null&&B.trim())&&y&&N.jsxs("div",{className:"think-bottom",children:[N.jsxs("div",{className:"bottom-left",children:[(r==null?void 0:r.thinkingStatus)===Fe.IThinkingStatus.Start&&N.jsx("div",{className:"thinking"}),(r==null?void 0:r.thinkingStatus)===Fe.IThinkingStatus.End&&N.jsx("div",{className:"thinked",children:N.jsx(At.CheckOutlined,{})})]}),N.jsx("div",{className:"bottom-right",children:N.jsx(xu,bt(ae({},d),{children:(r==null?void 0:r.reasoningContent)||""}))})]})]}),N.jsx(xu,bt(ae({},d),{children:r.content}))]}),(Y=r==null?void 0:r.reference)!=null&&Y.length&&!((W=g==null?void 0:g.reference)!=null&&W.referenceFirst)?N.jsx(h2,{history:r,docViewerUrl:u,markdown:d}):null,r.isRelatedQuestion&&a?N.jsx("div",{style:{paddingBottom:12},children:N.jsx(lu,{size:4})}):null,r.isRelateLoading&&N.jsx("div",{className:"history-input-progress",style:{padding:"4px 0"},children:N2(r.actions)?null:N.jsx(lu,{size:4,text:"思考中"})}),t.arrange[0].recommendQuestionOpen&&(g==null?void 0:g.relate)&&a&&!!((te=r.relatedQuesion)!=null&&te.length)&&N.jsx(Hte,{relatedQuesion:r.relatedQuesion,onRelatedClick:i}),c&&!r.isSensitive&&!!r.messageId&&N.jsx(Ote,{appId:t.id,history:r,sessionId:(oe=n==null?void 0:n.data)==null?void 0:oe.id,onAgainClick:s,isLastHistory:a,currentSession:n})]})}),r.isContext&&N.jsxs(R.Divider,{children:[N.jsx("div",{style:{color:"#84868C",fontSize:"12px"},children:"已开启新话题"})," "]}),r.isWaiting&&N.jsx("div",{className:"history-input-progress",children:N.jsx(lu,{size:4,text:"思考中"})})]})};const Vte=e=>{const{className:t,style:n,id:r,file:a,actions:{upload:i,remove:s,checkStatus:o}={},onUrlChange:u,onStatusChange:l}=e,[c,d]=z.useState(e.uploading),[M,g]=z.useState(!1);z.useEffect(()=>{d(e.uploading)},[e.uploading]);const[f,m]=z.useState(e.url);z.useEffect(()=>{m(e.url)},[e.url]),z.useEffect(()=>{i&&a instanceof File&&(f||c||(d(!0),i(a).then(D=>{m(D),u&&u(D)}).catch(D=>g(D)).finally(()=>d(!1))))},[i,f,a]);const[I,A]=z.useState(a instanceof File||a==null?void 0:a.status);z.useEffect(()=>{A(a instanceof File||a==null?void 0:a.status)},[a]);const y=()=>{r&&o&&I===Fe.AecKnowledgeFileStatus.Processing&&o(r).then(D=>{D!==I&&(I!==void 0&&l&&l(D),A(D))}).catch(D=>A(Fe.AecKnowledgeFileStatus.Failed))};return z.useEffect(()=>{y()},[r,o,I]),z.useEffect(()=>{Yte(a).then(D=>{m(D)})},[a]),a?N.jsxs("div",{className:`file-preview ${t}`,style:n,children:[N.jsx(R.Image,{src:f,className:"file-icon"}),c&&N.jsx(R.Spin,{className:"file-action file-process",indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:16},spin:!0})}),!c&&s&&N.jsx(R.Tooltip,{overlayClassName:"file-remove-tooltip",title:"删除文件",getPopupContainer:D=>D.parentNode,children:N.jsx(R.Button,{className:"file-action file-remove",icon:N.jsx(ct,{style:{fontSize:"10px"},type:"icon-shanchu"}),onClick:()=>{s(a,r)}})})]}):N.jsx(N.Fragment,{})};const Bx=z.forwardRef((e,t)=>{var k,ze,X;const{text:n,onTextSend:r,disabled:a,maxLength:i=0,onChange:s,networkStatus:o,clearAction:u,loading:l}=e,[c,d]=z.useState(!0),[M,g]=z.useState(),[f,m]=z.useState(),[I,A]=z.useState(15),[y,D]=z.useState(12),[j,L]=z.useState(0),[E,F]=z.useState(!1),H=z.useRef(null),S=z.useRef(null);z.useImperativeHandle(t,()=>({clear:Y,prevent:W,focus:te,update:B,getCurrentText:()=>f})),z.useEffect(()=>{if(g(n),n){const w=document.createElement("div");w.innerHTML=n;const ee=w.textContent||w.innerText||"";m(ee.replace(/[\n\s]+$/,""))}else m(void 0);S.current&&(oe(),te())},[n]),z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor();if(w&&w.bounds!==document.body)try{console.log("设置 bounds"),w.bounds=document.body}catch(ee){console.warn("设置 bounds 失败:",ee)}},[S.current]);const v=()=>{var ne;if(!S.current)return;const w=S.current.getEditor(),ee=w.root;let De=w.getText().trim().length>0;if(!De){const re=ee.querySelectorAll("p");for(const Ae of Array.from(re)){const ce=Array.from(Ae.childNodes);if(ce.length>1||ce.length===1&&((ne=ce[0].nodeName)==null?void 0:ne.toLowerCase())!=="br"){De=!0;break}}}De?ee.classList.add("hide-placeholder"):ee.classList.remove("hide-placeholder")};z.useEffect(()=>{v()},[M]),z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor().root,ee=()=>{w.classList.add("hide-placeholder")},Ce=()=>{setTimeout(()=>{v()},0)};return w.addEventListener("compositionstart",ee),w.addEventListener("compositionend",Ce),()=>{w.removeEventListener("compositionstart",ee),w.removeEventListener("compositionend",Ce)}},[S.current]);const B=w=>{g(w),setTimeout(()=>{v()},0)},Y=()=>{g(void 0),m(void 0),S.current&&S.current.getEditor().root.classList.remove("hide-placeholder")},W=()=>{},te=()=>{if(!S.current||c)return;const w=S.current.getEditor();w.focus(),setTimeout(()=>{w.getLength()>0&&w.setSelection(w.getLength(),w.getLength())})};z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor();i&&(w.on("text-change",()=>{w.getLength()>i&&w.deleteText(i,w.getLength()),oe(),K(),te()}),w.on("selection-change",K))},[S,i]);const oe=()=>{if(!S.current)return;const w=S.current.getEditor(),ee=w.getBounds(w.getLength()-1,w.getLength());ee&&(A(ee.left),D(ee.top))},K=w=>{if(!S.current)return;const ee=S.current.getEditor(),Ce=w||ee.getSelection();(Ce==null?void 0:Ce.index)!==void 0&&L(Ce==null?void 0:Ce.index)};Hr.useKeyPress("1",()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();E&&o&&(w==null||w.blur(),setTimeout(()=>Ye()))}),Hr.useKeyPress("2",()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();E&&(w==null||w.blur(),setTimeout(()=>he()))});const Ye=()=>{var ee;if(!o)return;const w=(ee=S.current)==null?void 0:ee.getEditor();w==null||w.focus(),F(!1),setTimeout(()=>w==null?void 0:w.insertText(j,Xs.NETWORK))},he=()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();w==null||w.focus(),F(!1),setTimeout(()=>w==null?void 0:w.insertText(j,Xs.DOCUMENT))},be=()=>{var ee,Ce,De;const w=(ee=S.current)==null?void 0:ee.getEditor();return w&&(w==null?void 0:w.getLength())>2&&!((Ce=w.getText())!=null&&Ce.includes(Xs.NETWORK))&&!((De=w.getText())!=null&&De.includes(Xs.DOCUMENT))};return z.useEffect(()=>{var w,ee;l?(w=S.current)==null||w.getEditor().disable():(ee=S.current)==null||ee.getEditor().enable()},[l]),z.useEffect(()=>(window.addEventListener("resize",oe),()=>{window.removeEventListener("resize",oe)}),[]),N.jsxs("div",{className:wn({"quill-editor":!0,"quill-editor__active":c}),children:[N.jsxs("div",{className:wn({"quill-editor-wrapper":!0,"quill-editor-wrapper__scroll":y>=200}),onKeyDownCapture:w=>{!w.shiftKey&&w.code==="Enter"&&w.preventDefault()},children:[N.jsx(lO,{theme:"snow",placeholder:"输入你想问的,shift+enter 换行。",ref:S,bounds:document.body,onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:w=>{if(!w.shiftKey&&w.keyCode==13){const ee=M==null?void 0:M.replace(/[\n\s]+$/,"");g(ee),r&&r(f)}},value:M,modules:{toolbar:!1},onChange:(w,ee,Ce,De)=>{if(!ee)return;g(w);const ne=De.getText().replace(/[\n\s]+$/,"");m(ne),s&&s(w,De)}}),N.jsx("div",{className:"shortcut-direct",ref:H,style:{position:"absolute",left:I+4,top:y,cursor:"pointer",visibility:be()?"visible":"hidden"},children:N.jsx(R.Popover,{autoAdjustOverflow:!0,placement:"top",trigger:"hover",getPopupContainer:w=>w.parentNode,onVisibleChange:w=>{F(w)},content:N.jsxs("div",{className:"shortcut-direct-pannel",children:[N.jsxs("div",{className:wn({"shortcut-direct-item":o,"shortcut-direct-item__disabled":!o}),onClick:Ye,children:[N.jsx("span",{className:"title",children:"指定联网回答"}),N.jsx("span",{className:"text",children:"快捷键1"})]}),N.jsxs("div",{className:"shortcut-direct-item",onClick:he,children:[N.jsx("span",{className:"title",children:"指定文档回答"}),N.jsx("span",{className:"text",children:"快捷键2"})]})]})})})]}),N.jsxs("div",{className:"quill-editor-send",children:[N.jsx("div",{style:{height:32},children:u||N.jsx("span",{})}),N.jsxs("div",{style:{height:32,display:"flex",alignItems:"center"},children:[N.jsxs(R.Space,{size:2,style:{color:"#84868C"},children:[N.jsx("span",{children:((k=S.current)==null?void 0:k.getEditor())&&((X=(ze=S.current)==null?void 0:ze.getEditor())==null?void 0:X.getLength())-1}),N.jsx("span",{children:"/"}),N.jsx("span",{children:i})]}),N.jsx(R.Button,{type:"link",ghost:!0,disabled:a||!f,loading:l,icon:N.jsx(ct,{className:"icon-sendMsg",style:{fontSize:24},type:"icon-fasong"}),onClick:()=>{r&&r(f)}})]})]})]})});Bx.displayName="Qu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AuOTkxMyAxNC41ODM4QzIwLjkzNzMgMTUuNjQ1OSAyMC4wNTUzIDE2LjUwMDggMTguOTc1MiAxNi41MDA4WiIgZmlsbD0iI0Q3QThGRiIvPgo8L3N2Zz4K",Xte=e=>{var c;const{item:t,isRecommendClearing:n,isOnlyQuestion:r,question:a,setQuestion:i,onItemClick:s}=e,[o,u]=z.useState(!1),{popupContainer:l}=z.useContext(nn);return z.useEffect(()=>{t&&(!t.icon&&!t.file.url&&!t.name?u(!0):u(!1))},[t]),N.jsxs(R.Space,{direction:"vertical",size:r||!r&&o?0:4,className:wn({"question-pannel":!0,"question-pannel__active":(a==null?void 0:a.id)===t.id,"multiline-question-pannel":!r&&o}),onClick:()=>{if(n){R.message.config({getContainer:()=>(l==null?void 0:l.current)||document.body,prefixCls:"gbot-message"}),R.message.error("请稍后"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}(a==null?void 0:a.id)===t.id?(i(void 0),s==null||s(void 0)):(i(t),s==null||s(t))},children:[N.jsxs("div",{className:wn({"question-top":!0,"not-have-top":r||!r&&o}),children:[!!(t!=null&&t.icon)&&N.jsx("div",{className:"question-top-tip",children:N.jsx("img",{src:t.icon,alt:""})}),N.jsx("div",{className:"question-top-title",children:N.jsx(R.Typography.Paragraph,{style:{margin:0,width:"100%"},ellipsis:{rows:1,tooltip:t==null?void 0:t.name},children:t.name})}),N.jsx("div",{className:wn({"question-top-type":!0,"question-only-plus-file":!r&&!t.icon&&!t.name}),children:!!((c=t.file)!=null&&c.url)&&N.jsx("img",{className:"file-icon",src:wl[Al(t.file.url)||""]})})]}),N.jsx("div",{className:wn({"question-bottom":!0,"multiline-question":!r&&o}),children:N.jsx(R.Typography.Paragraph,{style:{margin:0,width:"100%"},ellipsis:{rows:!r&&o?3:1,tooltip:{overlayClassName:"recommend-tooltip-overlay"}},children:t==null?void 0:t.question})})]})},Fx=z.forwardRef((e,t)=>{const{onItemClick:n,data:r,isRecommendClearing:a,layoutBreakpoints:i=[450]}=e,[s,o]=z.useState(),[u,l]=z.useState(),[c,d]=z.useState(!1),[M,g]=z.useState(2);return z.useImperativeHandle(t,()=>({clear(){l(void 0)}})),z.useEffect(()=>{const f=document.getElementById("dialog-modal");if(!f)return;const m=y=>{const D=[...i].sort((L,E)=>L-E),j=D.findIndex(L=>y<L);return j===-1?D.length+1:j+1},I=()=>{const y=f.clientWidth;g(m(y))};I();let A=null;return window.ResizeObserver?(A=new ResizeObserver(I),A.observe(f)):window.addEventListener("resize",I),()=>{A==null||A.disconnect(),window.removeEventListener("resize",I)}},[i]),z.useEffect(()=>{if(r!=null&&r.length){o(r);return}},[r]),z.useEffect(()=>{if(!s)return;const f=s.find(m=>m.file.url||m.icon||m.name);d(!f)},[s]),N.jsxs("div",{className:"questions",children:[N.jsxs(R.Space,{size:8,className:"question-tip",children:[N.jsx("img",{src:Zte,alt:""}),N.jsx("span",{children:"请试试这样提问:"})]}),N.jsx(R.Row,{gutter:[12,12],wrap:!0,className:"question-row",children:s==null?void 0:s.map((f,m)=>N.jsx(R.Col,{span:24/M,children:N.jsx(Xte,{item:f,isRecommendClearing:a,isOnlyQuestion:c,question:u,setQuestion:l,onItemClick:n})},m))})]})});Fx.displayName="Recommend";const Jte=e=>{const{transform:t}=z.useContext(nn),{icon:n,text:r,children:a}=e;return N.jsxs("div",{className:"greeting",children:[(t==null?void 0:t.greet)&&n&&N.jsx("div",{className:"greeting-icon",children:N.jsx("img",{src:n})}),(t==null?void 0:t.greet)&&r&&N.jsx("div",{className:"greeting-word",children:r}),N.jsx("div",{className:"greeting-questions",children:a})]})};const Kte=({visible:e=!0,text:t="所有内容均由 AecGPT 人工智能模型生成,请仔细甄别。",element:n})=>{if(!e)return null;const r=z.useRef(null);return z.useEffect(()=>{var a;n&&((a=r.current)==null||a.replaceWith(n))},[n]),n?N.jsx("div",{ref:r}):N.jsx("div",{className:"footer-warning",ref:r,children:t})},ene=({className:e,tips:t,children:n})=>N.jsxs("div",{className:`home-footer ${e||""}`,children:[n,N.jsx(Kte,{visible:t!==!1,text:typeof t=="string"?t:void 0,element:typeof t!="string"&&typeof t!="boolean"?t:void 0})]});const tne=e=>{const{className:t,style:n,id:r,file:a,actions:{upload:i,remove:s,download:o,checkStatus:u,preview:l}={},onUrlChange:c,onStatusChange:d}=e,M=Al((a==null?void 0:a.name)||""),[g,f]=z.useState(e.uploading),[m,I]=z.useState(!1);z.useEffect(()=>{f(e.uploading)},[e.uploading]);const[A,y]=z.useState(e.url);z.useEffect(()=>{y(e.url)},[e.url]),z.useEffect(()=>{i&&a instanceof File&&(A||(f(!0),setTimeout(()=>{f(!1)},2e3),i(a).then(E=>{y(E),c&&c(E)}).catch(E=>I(E)).finally(()=>{f(!1)})))},[i,A,a]);const[D,j]=z.useState(a instanceof File||a==null?void 0:a.status);z.useEffect(()=>{j(a instanceof File||a==null?void 0:a.status)},[a]);const L=()=>{r&&u&&D===Fe.KnowledgeFileStatus.Processing&&u(r).then(E=>{E!==D&&(D!==void 0&&d&&d(E),j(E))}).catch(E=>j(Fe.KnowledgeFileStatus.Failed))};return z.useEffect(()=>{L()},[r,u,D]),a?N.jsxs("div",{className:`file-card ${t}`,style:n,children:[M&&N.jsx("img",{className:"file-icon",src:wl[M]}),N.jsx("div",{className:"file-desc",children:N.jsx("div",{className:"file-desc-name",onClick:()=>l==null?void 0:l(a),children:N.jsx(R.Typography.Paragraph,{style:{margin:0},ellipsis:{rows:1,tooltip:a.name},children:a.name})})}),(a==null?void 0:a.status)===1?N.jsxs("div",{className:"analysis",children:[N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:16},spin:!0})}),N.jsx("span",{children:"解析中"})]}):(a==null?void 0:a.status)===3?s&&N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("div",{className:"file-action file-failed",children:N.jsx(At.CloseCircleFilled,{})}),N.jsx("div",{className:"file-action file-remove",onClick:()=>{s(a,r)},children:N.jsx(At.CloseOutlined,{})})]}):s&&o&&N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("div",{className:"file-action file-remove",onClick:()=>{o(a,r)},children:N.jsx(ct,{type:"icon-xiazai",style:{fontSize:16}})}),N.jsx("div",{className:"file-action file-remove",onClick:()=>{s(a,r)},children:N.jsx(At.CloseOutlined,{})})]})]}):N.jsx(N.Fragment,{})};const nne=e=>{const{isvisible:t,onClose:n}=e,r=N.jsxs("div",{className:"title",children:[N.jsx(At.CloseCircleFilled,{style:{color:"#F33E3E",fontSize:20}}),N.jsx("span",{children:"确认清空所有文件"})]});return N.jsx(R.Modal,{className:"clear-modal",width:340,open:t,title:r,centered:!0,maskClosable:!1,onCancel:()=>{n("cancel")},getContainer:document.getElementById("dialog-modal")||!1,footer:[N.jsx(R.Button,{onClick:()=>{n("cancel")},children:"暂时保留"},"cancel"),N.jsx(R.Button,{type:"primary",onClick:()=>{n("clear")},children:"继续清空"},"confirm")],children:N.jsx("div",{className:"content",children:"列表中的文件清空后不能恢复,请确认是否清空所有文件。"})})},Gx=z.forwardRef((e,t)=>{const{appId:n,sid:r,onStatusChange:a,createSession:i,disabled:s=!1,afterFileAdd:o,afterFileDelete:u,onFileListChange:l,shouldContinue:c=!0,afterFilesClear:d,docViewerUrl:M,isFirstSession:g}=e,[f,m]=z.useState([]),I=z.useRef(f),[A,y]=z.useState([]),[D,j]=z.useState(!1),[L,E]=z.useState(""),F=z.useRef(c),[H,S]=z.useState(!1),{Dragger:v}=R.Upload,{service:B,popupContainer:Y}=z.useContext(nn);z.useEffect(()=>{F.current=c},[c]),z.useImperativeHandle(t,()=>({update:W,clear:De})),z.useEffect(()=>{g||(y([]),m([]),W())},[r]);const W=()=>r?new Promise((ne,re)=>{B==null||B.getApplicationIdSessionKnowledgeFiles(n,r,{enabled:1}).then(Ae=>{y(Ae),m(Ae),te(Ae)}).finally(()=>{ne()})}):Promise.resolve(),te=ne=>et(exports,null,function*(){r&&(ne==null||ne.map(re=>et(exports,null,function*(){var Ae;try{if(yield B==null?void 0:B.checkFileReady(n,r,re.id)){const Ne=[...I.current],ke=ne.findIndex(we=>we.id===re.id);ke!==-1&&(Ne[ke].status=2),m(Ne),o&&o(re,r)}}catch(ce){if(((Ae=ce.cause)==null?void 0:Ae.code)===-101){const Ne=[...I.current],ke=ne.findIndex(we=>we.id===re.id);ke!==-1&&(Ne[ke].status=3),m(Ne);return}}})))});z.useEffect(()=>{a&&a(L)},[L]);const oe=ne=>et(exports,null,function*(){if(ne.size<=0)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("该文件为空,请重新上传文档"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(Rte(ne.name).length>f2)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`文件名称不能超过${f2}字符`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(ne.size>50*Vu)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`${ne.name}文件大小不能超过 50M`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(Pte.some(ce=>ce===ne.type)){const ce=ne;ce.status=1,m(Ne=>Ne.length>=10?Ne:[...Ne,ce])}else ze("存在文件格式不正确的文件,已自动去除");return!1});z.useEffect(()=>{if(f.length<10?j(!1):j(!0),!f.length){E("");return}const ne=f.find(ce=>ce.status===1),re=f.find(ce=>ce.status===3);f.every(ce=>ce.status===2)?E("successed"):ne?E("process"):re&&E("failed"),l&&l(f)},[f]),z.useEffect(()=>{I.current=f;const ne=f.filter(re=>!A.includes(re));he(ne),y(f)},[f]);const K=(ne,re,Ae)=>et(exports,null,function*(){var ke;const ce=[...I.current],Ne=I.current.findIndex(we=>we===Ae);Ne!==-1&&(ce[Ne].id=re),m(ce);try{const we=yield B==null?void 0:B.checkFileReady(n,ne,re,()=>F.current,void 0,Qe=>{const Ze=[...I.current],Nt=I.current.findIndex(gn=>gn===Ae);Ze[Nt].url=Qe.url,m(Ze)});if(we){const Qe=[...I.current],Ze=I.current.findIndex(Nt=>Nt===Ae);Ze!==-1&&(Qe[Ze].status=2,Qe[Ze].url=we.url),m(Qe),o&&o(we,ne)}}catch(we){if(((ke=we.cause)==null?void 0:ke.code)===-101){const Qe=[...I.current],Ze=I.current.findIndex(Nt=>Nt===Ae);Ze!==-1&&(Qe[Ze].status=3),m(Qe);return}}}),Ye=()=>r?Promise.resolve(r):i(),he=ne=>{ne.length&&Ye().then(re=>{ne==null||ne.forEach(Ae=>{var ce;F.current=!0,(ce=ee(re,Ae))==null||ce.then(Ne=>{var we;if(!Ne)return;const ke={url:Ne,name:Ae.name,size:Ae.size,type:1,origin:Fe.IFileOrigin.AECPILOT};F.current&&((we=be(re,ke))==null||we.then(Qe=>K(re,Qe,Ae)))})})})},be=(ne,re)=>B==null?void 0:B.postApplicationIdSessionKnowledgeSessionFile(n,ne,re),ze=cO(ne=>{R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(ne),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})},300),X=ne=>{r&&ne!=null&&ne.id&&(B==null||B.delApplicationIdSessionKnowledgeFileId(n,r,ne.id).then(re=>{const Ae=f.filter(ce=>ce.id!==ne.id);m(Ae),R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.success("删除成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),u&&u(ne.id)}))},w=N.jsx(N.Fragment,{children:N.jsxs("div",{className:"card-title",children:[N.jsx("span",{className:"name",children:"上传列表"}),N.jsxs("div",{className:"actions",children:[N.jsx(R.Upload,{accept:".doc, .docx, .pdf",beforeUpload:oe,showUploadList:!1,style:{margin:0},multiple:!0,children:N.jsx(R.Button,{className:"action",type:"link",disabled:D,children:N.jsxs("div",{className:"detail",children:[N.jsx(ct,{type:"icon-tianjia",style:{fontSize:16}}),N.jsx("div",{children:"添加"})]})})}),N.jsx(R.Button,{className:"action",type:"link",disabled:!f.length,onClick:()=>{S(!0)},children:N.jsxs("div",{className:"detail",children:[N.jsx(ct,{type:"icon-shanchu",style:{fontSize:16}}),N.jsx("span",{children:"清空"})]})})]})]})}),ee=(ne,re)=>{if(!ne)throw Error("session is not exist.");return B==null?void 0:B.uploadFile(ne,re).catch(()=>(R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("服务异常,请稍后再试"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),""))},Ce=N.jsx("div",{className:`upload-enter ${s?"disabled":""}`,children:N.jsx(R.Badge,{size:"small",color:"#9C24F2",count:L==="successed"?f.length:L==="process"?N.jsx(R.Spin,{className:"file-action file-process",indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:14},spin:!0})}):L==="failed"?N.jsx(At.CloseCircleFilled,{style:{color:"#dc4446",fontSize:14}}):0,children:N.jsx(ct,{type:"icon-shangchuanwenjian",style:{fontSize:24}})})}),De=()=>new Promise(ne=>{const re=I.current;if(!r)return ne();const Ae=[];re.filter(ce=>ce.id).forEach(ce=>Ae.push({id:ce.id,status:ce.status})),B==null||B.delApplicationIdSessionKnowledgeFile(n,r,{files:Ae}).then(()=>{y([]),m([]),I.current=[],d&&d(),F.current=!1,ne()})});return N.jsxs("div",{className:"footer-upload",children:[s?Ce:N.jsx(R.Popover,{overlayClassName:"upload-popover",overlayInnerStyle:{width:264,minHeight:211,maxHeight:356,borderRadius:12,zIndex:1},placement:"topLeft",getPopupContainer:()=>(Y==null?void 0:Y.current)||document.body,content:N.jsx("div",{className:"file-upload",children:f.length>0?N.jsx("div",{className:"upload-wrapper",children:N.jsx("div",{className:"input-files",style:{display:"flex",flexDirection:"column"},children:f==null?void 0:f.map((ne,re)=>N.jsx(tne,{file:ne,actions:{preview:()=>{if(!(ne!=null&&ne.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在上传中"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Px(ne.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("链接格式不正确"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}window.open(`${M}#/doc?url=${encodeURIComponent(ne==null?void 0:ne.url)}`)},remove:()=>{X(ne)},download:()=>{r&&(B==null||B.getApplicationIdSessionKnowledgeFileId(n,r,ne.id).then(Ae=>{if(!(Ae!=null&&Ae.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("下载失败"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}const ce=document.createElement("a");ce.href=Ae.url,ce.download=Ae.name||"",ce.click()}))}}},re))})}):N.jsxs(v,{name:"file",showUploadList:!1,multiple:!0,beforeUpload:oe,accept:".pdf, .doc, .docx",maxCount:10,listType:"picture",children:[N.jsx("span",{className:"file-upload-icon",children:N.jsx(At.CloudUploadOutlined,{})}),N.jsxs(R.Space,{className:"file-upload-action",children:["拖拽文件至此,或者",N.jsx(R.Button,{type:"link",style:{padding:0},children:"上传文件"})]}),N.jsxs("div",{className:"file-upload-desc",children:[N.jsx("div",{className:"item-upload-desc",children:N.jsx("span",{children:"1.支持 doc、pdf、docx 格式;"})}),N.jsx("div",{className:"item-upload-desc",children:"2.单个文件不超过 50 M;"}),N.jsx("div",{className:"item-upload-desc",children:"3.最多上传 10 个文件。"})]})]})}),title:w,trigger:"click",children:Ce}),H&&N.jsx(nne,{isvisible:H,onClose:ne=>{ne==="clear"&&De(),S(!1)}})]})});Gx.displayName="UploadFiles";const rne=e=>{const{files:t,sessionId:n,isvisible:r,onClose:a}=e,{service:i}=z.useContext(nn),s=N.jsxs("div",{className:"title",children:[N.jsx(At.ExclamationCircleFilled,{style:{color:"#FF9326",fontSize:20}}),N.jsx("span",{children:"文件任务正在处理"})]}),o=()=>{if(!n)return;const u=[];t.filter(l=>l.id).forEach(l=>u.push({id:l.id,status:l.status})),i==null||i.deleteSessionKnowledgeFiles(n,{files:u}),a("abandon")};return N.jsx(R.Modal,{className:"prompt-modal",width:340,open:r,title:s,centered:!0,maskClosable:!1,onCancel:()=>a("close"),getContainer:document.getElementById("dialog-modal")||!1,footer:[N.jsx(R.Button,{onClick:()=>{o()},children:"放弃文件"},"cancel"),N.jsx(R.Button,{type:"primary",onClick:()=>{a("continue")},children:"继续上传"},"confirm")],children:N.jsx("div",{className:"content",children:"你可以选择后台继续上传,也可以直接离开放弃上传中的文件。"})})};const{Panel:m2}=R.Collapse,Hx=z.forwardRef((e,t)=>{const{promptVariables:n,setPromptVariables:r,currentSession:a}=e,[i]=R.Form.useForm(),{agentClient:s}=z.useContext(nn);z.useImperativeHandle(t,()=>({clear(){i.resetFields()}})),z.useEffect(()=>{if(!a)return;const c=()=>{const M=a.promptVariables.filter(g=>!(g.type===Fe.PromptVariableType.User&&g.key==="query")&&!(g.type===Fe.PromptVariableType.System&&g.key==="datetime"));r(M.sort((g,f)=>g.key.localeCompare(f.key)))};return a.addEventListener("activated",c),()=>{a==null||a.removeEventListener("activated",c)}},[a]),z.useEffect(()=>{if(!n)return;const c={},d={};n.forEach(M=>{M.type===Fe.PromptVariableType.System?d[M.key]=M.value:c[M.key]=M.value}),i.setFieldsValue({userPrompts:c,systemPrompts:d})},[n]);const o=(c,d)=>{n.map(M=>{M.id===c&&(M.value=d.target.value)}),r([...n].sort((M,g)=>M.key.localeCompare(g.key)))},u=(n==null?void 0:n.filter(c=>c.type===Fe.PromptVariableType.System))||[],l=(n==null?void 0:n.filter(c=>c.type===Fe.PromptVariableType.User))||[];return n!=null&&n.length?N.jsx(R.Form,{autoComplete:"off",form:i,labelWrap:!0,labelAlign:"left",labelCol:{style:{width:120}},className:"prompt-form",children:N.jsxs(R.Collapse,{bordered:!1,ghost:!0,className:"prompt-variables-collapse",defaultActiveKey:[Fe.PromptVariableType.System,Fe.PromptVariableType.User],children:[u.length&&N.jsx(m2,{header:"角色设定变量",children:u.map(c=>N.jsx(R.Form.Item,{label:c.name,name:["systemPrompts",c.key],style:{marginBottom:8},rules:[{required:!0,message:"请输入"}],children:N.jsx(R.Input,{placeholder:"请输入",maxLength:s==null?void 0:s.questionContextMaxLength,onBlur:d=>o(c.id,d)})},c.key))},Fe.PromptVariableType.System),l.length&&N.jsx(m2,{header:"用户指令变量",children:l.map(c=>N.jsx(R.Form.Item,{label:c.name,name:["userPrompts",c.key],style:{marginBottom:8},rules:[{required:!0,message:"请输入"}],children:N.jsx(R.Input,{placeholder:"请输入",maxLength:s==null?void 0:s.questionContextMaxLength,onBlur:d=>o(c.id,d)})},c.key))},Fe.PromptVariableType.User)]})}):null});Hx.displayName="PromptSetting";const ane=e=>{const{session:t,onChangeEditStatus:n,onEditNameConfirm:r}=e,[a,i]=z.useState("");z.useEffect(()=>{var l,c;const u=((c=(l=t.data)==null?void 0:l.name)==null?void 0:c.slice(0,20))||"";i(u)},[t]);const s=()=>{r(t,a),n("",!1)},o=()=>{n("",!1)};return N.jsxs("div",{className:"name-edit-panel",children:[N.jsx(R.Input,{value:a,showCount:!0,className:"name-edit-input",maxLength:20,onChange:u=>i(u.target.value)}),N.jsx(R.Button,{type:"link",icon:N.jsx(At.CheckOutlined,{}),style:{color:"#30BF13",right:40},onClick:s}),N.jsx(R.Button,{type:"link",icon:N.jsx(At.CloseOutlined,{}),style:{color:"#84868C"},onClick:o})]})},ine=e=>{var m,I,A,y,D,j,L,E,F,H,S,v;const{session:t,index:n,currentSessionId:r,onChangeSession:a,onDelSession:i,onTopSession:s,onEditNameConfirm:o,editSessionId:u,isEdit:l,onChangeEditStatus:c}=e,[d,M]=z.useState(-1),[g,f]=z.useState("");return z.useEffect(()=>{var B,Y,W;if((B=t.data)!=null&&B.lastFileName){const te=t.data.lastFileName.lastIndexOf(".");f((W=(Y=t.data)==null?void 0:Y.lastFileName)==null?void 0:W.slice(te+1))}},[t]),N.jsx("div",{id:(m=t.data)==null?void 0:m.id,className:`session-item-panel ${((I=t.data)==null?void 0:I.id)===r?"current-item":""}`,onMouseEnter:()=>M(n),onMouseLeave:()=>M(-1),onClick:()=>!l&&a(t),children:N.jsxs(R.Space,{direction:"vertical",size:12,className:"session-item-space",children:[N.jsxs("div",{className:"item-question",children:[((A=t.data)==null?void 0:A.id)===r&&N.jsx(R.Tag,{children:"当前的"}),l&&u===((y=t.data)==null?void 0:y.id)?N.jsx(ane,{session:t,onChangeEditStatus:c,onEditNameConfirm:o}):N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"session-item-name",children:(D=t.data)==null?void 0:D.name}),d!==n&&((j=t.data)==null?void 0:j.top)&&N.jsx(ct,{type:"icon-sheweihuihuaqian",style:{color:"#9C24F2",fontSize:16}}),d===n&&N.jsxs("div",{className:"icons-bar",children:[(L=t.data)!=null&&L.top?N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-sheweihuihuaqian"}),onClick:B=>{s(t,!1),B.stopPropagation()},style:{color:"#9C24F2"}}):N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-weisheweihuihuaqian"}),onClick:B=>{s(t,!0),B.stopPropagation()}}),N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-bianji2"}),onClick:B=>{var Y;c((Y=t.data)==null?void 0:Y.id,!0),B.stopPropagation()}}),N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-shanchu1"}),onClick:B=>i(t,B)})]})]})]}),(E=t.data)!=null&&E.finialMessage?N.jsx("div",{className:"item-answer",children:t.data.finialMessage}):N.jsx("div",{style:{height:"22px"}}),!!((F=t.data)!=null&&F.fileCount)&&N.jsx("div",{className:"item-file",children:N.jsxs(R.Space,{children:[g&&N.jsxs("div",{style:{position:"relative"},children:[N.jsx("img",{className:"file-icon",src:wl[g]}),t.data.fileStatus===10?N.jsx(At.CheckCircleFilled,{className:"file-status-icon success-file-icon"}):t.data.fileStatus===20?N.jsx(At.CloseCircleFilled,{className:"file-status-icon failed-file-icon"}):t.data.fileStatus===30?N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{className:"file-status-icon loading-file-icon",spin:!0})}):N.jsx(N.Fragment,{})]}),N.jsx("span",{className:"file-name",children:(H=t.data)==null?void 0:H.lastFileName}),N.jsxs(R.Tag,{children:["共 ",(S=t.data)==null?void 0:S.fileCount," 个"]})]})})]})},(v=t.data)==null?void 0:v.id)},sne=e=>{const{currentSessionId:t,onSessionChange:n,onClose:r}=e,{agentClient:a,popupContainer:i}=z.useContext(nn),[s,o]=z.useState(!1),[u,l]=z.useState(!1),[c,d]=z.useState(""),[M,g]=z.useState([]),f=z.useRef(M);z.useEffect(()=>{f.current=[],g(f.current),o(!0),a==null||a.getSessions().then(j=>et(exports,null,function*(){o(!1),f.current=[...j],g(f.current)}))},[]),z.useEffect(()=>{M.length&&t&&setTimeout(()=>{var j;(j=document.getElementById(t))==null||j.scrollIntoView(!0)},100)},[M]);const m=(j,L)=>{a==null||a.removeSession(j,!0).then(()=>et(exports,null,function*(){const E=M.filter(F=>{var H,S;return((H=F.data)==null?void 0:H.id)!==((S=j.data)==null?void 0:S.id)});j.data.id===t&&n&&n("",null),R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.success("删除成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),f.current=[...E],g(f.current)})),L==null||L.stopPropagation()},I=j=>{j&&(n&&n(j.sessionId,j),r())},A=(j,L)=>et(exports,null,function*(){try{yield a==null?void 0:a.setTop(j.data.id,L),R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.success(`${L?"":"取消"}置顶成功`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}catch(E){R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`${L?"":"取消"}置顶失败`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}a==null||a.getSessions({order:"top_time desc, sort_status desc, updated_at desc"}).then(E=>et(exports,null,function*(){f.current=[...E],g(f.current)}))}),y=(j,L)=>{L&&(j.rename(L),j==null||j.addEventListener("data:updated",()=>{const E=f.current.map(F=>{var H,S;return((H=F.data)==null?void 0:H.id)===((S=F.data)==null?void 0:S.id),F});f.current=[...E],g(f.current)}))},D=(j,L)=>{l(L),d(j)};return N.jsx(R.Drawer,{title:"会话历史记录",open:!0,placement:"bottom",onClose:r,className:`session-list-drawer ${s?"loading-panel":""}`,size:"large",getContainer:()=>(i==null?void 0:i.current)||document.body,destroyOnClose:!0,style:{position:"absolute"},children:s?N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:24},spin:!0})}):M.map((j,L)=>{var E;return N.jsx(ine,{session:j,index:L,currentSessionId:t,onChangeSession:I,onDelSession:m,onTopSession:A,onEditNameConfirm:y,editSessionId:c,isEdit:u,onChangeEditStatus:D},(E=j.data)==null?void 0:E.id)})})};const one=e=>{const{currentSessionId:t,disabled:n=!1,onSessionChange:r}=e,[a,i]=z.useState(!1);return N.jsxs("div",{className:"session-list-component",children:[N.jsx(R.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-list-overlay",overlayStyle:{padding:"4px"},getPopupContainer:s=>s.parentNode,content:"会话历史记录",children:N.jsx(R.Button,{className:"list-overlay-action",disabled:n,type:"text",icon:N.jsx(ct,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>i(!0)})}),a&&N.jsx(sne,{currentSessionId:t||"",onSessionChange:r,onClose:()=>i(!1)})]})};const Wx=z.createContext(void 0),une=({children:e})=>{const[t,n]=z.useState([]),[r,a]=z.useState(!1),i={sessions:t,setSessions:n,isSwitchingToExistingSession:r,setIsSwitchingToExistingSession:a};return N.jsx(Wx.Provider,{value:i,children:e})},lne=()=>{const e=z.useContext(Wx);if(e===void 0)throw new Error("useSessionContext must be used within a SessionProvider");return e},Om=()=>lne(),bf=15,qx=z.forwardRef((e,t)=>{const{currentSession:n,setCurrentSession:r,checkKnowledges:a,application:i,networkStatus:s,isShowHeader:o=!0,afterSessionClick:u,sessionId:l}=e,[c,d]=z.useState(),{agentClient:M,mode:g,features:f}=z.useContext(nn),[m,I]=z.useState(a),{sessions:A,setSessions:y}=Om(),[D,j]=z.useState(0),[L,E]=z.useState(""),[F,H]=z.useState(null),S=Hr.useMemoizedFn(X=>{X.id&&y(w=>[...w.map(De=>{var ne;return((ne=De.data)==null?void 0:ne.id)===X.id&&(De.data=ae({},X)),De})].sort((De,ne)=>{var ce,Ne;const re=fn((ce=De.data)==null?void 0:ce.createdAt).valueOf();return fn((Ne=ne.data)==null?void 0:Ne.createdAt).valueOf()-re}))});z.useEffect(()=>{M==null||M.getSessions().then(X=>et(exports,null,function*(){var w;if(y([...X]),!((w=n==null?void 0:n.data)!=null&&w.id)&&(X!=null&&X.length)&&g==="inlay"){const ee=X[0];l||r==null||r(ee)}else n===void 0&&(l||r==null||r(null))}))},[]),z.useEffect(()=>{var X;if(!((X=n==null?void 0:n.data)!=null&&X.id)&&a===void 0){const w=typeof(f==null?void 0:f.knowledges)=="object"&&f.knowledges.default||void 0;I(w);return}I(a)},[a]),z.useEffect(()=>{n==null||n.addEventListener("data:updated",S)},[n]),z.useImperativeHandle(t,()=>({create(X){return v(X).then(w=>(r==null||r(w),w))},list:()=>Promise.resolve(A)}));const v=X=>{const w=typeof(f==null?void 0:f.connectNetwork)=="object"&&typeof(f==null?void 0:f.connectNetwork.default)=="boolean"?f.connectNetwork.default:!1;return new Promise(ee=>et(exports,null,function*(){var ne;const Ce=typeof(f==null?void 0:f.promptVariables)=="object"?(f==null?void 0:f.promptVariables.default)||[]:void 0,De=yield M==null?void 0:M.loadSession("",{name:X==null?void 0:X.name,netOpen:(i==null?void 0:i.type)===0?X!=null&&X.netOpen?X.netOpen:w?_r.OPEN:_r.CLOSE:void 0,knowledges:(ne=n==null?void 0:n.data)!=null&&ne.id?X==null?void 0:X.knowledges:m,promptVariables:Ce});De==null||De.addEventListener("data:created",()=>et(exports,null,function*(){y([De,...A]),ee(De)}))}))},B=()=>{v({knowledges:m}).then(X=>{r==null||r(X)})},Y=X=>{M==null||M.removeSession(X,!0).then(()=>et(exports,null,function*(){var ee,Ce;const w=A.filter(De=>{var ne,re;return((ne=De.data)==null?void 0:ne.id)!==((re=X.data)==null?void 0:re.id)});((ee=X.data)==null?void 0:ee.id)===((Ce=n==null?void 0:n.data)==null?void 0:Ce.id)&&(w!=null&&w.length?r==null||r(w[0]):r==null||r(null)),y([...w])}))},W=X=>{var w,ee;d((w=X.data)==null?void 0:w.name),E(""),H(((ee=X.data)==null?void 0:ee.id)||null)},te=X=>{const w=Ye(c||"");if(w){E(w);return}X.rename(c.trim()),X==null||X.addEventListener("data:updated",S),K()},oe=()=>{K()},K=()=>{H(null),d(""),E(""),j(X=>X+1)},Ye=X=>!X||X.trim().length===0?"会话名称不能为空":X.length>bf?`不能超过${bf}个字符`:"",he=X=>et(exports,null,function*(){r==null||r(X),u==null||u(X)}),be=X=>{const w=X.target.value;d(w),E(Ye(w))};z.useEffect(()=>{var w,ee,Ce,De;if(!(n!=null&&n.id))return;const X={};typeof(f==null?void 0:f.knowledges)=="object"&&((w=f==null?void 0:f.knowledges)!=null&&w.default)&&(X.knowledges=(ee=f==null?void 0:f.knowledges)==null?void 0:ee.default),typeof(f==null?void 0:f.promptVariables)=="object"&&((Ce=f==null?void 0:f.promptVariables)!=null&&Ce.default)&&(X.promptVariables=(De=f==null?void 0:f.promptVariables)==null?void 0:De.default),M==null||M.loadSession(n.id,X)},[n]);const k=Hr.useMemoizedFn(X=>{const w=fn().endOf("day"),ee=w.subtract(1,"day"),Ce=w.subtract(7,"day"),De=w.subtract(30,"day"),ne=[],re=[],Ae=[],ce=[],Ne={};return X.forEach(we=>{var Ze;const Qe=fn((Ze=we.data)==null?void 0:Ze.createdAt);if(Qe.isAfter(ee))re.push(we);else if(Qe.isAfter(Ce))Ae.push(we);else if(Qe.isAfter(De))ce.push(we);else{const Nt=Qe.format("YYYY-MM");Ne[Nt]||(Ne[Nt]=[]),Ne[Nt].push(we)}}),re.length>0&&ne.push({title:"今天",sessions:re.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"today"}),Ae.length>0&&ne.push({title:"7天内",sessions:Ae.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"seven-days"}),ce.length>0&&ne.push({title:"30天内",sessions:ce.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"thirty-days"}),Object.keys(Ne).sort((we,Qe)=>Qe.localeCompare(we)).forEach(we=>{const Qe=Ne[we].sort((Ze,Nt)=>{var gn,pn;return fn((gn=Nt.data)==null?void 0:gn.createdAt).valueOf()-fn((pn=Ze.data)==null?void 0:pn.createdAt).valueOf()});ne.push({title:fn(we).format("YYYY年MM月"),sessions:Qe,key:`month-${we}`})}),ne}),ze=z.useMemo(()=>k(A),[A,k]);return N.jsx("div",{className:"bot-session-container",children:N.jsxs("div",{className:"agent-sessions",children:[o&&(f==null?void 0:f.siderTitle)&&N.jsx("div",{className:"sessions-header",children:N.jsx("div",{className:"session-header-title",children:(i==null?void 0:i.name)||"-"})}),N.jsxs("div",{className:"sessions-main",children:[o&&N.jsx("div",{className:"session-header-btn-wrapper",children:N.jsx(R.Button,{className:"session-header-btn",onClick:B,type:"primary",children:"+ 新会话"})}),ze==null?void 0:ze.map(X=>{var w;return N.jsxs("div",{className:"session-group",children:[N.jsx("div",{className:"group-header",style:{top:o?48:0},children:X.title}),(w=X.sessions)==null?void 0:w.map(ee=>{var Ce,De,ne,re,Ae,ce,Ne,ke,we;return N.jsx("div",{className:wn({"session-item":!0,"session-item__active":((Ce=ee.data)==null?void 0:Ce.id)===((De=n==null?void 0:n.data)==null?void 0:De.id)}),onClick:()=>he(ee),children:N.jsx("div",{className:"session-item-wrapper",children:N.jsxs("div",{className:"session-item-top",children:[N.jsx(R.Typography.Paragraph,{className:"item-top-title",style:{margin:0,width:"100%"},ellipsis:{rows:1,tooltip:{title:((ne=ee.data)==null?void 0:ne.name)||"-",placement:"topLeft"}},children:((re=ee.data)==null?void 0:re.name)||"-"}),N.jsxs(R.Space,{children:[N.jsx("span",{className:"item-top-time",children:fn((Ae=ee.data)==null?void 0:Ae.createdAt).format("MM/DD HH:mm:ss")}),N.jsxs("div",{className:"item-top-action",onClick:Qe=>Qe.stopPropagation(),children:[N.jsx(R.Popconfirm,{open:F===((ce=ee.data)==null?void 0:ce.id),getPopupContainer:Qe=>Qe.parentNode,icon:!1,title:N.jsx(R.Input,{placeholder:"请输入内容",autoComplete:"off",showCount:!0,value:c,onChange:be,maxLength:bf,status:L?"error":""}),onConfirm:()=>te(ee),onCancel:oe,children:N.jsx(ct,{type:"icon-bianji2",onClick:()=>W(ee),className:"icon-action",style:{marginRight:"8px"}})},`edit-${(Ne=ee.data)==null?void 0:Ne.id}-${D}`),N.jsx(R.Popconfirm,{getPopupContainer:Qe=>Qe.parentNode,icon:!1,title:N.jsxs(R.Space,{direction:"vertical",children:[N.jsx("div",{children:"删除确认?"}),N.jsx("div",{children:"会话删除后不可恢复,请确认是否删除!"})]}),onConfirm:()=>{Y(ee),j(Qe=>Qe+1)},onCancel:()=>{j(Qe=>Qe+1)},children:N.jsx(ct,{style:{fontSize:"18px"},className:"icon-action",type:"icon-del"})},`delete-${(ke=ee.data)==null?void 0:ke.id}-${D}`)]})]})]})})},(we=ee.data)==null?void 0:we.id)})]},X.key)})]})]})})});qx.displayName="SessionList";const vm=z.forwardRef((e,t)=>N.jsx("div",{className:"sider-container",children:N.jsx(qx,ae({ref:t},e))}));vm.displayName="Sider";const cne=e=>{const{currentSession:t,disabled:n=!1,application:r,networkStatus:a,setCurrentSession:i,isSessionHistoryVisible:s,setIsSessionHistoryVisible:o,onSessionChange:u}=e,{popupContainer:l}=z.useContext(nn),c=M=>{var g,f;((g=M.data)==null?void 0:g.id)!==((f=t==null?void 0:t.data)==null?void 0:f.id)&&(o(!1),u==null||u(M))},d=()=>{o(!1)};return N.jsx(R.Drawer,{title:"会话历史",open:!0,placement:"bottom",onClose:d,className:"session-history-drawer",size:"large",getContainer:()=>(l==null?void 0:l.current)||document.body,destroyOnClose:!0,style:{position:"absolute"},children:N.jsx(vm,{isShowHeader:!1,application:r,networkStatus:a,currentSession:t,setCurrentSession:i,afterSessionClick:c})})};const dne=e=>{const{sessionId:t,netStatus:n,enable:r,disabledTip:a="上传文件后,该会话自动停止网络访问",onNetStatusChange:i}=e,[s,o]=z.useState(!1),[u,l]=z.useState(!1),[c,d]=z.useState("#070C14");z.useEffect(()=>{l(!r),r||d("#070C14")},[t,r]);const M=()=>{l(!1)};z.useEffect(()=>{o(u)},[u]);const g=f=>{i(f)};return N.jsx(N.Fragment,{children:N.jsxs("div",{className:"connect",onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{u||o(!1)},children:[N.jsx(R.Button,{type:"link",icon:n?N.jsx(ct,{className:"link-btn",type:"icon-yilianwang",style:{fontSize:22}}):N.jsx(ct,{className:"link-not-btn",type:"icon-lianwangguanbi",style:{color:c,fontSize:22},onMouseEnter:()=>{d(r?"#B452FF":"#070C14")},onMouseLeave:()=>d("#070C14")}),disabled:!r,onClick:()=>{g(!n)}}),s&&N.jsx("div",{className:"net-tip",children:r?n?"网络访问已开启":"网络访问已关闭":u?N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("span",{children:a}),N.jsx("div",{children:N.jsx(At.CloseOutlined,{onClick:M})})]}):a})]})})};const{Text:Mne}=R.Typography,gne=()=>N.jsxs(R.Space,{children:[N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:12}}),spinning:!0}),"正在生成标题"]}),pne=e=>{const{appId:t,data:n,highlight:r,onEdit:a,onDelete:i,onClick:s,onStatusChange:o}=e,{service:u}=z.useContext(nn),[l,c]=z.useState(n.status!=="finish"),[d,M]=z.useState(n),[g,f]=z.useState(n.title);z.useEffect(()=>{d.status!=="finish"&&c(!0)},[d.status,l]),z.useEffect(()=>{M(n)},[n]);const m=()=>{u==null||u.getPrompt(t,d.id).then(I=>{M(I),o&&o(I.status,I),I.status==="finish"?c(!1):(c(!0),setTimeout(()=>m(),2e3))})};return z.useEffect(()=>{l&&m()},[l]),z.useEffect(()=>{if(r){const I=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),A=new RegExp(`(${I})`,"g"),y=d.title.split(A);f(y.map((D,j)=>r===D?N.jsx("span",{className:"hightlight",children:D},j):D))}else f(d.title)},[r,d.title]),N.jsxs("div",{className:"prompt-list-item",onClick:()=>s&&s(n),children:[N.jsxs("div",{className:"prompt-list-item-body",children:[N.jsx("div",{className:"prompt-list-item-title",children:d.title?g:N.jsx(gne,{})}),N.jsx("div",{className:"prompt-list-item-context",children:N.jsx(Mne,{ellipsis:!0,children:d.context})})]}),N.jsxs("div",{className:"prompt-list-item-actions",onClick:I=>I.stopPropagation(),children:[a&&N.jsx(R.Button,{type:"text",disabled:l,icon:N.jsx(ct,{type:"icon-bianji2"}),onClick:()=>a(n)}),i&&N.jsx(R.Button,{type:"text",disabled:l,icon:N.jsx(ct,{type:"icon-shanchu"}),onClick:()=>i(n.id)})]})]})};const fne="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MyA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS41NiAzMS4xNTVDMTUuNTIgMzEuNDMgMTUuNSAzMS43MTUgMTUuNSAzMkMxNS41IDM1LjMxNSAxOC4xODUgMzgg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uODQgMzcuNSAyNy41ODUgMzQuODE1IDI3LjU4NSAzMS41QzI3LjU4NSAzMS4xNiAyNy41ODUgMzAuNSAyOC41MjUgMzAuNUg0MC45OTk5IiBzdHJva2U9IiM5Njk5QjciIHN0cm9rZS13aWR0aD0iMi41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIxLjA1IDEwLjM4VjJNMTMuNTUgMTAuMzhMOCA0LjE1MDAyTTM0LjA1IDQuMTUwMDJMMjguNSAxMC4zOCIgc3Ryb2tlPSIjOUMyNEYyIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTEwMjlfMzkxNiIgeDE9IjMwLjE3ODYiIHkxPSIzOC41IiB4Mj0iMzYuMzEyNiIgeTI9IjM4LjUiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzIwNUVGOSIvPgo8c3RvcCBvZmZzZXQ9IjAuNiIgc3RvcC1jb2xvcj0iIzgzNUFGRSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRDYyRDkiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K",hne=e=>{const{appId:t,data:n=[],search:r,onItemClick:a,onChange:i,onRefresh:s}=e,o=()=>N.jsx("div",{className:"prompt-list-empty",children:N.jsx(R.Empty,{image:fne,imageStyle:{height:44},description:N.jsx("span",{children:"暂无快捷指令"})})});return N.jsx("div",{className:"prompt-list-wrap",children:n.length?N.jsx(N.Fragment,{children:N.jsx(R.List,{className:"prompt-list",dataSource:n,renderItem:u=>N.jsx(pne,{appId:t,data:u,highlight:r,onClick:a,onStatusChange:(l,c)=>{const d=n.findIndex(M=>M.id===c.id);d>-1&&(n[d]=c,i&&i([...n]))}})})}):N.jsx(o,{})})},Nne=e=>{var v;const{appId:t,list:n,search:r,disabled:a=!1,open:i=!1,onClose:s,onPromptSelect:o}=e,[u,l]=z.useState(i),[c,d]=z.useState(),{service:M,popupContainer:g,mode:f}=z.useContext(nn),[m,I]=z.useState((n==null?void 0:n.filter(B=>B.type==="me"))||[]),[A,y]=z.useState((n==null?void 0:n.filter(B=>B.type==="system"))||[]),[D,j]=z.useState((n==null?void 0:n.filter(B=>B.type==="system"))||[]),[L,E]=z.useState("system"),[F,H]=z.useState(!1);z.useEffect(()=>{u&&M&&(r&&r.length>Fe.PROMPT_TITLE_MAX_LENGTH?(I([]),y([])):(M.listPrompt(t,{type:"system"}).then(B=>H(!!B.length)),M.listPrompt(t,r?{title:r}:void 0).then(B=>{const Y=B.filter(te=>te.type==="me"),W=B.filter(te=>te.type==="system");I(Y),y(W)})))},[u]),z.useEffect(()=>{S()},[r]),z.useEffect(()=>{i&&S()},[i]),z.useEffect(()=>{let B=g==null?void 0:g.current;B?B.clientWidth>900?d(520):d(B.clientWidth-80):d(400)},[(v=g==null?void 0:g.current)==null?void 0:v.clientWidth]),z.useEffect(()=>{M==null||M.listPrompt(t).then(B=>{const Y=B.filter(W=>W.type==="system");j(Y)})},[M]);const S=()=>{if(r&&r.length>Fe.PROMPT_TITLE_MAX_LENGTH){I([]),y([]);return}M==null||M.listPrompt(t,r?{title:r}:void 0).then(B=>{const Y=B.filter(te=>te.type==="me"),W=B.filter(te=>te.type==="system");I(Y),y(W),l(!!(W.length&&(r!=null&&r.length))),r||j(W)})};return N.jsx(R.Popover,{title:null,placement:"topLeft",overlayClassName:"propmt-manage-popover",open:u,zIndex:1e4,arrowPointAtCenter:!0,trigger:["click"],autoAdjustOverflow:{adjustX:0},overlayStyle:{width:"260px"},getPopupContainer:()=>(g==null?void 0:g.current)||document.body,onOpenChange:B=>{l(B),!B&&s&&s()},content:N.jsx(N.Fragment,{children:N.jsx(R.Tabs,{activeKey:L,style:{padding:"0 16px"},onTabClick:B=>{E(B)},children:N.jsx(R.Tabs.TabPane,{tab:"快捷指令",children:N.jsx(hne,{appId:t,data:A,search:r,onItemClick:B=>{o&&o(B),l(!1)}})},"system")})}),children:D!=null&&D.length?N.jsx(R.Button,{disabled:a,style:{width:"24px"},className:wn({"prompt-btn":!0,active:u}),type:"text",icon:N.jsx(ct,{type:"icon-tishiyu1",style:{fontSize:24}}),onClick:()=>l(!0)}):null})},mne=z.memo(Qx),T2={icon:v2,text:"今天我能帮你什么?"};class Bs{constructor(t,n,r,a,i){Dt(this,"messageTime");Dt(this,"isWaiting");Dt(this,"messageId");Dt(this,"isContext");Dt(this,"actions");Dt(this,"reference");Dt(this,"isSensitive");Dt(this,"isSuspend");Dt(this,"imageContent");Dt(this,"comment");this.content=t,this.sessionId=n,this.role=r,this.files=a,this.content=t,this.role=r,this.sessionId=n,this.files=a,this.imageContent=i,this.messageTime=fn(new Date).format("YYYY-MM-DD HH:mm:ss"),this.isWaiting=!1,this.messageId=po.v4(),this.isContext=!1,this.actions=[],this.reference=[],this.isSensitive=!1,this.isSuspend=!1,this.comment={isAgree:0}}}const y2=10,Ef=(e,t,n,r)=>{let a=e;if(r===Fe.ApplicationTypes.Agent){if(n&&n.length>0){const i=n.map(s=>`[${s.name.replace(/\.[^/.]+$/,"")}](${s.url})`).join(`
316
+ `)})}),N.jsx("div",{className:"item-user-panel",children:N.jsx(R.Popover,{placement:"topLeft",overlayStyle:{padding:4},overlayClassName:"session-item-overlay-popover",getPopupContainer:K=>K.parentNode,content:g!=null&&g.userEdit||g!=null&&g.userCopy?N.jsxs(R.Space,{className:"item-user-popover",size:4,children:[(g==null?void 0:g.userEdit)&&N.jsx("div",{className:"user-pannel-item",onClick:()=>l==null?void 0:l(r.content),children:N.jsx(R.Button,{type:"link",size:"small",icon:N.jsx(ct,{type:"icon-bianji2"})})}),(g==null?void 0:g.userCopy)&&N.jsx("div",{className:"user-pannel-item",onClick:j,children:N.jsx(R.Button,{type:"link",size:"small",icon:N.jsx(ct,{type:"icon-fuzhi",style:{fontSize:"16px"}})})})]}):null,children:N.jsx("div",{className:"user-panel-main",children:N.jsx("span",{className:"item-user-content",children:N.jsx(xu,{showLatex:!1,children:Qte(r.content)})})})})}),N.jsx("div",{className:"item-user-file",children:N.jsx(R.Row,{gutter:[12,12],justify:"end",wrap:!0,children:(E=r.files)==null?void 0:E.map(K=>N.jsx(R.Col,{className:"user-file-col",children:N.jsx($te,{docViewerUrl:u,currentSession:n,file:K})},K.id))})})]}),I&&N.jsx("div",{className:"history-item-bot",children:N.jsxs("div",{className:"bot-content-wrapper",children:[t.type===2&&N.jsxs("div",{className:"item-bot-plugin",children:[N.jsx(R.Collapse,{ghost:!0,expandIconPosition:"right",children:(F=r.actions)==null?void 0:F.map((K,Ye)=>{var he,be,k,ze,X,w,ee,Ce,De,ne,re,Ae;return N.jsxs(A,{collapsible:M?"header":"icon",showArrow:M,header:N.jsxs(R.Space,{size:8,style:{width:"100%"},children:[N.jsxs("span",{className:"bot-plugin-status",children:[(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&Su((he=K.find(ce=>ce.type==="RESULT"))==null?void 0:he.data.result)&&N.jsx("span",{className:"plugin-status-success",children:N.jsx(At.CheckOutlined,{})}),K[K.length-1].type==="ABORT"&&N.jsx("span",{className:"plugin-status-error",children:N.jsx(At.CloseOutlined,{})}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&!Su((be=K.find(ce=>ce.type==="RESULT"))==null?void 0:be.data.result)&&N.jsx("span",{className:"plugin-status-error",children:N.jsx(At.CloseOutlined,{})}),(K[K.length-1].type==="BEFORE_CALL"||K[K.length-1].type==="FUNCTION_CALL")&&N.jsx("span",{className:"plugin-status-loading",children:N.jsx(At.LoadingOutlined,{})})]}),N.jsx("span",{className:"bot-plugin-title",children:((k=K[K.length-1].data)==null?void 0:k.pluginName)||((ze=K[K.length-1].data)==null?void 0:ze.pluginCode)}),N.jsx("span",{className:"bot-plugin-action",children:((X=K[K.length-1].data)==null?void 0:X.funcName)||((w=K[K.length-1].data)==null?void 0:w.funcCode)}),(K[K.length-1].type==="BEFORE_CALL"||K[K.length-1].type==="FUNCTION_CALL")&&N.jsx("span",{className:"bot-plugin-result",children:"执行中"}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&Su((ee=K.find(ce=>ce.type==="RESULT"))==null?void 0:ee.data.result)&&N.jsx("span",{className:"bot-plugin-result",children:"执行成功"}),(K[K.length-1].type==="RESULT"||K[K.length-1].type==="AFTER_CALL")&&!Su((Ce=K.find(ce=>ce.type==="RESULT"))==null?void 0:Ce.data.result)&&N.jsx("span",{className:"bot-plugin-result",children:"执行失败"}),K[K.length-1].type==="ABORT"&&N.jsx("span",{className:"bot-plugin-result",children:"执行中止"})]}),children:[N.jsx("div",{className:"bot-plugin-content",children:"thought"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(De=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:De.data.thought})}),N.jsx("div",{className:"bot-plugin-content",children:"parameters"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(ne=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:ne.data.parameters})}),N.jsx("div",{className:"bot-plugin-content",children:"requestBody"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:(re=K.find(ce=>ce.type==="BEFORE_CALL"))==null?void 0:re.data.requestBody})}),N.jsx("div",{className:"bot-plugin-content",children:"Response"}),N.jsx("div",{className:"bot-plugin-json",children:N.jsx(Cu,{josn:Wte((Ae=K.find(ce=>ce.type==="RESULT"))==null?void 0:Ae.data.result)})})]},Ye)})}),r.isLoading&&N.jsx("div",{className:"history-input-progress",style:{padding:"4px 0"},children:r.content||N2(r.actions)?null:N.jsx(lu,{size:4,text:"思考中"})})]}),!!((H=r.searchReference)!=null&&H.length)&&N.jsx("div",{className:"item-bot-net",children:N.jsx(qte,{history:r})}),(S=r==null?void 0:r.reference)!=null&&S.length&&((v=g==null?void 0:g.reference)!=null&&v.referenceFirst)?N.jsx(h2,{history:r,docViewerUrl:u,markdown:d}):null,N.jsxs("div",{className:"item-bot-content",children:[(r==null?void 0:r.reasoningContent)&&N.jsxs("div",{className:"content-think",children:[(r==null?void 0:r.reasoningContent)&&N.jsxs("div",{className:"think-top",onClick:()=>{D(!y)},children:[N.jsx("img",{src:k2,alt:""}),(r==null?void 0:r.reasoningContent)&&!(r!=null&&r.content)&&N.jsx("span",{children:"我正在推理思考…"}),(r==null?void 0:r.reasoningContent)&&r.content&&N.jsxs("span",{children:["已完成推理(用时 ",(r==null?void 0:r.thinkingSecs)||0," 秒)"]}),N.jsx("span",{className:"think-action",children:y?N.jsx(ct,{type:"icon-zhankai",style:{fontSize:16}}):N.jsx(ct,{type:"icon-shouqi",style:{fontSize:16}})})]}),!!((B=r==null?void 0:r.reasoningContent)!=null&&B.trim())&&y&&N.jsxs("div",{className:"think-bottom",children:[N.jsxs("div",{className:"bottom-left",children:[(r==null?void 0:r.thinkingStatus)===Fe.IThinkingStatus.Start&&N.jsx("div",{className:"thinking"}),(r==null?void 0:r.thinkingStatus)===Fe.IThinkingStatus.End&&N.jsx("div",{className:"thinked",children:N.jsx(At.CheckOutlined,{})})]}),N.jsx("div",{className:"bottom-right",children:N.jsx(xu,bt(ae({},d),{children:(r==null?void 0:r.reasoningContent)||""}))})]})]}),N.jsx(xu,bt(ae({},d),{children:r.content}))]}),(Y=r==null?void 0:r.reference)!=null&&Y.length&&!((W=g==null?void 0:g.reference)!=null&&W.referenceFirst)?N.jsx(h2,{history:r,docViewerUrl:u,markdown:d}):null,r.isRelatedQuestion&&a?N.jsx("div",{style:{paddingBottom:12},children:N.jsx(lu,{size:4})}):null,r.isRelateLoading&&N.jsx("div",{className:"history-input-progress",style:{padding:"4px 0"},children:N2(r.actions)?null:N.jsx(lu,{size:4,text:"思考中"})}),t.arrange[0].recommendQuestionOpen&&(g==null?void 0:g.relate)&&a&&!!((te=r.relatedQuesion)!=null&&te.length)&&N.jsx(Hte,{relatedQuesion:r.relatedQuesion,onRelatedClick:i}),c&&!r.isSensitive&&!!r.messageId&&N.jsx(Ote,{appId:t.id,history:r,sessionId:(oe=n==null?void 0:n.data)==null?void 0:oe.id,onAgainClick:s,isLastHistory:a,currentSession:n})]})}),r.isContext&&N.jsxs(R.Divider,{children:[N.jsx("div",{style:{color:"#84868C",fontSize:"12px"},children:"已开启新话题"})," "]}),r.isWaiting&&N.jsx("div",{className:"history-input-progress",children:N.jsx(lu,{size:4,text:"思考中"})})]})};const Vte=e=>{const{className:t,style:n,id:r,file:a,actions:{upload:i,remove:s,checkStatus:o}={},onUrlChange:u,onStatusChange:l}=e,[c,d]=z.useState(e.uploading),[M,g]=z.useState(!1);z.useEffect(()=>{d(e.uploading)},[e.uploading]);const[f,m]=z.useState(e.url);z.useEffect(()=>{m(e.url)},[e.url]),z.useEffect(()=>{i&&a instanceof File&&(f||c||(d(!0),i(a).then(D=>{m(D),u&&u(D)}).catch(D=>g(D)).finally(()=>d(!1))))},[i,f,a]);const[I,A]=z.useState(a instanceof File||a==null?void 0:a.status);z.useEffect(()=>{A(a instanceof File||a==null?void 0:a.status)},[a]);const y=()=>{r&&o&&I===Fe.AecKnowledgeFileStatus.Processing&&o(r).then(D=>{D!==I&&(I!==void 0&&l&&l(D),A(D))}).catch(D=>A(Fe.AecKnowledgeFileStatus.Failed))};return z.useEffect(()=>{y()},[r,o,I]),z.useEffect(()=>{Yte(a).then(D=>{m(D)})},[a]),a?N.jsxs("div",{className:`file-preview ${t}`,style:n,children:[N.jsx(R.Image,{src:f,className:"file-icon"}),c&&N.jsx(R.Spin,{className:"file-action file-process",indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:16},spin:!0})}),!c&&s&&N.jsx(R.Tooltip,{overlayClassName:"file-remove-tooltip",title:"删除文件",getPopupContainer:D=>D.parentNode,children:N.jsx(R.Button,{className:"file-action file-remove",icon:N.jsx(ct,{style:{fontSize:"10px"},type:"icon-shanchu"}),onClick:()=>{s(a,r)}})})]}):N.jsx(N.Fragment,{})};const Bx=z.forwardRef((e,t)=>{var k,ze,X;const{text:n,onTextSend:r,disabled:a,maxLength:i=0,onChange:s,networkStatus:o,clearAction:u,loading:l}=e,[c,d]=z.useState(!0),[M,g]=z.useState(),[f,m]=z.useState(),[I,A]=z.useState(15),[y,D]=z.useState(12),[j,L]=z.useState(0),[E,F]=z.useState(!1),H=z.useRef(null),S=z.useRef(null);z.useImperativeHandle(t,()=>({clear:Y,prevent:W,focus:te,update:B,getCurrentText:()=>f})),z.useEffect(()=>{if(g(n),n){const w=document.createElement("div");w.innerHTML=n;const ee=w.textContent||w.innerText||"";m(ee.replace(/[\n\s]+$/,""))}else m(void 0);S.current&&(oe(),te())},[n]),z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor();if(w&&w.bounds!==document.body)try{console.log("设置 bounds"),w.bounds=document.body}catch(ee){console.warn("设置 bounds 失败:",ee)}},[S.current]);const v=()=>{var ne;if(!S.current)return;const w=S.current.getEditor(),ee=w.root;let De=w.getText().trim().length>0;if(!De){const re=ee.querySelectorAll("p");for(const Ae of Array.from(re)){const ce=Array.from(Ae.childNodes);if(ce.length>1||ce.length===1&&((ne=ce[0].nodeName)==null?void 0:ne.toLowerCase())!=="br"){De=!0;break}}}De?ee.classList.add("hide-placeholder"):ee.classList.remove("hide-placeholder")};z.useEffect(()=>{v()},[M]),z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor().root,ee=()=>{w.classList.add("hide-placeholder")},Ce=()=>{setTimeout(()=>{v()},0)};return w.addEventListener("compositionstart",ee),w.addEventListener("compositionend",Ce),()=>{w.removeEventListener("compositionstart",ee),w.removeEventListener("compositionend",Ce)}},[S.current]);const B=w=>{g(w),setTimeout(()=>{v()},0)},Y=()=>{g(void 0),m(void 0),S.current&&S.current.getEditor().root.classList.remove("hide-placeholder")},W=()=>{},te=()=>{if(!S.current||c)return;const w=S.current.getEditor();w.focus(),setTimeout(()=>{w.getLength()>0&&w.setSelection(w.getLength(),w.getLength())})};z.useEffect(()=>{if(!S.current)return;const w=S.current.getEditor();i&&(w.on("text-change",()=>{w.getLength()>i&&w.deleteText(i,w.getLength()),oe(),K(),te()}),w.on("selection-change",K))},[S,i]);const oe=()=>{if(!S.current)return;const w=S.current.getEditor(),ee=w.getBounds(w.getLength()-1,w.getLength());ee&&(A(ee.left),D(ee.top))},K=w=>{if(!S.current)return;const ee=S.current.getEditor(),Ce=w||ee.getSelection();(Ce==null?void 0:Ce.index)!==void 0&&L(Ce==null?void 0:Ce.index)};Hr.useKeyPress("1",()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();E&&o&&(w==null||w.blur(),setTimeout(()=>Ye()))}),Hr.useKeyPress("2",()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();E&&(w==null||w.blur(),setTimeout(()=>he()))});const Ye=()=>{var ee;if(!o)return;const w=(ee=S.current)==null?void 0:ee.getEditor();w==null||w.focus(),F(!1),setTimeout(()=>w==null?void 0:w.insertText(j,Xs.NETWORK))},he=()=>{var ee;const w=(ee=S.current)==null?void 0:ee.getEditor();w==null||w.focus(),F(!1),setTimeout(()=>w==null?void 0:w.insertText(j,Xs.DOCUMENT))},be=()=>{var ee,Ce,De;const w=(ee=S.current)==null?void 0:ee.getEditor();return w&&(w==null?void 0:w.getLength())>2&&!((Ce=w.getText())!=null&&Ce.includes(Xs.NETWORK))&&!((De=w.getText())!=null&&De.includes(Xs.DOCUMENT))};return z.useEffect(()=>{var w,ee;l?(w=S.current)==null||w.getEditor().disable():(ee=S.current)==null||ee.getEditor().enable()},[l]),z.useEffect(()=>(window.addEventListener("resize",oe),()=>{window.removeEventListener("resize",oe)}),[]),N.jsxs("div",{className:wn({"quill-editor":!0,"quill-editor__active":c}),children:[N.jsxs("div",{className:wn({"quill-editor-wrapper":!0,"quill-editor-wrapper__scroll":y>=200}),onKeyDownCapture:w=>{!w.shiftKey&&w.code==="Enter"&&w.preventDefault()},children:[N.jsx(lO,{theme:"snow",placeholder:"输入你想问的,shift+enter 换行。",ref:S,bounds:document.body,onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:w=>{if(!w.shiftKey&&w.keyCode==13){const ee=M==null?void 0:M.replace(/[\n\s]+$/,"");g(ee),r&&r(f)}},value:M,modules:{toolbar:!1},onChange:(w,ee,Ce,De)=>{if(!ee)return;g(w);const ne=De.getText().replace(/[\n\s]+$/,"");m(ne),s&&s(w,De)}}),N.jsx("div",{className:"shortcut-direct",ref:H,style:{position:"absolute",left:I+4,top:y,cursor:"pointer",visibility:be()?"visible":"hidden"},children:N.jsx(R.Popover,{autoAdjustOverflow:!0,placement:"top",trigger:"hover",getPopupContainer:w=>w.parentNode,onVisibleChange:w=>{F(w)},content:N.jsxs("div",{className:"shortcut-direct-pannel",children:[N.jsxs("div",{className:wn({"shortcut-direct-item":o,"shortcut-direct-item__disabled":!o}),onClick:Ye,children:[N.jsx("span",{className:"title",children:"指定联网回答"}),N.jsx("span",{className:"text",children:"快捷键1"})]}),N.jsxs("div",{className:"shortcut-direct-item",onClick:he,children:[N.jsx("span",{className:"title",children:"指定文档回答"}),N.jsx("span",{className:"text",children:"快捷键2"})]})]})})})]}),N.jsxs("div",{className:"quill-editor-send",children:[N.jsx("div",{style:{height:32},children:u||N.jsx("span",{})}),N.jsxs("div",{style:{height:32,display:"flex",alignItems:"center"},children:[N.jsxs(R.Space,{size:2,style:{color:"#84868C"},children:[N.jsx("span",{children:((k=S.current)==null?void 0:k.getEditor())&&((X=(ze=S.current)==null?void 0:ze.getEditor())==null?void 0:X.getLength())-1}),N.jsx("span",{children:"/"}),N.jsx("span",{children:i})]}),N.jsx(R.Button,{type:"link",ghost:!0,disabled:a||!f,loading:l,icon:N.jsx(ct,{className:"icon-sendMsg",style:{fontSize:24},type:"icon-fasong"}),onClick:()=>{r&&r(f)}})]})]})]})});Bx.displayName="Qu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AuOTkxMyAxNC41ODM4QzIwLjkzNzMgMTUuNjQ1OSAyMC4wNTUzIDE2LjUwMDggMTguOTc1MiAxNi41MDA4WiIgZmlsbD0iI0Q3QThGRiIvPgo8L3N2Zz4K",Xte=e=>{var c;const{item:t,isRecommendClearing:n,isOnlyQuestion:r,question:a,setQuestion:i,onItemClick:s}=e,[o,u]=z.useState(!1),{popupContainer:l}=z.useContext(nn);return z.useEffect(()=>{t&&(!t.icon&&!t.file.url&&!t.name?u(!0):u(!1))},[t]),N.jsxs(R.Space,{direction:"vertical",size:r||!r&&o?0:4,className:wn({"question-pannel":!0,"question-pannel__active":(a==null?void 0:a.id)===t.id,"multiline-question-pannel":!r&&o}),onClick:()=>{if(n){R.message.config({getContainer:()=>(l==null?void 0:l.current)||document.body,prefixCls:"gbot-message"}),R.message.error("请稍后"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}(a==null?void 0:a.id)===t.id?(i(void 0),s==null||s(void 0)):(i(t),s==null||s(t))},children:[N.jsxs("div",{className:wn({"question-top":!0,"not-have-top":r||!r&&o}),children:[!!(t!=null&&t.icon)&&N.jsx("div",{className:"question-top-tip",children:N.jsx("img",{src:t.icon,alt:""})}),N.jsx("div",{className:"question-top-title",children:N.jsx(R.Typography.Paragraph,{style:{margin:0,width:"100%"},ellipsis:{rows:1,tooltip:t==null?void 0:t.name},children:t.name})}),N.jsx("div",{className:wn({"question-top-type":!0,"question-only-plus-file":!r&&!t.icon&&!t.name}),children:!!((c=t.file)!=null&&c.url)&&N.jsx("img",{className:"file-icon",src:wl[Al(t.file.url)||""]})})]}),N.jsx("div",{className:wn({"question-bottom":!0,"multiline-question":!r&&o}),children:N.jsx(R.Typography.Paragraph,{style:{margin:0,width:"100%"},ellipsis:{rows:!r&&o?3:1,tooltip:{overlayClassName:"recommend-tooltip-overlay"}},children:t==null?void 0:t.question})})]})},Fx=z.forwardRef((e,t)=>{const{onItemClick:n,data:r,isRecommendClearing:a,layoutBreakpoints:i=[450]}=e,[s,o]=z.useState(),[u,l]=z.useState(),[c,d]=z.useState(!1),[M,g]=z.useState(2);return z.useImperativeHandle(t,()=>({clear(){l(void 0)}})),z.useEffect(()=>{const f=document.getElementById("dialog-modal");if(!f)return;const m=y=>{const D=[...i].sort((L,E)=>L-E),j=D.findIndex(L=>y<L);return j===-1?D.length+1:j+1},I=()=>{const y=f.clientWidth;g(m(y))};I();let A=null;return window.ResizeObserver?(A=new ResizeObserver(I),A.observe(f)):window.addEventListener("resize",I),()=>{A==null||A.disconnect(),window.removeEventListener("resize",I)}},[i]),z.useEffect(()=>{if(r!=null&&r.length){o(r);return}},[r]),z.useEffect(()=>{if(!s)return;const f=s.find(m=>m.file.url||m.icon||m.name);d(!f)},[s]),N.jsxs("div",{className:"questions",children:[N.jsxs(R.Space,{size:8,className:"question-tip",children:[N.jsx("img",{src:Zte,alt:""}),N.jsx("span",{children:"请试试这样提问:"})]}),N.jsx(R.Row,{gutter:[12,12],wrap:!0,className:"question-row",children:s==null?void 0:s.map((f,m)=>N.jsx(R.Col,{span:24/M,children:N.jsx(Xte,{item:f,isRecommendClearing:a,isOnlyQuestion:c,question:u,setQuestion:l,onItemClick:n})},m))})]})});Fx.displayName="Recommend";const Jte=e=>{const{transform:t}=z.useContext(nn),{icon:n,text:r,children:a}=e;return N.jsxs("div",{className:"greeting",children:[(t==null?void 0:t.greet)&&n&&N.jsx("div",{className:"greeting-icon",children:N.jsx("img",{src:n})}),(t==null?void 0:t.greet)&&r&&N.jsx("div",{className:"greeting-word",children:r}),N.jsx("div",{className:"greeting-questions",children:a})]})};const Kte=({visible:e=!0,text:t="所有内容均由人工智能模型生成,请仔细甄别。",element:n})=>{if(!e)return null;const r=z.useRef(null);return z.useEffect(()=>{var a;n&&((a=r.current)==null||a.replaceWith(n))},[n]),n?N.jsx("div",{ref:r}):N.jsx("div",{className:"footer-warning",ref:r,children:t})},ene=({className:e,tips:t,children:n})=>N.jsxs("div",{className:`home-footer ${e||""}`,children:[n,N.jsx(Kte,{visible:t!==!1,text:typeof t=="string"?t:void 0,element:typeof t!="string"&&typeof t!="boolean"?t:void 0})]});const tne=e=>{const{className:t,style:n,id:r,file:a,actions:{upload:i,remove:s,download:o,checkStatus:u,preview:l}={},onUrlChange:c,onStatusChange:d}=e,M=Al((a==null?void 0:a.name)||""),[g,f]=z.useState(e.uploading),[m,I]=z.useState(!1);z.useEffect(()=>{f(e.uploading)},[e.uploading]);const[A,y]=z.useState(e.url);z.useEffect(()=>{y(e.url)},[e.url]),z.useEffect(()=>{i&&a instanceof File&&(A||(f(!0),setTimeout(()=>{f(!1)},2e3),i(a).then(E=>{y(E),c&&c(E)}).catch(E=>I(E)).finally(()=>{f(!1)})))},[i,A,a]);const[D,j]=z.useState(a instanceof File||a==null?void 0:a.status);z.useEffect(()=>{j(a instanceof File||a==null?void 0:a.status)},[a]);const L=()=>{r&&u&&D===Fe.KnowledgeFileStatus.Processing&&u(r).then(E=>{E!==D&&(D!==void 0&&d&&d(E),j(E))}).catch(E=>j(Fe.KnowledgeFileStatus.Failed))};return z.useEffect(()=>{L()},[r,u,D]),a?N.jsxs("div",{className:`file-card ${t}`,style:n,children:[M&&N.jsx("img",{className:"file-icon",src:wl[M]}),N.jsx("div",{className:"file-desc",children:N.jsx("div",{className:"file-desc-name",onClick:()=>l==null?void 0:l(a),children:N.jsx(R.Typography.Paragraph,{style:{margin:0},ellipsis:{rows:1,tooltip:a.name},children:a.name})})}),(a==null?void 0:a.status)===1?N.jsxs("div",{className:"analysis",children:[N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:16},spin:!0})}),N.jsx("span",{children:"解析中"})]}):(a==null?void 0:a.status)===3?s&&N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("div",{className:"file-action file-failed",children:N.jsx(At.CloseCircleFilled,{})}),N.jsx("div",{className:"file-action file-remove",onClick:()=>{s(a,r)},children:N.jsx(At.CloseOutlined,{})})]}):s&&o&&N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("div",{className:"file-action file-remove",onClick:()=>{o(a,r)},children:N.jsx(ct,{type:"icon-xiazai",style:{fontSize:16}})}),N.jsx("div",{className:"file-action file-remove",onClick:()=>{s(a,r)},children:N.jsx(At.CloseOutlined,{})})]})]}):N.jsx(N.Fragment,{})};const nne=e=>{const{isvisible:t,onClose:n}=e,r=N.jsxs("div",{className:"title",children:[N.jsx(At.CloseCircleFilled,{style:{color:"#F33E3E",fontSize:20}}),N.jsx("span",{children:"确认清空所有文件"})]});return N.jsx(R.Modal,{className:"clear-modal",width:340,open:t,title:r,centered:!0,maskClosable:!1,onCancel:()=>{n("cancel")},getContainer:document.getElementById("dialog-modal")||!1,footer:[N.jsx(R.Button,{onClick:()=>{n("cancel")},children:"暂时保留"},"cancel"),N.jsx(R.Button,{type:"primary",onClick:()=>{n("clear")},children:"继续清空"},"confirm")],children:N.jsx("div",{className:"content",children:"列表中的文件清空后不能恢复,请确认是否清空所有文件。"})})},Gx=z.forwardRef((e,t)=>{const{appId:n,sid:r,onStatusChange:a,createSession:i,disabled:s=!1,afterFileAdd:o,afterFileDelete:u,onFileListChange:l,shouldContinue:c=!0,afterFilesClear:d,docViewerUrl:M,isFirstSession:g}=e,[f,m]=z.useState([]),I=z.useRef(f),[A,y]=z.useState([]),[D,j]=z.useState(!1),[L,E]=z.useState(""),F=z.useRef(c),[H,S]=z.useState(!1),{Dragger:v}=R.Upload,{service:B,popupContainer:Y}=z.useContext(nn);z.useEffect(()=>{F.current=c},[c]),z.useImperativeHandle(t,()=>({update:W,clear:De})),z.useEffect(()=>{g||(y([]),m([]),W())},[r]);const W=()=>r?new Promise((ne,re)=>{B==null||B.getApplicationIdSessionKnowledgeFiles(n,r,{enabled:1}).then(Ae=>{y(Ae),m(Ae),te(Ae)}).finally(()=>{ne()})}):Promise.resolve(),te=ne=>et(exports,null,function*(){r&&(ne==null||ne.map(re=>et(exports,null,function*(){var Ae;try{if(yield B==null?void 0:B.checkFileReady(n,r,re.id)){const Ne=[...I.current],ke=ne.findIndex(we=>we.id===re.id);ke!==-1&&(Ne[ke].status=2),m(Ne),o&&o(re,r)}}catch(ce){if(((Ae=ce.cause)==null?void 0:Ae.code)===-101){const Ne=[...I.current],ke=ne.findIndex(we=>we.id===re.id);ke!==-1&&(Ne[ke].status=3),m(Ne);return}}})))});z.useEffect(()=>{a&&a(L)},[L]);const oe=ne=>et(exports,null,function*(){if(ne.size<=0)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("该文件为空,请重新上传文档"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(Rte(ne.name).length>f2)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`文件名称不能超过${f2}字符`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(ne.size>50*Vu)return R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`${ne.name}文件大小不能超过 50M`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1;if(Pte.some(ce=>ce===ne.type)){const ce=ne;ce.status=1,m(Ne=>Ne.length>=10?Ne:[...Ne,ce])}else ze("存在文件格式不正确的文件,已自动去除");return!1});z.useEffect(()=>{if(f.length<10?j(!1):j(!0),!f.length){E("");return}const ne=f.find(ce=>ce.status===1),re=f.find(ce=>ce.status===3);f.every(ce=>ce.status===2)?E("successed"):ne?E("process"):re&&E("failed"),l&&l(f)},[f]),z.useEffect(()=>{I.current=f;const ne=f.filter(re=>!A.includes(re));he(ne),y(f)},[f]);const K=(ne,re,Ae)=>et(exports,null,function*(){var ke;const ce=[...I.current],Ne=I.current.findIndex(we=>we===Ae);Ne!==-1&&(ce[Ne].id=re),m(ce);try{const we=yield B==null?void 0:B.checkFileReady(n,ne,re,()=>F.current,void 0,Qe=>{const Ze=[...I.current],Nt=I.current.findIndex(gn=>gn===Ae);Ze[Nt].url=Qe.url,m(Ze)});if(we){const Qe=[...I.current],Ze=I.current.findIndex(Nt=>Nt===Ae);Ze!==-1&&(Qe[Ze].status=2,Qe[Ze].url=we.url),m(Qe),o&&o(we,ne)}}catch(we){if(((ke=we.cause)==null?void 0:ke.code)===-101){const Qe=[...I.current],Ze=I.current.findIndex(Nt=>Nt===Ae);Ze!==-1&&(Qe[Ze].status=3),m(Qe);return}}}),Ye=()=>r?Promise.resolve(r):i(),he=ne=>{ne.length&&Ye().then(re=>{ne==null||ne.forEach(Ae=>{var ce;F.current=!0,(ce=ee(re,Ae))==null||ce.then(Ne=>{var we;if(!Ne)return;const ke={url:Ne,name:Ae.name,size:Ae.size,type:1,origin:Fe.IFileOrigin.AECPILOT};F.current&&((we=be(re,ke))==null||we.then(Qe=>K(re,Qe,Ae)))})})})},be=(ne,re)=>B==null?void 0:B.postApplicationIdSessionKnowledgeSessionFile(n,ne,re),ze=cO(ne=>{R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error(ne),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})},300),X=ne=>{r&&ne!=null&&ne.id&&(B==null||B.delApplicationIdSessionKnowledgeFileId(n,r,ne.id).then(re=>{const Ae=f.filter(ce=>ce.id!==ne.id);m(Ae),R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.success("删除成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),u&&u(ne.id)}))},w=N.jsx(N.Fragment,{children:N.jsxs("div",{className:"card-title",children:[N.jsx("span",{className:"name",children:"上传列表"}),N.jsxs("div",{className:"actions",children:[N.jsx(R.Upload,{accept:".doc, .docx, .pdf",beforeUpload:oe,showUploadList:!1,style:{margin:0},multiple:!0,children:N.jsx(R.Button,{className:"action",type:"link",disabled:D,children:N.jsxs("div",{className:"detail",children:[N.jsx(ct,{type:"icon-tianjia",style:{fontSize:16}}),N.jsx("div",{children:"添加"})]})})}),N.jsx(R.Button,{className:"action",type:"link",disabled:!f.length,onClick:()=>{S(!0)},children:N.jsxs("div",{className:"detail",children:[N.jsx(ct,{type:"icon-shanchu",style:{fontSize:16}}),N.jsx("span",{children:"清空"})]})})]})]})}),ee=(ne,re)=>{if(!ne)throw Error("session is not exist.");return B==null?void 0:B.uploadFile(ne,re).catch(()=>(R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("服务异常,请稍后再试"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),""))},Ce=N.jsx("div",{className:`upload-enter ${s?"disabled":""}`,children:N.jsx(R.Badge,{size:"small",color:"#9C24F2",count:L==="successed"?f.length:L==="process"?N.jsx(R.Spin,{className:"file-action file-process",indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:14},spin:!0})}):L==="failed"?N.jsx(At.CloseCircleFilled,{style:{color:"#dc4446",fontSize:14}}):0,children:N.jsx(ct,{type:"icon-shangchuanwenjian",style:{fontSize:24}})})}),De=()=>new Promise(ne=>{const re=I.current;if(!r)return ne();const Ae=[];re.filter(ce=>ce.id).forEach(ce=>Ae.push({id:ce.id,status:ce.status})),B==null||B.delApplicationIdSessionKnowledgeFile(n,r,{files:Ae}).then(()=>{y([]),m([]),I.current=[],d&&d(),F.current=!1,ne()})});return N.jsxs("div",{className:"footer-upload",children:[s?Ce:N.jsx(R.Popover,{overlayClassName:"upload-popover",overlayInnerStyle:{width:264,minHeight:211,maxHeight:356,borderRadius:12,zIndex:1},placement:"topLeft",getPopupContainer:()=>(Y==null?void 0:Y.current)||document.body,content:N.jsx("div",{className:"file-upload",children:f.length>0?N.jsx("div",{className:"upload-wrapper",children:N.jsx("div",{className:"input-files",style:{display:"flex",flexDirection:"column"},children:f==null?void 0:f.map((ne,re)=>N.jsx(tne,{file:ne,actions:{preview:()=>{if(!(ne!=null&&ne.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在上传中"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Px(ne.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("链接格式不正确"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}window.open(`${M}#/doc?url=${encodeURIComponent(ne==null?void 0:ne.url)}`)},remove:()=>{X(ne)},download:()=>{r&&(B==null||B.getApplicationIdSessionKnowledgeFileId(n,r,ne.id).then(Ae=>{if(!(Ae!=null&&Ae.url)){R.message.config({getContainer:()=>(Y==null?void 0:Y.current)||document.body,prefixCls:"gbot-message"}),R.message.error("下载失败"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}const ce=document.createElement("a");ce.href=Ae.url,ce.download=Ae.name||"",ce.click()}))}}},re))})}):N.jsxs(v,{name:"file",showUploadList:!1,multiple:!0,beforeUpload:oe,accept:".pdf, .doc, .docx",maxCount:10,listType:"picture",children:[N.jsx("span",{className:"file-upload-icon",children:N.jsx(At.CloudUploadOutlined,{})}),N.jsxs(R.Space,{className:"file-upload-action",children:["拖拽文件至此,或者",N.jsx(R.Button,{type:"link",style:{padding:0},children:"上传文件"})]}),N.jsxs("div",{className:"file-upload-desc",children:[N.jsx("div",{className:"item-upload-desc",children:N.jsx("span",{children:"1.支持 doc、pdf、docx 格式;"})}),N.jsx("div",{className:"item-upload-desc",children:"2.单个文件不超过 50 M;"}),N.jsx("div",{className:"item-upload-desc",children:"3.最多上传 10 个文件。"})]})]})}),title:w,trigger:"click",children:Ce}),H&&N.jsx(nne,{isvisible:H,onClose:ne=>{ne==="clear"&&De(),S(!1)}})]})});Gx.displayName="UploadFiles";const rne=e=>{const{files:t,sessionId:n,isvisible:r,onClose:a}=e,{service:i}=z.useContext(nn),s=N.jsxs("div",{className:"title",children:[N.jsx(At.ExclamationCircleFilled,{style:{color:"#FF9326",fontSize:20}}),N.jsx("span",{children:"文件任务正在处理"})]}),o=()=>{if(!n)return;const u=[];t.filter(l=>l.id).forEach(l=>u.push({id:l.id,status:l.status})),i==null||i.deleteSessionKnowledgeFiles(n,{files:u}),a("abandon")};return N.jsx(R.Modal,{className:"prompt-modal",width:340,open:r,title:s,centered:!0,maskClosable:!1,onCancel:()=>a("close"),getContainer:document.getElementById("dialog-modal")||!1,footer:[N.jsx(R.Button,{onClick:()=>{o()},children:"放弃文件"},"cancel"),N.jsx(R.Button,{type:"primary",onClick:()=>{a("continue")},children:"继续上传"},"confirm")],children:N.jsx("div",{className:"content",children:"你可以选择后台继续上传,也可以直接离开放弃上传中的文件。"})})};const{Panel:m2}=R.Collapse,Hx=z.forwardRef((e,t)=>{const{promptVariables:n,setPromptVariables:r,currentSession:a}=e,[i]=R.Form.useForm(),{agentClient:s}=z.useContext(nn);z.useImperativeHandle(t,()=>({clear(){i.resetFields()}})),z.useEffect(()=>{if(!a)return;const c=()=>{const M=a.promptVariables.filter(g=>!(g.type===Fe.PromptVariableType.User&&g.key==="query")&&!(g.type===Fe.PromptVariableType.System&&g.key==="datetime"));r(M.sort((g,f)=>g.key.localeCompare(f.key)))};return a.addEventListener("activated",c),()=>{a==null||a.removeEventListener("activated",c)}},[a]),z.useEffect(()=>{if(!n)return;const c={},d={};n.forEach(M=>{M.type===Fe.PromptVariableType.System?d[M.key]=M.value:c[M.key]=M.value}),i.setFieldsValue({userPrompts:c,systemPrompts:d})},[n]);const o=(c,d)=>{n.map(M=>{M.id===c&&(M.value=d.target.value)}),r([...n].sort((M,g)=>M.key.localeCompare(g.key)))},u=(n==null?void 0:n.filter(c=>c.type===Fe.PromptVariableType.System))||[],l=(n==null?void 0:n.filter(c=>c.type===Fe.PromptVariableType.User))||[];return n!=null&&n.length?N.jsx(R.Form,{autoComplete:"off",form:i,labelWrap:!0,labelAlign:"left",labelCol:{style:{width:120}},className:"prompt-form",children:N.jsxs(R.Collapse,{bordered:!1,ghost:!0,className:"prompt-variables-collapse",defaultActiveKey:[Fe.PromptVariableType.System,Fe.PromptVariableType.User],children:[u.length&&N.jsx(m2,{header:"角色设定变量",children:u.map(c=>N.jsx(R.Form.Item,{label:c.name,name:["systemPrompts",c.key],style:{marginBottom:8},rules:[{required:!0,message:"请输入"}],children:N.jsx(R.Input,{placeholder:"请输入",maxLength:s==null?void 0:s.questionContextMaxLength,onBlur:d=>o(c.id,d)})},c.key))},Fe.PromptVariableType.System),l.length&&N.jsx(m2,{header:"用户指令变量",children:l.map(c=>N.jsx(R.Form.Item,{label:c.name,name:["userPrompts",c.key],style:{marginBottom:8},rules:[{required:!0,message:"请输入"}],children:N.jsx(R.Input,{placeholder:"请输入",maxLength:s==null?void 0:s.questionContextMaxLength,onBlur:d=>o(c.id,d)})},c.key))},Fe.PromptVariableType.User)]})}):null});Hx.displayName="PromptSetting";const ane=e=>{const{session:t,onChangeEditStatus:n,onEditNameConfirm:r}=e,[a,i]=z.useState("");z.useEffect(()=>{var l,c;const u=((c=(l=t.data)==null?void 0:l.name)==null?void 0:c.slice(0,20))||"";i(u)},[t]);const s=()=>{r(t,a),n("",!1)},o=()=>{n("",!1)};return N.jsxs("div",{className:"name-edit-panel",children:[N.jsx(R.Input,{value:a,showCount:!0,className:"name-edit-input",maxLength:20,onChange:u=>i(u.target.value)}),N.jsx(R.Button,{type:"link",icon:N.jsx(At.CheckOutlined,{}),style:{color:"#30BF13",right:40},onClick:s}),N.jsx(R.Button,{type:"link",icon:N.jsx(At.CloseOutlined,{}),style:{color:"#84868C"},onClick:o})]})},ine=e=>{var m,I,A,y,D,j,L,E,F,H,S,v;const{session:t,index:n,currentSessionId:r,onChangeSession:a,onDelSession:i,onTopSession:s,onEditNameConfirm:o,editSessionId:u,isEdit:l,onChangeEditStatus:c}=e,[d,M]=z.useState(-1),[g,f]=z.useState("");return z.useEffect(()=>{var B,Y,W;if((B=t.data)!=null&&B.lastFileName){const te=t.data.lastFileName.lastIndexOf(".");f((W=(Y=t.data)==null?void 0:Y.lastFileName)==null?void 0:W.slice(te+1))}},[t]),N.jsx("div",{id:(m=t.data)==null?void 0:m.id,className:`session-item-panel ${((I=t.data)==null?void 0:I.id)===r?"current-item":""}`,onMouseEnter:()=>M(n),onMouseLeave:()=>M(-1),onClick:()=>!l&&a(t),children:N.jsxs(R.Space,{direction:"vertical",size:12,className:"session-item-space",children:[N.jsxs("div",{className:"item-question",children:[((A=t.data)==null?void 0:A.id)===r&&N.jsx(R.Tag,{children:"当前的"}),l&&u===((y=t.data)==null?void 0:y.id)?N.jsx(ane,{session:t,onChangeEditStatus:c,onEditNameConfirm:o}):N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"session-item-name",children:(D=t.data)==null?void 0:D.name}),d!==n&&((j=t.data)==null?void 0:j.top)&&N.jsx(ct,{type:"icon-sheweihuihuaqian",style:{color:"#9C24F2",fontSize:16}}),d===n&&N.jsxs("div",{className:"icons-bar",children:[(L=t.data)!=null&&L.top?N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-sheweihuihuaqian"}),onClick:B=>{s(t,!1),B.stopPropagation()},style:{color:"#9C24F2"}}):N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-weisheweihuihuaqian"}),onClick:B=>{s(t,!0),B.stopPropagation()}}),N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-bianji2"}),onClick:B=>{var Y;c((Y=t.data)==null?void 0:Y.id,!0),B.stopPropagation()}}),N.jsx(R.Button,{type:"link",icon:N.jsx(ct,{type:"icon-shanchu1"}),onClick:B=>i(t,B)})]})]})]}),(E=t.data)!=null&&E.finialMessage?N.jsx("div",{className:"item-answer",children:t.data.finialMessage}):N.jsx("div",{style:{height:"22px"}}),!!((F=t.data)!=null&&F.fileCount)&&N.jsx("div",{className:"item-file",children:N.jsxs(R.Space,{children:[g&&N.jsxs("div",{style:{position:"relative"},children:[N.jsx("img",{className:"file-icon",src:wl[g]}),t.data.fileStatus===10?N.jsx(At.CheckCircleFilled,{className:"file-status-icon success-file-icon"}):t.data.fileStatus===20?N.jsx(At.CloseCircleFilled,{className:"file-status-icon failed-file-icon"}):t.data.fileStatus===30?N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{className:"file-status-icon loading-file-icon",spin:!0})}):N.jsx(N.Fragment,{})]}),N.jsx("span",{className:"file-name",children:(H=t.data)==null?void 0:H.lastFileName}),N.jsxs(R.Tag,{children:["共 ",(S=t.data)==null?void 0:S.fileCount," 个"]})]})})]})},(v=t.data)==null?void 0:v.id)},sne=e=>{const{currentSessionId:t,onSessionChange:n,onClose:r}=e,{agentClient:a,popupContainer:i}=z.useContext(nn),[s,o]=z.useState(!1),[u,l]=z.useState(!1),[c,d]=z.useState(""),[M,g]=z.useState([]),f=z.useRef(M);z.useEffect(()=>{f.current=[],g(f.current),o(!0),a==null||a.getSessions().then(j=>et(exports,null,function*(){o(!1),f.current=[...j],g(f.current)}))},[]),z.useEffect(()=>{M.length&&t&&setTimeout(()=>{var j;(j=document.getElementById(t))==null||j.scrollIntoView(!0)},100)},[M]);const m=(j,L)=>{a==null||a.removeSession(j,!0).then(()=>et(exports,null,function*(){const E=M.filter(F=>{var H,S;return((H=F.data)==null?void 0:H.id)!==((S=j.data)==null?void 0:S.id)});j.data.id===t&&n&&n("",null),R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.success("删除成功"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),f.current=[...E],g(f.current)})),L==null||L.stopPropagation()},I=j=>{j&&(n&&n(j.sessionId,j),r())},A=(j,L)=>et(exports,null,function*(){try{yield a==null?void 0:a.setTop(j.data.id,L),R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.success(`${L?"":"取消"}置顶成功`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}catch(E){R.message.config({getContainer:()=>(i==null?void 0:i.current)||document.body,prefixCls:"gbot-message"}),R.message.error(`${L?"":"取消"}置顶失败`),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}a==null||a.getSessions({order:"top_time desc, sort_status desc, updated_at desc"}).then(E=>et(exports,null,function*(){f.current=[...E],g(f.current)}))}),y=(j,L)=>{L&&(j.rename(L),j==null||j.addEventListener("data:updated",()=>{const E=f.current.map(F=>{var H,S;return((H=F.data)==null?void 0:H.id)===((S=F.data)==null?void 0:S.id),F});f.current=[...E],g(f.current)}))},D=(j,L)=>{l(L),d(j)};return N.jsx(R.Drawer,{title:"会话历史记录",open:!0,placement:"bottom",onClose:r,className:`session-list-drawer ${s?"loading-panel":""}`,size:"large",getContainer:()=>(i==null?void 0:i.current)||document.body,destroyOnClose:!0,style:{position:"absolute"},children:s?N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:24},spin:!0})}):M.map((j,L)=>{var E;return N.jsx(ine,{session:j,index:L,currentSessionId:t,onChangeSession:I,onDelSession:m,onTopSession:A,onEditNameConfirm:y,editSessionId:c,isEdit:u,onChangeEditStatus:D},(E=j.data)==null?void 0:E.id)})})};const one=e=>{const{currentSessionId:t,disabled:n=!1,onSessionChange:r}=e,[a,i]=z.useState(!1);return N.jsxs("div",{className:"session-list-component",children:[N.jsx(R.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-list-overlay",overlayStyle:{padding:"4px"},getPopupContainer:s=>s.parentNode,content:"会话历史记录",children:N.jsx(R.Button,{className:"list-overlay-action",disabled:n,type:"text",icon:N.jsx(ct,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>i(!0)})}),a&&N.jsx(sne,{currentSessionId:t||"",onSessionChange:r,onClose:()=>i(!1)})]})};const Wx=z.createContext(void 0),une=({children:e})=>{const[t,n]=z.useState([]),[r,a]=z.useState(!1),i={sessions:t,setSessions:n,isSwitchingToExistingSession:r,setIsSwitchingToExistingSession:a};return N.jsx(Wx.Provider,{value:i,children:e})},lne=()=>{const e=z.useContext(Wx);if(e===void 0)throw new Error("useSessionContext must be used within a SessionProvider");return e},Om=()=>lne(),bf=15,qx=z.forwardRef((e,t)=>{const{currentSession:n,setCurrentSession:r,checkKnowledges:a,application:i,networkStatus:s,isShowHeader:o=!0,afterSessionClick:u,sessionId:l}=e,[c,d]=z.useState(),{agentClient:M,mode:g,features:f}=z.useContext(nn),[m,I]=z.useState(a),{sessions:A,setSessions:y}=Om(),[D,j]=z.useState(0),[L,E]=z.useState(""),[F,H]=z.useState(null),S=Hr.useMemoizedFn(X=>{X.id&&y(w=>[...w.map(De=>{var ne;return((ne=De.data)==null?void 0:ne.id)===X.id&&(De.data=ae({},X)),De})].sort((De,ne)=>{var ce,Ne;const re=fn((ce=De.data)==null?void 0:ce.createdAt).valueOf();return fn((Ne=ne.data)==null?void 0:Ne.createdAt).valueOf()-re}))});z.useEffect(()=>{M==null||M.getSessions().then(X=>et(exports,null,function*(){var w;if(y([...X]),!((w=n==null?void 0:n.data)!=null&&w.id)&&(X!=null&&X.length)&&g==="inlay"){const ee=X[0];l||r==null||r(ee)}else n===void 0&&(l||r==null||r(null))}))},[]),z.useEffect(()=>{var X;if(!((X=n==null?void 0:n.data)!=null&&X.id)&&a===void 0){const w=typeof(f==null?void 0:f.knowledges)=="object"&&f.knowledges.default||void 0;I(w);return}I(a)},[a]),z.useEffect(()=>{n==null||n.addEventListener("data:updated",S)},[n]),z.useImperativeHandle(t,()=>({create(X){return v(X).then(w=>(r==null||r(w),w))},list:()=>Promise.resolve(A)}));const v=X=>{const w=typeof(f==null?void 0:f.connectNetwork)=="object"&&typeof(f==null?void 0:f.connectNetwork.default)=="boolean"?f.connectNetwork.default:!1;return new Promise(ee=>et(exports,null,function*(){var ne;const Ce=typeof(f==null?void 0:f.promptVariables)=="object"?(f==null?void 0:f.promptVariables.default)||[]:void 0,De=yield M==null?void 0:M.loadSession("",{name:X==null?void 0:X.name,netOpen:(i==null?void 0:i.type)===0?X!=null&&X.netOpen?X.netOpen:w?_r.OPEN:_r.CLOSE:void 0,knowledges:(ne=n==null?void 0:n.data)!=null&&ne.id?X==null?void 0:X.knowledges:m,promptVariables:Ce});De==null||De.addEventListener("data:created",()=>et(exports,null,function*(){y([De,...A]),ee(De)}))}))},B=()=>{v({knowledges:m}).then(X=>{r==null||r(X)})},Y=X=>{M==null||M.removeSession(X,!0).then(()=>et(exports,null,function*(){var ee,Ce;const w=A.filter(De=>{var ne,re;return((ne=De.data)==null?void 0:ne.id)!==((re=X.data)==null?void 0:re.id)});((ee=X.data)==null?void 0:ee.id)===((Ce=n==null?void 0:n.data)==null?void 0:Ce.id)&&(w!=null&&w.length?r==null||r(w[0]):r==null||r(null)),y([...w])}))},W=X=>{var w,ee;d((w=X.data)==null?void 0:w.name),E(""),H(((ee=X.data)==null?void 0:ee.id)||null)},te=X=>{const w=Ye(c||"");if(w){E(w);return}X.rename(c.trim()),X==null||X.addEventListener("data:updated",S),K()},oe=()=>{K()},K=()=>{H(null),d(""),E(""),j(X=>X+1)},Ye=X=>!X||X.trim().length===0?"会话名称不能为空":X.length>bf?`不能超过${bf}个字符`:"",he=X=>et(exports,null,function*(){r==null||r(X),u==null||u(X)}),be=X=>{const w=X.target.value;d(w),E(Ye(w))};z.useEffect(()=>{var w,ee,Ce,De;if(!(n!=null&&n.id))return;const X={};typeof(f==null?void 0:f.knowledges)=="object"&&((w=f==null?void 0:f.knowledges)!=null&&w.default)&&(X.knowledges=(ee=f==null?void 0:f.knowledges)==null?void 0:ee.default),typeof(f==null?void 0:f.promptVariables)=="object"&&((Ce=f==null?void 0:f.promptVariables)!=null&&Ce.default)&&(X.promptVariables=(De=f==null?void 0:f.promptVariables)==null?void 0:De.default),M==null||M.loadSession(n.id,X)},[n]);const k=Hr.useMemoizedFn(X=>{const w=fn().endOf("day"),ee=w.subtract(1,"day"),Ce=w.subtract(7,"day"),De=w.subtract(30,"day"),ne=[],re=[],Ae=[],ce=[],Ne={};return X.forEach(we=>{var Ze;const Qe=fn((Ze=we.data)==null?void 0:Ze.createdAt);if(Qe.isAfter(ee))re.push(we);else if(Qe.isAfter(Ce))Ae.push(we);else if(Qe.isAfter(De))ce.push(we);else{const Nt=Qe.format("YYYY-MM");Ne[Nt]||(Ne[Nt]=[]),Ne[Nt].push(we)}}),re.length>0&&ne.push({title:"今天",sessions:re.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"today"}),Ae.length>0&&ne.push({title:"7天内",sessions:Ae.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"seven-days"}),ce.length>0&&ne.push({title:"30天内",sessions:ce.sort((we,Qe)=>{var Ze,Nt;return fn((Ze=Qe.data)==null?void 0:Ze.createdAt).valueOf()-fn((Nt=we.data)==null?void 0:Nt.createdAt).valueOf()}),key:"thirty-days"}),Object.keys(Ne).sort((we,Qe)=>Qe.localeCompare(we)).forEach(we=>{const Qe=Ne[we].sort((Ze,Nt)=>{var gn,pn;return fn((gn=Nt.data)==null?void 0:gn.createdAt).valueOf()-fn((pn=Ze.data)==null?void 0:pn.createdAt).valueOf()});ne.push({title:fn(we).format("YYYY年MM月"),sessions:Qe,key:`month-${we}`})}),ne}),ze=z.useMemo(()=>k(A),[A,k]);return N.jsx("div",{className:"bot-session-container",children:N.jsxs("div",{className:"agent-sessions",children:[o&&(f==null?void 0:f.siderTitle)&&N.jsx("div",{className:"sessions-header",children:N.jsx("div",{className:"session-header-title",children:(i==null?void 0:i.name)||"-"})}),N.jsxs("div",{className:"sessions-main",children:[o&&N.jsx("div",{className:"session-header-btn-wrapper",children:N.jsx(R.Button,{className:"session-header-btn",onClick:B,type:"primary",children:"+ 新会话"})}),ze==null?void 0:ze.map(X=>{var w;return N.jsxs("div",{className:"session-group",children:[N.jsx("div",{className:"group-header",style:{top:o?48:0},children:X.title}),(w=X.sessions)==null?void 0:w.map(ee=>{var Ce,De,ne,re,Ae,ce,Ne,ke,we;return N.jsx("div",{className:wn({"session-item":!0,"session-item__active":((Ce=ee.data)==null?void 0:Ce.id)===((De=n==null?void 0:n.data)==null?void 0:De.id)}),onClick:()=>he(ee),children:N.jsx("div",{className:"session-item-wrapper",children:N.jsxs("div",{className:"session-item-top",children:[N.jsx(R.Typography.Paragraph,{className:"item-top-title",style:{margin:0,width:"100%"},ellipsis:{rows:1,tooltip:{title:((ne=ee.data)==null?void 0:ne.name)||"-",placement:"topLeft"}},children:((re=ee.data)==null?void 0:re.name)||"-"}),N.jsxs(R.Space,{children:[N.jsx("span",{className:"item-top-time",children:fn((Ae=ee.data)==null?void 0:Ae.createdAt).format("MM/DD HH:mm:ss")}),N.jsxs("div",{className:"item-top-action",onClick:Qe=>Qe.stopPropagation(),children:[N.jsx(R.Popconfirm,{open:F===((ce=ee.data)==null?void 0:ce.id),getPopupContainer:Qe=>Qe.parentNode,icon:!1,title:N.jsx(R.Input,{placeholder:"请输入内容",autoComplete:"off",showCount:!0,value:c,onChange:be,maxLength:bf,status:L?"error":""}),onConfirm:()=>te(ee),onCancel:oe,children:N.jsx(ct,{type:"icon-bianji2",onClick:()=>W(ee),className:"icon-action",style:{marginRight:"8px"}})},`edit-${(Ne=ee.data)==null?void 0:Ne.id}-${D}`),N.jsx(R.Popconfirm,{getPopupContainer:Qe=>Qe.parentNode,icon:!1,title:N.jsxs(R.Space,{direction:"vertical",children:[N.jsx("div",{children:"删除确认?"}),N.jsx("div",{children:"会话删除后不可恢复,请确认是否删除!"})]}),onConfirm:()=>{Y(ee),j(Qe=>Qe+1)},onCancel:()=>{j(Qe=>Qe+1)},children:N.jsx(ct,{style:{fontSize:"18px"},className:"icon-action",type:"icon-del"})},`delete-${(ke=ee.data)==null?void 0:ke.id}-${D}`)]})]})]})})},(we=ee.data)==null?void 0:we.id)})]},X.key)})]})]})})});qx.displayName="SessionList";const vm=z.forwardRef((e,t)=>N.jsx("div",{className:"sider-container",children:N.jsx(qx,ae({ref:t},e))}));vm.displayName="Sider";const cne=e=>{const{currentSession:t,disabled:n=!1,application:r,networkStatus:a,setCurrentSession:i,isSessionHistoryVisible:s,setIsSessionHistoryVisible:o,onSessionChange:u}=e,{popupContainer:l}=z.useContext(nn),c=M=>{var g,f;((g=M.data)==null?void 0:g.id)!==((f=t==null?void 0:t.data)==null?void 0:f.id)&&(o(!1),u==null||u(M))},d=()=>{o(!1)};return N.jsx(R.Drawer,{title:"会话历史",open:!0,placement:"bottom",onClose:d,className:"session-history-drawer",size:"large",getContainer:()=>(l==null?void 0:l.current)||document.body,destroyOnClose:!0,style:{position:"absolute"},children:N.jsx(vm,{isShowHeader:!1,application:r,networkStatus:a,currentSession:t,setCurrentSession:i,afterSessionClick:c})})};const dne=e=>{const{sessionId:t,netStatus:n,enable:r,disabledTip:a="上传文件后,该会话自动停止网络访问",onNetStatusChange:i}=e,[s,o]=z.useState(!1),[u,l]=z.useState(!1),[c,d]=z.useState("#070C14");z.useEffect(()=>{l(!r),r||d("#070C14")},[t,r]);const M=()=>{l(!1)};z.useEffect(()=>{o(u)},[u]);const g=f=>{i(f)};return N.jsx(N.Fragment,{children:N.jsxs("div",{className:"connect",onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{u||o(!1)},children:[N.jsx(R.Button,{type:"link",icon:n?N.jsx(ct,{className:"link-btn",type:"icon-yilianwang",style:{fontSize:22}}):N.jsx(ct,{className:"link-not-btn",type:"icon-lianwangguanbi",style:{color:c,fontSize:22},onMouseEnter:()=>{d(r?"#B452FF":"#070C14")},onMouseLeave:()=>d("#070C14")}),disabled:!r,onClick:()=>{g(!n)}}),s&&N.jsx("div",{className:"net-tip",children:r?n?"网络访问已开启":"网络访问已关闭":u?N.jsxs("div",{style:{display:"flex",gap:6},children:[N.jsx("span",{children:a}),N.jsx("div",{children:N.jsx(At.CloseOutlined,{onClick:M})})]}):a})]})})};const{Text:Mne}=R.Typography,gne=()=>N.jsxs(R.Space,{children:[N.jsx(R.Spin,{indicator:N.jsx(At.LoadingOutlined,{style:{fontSize:12}}),spinning:!0}),"正在生成标题"]}),pne=e=>{const{appId:t,data:n,highlight:r,onEdit:a,onDelete:i,onClick:s,onStatusChange:o}=e,{service:u}=z.useContext(nn),[l,c]=z.useState(n.status!=="finish"),[d,M]=z.useState(n),[g,f]=z.useState(n.title);z.useEffect(()=>{d.status!=="finish"&&c(!0)},[d.status,l]),z.useEffect(()=>{M(n)},[n]);const m=()=>{u==null||u.getPrompt(t,d.id).then(I=>{M(I),o&&o(I.status,I),I.status==="finish"?c(!1):(c(!0),setTimeout(()=>m(),2e3))})};return z.useEffect(()=>{l&&m()},[l]),z.useEffect(()=>{if(r){const I=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),A=new RegExp(`(${I})`,"g"),y=d.title.split(A);f(y.map((D,j)=>r===D?N.jsx("span",{className:"hightlight",children:D},j):D))}else f(d.title)},[r,d.title]),N.jsxs("div",{className:"prompt-list-item",onClick:()=>s&&s(n),children:[N.jsxs("div",{className:"prompt-list-item-body",children:[N.jsx("div",{className:"prompt-list-item-title",children:d.title?g:N.jsx(gne,{})}),N.jsx("div",{className:"prompt-list-item-context",children:N.jsx(Mne,{ellipsis:!0,children:d.context})})]}),N.jsxs("div",{className:"prompt-list-item-actions",onClick:I=>I.stopPropagation(),children:[a&&N.jsx(R.Button,{type:"text",disabled:l,icon:N.jsx(ct,{type:"icon-bianji2"}),onClick:()=>a(n)}),i&&N.jsx(R.Button,{type:"text",disabled:l,icon:N.jsx(ct,{type:"icon-shanchu"}),onClick:()=>i(n.id)})]})]})};const fne="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MyA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS41NiAzMS4xNTVDMTUuNTIgMzEuNDMgMTUuNSAzMS43MTUgMTUuNSAzMkMxNS41IDM1LjMxNSAxOC4xODUgMzggMjEuNSA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uNSAyNy41ODUgMzQuODE1IDI3LjU4NSAzMS41QzI3LjU4NSAzMS4xNiAyNy41ODUgMzAuNSAyOC41MjUgMzAuNUg0MC45OTk5IiBzdHJva2U9IiM5Njk5QjciIHN0cm9rZS13aWR0aD0iMi41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIxLjA1IDEwLjM4VjJNMTMuNTUgMTAuMzhMOCA0LjE1MDAyTTM0LjA1IDQuMTUwMDJMMjguNSAxMC4zOCIgc3Ryb2tlPSIjOUMyNEYyIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTEwMjlfMzkxNiIgeDE9IjMwLjE3ODYiIHkxPSIzOC41IiB4Mj0iMzYuMzEyNiIgeTI9IjM4LjUiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzIwNUVGOSIvPgo8c3RvcCBvZmZzZXQ9IjAuNiIgc3RvcC1jb2xvcj0iIzgzNUFGRSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRDYyRDkiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K",hne=e=>{const{appId:t,data:n=[],search:r,onItemClick:a,onChange:i,onRefresh:s}=e,o=()=>N.jsx("div",{className:"prompt-list-empty",children:N.jsx(R.Empty,{image:fne,imageStyle:{height:44},description:N.jsx("span",{children:"暂无快捷指令"})})});return N.jsx("div",{className:"prompt-list-wrap",children:n.length?N.jsx(N.Fragment,{children:N.jsx(R.List,{className:"prompt-list",dataSource:n,renderItem:u=>N.jsx(pne,{appId:t,data:u,highlight:r,onClick:a,onStatusChange:(l,c)=>{const d=n.findIndex(M=>M.id===c.id);d>-1&&(n[d]=c,i&&i([...n]))}})})}):N.jsx(o,{})})},Nne=e=>{var v;const{appId:t,list:n,search:r,disabled:a=!1,open:i=!1,onClose:s,onPromptSelect:o}=e,[u,l]=z.useState(i),[c,d]=z.useState(),{service:M,popupContainer:g,mode:f}=z.useContext(nn),[m,I]=z.useState((n==null?void 0:n.filter(B=>B.type==="me"))||[]),[A,y]=z.useState((n==null?void 0:n.filter(B=>B.type==="system"))||[]),[D,j]=z.useState((n==null?void 0:n.filter(B=>B.type==="system"))||[]),[L,E]=z.useState("system"),[F,H]=z.useState(!1);z.useEffect(()=>{u&&M&&(r&&r.length>Fe.PROMPT_TITLE_MAX_LENGTH?(I([]),y([])):(M.listPrompt(t,{type:"system"}).then(B=>H(!!B.length)),M.listPrompt(t,r?{title:r}:void 0).then(B=>{const Y=B.filter(te=>te.type==="me"),W=B.filter(te=>te.type==="system");I(Y),y(W)})))},[u]),z.useEffect(()=>{S()},[r]),z.useEffect(()=>{i&&S()},[i]),z.useEffect(()=>{let B=g==null?void 0:g.current;B?B.clientWidth>900?d(520):d(B.clientWidth-80):d(400)},[(v=g==null?void 0:g.current)==null?void 0:v.clientWidth]),z.useEffect(()=>{M==null||M.listPrompt(t).then(B=>{const Y=B.filter(W=>W.type==="system");j(Y)})},[M]);const S=()=>{if(r&&r.length>Fe.PROMPT_TITLE_MAX_LENGTH){I([]),y([]);return}M==null||M.listPrompt(t,r?{title:r}:void 0).then(B=>{const Y=B.filter(te=>te.type==="me"),W=B.filter(te=>te.type==="system");I(Y),y(W),l(!!(W.length&&(r!=null&&r.length))),r||j(W)})};return N.jsx(R.Popover,{title:null,placement:"topLeft",overlayClassName:"propmt-manage-popover",open:u,zIndex:1e4,arrowPointAtCenter:!0,trigger:["click"],autoAdjustOverflow:{adjustX:0},overlayStyle:{width:"260px"},getPopupContainer:()=>(g==null?void 0:g.current)||document.body,onOpenChange:B=>{l(B),!B&&s&&s()},content:N.jsx(N.Fragment,{children:N.jsx(R.Tabs,{activeKey:L,style:{padding:"0 16px"},onTabClick:B=>{E(B)},children:N.jsx(R.Tabs.TabPane,{tab:"快捷指令",children:N.jsx(hne,{appId:t,data:A,search:r,onItemClick:B=>{o&&o(B),l(!1)}})},"system")})}),children:D!=null&&D.length?N.jsx(R.Button,{disabled:a,style:{width:"24px"},className:wn({"prompt-btn":!0,active:u}),type:"text",icon:N.jsx(ct,{type:"icon-tishiyu1",style:{fontSize:24}}),onClick:()=>l(!0)}):null})},mne=z.memo(Qx),T2={icon:v2,text:"今天我能帮你什么?"};class Bs{constructor(t,n,r,a,i){Dt(this,"messageTime");Dt(this,"isWaiting");Dt(this,"messageId");Dt(this,"isContext");Dt(this,"actions");Dt(this,"reference");Dt(this,"isSensitive");Dt(this,"isSuspend");Dt(this,"imageContent");Dt(this,"comment");this.content=t,this.sessionId=n,this.role=r,this.files=a,this.content=t,this.role=r,this.sessionId=n,this.files=a,this.imageContent=i,this.messageTime=fn(new Date).format("YYYY-MM-DD HH:mm:ss"),this.isWaiting=!1,this.messageId=po.v4(),this.isContext=!1,this.actions=[],this.reference=[],this.isSensitive=!1,this.isSuspend=!1,this.comment={isAgree:0}}}const y2=10,Ef=(e,t,n,r)=>{let a=e;if(r===Fe.ApplicationTypes.Agent){if(n&&n.length>0){const i=n.map(s=>`[${s.name.replace(/\.[^/.]+$/,"")}](${s.url})`).join(`
317
317
  `);a=i?`${i}
318
318
  ${a}`:a}t&&(a=`![](${t})
319
- ${a}`)}return a},Tne=z.forwardRef((e,t)=>{var pT,fT,hT,NT,mT,TT,yT,IT,DT,AT,bT,ET,jT,zT;const{application:n,docViewerUrl:r="",currentSession:a,onCreateSession:i,embeddingService:s,setCurrentSession:o,networkStatus:u,setNetworkStatus:l}=e,[c,d]=z.useState([]),[M,g]=z.useState(),[f,m]=z.useState(),I=z.useRef(null),{service:A,agentClient:y,depId:D,footer:j,transform:L,defaultInput:E,onMessage:F,onHistoryLoad:H,beforeMessageSend:S,bodyStyle:v,disabled:B,features:Y,popupContainer:W,icon:te,sider:oe,mode:K}=z.useContext(nn),[Ye,he]=z.useState(!1),be=z.useRef(c),k=z.useRef(void 0),[ze,X]=z.useState(0),[w,ee]=z.useState(),[Ce,De]=z.useState(""),[ne,re]=z.useState(!1),Ae=z.useRef(null),[ce,Ne]=z.useState([]),[ke,we]=z.useState(!1),[Qe,Ze]=z.useState(!1),[Nt,gn]=z.useState(""),[pn,an]=z.useState(),[yr,vr]=z.useState({}),ra=z.useRef(null),hn=z.useRef(null),rr=z.useRef(null),[aa,V]=z.useState(!1),[se,Ee]=z.useState([]),[Pe,nt]=z.useState(!0),[Ut,lt]=z.useState(!0),[He,Lt]=z.useState(!1),[Gn,kt]=z.useState(!1),[ia,Ir]=z.useState(!1),[Dr,js]=z.useState(typeof(Y==null?void 0:Y.promptVariables)=="object"?Y.promptVariables.default||[]:[]),[QS,BS]=z.useState(typeof(Y==null?void 0:Y.knowledges)=="object"&&Y.knowledges.default||void 0),[rT,sa]=z.useState(!1),[aT,zs]=z.useState(!1),[FS,Li]=z.useState(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),[iT,au]=z.useState(!1),[GS,Ca]=z.useState(!1),[HS,WS]=z.useState(null),[iu,ri]=z.useState(!1),[sT,oT]=z.useState(!1),{isSwitchingToExistingSession:uT,setIsSwitchingToExistingSession:su}=Om();z.useEffect(()=>{if(WS(a),a===null)Ca(!1);else if(a===void 0)Ca(!0);else{if(HS===null){if(uT){Ca(!0),su(!1);return}Ca(!1);return}a.ready?Ca(!1):Ca(!0)}},[a,a==null?void 0:a.ready,uT]),z.useEffect(()=>{var _e,Be;a&&(be.current=[]),d([]);const Z=I.current;if(Z&&Z.scrollTo({top:0}),!((_e=a==null?void 0:a.data)!=null&&_e.id))return;if(kt(!1),Lt(!1),(Be=a.messages)!=null&&Be.length){const Ke=[...a.messages.filter(Oe=>Oe==null?void 0:Oe.messageId)].reverse();be.current=[...Ke],d([...Ke]),Ca(!1)}const ie=ge=>{var Ke;(Ke=a==null?void 0:a.data)!=null&&Ke.id&&(be.current=[...ge].reverse(),d([...ge].reverse()),!ge||ge.length<10?zs(!1):zs(!0),Ca(!1),H&&H({applicationId:n.id,sessionId:a.data.id,histories:ge}))};return a.addEventListener("history:loaded",ie),()=>{be.current=[],d([]),a==null||a.removeEventListener("history:loaded",ie)}},[a]),z.useEffect(()=>{const Z=()=>{var ie;(ie=a==null?void 0:a.data)!=null&&ie.id&&(a.promptVariables&&js(a.promptVariables.sort((_e,Be)=>_e.key.localeCompare(Be.key))),a.knowledges&&BS(a.knowledges),l(a.netOpen))};return a==null||a.addEventListener("data:updated",Z),()=>{a==null||a.removeEventListener("data:updated",Z)}},[a]),z.useEffect(()=>{var ie;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))return;const Z=_e=>{var Be;console.error(_e.message,_e.cause,"e.case"),R.notification.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-notification"}),R.notification.error({message:((Be=_e.cause)==null?void 0:Be.message)||_e.message}),R.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return a.addEventListener("error",Z),()=>{a==null||a.removeEventListener("error",Z)}},[a]);const qS=()=>{var _e;if(!((_e=a==null?void 0:a.data)!=null&&_e.id)||!(n!=null&&n.id))return;const Z=a.data.id,ie=c[c.length-1];if(ie&&ie.isContext){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.success("已开启新话题"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else a.clear().then(()=>{const Be=new Bs("",Z,Fe.IHistoryRole.System);Be.isContext=!0,d([Be,...c])})};z.useEffect(()=>{n!=null&&n.id&&(A==null||A.getRecommendQues(n.id).then(Z=>{Ne(Z)}))},[D,n]);const lT=Z=>et(exports,null,function*(){var xa,Sa;if(B){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("发送功能被禁用"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}const ie=Z||M;if(!(ie!=null&&ie.trim())){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("请输入你想问的"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!(Dr==null?void 0:Dr.every(sn=>!!(sn!=null&&sn.value))))if(L!=null&&L.promptVariables){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("变量值不能为空"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else console.error("变量值不能为空",Dr==null?void 0:Dr.map(sn=>!!(sn!=null&&sn.value)));if(Gn){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在回复中"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(Ye){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("等待初始化"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Pe){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在解析文件"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(ne){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在上传图片"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}ee(void 0),De("");const Be=(xa=a==null?void 0:a.data)==null?void 0:xa.id;if(!Be){if(iu)return;ri(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(sn=>{var br,Ls;sa(!0),l(!!((br=sn.data)!=null&&br.netOpen)),Li(!!((Ls=sn.data)!=null&&Ls.enableNetOpen)),ou(sn).then(()=>{o==null||o(sn),sa(!1),m(ie)})}).catch(sn=>{ri(!1)});return}if(iu)return;ri(!0),au(!0);const ge=Ef(ie,Ce,yr[Be],(n==null?void 0:n.type)||0);let Ke;try{S?Ke=yield S==null?void 0:S({applicationId:n.id,sessionId:Be,message:{content:ge,sessionId:Be,role:Fe.ChatMessageRole.User,files:yr[Be]}}):Ke=!0}catch(sn){Ke=!1}if(au(!1),Ke===!1){ri(!1);return}let Oe=ie;typeof Ke=="object"&&(Oe=Ke.content||ie);const Nn=yield(()=>new Promise(sn=>{js(br=>(sn(br),br))}))();if(!(yield a.setPromptVariables(Nn))){ri(!1);return}((Sa=yr[Be])==null?void 0:Sa.length)>0?$S(Oe):Ic(Oe)}),ou=Z=>new Promise((ie,_e)=>et(exports,null,function*(){const Ke=(Z==null?void 0:Z.promptVariables).filter(Oe=>Oe.type?!((Oe.type===Fe.PromptVariableType.User||Oe.type===void 0)&&Oe.key==="query")&&!((Oe.type===Fe.PromptVariableType.System||Oe.type===void 0)&&Oe.key==="datetime"):Oe.key!=="query").map(Oe=>{var Nn;const Pt=(Nn=Dr.find(Ar=>Ar.key===Oe.key&&Ar.type===Oe.type))==null?void 0:Nn.value;return Oe.value=Pt||"",Oe});js(Ke.sort((Oe,Pt)=>Oe.key.localeCompare(Pt.key))),yield Z==null?void 0:Z.setPromptVariables(Ke).catch(Oe=>{console.error(Oe),R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error(Oe.message),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}),ie()})),$S=Z=>{var ge,Ke,Oe;if(nt(!1),!((ge=a==null?void 0:a.data)!=null&&ge.id)||!(n!=null&&n.id))return;const ie=((Ke=a.data)==null?void 0:Ke.id)||"";let _e=[],Be=new Set;(Oe=yr[ie])==null||Oe.forEach(Pt=>{Be.has(Pt.id)||(_e.push(Pt),Be.add(Pt.id))}),nt(!0),Ic(Z,_e)};z.useEffect(()=>{if(!f||!a)return;const Z=f,ie=()=>et(exports,null,function*(){au(!0);const _e=Ef(Z,Ce,yr[a.id],(n==null?void 0:n.type)||0);let Be;try{S?Be=yield S==null?void 0:S({applicationId:n.id,sessionId:a.id,message:{content:_e,sessionId:a.id,role:Fe.ChatMessageRole.User,files:yr[a.id]}}):Be=!0}catch(ge){Be=!1}if(au(!1),Be===!1){ri(!1);return}Ic(Z),m(void 0)});return a.ready?ie():a.addEventListener("ready",ie,!0),()=>{a==null||a.removeEventListener("ready",ie)}},[f,a]);const Ic=(Z,ie)=>et(exports,null,function*(){var xa,Sa,sn;const _e=(xa=a==null?void 0:a.data)==null?void 0:xa.id;if(!_e)return;kt(!0),Lt(!0);const Be=Ef(Z,Ce,ie,(n==null?void 0:n.type)||0);let ge;n.type===Fe.ApplicationTypes.Agent?ge=void 0:n.type===Fe.ApplicationTypes.Dialog&&((Sa=n.arrange)!=null&&Sa.length)&&n.arrange[0].visionOpen?ge=Ce?[Ce]:void 0:ge=void 0;const Ke=new Bs(Be,_e,Fe.IHistoryRole.User,ie,ge);g(void 0),an(void 0),be.current=[Ke,...c],d(be.current),n.id&&F&&F({applicationId:n.id,sessionId:_e,message:Ke});const Oe=new Bs("",_e,Fe.IHistoryRole.System);Oe.isWaiting=!0,be.current=[Oe,...be.current],d(be.current);const Pt=(ie==null?void 0:ie.map(br=>br.id))||[],Nn={stream:Hs.configuration.stream,referenceFirst:!1};if(L!=null&&L.promptVariables){const br=Dr==null?void 0:Dr.reduce((Ls,LT)=>(Ls[LT.key]=LT.value,Ls),{});Nn.formatValues=br}if(L!=null&&L.knowledges){const br=QS;Nn.knowledges=br}const Ar={text:Be,fileIds:Pt,files:ie};ge&&ge.length>0&&(Ar.imageContent=ge),yield a.send(Ar,Nn),vr({[_e]:[]}),(sn=ra.current)==null||sn.update(),ri(!1)});z.useEffect(()=>{var Be;const Z=(Be=a==null?void 0:a.data)==null?void 0:Be.id;if(!Z)return;const ie=ge=>{if(!ge.sessionId||ge.sessionId&&ge.sessionId!==k.current||ge.role===Fe.IHistoryRole.User)return;if(ge.index===-1&&ge.code!==200&&ge.code!==11915&&(Lt(!1),kt(!1),be.current=be.current.filter(Pt=>!Pt.isWaiting),d([...be.current]),be.current=[...be.current],ge.content)){R.notification.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-notification"}),R.notification.error({message:ge.content}),R.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const Ke=ge.actions||[],Oe=new Bs(ge.content,Z,Fe.IHistoryRole.Robot);Oe.messageId=ge.messageId||po.v4(),Oe.reasoningContent=ge.reasoningContent,Oe.searchReference=ge.searchReference,Oe.thinkingSecs=ge.thinkingSecs,Oe.thinkingStatus=ge.thinkingStatus,Oe.actions=Ke,Oe.isLoading=!0,Oe.searchingStatus=ge.searchingStatus,be.current=be.current.filter(Pt=>!Pt.isWaiting).filter(Pt=>!Pt.isReplying),ge.index===void 0&&d([Oe,...be.current]),ge.code===11915&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.content="请您换个问题问我吧~",Oe.isSensitive=!0,d([Oe,...be.current])),ge.index===-2&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.content="回答已中止~",Oe.isSuspend=!0,d([Oe,...be.current])),ge.index===-1&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.reference=ge.reference,d([Oe,...be.current]),n.id&&F&&F({applicationId:n.id,sessionId:Z,message:Oe})),ge.index===-3&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.reference=ge.reference,Oe.relatedQuesion=ge.relatedQuesion,d([Oe,...be.current]))},_e=()=>{a.addEventListener("message:updated",ie)};return a.ready?a.addEventListener("message:updated",ie):a.addEventListener("ready",_e),()=>{a==null||a.removeEventListener("message:updated",ie),a==null||a.removeEventListener("ready",_e)}},[a]),z.useEffect(()=>{if(!a){he(!1);return}const Z=ie=>{he(ie)};return he(a.frozen),a.addEventListener("frozen",Z),()=>{a==null||a.removeEventListener("frozen",Z)}},[a]),z.useEffect(()=>{if(!y)return;const Z=y.questionContextMaxLength||4e3;X(Z)},[y,A]),z.useEffect(()=>{E&&an(E.text)},[E]);const VS=Z=>{const ie=Z.size;return ie<=0?(R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("该文件为空,请重新上传"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):ie>20*Vu?(R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("图片须小于20M"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):(ee(Z),!1)},ZS=Z=>et(exports,null,function*(){var ie;return ee(Z),(ie=a==null?void 0:a.data)!=null&&ie.id?cT(a,Z):new Promise(_e=>{sa(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(Be=>{var ge,Ke;o==null||o(Be),sa(!1),l(!!((ge=Be.data)!=null&&ge.netOpen)),Li(!!((Ke=Be.data)!=null&&Ke.enableNetOpen)),ou(Be),_e(cT(Be,Z))})})}),cT=(Z,ie)=>{const _e=vte(ie.name);return new Promise(Be=>{var Ke;const ge={files:[`${po.v4()}.${_e}`],isv:"minio",knowledgeId:((Ke=Z.data)==null?void 0:Ke.id)||"",type:1};re(!0),A==null||A.postTicket(ge).then(Oe=>{A.uploadMinioFile(Oe.minio,ie).then(()=>{var xa,Sa;const Pt=(xa=Oe.minio.endpoints)==null?void 0:xa[0],Nn=Oe.minio.bucket,Ar=(Sa=Oe.minio.fileKeys)==null?void 0:Sa[0];Be(`${location.protocol}//${Pt}/${Nn}/${Ar}`)}).catch(()=>{De(""),ee(void 0)}).finally(()=>{re(!1)})}).catch(()=>{De(""),ee(void 0),re(!1)})})};z.useEffect(()=>{const Z=I.current;Z&&!ia&&Z.scrollTo({top:Z.scrollHeight})},[c]);const dT=(Z,ie)=>new Promise(_e=>{if(!ie.file.url||!(n!=null&&n.id))return _e();const Be=bt(ae({},ie.file),{type:1});A==null||A.postApplicationIdSessionKnowledgeSessionFile(n==null?void 0:n.id,Z,Be).finally(()=>{var ge;(ge=ra.current)==null||ge.update().finally(_e)})}),XS=()=>{var Z;(Z=a==null?void 0:a.data)!=null&&Z.id&&(Lt(!1),a.suspend())},JS=Z=>{const ie=I.current;ie&&setTimeout(()=>{ie.scrollTo({top:ie.scrollHeight,behavior:Z==null?void 0:Z.behavior})},Z==null?void 0:Z.ms)},KS=()=>{if(!I.current)return;const Z=I.current.scrollTop<=-80;Ir(Z)},eO=Hr.useMemoizedFn(Z=>{var ie,_e;(ie=Ae.current)==null||ie.update(Z),(_e=Ae.current)==null||_e.focus()}),tO=Hr.useMemoizedFn(Z=>{lT(Z)}),nO=Hr.useMemoizedFn(()=>{var ie;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))return;be.current=[...c.slice(1,c.length)],d(be.current);const Z=new Bs("",a.data.id,Fe.IHistoryRole.System);Z.isWaiting=!0,be.current=[Z,...be.current],d(be.current),kt(!0),Lt(!0),a.answerAgain()});z.useEffect(()=>{var Z,ie;k.current=(Z=a==null?void 0:a.data)==null?void 0:Z.id,!rT&&((ie=rr.current)==null||ie.clear())},[a]);const rO=()=>{var _e;if(!((_e=a==null?void 0:a.data)!=null&&_e.id))return;const ie=c[c.length-1].messageTime;a.fetchMessages({endTime:ie,pageSize:y2}).then(Be=>{const ge=Be||[];if(!ge||!(ge!=null&&ge.length)){zs(!1);return}ge.length<10?zs(!1):zs(!0),d([...c,...ge.reverse()])})},aO=Z=>et(exports,null,function*(){var ie,_e;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))l(Z);else{if(yield a.setNetOpen(Z),!((_e=a.data)!=null&&_e.id))return;l(Z)}}),Dc=()=>et(exports,null,function*(){a?a.fetchData().then(Z=>{var ie;(ie=a==null?void 0:a.data)!=null&&ie.id&&(l(Z.netOpen),Li(Z.enableNetOpen))}):(l(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),Li(n.arrange[0].enableNetOpen))});z.useEffect(()=>{Dc()},[a]),z.useEffect(()=>{requestAnimationFrame(()=>{var ie,_e;if(I.current){const Be=document.getElementById("chat-main"),ge=(ie=I.current)==null?void 0:ie.querySelector(".infinite-scroll-component__outerdiv"),Ke=(_e=I.current)==null?void 0:_e.querySelector(".infinite-scroll-component");if(!ge||!Ke||!Be)return;const Oe=Be.offsetHeight;if(Ke.offsetHeight<=Oe){if(ge.style.height==="100%")return;ge.style.height="100%"}else{if(ge.style.height==="auto")return;ge.style.height="auto"}}})},[c]),z.useEffect(()=>{if(a)return;const Z=()=>{const Be=((y==null?void 0:y.promptVariables)||[]).filter(ge=>ge.type?!(ge.type===Fe.PromptVariableType.User&&ge.key==="query")&&!(ge.type===Fe.PromptVariableType.System&&ge.key==="datetime")&&ge.status===1:ge.key!=="query"&&ge.status===1).map((ge,Ke)=>{var Pt,Nn;let Oe="";return typeof(Y==null?void 0:Y.promptVariables)=="object"&&(Oe=((Nn=(Pt=Y.promptVariables.default)==null?void 0:Pt.find(Ar=>Ar.key===ge.key&&Ar.type===ge.type))==null?void 0:Nn.value)||""),{id:Ke+"",key:ge.key,name:ge.name,value:Oe,type:ge.type}});js([...Be].sort((ge,Ke)=>ge.key.localeCompare(Ke.key)))};return y!=null&&y.ready?Z():y==null||y.addEventListener("ready",Z),()=>{y==null||y.removeEventListener("ready",Z)}},[a,y,Y==null?void 0:Y.promptVariables]);const MT=()=>i==null?void 0:i({netOpen:u?_r.OPEN:_r.CLOSE}).then(Z=>{var ie,_e;return o==null||o(Z),sa(!1),l(!!((ie=Z.data)!=null&&ie.netOpen)),Li(!!((_e=Z.data)!=null&&_e.enableNetOpen)),ou(Z),Z}),gT=z.useMemo(()=>{var Z;return n.arrange&&((Z=n.arrange[0])!=null&&Z.openingContent)?N.jsx(Qx,{application:n,history:{role:1,content:n.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:fn(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:!!c.length,markdown:Y==null?void 0:Y.markdown}):null},[n==null?void 0:n.arrange,c]);return z.useImperativeHandle(t,()=>({getCurrentInputText:()=>{var Z;return(Z=Ae.current)==null?void 0:Z.getCurrentText()}})),z.useEffect(()=>{var ie;const Z=(ie=a==null?void 0:a.data)==null?void 0:ie.id;Z&&vr(_e=>bt(ae({},_e),{[Z]:[]}))},[(pT=a==null?void 0:a.data)==null?void 0:pT.id]),N.jsxs("div",{className:"agent-chat",children:[GS?N.jsx("div",{className:"session-loading",children:N.jsx(R.Spin,{})}):N.jsxs(N.Fragment,{children:[(L==null?void 0:L.promptVariables)&&N.jsx(Hx,{ref:hn,appId:n.id,currentSession:a,promptVariables:Dr,setPromptVariables:js,setCurrentSession:o}),N.jsxs("div",{className:"chat-main",id:"chat-main",style:v,children:[N.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:I,onScroll:KS,children:(fT=a==null?void 0:a.data)!=null&&fT.id&&(c!=null&&c.length)?N.jsxs(dO,{dataLength:c.length,next:rO,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:c.length>y2&&((hT=I.current)!=null&&hT.scrollTop)&&((NT=I.current)==null?void 0:NT.scrollTop)<-10?N.jsx(R.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:aT,loader:N.jsx("div",{style:{height:"50px",textAlign:"center",overflow:"hidden"},children:N.jsx(R.Spin,{})}),scrollableTarget:"scrollableDiv",children:[c.map((Z,ie)=>N.jsx(mne,{application:n,currentSession:a,history:Z,docViewerUrl:r,isLastHistory:ie===0,onRelatedClick:tO,onAgainClick:nO,onEditClick:eO,markdown:Y==null?void 0:Y.markdown},Z.messageId+ie)),!aT&&gT]}):N.jsxs("div",{className:"main-empty",children:[(Y==null?void 0:Y.greeting)!==!1&&N.jsx(Jte,{text:Y!=null&&Y.greeting&&typeof Y.greeting=="object"&&Y.greeting.text!==void 0?Y.greeting.text:(mT=n.arrange)!=null&&mT.length&&((TT=n.arrange[0])!=null&&TT.greetings)?n.arrange[0].greetings:T2.text,icon:Y===void 0||Y.greeting===!0||((yT=Y.greeting)==null?void 0:yT.icon)===void 0?te||T2.icon:Y.greeting.icon,children:!!ce.length&&(((Y==null?void 0:Y.greeting)===void 0||(Y==null?void 0:Y.greeting))===!0||typeof(Y==null?void 0:Y.greeting)=="object"&&Y.greeting.questions!==!1)&&N.jsx(Fx,{ref:rr,sid:(IT=a==null?void 0:a.data)==null?void 0:IT.id,isRecommendClearing:ke,data:ce,layoutBreakpoints:typeof(Y==null?void 0:Y.greeting)=="object"?Y.greeting.layoutBreakpoints:void 0,onItemClick:Z=>{var _e,Be,ge;if(g(Z==null?void 0:Z.question),an(Z==null?void 0:Z.question),ke)return;Z!=null&&Z.id&&we(!0);const ie=(_e=a==null?void 0:a.data)==null?void 0:_e.id;L!=null&&L.fileUpload?(ge=(Be=ra.current)==null?void 0:Be.clear())==null||ge.then(()=>{var Ke,Oe;Z!=null&&Z.id&&(ie?(Ke=dT(ie,Z))==null||Ke.finally(()=>{we(!1)}):(we(!1),sa(!0),(Oe=MT())==null||Oe.then(Pt=>{var Nn;(Nn=dT(Pt.id,Z))==null||Nn.finally(()=>{we(!1)})})))}):ie?we(!1):(we(!1),sa(!0),MT())}})}),gT]})}),He&&N.jsx("div",{className:"session-stop",children:N.jsx(R.Button,{type:"primary",style:{background:"white"},ghost:!0,size:"small",icon:N.jsx(ct,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>XS(),children:"停止回答"})}),ia&&(c==null?void 0:c.length)>0&&N.jsx("div",{className:"back-bottom",children:N.jsx(R.Button,{size:"small",onClick:()=>JS({behavior:"smooth"}),type:"link",icon:N.jsx(ct,{type:"icon-yijianhuidaodibu",style:{fontSize:24}})})})]}),N.jsx("div",{className:"chat-footer",children:N.jsxs("div",{className:"chat-footer-input",children:[w&&N.jsx("div",{className:"input-files",children:N.jsx(Vte,{file:w,actions:{upload:ZS,remove:()=>{De(""),ee(void 0)}},onUrlChange:Z=>De(Z)})}),N.jsxs(R.Space,{className:"footer-upload-action",onClick:Z=>Z.preventDefault(),children:[N.jsxs(R.Space,{children:[(n.type===Fe.ApplicationTypes.Agent&&(L==null?void 0:L.imageUpload)||n.type===Fe.ApplicationTypes.Dialog&&((DT=n.arrange)==null?void 0:DT.length)&&!!n.arrange[0].visionOpen&&(L==null?void 0:L.imageUpload))&&N.jsx(R.Upload,{disabled:!!w||B,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:VS,className:"footer-upload-picture",showUploadList:!1,children:w?N.jsx(R.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!!w||B,icon:N.jsx(At.CameraOutlined,{className:"icon-tianjia",style:{fontSize:"22px"}})}):N.jsx(R.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:N.jsx("div",{children:"支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"}),children:N.jsx(R.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:N.jsx(ct,{type:"icon-Vector",className:"icon-tianjia",style:{fontSize:"22px"}})})})}),s&&(L!=null&&L.fileUpload)&&(n!=null&&n.id)?N.jsx(Gx,{appId:n==null?void 0:n.id,ref:ra,isFirstSession:rT,docViewerUrl:r,onStatusChange:Z=>et(exports,null,function*(){Z!=="process"?(nt(!0),Dc()):nt(!1)}),createSession:()=>new Promise(Z=>{sa(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(ie=>{var Be,ge,Ke;o==null||o(ie),sa(!1),l(!!((Be=ie.data)!=null&&Be.netOpen)),Li(!!((ge=ie.data)!=null&&ge.enableNetOpen)),ou(ie);const _e=((Ke=ie.data)==null?void 0:Ke.id)||"";Z(_e)})}),sid:(AT=a==null?void 0:a.data)==null?void 0:AT.id,disabled:Gn||B,afterFileAdd:(Z,ie)=>{ie&&vr(_e=>{const Be=_e[ie]||[];return{[ie]:[...Be,Z]}})},afterFileDelete:Z=>{var _e;const ie=(_e=a==null?void 0:a.data)==null?void 0:_e.id;ie&&vr(Be=>{const ge=Be[ie]||[];return{[ie]:ge.filter(Ke=>Ke.id!==Z)}})},onFileListChange:Z=>{Ee(Z)},shouldContinue:Ut,afterFilesClear:()=>{var ie;const Z=(ie=a==null?void 0:a.data)==null?void 0:ie.id;Z&&(vr({[Z]:[]}),Dc())}}):null,(L==null?void 0:L.prompt)&&(n==null?void 0:n.id)&&N.jsx(Nne,{appId:n.id,list:[],search:Qe?Nt:"",onPromptSelect:Z=>{an(Z.context),g(Z.context)},disabled:B})]}),N.jsxs(R.Space,{children:[(L==null?void 0:L.connectNetwork)&&n.type===Fe.ApplicationTypes.Dialog&&((bT=n.arrange)==null?void 0:bT.length)&&!!n.arrange[0].enableNetOpen&&N.jsx(dne,{sessionId:(ET=a==null?void 0:a.data)==null?void 0:ET.id,netStatus:u,enable:typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.diabled)=="boolean"?!(Y!=null&&Y.connectNetwork.diabled):FS,disabledTip:a?void 0:"网络访问已被禁用",onNetStatusChange:Z=>{aO(Z)}}),(L==null?void 0:L.sessionList)&&N.jsx(one,{currentSessionId:(jT=a==null?void 0:a.data)==null?void 0:jT.id,onSessionChange:(Z,ie)=>{an(void 0),su(!0),o==null||o(ie)},disabled:B}),oe&&K==="float"&&N.jsx("div",{className:"session-history-drawer-component",children:N.jsx(R.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:Z=>Z.parentNode,content:"会话历史记录",children:N.jsx(R.Button,{className:"history-overlay-action",disabled:B,type:"text",icon:N.jsx(ct,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>oT(!0)})})}),(L==null?void 0:L.sessionOpen)&&N.jsx(R.Button,{icon:N.jsx(At.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:He||!a||!c.length||B,onClick:()=>{var Z,ie;su(!1),o==null||o(null),l(!1),(Z=hn.current)==null||Z.clear(),(ie=rr.current)==null||ie.clear()},children:"新会话"})]})]}),N.jsx("div",{className:"footer-textarea",children:N.jsx(Bx,{ref:Ae,maxLength:ze,text:pn,networkStatus:!1,loading:iT||iu,disabled:Ye||ne||B||iT||iu,onTextSend:lT,onChange:(Z,ie)=>{an(Z);const _e=ie.getText().replace(/[\n\s]+$/,"");g(_e),gn(_e),Qe||Ze(!0)},clearAction:N.jsx(R.Space,{size:0,children:N.jsx(R.Button,{type:"link",disabled:Gn||B,ghost:!0,icon:N.jsx(ct,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>qS()})})})})]})}),N.jsx(ene,{tips:j}),aa&&N.jsx(rne,{isvisible:aa,files:se,sessionId:(zT=a==null?void 0:a.data)==null?void 0:zT.id,onClose:Z=>{V(!1),lt(!1)}})]}),sT&&N.jsx(cne,{currentSession:a,application:n,networkStatus:u,setCurrentSession:o,disabled:B,isSessionHistoryVisible:sT,setIsSessionHistoryVisible:oT,onSessionChange:Z=>{su(!0)}})]})});const $x=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:a,onSelectChange:i}=e,[s,o]=z.useState(!1),u=N.jsx(R.Checkbox.Group,{style:{width:"100%"},onChange:i,value:n,disabled:t,children:N.jsx(R.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>N.jsx(R.Col,{span:24,children:N.jsx(R.Checkbox,{value:c.id,children:c.name})},c.id))})}),l=c=>{o(c)};return N.jsx("div",{className:"knowledge-select",style:{borderColor:s?"#9C24F2":"#84868C"},children:N.jsx(R.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:u,trigger:"click",overlayStyle:{width:280},onOpenChange:l,getPopupContainer:c=>c.parentNode,children:N.jsxs("div",{className:"",onClick:c=>c.preventDefault(),children:[N.jsx(ct,{className:"select-icon",type:"icon-open"}),N.jsx("span",{className:"title",children:"参考知识库"}),N.jsxs("span",{className:"content",children:["已选 ",a," 个"]})]})})})},yne=e=>{var I,A;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:a,transform:i,features:s}=z.useContext(nn),[o,u]=z.useState([]),[l,c]=z.useState(typeof(s==null?void 0:s.knowledges)=="object"?((I=s.knowledges.default)==null?void 0:I.map(y=>y.id))||[]:[]),[d,M]=z.useState(0),[g,f]=z.useState(!1);z.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const j=y[0].knowledges||[];u(j);const L=typeof(s==null?void 0:s.knowledges)=="object"&&s.knowledges.default||j;if(!t){c(L.map(F=>F.id)),M(L.length),r==null||r(L);return}const E=()=>{const F=t.knowledges||L;M(F.length);const H=F.map(S=>S.id);c(H)};return E(),t.addEventListener("data:updated",E),()=>{t==null||t.removeEventListener("data:updated",E)}},[n,t]),z.useEffect(()=>{var D;if(!g||(f(!1),!(n!=null&&n.id)))return;const y=[];l==null||l.map(j=>{const L=o==null?void 0:o.find(E=>E.id===j);y.push(L)}),(D=t==null?void 0:t.data)!=null&&D.id&&t.setKnowledges(y)},[g]);const m=y=>{f(!0),c(y);const D=[];y==null||y.map(j=>{const L=o==null?void 0:o.find(E=>E.id===j);D.push(L)}),r==null||r(D),M(y.length)};return N.jsxs("div",{className:"chat-header",children:[N.jsxs(R.Space,{className:"header-title",children:[a==="inlay"&&((A=t==null?void 0:t.data)==null?void 0:A.name),a==="float"&&(n==null?void 0:n.name)]}),(i==null?void 0:i.knowledges)&&o.length!==0&&N.jsx($x,{disabled:typeof(s==null?void 0:s.knowledges)=="object"&&(s==null?void 0:s.knowledges.diabled)||!1,checkedValues:l,currKnowledgeList:o,selectCount:d,onSelectChange:m})]})};const Ine=z.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:a}=e,[i,s]=z.useState(),{showHeader:o,agentClient:u,sider:l,onSessionLoad:c,features:d,mode:M}=z.useContext(nn),[g,f]=z.useState(),m=z.useRef(null),[I,A]=z.useState(""),[y,D]=z.useState(),j=z.useRef(null),[L,E]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:F}=Om();z.useEffect(()=>{var S;E(i?!!((S=i.data)!=null&&S.netOpen):typeof(d==null?void 0:d.connectNetwork)=="object"&&typeof(d==null?void 0:d.connectNetwork.default)=="boolean"?d.connectNetwork.default:!1)},[i]),z.useEffect(()=>{const S=()=>et(exports,null,function*(){const v=u==null?void 0:u.application;if(!(v!=null&&v.id))return;const B=v==null?void 0:v.arrange;if(!(B!=null&&B.length))return;const W=B[0].embeddingService;A(W),f(v)});if(u!=null&&u.ready){S();return}return u==null||u.addEventListener("ready",()=>S()),()=>{u==null||u.removeEventListener("ready",S)}},[u]),z.useEffect(()=>{u&&n&&(u.ready?u==null||u.getSessions().then(S=>et(exports,null,function*(){s==null||s(S.find(v=>v.id===n))})):u.addEventListener("ready",()=>et(exports,null,function*(){u==null||u.getSessions().then(S=>et(exports,null,function*(){s==null||s(S.find(v=>v.id===n))}))}),!0))},[u,n]),z.useEffect(()=>{if(!i){c&&c({applicationId:r,sessionId:"",session:null,sessionInstance:null});return}i.data&&c&&c({applicationId:r,sessionId:i.data.id,session:i.data,sessionInstance:i}),i.addEventListener("data:loaded",()=>{i!=null&&i.data&&c&&c({applicationId:r,sessionId:i.data.id,session:i.data,sessionInstance:i})},!0)},[i]);const H=S=>{var v;return(v=m.current)==null?void 0:v.create(bt(ae({},S),{knowledges:y}))};return z.useImperativeHandle(t,()=>({createSession:S=>H(S),getSessionList:()=>{var v;const S=((v=m.current)==null?void 0:v.list())||[];return Promise.resolve(S)},getCurrentInputText:()=>{var S;return(S=j.current)==null?void 0:S.getCurrentInputText()}})),N.jsx("div",{className:"dialog",children:N.jsxs("div",{className:"dialog-pannel",children:[N.jsx("div",{className:"dialog-sider",style:{display:l&&M==="inlay"?"block":"none"},children:N.jsx(vm,{ref:m,appId:r,networkStatus:L,currentSession:i,application:g,setCurrentSession:s,checkKnowledges:y,setCheckKnowledges:o?D:void 0,sessionId:n,afterSessionClick:S=>{var v,B;((v=S.data)==null?void 0:v.id)!==((B=i==null?void 0:i.data)==null?void 0:B.id)&&F(!0)}})}),N.jsx("div",{className:"dialog-content",children:N.jsxs("div",{className:"dialog-chat",children:[o&&N.jsx("div",{className:"dialog-chat-header",children:N.jsx(yne,{setCheckKnowledges:D,application:g,currentSession:i})}),N.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&N.jsx(Tne,{setNetworkStatus:E,networkStatus:L,application:g,currentSession:i,onCreateSession:H,docViewerUrl:a,embeddingService:I,setCurrentSession:s,ref:j})})]})})]})})}),Dne=z.forwardRef((e,t)=>{const{className:n,triggerButton:r,size:a,theme:i,icon:s,docViewerUrl:o,token:u,debug:l,env:c,plugins:d,mcp:M,footer:g,defaultInput:f,onComment:m,onSessionLoad:I,onSessionUnload:A,onMessage:y,beforeMessageSend:D,bodyStyle:j,apiUrl:L,sessionId:E,disabled:F,transform:H,features:S,stream:v,agentClient:B,application:Y}=e,W=z.useRef(null),[te,oe]=z.useState(!1),[K,Ye]=z.useState(),[he,be]=z.useState(a),[k,ze]=z.useState(e.open),X=z.useRef(null);z.useEffect(()=>{Y&&(console.log("[AgentClientUI] token",B,Y),Ye(Y.id))},[Y]),R.ConfigProvider.config({theme:i}),z.useEffect(()=>{a&&be(a)},[a]);const w=(ee,{element:Ce,size:De})=>{be({width:Number(De.width),height:De.height})};return z.useImperativeHandle(t,()=>({createSession:ee=>{var Ce;return(Ce=X.current)==null?void 0:Ce.createSession(ee)},getSessionList:()=>{var ee;return(ee=X.current)==null?void 0:ee.getSessionList()},getCurrentInputText:()=>{var ee;return(ee=X.current)==null?void 0:ee.getCurrentInputText()}})),N.jsx(R.ConfigProvider,{locale:S2,children:N.jsxs(_2,{value:bt(ae({},e),{popupContainer:W,agentClient:B,footer:g,defaultInput:f,onComment:m,onSessionLoad:I,onSessionUnload:A,onMessage:y,beforeMessageSend:D,bodyStyle:j,disabled:F,transform:H,features:S}),children:[N.jsx(uO.Resizable,{height:(he==null?void 0:he.height)||"100%",width:(he==null?void 0:he.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(a==null?void 0:a.minWidth)],onResize:w,handle:N.jsx("span",{className:"resize-handle-ew"}),resizeHandles:n=="float"?["w"]:[],children:N.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${n} ${k?"opened":"closed"}`,style:bt(ae({},a),{width:n=="float"?he==null?void 0:he.width:a==null?void 0:a.width,height:n==="float"?he==null?void 0:he.height:a==null?void 0:a.height,maxHeight:"100vh"}),ref:W,children:[te?N.jsx("div",{className:"loading",children:N.jsx(R.Spin,{})}):K&&B?N.jsx(une,{children:N.jsx(Ine,{ref:X,appId:K,docViewerUrl:o,bodyStyle:j,sessionId:E})}):null,(r==null?void 0:r.visible)&&N.jsx(R.Button,{className:"trigger-btn close-btn",icon:N.jsx("img",{src:s}),onClick:()=>ze(!1)})]})}),(r==null?void 0:r.visible)&&!k&&N.jsx(R.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:N.jsx("img",{src:s}),onClick:()=>ze(!0)})]})})}),Ane="@glodon-aiot/agent-cli-ui",bne="3.6.2-alpha.16",Ene="./dist/es/index.mjs",jne="./dist/lib/index.js",zne="./dist/src/index.d.ts",Lne={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},wne=["dist"],Cne="module",xne="dist/src/index.d.ts",Sne={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},One={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},vne={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.6.2-alpha.16","@glodon-aiot/bot-client-sdk":"^3.6.2-alpha.16","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","quill-delta":"^5.1.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},kne={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^16.9.0 || ^17.0.0 || ^18.0.0","@types/react-dom":"^16.9.0 || ^17.0.0 || ^18.0.0","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1",react:"^17.0.2","react-dom":"^17.0.2","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},_ne=[">0.2%","not dead","not op_mini all"],Rne=["last 1 chrome version","last 1 firefox version","last 1 safari version"],Yne={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},Une={access:"public",registry:"https://registry.npmjs.org/"},Pne={hooks:{"commit-msg":"validate-commit-msg"}},Qne={name:Ane,version:bne,module:Ene,main:jne,typings:zne,exports:Lne,files:wne,type:Cne,types:xne,scripts:Sne,peerDependencies:One,dependencies:vne,devDependencies:kne,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:_ne,development:Rne,config:Yne,publishConfig:Une,husky:Pne};var Vx=(e=>(e.dev="https://aiot-dev.glodon.com/api/cvforcepd",e.test="https://aiot-dev.glodon.com/api/cvforce",e.prod="https://copilot.glodon.com/api/cvforce",e.local="http://localhost:3000/api/cvforcepd",e))(Vx||{});//! moment.js
319
+ ${a}`)}return a},Tne=z.forwardRef((e,t)=>{var pT,fT,hT,NT,mT,TT,yT,IT,DT,AT,bT,ET,jT,zT;const{application:n,docViewerUrl:r="",currentSession:a,onCreateSession:i,embeddingService:s,setCurrentSession:o,networkStatus:u,setNetworkStatus:l}=e,[c,d]=z.useState([]),[M,g]=z.useState(),[f,m]=z.useState(),I=z.useRef(null),{service:A,agentClient:y,depId:D,footer:j,transform:L,defaultInput:E,onMessage:F,onHistoryLoad:H,beforeMessageSend:S,bodyStyle:v,disabled:B,features:Y,popupContainer:W,icon:te,sider:oe,mode:K}=z.useContext(nn),[Ye,he]=z.useState(!1),be=z.useRef(c),k=z.useRef(void 0),[ze,X]=z.useState(0),[w,ee]=z.useState(),[Ce,De]=z.useState(""),[ne,re]=z.useState(!1),Ae=z.useRef(null),[ce,Ne]=z.useState([]),[ke,we]=z.useState(!1),[Qe,Ze]=z.useState(!1),[Nt,gn]=z.useState(""),[pn,an]=z.useState(),[yr,vr]=z.useState({}),ra=z.useRef(null),hn=z.useRef(null),rr=z.useRef(null),[aa,V]=z.useState(!1),[se,Ee]=z.useState([]),[Pe,nt]=z.useState(!0),[Ut,lt]=z.useState(!0),[He,Lt]=z.useState(!1),[Gn,kt]=z.useState(!1),[ia,Ir]=z.useState(!1),[Dr,js]=z.useState(typeof(Y==null?void 0:Y.promptVariables)=="object"?Y.promptVariables.default||[]:[]),[QS,BS]=z.useState(typeof(Y==null?void 0:Y.knowledges)=="object"&&Y.knowledges.default||void 0),[rT,sa]=z.useState(!1),[aT,zs]=z.useState(!1),[FS,Li]=z.useState(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),[iT,au]=z.useState(!1),[GS,Ca]=z.useState(!1),[HS,WS]=z.useState(null),[iu,ri]=z.useState(!1),[sT,oT]=z.useState(!1),{isSwitchingToExistingSession:uT,setIsSwitchingToExistingSession:su}=Om();z.useEffect(()=>{if(WS(a),a===null)Ca(!1);else if(a===void 0)Ca(!0);else{if(HS===null){if(uT){Ca(!0),su(!1);return}Ca(!1);return}a.ready?Ca(!1):Ca(!0)}},[a,a==null?void 0:a.ready,uT]),z.useEffect(()=>{var _e,Be;a&&(be.current=[]),d([]);const Z=I.current;if(Z&&Z.scrollTo({top:0}),!((_e=a==null?void 0:a.data)!=null&&_e.id))return;if(kt(!1),Lt(!1),(Be=a.messages)!=null&&Be.length){const Ke=[...a.messages.filter(Oe=>Oe==null?void 0:Oe.messageId)].reverse();be.current=[...Ke],d([...Ke]),Ca(!1)}const ie=ge=>{var Ke;(Ke=a==null?void 0:a.data)!=null&&Ke.id&&(be.current=[...ge].reverse(),d([...ge].reverse()),!ge||ge.length<10?zs(!1):zs(!0),Ca(!1),H&&H({applicationId:n.id,sessionId:a.data.id,histories:ge}))};return a.addEventListener("history:loaded",ie),()=>{be.current=[],d([]),a==null||a.removeEventListener("history:loaded",ie)}},[a]),z.useEffect(()=>{const Z=()=>{var ie;(ie=a==null?void 0:a.data)!=null&&ie.id&&(a.promptVariables&&js(a.promptVariables.sort((_e,Be)=>_e.key.localeCompare(Be.key))),a.knowledges&&BS(a.knowledges),l(a.netOpen))};return a==null||a.addEventListener("data:updated",Z),()=>{a==null||a.removeEventListener("data:updated",Z)}},[a]),z.useEffect(()=>{var ie;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))return;const Z=_e=>{var Be;console.error(_e.message,_e.cause,"e.case"),R.notification.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-notification"}),R.notification.error({message:((Be=_e.cause)==null?void 0:Be.message)||_e.message}),R.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return a.addEventListener("error",Z),()=>{a==null||a.removeEventListener("error",Z)}},[a]);const qS=()=>{var _e;if(!((_e=a==null?void 0:a.data)!=null&&_e.id)||!(n!=null&&n.id))return;const Z=a.data.id,ie=c[c.length-1];if(ie&&ie.isContext){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.success("已开启新话题"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else a.clear().then(()=>{const Be=new Bs("",Z,Fe.IHistoryRole.System);Be.isContext=!0,d([Be,...c])})};z.useEffect(()=>{n!=null&&n.id&&(A==null||A.getRecommendQues(n.id).then(Z=>{Ne(Z)}))},[D,n]);const lT=Z=>et(exports,null,function*(){var xa,Sa;if(B){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("发送功能被禁用"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}const ie=Z||M;if(!(ie!=null&&ie.trim())){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("请输入你想问的"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!(Dr==null?void 0:Dr.every(sn=>!!(sn!=null&&sn.value))))if(L!=null&&L.promptVariables){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("变量值不能为空"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else console.error("变量值不能为空",Dr==null?void 0:Dr.map(sn=>!!(sn!=null&&sn.value)));if(Gn){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在回复中"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(Ye){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("等待初始化"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Pe){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在解析文件"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(ne){R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("正在上传图片"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}ee(void 0),De("");const Be=(xa=a==null?void 0:a.data)==null?void 0:xa.id;if(!Be){if(iu)return;ri(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(sn=>{var br,Ls;sa(!0),l(!!((br=sn.data)!=null&&br.netOpen)),Li(!!((Ls=sn.data)!=null&&Ls.enableNetOpen)),ou(sn).then(()=>{o==null||o(sn),sa(!1),m(ie)})}).catch(sn=>{ri(!1)});return}if(iu)return;ri(!0),au(!0);const ge=Ef(ie,Ce,yr[Be],(n==null?void 0:n.type)||0);let Ke;try{S?Ke=yield S==null?void 0:S({applicationId:n.id,sessionId:Be,message:{content:ge,sessionId:Be,role:Fe.ChatMessageRole.User,files:yr[Be]}}):Ke=!0}catch(sn){Ke=!1}if(au(!1),Ke===!1){ri(!1);return}let Oe=ie;typeof Ke=="object"&&(Oe=Ke.content||ie);const Nn=yield(()=>new Promise(sn=>{js(br=>(sn(br),br))}))();if(!(yield a.setPromptVariables(Nn))){ri(!1);return}((Sa=yr[Be])==null?void 0:Sa.length)>0?$S(Oe):Ic(Oe)}),ou=Z=>new Promise((ie,_e)=>et(exports,null,function*(){const Ke=(Z==null?void 0:Z.promptVariables).filter(Oe=>Oe.type?!((Oe.type===Fe.PromptVariableType.User||Oe.type===void 0)&&Oe.key==="query")&&!((Oe.type===Fe.PromptVariableType.System||Oe.type===void 0)&&Oe.key==="datetime"):Oe.key!=="query").map(Oe=>{var Nn;const Pt=(Nn=Dr.find(Ar=>Ar.key===Oe.key&&Ar.type===Oe.type))==null?void 0:Nn.value;return Oe.value=Pt||"",Oe});js(Ke.sort((Oe,Pt)=>Oe.key.localeCompare(Pt.key))),yield Z==null?void 0:Z.setPromptVariables(Ke).catch(Oe=>{console.error(Oe),R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error(Oe.message),R.message.config({getContainer:void 0,prefixCls:"gbot-message"})}),ie()})),$S=Z=>{var ge,Ke,Oe;if(nt(!1),!((ge=a==null?void 0:a.data)!=null&&ge.id)||!(n!=null&&n.id))return;const ie=((Ke=a.data)==null?void 0:Ke.id)||"";let _e=[],Be=new Set;(Oe=yr[ie])==null||Oe.forEach(Pt=>{Be.has(Pt.id)||(_e.push(Pt),Be.add(Pt.id))}),nt(!0),Ic(Z,_e)};z.useEffect(()=>{if(!f||!a)return;const Z=f,ie=()=>et(exports,null,function*(){au(!0);const _e=Ef(Z,Ce,yr[a.id],(n==null?void 0:n.type)||0);let Be;try{S?Be=yield S==null?void 0:S({applicationId:n.id,sessionId:a.id,message:{content:_e,sessionId:a.id,role:Fe.ChatMessageRole.User,files:yr[a.id]}}):Be=!0}catch(ge){Be=!1}if(au(!1),Be===!1){ri(!1);return}Ic(Z),m(void 0)});return a.ready?ie():a.addEventListener("ready",ie,!0),()=>{a==null||a.removeEventListener("ready",ie)}},[f,a]);const Ic=(Z,ie)=>et(exports,null,function*(){var xa,Sa,sn;const _e=(xa=a==null?void 0:a.data)==null?void 0:xa.id;if(!_e)return;kt(!0),Lt(!0);const Be=Ef(Z,Ce,ie,(n==null?void 0:n.type)||0);let ge;n.type===Fe.ApplicationTypes.Agent?ge=void 0:n.type===Fe.ApplicationTypes.Dialog&&((Sa=n.arrange)!=null&&Sa.length)&&n.arrange[0].visionOpen?ge=Ce?[Ce]:void 0:ge=void 0;const Ke=new Bs(Be,_e,Fe.IHistoryRole.User,ie,ge);g(void 0),an(void 0),be.current=[Ke,...c],d(be.current),n.id&&F&&F({applicationId:n.id,sessionId:_e,message:Ke});const Oe=new Bs("",_e,Fe.IHistoryRole.System);Oe.isWaiting=!0,be.current=[Oe,...be.current],d(be.current);const Pt=(ie==null?void 0:ie.map(br=>br.id))||[],Nn={stream:Hs.configuration.stream,referenceFirst:!1};if(L!=null&&L.promptVariables){const br=Dr==null?void 0:Dr.reduce((Ls,LT)=>(Ls[LT.key]=LT.value,Ls),{});Nn.formatValues=br}if(L!=null&&L.knowledges){const br=QS;Nn.knowledges=br}const Ar={text:Be,fileIds:Pt,files:ie};ge&&ge.length>0&&(Ar.imageContent=ge),yield a.send(Ar,Nn),vr({[_e]:[]}),(sn=ra.current)==null||sn.update(),ri(!1)});z.useEffect(()=>{var Be;const Z=(Be=a==null?void 0:a.data)==null?void 0:Be.id;if(!Z)return;const ie=ge=>{if(!ge.sessionId||ge.sessionId&&ge.sessionId!==k.current||ge.role===Fe.IHistoryRole.User)return;if(ge.index===-1&&ge.code!==200&&ge.code!==11915&&(Lt(!1),kt(!1),be.current=be.current.filter(Pt=>!Pt.isWaiting),d([...be.current]),be.current=[...be.current],ge.content)){R.notification.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-notification"}),R.notification.error({message:ge.content}),R.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const Ke=ge.actions||[],Oe=new Bs(ge.content,Z,Fe.IHistoryRole.Robot);Oe.messageId=ge.messageId||po.v4(),Oe.reasoningContent=ge.reasoningContent,Oe.searchReference=ge.searchReference,Oe.thinkingSecs=ge.thinkingSecs,Oe.thinkingStatus=ge.thinkingStatus,Oe.actions=Ke,Oe.isLoading=!0,Oe.searchingStatus=ge.searchingStatus,be.current=be.current.filter(Pt=>!Pt.isWaiting).filter(Pt=>!Pt.isReplying),ge.index===void 0&&d([Oe,...be.current]),ge.code===11915&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.content="请您换个问题问我吧~",Oe.isSensitive=!0,d([Oe,...be.current])),ge.index===-2&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.content="回答已中止~",Oe.isSuspend=!0,d([Oe,...be.current])),ge.index===-1&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.reference=ge.reference,d([Oe,...be.current]),n.id&&F&&F({applicationId:n.id,sessionId:Z,message:Oe})),ge.index===-3&&(Lt(!1),kt(!1),Oe.isLoading=!1,Oe.reference=ge.reference,Oe.relatedQuesion=ge.relatedQuesion,d([Oe,...be.current]))},_e=()=>{a.addEventListener("message:updated",ie)};return a.ready?a.addEventListener("message:updated",ie):a.addEventListener("ready",_e),()=>{a==null||a.removeEventListener("message:updated",ie),a==null||a.removeEventListener("ready",_e)}},[a]),z.useEffect(()=>{if(!a){he(!1);return}const Z=ie=>{he(ie)};return he(a.frozen),a.addEventListener("frozen",Z),()=>{a==null||a.removeEventListener("frozen",Z)}},[a]),z.useEffect(()=>{if(!y)return;const Z=y.questionContextMaxLength||4e3;X(Z)},[y,A]),z.useEffect(()=>{E&&an(E.text)},[E]);const VS=Z=>{const ie=Z.size;return ie<=0?(R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("该文件为空,请重新上传"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):ie>20*Vu?(R.message.config({getContainer:()=>(W==null?void 0:W.current)||document.body,prefixCls:"gbot-message"}),R.message.error("图片须小于20M"),R.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):(ee(Z),!1)},ZS=Z=>et(exports,null,function*(){var ie;return ee(Z),(ie=a==null?void 0:a.data)!=null&&ie.id?cT(a,Z):new Promise(_e=>{sa(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(Be=>{var ge,Ke;o==null||o(Be),sa(!1),l(!!((ge=Be.data)!=null&&ge.netOpen)),Li(!!((Ke=Be.data)!=null&&Ke.enableNetOpen)),ou(Be),_e(cT(Be,Z))})})}),cT=(Z,ie)=>{const _e=vte(ie.name);return new Promise(Be=>{var Ke;const ge={files:[`${po.v4()}.${_e}`],isv:"minio",knowledgeId:((Ke=Z.data)==null?void 0:Ke.id)||"",type:1};re(!0),A==null||A.postTicket(ge).then(Oe=>{A.uploadMinioFile(Oe.minio,ie).then(()=>{var xa,Sa;const Pt=(xa=Oe.minio.endpoints)==null?void 0:xa[0],Nn=Oe.minio.bucket,Ar=(Sa=Oe.minio.fileKeys)==null?void 0:Sa[0];Be(`${location.protocol}//${Pt}/${Nn}/${Ar}`)}).catch(()=>{De(""),ee(void 0)}).finally(()=>{re(!1)})}).catch(()=>{De(""),ee(void 0),re(!1)})})};z.useEffect(()=>{const Z=I.current;Z&&!ia&&Z.scrollTo({top:Z.scrollHeight})},[c]);const dT=(Z,ie)=>new Promise(_e=>{if(!ie.file.url||!(n!=null&&n.id))return _e();const Be=bt(ae({},ie.file),{type:1});A==null||A.postApplicationIdSessionKnowledgeSessionFile(n==null?void 0:n.id,Z,Be).finally(()=>{var ge;(ge=ra.current)==null||ge.update().finally(_e)})}),XS=()=>{var Z;(Z=a==null?void 0:a.data)!=null&&Z.id&&(Lt(!1),a.suspend())},JS=Z=>{const ie=I.current;ie&&setTimeout(()=>{ie.scrollTo({top:ie.scrollHeight,behavior:Z==null?void 0:Z.behavior})},Z==null?void 0:Z.ms)},KS=()=>{if(!I.current)return;const Z=I.current.scrollTop<=-80;Ir(Z)},eO=Hr.useMemoizedFn(Z=>{var ie,_e;(ie=Ae.current)==null||ie.update(Z),(_e=Ae.current)==null||_e.focus()}),tO=Hr.useMemoizedFn(Z=>{lT(Z)}),nO=Hr.useMemoizedFn(()=>{var ie;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))return;be.current=[...c.slice(1,c.length)],d(be.current);const Z=new Bs("",a.data.id,Fe.IHistoryRole.System);Z.isWaiting=!0,be.current=[Z,...be.current],d(be.current),kt(!0),Lt(!0),a.answerAgain()});z.useEffect(()=>{var Z,ie;k.current=(Z=a==null?void 0:a.data)==null?void 0:Z.id,!rT&&((ie=rr.current)==null||ie.clear())},[a]);const rO=()=>{var _e;if(!((_e=a==null?void 0:a.data)!=null&&_e.id))return;const ie=c[c.length-1].messageTime;a.fetchMessages({endTime:ie,pageSize:y2}).then(Be=>{const ge=Be||[];if(!ge||!(ge!=null&&ge.length)){zs(!1);return}ge.length<10?zs(!1):zs(!0),d([...c,...ge.reverse()])})},aO=Z=>et(exports,null,function*(){var ie,_e;if(!((ie=a==null?void 0:a.data)!=null&&ie.id))l(Z);else{if(yield a.setNetOpen(Z),!((_e=a.data)!=null&&_e.id))return;l(Z)}}),Dc=()=>et(exports,null,function*(){a?a.fetchData().then(Z=>{var ie;(ie=a==null?void 0:a.data)!=null&&ie.id&&(l(Z.netOpen),Li(Z.enableNetOpen))}):(l(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),Li(n.arrange[0].enableNetOpen))});z.useEffect(()=>{Dc()},[a]),z.useEffect(()=>{requestAnimationFrame(()=>{var ie,_e;if(I.current){const Be=document.getElementById("chat-main"),ge=(ie=I.current)==null?void 0:ie.querySelector(".infinite-scroll-component__outerdiv"),Ke=(_e=I.current)==null?void 0:_e.querySelector(".infinite-scroll-component");if(!ge||!Ke||!Be)return;const Oe=Be.offsetHeight;if(Ke.offsetHeight<=Oe){if(ge.style.height==="100%")return;ge.style.height="100%"}else{if(ge.style.height==="auto")return;ge.style.height="auto"}}})},[c]),z.useEffect(()=>{if(a)return;const Z=()=>{const Be=((y==null?void 0:y.promptVariables)||[]).filter(ge=>ge.type?!(ge.type===Fe.PromptVariableType.User&&ge.key==="query")&&!(ge.type===Fe.PromptVariableType.System&&ge.key==="datetime")&&ge.status===1:ge.key!=="query"&&ge.status===1).map((ge,Ke)=>{var Pt,Nn;let Oe="";return typeof(Y==null?void 0:Y.promptVariables)=="object"&&(Oe=((Nn=(Pt=Y.promptVariables.default)==null?void 0:Pt.find(Ar=>Ar.key===ge.key&&Ar.type===ge.type))==null?void 0:Nn.value)||""),{id:Ke+"",key:ge.key,name:ge.name,value:Oe,type:ge.type}});js([...Be].sort((ge,Ke)=>ge.key.localeCompare(Ke.key)))};return y!=null&&y.ready?Z():y==null||y.addEventListener("ready",Z),()=>{y==null||y.removeEventListener("ready",Z)}},[a,y,Y==null?void 0:Y.promptVariables]);const MT=()=>i==null?void 0:i({netOpen:u?_r.OPEN:_r.CLOSE}).then(Z=>{var ie,_e;return o==null||o(Z),sa(!1),l(!!((ie=Z.data)!=null&&ie.netOpen)),Li(!!((_e=Z.data)!=null&&_e.enableNetOpen)),ou(Z),Z}),gT=z.useMemo(()=>{var Z;return n.arrange&&((Z=n.arrange[0])!=null&&Z.openingContent)?N.jsx(Qx,{application:n,history:{role:1,content:n.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:fn(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:!!c.length,markdown:Y==null?void 0:Y.markdown}):null},[n==null?void 0:n.arrange,c]);return z.useImperativeHandle(t,()=>({getCurrentInputText:()=>{var Z;return(Z=Ae.current)==null?void 0:Z.getCurrentText()}})),z.useEffect(()=>{var ie;const Z=(ie=a==null?void 0:a.data)==null?void 0:ie.id;Z&&vr(_e=>bt(ae({},_e),{[Z]:[]}))},[(pT=a==null?void 0:a.data)==null?void 0:pT.id]),N.jsxs("div",{className:"agent-chat",children:[GS?N.jsx("div",{className:"session-loading",children:N.jsx(R.Spin,{})}):N.jsxs(N.Fragment,{children:[(L==null?void 0:L.promptVariables)&&N.jsx(Hx,{ref:hn,appId:n.id,currentSession:a,promptVariables:Dr,setPromptVariables:js,setCurrentSession:o}),N.jsxs("div",{className:"chat-main",id:"chat-main",style:v,children:[N.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:I,onScroll:KS,children:(fT=a==null?void 0:a.data)!=null&&fT.id&&(c!=null&&c.length)?N.jsxs(dO,{dataLength:c.length,next:rO,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:c.length>y2&&((hT=I.current)!=null&&hT.scrollTop)&&((NT=I.current)==null?void 0:NT.scrollTop)<-10?N.jsx(R.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:aT,loader:N.jsx("div",{style:{height:"50px",textAlign:"center",overflow:"hidden"},children:N.jsx(R.Spin,{})}),scrollableTarget:"scrollableDiv",children:[c.map((Z,ie)=>N.jsx(mne,{application:n,currentSession:a,history:Z,docViewerUrl:r,isLastHistory:ie===0,onRelatedClick:tO,onAgainClick:nO,onEditClick:eO,markdown:Y==null?void 0:Y.markdown},Z.messageId+ie)),!aT&&gT]}):N.jsxs("div",{className:"main-empty",children:[(Y==null?void 0:Y.greeting)!==!1&&N.jsx(Jte,{text:Y!=null&&Y.greeting&&typeof Y.greeting=="object"&&Y.greeting.text!==void 0?Y.greeting.text:(mT=n.arrange)!=null&&mT.length&&((TT=n.arrange[0])!=null&&TT.greetings)?n.arrange[0].greetings:T2.text,icon:Y===void 0||Y.greeting===!0||((yT=Y.greeting)==null?void 0:yT.icon)===void 0?te||T2.icon:Y.greeting.icon,children:!!ce.length&&(((Y==null?void 0:Y.greeting)===void 0||(Y==null?void 0:Y.greeting))===!0||typeof(Y==null?void 0:Y.greeting)=="object"&&Y.greeting.questions!==!1)&&N.jsx(Fx,{ref:rr,sid:(IT=a==null?void 0:a.data)==null?void 0:IT.id,isRecommendClearing:ke,data:ce,layoutBreakpoints:typeof(Y==null?void 0:Y.greeting)=="object"?Y.greeting.layoutBreakpoints:void 0,onItemClick:Z=>{var _e,Be,ge;if(g(Z==null?void 0:Z.question),an(Z==null?void 0:Z.question),ke)return;Z!=null&&Z.id&&we(!0);const ie=(_e=a==null?void 0:a.data)==null?void 0:_e.id;L!=null&&L.fileUpload?(ge=(Be=ra.current)==null?void 0:Be.clear())==null||ge.then(()=>{var Ke,Oe;Z!=null&&Z.id&&(ie?(Ke=dT(ie,Z))==null||Ke.finally(()=>{we(!1)}):(we(!1),sa(!0),(Oe=MT())==null||Oe.then(Pt=>{var Nn;(Nn=dT(Pt.id,Z))==null||Nn.finally(()=>{we(!1)})})))}):ie?we(!1):(we(!1),sa(!0),MT())}})}),gT]})}),He&&N.jsx("div",{className:"session-stop",children:N.jsx(R.Button,{type:"primary",style:{background:"white"},ghost:!0,size:"small",icon:N.jsx(ct,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>XS(),children:"停止回答"})}),ia&&(c==null?void 0:c.length)>0&&N.jsx("div",{className:"back-bottom",children:N.jsx(R.Button,{size:"small",onClick:()=>JS({behavior:"smooth"}),type:"link",icon:N.jsx(ct,{type:"icon-yijianhuidaodibu",style:{fontSize:24}})})})]}),N.jsx("div",{className:"chat-footer",children:N.jsxs("div",{className:"chat-footer-input",children:[w&&N.jsx("div",{className:"input-files",children:N.jsx(Vte,{file:w,actions:{upload:ZS,remove:()=>{De(""),ee(void 0)}},onUrlChange:Z=>De(Z)})}),N.jsxs(R.Space,{className:"footer-upload-action",onClick:Z=>Z.preventDefault(),children:[N.jsxs(R.Space,{children:[(n.type===Fe.ApplicationTypes.Agent&&(L==null?void 0:L.imageUpload)||n.type===Fe.ApplicationTypes.Dialog&&((DT=n.arrange)==null?void 0:DT.length)&&!!n.arrange[0].visionOpen&&(L==null?void 0:L.imageUpload))&&N.jsx(R.Upload,{disabled:!!w||B,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:VS,className:"footer-upload-picture",showUploadList:!1,children:w?N.jsx(R.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!!w||B,icon:N.jsx(At.CameraOutlined,{className:"icon-tianjia",style:{fontSize:"22px"}})}):N.jsx(R.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:N.jsx("div",{children:"支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"}),children:N.jsx(R.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:N.jsx(ct,{type:"icon-Vector",className:"icon-tianjia",style:{fontSize:"22px"}})})})}),s&&(L!=null&&L.fileUpload)&&(n!=null&&n.id)?N.jsx(Gx,{appId:n==null?void 0:n.id,ref:ra,isFirstSession:rT,docViewerUrl:r,onStatusChange:Z=>et(exports,null,function*(){Z!=="process"?(nt(!0),Dc()):nt(!1)}),createSession:()=>new Promise(Z=>{sa(!0),i==null||i({netOpen:u?_r.OPEN:_r.CLOSE}).then(ie=>{var Be,ge,Ke;o==null||o(ie),sa(!1),l(!!((Be=ie.data)!=null&&Be.netOpen)),Li(!!((ge=ie.data)!=null&&ge.enableNetOpen)),ou(ie);const _e=((Ke=ie.data)==null?void 0:Ke.id)||"";Z(_e)})}),sid:(AT=a==null?void 0:a.data)==null?void 0:AT.id,disabled:Gn||B,afterFileAdd:(Z,ie)=>{ie&&vr(_e=>{const Be=_e[ie]||[];return{[ie]:[...Be,Z]}})},afterFileDelete:Z=>{var _e;const ie=(_e=a==null?void 0:a.data)==null?void 0:_e.id;ie&&vr(Be=>{const ge=Be[ie]||[];return{[ie]:ge.filter(Ke=>Ke.id!==Z)}})},onFileListChange:Z=>{Ee(Z)},shouldContinue:Ut,afterFilesClear:()=>{var ie;const Z=(ie=a==null?void 0:a.data)==null?void 0:ie.id;Z&&(vr({[Z]:[]}),Dc())}}):null,(L==null?void 0:L.prompt)&&(n==null?void 0:n.id)&&N.jsx(Nne,{appId:n.id,list:[],search:Qe?Nt:"",onPromptSelect:Z=>{an(Z.context),g(Z.context)},disabled:B})]}),N.jsxs(R.Space,{children:[(L==null?void 0:L.connectNetwork)&&n.type===Fe.ApplicationTypes.Dialog&&((bT=n.arrange)==null?void 0:bT.length)&&!!n.arrange[0].enableNetOpen&&N.jsx(dne,{sessionId:(ET=a==null?void 0:a.data)==null?void 0:ET.id,netStatus:u,enable:typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.diabled)=="boolean"?!(Y!=null&&Y.connectNetwork.diabled):FS,disabledTip:a?void 0:"网络访问已被禁用",onNetStatusChange:Z=>{aO(Z)}}),(L==null?void 0:L.sessionList)&&N.jsx(one,{currentSessionId:(jT=a==null?void 0:a.data)==null?void 0:jT.id,onSessionChange:(Z,ie)=>{an(void 0),su(!0),o==null||o(ie)},disabled:B}),oe&&K==="float"&&N.jsx("div",{className:"session-history-drawer-component",children:N.jsx(R.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:Z=>Z.parentNode,content:"会话历史记录",children:N.jsx(R.Button,{className:"history-overlay-action",disabled:B,type:"text",icon:N.jsx(ct,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>oT(!0)})})}),(L==null?void 0:L.sessionOpen)&&N.jsx(R.Button,{icon:N.jsx(At.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:He||!a||!c.length||B,onClick:()=>{var Z,ie;su(!1),o==null||o(null),l(!1),(Z=hn.current)==null||Z.clear(),(ie=rr.current)==null||ie.clear()},children:"新会话"})]})]}),N.jsx("div",{className:"footer-textarea",children:N.jsx(Bx,{ref:Ae,maxLength:ze,text:pn,networkStatus:!1,loading:iT||iu,disabled:Ye||ne||B||iT||iu,onTextSend:lT,onChange:(Z,ie)=>{an(Z);const _e=ie.getText().replace(/[\n\s]+$/,"");g(_e),gn(_e),Qe||Ze(!0)},clearAction:N.jsx(R.Space,{size:0,children:N.jsx(R.Button,{type:"link",disabled:Gn||B,ghost:!0,icon:N.jsx(ct,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>qS()})})})})]})}),N.jsx(ene,{tips:j}),aa&&N.jsx(rne,{isvisible:aa,files:se,sessionId:(zT=a==null?void 0:a.data)==null?void 0:zT.id,onClose:Z=>{V(!1),lt(!1)}})]}),sT&&N.jsx(cne,{currentSession:a,application:n,networkStatus:u,setCurrentSession:o,disabled:B,isSessionHistoryVisible:sT,setIsSessionHistoryVisible:oT,onSessionChange:Z=>{su(!0)}})]})});const $x=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:a,onSelectChange:i}=e,[s,o]=z.useState(!1),u=N.jsx(R.Checkbox.Group,{style:{width:"100%"},onChange:i,value:n,disabled:t,children:N.jsx(R.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>N.jsx(R.Col,{span:24,children:N.jsx(R.Checkbox,{value:c.id,children:c.name})},c.id))})}),l=c=>{o(c)};return N.jsx("div",{className:"knowledge-select",style:{borderColor:s?"#9C24F2":"#84868C"},children:N.jsx(R.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:u,trigger:"click",overlayStyle:{width:280},onOpenChange:l,getPopupContainer:c=>c.parentNode,children:N.jsxs("div",{className:"",onClick:c=>c.preventDefault(),children:[N.jsx(ct,{className:"select-icon",type:"icon-open"}),N.jsx("span",{className:"title",children:"参考知识库"}),N.jsxs("span",{className:"content",children:["已选 ",a," 个"]})]})})})},yne=e=>{var I,A;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:a,transform:i,features:s}=z.useContext(nn),[o,u]=z.useState([]),[l,c]=z.useState(typeof(s==null?void 0:s.knowledges)=="object"?((I=s.knowledges.default)==null?void 0:I.map(y=>y.id))||[]:[]),[d,M]=z.useState(0),[g,f]=z.useState(!1);z.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const j=y[0].knowledges||[];u(j);const L=typeof(s==null?void 0:s.knowledges)=="object"&&s.knowledges.default||j;if(!t){c(L.map(F=>F.id)),M(L.length),r==null||r(L);return}const E=()=>{const F=t.knowledges||L;M(F.length);const H=F.map(S=>S.id);c(H)};return E(),t.addEventListener("data:updated",E),()=>{t==null||t.removeEventListener("data:updated",E)}},[n,t]),z.useEffect(()=>{var D;if(!g||(f(!1),!(n!=null&&n.id)))return;const y=[];l==null||l.map(j=>{const L=o==null?void 0:o.find(E=>E.id===j);y.push(L)}),(D=t==null?void 0:t.data)!=null&&D.id&&t.setKnowledges(y)},[g]);const m=y=>{f(!0),c(y);const D=[];y==null||y.map(j=>{const L=o==null?void 0:o.find(E=>E.id===j);D.push(L)}),r==null||r(D),M(y.length)};return N.jsxs("div",{className:"chat-header",children:[N.jsxs(R.Space,{className:"header-title",children:[a==="inlay"&&((A=t==null?void 0:t.data)==null?void 0:A.name),a==="float"&&(n==null?void 0:n.name)]}),(i==null?void 0:i.knowledges)&&o.length!==0&&N.jsx($x,{disabled:typeof(s==null?void 0:s.knowledges)=="object"&&(s==null?void 0:s.knowledges.diabled)||!1,checkedValues:l,currKnowledgeList:o,selectCount:d,onSelectChange:m})]})};const Ine=z.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:a}=e,[i,s]=z.useState(),{showHeader:o,agentClient:u,sider:l,onSessionLoad:c,features:d,mode:M}=z.useContext(nn),[g,f]=z.useState(),m=z.useRef(null),[I,A]=z.useState(""),[y,D]=z.useState(),j=z.useRef(null),[L,E]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:F}=Om();z.useEffect(()=>{var S;E(i?!!((S=i.data)!=null&&S.netOpen):typeof(d==null?void 0:d.connectNetwork)=="object"&&typeof(d==null?void 0:d.connectNetwork.default)=="boolean"?d.connectNetwork.default:!1)},[i]),z.useEffect(()=>{const S=()=>et(exports,null,function*(){const v=u==null?void 0:u.application;if(!(v!=null&&v.id))return;const B=v==null?void 0:v.arrange;if(!(B!=null&&B.length))return;const W=B[0].embeddingService;A(W),f(v)});if(u!=null&&u.ready){S();return}return u==null||u.addEventListener("ready",()=>S()),()=>{u==null||u.removeEventListener("ready",S)}},[u]),z.useEffect(()=>{u&&n&&(u.ready?u==null||u.getSessions().then(S=>et(exports,null,function*(){s==null||s(S.find(v=>v.id===n))})):u.addEventListener("ready",()=>et(exports,null,function*(){u==null||u.getSessions().then(S=>et(exports,null,function*(){s==null||s(S.find(v=>v.id===n))}))}),!0))},[u,n]),z.useEffect(()=>{if(!i){c&&c({applicationId:r,sessionId:"",session:null,sessionInstance:null});return}i.data&&c&&c({applicationId:r,sessionId:i.data.id,session:i.data,sessionInstance:i}),i.addEventListener("data:loaded",()=>{i!=null&&i.data&&c&&c({applicationId:r,sessionId:i.data.id,session:i.data,sessionInstance:i})},!0)},[i]);const H=S=>{var v;return(v=m.current)==null?void 0:v.create(bt(ae({},S),{knowledges:y}))};return z.useImperativeHandle(t,()=>({createSession:S=>H(S),getSessionList:()=>{var v;const S=((v=m.current)==null?void 0:v.list())||[];return Promise.resolve(S)},getCurrentInputText:()=>{var S;return(S=j.current)==null?void 0:S.getCurrentInputText()}})),N.jsx("div",{className:"dialog",children:N.jsxs("div",{className:"dialog-pannel",children:[N.jsx("div",{className:"dialog-sider",style:{display:l&&M==="inlay"?"block":"none"},children:N.jsx(vm,{ref:m,appId:r,networkStatus:L,currentSession:i,application:g,setCurrentSession:s,checkKnowledges:y,setCheckKnowledges:o?D:void 0,sessionId:n,afterSessionClick:S=>{var v,B;((v=S.data)==null?void 0:v.id)!==((B=i==null?void 0:i.data)==null?void 0:B.id)&&F(!0)}})}),N.jsx("div",{className:"dialog-content",children:N.jsxs("div",{className:"dialog-chat",children:[o&&N.jsx("div",{className:"dialog-chat-header",children:N.jsx(yne,{setCheckKnowledges:D,application:g,currentSession:i})}),N.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&N.jsx(Tne,{setNetworkStatus:E,networkStatus:L,application:g,currentSession:i,onCreateSession:H,docViewerUrl:a,embeddingService:I,setCurrentSession:s,ref:j})})]})})]})})}),Dne=z.forwardRef((e,t)=>{const{className:n,triggerButton:r,size:a,theme:i,icon:s,docViewerUrl:o,token:u,debug:l,env:c,plugins:d,mcp:M,footer:g,defaultInput:f,onComment:m,onSessionLoad:I,onSessionUnload:A,onMessage:y,beforeMessageSend:D,bodyStyle:j,apiUrl:L,sessionId:E,disabled:F,transform:H,features:S,stream:v,agentClient:B,application:Y}=e,W=z.useRef(null),[te,oe]=z.useState(!1),[K,Ye]=z.useState(),[he,be]=z.useState(a),[k,ze]=z.useState(e.open),X=z.useRef(null);z.useEffect(()=>{Y&&(console.log("[AgentClientUI] token",B,Y),Ye(Y.id))},[Y]),R.ConfigProvider.config({theme:i}),z.useEffect(()=>{a&&be(a)},[a]);const w=(ee,{element:Ce,size:De})=>{be({width:Number(De.width),height:De.height})};return z.useImperativeHandle(t,()=>({createSession:ee=>{var Ce;return(Ce=X.current)==null?void 0:Ce.createSession(ee)},getSessionList:()=>{var ee;return(ee=X.current)==null?void 0:ee.getSessionList()},getCurrentInputText:()=>{var ee;return(ee=X.current)==null?void 0:ee.getCurrentInputText()}})),N.jsx(R.ConfigProvider,{locale:S2,children:N.jsxs(_2,{value:bt(ae({},e),{popupContainer:W,agentClient:B,footer:g,defaultInput:f,onComment:m,onSessionLoad:I,onSessionUnload:A,onMessage:y,beforeMessageSend:D,bodyStyle:j,disabled:F,transform:H,features:S}),children:[N.jsx(uO.Resizable,{height:(he==null?void 0:he.height)||"100%",width:(he==null?void 0:he.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(a==null?void 0:a.minWidth)],onResize:w,handle:N.jsx("span",{className:"resize-handle-ew"}),resizeHandles:n=="float"?["w"]:[],children:N.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${n} ${k?"opened":"closed"}`,style:bt(ae({},a),{width:n=="float"?he==null?void 0:he.width:a==null?void 0:a.width,height:n==="float"?he==null?void 0:he.height:a==null?void 0:a.height,maxHeight:"100vh"}),ref:W,children:[te?N.jsx("div",{className:"loading",children:N.jsx(R.Spin,{})}):K&&B?N.jsx(une,{children:N.jsx(Ine,{ref:X,appId:K,docViewerUrl:o,bodyStyle:j,sessionId:E})}):null,(r==null?void 0:r.visible)&&N.jsx(R.Button,{className:"trigger-btn close-btn",icon:N.jsx("img",{src:s}),onClick:()=>ze(!1)})]})}),(r==null?void 0:r.visible)&&!k&&N.jsx(R.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:N.jsx("img",{src:s}),onClick:()=>ze(!0)})]})})}),Ane="@glodon-aiot/agent-cli-ui",bne="3.6.2-alpha.17",Ene="./dist/es/index.mjs",jne="./dist/lib/index.js",zne="./dist/src/index.d.ts",Lne={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},wne=["dist"],Cne="module",xne="dist/src/index.d.ts",Sne={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},One={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},vne={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.6.2-alpha.17","@glodon-aiot/bot-client-sdk":"^3.6.2-alpha.17","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","quill-delta":"^5.1.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},kne={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^16.9.0 || ^17.0.0 || ^18.0.0","@types/react-dom":"^16.9.0 || ^17.0.0 || ^18.0.0","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1",react:"^17.0.2","react-dom":"^17.0.2","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},_ne=[">0.2%","not dead","not op_mini all"],Rne=["last 1 chrome version","last 1 firefox version","last 1 safari version"],Yne={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},Une={access:"public",registry:"https://registry.npmjs.org/"},Pne={hooks:{"commit-msg":"validate-commit-msg"}},Qne={name:Ane,version:bne,module:Ene,main:jne,typings:zne,exports:Lne,files:wne,type:Cne,types:xne,scripts:Sne,peerDependencies:One,dependencies:vne,devDependencies:kne,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:_ne,development:Rne,config:Yne,publishConfig:Une,husky:Pne};var Vx=(e=>(e.dev="https://aiot-dev.glodon.com/api/cvforcepd",e.test="https://aiot-dev.glodon.com/api/cvforce",e.prod="https://copilot.glodon.com/api/cvforce",e.local="http://localhost:3000/api/cvforcepd",e))(Vx||{});//! moment.js
320
320
  //! version : 2.30.1
321
321
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
322
322
  //! license : MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glodon-aiot/agent-cli-ui",
3
- "version": "3.6.2-alpha.16",
3
+ "version": "3.6.2-alpha.17",
4
4
  "module": "./dist/es/index.mjs",
5
5
  "main": "./dist/lib/index.js",
6
6
  "typings": "./dist/src/index.d.ts",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@ant-design/icons": "^5.3.4",
40
- "@glodon-aiot/apis": "^3.6.2-alpha.16",
41
- "@glodon-aiot/bot-client-sdk": "^3.6.2-alpha.16",
40
+ "@glodon-aiot/apis": "^3.6.2-alpha.17",
41
+ "@glodon-aiot/bot-client-sdk": "^3.6.2-alpha.17",
42
42
  "@matejmazur/react-mathjax": "^0.1.10",
43
43
  "@react-pdf-viewer/core": "^3.12.0",
44
44
  "@react-pdf-viewer/default-layout": "^3.12.0",