pcm-agents 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{components-chat-message_34.cjs.entry.js → components-chat-message_33.cjs.entry.js} +3580 -5510
- package/dist/cjs/components-chat-message_33.cjs.entry.js.map +1 -0
- package/dist/cjs/components-oem-virtual-chat-modal.cjs.entry.js +1829 -0
- package/dist/cjs/components-oem-virtual-chat-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/components-oem-virtual-chat-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/{conversation-utils-CtqfWyjk.js → conversation-utils-srlCwYy5.js} +3 -3
- package/dist/cjs/{conversation-utils-CtqfWyjk.js.map → conversation-utils-srlCwYy5.js.map} +1 -1
- package/dist/cjs/{index-DjwiIxrh.js → index-CJQRBB6e.js} +3 -3
- package/dist/cjs/{index-DjwiIxrh.js.map → index-CJQRBB6e.js.map} +1 -1
- package/dist/cjs/index-C_qhED9Z.js +10 -6
- package/dist/cjs/{message-utils-DbTqMOA1.js → index-D5RimYc5.js} +2 -23
- package/dist/cjs/index-D5RimYc5.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/message-utils-C8eJnzLy.js +26 -0
- package/dist/cjs/message-utils-C8eJnzLy.js.map +1 -0
- package/dist/cjs/oem-cast-modal.cjs.entry.js +23 -5
- package/dist/cjs/oem-cast-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/oem-cast-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jd-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jlzz-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
- package/dist/cjs/{pcm-mnms-modal.cjs.entry.js → oem-mnms-modal.cjs.entry.js} +157 -42
- package/dist/cjs/oem-mnms-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/oem-mnms-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +2 -2
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +1 -1
- package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +24 -23
- package/dist/cjs/pcm-jlsx-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-jlsx-modal.entry.cjs.js.map +1 -1
- package/dist/collection/components/oem-cast-modal/cast-data.js.map +1 -1
- package/dist/collection/components/oem-cast-modal/oem-cast-modal.css +844 -534
- package/dist/collection/components/oem-cast-modal/oem-cast-modal.js +25 -5
- package/dist/collection/components/oem-cast-modal/oem-cast-modal.js.map +1 -1
- package/dist/components/components-chat-message.js +1 -1
- package/dist/components/components-digital-human.js +1 -1
- package/dist/components/components-export-records-modal.js +1 -1
- package/dist/components/components-mobile-input-btn.js +1 -1
- package/dist/components/components-mobile-upload-btn.js +1 -1
- package/dist/components/components-oem-virtual-chat-modal.js +1 -1
- package/dist/components/components-position-selector.js +1 -1
- package/dist/components/components-thousand-resume-wrapper.js +1 -1
- package/dist/components/components-upload.js +1 -1
- package/dist/components/components-voice-input-btn.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/oem-cast-modal.js +26 -6
- package/dist/components/oem-cast-modal.js.map +1 -1
- package/dist/components/oem-htws-modal.js +5 -5
- package/dist/components/oem-jd-modal.js +5 -5
- package/dist/components/oem-jlpp-modal.js +7 -7
- package/dist/components/oem-jlsx-modal.js +5 -5
- package/dist/components/oem-jlzz-modal.js +5 -5
- package/dist/components/oem-mnct-modal.js +7 -7
- package/dist/components/oem-mnms-modal.js +8 -8
- package/dist/components/oem-qgqjl-modal.js +9 -9
- package/dist/components/oem-zygh-modal.js +5 -5
- package/dist/components/{p-DSjCE1H5.js → p--IeRQcxT.js} +3 -3
- package/dist/components/{p-DSjCE1H5.js.map → p--IeRQcxT.js.map} +1 -1
- package/dist/components/{p-QTkJYrid.js → p-14CtQGo8.js} +4 -4
- package/dist/components/{p-QTkJYrid.js.map → p-14CtQGo8.js.map} +1 -1
- package/dist/components/{p-BrqabR-j.js → p-2BiWHTOV.js} +3 -3
- package/dist/components/{p-BrqabR-j.js.map → p-2BiWHTOV.js.map} +1 -1
- package/dist/components/{p-BfGmWNQl.js → p-5TyoLbXy.js} +5 -5
- package/dist/components/{p-BfGmWNQl.js.map → p-5TyoLbXy.js.map} +1 -1
- package/dist/components/{p-ByhieQTZ.js → p-BJKIlCmI.js} +3 -3
- package/dist/components/{p-ByhieQTZ.js.map → p-BJKIlCmI.js.map} +1 -1
- package/dist/components/{p-Dev2ejUC.js → p-BUA1GYVe.js} +3 -3
- package/dist/components/{p-Dev2ejUC.js.map → p-BUA1GYVe.js.map} +1 -1
- package/dist/components/{p-6DFSErLz.js → p-BUVNyxhI.js} +3 -3
- package/dist/components/{p-6DFSErLz.js.map → p-BUVNyxhI.js.map} +1 -1
- package/dist/components/{p-CUB7SkgT.js → p-BWdXlms4.js} +3 -3
- package/dist/components/{p-CUB7SkgT.js.map → p-BWdXlms4.js.map} +1 -1
- package/dist/components/{p-CuSvTsR9.js → p-BdgdgjaW.js} +3 -3
- package/dist/components/{p-CuSvTsR9.js.map → p-BdgdgjaW.js.map} +1 -1
- package/dist/components/{p-CNvgKUkT.js → p-BdzFXB1t.js} +3 -3
- package/dist/components/{p-CNvgKUkT.js.map → p-BdzFXB1t.js.map} +1 -1
- package/dist/components/{p-DQT6Eu_k.js → p-Bxg4nW6-.js} +3 -3
- package/dist/components/{p-DQT6Eu_k.js.map → p-Bxg4nW6-.js.map} +1 -1
- package/dist/components/{p-BUsDMuD3.js → p-c8fMPeu_.js} +3 -3
- package/dist/components/{p-BUsDMuD3.js.map → p-c8fMPeu_.js.map} +1 -1
- package/dist/components/{p-l6-kVCwa.js → p-wAqiaji9.js} +3 -3
- package/dist/components/{p-l6-kVCwa.js.map → p-wAqiaji9.js.map} +1 -1
- package/dist/components/{p-DCXGgFU_.js → p-wTdMzyVB.js} +3 -3
- package/dist/components/{p-DCXGgFU_.js.map → p-wTdMzyVB.js.map} +1 -1
- package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-ats-mnms-modal.js +5 -5
- package/dist/components/pcm-card.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +2 -2
- package/dist/components/pcm-htws-modal.js +8 -8
- package/dist/components/pcm-hyzj-modal.js +5 -5
- package/dist/components/pcm-jd-modal.js +6 -6
- package/dist/components/pcm-jlpp-modal.js +8 -8
- package/dist/components/pcm-jlsx-modal.js +5 -5
- package/dist/components/pcm-jlzz-modal.js +6 -6
- package/dist/components/pcm-mnct-modal.js +7 -7
- package/dist/components/pcm-mnms-modal.js +8 -8
- package/dist/components/pcm-mnms-zp-modal.js +8 -8
- package/dist/components/pcm-msbg-modal.js +5 -5
- package/dist/components/pcm-qgqjl-modal.js +9 -9
- package/dist/components/pcm-virtual-chat-modal.js +1 -1
- package/dist/components/pcm-zsk-chat-modal.js +2 -2
- package/dist/components/pcm-zygh-modal.js +7 -7
- package/dist/components/pcm-zygh-v2-modal.js +7 -7
- package/dist/esm/{components-chat-message_34.entry.js → components-chat-message_33.entry.js} +3952 -5881
- package/dist/esm/components-chat-message_33.entry.js.map +1 -0
- package/dist/esm/components-oem-virtual-chat-modal.entry.js +1827 -0
- package/dist/esm/components-oem-virtual-chat-modal.entry.js.map +1 -0
- package/dist/esm/{conversation-utils-CYf3kXhY.js → conversation-utils-B8KFe8e5.js} +3 -3
- package/dist/esm/{conversation-utils-CYf3kXhY.js.map → conversation-utils-B8KFe8e5.js.map} +1 -1
- package/dist/esm/{message-utils-BVjB8bxU.js → index-B_xjnWkF.js} +3 -23
- package/dist/esm/index-B_xjnWkF.js.map +1 -0
- package/dist/esm/index-DA8Myhft.js +10 -6
- package/dist/esm/{index-Bz5Co8pj.js → index-mY4LYmpx.js} +4 -4
- package/dist/esm/{index-Bz5Co8pj.js.map → index-mY4LYmpx.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/message-utils-DnoxSHNP.js +24 -0
- package/dist/esm/message-utils-DnoxSHNP.js.map +1 -0
- package/dist/esm/oem-cast-modal.entry.js +23 -5
- package/dist/esm/oem-cast-modal.entry.js.map +1 -1
- package/dist/esm/oem-htws-modal.entry.js +1 -1
- package/dist/esm/oem-jd-modal.entry.js +1 -1
- package/dist/esm/oem-jlpp-modal.entry.js +1 -1
- package/dist/esm/oem-jlzz-modal.entry.js +1 -1
- package/dist/esm/oem-mnct-modal.entry.js +1 -1
- package/dist/esm/{pcm-mnms-modal.entry.js → oem-mnms-modal.entry.js} +157 -42
- package/dist/esm/oem-mnms-modal.entry.js.map +1 -0
- package/dist/esm/oem-qgqjl-modal.entry.js +2 -2
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-hr-chat-modal.entry.js +1 -1
- package/dist/esm/pcm-jlsx-modal.entry.js +3 -2
- package/dist/esm/pcm-jlsx-modal.entry.js.map +1 -1
- package/dist/pcm-agents/components-oem-virtual-chat-modal.entry.esm.js.map +1 -0
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/oem-cast-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/oem-mnms-modal.entry.esm.js.map +1 -0
- package/dist/pcm-agents/{p-9259b43e.entry.js → p-0cedc9bf.entry.js} +2 -2
- package/dist/pcm-agents/{p-df3fd806.entry.js → p-24ce19fc.entry.js} +2 -2
- package/dist/pcm-agents/p-30b6a88d.entry.js +2 -0
- package/dist/pcm-agents/p-30b6a88d.entry.js.map +1 -0
- package/dist/pcm-agents/p-557664fc.entry.js +2 -0
- package/dist/pcm-agents/{p-372e7a6f.entry.js.map → p-557664fc.entry.js.map} +1 -1
- package/dist/pcm-agents/{p-c2de4bf9.entry.js → p-58493403.entry.js} +2 -2
- package/dist/pcm-agents/p-5ca45877.entry.js +2 -0
- package/dist/pcm-agents/p-5ca45877.entry.js.map +1 -0
- package/dist/pcm-agents/{p-e22e39c0.entry.js → p-724d9471.entry.js} +2 -2
- package/dist/pcm-agents/{p-486793b9.entry.js → p-783b46c0.entry.js} +2 -2
- package/dist/pcm-agents/p-81d12737.entry.js +2 -0
- package/dist/pcm-agents/p-81d12737.entry.js.map +1 -0
- package/dist/pcm-agents/{p-BVjB8bxU.js → p-B_xjnWkF.js} +2 -2
- package/dist/pcm-agents/p-B_xjnWkF.js.map +1 -0
- package/dist/pcm-agents/{p-BPY4JZY3.js → p-CcIrA6cr.js} +2 -2
- package/dist/pcm-agents/{p-BPY4JZY3.js.map → p-CcIrA6cr.js.map} +1 -1
- package/dist/pcm-agents/p-DnoxSHNP.js +2 -0
- package/dist/pcm-agents/p-DnoxSHNP.js.map +1 -0
- package/dist/pcm-agents/p-b9368b8e.entry.js +8 -0
- package/dist/pcm-agents/p-b9368b8e.entry.js.map +1 -0
- package/dist/pcm-agents/{p-1a01b4fc.entry.js → p-d0a7e02b.entry.js} +2 -2
- package/dist/pcm-agents/{p-bc894cc5.entry.js → p-f4d5841a.entry.js} +2 -2
- package/dist/pcm-agents/p-rR0ghCa0.js +2 -0
- package/dist/pcm-agents/{p-dDgC2F6T.js.map → p-rR0ghCa0.js.map} +1 -1
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-jlsx-modal.entry.esm.js.map +1 -1
- package/dist/types/components/oem-cast-modal/oem-cast-modal.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/components-chat-message_34.cjs.entry.js.map +0 -1
- package/dist/cjs/message-utils-DbTqMOA1.js.map +0 -1
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/pcm-mnms-modal.entry.cjs.js.map +0 -1
- package/dist/esm/components-chat-message_34.entry.js.map +0 -1
- package/dist/esm/message-utils-BVjB8bxU.js.map +0 -1
- package/dist/esm/pcm-mnms-modal.entry.js.map +0 -1
- package/dist/pcm-agents/p-0617e6f1.entry.js +0 -2
- package/dist/pcm-agents/p-0617e6f1.entry.js.map +0 -1
- package/dist/pcm-agents/p-372e7a6f.entry.js +0 -2
- package/dist/pcm-agents/p-6f82d6c6.entry.js +0 -8
- package/dist/pcm-agents/p-6f82d6c6.entry.js.map +0 -1
- package/dist/pcm-agents/p-BVjB8bxU.js.map +0 -1
- package/dist/pcm-agents/p-dDgC2F6T.js +0 -2
- package/dist/pcm-agents/p-e28f36a4.entry.js +0 -2
- package/dist/pcm-agents/p-e28f36a4.entry.js.map +0 -1
- package/dist/pcm-agents/pcm-mnms-modal.entry.esm.js.map +0 -1
- /package/dist/pcm-agents/{p-9259b43e.entry.js.map → p-0cedc9bf.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-df3fd806.entry.js.map → p-24ce19fc.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-c2de4bf9.entry.js.map → p-58493403.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-e22e39c0.entry.js.map → p-724d9471.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-486793b9.entry.js.map → p-783b46c0.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-1a01b4fc.entry.js.map → p-d0a7e02b.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-bc894cc5.entry.js.map → p-f4d5841a.entry.js.map} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as t,r as e,c as o,h as i}from"./p-DA8Myhft.js";import{g as n,m as r,e as a}from"./p-B_xjnWkF.js";import{s,j as l,h as d,P as c,k as p,a as h,v as f,b as u,F as g,u as m,l as b,m as x,d as y,i as w,e as v,f as k,g as C}from"./p-CcIrA6cr.js";import{E as z}from"./p-C0FYX2-Z.js";import{S as I}from"./p-B23366TU.js";import{c as S}from"./p-C7m_4Gmk.js";import{M as j}from"./p-D39f_W8k.js";import{s as _}from"./p-DnoxSHNP.js";import{f as T}from"./p-rR0ghCa0.js";import"./p-Bs-zO1WZ.js";var F={exports:{}};
|
|
2
|
+
/*!
|
|
3
|
+
* clipboard.js v2.0.11
|
|
4
|
+
* https://clipboardjs.com/
|
|
5
|
+
*
|
|
6
|
+
* Licensed MIT © Zeno Rocha
|
|
7
|
+
*/var M=F.exports;var E;function D(){if(E)return F.exports;E=1;(function(t,e){(function e(o,i){t.exports=i()})(M,(function(){return function(){var t={686:function(t,e,o){o.d(e,{default:function(){return E}});var i=o(279);var n=o.n(i);var r=o(370);var a=o.n(r);var s=o(817);var l=o.n(s);function d(t){try{return document.execCommand(t)}catch(t){return false}}var c=function t(e){var o=l()(e);d("cut");return o};var p=c;function h(t){var e=document.documentElement.getAttribute("dir")==="rtl";var o=document.createElement("textarea");o.style.fontSize="12pt";o.style.border="0";o.style.padding="0";o.style.margin="0";o.style.position="absolute";o.style[e?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;o.style.top="".concat(i,"px");o.setAttribute("readonly","");o.value=t;return o}var f=function t(e,o){var i=h(e);o.container.appendChild(i);var n=l()(i);d("copy");i.remove();return n};var u=function t(e){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};var i="";if(typeof e==="string"){i=f(e,o)}else if(e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(e===null||e===void 0?void 0:e.type)){i=f(e.value,o)}else{i=l()(e);d("copy")}return i};var g=u;function m(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){m=function t(e){return typeof e}}else{m=function t(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return m(t)}var b=function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=e.action,i=o===void 0?"copy":o,n=e.container,r=e.target,a=e.text;if(i!=="copy"&&i!=="cut"){throw new Error('Invalid "action" value, use either "copy" or "cut"')}if(r!==undefined){if(r&&m(r)==="object"&&r.nodeType===1){if(i==="copy"&&r.hasAttribute("disabled")){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute')}if(i==="cut"&&(r.hasAttribute("readonly")||r.hasAttribute("disabled"))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}}else{throw new Error('Invalid "target" value, use a valid Element')}}if(a){return g(a,{container:n})}if(r){return i==="cut"?p(r):g(r,{container:n})}};var x=b;function y(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){y=function t(e){return typeof e}}else{y=function t(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return y(t)}function w(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function v(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(t,i.key,i)}}function k(t,e,o){if(e)v(t.prototype,e);if(o)v(t,o);return t}function C(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function")}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:true,configurable:true}});if(e)z(t,e)}function z(t,e){z=Object.setPrototypeOf||function t(e,o){e.__proto__=o;return e};return z(t,e)}function I(t){var e=_();return function o(){var i=T(t),n;if(e){var r=T(this).constructor;n=Reflect.construct(i,arguments,r)}else{n=i.apply(this,arguments)}return S(this,n)}}function S(t,e){if(e&&(y(e)==="object"||typeof e==="function")){return e}return j(t)}function j(t){if(t===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(t){return false}}function T(t){T=Object.setPrototypeOf?Object.getPrototypeOf:function t(e){return e.__proto__||Object.getPrototypeOf(e)};return T(t)}function F(t,e){var o="data-clipboard-".concat(t);if(!e.hasAttribute(o)){return}return e.getAttribute(o)}var M=function(t){C(o,t);var e=I(o);function o(t,i){var n;w(this,o);n=e.call(this);n.resolveOptions(i);n.listenClick(t);return n}k(o,[{key:"resolveOptions",value:function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof e.action==="function"?e.action:this.defaultAction;this.target=typeof e.target==="function"?e.target:this.defaultTarget;this.text=typeof e.text==="function"?e.text:this.defaultText;this.container=y(e.container)==="object"?e.container:document.body}},{key:"listenClick",value:function t(e){var o=this;this.listener=a()(e,"click",(function(t){return o.onClick(t)}))}},{key:"onClick",value:function t(e){var o=e.delegateTarget||e.currentTarget;var i=this.action(o)||"copy";var n=x({action:i,container:this.container,target:this.target(o),text:this.text(o)});this.emit(n?"success":"error",{action:i,text:n,trigger:o,clearSelection:function t(){if(o){o.focus()}window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function t(e){return F("action",e)}},{key:"defaultTarget",value:function t(e){var o=F("target",e);if(o){return document.querySelector(o)}}},{key:"defaultText",value:function t(e){return F("text",e)}},{key:"destroy",value:function t(){this.listener.destroy()}}],[{key:"copy",value:function t(e){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};return g(e,o)}},{key:"cut",value:function t(e){return p(e)}},{key:"isSupported",value:function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:["copy","cut"];var o=typeof e==="string"?[e]:e;var i=!!document.queryCommandSupported;o.forEach((function(t){i=i&&!!document.queryCommandSupported(t)}));return i}}]);return o}(n());var E=M},828:function(t){var e=9;if(typeof Element!=="undefined"&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}function i(t,o){while(t&&t.nodeType!==e){if(typeof t.matches==="function"&&t.matches(o)){return t}t=t.parentNode}}t.exports=i},438:function(t,e,o){var i=o(828);function n(t,e,o,i,n){var r=a.apply(this,arguments);t.addEventListener(o,r,n);return{destroy:function(){t.removeEventListener(o,r,n)}}}function r(t,e,o,i,r){if(typeof t.addEventListener==="function"){return n.apply(null,arguments)}if(typeof o==="function"){return n.bind(null,document).apply(null,arguments)}if(typeof t==="string"){t=document.querySelectorAll(t)}return Array.prototype.map.call(t,(function(t){return n(t,e,o,i,r)}))}function a(t,e,o,n){return function(o){o.delegateTarget=i(o.target,e);if(o.delegateTarget){n.call(t,o)}}}t.exports=r},879:function(t,e){e.node=function(t){return t!==undefined&&t instanceof HTMLElement&&t.nodeType===1};e.nodeList=function(t){var o=Object.prototype.toString.call(t);return t!==undefined&&(o==="[object NodeList]"||o==="[object HTMLCollection]")&&"length"in t&&(t.length===0||e.node(t[0]))};e.string=function(t){return typeof t==="string"||t instanceof String};e.fn=function(t){var e=Object.prototype.toString.call(t);return e==="[object Function]"}},370:function(t,e,o){var i=o(879);var n=o(438);function r(t,e,o){if(!t&&!e&&!o){throw new Error("Missing required arguments")}if(!i.string(e)){throw new TypeError("Second argument must be a String")}if(!i.fn(o)){throw new TypeError("Third argument must be a Function")}if(i.node(t)){return a(t,e,o)}else if(i.nodeList(t)){return s(t,e,o)}else if(i.string(t)){return l(t,e,o)}else{throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}}function a(t,e,o){t.addEventListener(e,o);return{destroy:function(){t.removeEventListener(e,o)}}}function s(t,e,o){Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,o)}));return{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,o)}))}}}function l(t,e,o){return n(document.body,t,e,o)}t.exports=r},817:function(t){function e(t){var e;if(t.nodeName==="SELECT"){t.focus();e=t.value}else if(t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){var o=t.hasAttribute("readonly");if(!o){t.setAttribute("readonly","")}t.select();t.setSelectionRange(0,t.value.length);if(!o){t.removeAttribute("readonly")}e=t.value}else{if(t.hasAttribute("contenteditable")){t.focus()}var i=window.getSelection();var n=document.createRange();n.selectNodeContents(t);i.removeAllRanges();i.addRange(n);e=i.toString()}return e}t.exports=e},279:function(t){function e(){}e.prototype={on:function(t,e,o){var i=this.e||(this.e={});(i[t]||(i[t]=[])).push({fn:e,ctx:o});return this},once:function(t,e,o){var i=this;function n(){i.off(t,n);e.apply(o,arguments)}n._=e;return this.on(t,n,o)},emit:function(t){var e=[].slice.call(arguments,1);var o=((this.e||(this.e={}))[t]||[]).slice();var i=0;var n=o.length;for(i;i<n;i++){o[i].fn.apply(o[i].ctx,e)}return this},off:function(t,e){var o=this.e||(this.e={});var i=o[t];var n=[];if(i&&e){for(var r=0,a=i.length;r<a;r++){if(i[r].fn!==e&&i[r].fn._!==e)n.push(i[r])}}n.length?o[t]=n:delete o[t];return this}};t.exports=e;t.exports.TinyEmitter=e}};var e={};function o(i){if(e[i]){return e[i].exports}var n=e[i]={exports:{}};t[i](n,n.exports,o);return n.exports}!function(){o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};o.d(e,{a:e});return e}}();!function(){o.d=function(t,e){for(var i in e){if(o.o(e,i)&&!o.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:e[i]})}}}}();!function(){o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();return o(686)}().default}))})(F);return F.exports}var B=D();var R=n(B);const O="复制";const A="重试";const H="保存到职位库";const L="内容已复制到剪贴板";const P="保存成功";const q="保存失败";const $="解析JSON失败";const U="正在加载视频...";const N="请稍等...";const V="处理中...";const W="赞";const J="踩";const Q="附件信息";const Y="您的浏览器不支持视频播放。";const G="职位信息";const X="评估规则";var K={copy:O,retry:A,saveToJobLibrary:H,copySuccess:L,saveSuccess:P,saveFailed:q,parseJsonFailed:$,loadingVideo:U,pleaseWait:N,processing:V,like:W,dislike:J,attachmentInfo:Q,browserNotSupportVideo:Y,jobInfo:G,evaluationRule:X};const Z="Copy";const tt="Retry";const et="Save to Job Library";const ot="Content copied to clipboard";const it="Saved successfully";const nt="Save failed";const rt="Failed to parse JSON";const at="Loading video...";const st="Please wait...";const lt="Processing...";const dt="Like";const ct="Dislike";const pt="Attachment Info";const ht="Your browser does not support video playback.";const ft="Job Information";const ut="Evaluation Rule";var gt={copy:Z,retry:tt,saveToJobLibrary:et,copySuccess:ot,saveSuccess:it,saveFailed:nt,parseJsonFailed:rt,loadingVideo:at,pleaseWait:st,processing:lt,like:dt,dislike:ct,attachmentInfo:pt,browserNotSupportVideo:ht,jobInfo:ft,evaluationRule:ut};const mt='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const bt=":host{display:block;width:100%}.message-round{margin-bottom:16px;width:100%}.user-message-container{display:flex;flex-direction:row-reverse;align-items:flex-start;margin-bottom:15px;position:relative}.assistant-message-container{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:15px;position:relative}.message-bubble{max-width:85%;position:relative}.user-message{padding:5px 10px;background:#f5f7ff;font-size:14px;color:#1F2328;border-radius:6px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.1)}.assistant-message{padding:15px 10px;background-color:#fff;border-radius:6px;font-size:14px;color:#1F2328;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)}.message-time{font-size:12px;color:#999;margin-top:4px}.user-message-container .message-time{color:rgba(255, 255, 255, 0.7)}.loading-dots{display:flex;align-items:center;padding:12px 16px;background-color:#f0f0f0;border-radius:18px;border-top-left-radius:4px}.loading-dots span{width:8px;height:8px;margin:0 3px;background-color:#999;border-radius:50%;display:inline-block;animation:dot-pulse 1.5s infinite ease-in-out}.loading-dots span:nth-child(2){animation-delay:0.2s}.loading-dots span:nth-child(3){animation-delay:0.4s}@keyframes dot-pulse{0%,80%,100%{transform:scale(0.8);opacity:0.5}40%{transform:scale(1.2);opacity:1}}.file-view{margin-top:8px;padding:12px;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;font-size:14px;word-break:break-all;color:#2c3e50;line-height:1.5;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-view{margin-top:8px;margin-bottom:10px;padding-bottom:10px;border:1px solid #e9ecef;border-radius:6px;overflow:hidden;background-color:#ffffff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-label-container{display:flex;align-items:center;margin-bottom:4px;background-color:#f8f9fa;border-bottom:1px solid #e9ecef;padding:8px 12px}.copy-input-button{background:transparent;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#8c8c8c;opacity:0.7;transition:opacity 0.2s ease;margin-left:5px}.copy-input-button:hover{opacity:1;color:#1677ff}.input-label{font-size:13px;font-weight:600;color:#495057}.input-value{padding:12px 12px 0px;font-size:14px;line-height:1.5;color:#2c3e50;background-color:#ffffff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.input-metadata{font-size:13px;margin-top:8px}.message-actions{display:flex;align-items:center;gap:8px;transition:opacity 0.2s ease;margin-top:15px}.action-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d9d9d9;border-radius:6px;padding:4px 15px;font-size:14px;height:32px;background-color:white;cursor:pointer;color:rgba(0, 0, 0, 0.88);transition:all 0.2s}.action-button:hover{color:#1677ff;border-color:#1677ff}.action-button.primary{color:#1677ff;border-color:#1677ff}.action-button.primary:hover{color:#4096ff;border-color:#4096ff}.action-button.icon-only{padding:4px 8px;margin-right:9px}.button-icon{margin-right:8px;display:flex;align-items:center;justify-content:center}.icon-only .button-icon{margin-right:0}.file-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}.file-item{display:flex;flex-direction:column;align-items:center;width:80px;cursor:pointer;padding:8px;border-radius:4px;transition:background-color 0.3s;margin:5px 10px}.file-item:hover{background-color:rgba(0, 0, 0, 0.04)}.file-icon{margin-bottom:4px}.file-name{font-size:12px;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8B4513}.action-button.active{color:#1677ff;background-color:rgba(22, 119, 255, 0.1)}.action-button.active .button-icon svg{stroke:#1677ff}.inputs-container{margin-top:8px;display:flex;flex-direction:column;gap:8px}.file-list{display:flex;flex-direction:column;gap:8px}.file-item{display:flex;align-items:center;padding:8px 12px;background-color:#f5f5f5;border-radius:6px;cursor:pointer;transition:background-color 0.2s}.file-item:hover{background-color:#e8e8e8}.file-icon{margin-right:8px}.file-name{font-size:14px;color:#333;word-break:break-word}.input-view{background-color:#f9f9f9;border-radius:8px;padding:12px;border:1px solid #e8e8e8}.input-label-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.input-label{font-weight:500;color:#333}.input-value{color:#666;line-height:1.5;word-break:break-word;max-height:200px;overflow-y:auto}.copy-input-button{background:none;border:none;cursor:pointer;color:#1677ff;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center}.copy-input-button:hover{background-color:rgba(22, 119, 255, 0.1)}.input-metadata{font-size:14px;color:#666;padding:4px 0}.file-card{display:flex;align-items:center;padding:12px;background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 200px 100px no-repeat, #fff;border-radius:8px;cursor:pointer;transition:background-color 0.2s;border:1px solid #e8e8e8;margin-top:8px}.file-card:hover{background-color:#f0f0f0}.file-card-icon{margin-right:12px;flex-shrink:0;border-radius:12px;background:#0d75fb;width:48px;height:48px;display:flex;align-items:center;justify-content:center}.file-card-icon img{width:40px;height:40px}.file-card-content{display:flex;flex-direction:column;flex:1;min-width:0}.file-card-type{font-size:14px;color:#8c8c8c;margin-bottom:4px}.file-card-name{font-size:16px;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.copy-card-button{background:none;border:none;cursor:pointer;color:#8c8c8c;padding:8px;border-radius:4px;display:flex;align-items:center;justify-content:center;margin-left:8px;transition:color 0.2s}.copy-card-button:hover{color:#1677ff}.avatar{width:32px;height:32px;border-radius:50%;overflow:hidden;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.user-avatar{margin-left:8px}.assistant-avatar{margin-right:8px}.retry-button{background-color:#ff6b35 !important;color:white !important;border:none !important}.retry-button:hover{background-color:#e55a2b !important}.retry-button .button-icon{margin-right:4px}.video-inputs-container{display:flex;flex-direction:column;align-items:end}.video-container{margin-top:0px;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);background-color:#000;width:250px;height:auto;max-height:250px;transition:transform 0.2s ease, box-shadow 0.2s ease}.video-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.15)}.video-container video{display:block;width:100%;max-width:500px;height:auto;border-radius:8px}.video-container video:focus{outline:none}.video-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background-color:#f8f9fa;border-radius:8px;color:#666;font-size:14px}.loading-spinner{width:24px;height:24px;border:2px solid #e9ecef;border-top:2px solid #1677ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 768px){.video-container{width:100%;max-width:300px}}";const xt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const yt=class{message;showFeedbackButtons=true;botId;locale;get hostElement(){return t(this)}strings;feedbackStatus=null;clipboard=null;videoUrls={};userAvatar;assistantAvatar;showCopyButton=true;filePreviewMode="drawer";showAssistantMessage=true;showSaveJdButton=false;saveJdButtonText="保存职位";saveJd;filePreviewRequest;retryRequest;constructor(t){e(this,t);this.saveJd=o(this,"saveJd");this.filePreviewRequest=o(this,"filePreviewRequest");this.retryRequest=o(this,"retryRequest");r.use(a);r.setOptions({breaks:true,gfm:true})}async componentWillLoad(){this.strings=this.locale==="en"?gt:K;if(this.message&&this.message.feedback){this.feedbackStatus=this.message.feedback.rating}}componentDidRender(){this.initClipboard()}disconnectedCallback(){if(this.clipboard){this.clipboard.destroy();this.clipboard=null}}initClipboard(){const t=this.hostElement.shadowRoot?.querySelector(".copy-button");if(!t){return}if(this.clipboard){return}this.clipboard=new R(t,{container:this.hostElement.shadowRoot});this.clipboard.on("success",(t=>{alert(this.strings.copySuccess);t.clearSelection()}));this.clipboard.on("error",(t=>{console.error("复制失败:",t);z.emitError({error:t,message:"复制内容失败"})}))}saveJdLoading=false;async handleSaveJd(t){this.saveJdLoading=true;const e="78798567376007168";const o=await s({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{bot_id:e,inputs:{job_info:t}}});if(o.success&&o.data?.data?.outputs?.json_data){try{let t=o.data.data.outputs.json_data.trim();const e=t.match(/```json\s*([\s\S]*?)\s*```/);if(e){t=e[1].trim()}const i=JSON.parse(t);this.saveJd.emit({isOk:true,message:this.strings.saveSuccess,data:i})}catch(t){console.error("解析JSON失败:",t);this.saveJd.emit({isOk:false,message:this.strings.parseJsonFailed})}}else{this.saveJd.emit({isOk:false,message:this.strings.saveFailed})}this.saveJdLoading=false}renderUserMessage(){if(!this.message?.query?.trim())return null;const t=this.message.query?r(this.message.query):"";return i("div",{class:{"user-message-container":true}},this.userAvatar&&i("div",{class:"avatar user-avatar"},i("img",{src:this.userAvatar})),i("div",{class:"message-bubble user-message"},i("div",{innerHTML:t}),this.renderInputs()))}renderAssistantMessage(){if(!this.message.answer&&!this.message.isStreaming)return null;if(!this.showAssistantMessage){return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble"},i("div",{class:"assistant-message"},this.strings.pleaseWait)))}const t=this.message.isStreaming&&!this.message.answer;const e=this.message.answer?r(this.message.answer):"";const o=this.showSaveJdButton&&this.botId=="3022316191018873";return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble "},i("div",{class:"assistant-message"},i("div",{class:"markdown-content markdown-body",innerHTML:t?this.strings.pleaseWait:e})),!t&&this.message.answer&&!this.message.isStreaming&&i("div",{class:"message-actions"},this.message.showRetryButton&&i("button",{class:"action-button retry-button",onClick:()=>this.handleRetry(),title:this.strings.retry},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("polyline",{points:"23 4 23 10 17 10"}),i("polyline",{points:"1 20 1 14 7 14"}),i("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}))),this.strings.retry),this.showCopyButton&&i("button",{class:"action-button copy-button",title:this.strings.copy,"data-clipboard-text":this.message.answer||""},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))),this.strings.copy),o&&i("button",{class:"action-button",onClick:()=>this.handleSaveJd(this.message.answer),title:this.saveJdButtonText,disabled:this.saveJdLoading},this.saveJdLoading?this.strings.processing:this.saveJdButtonText),this.showFeedbackButtons&&i(i.Fragment,null,i("button",{class:`action-button icon-only ${this.feedbackStatus==="like"?"active":""}`,title:this.strings.like,onClick:()=>this.handleLike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"})))),i("button",{class:`action-button icon-only ${this.feedbackStatus==="dislike"?"active":""}`,title:this.strings.dislike,onClick:()=>this.handleDislike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"}))))))))}getFileName(t){const e=t.split("/");return e[e.length-1]}handleContentClick(t,e,o="text"){this.filePreviewRequest.emit({fileName:t,content:e,contentType:o})}async loadVideoUrl(t){if(this.videoUrls[t]){return}const e=await l(t);if(e){this.videoUrls={...this.videoUrls,[t]:e}}}async handleFileClick(t,e){const o=/^https?:\/\//i.test(t);if(o){if(this.filePreviewMode==="drawer"){this.filePreviewRequest.emit({url:t,fileName:e,contentType:"file"})}else{window.open(t,"_blank")}return}const i=/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(e);const n=i?await l(t):await d(t);if(n){if(this.filePreviewMode==="drawer"){this.filePreviewRequest.emit({url:n,fileName:e,contentType:"file"})}else{window.open(n,"_blank")}}else{console.error("无法获取预览URL");I.captureError("无法获取预览URL",{action:"handleFileClick",component:"components-chat-message",title:"无法获取预览URL"});z.emitError({error:"无法获取预览URL",message:"无法获取预览URL"})}}renderFileItem(t,e,o){return i("div",{key:o,class:"file-card",onClick:()=>this.handleFileClick(e,t)},i("div",{class:"file-card-icon",style:{background:"linear-gradient(45deg, #ff5600, #ff8344)"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_file.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",this.strings.attachmentInfo,"]"),i("div",{class:"file-card-name"},t)))}renderInputs(){if(!this.message.inputs)return null;const t=Object.keys(this.message.inputs).some((t=>{const e=this.message.inputs[t];return e!==null&&e!==undefined&&e!==""&&!t.startsWith("hide_")&&t!=="answer"}));if(!t)return null;return i("div",{class:"inputs-container"},Object.keys(this.message.inputs).map(((t,e)=>{const o=this.message.inputs[t];if(o&&!t.startsWith("hide_")&&t!=="answer"){if(t==="video_url"){const t=o;const n=this.videoUrls[t];if(!n){this.loadVideoUrl(t)}return i("div",{class:"video-inputs-container"},i("div",{key:e,class:"video-container"},n?i("video",{key:t,controls:true,preload:"metadata",onLoadedMetaData:t=>{const e=t.target;e.currentTime=.01},controlsList:"nodownload",style:{width:"250px",height:"auto",maxHeight:"250px",borderRadius:"8px",marginTop:"8px"}},i("source",{src:n,type:"video/webm"}),i("source",{src:n,type:"video/mp4"}),i("source",{src:n,type:"video/ogg"}),this.strings.browserNotSupportVideo):i("div",{class:"video-loading"},i("div",{class:"loading-spinner"}),i("span",null,this.strings.loadingVideo))))}else if(t==="file_url"){if((o?.split?.(",")?.length||0)>1){const t=o.split(",");const n=this.message.inputs?.file_name?.split?.(",")||[];return i("div",{key:e},t.map(((t,e)=>{const o=n[e]||this.getFileName(t);return this.renderFileItem(o,t,e)})))}else{const t=this.message.inputs.file_name||this.getFileName(o);return this.renderFileItem(t,o,e)}}else if(t==="file_urls"){const t=typeof o==="string"?o.split(","):[o.toString()];const n=this.message.inputs.file_names?typeof this.message.inputs.file_names==="string"?this.message.inputs.file_names.split(","):[this.message.inputs.file_names.toString()]:[];return i("div",{key:e},t.map(((t,e)=>{const o=n[e]||this.getFileName(t);return this.renderFileItem(o,t,e)})))}else if(t==="job_info"||t==="rule"){const n=t==="job_info"?this.strings.jobInfo:this.strings.evaluationRule;const r=typeof o==="string"?o:JSON.stringify(o,null,2);return i("div",{key:e,class:"file-card",onClick:()=>this.handleContentClick(n,r)},i("div",{class:"file-card-icon",style:{background:"#0d75fb"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_position.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",n,"]"),i("div",{class:"file-card-name"},r.length>50?r.substring(0,50)+"...":r)))}else if(t==="input"){return i("div",{key:e,class:"input-metadata"},`${o}`)}}return null})))}async handleLike(){const t=this.feedbackStatus==="like"?null:"like";await this.submitFeedback(t)}async handleDislike(){const t=this.feedbackStatus==="dislike"?null:"dislike";await this.submitFeedback(t)}async submitFeedback(t){if(!this.message.id){console.error("消息ID不存在,无法提交反馈");I.captureError("消息ID不存在,无法提交反馈",{action:"submitFeedback",component:"components-chat-message",title:"无法提交反馈"});z.emitError({error:"消息ID不存在,无法提交反馈",message:"消息ID不存在,无法提交反馈"});return}try{const e=await s({url:`/sdk/v1/chat/messages/${this.message.id}/feedbacks`,method:"POST",data:{rating:t,bot_id:this.botId,content:""}});if(e.success){this.feedbackStatus=t;if(this.message&&this.message.feedback){this.message={...this.message,feedback:{...this.message.feedback,rating:t}}}}else{console.error("反馈提交失败:",e.message)}}catch(t){console.error("提交反馈时发生错误:",t);I.captureError(t,{action:"submitFeedback",component:"components-chat-message",title:"提交反馈失败"})}}handleRetry(){if(this.message.id){this.retryRequest.emit(this.message.id)}}render(){return i("div",{key:"3aa883dc023397c6f7d5335b938dc7adbbe3d4bb",class:"message-round"},this.renderUserMessage(),this.renderAssistantMessage())}};yt.style=mt+(bt+xt);const wt=":host{display:block}.confirm-modal-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.confirm-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.confirm-modal-content{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;padding:20px;opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.confirm-modal-content.centered{align-items:center}.modal-content-visible{opacity:1;visibility:visible}.modal-wrapper{background:white;border-radius:8px;width:100%;max-width:400px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;transform:scale(0.9) translateY(-20px);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.modal-content-visible .modal-wrapper{transform:scale(1) translateY(0)}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;background:#fff}.modal-title{font-size:16px;font-weight:500;color:rgba(0, 0, 0, 0.85);margin:0;line-height:1.5}.modal-body{padding:24px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.65)}.modal-footer{padding:10px 16px;text-align:right;background:transparent;border-top:1px solid #f0f0f0;border-radius:0 0 8px 8px}.modal-button{line-height:1.5;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;border:1px solid transparent;cursor:pointer;transition:all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:4px 15px;font-size:14px;border-radius:6px;outline:0;margin-left:8px}.cancel-button{color:rgba(0, 0, 0, 0.65);border-color:#d9d9d9;background:#fff}.cancel-button:hover{color:#40a9ff;border-color:#40a9ff}.cancel-button:active{color:#096dd9;border-color:#096dd9}.ok-button{color:#fff;background:#1890ff;border-color:#1890ff}.ok-button:hover{background:#40a9ff;border-color:#40a9ff}.ok-button:active{background:#096dd9;border-color:#096dd9}.ok-primary{background:#1890ff;border-color:#1890ff}.ok-primary:hover{background:#40a9ff;border-color:#40a9ff}.ok-primary:active{background:#096dd9;border-color:#096dd9}.ok-danger{background:#ff4d4f;border-color:#ff4d4f}.ok-danger:hover{background:#ff7875;border-color:#ff7875}.ok-danger:active{background:#d9363e;border-color:#d9363e}.ok-default{color:rgba(0, 0, 0, 0.65);background:#fff;border-color:#d9d9d9}.ok-default:hover{color:#40a9ff;border-color:#40a9ff}.ok-default:active{color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.confirm-modal-content{padding:16px}.confirm-modal-content.centered{padding:16px}.modal-wrapper{max-width:none;margin:0 auto}.modal-header{padding:12px 16px}.modal-title{font-size:16px}.modal-body{padding:16px}.modal-footer{padding:8px 12px 12px}.modal-button{height:36px;font-size:16px;margin-left:8px;margin-top:8px}}@media (prefers-reduced-motion: reduce){.confirm-modal-mask,.confirm-modal-content,.modal-wrapper,.modal-button{transition:none}}";const vt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const kt=class{constructor(t){e(this,t);this.ok=o(this,"ok");this.cancel=o(this,"cancel");this.closed=o(this,"closed");this.afterOpen=o(this,"afterOpen");this.afterClose=o(this,"afterClose")}isOpen=false;modalTitle="确认";okText="确认";cancelText="取消";okType="primary";maskClosable=true;mask=true;centered=true;ok;cancel;closed;afterOpen;afterClose;get hostElement(){return t(this)}zIndex=2e3;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(t){if(t){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const t=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(t){this.transitionEndHandler=()=>{this.afterOpen.emit()};t.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const t=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(t){this.transitionEndHandler=()=>{this.afterClose.emit()};t.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const t=S.getItem("modal-zIndex");if(t){this.zIndex=t+1e3}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const t=this.hostElement.shadowRoot?.querySelector(".modal-wrapper");if(t&&this.transitionEndHandler){t.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleCancel()}};handleOk=()=>{this.ok.emit()};handleCancel=()=>{this.cancel.emit();this.isOpen=false;this.closed.emit()};render(){const t={zIndex:`${this.zIndex+1}`};const e={zIndex:`${this.zIndex}`};const o={"confirm-modal-container":true,"modal-open":this.isOpen};const n={"confirm-modal-content":true,"modal-content-visible":this.isOpen,centered:this.centered};const r={"modal-button":true,"ok-button":true,[`ok-${this.okType}`]:true};return i("div",{key:"d8d67beeb7cdd19c6984983d922f601bc65772cb",class:o},this.mask&&i("div",{key:"cb1002966597f7b6d185625f905e96b895b6076e",class:{"confirm-modal-mask":true,"mask-visible":this.isOpen},style:e,onClick:this.handleMaskClick}),i("div",{key:"48b97599d6534a7ba53971273eb8759cd7c85ca3",class:n,style:t},i("div",{key:"675558f32607ef6ca72013e40d4d39da6987864e",class:"modal-wrapper"},i("div",{key:"40fd4918144768ade365e1937009af33a8f86b54",class:"modal-header"},i("div",{key:"d5030a4af07bf5bf7ef604dd0d55f4ed2eda98e0",class:"modal-title"},this.modalTitle)),i("div",{key:"1d4de0b387998078b0ac71746f3da0c4dfd41110",class:"modal-body"},i("slot",{key:"1ade6a10276f96df5ca8730098bd7e3cc0225d3f"})),i("div",{key:"079194be9894d264e1d2facbfb55dfdd05086245",class:"modal-footer"},i("button",{key:"5b94b6e1f0e84542e5afccb79a18fe08cee78a78",class:"modal-button cancel-button",onClick:this.handleCancel},this.cancelText),i("button",{key:"c82555a1f359a415a8a0f29188959726f695f216",class:r,onClick:this.handleOk},this.okText)))))}static get watchers(){return{isOpen:["visibleChanged"]}}};kt.style=wt+vt;const Ct=".digital-human-container{position:relative;border-radius:8px;overflow:hidden;transition:box-shadow 0.3s;width:100%;height:100%;background:transparent;display:flex;align-items:center;justify-content:center}.digital-human-container video{width:100%;height:100%;display:block;object-fit:cover;background:transparent;border-radius:8px}.generating-indicator{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.loading-spinner{width:16px;height:16px;border:2px solid #ffffff;border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media screen and (max-width: 768px){.digital-human-container{border-radius:6px}.digital-human-container video{border-radius:6px}}";const zt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const It=class{constructor(t){e(this,t);this.videoEnded=o(this,"videoEnded");this.videoGenerated=o(this,"videoGenerated");this.avatarDetailLoaded=o(this,"avatarDetailLoaded")}digitalId;speechText="";isStreaming=false;playbackRate=1;generatedVideoUrl="";currentVideoUrl="";isPlayingGenerated=false;dynamicDefaultVideoUrl="";dynamicVirtualmanKey="";videoElement;lastCompletedText="";videoEnded;videoGenerated;avatarDetailLoaded;async componentWillLoad(){if(this.digitalId){await this.fetchAvatarDetail()}this.currentVideoUrl=this.dynamicDefaultVideoUrl||""}componentDidLoad(){if(this.videoElement&&this.currentVideoUrl){this.videoElement.src=this.currentVideoUrl;this.videoElement.playbackRate=1}}handleStreamingChange(t,e){if(e===true&&t===false&&this.speechText&&this.speechText!==this.lastCompletedText){this.generateDigitalHumanVideo(this.speechText);this.lastCompletedText=this.speechText}}async fetchAvatarDetail(){if(!this.digitalId)return;try{const t=await s({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(!t.success){throw new Error(`获取数字人详情失败: ${t.message}`)}const{placeholder_video_url:e,virtualman_key:o}=t.data;if(e){this.dynamicDefaultVideoUrl=e}if(o){this.dynamicVirtualmanKey=o}this.avatarDetailLoaded.emit({defaultVideoUrl:this.dynamicDefaultVideoUrl,virtualmanKey:this.dynamicVirtualmanKey})}catch(t){console.error("获取数字人详情失败:",t)}}async generateDigitalHumanVideo(t){if(!t.trim())return;if(!this.dynamicVirtualmanKey){console.error("缺少VirtualmanKey,无法生成数字人视频");return}const e=this.dynamicVirtualmanKey;try{const o=await s({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:e,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!o.success){throw new Error(`创建视频任务失败: ${o.message}`)}const i=o.data.Payload.TaskId;const n=await this.pollVideoProgress(i);if(n){this.generatedVideoUrl=n;this.playGeneratedVideo(n)}}catch(t){console.error("数字人视频生成失败:",t)}}async pollVideoProgress(t){const e=45;const o=2e3;for(let i=0;i<e;i++){try{const e=await s({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:t}});if(!e.success){throw new Error(`查询进度失败: ${e.message}`)}const i=e.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((t=>setTimeout(t,o)))}catch(t){console.error("轮询视频进度失败:",t);break}}throw new Error("视频生成超时")}async preloadVideo(t){return new Promise(((e,o)=>{const i=document.createElement("video");i.preload="auto";i.src=t;const n=()=>{i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);e()};const r=()=>{console.error("视频预加载失败:",t);i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);o(new Error("视频预加载失败"))};i.addEventListener("canplaythrough",n);i.addEventListener("error",r);i.load()}))}async playGeneratedVideo(t){try{await this.preloadVideo(t);this.currentVideoUrl=t;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:t});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=t;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((t=>{console.error("播放生成视频失败:",t)}))}}))}catch(e){console.error("预加载视频失败,直接切换:",e);this.currentVideoUrl=t;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:t});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=t;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((t=>{console.error("播放生成视频失败:",t)}))}}))}}handleVideoEnded=()=>{if(this.isPlayingGenerated){this.videoEnded.emit({videoUrl:this.currentVideoUrl});const t=this.dynamicDefaultVideoUrl;this.currentVideoUrl=t;this.isPlayingGenerated=false;requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=t;this.videoElement.loop=true;this.videoElement.playbackRate=1;this.videoElement.play().catch((t=>{console.error("播放默认视频失败:",t)}))}}))}};render(){return i("div",{key:"9673d244bf67aa041eccaf3377a7195f50dc5ef9",class:"digital-human-container"},i("video",{key:"a18a2ee9e9e5f2d991048aeab54563f7a6350408",autoplay:true,playsinline:true,loop:true,onEnded:this.handleVideoEnded,ref:t=>this.videoElement=t}))}static get watchers(){return{isStreaming:["handleStreamingChange"]}}};It.style=Ct+zt;const St=":host{display:block}.drawer-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.drawer-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.drawer-content{position:fixed;top:0;right:0;bottom:0;display:flex;flex-direction:column;background-color:#fff;box-shadow:-2px 0 8px rgba(0, 0, 0, 0.15);transform:translateX(100%);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.drawer-content-visible{transform:translateX(0)}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0}.drawer-title{flex:1;min-width:0;margin:0;font-size:16px;line-height:22px;font-weight:500;color:rgba(0, 0, 0, 0.85);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drawer-header-actions{display:flex;align-items:center;flex:0 0 auto}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.drawer-body{flex:1;padding:24px;overflow:auto}@media (max-width: 768px){.drawer-content{width:100% !important}.drawer-header{padding:12px 16px}.drawer-body{padding:16px}}";const jt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const _t=class{constructor(t){e(this,t);this.closed=o(this,"closed");this.afterOpen=o(this,"afterOpen");this.afterClose=o(this,"afterClose")}isOpen=false;drawerTitle="";width="378px";height="378px";closable=true;maskClosable=true;closed;afterOpen;afterClose;get hostElement(){return t(this)}zIndex=1500;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(t){if(t){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const t=this.hostElement.shadowRoot.querySelector(".drawer-content");if(t){this.transitionEndHandler=()=>{this.afterOpen.emit()};t.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const t=this.hostElement.shadowRoot.querySelector(".drawer-content");if(t){this.transitionEndHandler=()=>{this.afterClose.emit()};t.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const t=S.getItem("modal-zIndex");if(t){this.zIndex=t+500}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const t=this.hostElement.shadowRoot?.querySelector(".drawer-content");if(t&&this.transitionEndHandler){t.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleClose()}};handleClose=()=>{this.isOpen=false;this.closed.emit()};render(){const t={width:this.width,zIndex:`${this.zIndex+1}`};const e={zIndex:`${this.zIndex}`};return i("div",{key:"b286ab010c409f20383055c1933fb24d5bb88319",class:{"drawer-container":true,"drawer-open":this.isOpen}},i("div",{key:"fdf4345eb9f364b7f29d506aa8f5c9633353427c",class:{"drawer-mask":true,"mask-visible":this.isOpen},style:e,onClick:this.handleMaskClick}),i("div",{key:"275e38dad372c9d4c5cc348af7a743e1b3bddcdb",class:{"drawer-content":true,"drawer-content-visible":this.isOpen},style:t},i("div",{key:"e0db8aafb3b220f4b43a7a1f2277258704feb7d4",class:"drawer-header"},this.drawerTitle&&i("div",{key:"f2434f5eb2989b459a261ec1f51f50f90bd8a6fb",class:"drawer-title"},this.drawerTitle),i("div",{key:"94d2388781754ce2fdd159686388fc87cc9f9880",class:"drawer-header-actions"},i("slot",{key:"d792c926125a5f1b6cac5d417296819b88676adb",name:"header-actions"})),this.closable&&i("button",{key:"b864d9a7d489e7693b8dce1edabc681ea6a084ea",class:"close-button",onClick:this.handleClose},i("span",{key:"4296280f505c7d11ef1e15d0e75853e433eb32e2"},"×"))),i("div",{key:"1a502cddb4ac7f6865508a7dac1e040d519a4b13",class:"drawer-body"},i("slot",{key:"595b505b439dac20058c6f9c9366f076dd063014"}))))}static get watchers(){return{isOpen:["visibleChanged"]}}};_t.style=St+jt;const Tt=".modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);display:flex;align-items:flex-start;justify-content:center;z-index:1000;backdrop-filter:blur(4px)}.modal-container{background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:min(1000px, calc(100vw - 40px));max-height:calc(100vh - 40px);width:100%;display:flex;flex-direction:column;overflow:hidden}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;background:#fafafa}.modal-title{display:flex;align-items:center;gap:16px;font-size:16px;font-weight:600;color:#262626}.modal-close{background:none;border:none;font-size:18px;color:#8c8c8c;cursor:pointer;padding:4px;border-radius:4px;transition:all 0.2s}.modal-close:hover{background-color:#f5f5f5;color:#262626}.modal-body{padding:24px;flex:1;overflow:auto}.btn{border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:400;transition:all 0.2s;display:inline-flex;align-items:center;justify-content:center;gap:4px}.btn-small{padding:4px 8px;font-size:12px}.btn-medium{padding:8px 16px}.btn-primary{background-color:#1890ff;color:white;border:1px solid #1890ff}.btn-primary:hover{background-color:#40a9ff;border-color:#40a9ff}.btn-default{background-color:white;color:#595959;border:1px solid #d9d9d9}.btn-default:hover{background-color:#f5f5f5;border-color:#40a9ff;color:#40a9ff}.btn-danger{background-color:#f5222d;color:white;border:1px solid #f5222d}.btn-danger:hover{background-color:#cf1322;border-color:#cf1322}.table-container{border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;margin-bottom:16px}.table{width:100%;border-collapse:collapse;background:white}.table th{background-color:#fafafa;padding:12px 16px;font-weight:600;color:#262626;border-bottom:1px solid #f0f0f0;font-size:14px}.table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:#595959;font-size:14px}.table tbody tr:hover{background-color:#f5f5f5}.table tbody tr:last-child td{border-bottom:none}.tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:400;color:white;text-align:center;min-width:60px}.action-buttons{display:flex;gap:8px}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.empty-icon{font-size:48px;margin-bottom:16px;opacity:0.6}.empty-text{font-size:14px;color:#8c8c8c}.pagination-container{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-top:1px solid #f0f0f0}.pagination-info{color:#8c8c8c;font-size:14px}.pagination-controls{display:flex;align-items:center;gap:12px}.pagination-btn{padding:6px 12px;border:1px solid #d9d9d9;background:white;color:#595959;border-radius:4px;cursor:pointer;font-size:14px;transition:all 0.2s}.pagination-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff}.pagination-btn:disabled{background-color:#f5f5f5;color:#bfbfbf;cursor:not-allowed;border-color:#f0f0f0}.pagination-current{color:#262626;font-size:14px;font-weight:500;padding:0 8px}.pagination-size-select{padding:6px 8px;border:1px solid #d9d9d9;border-radius:4px;background:white;color:#595959;font-size:14px;cursor:pointer;transition:all 0.2s}.pagination-size-select:hover{border-color:#40a9ff}.pagination-size-select:focus{outline:none;border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.message{position:fixed;top:24px;left:50%;transform:translateX(-50%);padding:12px 24px;border-radius:6px;font-size:14px;font-weight:500;z-index:1100;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);animation:messageSlideIn 0.3s ease-out}.message-success{background-color:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.message-error{background-color:#fff2f0;color:#ff4d4f;border:1px solid #ffccc7}@keyframes messageSlideIn{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}@media (max-width: 768px){.modal-container{margin:20px;max-width:calc(100vw - 40px)}.modal-header{padding:12px 16px}.modal-body{padding:16px}.table th,.table td{padding:8px 12px;font-size:13px}.pagination-container{flex-direction:column;gap:12px;align-items:stretch}.pagination-controls{justify-content:center}.modal-title{font-size:14px;gap:8px}}@media (max-width: 480px){.table-container{overflow-x:auto}.table{min-width:600px}.action-buttons{flex-direction:column;gap:4px}}";const Ft={page:1,size:10};const Mt={0:{text:"处理中",color:"#1890ff"},1:{text:"已完成",color:"#52c41a"},"-1":{text:"失败",color:"#ff4d4f"}};const Et=class{constructor(t){e(this,t);this.cancel=o(this,"cancel")}botId;sourceId;open=false;cancel;loading=true;pagination=Ft;data=[];showMessage=false;messageText="";messageType="success";watchOpen(t){if(t){this.fetchData(this.pagination)}}async fetchData(t){this.loading=true;try{const e=await s({url:"/sdk/v1/export_batch/page",method:"GET",params:{page:t.page,size:t.size,bot_id:this.botId,source_id:this.sourceId}});if(e.success&&e.data){const o=e?.data?.records??[];this.data=o;this.pagination={...t,total:e?.data?.total??0}}}catch(t){console.error("Failed to fetch data:",t)}finally{this.loading=false}}async handleDownload(t){try{const e=await l(t.cos_key);const o=t.file_name;if(e){const t=document.createElement("a");t.href=e;t.setAttribute("download",o);document.body.appendChild(t);t.click();t.remove();this.showMessageToast("下载成功","success")}else{this.showMessageToast("获取下载链接失败","error")}}catch(t){this.showMessageToast("下载失败","error")}}async handleDelete(t){try{const e=await s({url:`/sdk/v1/export_batch/delete/${t.id}`,method:"DELETE"});if(e?.success){this.showMessageToast("删除成功","success");setTimeout((()=>{this.fetchData(this.pagination)}),100)}}catch(t){this.showMessageToast(`删除失败: ${t.message}`,"error")}}showMessageToast(t,e){this.messageText=t;this.messageType=e;this.showMessage=true;setTimeout((()=>{this.showMessage=false}),3e3)}handleRefresh=()=>{this.fetchData(this.pagination)};handlePageChange=(t,e)=>{const o={...this.pagination,page:t,size:e};this.fetchData(o)};formatDate(t){const e=new Date(t);return e.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}renderEmpty(){return i("div",{class:"empty-container"},i("div",{class:"empty-icon"},"📄"),i("div",{class:"empty-text"},"暂无任务"))}renderTag(t){const e=Mt[t.toString()]||{text:"未知",color:"#d9d9d9"};return i("span",{class:"tag",style:{backgroundColor:e.color}},e.text)}renderButton(t,e,o="default",n="medium"){return i("button",{class:`btn btn-${o} btn-${n}`,onClick:e},t)}renderTable(){if(this.loading){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中..."))}if(!this.data||this.data.length===0){return this.renderEmpty()}return i("div",{class:"table-container"},i("table",{class:"table"},i("thead",null,i("tr",null,i("th",{style:{width:"300px",textAlign:"center"}},"文件名"),i("th",{style:{width:"100px",textAlign:"center"}},"状态"),i("th",{style:{width:"180px",textAlign:"center"}},"创建时间"),i("th",{style:{width:"100px",textAlign:"left"}},"操作"))),i("tbody",null,this.data.map((t=>i("tr",{key:t.id},i("td",{style:{textAlign:"center"}},t.file_name),i("td",{style:{textAlign:"center"}},this.renderTag(t.status)),i("td",{style:{textAlign:"center"}},this.formatDate(t.created_at)),i("td",{style:{textAlign:"left"}},i("div",{class:"action-buttons"},t.status!==0&&this.renderButton("删除",(()=>this.handleDelete(t)),"danger","small"),t.cos_key&&this.renderButton("下载",(()=>this.handleDownload(t)),"primary","small")))))))))}renderPagination(){if(!this.pagination.total||this.pagination.total===0){return null}const t=Math.ceil(this.pagination.total/this.pagination.size);const e=this.pagination.page;return i("div",{class:"pagination-container"},i("div",{class:"pagination-info"},"共",this.pagination.total,"条"),i("div",{class:"pagination-controls"},i("button",{class:"pagination-btn",disabled:e<=1,onClick:()=>this.handlePageChange(e-1,this.pagination.size)},"上一页"),i("span",{class:"pagination-current"},e," / ",t),i("button",{class:"pagination-btn",disabled:e>=t,onClick:()=>this.handlePageChange(e+1,this.pagination.size)},"下一页"),i("select",{class:"pagination-size-select",onChange:t=>this.handlePageChange(1,parseInt(t.target.value))},i("option",{value:"10",selected:this.pagination.size===10},"10条/页"),i("option",{value:"20",selected:this.pagination.size===20},"20条/页"),i("option",{value:"50",selected:this.pagination.size===50},"50条/页"))))}renderMessage(){if(!this.showMessage)return null;return i("div",{class:`message message-${this.messageType}`},this.messageText)}render(){if(!this.open){return null}return i("div",{class:"modal-overlay",onClick:()=>this.cancel.emit()},i("div",{class:"modal-container",onClick:t=>t.stopPropagation()},i("div",{class:"modal-header"},i("div",{class:"modal-title"},i("span",null,"导出任务列表"),this.renderButton("🔄 刷新",this.handleRefresh,"default","small")),i("button",{class:"modal-close",onClick:()=>this.cancel.emit()},"✕")),i("div",{class:"modal-body"},this.renderTable(),this.renderPagination()),this.renderMessage()))}static get watchers(){return{open:["watchOpen"]}}};Et.style=Tt;const Dt=".pcm-message{position:fixed;top:20px;left:50%;transform:translateX(-50%) translateY(-100%);background-color:#fff;padding:10px 16px;border-radius:4px;box-shadow:0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);pointer-events:all;z-index:1010;opacity:0;transition:all 0.3s}.pcm-message-visible{transform:translateX(-50%) translateY(0);opacity:1}.pcm-message-content{display:flex;align-items:center}.pcm-message-icon{margin-right:8px;font-size:16px;line-height:1}.pcm-message-success .pcm-message-icon{color:#52c41a}.pcm-message-error .pcm-message-icon{color:#ff4d4f}.pcm-message-warning .pcm-message-icon{color:#faad14}.pcm-message-info .pcm-message-icon{color:#1890ff}.pcm-message-text{font-size:14px;line-height:1.5}.pcm-message-container{position:fixed;top:20px;left:0;width:100%;display:flex;flex-direction:column;align-items:center;pointer-events:none;z-index:1010}";const Bt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Rt=class{constructor(t){e(this,t)}get el(){return t(this)}content="";type="info";duration=3e3;visible=false;timer;componentWillLoad(){if(this.content){this.visible=true}}componentDidLoad(){if(this.visible&&this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}disconnectedCallback(){if(this.timer){clearTimeout(this.timer)}}async show(){this.visible=true;if(this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}async close(){this.visible=false;setTimeout((()=>{if(this.el&&this.el.parentNode){this.el.parentNode.removeChild(this.el)}}),300)}render(){return i("div",{key:"57fa15e1b08ec7918eb4ed1431c8715c926a8017",class:{"pcm-message":true,"pcm-message-visible":this.visible,[`pcm-message-${this.type}`]:true}},i("div",{key:"f8b6e081018ddbbac35ffa98d895d6212093c4fd",class:"pcm-message-content"},i("span",{key:"9c5e709f8e682ed9bfa96d18b683bc6db2ddc2ac",class:"pcm-message-icon"},this.renderIcon()),i("span",{key:"9293ee930786b8b3d346459f1c57b8452332ba7e",class:"pcm-message-text"},this.content)))}renderIcon(){switch(this.type){case"success":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}));case"error":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}));case"warning":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}));default:return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 664c-30.9 0-56-25.1-56-56 0-30.9 25.1-56 56-56s56 25.1 56 56c0 30.9-25.1 56-56 56zm32-296c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V248c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184z"}))}}};Rt.style=Dt+Bt;var Ot={exports:{}};var At;function Ht(){if(At)return Ot.exports;At=1;(function(t,e){var o=function(){var t=function(t,e){var i=236;var r=17;var f=t;var u=o[e];var g=null;var m=0;var x=null;var y=[];var w={};var v=function(t,e){m=f*4+17;g=function(t){var e=new Array(t);for(var o=0;o<t;o+=1){e[o]=new Array(t);for(var i=0;i<t;i+=1){e[o][i]=null}}return e}(m);k(0,0);k(m-7,0);k(0,m-7);I();z();j(t,e);if(f>=7){S(t)}if(x==null){x=F(f,u,y)}_(x,e)};var k=function(t,e){for(var o=-1;o<=7;o+=1){if(t+o<=-1||m<=t+o)continue;for(var i=-1;i<=7;i+=1){if(e+i<=-1||m<=e+i)continue;if(0<=o&&o<=6&&(i==0||i==6)||0<=i&&i<=6&&(o==0||o==6)||2<=o&&o<=4&&2<=i&&i<=4){g[t+o][e+i]=true}else{g[t+o][e+i]=false}}}};var C=function(){var t=0;var e=0;for(var o=0;o<8;o+=1){v(true,o);var i=n.getLostPoint(w);if(o==0||t>i){t=i;e=o}}return e};var z=function(){for(var t=8;t<m-8;t+=1){if(g[t][6]!=null){continue}g[t][6]=t%2==0}for(var e=8;e<m-8;e+=1){if(g[6][e]!=null){continue}g[6][e]=e%2==0}};var I=function(){var t=n.getPatternPosition(f);for(var e=0;e<t.length;e+=1){for(var o=0;o<t.length;o+=1){var i=t[e];var r=t[o];if(g[i][r]!=null){continue}for(var a=-2;a<=2;a+=1){for(var s=-2;s<=2;s+=1){if(a==-2||a==2||s==-2||s==2||a==0&&s==0){g[i+a][r+s]=true}else{g[i+a][r+s]=false}}}}}};var S=function(t){var e=n.getBCHTypeNumber(f);for(var o=0;o<18;o+=1){var i=!t&&(e>>o&1)==1;g[Math.floor(o/3)][o%3+m-8-3]=i}for(var o=0;o<18;o+=1){var i=!t&&(e>>o&1)==1;g[o%3+m-8-3][Math.floor(o/3)]=i}};var j=function(t,e){var o=u<<3|e;var i=n.getBCHTypeInfo(o);for(var r=0;r<15;r+=1){var a=!t&&(i>>r&1)==1;if(r<6){g[r][8]=a}else if(r<8){g[r+1][8]=a}else{g[m-15+r][8]=a}}for(var r=0;r<15;r+=1){var a=!t&&(i>>r&1)==1;if(r<8){g[8][m-r-1]=a}else if(r<9){g[8][15-r-1+1]=a}else{g[8][15-r-1]=a}}g[m-8][8]=!t};var _=function(t,e){var o=-1;var i=m-1;var r=7;var a=0;var s=n.getMaskFunction(e);for(var l=m-1;l>0;l-=2){if(l==6)l-=1;while(true){for(var d=0;d<2;d+=1){if(g[i][l-d]==null){var c=false;if(a<t.length){c=(t[a]>>>r&1)==1}var p=s(i,l-d);if(p){c=!c}g[i][l-d]=c;r-=1;if(r==-1){a+=1;r=7}}}i+=o;if(i<0||m<=i){i-=o;o=-o;break}}}};var T=function(t,e){var o=0;var i=0;var r=0;var s=new Array(e.length);var l=new Array(e.length);for(var d=0;d<e.length;d+=1){var c=e[d].dataCount;var p=e[d].totalCount-c;i=Math.max(i,c);r=Math.max(r,p);s[d]=new Array(c);for(var h=0;h<s[d].length;h+=1){s[d][h]=255&t.getBuffer()[h+o]}o+=c;var f=n.getErrorCorrectPolynomial(p);var u=a(s[d],f.getLength()-1);var g=u.mod(f);l[d]=new Array(f.getLength()-1);for(var h=0;h<l[d].length;h+=1){var m=h+g.getLength()-l[d].length;l[d][h]=m>=0?g.getAt(m):0}}var b=0;for(var h=0;h<e.length;h+=1){b+=e[h].totalCount}var x=new Array(b);var y=0;for(var h=0;h<i;h+=1){for(var d=0;d<e.length;d+=1){if(h<s[d].length){x[y]=s[d][h];y+=1}}}for(var h=0;h<r;h+=1){for(var d=0;d<e.length;d+=1){if(h<l[d].length){x[y]=l[d][h];y+=1}}}return x};var F=function(t,e,o){var a=s.getRSBlocks(t,e);var d=l();for(var c=0;c<o.length;c+=1){var p=o[c];d.put(p.getMode(),4);d.put(p.getLength(),n.getLengthInBits(p.getMode(),t));p.write(d)}var h=0;for(var c=0;c<a.length;c+=1){h+=a[c].dataCount}if(d.getLengthInBits()>h*8){throw"code length overflow. ("+d.getLengthInBits()+">"+h*8+")"}if(d.getLengthInBits()+4<=h*8){d.put(0,4)}while(d.getLengthInBits()%8!=0){d.putBit(false)}while(true){if(d.getLengthInBits()>=h*8){break}d.put(i,8);if(d.getLengthInBits()>=h*8){break}d.put(r,8)}return T(d,a)};w.addData=function(t,e){e=e||"Byte";var o=null;switch(e){case"Numeric":o=d(t);break;case"Alphanumeric":o=c(t);break;case"Byte":o=p(t);break;case"Kanji":o=h(t);break;default:throw"mode:"+e}y.push(o);x=null};w.isDark=function(t,e){if(t<0||m<=t||e<0||m<=e){throw t+","+e}return g[t][e]};w.getModuleCount=function(){return m};w.make=function(){if(f<1){var t=1;for(;t<40;t++){var e=s.getRSBlocks(t,u);var o=l();for(var i=0;i<y.length;i++){var r=y[i];o.put(r.getMode(),4);o.put(r.getLength(),n.getLengthInBits(r.getMode(),t));r.write(o)}var a=0;for(var i=0;i<e.length;i++){a+=e[i].dataCount}if(o.getLengthInBits()<=a*8){break}}f=t}v(false,C())};w.createTableTag=function(t,e){t=t||2;e=typeof e=="undefined"?t*4:e;var o="";o+='<table style="';o+=" border-width: 0px; border-style: none;";o+=" border-collapse: collapse;";o+=" padding: 0px; margin: "+e+"px;";o+='">';o+="<tbody>";for(var i=0;i<w.getModuleCount();i+=1){o+="<tr>";for(var n=0;n<w.getModuleCount();n+=1){o+='<td style="';o+=" border-width: 0px; border-style: none;";o+=" border-collapse: collapse;";o+=" padding: 0px; margin: 0px;";o+=" width: "+t+"px;";o+=" height: "+t+"px;";o+=" background-color: ";o+=w.isDark(i,n)?"#000000":"#ffffff";o+=";";o+='"/>'}o+="</tr>"}o+="</tbody>";o+="</table>";return o};w.createSvgTag=function(t,e,o,i){var n={};if(typeof arguments[0]=="object"){n=arguments[0];t=n.cellSize;e=n.margin;o=n.alt;i=n.title}t=t||2;e=typeof e=="undefined"?t*4:e;o=typeof o==="string"?{text:o}:o||{};o.text=o.text||null;o.id=o.text?o.id||"qrcode-description":null;i=typeof i==="string"?{text:i}:i||{};i.text=i.text||null;i.id=i.text?i.id||"qrcode-title":null;var r=w.getModuleCount()*t+e*2;var a,s,l,d,c="",p;p="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ";c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"';c+=!n.scalable?' width="'+r+'px" height="'+r+'px"':"";c+=' viewBox="0 0 '+r+" "+r+'" ';c+=' preserveAspectRatio="xMinYMin meet"';c+=i.text||o.text?' role="img" aria-labelledby="'+M([i.id,o.id].join(" ").trim())+'"':"";c+=">";c+=i.text?'<title id="'+M(i.id)+'">'+M(i.text)+"</title>":"";c+=o.text?'<description id="'+M(o.id)+'">'+M(o.text)+"</description>":"";c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>';c+='<path d="';for(l=0;l<w.getModuleCount();l+=1){d=l*t+e;for(a=0;a<w.getModuleCount();a+=1){if(w.isDark(l,a)){s=a*t+e;c+="M"+s+","+d+p}}}c+='" stroke="transparent" fill="black"/>';c+="</svg>";return c};w.createDataURL=function(t,e){t=t||2;e=typeof e=="undefined"?t*4:e;var o=w.getModuleCount()*t+e*2;var i=e;var n=o-e;return b(o,o,(function(e,o){if(i<=e&&e<n&&i<=o&&o<n){var r=Math.floor((e-i)/t);var a=Math.floor((o-i)/t);return w.isDark(a,r)?0:1}else{return 1}}))};w.createImgTag=function(t,e,o){t=t||2;e=typeof e=="undefined"?t*4:e;var i=w.getModuleCount()*t+e*2;var n="";n+="<img";n+=' src="';n+=w.createDataURL(t,e);n+='"';n+=' width="';n+=i;n+='"';n+=' height="';n+=i;n+='"';if(o){n+=' alt="';n+=M(o);n+='"'}n+="/>";return n};var M=function(t){var e="";for(var o=0;o<t.length;o+=1){var i=t.charAt(o);switch(i){case"<":e+="<";break;case">":e+=">";break;case"&":e+="&";break;case'"':e+=""";break;default:e+=i;break}}return e};var E=function(t){var e=1;t=typeof t=="undefined"?e*2:t;var o=w.getModuleCount()*e+t*2;var i=t;var n=o-t;var r,a,s,l,d;var c={"██":"█","█ ":"▀"," █":"▄"," ":" "};var p={"██":"▀","█ ":"▀"," █":" "," ":" "};var h="";for(r=0;r<o;r+=2){s=Math.floor((r-i)/e);l=Math.floor((r+1-i)/e);for(a=0;a<o;a+=1){d="█";if(i<=a&&a<n&&i<=r&&r<n&&w.isDark(s,Math.floor((a-i)/e))){d=" "}if(i<=a&&a<n&&i<=r+1&&r+1<n&&w.isDark(l,Math.floor((a-i)/e))){d+=" "}else{d+="█"}h+=t<1&&r+1>=n?p[d]:c[d]}h+="\n"}if(o%2&&t>0){return h.substring(0,h.length-o-1)+Array(o+1).join("▀")}return h.substring(0,h.length-1)};w.createASCII=function(t,e){t=t||1;if(t<2){return E(e)}t-=1;e=typeof e=="undefined"?t*2:e;var o=w.getModuleCount()*t+e*2;var i=e;var n=o-e;var r,a,s,l;var d=Array(t+1).join("██");var c=Array(t+1).join(" ");var p="";var h="";for(r=0;r<o;r+=1){s=Math.floor((r-i)/t);h="";for(a=0;a<o;a+=1){l=1;if(i<=a&&a<n&&i<=r&&r<n&&w.isDark(s,Math.floor((a-i)/t))){l=0}h+=l?d:c}for(s=0;s<t;s+=1){p+=h+"\n"}}return p.substring(0,p.length-1)};w.renderTo2dContext=function(t,e){e=e||2;var o=w.getModuleCount();for(var i=0;i<o;i++){for(var n=0;n<o;n++){t.fillStyle=w.isDark(i,n)?"black":"white";t.fillRect(n*e,i*e,e,e)}}};return w};t.stringToBytesFuncs={default:function(t){var e=[];for(var o=0;o<t.length;o+=1){var i=t.charCodeAt(o);e.push(i&255)}return e}};t.stringToBytes=t.stringToBytesFuncs["default"];t.createStringToBytes=function(t,e){var o=function(){var o=g(t);var i=function(){var t=o.read();if(t==-1)throw"eof";return t};var n=0;var r={};while(true){var a=o.read();if(a==-1)break;var s=i();var l=i();var d=i();var c=String.fromCharCode(a<<8|s);var p=l<<8|d;r[c]=p;n+=1}if(n!=e){throw n+" != "+e}return r}();var i="?".charCodeAt(0);return function(t){var e=[];for(var n=0;n<t.length;n+=1){var r=t.charCodeAt(n);if(r<128){e.push(r)}else{var a=o[t.charAt(n)];if(typeof a=="number"){if((a&255)==a){e.push(a)}else{e.push(a>>>8);e.push(a&255)}}else{e.push(i)}}}return e}};var e={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3};var o={L:1,M:0,Q:3,H:2};var i={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=function(){var t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];var o=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;var n=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;var s=1<<14|1<<12|1<<10|1<<4|1<<1;var l={};var d=function(t){var e=0;while(t!=0){e+=1;t>>>=1}return e};l.getBCHTypeInfo=function(t){var e=t<<10;while(d(e)-d(o)>=0){e^=o<<d(e)-d(o)}return(t<<10|e)^s};l.getBCHTypeNumber=function(t){var e=t<<12;while(d(e)-d(n)>=0){e^=n<<d(e)-d(n)}return t<<12|e};l.getPatternPosition=function(e){return t[e-1]};l.getMaskFunction=function(t){switch(t){case i.PATTERN000:return function(t,e){return(t+e)%2==0};case i.PATTERN001:return function(t,e){return t%2==0};case i.PATTERN010:return function(t,e){return e%3==0};case i.PATTERN011:return function(t,e){return(t+e)%3==0};case i.PATTERN100:return function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0};case i.PATTERN101:return function(t,e){return t*e%2+t*e%3==0};case i.PATTERN110:return function(t,e){return(t*e%2+t*e%3)%2==0};case i.PATTERN111:return function(t,e){return(t*e%3+(t+e)%2)%2==0};default:throw"bad maskPattern:"+t}};l.getErrorCorrectPolynomial=function(t){var e=a([1],0);for(var o=0;o<t;o+=1){e=e.multiply(a([1,r.gexp(o)],0))}return e};l.getLengthInBits=function(t,o){if(1<=o&&o<10){switch(t){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw"mode:"+t}}else if(o<27){switch(t){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw"mode:"+t}}else if(o<41){switch(t){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw"mode:"+t}}else{throw"type:"+o}};l.getLostPoint=function(t){var e=t.getModuleCount();var o=0;for(var i=0;i<e;i+=1){for(var n=0;n<e;n+=1){var r=0;var a=t.isDark(i,n);for(var s=-1;s<=1;s+=1){if(i+s<0||e<=i+s){continue}for(var l=-1;l<=1;l+=1){if(n+l<0||e<=n+l){continue}if(s==0&&l==0){continue}if(a==t.isDark(i+s,n+l)){r+=1}}}if(r>5){o+=3+r-5}}}for(var i=0;i<e-1;i+=1){for(var n=0;n<e-1;n+=1){var d=0;if(t.isDark(i,n))d+=1;if(t.isDark(i+1,n))d+=1;if(t.isDark(i,n+1))d+=1;if(t.isDark(i+1,n+1))d+=1;if(d==0||d==4){o+=3}}}for(var i=0;i<e;i+=1){for(var n=0;n<e-6;n+=1){if(t.isDark(i,n)&&!t.isDark(i,n+1)&&t.isDark(i,n+2)&&t.isDark(i,n+3)&&t.isDark(i,n+4)&&!t.isDark(i,n+5)&&t.isDark(i,n+6)){o+=40}}}for(var n=0;n<e;n+=1){for(var i=0;i<e-6;i+=1){if(t.isDark(i,n)&&!t.isDark(i+1,n)&&t.isDark(i+2,n)&&t.isDark(i+3,n)&&t.isDark(i+4,n)&&!t.isDark(i+5,n)&&t.isDark(i+6,n)){o+=40}}}var c=0;for(var n=0;n<e;n+=1){for(var i=0;i<e;i+=1){if(t.isDark(i,n)){c+=1}}}var p=Math.abs(100*c/e/e-50)/5;o+=p*10;return o};return l}();var r=function(){var t=new Array(256);var e=new Array(256);for(var o=0;o<8;o+=1){t[o]=1<<o}for(var o=8;o<256;o+=1){t[o]=t[o-4]^t[o-5]^t[o-6]^t[o-8]}for(var o=0;o<255;o+=1){e[t[o]]=o}var i={};i.glog=function(t){if(t<1){throw"glog("+t+")"}return e[t]};i.gexp=function(e){while(e<0){e+=255}while(e>=256){e-=255}return t[e]};return i}();function a(t,e){if(typeof t.length=="undefined"){throw t.length+"/"+e}var o=function(){var o=0;while(o<t.length&&t[o]==0){o+=1}var i=new Array(t.length-o+e);for(var n=0;n<t.length-o;n+=1){i[n]=t[n+o]}return i}();var i={};i.getAt=function(t){return o[t]};i.getLength=function(){return o.length};i.multiply=function(t){var e=new Array(i.getLength()+t.getLength()-1);for(var o=0;o<i.getLength();o+=1){for(var n=0;n<t.getLength();n+=1){e[o+n]^=r.gexp(r.glog(i.getAt(o))+r.glog(t.getAt(n)))}}return a(e,0)};i.mod=function(t){if(i.getLength()-t.getLength()<0){return i}var e=r.glog(i.getAt(0))-r.glog(t.getAt(0));var o=new Array(i.getLength());for(var n=0;n<i.getLength();n+=1){o[n]=i.getAt(n)}for(var n=0;n<t.getLength();n+=1){o[n]^=r.gexp(r.glog(t.getAt(n))+e)}return a(o,0).mod(t)};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];var e=function(t,e){var o={};o.totalCount=t;o.dataCount=e;return o};var i={};var n=function(e,i){switch(i){case o.L:return t[(e-1)*4+0];case o.M:return t[(e-1)*4+1];case o.Q:return t[(e-1)*4+2];case o.H:return t[(e-1)*4+3];default:return undefined}};i.getRSBlocks=function(t,o){var i=n(t,o);if(typeof i=="undefined"){throw"bad rs block @ typeNumber:"+t+"/errorCorrectionLevel:"+o}var r=i.length/3;var a=[];for(var s=0;s<r;s+=1){var l=i[s*3+0];var d=i[s*3+1];var c=i[s*3+2];for(var p=0;p<l;p+=1){a.push(e(d,c))}}return a};return i}();var l=function(){var t=[];var e=0;var o={};o.getBuffer=function(){return t};o.getAt=function(e){var o=Math.floor(e/8);return(t[o]>>>7-e%8&1)==1};o.put=function(t,e){for(var i=0;i<e;i+=1){o.putBit((t>>>e-i-1&1)==1)}};o.getLengthInBits=function(){return e};o.putBit=function(o){var i=Math.floor(e/8);if(t.length<=i){t.push(0)}if(o){t[i]|=128>>>e%8}e+=1};return o};var d=function(t){var o=e.MODE_NUMBER;var i=t;var n={};n.getMode=function(){return o};n.getLength=function(t){return i.length};n.write=function(t){var e=i;var o=0;while(o+2<e.length){t.put(r(e.substring(o,o+3)),10);o+=3}if(o<e.length){if(e.length-o==1){t.put(r(e.substring(o,o+1)),4)}else if(e.length-o==2){t.put(r(e.substring(o,o+2)),7)}}};var r=function(t){var e=0;for(var o=0;o<t.length;o+=1){e=e*10+a(t.charAt(o))}return e};var a=function(t){if("0"<=t&&t<="9"){return t.charCodeAt(0)-"0".charCodeAt(0)}throw"illegal char :"+t};return n};var c=function(t){var o=e.MODE_ALPHA_NUM;var i=t;var n={};n.getMode=function(){return o};n.getLength=function(t){return i.length};n.write=function(t){var e=i;var o=0;while(o+1<e.length){t.put(r(e.charAt(o))*45+r(e.charAt(o+1)),11);o+=2}if(o<e.length){t.put(r(e.charAt(o)),6)}};var r=function(t){if("0"<=t&&t<="9"){return t.charCodeAt(0)-"0".charCodeAt(0)}else if("A"<=t&&t<="Z"){return t.charCodeAt(0)-"A".charCodeAt(0)+10}else{switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}}};return n};var p=function(o){var i=e.MODE_8BIT_BYTE;var n=t.stringToBytes(o);var r={};r.getMode=function(){return i};r.getLength=function(t){return n.length};r.write=function(t){for(var e=0;e<n.length;e+=1){t.put(n[e],8)}};return r};var h=function(o){var i=e.MODE_KANJI;var n=t.stringToBytesFuncs["SJIS"];if(!n){throw"sjis not supported."}!function(t,e){var o=n(t);if(o.length!=2||(o[0]<<8|o[1])!=e){throw"sjis not supported."}}("友",38726);var r=n(o);var a={};a.getMode=function(){return i};a.getLength=function(t){return~~(r.length/2)};a.write=function(t){var e=r;var o=0;while(o+1<e.length){var i=(255&e[o])<<8|255&e[o+1];if(33088<=i&&i<=40956){i-=33088}else if(57408<=i&&i<=60351){i-=49472}else{throw"illegal char at "+(o+1)+"/"+i}i=(i>>>8&255)*192+(i&255);t.put(i,13);o+=2}if(o<e.length){throw"illegal char at "+(o+1)}};return a};var f=function(){var t=[];var e={};e.writeByte=function(e){t.push(e&255)};e.writeShort=function(t){e.writeByte(t);e.writeByte(t>>>8)};e.writeBytes=function(t,o,i){o=o||0;i=i||t.length;for(var n=0;n<i;n+=1){e.writeByte(t[n+o])}};e.writeString=function(t){for(var o=0;o<t.length;o+=1){e.writeByte(t.charCodeAt(o))}};e.toByteArray=function(){return t};e.toString=function(){var e="";e+="[";for(var o=0;o<t.length;o+=1){if(o>0){e+=","}e+=t[o]}e+="]";return e};return e};var u=function(){var t=0;var e=0;var o=0;var i="";var n={};var r=function(t){i+=String.fromCharCode(a(t&63))};var a=function(t){if(t<0);else if(t<26){return 65+t}else if(t<52){return 97+(t-26)}else if(t<62){return 48+(t-52)}else if(t==62){return 43}else if(t==63){return 47}throw"n:"+t};n.writeByte=function(i){t=t<<8|i&255;e+=8;o+=1;while(e>=6){r(t>>>e-6);e-=6}};n.flush=function(){if(e>0){r(t<<6-e);t=0;e=0}if(o%3!=0){var n=3-o%3;for(var a=0;a<n;a+=1){i+="="}}};n.toString=function(){return i};return n};var g=function(t){var e=t;var o=0;var i=0;var n=0;var r={};r.read=function(){while(n<8){if(o>=e.length){if(n==0){return-1}throw"unexpected end of file./"+n}var t=e.charAt(o);o+=1;if(t=="="){n=0;return-1}else if(t.match(/^\s$/)){continue}i=i<<6|a(t.charCodeAt(0));n+=6}var r=i>>>n-8&255;n-=8;return r};var a=function(t){if(65<=t&&t<=90){return t-65}else if(97<=t&&t<=122){return t-97+26}else if(48<=t&&t<=57){return t-48+52}else if(t==43){return 62}else if(t==47){return 63}else{throw"c:"+t}};return r};var m=function(t,e){var o=t;var i=e;var n=new Array(t*e);var r={};r.setPixel=function(t,e,i){n[e*o+t]=i};r.write=function(t){t.writeString("GIF87a");t.writeShort(o);t.writeShort(i);t.writeByte(128);t.writeByte(0);t.writeByte(0);t.writeByte(0);t.writeByte(0);t.writeByte(0);t.writeByte(255);t.writeByte(255);t.writeByte(255);t.writeString(",");t.writeShort(0);t.writeShort(0);t.writeShort(o);t.writeShort(i);t.writeByte(0);var e=2;var n=s(e);t.writeByte(e);var r=0;while(n.length-r>255){t.writeByte(255);t.writeBytes(n,r,255);r+=255}t.writeByte(n.length-r);t.writeBytes(n,r,n.length-r);t.writeByte(0);t.writeString(";")};var a=function(t){var e=t;var o=0;var i=0;var n={};n.write=function(t,n){if(t>>>n!=0){throw"length over"}while(o+n>=8){e.writeByte(255&(t<<o|i));n-=8-o;t>>>=8-o;i=0;o=0}i=t<<o|i;o=o+n};n.flush=function(){if(o>0){e.writeByte(i)}};return n};var s=function(t){var e=1<<t;var o=(1<<t)+1;var i=t+1;var r=l();for(var s=0;s<e;s+=1){r.add(String.fromCharCode(s))}r.add(String.fromCharCode(e));r.add(String.fromCharCode(o));var d=f();var c=a(d);c.write(e,i);var p=0;var h=String.fromCharCode(n[p]);p+=1;while(p<n.length){var u=String.fromCharCode(n[p]);p+=1;if(r.contains(h+u)){h=h+u}else{c.write(r.indexOf(h),i);if(r.size()<4095){if(r.size()==1<<i){i+=1}r.add(h+u)}h=u}}c.write(r.indexOf(h),i);c.write(o,i);c.flush();return d.toByteArray()};var l=function(){var t={};var e=0;var o={};o.add=function(i){if(o.contains(i)){throw"dup key:"+i}t[i]=e;e+=1};o.size=function(){return e};o.indexOf=function(e){return t[e]};o.contains=function(e){return typeof t[e]!="undefined"};return o};return r};var b=function(t,e,o){var i=m(t,e);for(var n=0;n<e;n+=1){for(var r=0;r<t;r+=1){i.setPixel(r,n,o(r,n))}}var a=f();i.write(a);var s=u();var l=a.toByteArray();for(var d=0;d<l.length;d+=1){s.writeByte(l[d])}s.flush();return"data:image/gif;base64,"+s};return t}();!function(){o.stringToBytesFuncs["UTF-8"]=function(t){function e(t){var e=[];for(var o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i<128)e.push(i);else if(i<2048){e.push(192|i>>6,128|i&63)}else if(i<55296||i>=57344){e.push(224|i>>12,128|i>>6&63,128|i&63)}else{o++;i=65536+((i&1023)<<10|t.charCodeAt(o)&1023);e.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}}return e}return e(t)}}();(function(e){{t.exports=e()}})((function(){return o}))})(Ot);return Ot.exports}var Lt=Ht();var Pt=n(Lt);const qt={number:"",isWorking:false,close:async function(t){const{onOk:e,onError:o}=t??{};const{number:i}=this;if(i){const t=await s({url:`/resource/update_id/${i}`,method:"delete"});if(t.success){this.number="";e?.()}else{o?.()}}}};const $t=".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}.qrcode-textarea{width:calc(100% - 16px);min-height:120px;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}";const Ut='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Nt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Vt=class{constructor(t){e(this,t);this.ok=o(this,"ok")}name="";rows=8;maxLength=undefined;uploadHeaders;uploadParams;QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value="";expireTime="";ok;setStartMobileUploadWrapper=t=>{qt.isWorking=t;this.setStartMobileUpload=t};qrcodeUrl="";setMobileUrlWrapper=t=>{this.mobileUrl=t;if(t){const e=Pt(0,"M");e.addData(t);e.make();this.qrcodeUrl=e.createDataURL(4,0)}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async t=>{const e=await s({url:`/sdk/v1/update_id/${t}/status`,method:"get"});if(e?.success){const t=e.data??{};const{custom_data:o}=t;this.value=o??""}if(qt.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(t)}),3e3)}};handleStartMobileUpload=async()=>{const t=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const e=this.uploadParams??{};const o={cfg:{fromUserName:"",fromUserId:"",upload:t.uploadParams,name:t.name,rows:t.rows,maxLength:t.maxLength,params:e}};const i=await s({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const t=i.data??{};qt.number=t.update_id;const e=new Date(Date.now()+3600*1e3);this.expireTime=`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`;const o=`${c}/agents/inputByCode?num=${qt.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(qt.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await qt.close({onError(){j.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";this.value="";this.open=false};render(){return i("div",{key:"a65e7eda77d4230d9907746b0b6fe94cf123680a"},i("div",{key:"dc1742230c33e30387a5f79e56a2d93ef2e0444c",class:"mobile-upload"},i("div",{key:"29ee9a45bdf306358c7d8036ac3c176f42a6a847",class:"btn btn-link",onClick:()=>{this.open=true;this.handleStartMobileUpload()}},"扫码填写")),this.open&&i("div",{key:"b8a52436f31ec644d6fac2be02ff09731cd0b7a2",class:"mask"},i("div",{key:"e1f2af3bf4e1c113a20c9d9b5d3b6af2d3942046",class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"填写过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{j.success("已复制到剪贴板")})).catch((()=>{j.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{key:"c46909a409adc63f2fde94c38c1825ed425d239f",style:{marginTop:"12px"}},!!this.value?.length&&i("textarea",{key:"99b48023a915da9c327d12862fff121ed4db9e0e",readOnly:true,class:"qrcode-textarea",value:this.value,onChange:t=>{this.value=t.target.value}})),i("div",{key:"840b059d15a2d0c232c947b4044d14be266617ae",class:"modal-footer"},i("div",{key:"aab1cb6469eb8f6594cff574b2af96121ee90090",class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),i("div",{key:"671aab6272aabcede1b92e1d946ef6aac0d0616c",class:"btn btn-primary",onClick:()=>{if(!this.value){j.info(`请输入内容`);return}if(this.value.length>this.maxLength){j.info(`输入内容不能超过${this.maxLength}个字符`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}};Vt.style=$t+(Ut+Nt);const Wt={number:"",isWorking:false,close:async function(t){const{onOk:e,onError:o}=t??{};const{number:i}=this;if(i){const t=await s({url:`/resource/update_id/${i}`,method:"delete"});if(t.success){this.number="";e?.()}else{o?.()}}}};const Jt=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}.upload-placeholder{width:100%;cursor:pointer}.upload-placeholder img{display:block;margin:0 auto}.upload-placeholder p{text-align:center}.upload-text{margin:8px 0}.upload-hint{font-size:12px;color:#999999}.file-item{display:flex;align-items:center;justify-content:space-between;padding:8px 0}.file-item-content{display:flex;align-items:center;min-width:0}.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.remove-file{border:0;background:transparent;cursor:pointer;font-size:18px}.mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}";const Qt='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Yt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Gt=class{constructor(t){e(this,t);this.ok=o(this,"ok")}multiple=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;uploadAreaMode=false;disabled=false;defaultFileList=[];uploadText="点击上传简历";QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value=[];mobileUploadFiles=[];expireTime="";ok;componentWillLoad(){this.value=[...this.defaultFileList]}async getIsUploading(){return this.startMobileUploadLoading}async clearSelectedFiles(){this.value=[]}setStartMobileUploadWrapper=t=>{Wt.isWorking=t;this.setStartMobileUpload=t};qrcodeUrl="";setMobileUrlWrapper=t=>{this.mobileUrl=t;if(t){const e=Pt(0,"M");e.addData(t);e.make();this.qrcodeUrl=e.createDataURL(4,0)}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async t=>{const e=await s({url:`/sdk/v1/update_id/${t}/status`,method:"get"});if(e?.success){const t=e.data??{};const{file_list:o}=t;this.mobileUploadFiles=o??[]}if(Wt.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(t)}),3e3)}};handleStartMobileUpload=async()=>{const t=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const e=this.uploadParams??{};const o=Array.isArray(e.tags)?e.tags:undefined;const i={is_knowledge_doc:false,tags:o,cfg:{maxSize:t.maxFileSize,maxCount:t.multiple?t.maxFileCount:1,fromUserName:"",fromUserId:"",customAccept:t.acceptFileSuffixList.join(","),upload:t.uploadParams}};const n=await s({url:`/sdk/v1/update_id`,method:"post",data:i});if(n?.success){const t=n.data??{};Wt.number=t.update_id;const e=new Date(Date.now()+3600*1e3);this.expireTime=`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`;const o=`${c}/agents/uploadFileByCode?num=${Wt.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(Wt.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async(t=true)=>{this.cancelLoading=true;await Wt.close({onError(){j.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";if(t){this.mobileUploadFiles=[]}this.open=false};handleDelete=async t=>{const e=await s({url:`/sdk/v1/update_id/${Wt.number}/file`,method:"delete",params:{update_id:Wt.number,cos_key:t}});if(e?.success){this.mobileUploadFiles=this.mobileUploadFiles.filter((e=>e.cos_key!==t));this.value=this.value.filter((e=>e.cos_key!==t));this.ok.emit(this.value)}};handleOpenUpload=()=>{if(this.disabled)return;if(this.maxFileCount<=this.value.length){j.info("文件数量已达到上限!");return}this.mobileUploadFiles=[];this.open=true;this.handleStartMobileUpload()};render(){return i("div",{key:"a27ea277ebcbcff58e694aef5b9b19dc7e46ce4e"},this.uploadAreaMode?i("div",{class:"upload-area-mode"},i("div",{class:"upload-area"},this.value.map(((t,e)=>i("div",{class:"file-item",key:t.cos_key||e},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},t.file_name)),!this.disabled&&i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.handleDelete(t.cos_key)}},"×"))))),!this.disabled&&this.value.length<this.maxFileCount&&i("div",{class:"upload-actions"},i("div",{class:"upload-placeholder",onClick:this.handleOpenUpload},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList.length&&i("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。")))):i("div",{class:"mobile-upload"},i("div",{class:"btn btn-link",onClick:this.handleOpenUpload},"扫码上传")),this.open&&i("div",{key:"a8af8a828ada96d2da206c9a029483da1488c831",class:"mask"},i("div",{key:"1720c68cee252f62c38711a08c20c6dfc67fb2af",class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"上传过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{j.success("已复制到剪贴板")})).catch((()=>{j.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{key:"99dd01fd22a23ddbbf01c65280a786eee09613b4",style:{marginTop:"12px"}},this.mobileUploadFiles.map(((t,e)=>i("div",{class:"file-item",key:e},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},t?.file_name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.handleDelete(t.cos_key)}},"×"))))),i("div",{key:"aa63da076534b68e4f85173683c41976a15adc46",class:"modal-footer"},i("div",{key:"400878dd4a2e12d8aa21f39e33c50cc6d633d917",class:"btn btn-default",onClick:()=>this.cancelMobileUpload()},"取消"),i("div",{key:"43db85335f6731246003f8f6f92c0a3e2c9f3e88",class:"btn btn-primary",onClick:()=>{if(this.value.length+this.mobileUploadFiles.length>this.maxFileCount){j.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);return}this.value=this.multiple?[...this.value,...this.mobileUploadFiles]:this.mobileUploadFiles.slice(0,1);this.ok.emit(this.value);this.cancelMobileUpload(false)}},"完成")))))}};Gt.style=Jt+(Qt+Yt);const Xt=":host{display:block;width:100%;height:100%}.position-selector-container{display:flex;flex-direction:column;width:100%;height:100%;background:#fff}.search-bar{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.search-input-wrapper{position:relative;display:flex;align-items:center;flex:1;min-width:200px;max-width:500px}.search-icon{position:absolute;left:12px;color:#bfbfbf;pointer-events:none}.search-input{width:100%;height:36px;padding:4px 36px 4px 36px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.85);background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:6px;transition:all 0.3s;outline:none}.search-input:hover{border-color:#40a9ff}.search-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.search-input::placeholder{color:#bfbfbf}.clear-button{position:absolute;right:12px;background:none;border:none;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#bfbfbf;transition:color 0.3s}.clear-button:hover{color:#8c8c8c}.search-button{padding:4px 15px;height:36px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none;white-space:nowrap;flex-shrink:0}.search-button:hover{background-color:#40a9ff;border-color:#40a9ff}.search-button:active{background-color:#096dd9;border-color:#096dd9}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;gap:16px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top-color:#1890ff;border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:16px}.empty-icon{opacity:0.5}.empty-text{margin:0;color:#8c8c8c;font-size:14px}.position-list{flex:1;overflow-y:auto;min-height:0}.table-container{width:100%;overflow-x:auto}.position-table{width:100%;border-collapse:collapse;font-size:14px}.position-table thead{background-color:#fafafa;position:sticky;top:0;z-index:1}.position-table th{padding:12px 16px;text-align:left;font-weight:500;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0;white-space:nowrap}.position-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:rgba(0, 0, 0, 0.65)}.position-table tbody tr{transition:background-color 0.3s}.position-table tbody tr:hover{background-color:#fafafa}.position-table tbody tr.selected-row{background-color:#e6f7ff}.checkbox-column{width:50px;text-align:center}.title-column{min-width:150px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.company-column{min-width:120px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.location-column{min-width:100px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.requirements-column{min-width:200px;max-width:300px}.requirements-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-break:break-word;line-height:1.5}.salary-column{min-width:100px;white-space:nowrap}.action-column{width:100px;text-align:center}.position-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#1890ff}.select-button{padding:4px 15px;height:28px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none}.select-button:hover{background-color:#40a9ff;border-color:#40a9ff}.select-button:active{background-color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.search-bar{padding:12px;gap:8px}.search-input-wrapper{min-width:auto;max-width:none}.search-input{height:40px;font-size:16px}.search-button{height:40px;padding:4px 12px}.table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.position-table{font-size:12px}.position-table th,.position-table td{padding:8px 12px}.title-column,.company-column,.location-column{min-width:100px}.select-button{padding:4px 12px;height:32px;font-size:14px}}.pagination-container{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #f0f0f0;flex-shrink:0}.pagination-button{padding:4px 15px;height:32px;font-size:14px;line-height:1.5;border-radius:6px;color:rgba(0, 0, 0, 0.85);background-color:#fff;border:1px solid #d9d9d9;cursor:pointer;transition:all 0.3s;outline:none}.pagination-button:hover:not(:disabled){color:#40a9ff;border-color:#40a9ff}.pagination-button:active:not(:disabled){color:#096dd9;border-color:#096dd9}.pagination-button:disabled{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.pagination-info{font-size:14px;color:rgba(0, 0, 0, 0.65)}.position-list::-webkit-scrollbar{width:8px;height:8px}.position-list::-webkit-scrollbar-track{background:#f1f1f1}.position-list::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.position-list::-webkit-scrollbar-thumb:hover{background:#555}";const Kt='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Zt=class{constructor(t){e(this,t);this.positionSelected=o(this,"positionSelected");this.positionSelectionChange=o(this,"positionSelectionChange");this.search=o(this,"search");this.sort=o(this,"sort")}oemId;multiple=false;selectedIds=[];pageSize=10;positionSelected;positionSelectionChange;search;sort;searchKeyword="";currentSelectedIds=[];currentPage=1;totalCount=0;positionsList=[];loading=false;handleSelectedIdsChange(t){this.currentSelectedIds=[...t]}async handleOemIdChange(t){if(t){await this.loadPositions()}}async componentWillLoad(){this.currentSelectedIds=[...this.selectedIds];if(this.oemId){await this.loadPositions()}}async loadPositions(){this.loading=true;try{const t=await p({oemId:this.oemId,page:this.currentPage,pageSize:this.pageSize,keyword:this.searchKeyword||undefined});if(t.success&&t.data){this.positionsList=t.data.items||[];this.totalCount=t.data.total||0}else{j.error(t.message||"获取职位列表失败");this.positionsList=[];this.totalCount=0}}catch(t){console.error("获取职位列表失败:",t);j.error("获取职位列表失败");this.positionsList=[];this.totalCount=0}finally{this.loading=false}}handleSearchInput=t=>{const e=t.target;this.searchKeyword=e.value};handleSearchKeyPress=async t=>{if(t.key==="Enter"){this.currentPage=1;await this.loadPositions()}};handleSearchClick=async()=>{this.currentPage=1;await this.loadPositions()};handleSearchClear=async()=>{this.searchKeyword="";this.currentPage=1;await this.loadPositions()};handlePageChange=async t=>{this.currentPage=t;await this.loadPositions()};getTotalPages=()=>Math.ceil(this.totalCount/this.pageSize);getDisplayPositions=()=>this.positionsList;formatPositionText=t=>{const e=[];if(t.title)e.push(`职位名称:${t.title}`);if(t.company_name)e.push(`公司名称:${t.company_name}`);if(t.department)e.push(`部门:${t.department}`);if(t.employment_type)e.push(`招聘类型:${t.employment_type}`);if(t.salary_range)e.push(`薪资范围:${t.salary_range}`);if(t.salary_min||t.salary_max){const o=`薪资:${t.salary_min||""}${t.salary_min&&t.salary_max?"-":""}${t.salary_max||""}`;if(o!=="薪资:")e.push(o)}if(t.location)e.push(`工作地点:${t.location}`);if(t.province)e.push(`省份:${t.province}`);if(t.city)e.push(`城市:${t.city}`);if(t.district)e.push(`区域:${t.district}`);if(t.address)e.push(`详细地址:${t.address}`);if(t.education_required)e.push(`学历要求:${t.education_required}`);if(t.experience_required)e.push(`经验要求:${t.experience_required}`);if(t.work_experience)e.push(`工作经验:${t.work_experience}`);if(t.recruiting_number)e.push(`招聘人数:${t.recruiting_number}`);if(t.job_description)e.push(`职位描述:${t.job_description}`);if(t.job_responsibilities)e.push(`工作职责:${t.job_responsibilities}`);if(t.job_requirements)e.push(`任职要求:${t.job_requirements}`);if(t.skills_required)e.push(`技能要求:${t.skills_required}`);if(t.benefits)e.push(`福利待遇:${t.benefits}`);if(t.job_type)e.push(`职位类型:${t.job_type}`);if(t.work_industry)e.push(`所属行业:${t.work_industry}`);if(t.recruitment_channel)e.push(`招聘渠道:${t.recruitment_channel}`);if(t.deadline)e.push(`截止日期:${t.deadline}`);return e.join("\n")};handleSelect=t=>{if(!this.multiple){const e={...t,formatted_text:this.formatPositionText(t)};this.positionSelected.emit(e)}};handleCheckboxChange=(t,e)=>{if(!this.multiple)return;if(e){if(!this.currentSelectedIds.includes(t.id)){this.currentSelectedIds=[...this.currentSelectedIds,t.id];this.positionSelectionChange.emit({action:"add",positions:[t]})}}else{this.currentSelectedIds=this.currentSelectedIds.filter((e=>e!==t.id));this.positionSelectionChange.emit({action:"remove",positions:[t]})}};isSelected=t=>this.currentSelectedIds.includes(t);render(){const t=this.getDisplayPositions();const e=this.getTotalPages();const o=e>1;return i("div",{key:"532d310ea67e381c1719ce61faa28475303a16c4",class:"position-selector-container"},i("div",{key:"94b42f213a21db72ab97f9c057340655a6de57b2",class:"search-bar"},i("div",{key:"78f53ea5fbc5cfeb53948e5348e0ff52c257ce1b",class:"search-input-wrapper"},i("svg",{key:"a03e144f45fac99d33def6ec4f3ce05ef95e7aa4",class:"search-icon",viewBox:"0 0 1024 1024",width:"16",height:"16"},i("path",{key:"da3ac4ccc5a1ca63a9035f603285d42bf444452c",d:"M945.066667 898.133333l-189.866667-189.866666c55.466667-64 87.466667-149.333333 87.466667-241.066667 0-204.8-168.533333-373.333333-373.333334-373.333333S96 264.533333 96 469.333333 264.533333 842.666667 469.333333 842.666667c91.733333 0 174.933333-34.133333 241.066667-87.466667l189.866667 189.866667c6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333c8.533333-12.8 8.533333-34.133333-2.133333-46.933334zM469.333333 778.666667C298.666667 778.666667 160 640 160 469.333333S298.666667 160 469.333333 160 778.666667 298.666667 778.666667 469.333333 640 778.666667 469.333333 778.666667z",fill:"currentColor"})),i("input",{key:"42fe509d7e446a44db173ea083fe649722b52e7c",type:"text",class:"search-input",placeholder:"搜索职位名称",value:this.searchKeyword,onInput:this.handleSearchInput,onKeyPress:this.handleSearchKeyPress}),this.searchKeyword&&i("button",{key:"523cf135d47edd8abae82b677164e9112a6544cf",class:"clear-button",onClick:this.handleSearchClear},i("svg",{key:"5474bbbbd1420cacabbba05ab5e97be33bfeb0a7",viewBox:"0 0 1024 1024",width:"14",height:"14"},i("path",{key:"06c1b5c93c16fac2bae3b656848a4b5a35df91e5",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z",fill:"currentColor"})))),i("button",{key:"cc5bc3c6e3bdd66e96a41378ede00d724f294f73",class:"search-button",onClick:this.handleSearchClick},"搜索")),this.loading&&i("div",{key:"19851301827555ed620d450a051a0e39483ecbff",class:"loading-container"},i("div",{key:"0b84a95088dc6e818f8a9a83e06bbe844f91d6ea",class:"loading-spinner"}),i("p",{key:"0136d7292088f5a029a513d99356cec226dd189e"},"加载中...")),!this.loading&&i("div",{key:"838cbcb50280fa1c27eb4f5ccd8c985ff5644063",class:"position-list"},t.length===0?i("div",{class:"empty-container"},i("svg",{class:"empty-icon",viewBox:"0 0 1024 1024",width:"64",height:"64"},i("path",{d:"M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128z m0 704c-176 0-320-144-320-320s144-320 320-320 320 144 320 320-144 320-320 320z",fill:"#d9d9d9"}),i("path",{d:"M512 320c-17.6 0-32 14.4-32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32V352c0-17.6-14.4-32-32-32z m0 384c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z",fill:"#d9d9d9"})),i("p",{class:"empty-text"},"暂无职位")):i("div",{class:"table-container"},i("table",{class:"position-table"},i("thead",null,i("tr",null,this.multiple&&i("th",{class:"checkbox-column"}),i("th",{class:"title-column"},"职位名称"),i("th",{class:"company-column"},"公司名称"),i("th",{class:"location-column"},"工作地点"),i("th",{class:"requirements-column"},"职位要求"),!this.multiple&&i("th",{class:"action-column"},"操作"))),i("tbody",null,t.map((t=>i("tr",{key:t.id,class:{"selected-row":this.multiple&&this.isSelected(t.id)}},this.multiple&&i("td",{class:"checkbox-column"},i("input",{type:"checkbox",class:"position-checkbox",checked:this.isSelected(t.id),onChange:e=>this.handleCheckboxChange(t,e.target.checked)})),i("td",{class:"title-column",title:t.title},t.title),i("td",{class:"company-column",title:t.company_name},t.company_name||"-"),i("td",{class:"location-column",title:t.location},t.location||"-"),i("td",{class:"requirements-column"},i("div",{class:"requirements-text",title:t.job_requirements||t.job_responsibilities||"-"},t.job_requirements||t.job_responsibilities||"-")),!this.multiple&&i("td",{class:"action-column"},i("button",{class:"select-button",onClick:()=>this.handleSelect(t)},"选择"))))))))),o&&i("div",{key:"9750306eefda60760cdb17cf5c5d21e0310e9f39",class:"pagination-container"},i("button",{key:"da61683ee4f038b0d578834bd50319e541fa9404",class:"pagination-button",disabled:this.currentPage===1,onClick:()=>this.handlePageChange(this.currentPage-1)},"上一页"),i("span",{key:"c2423bbcc6b8d9b06bdd59698065ea501006f5f0",class:"pagination-info"},"第 ",this.currentPage," / ",e," 页,共 ",this.totalCount," 条"),i("button",{key:"1c845de610a44ea0881dbac4f5b0f07420d9bec2",class:"pagination-button",disabled:this.currentPage>=e,onClick:()=>this.handlePageChange(this.currentPage+1)},"下一页")))}static get watchers(){return{selectedIds:["handleSelectedIdsChange"],oemId:["handleOemIdChange"]}}};Zt.style=Xt+Kt;const te=".loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;background:#fff}.loading-spinner{width:48px;height:48px;border:4px solid #e8e8e8;border-top-color:#0D75FB;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{font-size:18px;font-weight:500;color:#333;margin-top:24px;margin-bottom:8px}.loading-subtext{font-size:14px;color:#666;margin-bottom:16px}.loading-dots{display:flex;gap:8px}.dot{width:8px;height:8px;border-radius:50%;background-color:#0D75FB;animation:pulse 1.5s ease-in-out infinite}.dot.delay-1{animation-delay:0.2s}.dot.delay-2{animation-delay:0.4s}@keyframes pulse{0%,100%{opacity:0.4;transform:scale(0.8)}50%{opacity:1;transform:scale(1)}}.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;background:#fff}.error-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background-color:#fee2e2;color:#ef4444;font-size:24px;font-weight:bold}.error-text{font-size:16px;font-weight:500;color:#666;margin-top:16px;margin-bottom:16px}.retry-button{padding:10px 24px;background-color:#0D75FB;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer;transition:background-color 0.2s}.retry-button:hover{background-color:#0a5fd9}.analysis-container{display:flex;flex-direction:column;height:100%;padding:20px;background:#fff}.analysis-header{flex-shrink:0;padding-bottom:16px}.analysis-title{font-size:20px;font-weight:600;color:#333;margin-bottom:8px}.analysis-desc{font-size:14px;color:#666;margin-bottom:16px}.tab-container{display:flex;gap:8px;padding:4px;background-color:#f5f5f5;border-radius:8px}.tab-button{padding:8px 16px;background:transparent;border:none;border-radius:6px;font-size:14px;color:#666;cursor:pointer;transition:all 0.2s}.tab-button:hover{color:#333}.tab-button.active{background-color:#0D75FB;color:#fff}.iframe-container{flex:1;width:100%;min-height:400px;height:85vh;overflow:hidden;padding:20px}.iframe-container iframe{width:100%;height:100%;border:none}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:flex-start}.fullscreen-overlay{background:rgba(0, 0, 0, 0.8)}.modal-container{background:#fff;border-radius:12px;width:90%;max-width:1200px;height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 4px 24px rgba(0, 0, 0, 0.15)}.fullscreen{width:100%;height:100%;max-width:100%;border-radius:0}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:12px}.header-icon{width:32px;height:32px;object-fit:contain}.close-button{background:transparent;border:none;font-size:24px;color:#666;cursor:pointer;padding:4px 8px;line-height:1}.close-button:hover{color:#333}@media screen and (max-width: 768px){.modal-container{width:100%;height:100%;max-width:100%;border-radius:0}.analysis-title{font-size:18px}.tab-container{flex-wrap:wrap}.tab-button{padding:6px 12px;font-size:12px}}";const ee='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const oe=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ie=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.conversationStart=o(this,"conversationStart");this.streamComplete=o(this,"streamComplete");this.interviewComplete=o(this,"interviewComplete");this.someErrorEvent=o(this,"someErrorEvent");this.tokenInvalid=o(this,"tokenInvalid")}token;isOpen=false;conversationId;botId="45444431062634496";optimizationType=1;customInputs={};defaultQuery="生成简历格式数据";modalTitle="千岗千简历";icon;fullscreen=false;zIndex=1e3;isShowHeader=true;isNeedClose=true;modalClosed;conversationStart;streamComplete;interviewComplete;someErrorEvent;tokenInvalid;isLoading=true;internalConversationId;error="";activeTab="analysis";get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.isLoading=true;this.internalConversationId=undefined;this.error="";this.activeTab="analysis"}else{await f(this.token);if(this.conversationId){this.internalConversationId=this.conversationId;this.isLoading=false}else{await this.startChatStream()}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){if(this.isOpen){this.handleIsOpenChange(true)}}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};startChatStream=async()=>{this.isLoading=true;this.error="";const t={bot_id:this.botId,response_mode:"streaming",conversation_id:this.conversationId,query:this.defaultQuery,inputs:{...this.customInputs,optimization_type:this.optimizationType}};let e;await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:t,onMessage:t=>{if(t.conversation_id&&!e){e=t.conversation_id;this.internalConversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="node_finished"&&t.data?.title?.includes("聘才猫任务结束")){this.isLoading=false;this.interviewComplete.emit({conversation_id:this.internalConversationId})}if(t.event==="message_end"){this.streamComplete.emit({conversation_id:t.conversation_id||"",event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="error"){this.isLoading=false;this.error=t.data?.message||t.message||"请求失败";z.emitError({error:t.data,message:this.error})}},onError:t=>{console.error("SSE 请求错误:",t);this.isLoading=false;this.error="请求失败,请重试";z.emitError({error:t,message:this.error})},onComplete:()=>{this.isLoading=false}})};handleRetry=()=>{this.startChatStream()};handleTabChange=t=>{this.activeTab=t};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=[{key:"analysis",label:"深度分析"},{key:"suggestions",label:"改进建议"},{key:"resume",label:"优化版本"}];const r=this.optimizationType===1?`${c}/reportNode/thousandResume?conversationId=${this.internalConversationId}&referrer=sdk&reportType=suggestions&showHeader=1&token=${this.token}`:`${c}/reportNode/thousandResume?conversationId=${this.internalConversationId}&referrer=sdk&reportType=${this.activeTab}&token=${this.token}`;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.isLoading&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"AI 正在分析您的简历"),i("p",{class:"loading-subtext"},"请耐心等待..."),i("div",{class:"loading-dots"},i("span",{class:"dot"}),i("span",{class:"dot delay-1"}),i("span",{class:"dot delay-2"}))),!this.isLoading&&this.error&&i("div",{class:"error-container"},i("span",{class:"error-icon"},"!"),i("p",{class:"error-text"},this.error),i("button",{class:"retry-button",onClick:this.handleRetry},"重新分析")),!this.isLoading&&!this.error&&this.optimizationType===1&&this.internalConversationId&&i("div",{class:"iframe-container"},i("iframe",{src:r,frameborder:"0"})),!this.isLoading&&!this.error&&this.optimizationType===2&&this.internalConversationId&&i("div",{class:"analysis-container"},i("div",{class:"analysis-header"},i("h1",{class:"analysis-title"},"深度分析报告"),i("p",{class:"analysis-desc"},"全面诊断 + 改进建议 + 优化版本"),i("div",{class:"tab-container"},n.map((t=>i("button",{class:{"tab-button":true,active:this.activeTab===t.key},onClick:()=>this.handleTabChange(t.key)},t.label))))),i("div",{class:"iframe-container"},i("iframe",{src:r,frameborder:"0"})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ie.style=te+(ee+oe);const ne=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}";const re='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const ae=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const se=class{constructor(t){e(this,t);this.uploadFailed=o(this,"uploadFailed");this.uploadChange=o(this,"uploadChange")}multiple=false;mobileUploadAble=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;uploadText="点击上传简历";defaultFileList;disabled=false;uploadFailed;uploadChange;get hostElement(){return t(this)}selectedFiles=null;componentWillLoad(){if(this.defaultFileList&&this.defaultFileList.length>0){this.selectedFiles=this.defaultFileList.map((t=>({...t,state:g.Success})))}}async getIsUploading(){return!!this.selectedFiles?.some((t=>t.state===g.Uploading))}async clearSelectedFiles(){this.selectedFiles=null;this.clearSelectedFile()}handleUploadClick=()=>{if(this.disabled)return;const t=this.hostElement.shadowRoot?.querySelector(".file-input");t?.click()};clearSelectedFile=()=>{const t=this.hostElement.shadowRoot?.querySelector(".file-input");if(t){t.value=""}};async uploadFile(t){try{const e=await m(t,this.uploadHeaders||{},this.uploadParams||{});return{...e,file:t,file_name:t.name,file_size:t.size,state:g.Success}}catch(e){this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-mnms-modal",title:"文件上传失败"});this.uploadFailed.emit({error:e,message:"文件上传失败,请重试"});return{file:t,error:e,state:g.Failed}}}handleFileChange=async t=>{const e=t.target;if(this.multiple){const t=Array.from(e.files||[]);if(t.length===0)return;const o=this.selectedFiles?.length||0;const i=this.maxFileCount-o;if(t.length>i){j.info(`最多只能上传 ${this.maxFileCount} 个文件,当前已选择 ${o} 个`);return}const n=[];const r=[];t.forEach((t=>{if(this.acceptFileSuffixList?.length){const e="."+t.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(e)){r.push(`${t.name}(格式不支持)`);return}}if(this.maxFileSize<t.size){r.push(`${t.name}(文件过大)`);return}n.push(t)}));if(r.length>0){const t=this.acceptFileSuffixList?.length?this.acceptFileSuffixList.join("、"):"";const e=this.maxFileSize!==Infinity?b(this.maxFileSize):"";j.info(`以下文件无法上传:${r.join("、")}。${t?`支持格式:${t}。`:""}${e?`最大文件大小:${e}。`:""}`)}if(n.length===0){this.clearSelectedFile();return}const a=n.map((t=>({file:t,file_name:t.name,file_size:t.size,state:g.Uploading,cos_key:"",error:undefined})));this.selectedFiles=[...this.selectedFiles||[],...a];for(let t=0;t<n.length;t++){const e=n[t];const o=await this.uploadFile(e);if(this.selectedFiles){const e=this.selectedFiles.length;const i=e-n.length+t;if(i>=0&&i<this.selectedFiles.length){this.selectedFiles[i]=o;this.selectedFiles=[...this.selectedFiles]}}}this.clearSelectedFile();this.emitUploadChange()}else{const t=e.files?.[0];if(!t)return;if(this.acceptFileSuffixList?.length){const e="."+t.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(e)){j.info(`请上传 ${this.acceptFileSuffixList.join("、")} 格式的文件`);return}}if(this.maxFileSize<t.size){j.info(`文件大小不能超过 ${b(this.maxFileSize)??"-"}`);return}this.selectedFiles=[{file:t,file_name:t.name,file_size:t.size,state:g.Uploading,cos_key:"",error:undefined}];const o=await this.uploadFile(t);this.selectedFiles=[o];this.clearSelectedFile();this.emitUploadChange()}};emitUploadChange=()=>{this.uploadChange.emit(this.selectedFiles?.filter((t=>t.state===g.Success)).map?.((t=>({cos_key:t.cos_key,file_name:t.file_name,file_size:t.file_size,ext:t.ext}))))};uploadBtn(){return i("div",{style:{width:"100%"}},!!this.mobileUploadAble&&i("components-mobile-upload-btn",{multiple:this.multiple,acceptFileSuffixList:this.acceptFileSuffixList,maxFileCount:this.maxFileCount,maxFileSize:this.maxFileSize,uploadHeaders:this.uploadHeaders,uploadParams:this.uploadParams,onOk:t=>{this.selectedFiles=[...this.selectedFiles??[],...(t.detail??[]).map((t=>({...t,state:g.Success})))];this.emitUploadChange()}}),i("div",{class:"upload-placeholder",onClick:this.handleUploadClick},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList?.length&&i("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。"),!!this.maxFileSize&&this.maxFileSize!==Infinity&&i("p",{class:"upload-hint"},"文件大小不能超过 ",b(this.maxFileSize)??"","。"),!!this.maxFileCount&&this.maxFileCount!==Infinity&&i("p",{class:"upload-hint"},"最多上传 ",this.maxFileCount," 个文件。")))}render(){return i("div",{key:"ebde31f58ddc1edb5b85d9f82de44284787a76d6"},i("div",{key:"ed33af9b6256c53ee2d5eaf7ab1fa32789856619",class:"resume-upload-section"},i("div",{key:"a36333a031f59d94b68677fc341d43b2a256ae7d",class:"upload-area"},i("div",{key:"50de7a083643b8e2c4087a1eb735e3d7624d1db7"},this.selectedFiles?.map?.(((t,e)=>i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name",style:t.state===g.Failed?{color:"red",textDecoration:"line-through"}:undefined},t?.file_name),t.state===g.Failed&&i("span",{style:{color:"red",marginLeft:"4px"}},"(",t.error?.message??"上传失败",")")),!this.disabled&&i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.selectedFiles=this.selectedFiles?.filter(((t,o)=>e!==o));this.emitUploadChange()}},"×")))))),!this.disabled&&(this.multiple?i("div",{class:"upload-actions"},(this.selectedFiles?.length??0)<this.maxFileCount&&this.uploadBtn()):i("div",{class:"upload-actions"},!this.selectedFiles?.length&&this.uploadBtn()))),i("input",{key:"9248d915245239dd130c887f7d9da33707347598",type:"file",class:"file-input",multiple:this.multiple,onChange:this.handleFileChange}))}};se.style=ne+(re+ae);const le=":host{display:inline-flex}.voice-input-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#666;cursor:pointer;transition:background-color 0.2s, color 0.2s, border-color 0.2s}.voice-input-button:hover:not(:disabled){background-color:#f0f0f0;border-color:#bfbfbf}.voice-input-button:focus-visible{outline:2px solid rgba(46, 110, 223, 0.35);outline-offset:2px}.voice-input-button:disabled{cursor:not-allowed;opacity:0.55}.voice-input-button.recording{background-color:rgba(255, 0, 0, 0.1);border-color:rgba(255, 59, 48, 0.45);color:#ff3b30;animation:pulse 1.5s infinite}.voice-input-button.converting{background-color:rgba(0, 122, 255, 0.1);border-color:rgba(0, 122, 255, 0.35);color:#007aff}.converting-icon{animation:spin 1.5s linear infinite}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.65}}@keyframes spin{to{transform:rotate(360deg)}}";const de=class{constructor(t){e(this,t);this.voiceRecognized=o(this,"voiceRecognized");this.voiceStatusChange=o(this,"voiceStatusChange");this.someErrorEvent=o(this,"someErrorEvent")}disabled=false;maxRecordingTime=60;locale="zh";voiceRecognized;voiceStatusChange;someErrorEvent;_status="idle";_recordingTimeLeft=60;_audioRecorder=null;_audioStream=null;_audioChunks=[];_audioMimeType="";_recordingStartTime=0;_recordingTimer=null;disconnectedCallback(){this._releaseRecordingResources()}_getText(t,e){return this.locale==="en"?e:t}_setStatus(t){this._status=t;this.voiceStatusChange.emit(t)}_emitError(t,e){console.error(e,t);this.someErrorEvent.emit({error:t,message:e})}_handleClick=()=>{if(this.disabled||this._status==="converting"){return}if(this._status==="recording"){this._stopRecording();return}if(!navigator.mediaDevices?.getUserMedia||!window.MediaRecorder){this._emitError(new Error("MediaRecorder API is unavailable"),this._getText("当前浏览器不支持语音输入","Voice input is not supported by this browser"));return}navigator.mediaDevices.getUserMedia({audio:true}).then((t=>this._startRecording(t))).catch((t=>{this._emitError(t,this._getText("无法访问麦克风,请检查麦克风权限","Unable to access the microphone. Please check microphone permissions"))}))};_startRecording(t){this._audioStream=t;try{const e=x();this._audioRecorder=e?new MediaRecorder(t,{mimeType:e}):new MediaRecorder(t);this._audioMimeType=this._audioRecorder.mimeType||e||"audio/webm"}catch(t){this._releaseRecordingResources();this._emitError(t,this._getText("无法启动录音,请检查麦克风设备","Unable to start recording. Please check the microphone"));return}this._audioChunks=[];this._recordingStartTime=Date.now();this._recordingTimeLeft=this.maxRecordingTime;this._audioRecorder.ondataavailable=t=>{if(t.data.size>0){this._audioChunks.push(t.data)}};this._audioRecorder.onerror=t=>{this._emitError(t,this._getText("录音失败,请重试","Recording failed. Please try again"));this._releaseRecordingResources();this._setStatus("idle")};this._audioRecorder.onstop=()=>{this._stopMediaStream();void this._processAudioRecording()};try{this._audioRecorder.start(100);this._setStatus("recording");this._recordingTimer=setInterval((()=>{const t=Math.floor((Date.now()-this._recordingStartTime)/1e3);this._recordingTimeLeft=Math.max(0,this.maxRecordingTime-t);if(this._recordingTimeLeft<=0){this._stopRecording()}}),1e3)}catch(t){this._releaseRecordingResources();this._setStatus("idle");this._emitError(t,this._getText("开始录音失败,请重试","Failed to start recording. Please try again"))}}_stopRecording(){if(!this._audioRecorder||this._audioRecorder.state==="inactive"){return}this._clearRecordingTimer();this._audioRecorder.stop()}async _processAudioRecording(){if(this._audioChunks.length===0){this._setStatus("idle");this._emitError(new Error("Recorded audio is empty"),this._getText("未录制到语音内容,请重试","No audio was recorded. Please try again"));return}this._setStatus("converting");try{const t=new Blob(this._audioChunks,{type:this._audioMimeType});if(t.size===0){throw new Error("Recorded audio is empty")}const e=this._getFileExtension(this._audioMimeType);const o=new File([t],`audio_input.${e}`,{type:this._audioMimeType});const i=await m(o,{},{tags:["audio"]});const n=await y(i.cos_key);if(!n){throw new Error("No transcription text returned")}this.voiceRecognized.emit(n)}catch(t){this._emitError(t,this._getText("语音识别失败,请重试","Speech recognition failed. Please try again"))}finally{this._audioChunks=[];this._audioRecorder=null;this._setStatus("idle")}}_getFileExtension(t){if(t.includes("mp4"))return"m4a";if(t.includes("ogg"))return"ogg";return"webm"}_clearRecordingTimer(){if(this._recordingTimer){clearInterval(this._recordingTimer);this._recordingTimer=null}}_stopMediaStream(){this._audioStream?.getTracks().forEach((t=>t.stop()));this._audioStream=null}_releaseRecordingResources(){this._clearRecordingTimer();if(this._audioRecorder){this._audioRecorder.ondataavailable=null;this._audioRecorder.onerror=null;this._audioRecorder.onstop=null;if(this._audioRecorder.state!=="inactive"){this._audioRecorder.stop()}}this._stopMediaStream();this._audioRecorder=null;this._audioChunks=[]}render(){const t=this._status==="recording";const e=this._status==="converting";const o=t?this._getText(`点击停止录音(剩余${this._recordingTimeLeft}秒)`,`Stop recording (${this._recordingTimeLeft}s remaining)`):e?this._getText("正在识别语音...","Recognizing speech..."):this._getText("语音输入","Voice input");return i("button",{key:"61026d7314566e475e9a0ba2102e504d7a276b9e",type:"button",class:{"voice-input-button":true,recording:t,converting:e},title:o,"aria-label":o,"aria-pressed":t?"true":"false",disabled:this.disabled||e,onClick:this._handleClick},e?i("svg",{class:"converting-icon",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),t&&i("circle",{cx:"12",cy:"11",r:"4",fill:"red"})))}};de.style=le;const ce='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const pe=".pc-layout{max-width:none}.task-layout{width:90%;max-width:1200px;min-width:800px}@media screen and (max-width: 1024px){.task-layout{width:95%;min-width:320px}}.task-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto;gap:20px}.upload-area{max-height:300px;overflow-y:auto}.step-header{text-align:center;margin-bottom:24px}.step-header h3{margin:0 0 8px 0;font-size:20px;color:#333}.step-description{margin:0;color:#666;font-size:14px}.step-indicator{background:#e6f7ff;color:#1890ff;padding:4px 8px;border-radius:4px;font-size:12px;margin-left:8px}.criteria-input-section{margin-bottom:20px}.criteria-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.task-info-section{flex-shrink:0}.info-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media screen and (max-width: 768px){.info-cards{grid-template-columns:1fr}}.info-card{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;background:#fff}.card-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fafafa;cursor:pointer;transition:background-color 0.2s}.card-header:hover{background:#f0f0f0}.card-title{font-weight:500;color:#333}.toggle-btn{background:transparent;border:none;color:#1890ff;cursor:pointer;font-size:12px;padding:4px 8px;border-radius:4px;transition:background-color 0.2s}.toggle-btn:hover{background:rgba(24, 144, 255, 0.1)}.card-content{padding:16px;border-top:1px solid #e8e8e8;max-height:120px;overflow-y:auto}.card-content p{margin:0;line-height:1.6;color:#666;font-size:14px}.card-preview{padding:12px 16px;border-top:1px solid #e8e8e8}.preview-text{margin:0;line-height:1.5;color:#666;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer-text-content{line-height:1.6;color:#333;font-size:14px;white-space:pre-wrap;word-wrap:break-word}.upload-section{flex-shrink:0}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-shrink:0}.section-header-side{display:flex;align-items:center;gap:12px}.refresh-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:white;border:1px solid #d9d9d9;border-radius:6px;cursor:pointer;transition:all 0.3s ease}.refresh-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff;background:#f6f8ff}.refresh-btn:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}.refresh-btn svg{transition:transform 0.3s ease}.refresh-btn svg.rotating{animation:rotate 1s linear infinite}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.export-actions{height:32px;display:flex;border-radius:6px;background-color:white;border:1px solid #1890ff;overflow:hidden;margin-right:16px;color:#1890ff;font-size:14px;font-weight:bold}.export-btn{width:128px;height:100%;display:flex;align-items:center;justify-content:center}.export-btn:hover{background-color:#f5f5f5;cursor:pointer}.export-divide{width:1px;height:100%;background-color:#1890ff}.section-header h4{margin:0;font-size:16px;color:#333}.count-badge{background:#1890ff;color:white;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:500}.analyze-btn{padding:8px 16px;background:#52c41a;color:white;border:none;border-radius:4px;cursor:pointer;transition:background-color 0.2s;font-size:14px}.analyze-btn:hover{background:#73d13d}.analyze-btn:disabled{background:#d9d9d9;cursor:not-allowed}.resume-table-section{flex:1;display:flex;flex-direction:column;min-height:0}.table-container{flex:1;border:1px solid #e8e8e8;border-radius:8px;background:white;overflow-x:auto;min-height:400px}.resume-table{width:100%;border-collapse:collapse;font-size:14px}.resume-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8}.resume-table td{padding:12px 16px;vertical-align:middle;height:60px}.resume-table tr{border-bottom:1px solid #f0f0f0;height:60px}.resume-table tr:hover{background:#f9f9f9}.filename-cell{max-width:200px;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filename-cell span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.talent-info-cell{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.score-badge.excellent{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.score-badge.good{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.score-badge.average{background:#fff7e6;color:#fa8c16;border:1px solid #ffd591}.score-badge.below-average{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.score-badge.poor{background:#f5f5f5;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.status-badge.status-pending{background:#f0f0f0;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge.status-analyzing{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.status-badge.status-completed{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.status-badge.status-failed{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.detail-cell{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-content{cursor:pointer;transition:color 0.2s}.detail-content:hover{color:#40a9ff}.action-cell{display:flex;gap:8px;position:relative;align-items:center;justify-content:center;height:100%}.action-dropdown{position:relative;display:inline-block}.dropdown-trigger{display:flex;align-items:center;gap:4px;padding:6px 12px;background:#f0f0f0;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;font-size:12px;color:#595959;transition:all 0.2s;min-width:60px;justify-content:center}.dropdown-trigger:hover{background:#e6e6e6;border-color:#bfbfbf;color:#333}.dropdown-trigger svg{transition:transform 0.2s;margin-left:4px}.dropdown-menu{position:absolute;top:100%;right:0;z-index:9999;min-width:120px;background:white;border:1px solid #e8e8e8;border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;margin-top:4px}.dropdown-item{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:14px;color:#333;cursor:pointer;transition:background-color 0.2s;border-bottom:1px solid #f5f5f5;white-space:nowrap}.dropdown-item:last-child{border-bottom:none}.dropdown-item:hover{background:#f5f5f5}.dropdown-item.danger{color:#f5222d}.dropdown-item.danger:hover{background:#fff1f0;color:#cf1322}.dropdown-item svg{flex-shrink:0}.view-btn{background:#e6f7ff;color:#1890ff}.view-btn:hover{background:#bae7ff}.delete-btn{background:#fff1f0;color:#f5222d}.delete-btn:hover{background:#ffccc7}.empty-row{text-align:center;padding:40px 20px !important;border-bottom:none !important}.empty-state{display:flex;flex-direction:column;align-items:center;gap:8px;color:#999}.empty-state p{margin:0}.empty-hint{font-size:12px}@media screen and (max-width: 768px){.task-container{padding:16px;gap:16px}.resume-table{font-size:12px}.resume-table th,.resume-table td{padding:8px 12px}.filename-cell,.talent-info-cell,.detail-cell{max-width:120px}.action-cell{flex-direction:column;gap:4px;align-items:center;justify-content:center;min-width:80px;height:100%}.dropdown-trigger{min-width:50px;padding:4px 8px;font-size:11px}}.criteria-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.criteria-header label{margin:0;font-weight:500;color:#333}.criteria-actions{display:flex;align-items:center;gap:12px}.total-weight{font-size:14px;color:#52c41a;font-weight:500}.total-weight.invalid{color:#f5222d}.add-criteria-btn-wrapper{width:100%;display:flex;justify-content:end}.add-criteria-btn{padding:6px 12px;background:#1890ff;color:white;border:none;border-radius:4px;cursor:pointer;font-size:12px;transition:background-color 0.2s}.add-criteria-btn:hover{background:#40a9ff}.criteria-table-container{border:1px solid #e8e8e8;border-radius:6px;overflow:hidden;background:white;margin-bottom:12px}.criteria-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}.criteria-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8;border-right:1px solid #e8e8e8;font-size:13px;vertical-align:middle}.criteria-table th:last-child{border-right:none}.criteria-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;vertical-align:middle}.criteria-table td:last-child{border-right:none}.criteria-table tr:last-child td{border-bottom:none}.criteria-name-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;box-sizing:border-box}.criteria-name-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-value-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;text-align:center;box-sizing:border-box}.criteria-value-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-description-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;resize:vertical;min-height:80px;line-height:1.5;transition:border-color 0.2s;box-sizing:border-box}.criteria-description-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.remove-criteria-btn{width:28px;height:28px;background:#fff1f0;color:#f5222d;border:1px solid #ffa39e;border-radius:4px;cursor:pointer;font-size:16px;font-weight:bold;display:flex;align-items:center;justify-content:center;transition:all 0.2s;margin:0 auto}.remove-criteria-btn:hover:not(:disabled){background:#ffccc7;border-color:#ff7875}.remove-criteria-btn:disabled{background:#f5f5f5;color:#bfbfbf;border-color:#d9d9d9;cursor:not-allowed}.criteria-warning{color:#fa8c16;font-size:13px;margin:8px 0 0 0;padding:8px 12px;background:#fff7e6;border:1px solid #ffd591;border-radius:4px;display:flex;align-items:center;gap:6px}@media screen and (max-width: 768px){.criteria-header{flex-direction:column;align-items:flex-start;gap:8px}.criteria-actions{width:100%;justify-content:space-between}.criteria-table th,.criteria-table td{padding:10px 8px;font-size:12px;vertical-align:middle}.criteria-table th:nth-child(1){width:20%}.criteria-table th:nth-child(2){width:15%}.criteria-table th:nth-child(3){width:55%}.criteria-table th:nth-child(4){width:10%}.criteria-name-input,.criteria-value-input,.criteria-description-input{font-size:12px;padding:6px 8px}.criteria-description-input{min-height:60px}.remove-criteria-btn{width:24px;height:24px;font-size:14px}}.sortable-header{cursor:pointer !important;user-select:none;transition:background-color 0.2s}.sortable-header:hover{background:#f0f0f0 !important}.sortable-header.active{background:#e6f7ff !important;color:#1890ff}.header-content{display:flex;align-items:center;justify-content:space-between;width:100%}.sort-icons{display:flex;flex-direction:column;gap:1px;margin-left:8px;opacity:0.6}.sortable-header:hover .sort-icons{opacity:1}.sort-icon{transition:color 0.2s;color:#bfbfbf}.sort-icon.active{color:#1890ff}.pagination{display:flex;justify-content:center;align-items:center;gap:16px;padding:20px 0;margin-top:16px;border-top:1px solid #f0f0f0}.page-btn{padding:8px 16px;background:#fff;border:1px solid #d9d9d9;border-radius:6px;cursor:pointer;font-size:14px;color:#333;transition:all 0.2s;min-width:80px;display:flex;align-items:center;justify-content:center;height:36px}.page-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff;background:#f6f8ff}.page-btn:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}.page-info{font-size:14px;color:#666;padding:0 16px;display:flex;align-items:center;height:36px;white-space:nowrap}@media screen and (max-width: 768px){.pagination{gap:12px;padding:16px 0;flex-wrap:wrap}.page-btn{min-width:70px;padding:6px 12px;font-size:13px;height:32px}.page-info{font-size:13px;padding:0 8px;height:32px;order:3;width:100%;justify-content:center;margin-top:8px}}.step-indicator.clickable{cursor:pointer;transition:all 0.2s ease}.step-indicator.clickable:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.task-history-drawer-content{display:flex;flex-direction:column;height:100%}.task-list{flex:1;overflow-y:auto;padding:16px 0}.loading-tasks,.empty-tasks{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#666}.loading-spinner-small{width:24px;height:24px;border:2px solid #f0f0f0;border-top:2px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.task-item{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-bottom:8px;border:1px solid #e8e8e8;border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:#fff}.task-item:hover{border-color:#1890ff;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.task-item.active{border-color:#1890ff;background:#f6ffed;box-shadow:0 2px 8px rgba(24, 144, 255, 0.15)}.task-info{flex:1;min-width:0}.task-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.task-id{font-weight:600;color:#333;font-size:14px}.task-time{font-size:12px;color:#666}.task-job-info{font-size:14px;color:#333;margin-bottom:8px;line-height:1.4;word-break:break-word}.task-meta{display:flex;align-items:center;gap:12px}.resume-count{font-size:12px;color:#666;background:#f5f5f5;padding:2px 6px;border-radius:4px}.current-task-indicator{flex-shrink:0;margin-left:12px;color:#52c41a}.current-task-indicator svg{width:16px;height:16px}@media screen and (max-width: 768px){.task-item{padding:12px}.task-header{flex-direction:column;align-items:flex-start;gap:4px}.task-job-info{font-size:13px;margin-bottom:6px}}.label-with-button{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.button-group{display:flex;gap:8px;align-items:center}.position-selector-button{padding:4px 12px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:13px;cursor:pointer;transition:all 0.3s ease;white-space:nowrap;height:28px;line-height:20px}.position-selector-button:hover{background:#40a9ff}.position-selector-button:active{background:#096dd9}.position-selector-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:3000;padding:20px}.position-selector-modal{background:white;border-radius:8px;width:90%;max-width:900px;height:80vh;max-height:600px;display:flex;flex-direction:column;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);animation:modalFadeIn 0.3s ease}@keyframes modalFadeIn{from{opacity:0;transform:scale(0.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}.position-selector-modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.position-selector-modal-header h3{margin:0;font-size:16px;font-weight:500;color:rgba(0, 0, 0, 0.85)}.position-selector-close-btn{background:none;border:none;font-size:24px;line-height:1;cursor:pointer;color:rgba(0, 0, 0, 0.45);padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.3s}.position-selector-close-btn:hover{background-color:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.85)}.position-selector-modal-body{flex:1;overflow:hidden;display:flex;flex-direction:column}@media screen and (max-width: 768px){.position-selector-modal{width:100%;height:90vh;max-height:none;border-radius:8px 8px 0 0;margin-top:auto}.position-selector-modal-overlay{padding:0;align-items:flex-end}}.upload-disabled-wrapper{position:relative;cursor:not-allowed}.upload-disabled-wrapper::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background-color:rgba(255, 255, 255, 0.7);z-index:0;cursor:not-allowed}.task-history-drawer-content{display:flex;flex-direction:column;height:100%}.task-list{flex:1;overflow-y:auto;padding:16px 0}.loading-tasks,.empty-tasks{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#666}.task-item{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-bottom:8px;border:1px solid #e8e8e8;border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:#fff}.task-item:hover{border-color:#1890ff;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.task-item.active{border-color:#1890ff;background:#f6ffed;box-shadow:0 2px 8px rgba(24, 144, 255, 0.15)}.task-info{flex:1;min-width:0}.task-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.task-id{font-weight:600;color:#333;font-size:14px}.task-time{font-size:12px;color:#666}.current-task-indicator{flex-shrink:0;margin-left:12px;color:#52c41a}.current-task-indicator svg{width:16px;height:16px}@media screen and (max-width: 768px){.task-item{padding:12px}.task-header{flex-direction:column;align-items:flex-start;gap:4px}}";const he='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const fe=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ue=class{modalTitle="简历筛选精灵";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;fullscreen=false;customInputs={};showInputHistory=false;showWorkspaceHistory=false;showBatchExport=false;taskId;oemId;uploadSuccess;tokenInvalid;someErrorEvent;taskCreated;resumeAnalysisStart;resumeAnalysisComplete;taskSwitch;resumeDeleted;conversationStart;currentStep="input";jobDescription="";jobTitle="";evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];isSubmitting=false;isUploading=false;uploadedResumeRecords=[];filteredResumeRecords=[];selectedFiles=[];showJdDrawer=false;showCriteriaDrawer=false;currentTask=null;currentPage=1;pageSize=10;totalRecords=0;isAnalyzing=false;showPreviewDrawer=false;previewContent="";previewTitle="";previewType="markdown";previewUrl="";activeDropdownId=null;deletingRecordId=null;sortOrder="none";isTaskHistoryDrawerOpen=false;historyTasks=[];isLoadingHistoryTasks=false;taskHistoryCurrentPage=1;taskHistoryPageSize=10;taskHistoryTotal=0;taskHistoryDrawerSource="input";isLoadingResumeList=false;isExportRecordsModalOpen=false;_uploadEnabled=true;showPositionSelector=false;get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;botId="3022316191018874";pcmUploadRef;internalConversationId=null;get resumeRecords(){return[...this.uploadedResumeRecords,...this.filteredResumeRecords]}constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.taskCreated=o(this,"taskCreated");this.resumeAnalysisStart=o(this,"resumeAnalysisStart");this.resumeAnalysisComplete=o(this,"resumeAnalysisComplete");this.taskSwitch=o(this,"taskSwitch");this.resumeDeleted=o(this,"resumeDeleted");this.conversationStart=o(this,"conversationStart");r.use(a);r.setOptions({breaks:true,gfm:true});document.addEventListener("click",this.handleDocumentClick)}handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async setUploadEnabled(t){this._uploadEnabled=t}async handleIsOpenChange(t){if(!t){this.resetStates()}else{await f(this.token);if(this.taskId){await this.handleSwitchTask(this.taskId)}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}document.removeEventListener("click",this.handleDocumentClick)}resetStates=()=>{this.currentStep="input";this.jobDescription="";this.evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];this.isSubmitting=false;this.isUploading=false;this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.selectedFiles=[];this.showJdDrawer=false;this.showCriteriaDrawer=false;this.currentTask=null;this.currentPage=1;this.pageSize=10;this.totalRecords=0;this.isAnalyzing=false;this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl="";this.activeDropdownId=null;this.deletingRecordId=null;this.sortOrder="none";this.isTaskHistoryDrawerOpen=false;this.historyTasks=[];this.isLoadingHistoryTasks=false;this.taskHistoryCurrentPage=1;this.taskHistoryPageSize=10;this.taskHistoryTotal=0;this.taskHistoryDrawerSource="input";this.isLoadingResumeList=false;this.isExportRecordsModalOpen=false;this.internalConversationId=null};handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleCreateTask=async()=>{const t=this.customInputs?.job_info||this.jobDescription.trim();if(!t){_("请输入职位描述","warning");return}if(this.evaluationCriteria.length===0){_("请输入评分标准","warning");return}this.isSubmitting=true;try{const e=await s({url:"/sdk/v1/agent/app_filter_task/create",method:"POST",data:{job_info:t,extra:JSON.stringify(this.evaluationCriteria)}});if(e.success&&e.data){this.currentTask=e.data;this.jobDescription=t;this.currentStep="task";this.taskCreated.emit({task_id:e.data.id,job_description:t,evaluation_criteria:this.evaluationCriteria,create_time:(new Date).toISOString()});if(this.customInputs?.file_urls){await this.startAnalysisWithCustomFileUrls()}}else{throw new Error(e.message||"创建任务失败")}}catch(t){console.error("创建任务时出错:",t);I.captureError(t,{action:"handleCreateTask",component:"oem-jlsx-modal",title:"创建任务时出错"});this.someErrorEvent.emit({error:t,message:"创建任务时出错,请重试"})}finally{this.isSubmitting=false}};toggleJdDetail=()=>{this.showJdDrawer=true};toggleCriteriaDetail=()=>{this.showCriteriaDrawer=true};closeJdDrawer=()=>{this.showJdDrawer=false};closeCriteriaDrawer=()=>{this.showCriteriaDrawer=false};showPreview=(t,e,o="markdown",i)=>{this.previewTitle=t;this.previewContent=e||"";this.previewType=o;this.previewUrl=i||"";this.showPreviewDrawer=true;this.activeDropdownId=null};closePreviewDrawer=()=>{this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl=""};toggleDropdown=t=>{const e=this.activeDropdownId===t?null:t;this.activeDropdownId=e};handleViewEvaluate=t=>{const e=`${c}/exportFile?id=${t.id}&title=${this.jobTitle||""}&token=${h.getToken()}&referrer=sdk`;this.showPreview(`${t.fileName} - 评估详情`,"","file",e)};exportAllPdfLoading=false;exportAllPDF=async()=>{this.exportAllPdfLoading=true;const t=await s({url:`/sdk/v1/agent/app_filter_task/export_all`,method:"GET",params:{task_id:this.currentTask?.id}});this.exportAllPdfLoading=false;if(t.success){_("导出任务已创建!","success");this.handleExportRecordsClick()}};handleViewResume=async t=>{if(t.file_url||t.resume_file_url){const e=t.file_url||t.resume_file_url;try{const o=await d(e);if(o){this.showPreview(`${t.fileName} - 简历详情`,"","file",o)}else{_("无法获取简历预览,请稍后重试","error")}}catch(t){console.error("获取简历预览失败:",t);I.captureError(t,{action:"handleViewResume",component:"oem-jlsx-modal",title:"获取简历预览失败"});this.someErrorEvent.emit({error:t,message:"获取简历预览失败,请稍后重试"})}}else{_("简历文件不存在","error")}};handleDeleteRecord=async t=>{this.activeDropdownId=null;const e=this.filteredResumeRecords.find((e=>e.id===t));if(e){this.deletingRecordId=t;try{const o=await s({url:`/sdk/v1/agent/app_filter_resume/delete/${t}`,method:"DELETE"});if(o.success){this.filteredResumeRecords=this.filteredResumeRecords.filter((e=>e.id!==t));_("删除成功","success");this.resumeDeleted.emit({task_id:this.currentTask.id,resume_id:t,resume_name:e.fileName,delete_time:(new Date).toISOString()});await this.loadResumeList()}else{throw new Error(o.message||"删除失败")}}catch(e){console.error("删除记录失败:",e);I.captureError(e,{action:"handleDeleteRecord",component:"oem-jlsx-modal",title:"删除记录失败",recordId:t});_("删除失败,请重试","error")}finally{this.deletingRecordId=null}}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.id!==t));_("删除成功","success")}};handleEvaluationCriteriaNameChange=(t,e)=>{const o=[...this.evaluationCriteria];o[t].name=e;this.evaluationCriteria=o};handleEvaluationCriteriaValueChange=(t,e)=>{const o=[...this.evaluationCriteria];const i=parseInt(e)||0;o[t].value=Math.max(0,Math.min(100,i));this.evaluationCriteria=o};handleEvaluationCriteriaDescriptionChange=(t,e)=>{const o=[...this.evaluationCriteria];o[t].description=e;this.evaluationCriteria=o};addEvaluationCriteria=()=>{const t=[...this.evaluationCriteria];t.push({name:"",value:0,description:""});this.evaluationCriteria=t};removeEvaluationCriteria=t=>{if(this.evaluationCriteria.length<=1){_("至少需要保留一个评分标准","warning");return}const e=this.evaluationCriteria.filter(((e,o)=>o!==t));this.evaluationCriteria=e};getTotalWeight=()=>this.evaluationCriteria.reduce(((t,e)=>t+e.value),0);getHistoryEntryLabel=()=>this.currentStep==="input"?"历史任务":"任务管理";getHistoryEntryTitle=()=>this.currentStep==="input"?"点击查看历史任务":"点击查看任务管理";shouldShowHistoryEntry=()=>this.currentStep==="input"?this.showInputHistory:this.showWorkspaceHistory;getTaskHistoryDrawerTitle=()=>this.taskHistoryDrawerSource==="input"?"历史任务":"任务管理";renderInputStep(){const t=Boolean(this.customInputs&&this.customInputs.job_info);return i("div",{class:"input-container"},i("div",{class:"step-header"},i("h3",null,"创建简历筛选任务"),i("p",{class:"step-description"},"请输入职位描述和评分标准")),i("div",{class:"jd-input-section"},i("div",{class:"label-with-button"},i("label",{htmlFor:"job-description"},"职位描述 (JD)"),!t&&i("div",{class:"button-group"},this.oemId&&i("button",{class:"position-selector-button",onClick:this.handleOpenPositionSelector,type:"button"},"选择职位"),i("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}))),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.customInputs?.job_info||this.jobDescription,onInput:this.handleJobDescriptionChange,disabled:t})),i("div",{class:"criteria-input-section"},i("div",{class:"criteria-header"},i("label",{htmlFor:"evaluation-criteria"},"评分标准"),i("div",{class:"criteria-actions"},i("span",{class:`total-weight ${this.getTotalWeight()!==100?"invalid":""}`},"总权重: ",this.getTotalWeight(),"%"),i("span",null))),i("div",{class:"criteria-table-container"},i("table",{class:"criteria-table"},i("thead",null,i("tr",null,i("th",{style:{width:"25%"}},"标准名称"),i("th",{style:{width:"15%"}},"权重(%)"),i("th",{style:{width:"50%"}},"描述"),i("th",{style:{width:"10%"}},"操作"))),i("tbody",null,this.evaluationCriteria.map(((t,e)=>i("tr",{key:e},i("td",null,i("input",{type:"text",class:"criteria-name-input",placeholder:"请输入标准名称",value:t.name,onInput:t=>this.handleEvaluationCriteriaNameChange(e,t.target.value)})),i("td",null,i("input",{type:"number",class:"criteria-value-input",placeholder:"0",min:"0",max:"100",value:t.value,onInput:t=>this.handleEvaluationCriteriaValueChange(e,t.target.value)})),i("td",null,i("textarea",{class:"criteria-description-input",placeholder:"请输入评分标准描述",rows:2,value:t.description,onInput:t=>this.handleEvaluationCriteriaDescriptionChange(e,t.target.value)})),i("td",null,i("button",{type:"button",class:"remove-criteria-btn",disabled:this.evaluationCriteria.length<=1,onClick:()=>this.removeEvaluationCriteria(e),title:this.evaluationCriteria.length<=1?"至少需要保留一个评分标准":"删除此标准"},"×")))))))),i("div",{class:"add-criteria-btn-wrapper"},i("button",{type:"button",class:"add-criteria-btn",onClick:this.addEvaluationCriteria},"+ 添加标准")),this.getTotalWeight()!==100&&i("p",{class:"criteria-warning"},"⚠️ 权重总和应为100%,当前为",this.getTotalWeight(),"%")),i("button",{class:"submit-button",disabled:!(this.customInputs?.job_info||this.jobDescription.trim())||this.evaluationCriteria.length===0||this.getTotalWeight()!==100||this.isSubmitting,onClick:this.handleCreateTask},this.isSubmitting?"创建中...":"创建任务"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))))}renderTaskStep(){return i("div",{class:"task-container"},i("div",{class:"task-info-section"},i("div",{class:"info-cards"},i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleJdDetail},i("span",{class:"card-title"},"职位描述"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.jobDescription))),i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleCriteriaDetail},i("span",{class:"card-title"},"评分标准"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.getEvaluationCriteriaText()))))),i("div",{class:"upload-section"},i("div",{class:"section-header"},i("h4",null,"上传简历")),i("div",{class:this.customInputs?.file_urls?"upload-disabled-wrapper":"",onClick:t=>{if(this.customInputs?.file_urls){t.stopPropagation();t.preventDefault();_("不允许上传简历,请联系管理员","warning")}}},i("components-mobile-upload-btn",{multiple:true,maxFileSize:15*1024*1024,uploadAreaMode:true,disabled:!!this.customInputs?.file_urls,acceptFileSuffixList:[".pdf",".doc",".docx",".txt",".md",".ppt",".pptx",".jpg",".jpeg",".png"],uploadParams:{tags:["resume"]},onOk:this.handleUploadChange})),i("div",{class:"upload-actions"},this.uploadedResumeRecords.some((t=>t.evaluate_status!==1&&t.evaluate_status!==0))&&i("button",{class:"analyze-btn",onClick:this.handleStartAnalysis},`开始分析 (${this.uploadedResumeRecords.filter((t=>t.evaluate_status!==1&&t.evaluate_status!==0)).length} 个待分析)`))),i("div",{class:"resume-table-section"},i("div",{class:"section-header"},i("h4",null,"简历列表"),i("div",{class:"section-header-side"},this.showBatchExport&&!!this.resumeRecords?.find((t=>t.evaluate_status==1))&&i("div",{class:"export-actions"},i("div",{class:"export-btn",onClick:this.exportAllPDF},i("span",null,"批量导出报告")),i("div",{class:"export-divide"}),i("div",{class:"export-btn",onClick:this.handleExportRecordsClick},"导出记录")),i("button",{class:"refresh-btn",onClick:this.handleRefreshTable,disabled:this.isLoadingResumeList,title:"刷新表格"},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:this.isLoadingResumeList?"rotating":""},i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}))),i("span",{class:"record-count"},"已筛选 ",this.totalRecords," 条记录"))),i("div",{class:"table-container"},i("table",{class:"resume-table"},i("thead",null,i("tr",null,i("th",null,"简历文件名"),i("th",null,"人才信息"),i("th",{class:`sortable-header ${this.sortOrder!=="none"?"active":""}`,onClick:this.handleSortByScore},i("span",{class:"header-content"},"评估分数",i("span",{class:"sort-icons"},i("svg",{class:`sort-icon ${this.sortOrder==="asc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 3l4 4H2z",fill:"currentColor"})),i("svg",{class:`sort-icon ${this.sortOrder==="desc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 9L2 5h8z",fill:"currentColor"}))))),i("th",null,"评估详情"),i("th",null,"状态"),i("th",null,"操作"))),i("tbody",null,this.isLoadingResumeList?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("div",{class:"loading-spinner-small"}),i("p",null,"正在加载简历数据...")))):this.resumeRecords.length===0?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("p",null,"暂无简历数据"),i("p",{class:"empty-hint"},"请上传简历开始筛选")))):this.resumeRecords.map((t=>i("tr",{key:t.id},i("td",{class:"filename-cell"},i("span",{class:"file-icon"},"📝"),i("span",{title:t.fileName},t.fileName)),i("td",{class:"talent-info-cell",title:t.talentInfo},t.talentInfo),i("td",{class:"score-cell"},i("span",{class:`score-badge ${this.getScoreClass(t.score)}`},typeof t.score==="number"?t.score:"--")),i("td",{class:"detail-cell",title:t.scoreDetail},i("span",{class:"detail-content",onClick:()=>this.handleViewEvaluate(t)},t.scoreDetail)),i("td",{class:"status-cell"},i("span",{class:`status-badge status-${this.getEvaluateStatusClass(t.evaluate_status)}`},this.getEvaluateStatusText(t.evaluate_status))),i("td",{class:"action-cell"},i("div",{class:"action-dropdown"},i("button",{class:"action-btn dropdown-trigger",onClick:e=>{e.stopPropagation();this.toggleDropdown(t.id)}},"操作",i("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M7 10l5 5 5-5z"}))),this.activeDropdownId===t.id&&i("div",{class:"dropdown-menu"},i("div",{class:"dropdown-item",onClick:e=>{e.stopPropagation();this.handleViewEvaluate(t)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2a1 1 0 0 0-2 0v2H8V2a1 1 0 0 0-2 0v2H5a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zM4 18V9h16v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z"})),"评估详情"),i("div",{class:"dropdown-item",onClick:e=>{e.stopPropagation();this.handleViewResume(t)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})),"简历详情"),i("div",{class:`dropdown-item danger ${this.deletingRecordId===t.id?"disabled":""}`,onClick:e=>{e.stopPropagation();if(this.deletingRecordId!==t.id){this.handleDeleteRecord(t.id)}}},this.deletingRecordId===t.id?i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:"loading-spinner"},i("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z",opacity:"0.25"}),i("path",{d:"M12 2C17.523 2 22 6.477 22 12h-2a8 8 0 0 0-8-8V2z"})):i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M19 7l-.867 12.142A2 2 0 0 1 16.138 21H7.862a2 2 0 0 1-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3M4 7h16"})),this.deletingRecordId===t.id?"删除中...":"删除")))))))))),this.totalRecords>this.pageSize&&i("div",{class:"pagination"},i("button",{class:"page-btn",disabled:this.currentPage===1,onClick:()=>this.changePage(this.currentPage-1)},"上一页"),i("span",{class:"page-info"},"第 ",this.currentPage," 页,共 ",Math.ceil(this.totalRecords/this.pageSize)," 页"),i("button",{class:"page-btn",disabled:this.currentPage>=Math.ceil(this.totalRecords/this.pageSize),onClick:()=>this.changePage(this.currentPage+1)},"下一页")),i("div",{style:{height:"100px",width:"100%"}})))}getScoreClass(t){if(t>=90)return"excellent";if(t>=80)return"good";if(t>=70)return"average";if(t>=60)return"below-average";return"poor"}getEvaluationCriteriaText(){return this.evaluationCriteria.map((t=>`${t.name}(${t.value}%):${t.description}`)).join("\n\n")}getEvaluateStatusText(t){const e={0:"筛选中",1:"筛选完成",[-1]:"筛选失败"};return e[t]||"待分析"}getEvaluateStatusClass(t){const e={0:"analyzing",1:"completed",[-1]:"failed"};return e[t]||"pending"}changePage=async t=>{this.currentPage=t;await this.loadResumeList()};handleSortByScore=()=>{if(this.sortOrder==="none"){this.sortOrder="desc"}else if(this.sortOrder==="desc"){this.sortOrder="asc"}else{this.sortOrder="none"}this.currentPage=1;this.loadResumeList()};handleRefreshTable=async()=>{await this.loadResumeList();_("刷新成功","success")};async loadResumeList(){if(!this.currentTask)return;this.isLoadingResumeList=true;this.filteredResumeRecords=[];this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.evaluate_status===undefined));try{const t={task_id:this.currentTask.id,page:this.currentPage,size:this.pageSize};if(this.sortOrder==="desc"){t.order_by="score_desc"}else if(this.sortOrder==="asc"){t.order_by="score_asc"}const e=await s({url:"/sdk/v1/agent/app_filter_resume/page",method:"GET",data:t});if(e.success&&e.data){const t=e.data.records.map((t=>{let e="等待分析...";if(t.resume_data){try{const o=JSON.parse(t.resume_data);const i=o.result;if(i){const t=i.phone||i.email||"未知";const o=i.degree||"未知";const n=i.college||"未知";const r=i.work_year||"0";const a=i.work_position||"未知职位";e=`${t} | ${o} | ${n} | ${r}年经验 | ${a}`}}catch(t){console.warn("解析简历数据失败:",t)}}return{...t,id:t.id?.toString()||"",fileName:t.resume_file_name||"未知文件",talentInfo:e,scoreDetail:t.evaluate||"等待分析...",uploadTime:t.create_at?new Date(t.create_at):new Date,file_url:t.resume_file_url}}));this.filteredResumeRecords=t;this.totalRecords=e.data.total||0}}catch(t){console.error("加载简历列表失败:",t)}finally{this.isLoadingResumeList=false}}async startAnalysisWithCustomFileUrls(){if(!this.currentTask){_("任务信息不存在","error");return}const t=this.customInputs?.file_urls;if(!t){return}const e=t.split(",").map((t=>t.trim())).filter((t=>t));if(e.length===0){_("没有有效的简历文件URL","warning");return}this.isAnalyzing=true;this.isLoadingResumeList=true;try{const t=[];for(const o of e){if(o.startsWith("http://")||o.startsWith("https://")){try{const e=o.split("/").pop()||"resume.pdf";const i=await w({url:o,file_name:e});if(i.success&&i.data?.cos_key){t.push(i.data.cos_key)}else{console.error(`上传文件失败: ${o}`,i.message);_(`上传文件 ${e} 失败: ${i.message||"未知错误"}`,"error")}}catch(t){console.error(`上传文件出错: ${o}`,t);_(`上传文件出错: ${t instanceof Error?t.message:"未知错误"}`,"error")}}else{t.push(o)}}if(t.length===0){_("没有有效的简历文件可以分析","error");return}if(t.length<e.length){_(`部分文件上传失败,将继续分析 ${t.length}/${e.length} 个文件`,"warning")}const o=await s({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:t}});if(!o.success){throw new Error(o.message||"简历校验失败")}const i=o.data||[];if(i.length===0){_("已清除重复上传的简历,没有新的简历需要分析","info");return}const n=this.evaluationCriteria.map((t=>`- ${t.name}(占比${t.value}%):${t.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:i.length,resume_files:i.map((t=>({file_name:t.split("/").pop()||"未知文件",file_url:t})))});await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:"3022316191018874",response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:i.join(","),rule:n}},onMessage:t=>{if(t.event==="error"){const e=t.data?.message||t.message||"分析失败";this.someErrorEvent.emit({error:t.data,message:e});this.internalConversationId=null;return}if(t&&!this.internalConversationId&&(t.message_id||t.conversation_id||t.id)){this.internalConversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event||"message",message_id:t.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:t=>{console.error("简历分析失败:",t);I.captureError(t,{action:"startAnalysisWithCustomFileUrls",component:"oem-jlsx-modal",title:"简历分析失败"});this.someErrorEvent.emit({error:t,message:"简历分析失败,请重试"});this.internalConversationId=null}})}catch(t){console.error("开始分析失败:",t);I.captureError(t,{action:"startAnalysisWithCustomFileUrls",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:t,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false;this.isLoadingResumeList=false}}startAnalysis=async()=>{if(!this.currentTask){_("任务信息不存在","error");return}const t=this.uploadedResumeRecords.filter((t=>t.evaluate_status!==1&&t.evaluate_status!==0));if(t.length===0){_("没有需要分析的简历","warning");return}this.isAnalyzing=true;try{t.forEach((t=>{t.evaluate_status=0}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];const e=t.map((t=>t.file_url||t.fileInfo?.cos_key)).filter((t=>t));if(e.length===0){_("简历文件URL获取失败","error");return}const o=await s({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:e}});if(!o.success){throw new Error(o.message||"简历校验失败")}const i=o.data||[];if(i.length===0){_("已清除重复上传的简历,没有新的简历需要分析","info");this.uploadedResumeRecords=[];return}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>{const e=t.file_url||t.fileInfo?.cos_key;return i.includes(e)||t.evaluate_status===0}))}const n=this.evaluationCriteria.map((t=>`- ${t.name}(占比${t.value}%):${t.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:i.length,resume_files:t.map((t=>({file_name:t.fileName,file_url:t.file_url||t.fileInfo?.cos_key||""}))).filter((t=>i.includes(t.file_url)))});if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:"3022316191018874",response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:i.join(","),rule:n}},onMessage:e=>{if(e.event==="error"){const o=e.data?.message||e.message||"分析失败";t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];this.someErrorEvent.emit({error:e.data,message:o});this.internalConversationId=null;return}if(e&&!this.internalConversationId&&(e.message_id||e.conversation_id||e.id)){this.internalConversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event||"message",message_id:e.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.evaluate_status!==0));await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:e=>{console.error("简历分析失败:",e);t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(e,{action:"startAnalysis",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:e,message:"开始分析失败,请重试"});this.internalConversationId=null}})}catch(e){console.error("开始分析失败:",e);t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(e,{action:"startAnalysis",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:e,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false}};handleTaskHistoryClick=t=>{this.taskHistoryDrawerSource=t;this.isTaskHistoryDrawerOpen=true;this.loadHistoryTasks()};async loadHistoryTasks(){this.isLoadingHistoryTasks=true;try{const t=await s({url:"/sdk/v1/agent/app_filter_task/page",method:"GET",data:{page:this.taskHistoryCurrentPage,size:this.taskHistoryPageSize}});if(t.success&&t.data){this.historyTasks=t.data.records.map((t=>{let e="未知时间";try{const o=new Date(t.create_at);if(isNaN(o.getTime())){return{...t,timeDisplay:e}}const i=new Date;const n=i.getTime()-o.getTime();const r=Math.floor(n/(1e3*60*60*24));if(r===0){e=`今天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(r===1){e=`昨天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(r>0&&r<7){const t=["周日","周一","周二","周三","周四","周五","周六"];e=`${t[o.getDay()]} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else{e=`${(o.getMonth()+1).toString().padStart(2,"0")}-${o.getDate().toString().padStart(2,"0")} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}}catch(e){console.error("时间格式化错误:",e,t.create_at)}return{...t,timeDisplay:e}}));this.taskHistoryTotal=t.data.total||0}}catch(t){console.error("获取历史任务失败:",t);I.captureError(t,{action:"loadHistoryTasks",component:"oem-jlsx-modal",title:"获取历史任务失败"});this.someErrorEvent.emit({error:t,message:"获取历史任务失败"})}finally{this.isLoadingHistoryTasks=false}}handleOpenPositionSelector=()=>{if(!this.oemId){j.info("未配置OEM ID,无法选择职位");return}this.showPositionSelector=true};handleClosePositionSelector=()=>{this.showPositionSelector=false};handlePositionSelected=t=>{const e=t.detail;this.jobDescription=e.formatted_text||"";this.showPositionSelector=false;j.success("职位信息已填充")};handleSwitchTask=async t=>{if(t===this.currentTask?.id){this.isTaskHistoryDrawerOpen=false;return}const e=this.currentTask?.id;try{const o=await s({url:`/sdk/v1/agent/app_filter_task/query/${t}`,method:"GET"});if(!o.success||!o.data){throw new Error(o.message||"获取任务详情失败")}const i=o.data;let n=[];if(i.extra){try{const t=typeof i.extra==="string"?JSON.parse(i.extra):i.extra;if(Array.isArray(t)){n=t}else if(Array.isArray(t?.criteria)){n=t.criteria.map((t=>({name:t.name,description:t.description,value:t.weight??t.value??0})))}}catch(t){console.warn("解析评分标准失败:",t)}}this.currentTask={id:i.id,jd_id:i.jd_id,user_id:i.user_id,extra:i.extra,create_at:i.create_at,update_at:i.update_at};this.jobDescription=i.jd_info?.description||"";this.jobTitle=i.jd_info?.title||"";this.evaluationCriteria=n.length>0?n:this.evaluationCriteria;this.currentStep="task";this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.currentPage=1;this.totalRecords=0;this.isTaskHistoryDrawerOpen=false;await this.loadResumeList();this.taskSwitch.emit({previous_task_id:e,current_task_id:i.id,task_title:`任务 #${i.id}`,switch_time:(new Date).toISOString()});_("切换任务成功","success")}catch(t){console.error("切换任务失败:",t);I.captureError(t,{action:"handleSwitchTask",component:"oem-jlsx-modal",title:"切换任务失败"});this.someErrorEvent.emit({error:t,message:"切换任务失败"})}};handleTaskHistoryPageChange=async t=>{this.taskHistoryCurrentPage=t;await this.loadHistoryTasks()};handleExportRecordsClick=()=>{this.isExportRecordsModalOpen=true};handleExportRecordsModalClose=()=>{this.isExportRecordsModalOpen=false};handleDocumentClick=t=>{const e=t.target;const o=e.closest(".action-dropdown");if(!o&&this.activeDropdownId){this.activeDropdownId=null}};emitAnalysisCompleteEvent=()=>{if(!this.currentTask)return;const t=this.resumeRecords;const e=t.filter((t=>t.evaluate_status===1&&typeof t.score==="number"));const o=t.filter((t=>t.evaluate_status===-1));const i=e.map((t=>t.score)).filter((t=>typeof t==="number"));const n=i.length>0?i.reduce(((t,e)=>t+e),0)/i.length:0;const r=i.length>0?Math.max(...i):0;this.resumeAnalysisComplete.emit({task_id:this.currentTask.id,total_resumes:t.length,analyzed_resumes:e.length,failed_resumes:o.length,average_score:Math.round(n*100)/100,highest_score:r})};handleUploadChange=t=>{if(!this._uploadEnabled){if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}this.someErrorEvent.emit({error:new Error("上传功能已被禁用"),message:"上传功能已被禁用,请联系管理员"});return}if(!this.currentTask){_("请先创建任务","warning");return}const e=t.detail||[];const o=this.uploadedResumeRecords.map((t=>t.file_url||t.fileInfo?.cos_key)).filter((t=>t));const i=e.filter((t=>!o.includes(t.cos_key)));const n=e.map((t=>t.cos_key));const r=o.filter((t=>!n.includes(t)));if(i.length>0){const t=i.map((t=>{const e={id:Date.now()+Math.random().toString(),fileName:t.file_name||"未知文件",talentInfo:"等待分析...",score:undefined,scoreDetail:"等待分析...",uploadTime:new Date,fileInfo:t,task_id:this.currentTask.id,file_url:t.cos_key,evaluate_status:undefined};return e}));this.uploadedResumeRecords=[...this.uploadedResumeRecords,...t];t.forEach((t=>{this.uploadSuccess.emit(t.fileInfo)}));_(`成功上传 ${t.length} 个简历文件!`,"success")}if(r.length>0){this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>{const e=t.file_url||t.fileInfo?.cos_key;return!r.includes(e)}))}};handleStartAnalysis=async()=>{if(await(this.pcmUploadRef?.getIsUploading?.())){_("文件上传中,请稍后","info");return}await this.startAnalysis()};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":this.currentStep==="input","task-layout":this.currentStep==="task"};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.shouldShowHistoryEntry()&&i("button",{type:"button",class:"header-history-entry",onClick:()=>this.handleTaskHistoryClick(this.currentStep==="input"?"input":"workspace"),title:this.getHistoryEntryTitle()},this.getHistoryEntryLabel())),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.currentStep==="input"?this.renderInputStep():this.renderTaskStep()),i("components-drawer",{isOpen:this.showJdDrawer,drawerTitle:"职位描述",width:"500px",onClosed:this.closeJdDrawer},i("div",{class:"drawer-content"},i("div",{class:"drawer-text-content"},this.jobDescription))),i("components-drawer",{isOpen:this.showCriteriaDrawer,drawerTitle:"评分标准",width:"500px",onClosed:this.closeCriteriaDrawer},i("div",{class:"drawer-content"},i("div",{class:"drawer-text-content"},this.getEvaluationCriteriaText()))),i("components-drawer",{isOpen:this.showPreviewDrawer,drawerTitle:this.previewTitle,width:"600px",onClosed:this.closePreviewDrawer},i("div",{class:"drawer-content"},this.previewType==="markdown"?i("div",{class:"markdown-content markdown-body",innerHTML:r(this.previewContent)}):i("div",{class:"file-preview"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})))),i("components-drawer",{isOpen:this.isTaskHistoryDrawerOpen,drawerTitle:this.getTaskHistoryDrawerTitle(),width:"500px",onClosed:()=>{this.isTaskHistoryDrawerOpen=false}},i("div",{class:"task-history-drawer-content"},i("div",{class:"task-list"},this.isLoadingHistoryTasks?i("div",{class:"loading-tasks"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyTasks.length===0?i("div",{class:"empty-tasks"},i("p",null,"暂无历史任务")):this.historyTasks.map((t=>i("div",{key:t.id,class:{"task-item":true,active:t.id===this.currentTask?.id},onClick:()=>this.handleSwitchTask(t.id)},i("div",{class:"task-info"},i("div",{class:"task-header"},i("div",{class:"task-id"},t.title||`任务 #${t.id}`),i("div",{class:"task-time"},t.timeDisplay))),t.id===this.currentTask?.id&&i("div",{class:"current-task-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))),this.taskHistoryTotal>this.taskHistoryPageSize&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage===1,onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage-1)},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.taskHistoryCurrentPage," 页,共 ",Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize)," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage>=Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize),onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage+1)},"下一页")))),i("components-export-records-modal",{open:this.isExportRecordsModalOpen,botId:this.botId,sourceId:this.currentTask?.id?.toString(),onCancel:this.handleExportRecordsModalClose}),this.showPositionSelector&&i("div",{class:"position-selector-modal-overlay"},i("div",{class:"position-selector-modal"},i("div",{class:"position-selector-modal-header"},i("h3",null,"选择职位"),i("button",{class:"position-selector-close-btn",onClick:this.handleClosePositionSelector},"×")),i("div",{class:"position-selector-modal-body"},i("components-position-selector",{oemId:this.oemId,multiple:false,onPositionSelected:this.handlePositionSelected})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ue.style=ce+(pe+(he+fe));const ge='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const me=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;border:1px solid #d9d9d9;border-radius:6px;overflow:hidden}.plan-type-option{flex:1;border:none;border-right:1px solid #d9d9d9;padding:7px 8px;cursor:pointer;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;transition:background-color 0.2s, color 0.2s;background-color:#fff}.plan-type-option:last-child{border-right:none}.plan-type-option:hover{background-color:#f0f7ff}.plan-type-option.selected{background-color:#1890ff}.plan-type-option.selected .option-icon,.plan-type-option.selected .option-label{color:#fff}.option-icon{display:flex;align-items:center;justify-content:center}.option-icon img{height:18px;width:auto}.option-label{font-size:13px;font-weight:500;color:#555;white-space:nowrap}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}.dynamic-form-section{margin-top:20px;margin-bottom:20px}.form-fields{display:flex;flex-direction:column;gap:16px}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-weight:600;color:#333;font-size:14px}.form-input{padding:10px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;transition:all 0.3s;outline:none}.form-input:hover{border-color:#40a9ff}.form-input:focus{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.1)}.form-input::placeholder{color:#bfbfbf}.form-hint{font-size:12px;color:#8c8c8c;line-height:1.5;margin-top:-8px;padding:8px 12px;background-color:#f5f5f5;border-radius:4px;border-left:3px solid #1890ff}.phone-input{width:calc(100% - 16px);padding:8px;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.phone-input:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.verification-code-container{display:flex;gap:8px;align-items:center}.verification-code-input{flex:1;padding:8px;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.verification-code-input:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.send-code-button{padding:8px 16px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all 0.3s ease;white-space:nowrap;min-width:100px}.send-code-button:hover:not(:disabled){background-color:#40a9ff}.send-code-button:disabled{background-color:rgba(0, 0, 0, 0.04);color:rgba(0, 0, 0, 0.25);cursor:not-allowed}";const be=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const xe=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.planningComplete=o(this,"planningComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.sendSmsCodeRequest=o(this,"sendSmsCodeRequest")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;sendSmsCodeRequest;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="初入职场";targetPosition="";industryName="";jobPosition="";timePeriod="";phoneNumber="";verificationCode="";isSendingCode=false;countdown=0;isVerifyingCode=false;get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;countdownTimer=null;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.isSubmitting=false;this.uploadedFileInfo=null;this.phoneNumber="";this.verificationCode="";this.isSendingCode=false;this.isVerifyingCode=false;this.countdown=0;if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}else{if(this.customInputs&&this.customInputs.type){const t=this.customInputs.type;if(t==="转型建议"||t==="晋升路径"||t==="初入职场"){this.selectedPlanType=t}}await f(this.token);if(this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}handleClose=()=>{this.modalClosed.emit()};handlePlanTypeChange=t=>{this.selectedPlanType=t;this.targetPosition="";this.industryName="";this.jobPosition="";this.timePeriod=""};handlePhoneNumberChange=t=>{const e=t.target;this.phoneNumber=e.value};handleVerificationCodeChange=t=>{const e=t.target;this.verificationCode=e.value};startCountdown=()=>{this.countdown=60;if(this.countdownTimer){clearInterval(this.countdownTimer)}this.countdownTimer=setInterval((()=>{this.countdown--;if(this.countdown<=0){if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}}),1e3)};handleSendCode=()=>{if(!this.phoneNumber.trim()){j.error("请输入手机号");return}const t=/^1[3-9]\d{9}$/;if(!t.test(this.phoneNumber.trim())){j.error("请输入正确的手机号");return}this.isSendingCode=true;this.sendSmsCodeRequest.emit({mobile:this.phoneNumber.trim(),codeType:8});this.startCountdown();this.isSendingCode=false};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){j.info("请上传简历");return}if(this.phoneNumber.trim()){const t=/^1[3-9]\d{9}$/;if(!t.test(this.phoneNumber.trim())){j.error("请输入正确的手机号");return}if(!this.verificationCode.trim()){j.error("请输入验证码");return}this.isVerifyingCode=true;try{const t=await v(this.phoneNumber.trim(),this.verificationCode.trim(),0);if(!t.success){j.error(t.message||"验证码错误");this.isVerifyingCode=false;return}}catch(t){j.error("验证码校验失败");this.isVerifyingCode=false;return}this.isVerifyingCode=false}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=t=>{this.planningComplete.emit({...t.detail,type:this.selectedPlanType})};getPlanTypeIcon=t=>{const e=this.selectedPlanType===t;const o="https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/";const i={初入职场:"i_entry_level",晋升路径:"i_promotion",转型建议:"i_transition"};return`${o}${i[t]}${e?"_actived":""}.png`};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择建议类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="初入职场"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("初入职场")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("初入职场"),alt:"初入职场"})),i("div",{class:"option-label"},"初入职场")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("晋升路径"),alt:"晋升路径"})),i("div",{class:"option-label"},"晋升路径")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转型建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转型建议")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("转型建议"),alt:"转型建议"})),i("div",{class:"option-label"},"转型建议")))),i("div",{class:"dynamic-form-section"},this.selectedPlanType==="初入职场"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:t=>this.industryName=t.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:t=>this.jobPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项")),this.selectedPlanType==="转型建议"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:t=>this.industryName=t.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:t=>this.jobPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项"),i("div",{class:"form-field"},i("label",null,"期望转型时间"),i("input",{type:"text",class:"form-input",placeholder:"请输入您期望的转型时间",value:this.timePeriod,onInput:t=>this.timePeriod=t.target.value}))),this.selectedPlanType==="晋升路径"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"晋升目标岗位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您的晋升目标岗位",value:this.targetPosition,onInput:t=>this.targetPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,建议您填写晋升目标岗位名称"))),i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-mobile-upload-btn",{maxFileSize:15*1024*1024,multiple:false,uploadAreaMode:true,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},defaultFileList:this.customInputs?.file_url?[{cos_key:this.customInputs.file_url,file_name:this.customInputs?.file_name||"预设简历",file_size:0,ext:""}]:undefined,disabled:r,onOk:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("div",{class:"jd-input-section"},i("label",null,"手机号(选填,填写后结果将通过短信发送)"),i("input",{type:"tel",class:"phone-input",placeholder:"请输入手机号",maxLength:11,value:this.phoneNumber,onInput:this.handlePhoneNumberChange})),this.phoneNumber.trim().length===11&&i("div",{class:"jd-input-section"},i("label",null,"验证码"),i("div",{class:"verification-code-container"},i("input",{type:"text",class:"verification-code-input",placeholder:"请输入验证码",maxLength:6,value:this.verificationCode,onInput:this.handleVerificationCodeChange}),i("button",{class:"send-code-button",disabled:this.isSendingCode||this.countdown>0||!this.phoneNumber.trim(),onClick:this.handleSendCode},this.isSendingCode?"发送中...":this.countdown>0?`${this.countdown}秒`:"发送验证码"))),i("button",{class:"submit-button",disabled:!r&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting||this.isVerifyingCode,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isVerifyingCode?"验证中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"121182005294690304",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType,phone:this.phoneNumber.trim()||undefined,...this.industryName?{industry_name:this.industryName}:{},...this.targetPosition||this.jobPosition?{target_position:this.targetPosition||this.jobPosition}:{},...this.timePeriod?{time_period:this.timePeriod}:{}},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};xe.style=ge+(me+be);const ye="";const we='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const ve=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ke=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.recordingError=o(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await f(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:t=>this.virtualChatModalRef=t,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018903",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,botId:"3022316191018903",digitalId:this.digitalId,showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name,ai_interview_type:this.digitalId||2},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ke.style=ye+(we+ve);const Ce="在线客服";const ze="内容由AI生成,仅供参考";const Ie="保存职位";const Se="简历制作";const je="发消息";const _e="会话已结束";const Te="语音输入";const Fe="点击停止录音";const Me="正在识别语音...";const Ee="结束面试";const De="正在结束...";const Be="正在结束面试...";const Re="历史会话";const Oe="确认完成";const Ae="继续录制";const He="确认结束";const Le="取消";const Pe="点击确认完成将结束本题回答";const qe="确认要结束面试吗?";const $e="新会话";const Ue="未知时间";const Ne="时间解析失败";const Ve="内容预览";const We={sunday:"周日",monday:"周一",tuesday:"周二",wednesday:"周三",thursday:"周四",friday:"周五",saturday:"周六"};const Je={recordingErrorText:"录制过程中发生错误",emptyVideo:"录制的视频为空",processVideoError:"处理录制视频时出错",deviceAccessFailed:"设备访问失败",permissionDenied:"请允许访问摄像头和麦克风权限",deviceNotFound:"未检测到摄像头或麦克风设备",unsupportedConfiguration:"摄像头不支持指定的配置",videoElementNotFound:"未找到视频元素或媒体流无效",noAudioData:"没有录制到音频数据",emptyAudio:"录制的音频为空",speechRecognitionFailed:"未能识别语音内容",sendMessageCheckNetwork:"消息发送失败,请检查网络。",browserNotSupportVideoRecording:"您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用",cameraOrMicAccessFailed:"无法访问摄像头或麦克风,请检查设备连接"};const Qe={pleaseStart:"请开始",nextQuestion:"下一题",generateResume:"生成简历",endInterviewMessage:"请结束面试"};const Ye={userConfirmEnd:"用户确认结束面试",userCancelEnd:"用户取消结束面试"};const Ge={interviewCompleted:"面试已完成,感谢您的参与!",aiReviewing:"AI正在查看面试信息...",playingQuestion:"正在播放问题,请听完后准备回答...",uploadingVideo:"正在上传视频,请稍候...",waitingForQuestion:"请等待题目...",prepareToRecord:"请准备好,{time}秒后将开始录制您的回答...",preparing:"准备中..."};const Xe={completeAnswer:"完成本题回答",completeAnswerShort:"完成回答",endChatGenerateResume:"结束对话生成简历"};const Ke={loadingHistory:"加载历史消息中..."};const Ze={greeting:"你好,我是聘才猫,一个AI助手,很高兴认识你..."};const to={recordingInProgress:"录制中",autoCompleteWarning:"即将自动完成",currentRecordingTime:"当前录制时长:",recordingStillInProgress:"注意:录制仍在进行中"};const eo={loading:"加载中...",noHistory:"暂无历史会话"};const oo={trySolutions:"请尝试以下解决方案:",solution1:"更换有摄像头和麦克风的设备",solution2:"确保已允许浏览器访问摄像头和麦克风",solution3:"关闭其他正在使用摄像头/麦克风的应用"};const io={noReminderThisInterview:"本次面试不再提醒",currentQuestion:"当前第 {count} 题",fewQuestionsWarning:"警告:",fewQuestionsWarningText:"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。",endInterviewConfirm:"确认要结束面试吗?结束后将生成面试报告。"};var no={modalTitle:Ce,aiDisclaimer:ze,saveJdButtonText:Ie,resumeCreation:Se,sendMessage:je,conversationEnded:_e,voiceInput:Te,clickToStopRecording:Fe,recognizingSpeech:Me,endInterview:Ee,ending:De,endingInterview:Be,historyConversations:Re,confirmComplete:Oe,continueRecording:Ae,confirmEnd:He,cancel:Le,clickConfirmCompleteToEnd:Pe,confirmEndInterviewPrompt:qe,newConversation:$e,unknownTime:Ue,timeParseError:Ne,contentPreview:Ve,weekdays:We,errors:Je,messages:Qe,logs:Ye,placeholderStatus:Ge,buttons:Xe,loading:Ke,welcome:Ze,recording:to,history:eo,deviceError:oo,confirm:io};const ro="Online Customer Service";const ao="AI-generated content, for reference only";const so="Save Job";const lo="Resume Creation";const co="Send Message";const po="Conversation Ended";const ho="Voice Input";const fo="Click to Stop Recording";const uo="Recognizing Speech...";const go="End Interview";const mo="Ending...";const bo="Ending Interview...";const xo="History Conversations";const yo="Confirm Complete";const wo="Continue Recording";const vo="Confirm End";const ko="Cancel";const Co='Click "Confirm Complete" to end this question';const zo="Are you sure you want to end the interview?";const Io="New Conversation";const So="Unknown Time";const jo="Time Parse Error";const _o="Content Preview";const To={sunday:"Sun",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat"};const Fo={recordingErrorText:"Recording Error Occurred",emptyVideo:"Recorded Video is Empty",processVideoError:"Error Processing Recorded Video",deviceAccessFailed:"Device Access Failed",permissionDenied:"Please Allow Access to Camera and Microphone",deviceNotFound:"Camera or Microphone Not Detected",unsupportedConfiguration:"Camera Does Not Support Specified Configuration",videoElementNotFound:"Video Element Not Found or Media Stream Invalid",noAudioData:"No Audio Data Recorded",emptyAudio:"Recorded Audio is Empty",speechRecognitionFailed:"Failed to Recognize Speech Content",sendMessageCheckNetwork:"Failed to send message, please check your network.",browserNotSupportVideoRecording:"Your browser does not support video recording, please switch to WeChat, Chrome, or Edge",cameraOrMicAccessFailed:"Unable to access camera or microphone, please check device connection"};const Mo={pleaseStart:"Please Start",nextQuestion:"Next Question",generateResume:"Generate Resume",endInterviewMessage:"Please End Interview"};const Eo={userConfirmEnd:"User Confirmed End Interview",userCancelEnd:"User Cancelled End Interview"};const Do={interviewCompleted:"Interview completed, thank you for your participation!",aiReviewing:"AI is reviewing interview information...",playingQuestion:"Playing question, please listen and prepare to answer...",uploadingVideo:"Uploading video, please wait...",waitingForQuestion:"Please wait for the question...",prepareToRecord:"Get ready, recording will start in {time} seconds...",preparing:"Preparing..."};const Bo={completeAnswer:"Complete This Answer",completeAnswerShort:"Complete Answer",endChatGenerateResume:"End Chat and Generate Resume"};const Ro={loadingHistory:"Loading history messages..."};const Oo={greeting:"Hello, I'm PinCaiMao, an AI assistant, nice to meet you..."};const Ao={recordingInProgress:"Recording",autoCompleteWarning:"Auto-complete soon",currentRecordingTime:"Current recording time: ",recordingStillInProgress:"Note: Recording still in progress"};const Ho={loading:"Loading...",noHistory:"No history conversations"};const Lo={trySolutions:"Please try the following solutions:",solution1:"Switch to a device with camera and microphone",solution2:"Ensure browser access to camera and microphone is allowed",solution3:"Close other applications using camera/microphone"};const Po={noReminderThisInterview:"Don't remind me again for this interview",currentQuestion:"Current question {count}",fewQuestionsWarning:"Warning:",fewQuestionsWarningText:"You have answered fewer than 3 questions. Ending the interview now may prevent proper completion of the interview process. It is recommended to complete more questions before ending.",endInterviewConfirm:"Are you sure you want to end the interview? An interview report will be generated after ending."};var qo={modalTitle:ro,aiDisclaimer:ao,saveJdButtonText:so,resumeCreation:lo,sendMessage:co,conversationEnded:po,voiceInput:ho,clickToStopRecording:fo,recognizingSpeech:uo,endInterview:go,ending:mo,endingInterview:bo,historyConversations:xo,confirmComplete:yo,continueRecording:wo,confirmEnd:vo,cancel:ko,clickConfirmCompleteToEnd:Co,confirmEndInterviewPrompt:zo,newConversation:Io,unknownTime:So,timeParseError:jo,contentPreview:_o,weekdays:To,errors:Fo,messages:Mo,logs:Eo,placeholderStatus:Do,buttons:Bo,loading:Ro,welcome:Oo,recording:Ao,history:Ho,deviceError:Lo,confirm:Po};const $o=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;overflow-y:auto;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#eaeaea}.placeholder-status{color:#00000066}.placeholder-status p{font-size:16px}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:20px}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;min-height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-left>div{font-size:16px}.header-title-group{display:flex;flex-direction:column;gap:2px}.header-title-group>div:first-child{font-size:16px}.header-disclaimer{font-size:11px;color:#999;line-height:1}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:60vh;min-height:400px;max-height:900px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.cancel-button{width:150px;height:38px;background:#0d75fb;color:#fff;border:none;margin-bottom:10px;cursor:pointer;border-radius:6px}.cancel-button.disabled{background:#d9d9d9;cursor:not-allowed}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.workspace-button.end-interview-button{background:#ff4d4f;color:white;border-color:#ff4d4f}.workspace-button.end-interview-button:hover:not(:disabled){background:#ff7875;border-color:#ff7875;color:white;box-shadow:0 2px 4px rgba(255, 77, 79, 0.2)}.workspace-button.end-interview-button:disabled{background:#d9d9d9;border-color:#d9d9d9;color:#999;cursor:not-allowed;box-shadow:none}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}";const Uo='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const No=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Vo=class{locale;strings;modalTitle="在线客服";token;isOpen=false;messages=[];modalClosed;icon;zIndex;isShowHeader=true;isNeedClose=true;conversationId;showSaveJdButton=false;saveJdButtonText="保存职位";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return t(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;waitingTime=10;closeResume;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;waitingTimeLeft=0;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;isPlayingAudio=false;recordingError;recordingStatusChange;tokenInvalid;historyConversationSelect;interviewMode="text";textAnswer="";isSubmittingText=false;customInputs={};botId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;userAvatar="https://pub.pincaimao.com/static/common/i_pcm_logo.png";assistantAvatar;agentLogo="";isTaskCompleted=false;virtualmanKey="";tokenInvalidListener;showCopyButton=true;showFeedbackButtons=true;filePreviewMode="drawer";showWorkspaceHistory=false;isDrawerOpen=false;previewUrl="";previewFileName="";previewContentType="file";previewContent="";isUserScrolling=false;deviceError=null;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;showConfirmModal=false;skipConfirmThisInterview=false;showEndInterviewConfirmModal=false;isEndingInterview=false;lastCompletedAnswer="";waitingForDigitalHuman=false;digitalHumanVideoReady=false;digitalId;showEndInterviewButton=false;playbackRate=1;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.recordingError=o(this,"recordingError");this.recordingStatusChange=o(this,"recordingStatusChange");this.tokenInvalid=o(this,"tokenInvalid");this.historyConversationSelect=o(this,"historyConversationSelect");r.setOptions({breaks:true,gfm:true})}async componentWillLoad(){this.strings=this.locale==="en"?qo:no;if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}else{const t=S.getItem("modal-zIndex");if(t){this.zIndex=t}else{this.zIndex=1e3;S.setItem("modal-zIndex",1e3)}}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);if(!this.customInputs){this.customInputs={}}if(!this.assistantAvatar&&this.botId){this.fetchAgentLogo()}if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}handleClose=()=>{this.stopRecording();this.modalClosed.emit()};async fetchAgentLogo(){if(!this.botId)return;try{const t=await k(this.botId);if(t&&t.logo){this.agentLogo=t.logo}}catch(t){I.captureError(t,{action:"fetchAgentLogo",component:"pcm-app-chat-modal",title:"获取智能体信息失败"});z.emitError({error:t,message:"获取智能体信息失败"})}}async sendMessageToAPI(t,e){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=t.trim()||this.strings?.messages?.pleaseStart;if(e){this.customInputs={...this.customInputs,video_url:e}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200);const l={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};l.inputs={...this.customInputs};await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:l,onMessage:t=>{if(t.conversation_id&&!this.conversationId){this.conversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="node_finished"&&t.data.inputs&&t.data.inputs.LLMText){i=t.data.inputs.LLMText}if(t.event==="node_finished"&&t.data.title&&t.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const t=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:t})}if(t.event==="node_finished"&&t.data.title&&t.data.title.includes("聘才猫数字人题目")){const e=JSON.parse(t.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(e)}if(t.event==="message"){if(t.event==="agent_message"||t.event==="message"){if(t.answer){o+=t.answer;const e={...this.currentStreamingMessage,answer:o,id:t.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:t.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:t.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=e;this.scrollToBottom()}}}if(t.event==="error"){const e=t.data?.message||t.message||"请求失败";this.messages=[...this.messages,{...s,answer:e,error:t.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;z.emitError({error:t.data,message:e});return}if(t.event==="message_end"){this.streamComplete.emit({conversation_id:t.conversation_id||"",event:t.event,message_id:t.message_id,id:t.id})}},onError:t=>{console.error("发生错误:",t);z.emitError({error:t,message:"消息发送失败,请稍后再试"});I.captureError(t,{action:"sendMessageToAPI",component:"pcm-app-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:this.strings?.errors?.sendMessageCheckNetwork,error:t,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3);const t={...this.currentStreamingMessage,isStreaming:false};if(t&&t.answer){this.lastCompletedAnswer=t.answer}this.messages=[...this.messages,t];this.currentStreamingMessage=null;this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.interviewMode==="video"){if(this.digitalId){this.waitingForDigitalHuman=true}else{this.startWaitingToRecord()}}}})}handleScroll=()=>{if(this.isUserScrolling){const t=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!t)return;const{scrollTop:e,scrollHeight:o,clientHeight:i}=t;const n=o-e-i;this.shouldAutoScroll=n<=20}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const t=this.hostElement.shadowRoot?.querySelector(".chat-history");if(t&&this.isOpen){t.scrollTop=t.scrollHeight}}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let t=false;this.digitalHumanVideoReady=true;try{const e=await s({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(e.success&&e.data&&e.data.run_status=="结束"){t=true}const o=await s({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const t=o.data.data||[];const e=t.map((t=>{const e=new Date(parseInt(t.created_at)*1e3);const o=e.getHours().toString().padStart(2,"0");const i=e.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:t.id,conversation_id:t.conversation_id,inputs:t.inputs||{},query:t.query||"",answer:t.answer||"",message_files:t.message_files||[],feedback:t.feedback||{},retriever_resources:t.retriever_resources||[],created_at:t.created_at,agent_thoughts:t.agent_thoughts||[],status:t.status||"normal",error:t.error,time:n,isStreaming:false}}));this.messages=e;this.currentQuestionNumber=e.length||0}}catch(t){console.error("加载历史消息或会话状态失败:",t);I.captureError(t,{action:"loadHistoryMessages",component:"pcm-app-chat-modal",title:"加载历史消息失败"});z.emitError({error:t,message:"加载历史消息失败"})}finally{this.isLoadingHistory=false;setTimeout((async()=>{this.shouldAutoScroll=true;this.scrollToBottom();if(this.conversationId&&this.messages.length>0&&!t&&!this.isTaskCompleted&&!this.isEndingInterview){if(this.interviewMode==="video"){this.startWaitingToRecord()}}else if(t){this.isTaskCompleted=true}}),200)}}startWaitingToRecord(){if(this.interviewMode!=="video"){return}if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const t=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=t;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(t);const e=C();let o;try{o=new MediaRecorder(t,{mimeType:e,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(e){console.warn("指定的MIME类型不受支持,使用默认设置:",e);try{o=new MediaRecorder(t,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(e){try{o=new MediaRecorder(t)}catch(t){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:t});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=t=>{if(t.data.size>0){i.push(t.data)}};o.onerror=t=>{this.recordingError.emit({type:"recording_error",message:this.strings?.errors?.recordingErrorText,details:t});this.stopRecording()};o.onstop=()=>{try{const t=e||"video/mp4";const o=new Blob(i,{type:t});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:this.strings?.errors?.emptyVideo});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(t){this.recordingError.emit({type:"processing_error",message:this.strings?.errors?.processVideoError,details:t});this.showRecordingUI=false;I.captureError(t,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(t){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:t});this.showRecordingUI=false;I.captureError(t,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const t=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-t);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(t){console.error("无法访问摄像头或麦克风:",t);let e=this.strings?.errors?.deviceAccessFailed;if(t.name==="NotAllowedError"){e=this.strings.errors.permissionDenied}else if(t.name==="NotFoundError"){e=this.strings.errors.deviceNotFound}else if(t.name==="NotReadableError"){e=this.strings.errors.browserNotSupportVideoRecording}else if(t.name==="OverconstrainedError"){e=this.strings.errors.unsupportedConfiguration}else{e=this.strings.errors.cameraOrMicAccessFailed}this.deviceError=e;this.showRecordingUI=false;z.emitError({error:t,message:e});I.captureError(t,{action:"startRecording",component:"pcm-app-chat-modal",title:e})}}setupVideoPreview(t){setTimeout((()=>{const e=this.hostElement.shadowRoot?.querySelector("video");if(e&&t){try{e.srcObject=t;e.play().catch((t=>{console.error("视频播放失败:",t);I.captureError(t,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"视频播放失败"});z.emitError({error:t,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(t);e.src=o;e.onended=()=>{URL.revokeObjectURL(o)}}catch(t){console.error("创建对象URL失败:",t);I.captureError(t,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"创建对象URL失败"});z.emitError({error:t,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((t=>t.stop()));this.recordingStream=null}this.videoRef=null}}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=t=>{const e=t.target;this.skipConfirmThisInterview=e.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const t=this.recordedBlob.type.includes("webm")?"webm":"mp4";const e=`answer.${t}`;const o=new File([this.recordedBlob],e,{type:this.recordedBlob.type});const i=await m(o,{},{tags:["other"]});const n=await y(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||this.strings?.messages?.nextQuestion,i.cos_key)}}catch(t){console.error("视频上传或处理错误:",t);this.isEndingInterview=false;I.captureError(t,{action:"uploadRecordedVideo",component:"pcm-app-chat-modal",title:"视频上传或处理失败"});z.emitError({error:t,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopRecording();this.stopAudioRecording()}handleTextInputChange=t=>{const e=t.target;this.textAnswer=e.value};handleKeyDown=t=>{if(t.key==="Enter"){if(t.isComposing){return}if(t.ctrlKey){const e=t.target;const o=e.selectionStart;const i=this.textAnswer.substring(0,o);const n=this.textAnswer.substring(o);this.textAnswer=i+"\n"+n;t.preventDefault();setTimeout((()=>{const t=o+1;e.setSelectionRange(t,t)}),0);return}else{t.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage&&!this.waitingToRecord){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const t=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(t)}catch(t){console.error("提交文本回答失败:",t);I.captureError(t,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});z.emitError({error:t,message:"提交文本回答失败"})}finally{this.isSubmittingText=false}};closeResumeChat=async()=>{const t={query:this.strings?.messages?.generateResume,inputs:{mode_type:1,generate_resume:1}};this.isSubmittingText=true;try{this.customInputs=t.inputs;this.closeResume?.();await this.sendMessageToAPI(t.query)}catch(t){console.error("提交文本回答失败:",t);I.captureError(t,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});z.emitError({error:t,message:"提交文本回答失败"})}finally{this.isSubmittingText=false;this.customInputs={}}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((t=>{this.startRecordingWithStream(t)})).catch((t=>{console.error("麦克风权限请求失败:",t);I.captureError(t,{action:"handleVoiceInputClick",component:"pcm-app-chat-modal",title:"麦克风权限请求失败"});z.emitError({error:t,message:"麦克风权限请求失败"})}))}};startRecordingWithStream(t){try{const e=x();let o;try{o=new MediaRecorder(t,{mimeType:e})}catch(e){console.warn("指定的音频MIME类型不受支持,使用默认设置:",e);try{o=new MediaRecorder(t)}catch(e){t.getTracks().forEach((t=>t.stop()));console.error("无法创建音频录制器:",e);I.captureError(e,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"无法创建音频录制器"});z.emitError({error:e,message:"无法创建音频录制器"});return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=t=>{if(t.data.size>0){this.audioChunks.push(t.data)}};o.onstop=()=>{t.getTracks().forEach((t=>t.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const t=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-t);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(e){t.getTracks().forEach((t=>t.stop()));console.error("开始录音失败:",e);I.captureError(e,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"开始录音失败"});z.emitError({error:e,message:"开始录音失败,请确保麦克风设备正常工作"})}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const t=x()||"audio/webm";const e=new Blob(this.audioChunks,{type:t});if(e.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=t.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([e],i,{type:t});const r=await m(n,{},{tags:["audio"]});const a=await y(r.cos_key);if(a){const t=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const e=t?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,e);const i=this.textAnswer.substring(e);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(t){const o=e+n.length+a.length;t.focus();t.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(t){console.error("处理音频录制失败:",t);I.captureError(t,{action:"processAudioRecording",component:"pcm-app-chat-modal",title:"处理音频录制失败"});z.emitError({error:t,message:"语音识别失败,请重试"})}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleHistoryClick=()=>{this.isHistoryDrawerOpen=true;this.loadHistoryConversations()};async loadHistoryConversations(){if(!this.botId){console.warn("没有提供botId,无法获取历史会话");return}this.isLoadingConversations=true;try{const t=await s({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:this.botId,limit:50,page:1}});if(t.success&&t.data){const e=t.data.data||[];this.historyConversations=e.map((t=>{let e;let o=this.strings?.unknownTime;try{const i=typeof t.created_at==="string"?parseInt(t.created_at):t.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",t.created_at);e=new Date}else{e=new Date(i*1e3)}if(isNaN(e.getTime())){console.warn("无效的日期对象:",t.created_at);e=new Date}const n=new Date;const r=n.getTime()-e.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const t=[this.strings?.weekdays?.sunday,this.strings?.weekdays?.monday,this.strings?.weekdays?.tuesday,this.strings?.weekdays?.wednesday,this.strings?.weekdays?.thursday,this.strings?.weekdays?.friday,this.strings?.weekdays?.saturday];o=`${t[e.getDay()]} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else{o=`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}}catch(e){console.error("时间格式化错误:",e,t.created_at);o=this.strings?.timeParseError}return{id:t.id,name:t.name||this.strings?.newConversation,created_at:t.created_at,updated_at:t.updated_at,status:t.status,message_count:t.message_count||0,timeDisplay:o,inputs:t.inputs}}))}}catch(t){console.error("获取历史会话失败:",t);I.captureError(t,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});z.emitError({error:t,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleSwitchConversation=t=>{const e=this.historyConversationSelect.emit(t);if(e.defaultPrevented){return}if(t.id===this.conversationId){this.isHistoryDrawerOpen=false;return}this.conversationId=t.id;this.messages=[];this.currentStreamingMessage=null;this.isTaskCompleted=false;this.currentQuestionNumber=0;this.isHistoryDrawerOpen=false;this.loadHistoryMessages()};handleFilePreviewRequest=t=>{const{url:e,fileName:o,content:i,contentType:n}=t.detail;this.previewFileName=o||this.strings?.contentPreview;this.previewContentType=n;this.previewUrl=e;this.previewContent=i||"";this.isDrawerOpen=true};isLastMessage(t){if(this.currentStreamingMessage){return false}if(this.messages.length===0){return false}const e=this.messages[this.messages.length-1];return t.id===e.id}handleDigitalHumanVideoGenerated=t=>{const{videoUrl:e}=t.detail;console.log("数字人视频生成成功:",{videoUrl:e,conversationId:this.conversationId,currentQuestionNumber:this.currentQuestionNumber});this.digitalHumanVideoReady=true};handleDigitalHumanVideoEnded=()=>{if(this.waitingForDigitalHuman&&this.interviewMode==="video"&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}};async precreateDigitalHumanVideos(t){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const e of t){if(!e||!e.trim())continue;try{await s({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(t){console.error(`为文本 "${e}" 创建视频任务失败:`,t);I.captureError(t,{action:"precreateDigitalHumanVideos",component:"pcm-app-chat-modal",title:`为文本 "${e}" 创建视频任务失败`})}}}handleAvatarDetailLoaded=t=>{if(t.detail.virtualmanKey){this.virtualmanKey=t.detail.virtualmanKey}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(t){console.error("点击结束发送消息失败:",t);this.isEndingInterview=false;I.captureError(t,{action:"handleConfirmEndInterview",component:"pcm-app-chat-modal",title:"点击结束发送消息失败"});z.emitError({error:t,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const t=this.strings?.messages?.endInterviewMessage;await this.sendMessageToAPI(t);this.isEndingInterview=false}catch(t){console.error("发送结束面试消息失败:",t);this.isEndingInterview=false;throw t}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((t=>t.answer&&t.answer.trim())).length;render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=()=>i("div",{class:"video-preview"},i("video",{autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:t=>{if(t&&this.recordingStream&&!this.videoRef){this.videoRef=t}}}),i("div",{class:{"recording-status":true,warning:this.showCountdownWarning}},i("span",{class:"recording-dot"}),i("span",null,this.strings.recording.recordingInProgress," ",Math.floor(this.recordingTimeLeft/60),":",(this.recordingTimeLeft%60).toString().padStart(2,"0"),this.showCountdownWarning&&` (${this.strings.recording.autoCompleteWarning})`)));const a=()=>{if(this.deviceError){return i("div",{class:"placeholder-status error-status"},i("p",null,this.deviceError),i("div",{class:"error-suggestions"},i("p",null,this.strings.deviceError.trySolutions),i("ul",null,i("li",null,this.strings.deviceError.solution1),i("li",null,this.strings.deviceError.solution2),i("li",null,this.strings.deviceError.solution3))))}if(this.isTaskCompleted){return i("div",{class:"placeholder-status"},i("p",null,this.strings.placeholderStatus.interviewCompleted))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.aiReviewing))}if(this.isPlayingAudio){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.playingQuestion))}if(this.isUploadingVideo){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.uploadingVideo))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.waitingForQuestion))}if(this.waitingToRecord){return i("div",{class:"placeholder-status"},i("p",null,(this.strings?.placeholderStatus?.prepareToRecord).replace("{time}",this.waitingTimeLeft.toString())))}return i("div",{class:"placeholder-status default-status"},i("p",null,this.strings?.placeholderStatus?.preparing))};const s=()=>i("div",{class:"text-input-area"},this.botId==="39284520284983296"&&i("button",{class:{"cancel-button":true,disabled:this.messages.length<=3},disabled:this.messages.length<=3,onClick:this.closeResumeChat},this.strings?.buttons?.endChatGenerateResume),this.botId==="45444431062634496"&&i("button",{class:{"cancel-button":true,disabled:this.isLoading},disabled:this.isLoading,onClick:()=>this.closeResume?.(),title:this.strings?.resumeCreation},this.strings?.resumeCreation),i("textarea",{class:"text-answer-input",placeholder:this.isTaskCompleted?this.strings.conversationEnded:this.strings.sendMessage,value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isTaskCompleted||this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?this.strings.clickToStopRecording:this.isConvertingAudio?this.strings.recognizingSpeech:this.strings.voiceInput,onClick:this.handleVoiceInputClick,disabled:this.isTaskCompleted||this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png"}))));const l=this.assistantAvatar||this.agentLogo;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon"}),i("div",{class:"header-title-group"},i("div",null,this.modalTitle),i("div",{class:"header-disclaimer"},this.strings?.aiDisclaimer))),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,this.strings?.loading?.loadingHistory)):i("div",null,[...this.messages,...this.currentStreamingMessage?[this.currentStreamingMessage]:[]].map((t=>i("div",{id:`message_${t.id}`,key:t.id},i("components-chat-message",{locale:this.locale,botId:this.botId,message:t,showAssistantMessage:!this.digitalId||!this.isLastMessage(t)||this.digitalHumanVideoReady||this.isTaskCompleted,userAvatar:this.userAvatar,assistantAvatar:l,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,filePreviewMode:this.filePreviewMode,onFilePreviewRequest:this.handleFilePreviewRequest,showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText})))),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},i("p",null,this.strings?.welcome?.greeting)))),i("div",{class:"recording-section"},i("div",{class:"recording-container"},(this.showWorkspaceHistory||this.digitalId||this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId)&&i("div",{class:"workspace-section"},i("div",{class:"workspace-toolbar"},i("div",{style:{display:"flex",gap:"8px"}},!this.isTaskCompleted&&this.conversationId&&this.showEndInterviewButton&&i("button",{class:"workspace-button end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isLoading||this.isEndingInterview,title:this.isEndingInterview?this.strings?.endingInterview:this.strings?.endInterview},i("span",null,this.isEndingInterview?this.strings?.ending:this.strings?.endInterview)),this.showWorkspaceHistory&&i("button",{class:"workspace-button history-button",onClick:()=>this.handleHistoryClick()},i("span",null,this.strings?.historyConversations))),this.digitalId&&!this.isTaskCompleted&&i("div",{class:"digital-human-wrapper"},i("components-digital-human",{digitalId:this.digitalId,speechText:this.lastCompletedAnswer,isStreaming:!!this.currentStreamingMessage,playbackRate:this.playbackRate,onVideoGenerated:this.handleDigitalHumanVideoGenerated,onVideoEnded:this.handleDigitalHumanVideoEnded,onAvatarDetailLoaded:this.handleAvatarDetailLoaded})))),this.interviewMode==="text"&&s(),this.interviewMode==="video"&&i("div",{class:"video-container"},i("div",{class:"video-area"},this.showRecordingUI?n():i("div",{class:"video-preview placeholder"},a())),i("div",{class:"recording-controls"},this.showRecordingUI?i("button",{class:"stop-recording-button",onClick:()=>this.handleStopRecording()},this.strings?.buttons?.completeAnswer):i("div",{class:"waiting-message"},i("button",{class:"stop-recording-button disabled",disabled:true},this.strings?.buttons?.completeAnswerShort))))))),i("components-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewContent=""}},this.previewContentType==="file"&&this.previewUrl&&i("div",{class:"file-preview-container"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})),this.previewContentType==="markdown"&&this.previewContent&&i("div",{class:"markdown-preview-container markdown-body",innerHTML:r(this.previewContent)}),this.previewContentType==="text"&&this.previewContent&&i("div",{class:"text-preview-container"},i("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"}},this.previewContent))),i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings.history.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings.history.noHistory)):this.historyConversations.map((t=>i("div",{key:t.id,class:{"conversation-item":true,active:t.id===this.conversationId},onClick:()=>this.handleSwitchConversation(t)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))),t.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))))),i("components-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:this.strings?.confirmComplete,okText:this.strings?.confirmComplete,cancelText:this.strings?.continueRecording,okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.recording.currentRecordingTime,(()=>{const t=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const e=Math.floor(t/60);const o=t%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.strings.recording.recordingStillInProgress)),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.strings.clickConfirmCompleteToEnd),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},this.strings.confirm.noReminderThisInterview)))),i("components-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:this.strings?.confirmEnd,okText:this.strings?.confirmEnd,cancelText:this.strings?.cancel,okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const t=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.confirm.currentQuestion.replace("{count}",t.toString())),t<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,this.strings.confirm.fewQuestionsWarning),this.strings.confirm.fewQuestionsWarningText)),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},this.strings.confirm.endInterviewConfirm))})()))))}static get watchers(){return{token:["handleTokenChange"]}}};Vo.style=$o+(Uo+No);const Wo="";const Jo='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Qo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Yo=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.recordingError=o(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await f(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:t=>this.virtualChatModalRef=t,isOpen:true,fullscreen:this.fullscreen,botId:"137635156700770304",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,interview_type:"1"}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,botId:"137635156700770304",digitalId:this.digitalId,showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Yo.style=Wo+(Jo+Qo);const Go=":host{display:inline-block}.pcm-button{display:inline-flex;align-items:center;justify-content:center;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;cursor:pointer;transition:all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0, 0, 0, 0.85);background-color:white;border-color:#d9d9d9;outline:none}.pcm-button:hover{border-color:#40a9ff;color:#40a9ff}.pcm-button:active{border-color:#096dd9;color:#096dd9}.pcm-button-default{background-color:white;border-color:#d9d9d9;color:rgba(0, 0, 0, 0.85)}.pcm-button-primary{background-color:#1677FF;border-color:#1677FF;color:white}.pcm-button-primary:hover{background-color:#40a9ff;border-color:#40a9ff;color:white}.pcm-button-primary:active{background-color:#096dd9;border-color:#096dd9;color:white}.pcm-button-dashed{background-color:white;border-color:#d9d9d9;border-style:dashed}.pcm-button-text{background-color:transparent;border-color:transparent;color:rgba(0, 0, 0, 0.85);box-shadow:none}.pcm-button-text:hover{background-color:rgba(0, 0, 0, 0.05);border-color:transparent;color:rgba(0, 0, 0, 0.85)}.pcm-button-link{background-color:transparent;border-color:transparent;color:#1677FF;box-shadow:none}.pcm-button-link:hover{color:#40a9ff;background-color:transparent;border-color:transparent}.pcm-button-large{height:40px;padding:0 20px;font-size:16px}.pcm-button-small{height:24px;padding:0 7px;font-size:12px}.pcm-button-circle{min-width:32px;padding:0;border-radius:50%}.pcm-button-large.pcm-button-circle{min-width:40px}.pcm-button-small.pcm-button-circle{min-width:24px}.pcm-button-round{border-radius:40px}.pcm-button-loading{opacity:0.65;cursor:default}.loading-icon{width:14px;height:14px;margin-right:8px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:loading-spin 1s infinite linear;display:inline-block}@keyframes loading-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pcm-button-disabled{cursor:not-allowed;opacity:0.65}.pcm-button-disabled:hover,.pcm-button-disabled:active{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9}.pcm-button-primary.pcm-button-disabled:hover,.pcm-button-primary.pcm-button-disabled:active{background-color:#1677FF;border-color:#1677FF;color:white}.button-icon{margin-right:8px;display:inline-flex;align-items:center}.button-icon img{width:16px;height:16px}.pcm-button-small .button-icon img{width:12px;height:12px}.pcm-button-large .button-icon img{width:18px;height:18px}.pcm-button-block{width:100%;display:flex}";const Xo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ko=class{constructor(t){e(this,t)}type="default";size="middle";loading=false;disabled=false;icon="https://pub.pincaimao.com/static/common/i_pcm_logo.png";shape="default";backgroundColor="";textColor="";borderColor="";borderRadius=null;width="";block=false;borderStyle="solid";render(){const t={"pcm-button":true,[`pcm-button-${this.type}`]:true,[`pcm-button-${this.size}`]:true,[`pcm-button-${this.shape}`]:true,"pcm-button-loading":this.loading,"pcm-button-disabled":this.disabled,"pcm-button-block":this.block};const e={};if(this.backgroundColor){e["backgroundColor"]=this.backgroundColor}if(this.textColor){e["color"]=this.textColor}if(this.borderColor){e["borderColor"]=this.borderColor}if(this.borderRadius!==null){e["borderRadius"]=`${this.borderRadius}px`}if(this.width){e["width"]=this.width}if(this.borderStyle){e["borderStyle"]=this.borderStyle}return i("button",{key:"0472468b868ca662e5a746caca553b1a98ea7ad2",class:Object.keys(t).filter((e=>t[e])).join(" "),style:e,disabled:this.disabled,type:"button"},this.loading&&i("span",{key:"592b93e881b07ea98399f3a342faebb0816e5133",class:"loading-icon"}),this.icon&&!this.loading&&i("span",{key:"123c3262837c197f57e9609e5d65018c4ab5fb2d",class:"button-icon"},i("img",{key:"db9222099784d828fc61b526a5341732d1857217",src:this.icon,alt:""})),i("slot",{key:"2a6b3f204af9a359fbda1b729bfee68f0eb45406"}))}};Ko.style=Go+Xo;const Zo=":host{display:block}.loading-container,.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;width:100%;color:#86909C;font-size:14px;text-align:center}.loading-spinner{width:32px;height:32px;border:3px solid #f3f3f3;border-top:3px solid #1677FF;border-radius:50%;margin-bottom:12px;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-icon{width:32px;height:32px;background-color:#FFF0F0;color:#F53F3F;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:bold;margin-bottom:12px}.error-message{color:#86909C;max-width:80%}.card-container{border-radius:8px;padding:16px;cursor:pointer;transition:all 0.2s ease;display:flex;flex-direction:column;background-color:#ffffff;border:1px solid #E5E6EB;position:relative;height:100%;min-width:300px}.card-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 21, 41, 0.08)}.card-header{display:flex;width:100%;padding-bottom:16px;gap:12px}.card-icon{width:64px;height:64px;margin-right:12px;flex-shrink:0;overflow:hidden;border-radius:2px;background-color:#f8f9fa}.card-icon img{width:100%;height:100%;object-fit:contain}.card-info{flex:1;display:flex;flex-direction:column;overflow:hidden}.title-row{display:flex;align-items:center}.title-wrapper{flex:1;margin-right:8px;overflow:hidden}.card-title{font-size:18px;font-weight:700;color:#1D2129;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}.chat-tag{display:flex;align-items:center;justify-content:center;height:24px;padding:0 8px;background-color:#F2F7E8;color:#56961F;font-size:12px;border-radius:4px;font-weight:500;flex-shrink:0}.author-row{display:flex;align-items:center;margin-top:8px}.author-avatar{width:16px;height:16px;border-radius:50%;margin-right:4px;background-color:#f8f9fa;overflow:hidden}.author-name{font-size:12px;color:#86909C}.card-description{font-size:12px;color:#86909C;margin-top:8px;line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:pre-line;word-break:break-word}.card-footer{padding-top:16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #E5E6EB}.stats-container{display:flex;align-items:center;flex:1}.stat-item{display:flex;align-items:center;margin-right:8px;color:#86909C}.stat-icon{width:16px;height:16px;margin-right:4px;background-repeat:no-repeat;background-position:center;background-size:contain}.user-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath d='M12 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6Zm0-10C9.8 4 8 5.8 8 8s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4Z' fill='currentColor'%3E%3C/path%3E%3Cpath d='M21.9 20.6c-.1-.2-2.3-5.6-9.9-5.6-7.6 0-9.8 5.4-9.9 5.6-.2.5 0 1.1.6 1.3.5.2 1.1 0 1.3-.5 0-.2 1.8-4.4 8-4.4s8 4.2 8.1 4.4c.2.5.8.8 1.3.5.5-.2.7-.8.5-1.3Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.star-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5.03 9.57 9.1c-.17.3-.46.5-.8.55l-4.3.79 3 3.46c.22.26.32.6.28.93l-.62 4.46 4.41-1.9c.3-.12.63-.12.92 0l4.4 1.9-.6-4.46c-.05-.34.05-.67.27-.93l3-3.46-4.3-.79a1.17 1.17 0 0 1-.8-.55L12 5.03Zm-1-2.46a1.16 1.16 0 0 1 2 0l3.03 5.07 5.51 1c.89.17 1.26 1.24.68 1.92l-3.8 4.4.77 5.71c.13.9-.78 1.6-1.61 1.23L12 19.5l-5.58 2.4a1.17 1.17 0 0 1-1.61-1.23l.78-5.7-3.8-4.4a1.17 1.17 0 0 1 .67-1.92l5.51-1L11 2.56Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.video-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm0 2h16v16H4V4Zm5.5 3.13A1 1 0 0 0 8 8v8a1 1 0 0 0 1.5.87l7-4a1 1 0 0 0 0-1.74l-7-4ZM13.98 12 10 14.28V9.72L13.98 12Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.stat-value{font-size:12px}.use-button{font-size:12px;color:#86909C;cursor:pointer;white-space:nowrap}.use-button:hover{color:#1677FF}@media screen and (max-width: 768px){.card-container{padding:12px}.card-header{gap:8px;padding-bottom:12px}.card-icon{width:48px;height:48px}.card-title{font-size:16px;line-height:20px}.card-description{font-size:12px;line-height:16px;height:48px}}";const ti=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ei=class{constructor(t){e(this,t);this.tokenInvalid=o(this,"tokenInvalid")}token;cardTitle="";description="";iconUrl="";author="";authorAvatarUrl="";showChatTag=false;customChatTag="";useButtonText="立即使用";botId="";botData=null;loading=false;error="";tokenInvalid;tokenInvalidListener;watchBotIdHandler(t){if(t){this.fetchBotData()}}handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}componentWillLoad(){if(this.token){h.setToken(this.token)}if(this.botId){this.fetchBotData()}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener)}async fetchBotData(){if(!this.botId)return;this.loading=true;this.error="";try{const t=await s({url:`/sdk/v1/agent/${this.botId}/info`,method:"GET"});if(t.success&&t.data){this.botData=t.data}else{throw new Error(t.message||"获取智能体信息失败")}}catch(t){this.error=t.message||"获取智能体信息失败";console.error("获取智能体信息失败:",t)}finally{this.loading=false}}render(){const t=this.cardTitle||(this.botData?.title||"");const e=this.description||(this.botData?.description||"");const o=this.botData?.icon||this.botData?.iconUrl||this.botData?.logo||"";const n=this.iconUrl||o;const r=this.author||(this.botData?.author_name||"");const a=this.authorAvatarUrl||(this.botData?.author_avatar||"");const s=this.customChatTag||(this.botData?.flag||"");const l=this.botData?.use_count||0;const d=this.botData?.follow_count||0;const c=this.botData?.view_count||0;console.log("渲染数据:",{title:t,icon:n,iconFromBot:o,userIconUrl:this.iconUrl,botData:this.botData,authorName:r,authorAvatar:a});return i("div",{key:"147282e742cb8b47127e426f40c4f1fb99288ed6",class:"card-container"},this.loading?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中...")):this.error?i("div",{class:"error-container"},i("div",{class:"error-icon"},"!"),i("div",{class:"error-message"},this.error)):i("div",null,i("div",{class:"card-header"},n&&i("div",{class:"card-icon"},i("img",{src:n,alt:t})),i("div",{class:"card-info"},i("div",{class:"title-row"},i("div",{class:"title-wrapper"},i("div",{class:"card-title"},t)),this.showChatTag&&s&&i("div",{class:"chat-tag"},s)),r&&i("div",{class:"author-row"},a&&i("img",{class:"author-avatar",src:a,alt:r}),i("div",{class:"author-name"},r)),e&&i("div",{class:"card-description"},e))),i("div",{class:"card-footer"},i("div",{class:"stats-container"},i("div",{class:"stat-item"},i("span",{class:"stat-icon user-icon"}),i("div",{class:"stat-value"},l)),i("div",{class:"stat-item"},i("span",{class:"stat-icon star-icon"}),i("div",{class:"stat-value"},d)),i("div",{class:"stat-item"},i("span",{class:"stat-icon video-icon"}),i("div",{class:"stat-value"},c))),i("div",{class:"use-button"},this.useButtonText||"立即使用"))))}static get watchers(){return{botId:["watchBotIdHandler"],token:["handleTokenChange"]}}};ei.style=Zo+ti;const oi=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}";const ii='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const ni=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ri=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="劳动合同卫士";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}isSubmitting=false;inputMode="upload";freeInputText="";tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("3022316191018882","pcm-htws-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleToggleInput=()=>{this.inputMode=this.inputMode==="upload"?"free":"upload"};handleFreeInputChange=t=>{const e=t.target;this.freeInputText=e.value};handleStartInterview=async()=>{if(this.inputMode==="upload"&&!this.uploadedFileInfo?.length){j.info("请上传合同文件");return}if(this.inputMode==="free"&&!this.freeInputText.trim()){j.info("请输入合同内容");return}if(this.inputMode==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.freeInputText="";this.inputMode="upload"}else{if(this.customInputs&&this.customInputs.input){this.inputMode="free";this.freeInputText=this.customInputs.input}await f(this.token);if(this.conversationId){this.showChatModal=true}}}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,"合同内容"),i("button",{class:"toggle-button",onClick:this.handleToggleInput},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="upload"&&i("div",{class:"resume-upload-section"},i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:25*1024*1024,multiple:true,maxFileCount:5,mobileUploadAble:this.mobileUploadAble,uploadText:"点击上传合同",acceptFileSuffixList:[".pdf",".doc",".docx",".jpg",".jpeg",".png"],uploadParams:{tags:["other"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e;this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.inputMode==="free"&&i("div",{class:"free-input"},!!this.mobileUploadAble&&i("components-mobile-input-btn",{name:"合同内容",onOk:t=>{this.freeInputText=t.detail}}),i("div",{class:"textarea-container"},i("textarea",{id:"free-input-text",placeholder:"请输入合同内容",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),i("div",{class:"input-guide"},i("div",{class:"guide-title"},"输入提示:"),i("div",{class:"guide-content"},i("div",null,"• 请输入完整的劳动合同内容"),i("div",null,"• 包括甲方(公司)、乙方(员工)信息"),i("div",null,"• 合同期限、工作内容、工作地点"),i("div",null,"• 工作时间、休息休假、劳动报酬"),i("div",null,"• 社会保险、劳动保护、劳动条件"),i("div",null,"• 合同变更、解除和终止条件等")))),i("button",{class:"submit-button",disabled:this.inputMode==="upload"&&!this.uploadedFileInfo?.length||this.inputMode==="free"&&!this.freeInputText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018882",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.inputMode==="upload"?this.uploadedFileInfo?.map?.((t=>t.cos_key))?.join(","):undefined,file_name:this.uploadedFileInfo?.map?.((t=>t.file_name))?.join(","),input:this.inputMode==="free"?this.freeInputText:undefined},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ri.style=oi+(ii+ni);const ai="";const si='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const li=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const di=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="会议总结助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始总结";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}isSubmitting=false;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.clearSelectedFile();this.showChatModal=false}else{await f(this.token);if(this.conversationId||this.customInputs?.file_url){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("3022316191018885","pcm-hyzj-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleFileChange=t=>{const e=t.target;if(e.files&&e.files.length>0){this.selectedFile=e.files[0]}};handleUploadClick=()=>{const t=this.hostElement.shadowRoot?.querySelector(".file-input");t?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const t=this.hostElement.shadowRoot?.querySelector(".file-input");if(t){t.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const t=await m(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=t;this.uploadSuccess.emit(t)}catch(t){console.error("文件上传错误:",t);this.clearSelectedFile();I.captureError(t,{action:"uploadFile",component:"pcm-hyzj-modal",title:"文件上传失败"});this.someErrorEvent.emit({error:t,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(t){console.error("开始面试时出错:",t);I.captureError(t,{action:"handleStartInterview",component:"pcm-hyzj-modal",title:"开始面试时出错"});this.someErrorEvent.emit({error:t,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!r&&i("div",{class:"input-container"},i("div",{class:"resume-upload-section"},i("label",null,"上传会议纪要"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传会议纪要"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!this.selectedFile||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018885",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};di.style=ai+(si+li);const ci="职位生成";const pi="职位需求信息";const hi="切换输入";const fi="职位名称";const ui="请输入职位名称";const gi="*";const mi="下一步";const bi="上一步";const xi="生成JD";const yi="处理中...";const wi="AI 正在分析职位信息";const vi="请稍候...";const ki="AI 推荐标签";const Ci="月薪范围";const zi="福利待遇";const Ii="学历要求";const Si="JD信息";const ji="请按照下方提示格式输入职位需求信息";const _i="输入格式参考:";const Ti={jobTitle:"• 职位名称 - 明确定义职位的名称",salary:"• 薪资范围 - 明确该岗位的月薪或年薪",benefits:"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等",responsibilities:"• 工作职责 - 描述工作内容",qualifications:"• 任职资格 - 包括学历、经验和技术要求",location:"• 工作地点与性质 - 全职/兼职、远程/办公室"};const Fi="所有内容均由AI生成仅供参考";const Mi="中央网信办生成式人工智能服务备案号";const Ei="Hunan-PinCaiMao-202412310003";const Di="正在加载对话...";const Bi={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k以上"};const Ri={insurance:"五险一金",bonus:"年终奖",paidLeave:"带薪年假",overtimePay:"加班补贴",mealAllowance:"餐补",transportAllowance:"交通补贴",holidayBenefits:"节日福利",teamBuilding:"团队建设"};const Oi={college:"大专",bachelor:"本科",master:"硕士",doctor:"博士",noLimit:"学历不限"};const Ai="历史会话";const Hi={loading:"加载中...",noHistory:"暂无历史会话"};const Li={enterJobName:"请输入职位名称",enterJobInfo:"请输入职位需求信息"};const Pi={jobName:"职位名称",salaryRange:"薪资范围",benefits:"福利待遇",education:"学历要求"};var qi={modalTitle:ci,jobRequirementInfo:pi,toggleInput:hi,jobName:fi,jobNamePlaceholder:ui,required:gi,nextStep:mi,prevStep:bi,generateJD:xi,processing:yi,aiAnalyzing:wi,pleaseWait:vi,aiRecommendedTags:ki,salaryRange:Ci,benefits:zi,education:Ii,jdInfo:Si,jdInfoPlaceholder:ji,inputGuideTitle:_i,inputGuide:Ti,aiDisclaimer:Fi,beianLabel:Mi,beianNumber:Ei,loadingConversation:Di,salaryRanges:Bi,benefitsList:Ri,educationList:Oi,historyConversations:Ai,history:Hi,alerts:Li,jobInfoFields:Pi};const $i="Job Description Generator";const Ui="Job Requirement Information";const Ni="Toggle Input";const Vi="Job Title";const Wi="Please enter job title";const Ji="*";const Qi="Next Step";const Yi="Previous Step";const Gi="Generate JD";const Xi="Processing...";const Ki="AI is analyzing job information";const Zi="Please wait...";const tn="AI Recommended Tags";const en="Monthly Salary Range";const on="Benefits";const nn="Education Requirements";const rn="JD Information";const an="Please enter job requirement information according to the format below";const sn="Input Format Reference:";const ln={jobTitle:"• Job Title - Clearly define the position name",salary:"• Salary Range - Specify monthly or annual salary for this position",benefits:"• Benefits - Benefits for this position, such as: five insurances and one fund, annual leave, afternoon tea, etc.",responsibilities:"• Job Responsibilities - Describe the work content",qualifications:"• Qualifications - Including education, experience and technical requirements",location:"• Location & Nature - Full-time/Part-time, Remote/Office"};const dn="All content is AI-generated and for reference only";const cn="Cyberspace Administration of China Generative AI Service Registration Number";const pn="Hunan-PinCaiMao-202412310003";const hn="Loading conversation...";const fn={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k+"};const un={insurance:"Five insurances and one fund",bonus:"Year-end bonus",paidLeave:"Paid annual leave",overtimePay:"Overtime allowance",mealAllowance:"Meal allowance",transportAllowance:"Transport allowance",holidayBenefits:"Holiday benefits",teamBuilding:"Team building"};const gn={college:"College",bachelor:"Bachelor",master:"Master",doctor:"Doctor",noLimit:"No limit"};const mn="History";const bn={loading:"Loading...",noHistory:"No history conversations"};const xn={enterJobName:"Please enter job title",enterJobInfo:"Please enter job requirement information"};const yn={jobName:"Job Title",salaryRange:"Salary Range",benefits:"Benefits",education:"Education Requirements"};var wn={modalTitle:$i,jobRequirementInfo:Ui,toggleInput:Ni,jobName:Vi,jobNamePlaceholder:Wi,required:Ji,nextStep:Qi,prevStep:Yi,generateJD:Gi,processing:Xi,aiAnalyzing:Ki,pleaseWait:Zi,aiRecommendedTags:tn,salaryRange:en,benefits:on,education:nn,jdInfo:rn,jdInfoPlaceholder:an,inputGuideTitle:sn,inputGuide:ln,aiDisclaimer:dn,beianLabel:cn,beianNumber:pn,loadingConversation:hn,salaryRanges:fn,benefitsList:un,educationList:gn,historyConversations:mn,history:bn,alerts:xn,jobInfoFields:yn};const vn=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.voice-textarea-wrapper{position:relative}.voice-textarea-wrapper textarea{padding-bottom:52px}.voice-input-entry{position:absolute;right:12px;bottom:32px;z-index:1}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";const kn='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Cn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const zn=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="职位生成";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}strings;inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;isVoiceInputActive=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async componentWillLoad(){this.strings=this.locale==="en"?wn:qi;if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}getSalaryRanges(){return[{text:this.strings.salaryRanges["3k_5k"],value:"3k_5k"},{text:this.strings.salaryRanges["5k_8k"],value:"5k_8k"},{text:this.strings.salaryRanges["8k_12k"],value:"8k_12k"},{text:this.strings.salaryRanges["12k_15k"],value:"12k_15k"},{text:this.strings.salaryRanges["15k_20k"],value:"15k_20k"},{text:this.strings.salaryRanges.above_20k,value:"above_20k"}]}getBenefits(){return[{text:this.strings.benefitsList.insurance,value:"五险一金"},{text:this.strings.benefitsList.bonus,value:"年终奖"},{text:this.strings.benefitsList.paidLeave,value:"带薪年假"},{text:this.strings.benefitsList.overtimePay,value:"加班补贴"},{text:this.strings.benefitsList.mealAllowance,value:"餐补"},{text:this.strings.benefitsList.transportAllowance,value:"交通补贴"},{text:this.strings.benefitsList.holidayBenefits,value:"节日福利"},{text:this.strings.benefitsList.teamBuilding,value:"团队建设"}]}getEducationRequirements(){return[{text:this.strings.educationList.college,value:"大专"},{text:this.strings.educationList.bachelor,value:"本科"},{text:this.strings.educationList.master,value:"硕士"},{text:this.strings.educationList.doctor,value:"博士"},{text:this.strings.educationList.noLimit,value:"学历不限"}]}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T(this.getBotId(),"pcm-jd-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleToggleInput=()=>{if(this.isVoiceInputActive)return;this.inputMode=this.inputMode==="structured"?"free":"structured"};handleJobNameChange=t=>{const e=t.target;this.jobName=e.value};handleFreeInputChange=t=>{const e=t.target;this.freeInputText=e.value};handleVoiceRecognized=t=>{const e=this.hostElement.shadowRoot?.querySelector("#free-input-text");const o=e?.selectionStart??this.freeInputText.length;const i=this.freeInputText.substring(0,o);const n=this.freeInputText.substring(o);const r=i.length>0&&!/\s$/.test(i)?" ":"";this.freeInputText=`${i}${r}${t.detail}${n}`;requestAnimationFrame((()=>{if(!e)return;const i=o+r.length+t.detail.length;e.focus();e.setSelectionRange(i,i)}))};handleVoiceStatusChange=t=>{this.isVoiceInputActive=t.detail!=="idle"};handleVoiceInputError=t=>{this.someErrorEvent.emit(t.detail)};handleNextStep=async()=>{if(!this.jobName.trim()){alert(this.strings.alerts.enterJobName);return}this.step="review";await this.handlePositionAnalysis(this.jobName)};handlePrevStep=()=>{this.step="input"};async handlePositionAnalysis(t){if(!t.trim())return;this.isLoading=true;try{const e=await s({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:t,locale:this.locale},bot_id:"59322522667307008",workflow_code:"generate_jd_tags"}});if(e.success&&e.data?.data.outputs?.text){try{let t=e.data.data.outputs.text.trim();const o=t.match(/```json\s*([\s\S]*?)\s*```/);if(o){t=o[1].trim()}const i=JSON.parse(t);this.tagGroups=i.tagGroup||[];const n={};const r=(i.tagGroup||[]).map((t=>{const e=[...t.defaultTags||[],...t.optionalTags||[]];for(let t=e.length-1;t>0;t--){const o=Math.floor(Math.random()*(t+1));[e[t],e[o]]=[e[o],e[t]]}if(t.defaultTags&&t.defaultTags.length>0){n[t.dimensionName]=[...t.defaultTags]}return{dimensionName:t.dimensionName,tags:e}}));this.shuffledTagGroups=r;this.selectedAITags=n}catch(t){I.captureError(t,{action:"handlePositionAnalysis",component:"pcm-jd-modal",title:"解析前置标签时错误"});this.someErrorEvent.emit({error:t,message:"解析前置标签时错误"})}}}catch(t){console.error("工作流运行错误:",t)}finally{this.isLoading=false}}handleTagClick=(t,e)=>{if(t==="benefits"){const t=[...this.selectedTags.benefits];const o=t.includes(e)?t.filter((t=>t!==e)):[...t,e];this.selectedTags={...this.selectedTags,benefits:o}}else{this.selectedTags={...this.selectedTags,[t]:this.selectedTags[t]===e?"":e}}};handleAITagClick=(t,e)=>{const o=this.selectedAITags[t]||[];const i=o.includes(e)?o.filter((t=>t!==e)):[...o,e];this.selectedAITags={...this.selectedAITags,[t]:i}};handleSubmitStructured=async()=>{this.isSubmitting=true;try{let t="";if(this.selectedTags.salary){const e=this.getSalaryRanges().find((t=>t.value===this.selectedTags.salary));if(e){t=e.text}}const e=this.selectedTags.benefits.join("、");let o="";if(this.selectedTags.education){const t=this.getEducationRequirements().find((t=>t.value===this.selectedTags.education));if(t){o=t.text}}let i=`${this.strings.jobInfoFields.jobName}:${this.jobName}\n`;if(t){i+=`${this.strings.jobInfoFields.salaryRange}:${t}\n`}if(e){i+=`${this.strings.jobInfoFields.benefits}:${e}\n`}if(o){i+=`${this.strings.jobInfoFields.education}:${o}\n`}Object.entries(this.selectedAITags).forEach((([t,e])=>{if(e.length>0){i+=`${t}:${e.join("、")}\n`}}));this.showChatModal=true;this.jobDescription=i}catch(t){console.error("提交结构化数据时出错:",t);I.captureError(t,{action:"handleSubmitStructured",component:"pcm-jd-modal",title:"提交数据时出错"});this.someErrorEvent.emit({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert(this.strings.alerts.enterJobInfo);return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(t){console.error("提交自由输入数据时出错:",t);I.captureError(t,{action:"handleSubmitFree",component:"pcm-jd-modal",title:"提交数据时出错"});this.someErrorEvent.emit({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";getBotId(){const t=this.locale||this.hostElement?.lang||"zh";const e={zh:"3022316191018873",en:"8164748078835713"};return e[t]||e["zh"]}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";this.isVoiceInputActive=false;this.step="input";this.inputMode="structured";this.tagGroups=[];this.shuffledTagGroups=[];this.selectedAITags={};this.selectedTags={salary:"",benefits:[],education:""}}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info;this.inputMode="free";this.freeInputText=this.customInputs.job_info}await f(this.token);if(this.conversationId){this.showChatModal=true}}}renderTagGroup(t,e,o){return i("div",{class:"tag-group"},i("div",{class:"tag-title"},t),i("div",{class:"tag-container"},e.map((t=>{const e=o==="benefits"?this.selectedTags.benefits.includes(t.value):this.selectedTags[o]===t.value;return i("div",{class:{tag:true,"tag-selected":e},onClick:()=>this.handleTagClick(o,t.value)},t.text)}))))}renderAITagGroups(){return i("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((t=>i("div",{class:"tag-group"},i("div",{class:"tag-title"},t.dimensionName),i("div",{class:"tag-container"},t.tags.map((e=>{const o=(this.selectedAITags[t.dimensionName]||[]).includes(e);return i("div",{class:{tag:true,"tag-selected":o},onClick:()=>this.handleAITagClick(t.dimensionName,e)},e)})))))))}renderLoadingState(){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",{class:"loading-text"},i("div",null,this.strings.aiAnalyzing),i("div",{class:"loading-subtext"},this.strings.pleaseWait)))}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:this.strings?.historyConversations},this.strings?.historyConversations)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings?.history?.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings?.history?.noHistory)):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&true&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,this.strings.jobRequirementInfo),i("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading||this.isVoiceInputActive},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),this.strings.toggleInput)),this.inputMode==="structured"&&i("div",{class:"structured-input"},this.step==="input"&&i("div",{class:"job-name-input"},i("label",{htmlFor:"job-name"},this.strings.jobName," ",i("span",{class:"required"},this.strings.required)),i("input",{id:"job-name",type:"text",placeholder:this.strings.jobNamePlaceholder,value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),i("div",{class:"button-container"},i("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},this.strings.nextStep))),this.step==="review"&&i("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():i("div",{class:"tag-selection-content"},this.tagGroups.length>0&&i("div",{class:"ai-tags-section"},i("div",{class:"section-title"},this.strings.aiRecommendedTags),this.renderAITagGroups()),this.tagGroups.length>0&&i("div",{class:"basic-tags-section"},this.renderTagGroup(this.strings.salaryRange,this.getSalaryRanges(),"salary"),this.renderTagGroup(this.strings.benefits,this.getBenefits(),"benefits"),this.renderTagGroup(this.strings.education,this.getEducationRequirements(),"education")),i("div",{class:"button-container"},i("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},this.strings.prevStep),i("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?this.strings.processing:this.strings.generateJD))))),this.inputMode==="free"&&i("div",{class:"free-input"},i("div",{class:"textarea-container"},i("label",{htmlFor:"free-input-text"},this.strings.jdInfo," ",i("span",{class:"required"},this.strings.required)),i("div",{class:"voice-textarea-wrapper"},i("textarea",{id:"free-input-text",placeholder:this.strings.jdInfoPlaceholder,rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange,disabled:this.isVoiceInputActive}),i("div",{class:"voice-input-entry"},i("components-voice-input-btn",{locale:this.locale==="en"?"en":"zh",disabled:this.isSubmitting,onVoiceRecognized:this.handleVoiceRecognized,onVoiceStatusChange:this.handleVoiceStatusChange,onSomeErrorEvent:this.handleVoiceInputError})))),i("div",{class:"input-guide"},i("div",{class:"guide-title"},this.strings.inputGuideTitle),i("div",{class:"guide-content"},i("div",null,this.strings.inputGuide.jobTitle),i("div",null,this.strings.inputGuide.salary),i("div",null,this.strings.inputGuide.benefits),i("div",null,this.strings.inputGuide.responsibilities),i("div",null,this.strings.inputGuide.qualifications),i("div",null,this.strings.inputGuide.location))),i("div",{class:"button-container"},i("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting||this.isVoiceInputActive},this.isSubmitting?this.strings.processing:this.strings.generateJD))),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber)))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};zn.style=vn+(kn+Cn);const In="";const Sn='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const jn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const _n=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="简历剖析助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;jobDescription="";isSubmitting=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("3022316191018881","pcm-jlpp-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleStartAnalysis=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartAnalysis},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018881",customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};_n.style=In+(Sn+jn);const Tn=".resume-type-container{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-evenly;gap:0;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:0;overflow-x:auto;overflow-y:hidden}.resume-type-item{cursor:pointer;font-size:16px;color:#333;padding:0 0 8px 0;position:relative;background:none;border:none;outline:none;font-weight:400;white-space:nowrap;flex-shrink:0;transition:color 0.2s}.resume-type-item.selected{color:#2563eb;font-weight:600}.resume-type-item.selected::after{content:'';display:block;position:absolute;left:0;bottom:-2px;width:100%;height:2px;background:#2563eb;border-radius:2px}.chat-content{background-color:#f7f9fc;border:1px solid #e0e6f1;border-radius:8px;padding:16px;display:flex;align-items:center;gap:16px}.chat-content-icon{font-size:24px;flex-shrink:0}.chat-content-text{font-size:14px;color:#595959;line-height:1.6}.resume-type-item:not(.selected):hover{color:#2563eb}.iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.optimizing-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.35);z-index:2000;display:flex;align-items:center;justify-content:center}.optimizing-modal-content{background:#fff;border-radius:8px;padding:32px 40px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;align-items:center}.optimizing-modal-content .loading-spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top:4px solid #2563eb;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.converstation-list{height:600px;overflow:auto}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.optimizing-modal-content .loading-text{font-size:18px;color:#222;font-weight:500;margin:0}";const Fn='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Mn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const En=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.getResumeData=o(this,"getResumeData");this.resumeDownloadRequested=o(this,"resumeDownloadRequested")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;hideExportButton=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;resumeDownloadRequested;filePreviewMode="drawer";mobileUploadAble=false;initialResumeText;type;introduction_prompt;showHistory=true;isUploading=false;uploadedFileInfo=null;showChatModal=false;resumeType="chat";resumeText="";get hostElement(){return t(this)}isSubmitting=false;showIframe=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat";this.resumeText=""}else{await f(this.token);if(this.type==="chat"){this.resumeType="chat";setTimeout((()=>{this.handleStartInterview()}),100)}else if(this.type==="file"||this.type==="upload"){this.resumeType="upload"}else if(this.type==="paste"){this.resumeType="paste"}if(this.initialResumeText&&this.initialResumeText.trim()){this.resumeType="paste";this.resumeText=this.initialResumeText;setTimeout((()=>{this.handleStartInterview()}),100)}}}handleIsSuccessChange(t){if(t&&this.resumeType!=="chat"){this.showIframe=true}}handleStreamComplete=t=>{this.conversationId=t.detail.conversation_id;if(this.resumeType!=="chat"){this.showIframe=true;this.isSuccess=true}};componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{};handleIframeMessage=t=>{const e=["http://localhost:3000",c];if(!e.includes(t.origin))return;if(t.source!==this._iframeEl?.contentWindow)return;const{type:o,value:i}=t.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="resumeDownloadRequested"){if(!i?.url||!i?.fileName)return;this.resumeDownloadRequested.emit({url:i.url,fileName:i.fileName})}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const t=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},t);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},t);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},t)}};exampleMethodFromIframe(t){this.getResumeData.emit(JSON.parse(t))}handleClose=()=>{this.modalClosed.emit()};changeType=t=>{this.resumeType=t};handleResumeTextChange=t=>{const e=t.target;this.resumeText=e.value};async loadHistoryConversations(){this.isLoadingConversations=true;try{const t=await s({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:"39284520284983296",limit:50,page:1}});if(t.success&&t.data){const e=t.data.data||[];this.historyConversations=e.map((t=>{let e;let o="未知时间";try{const i=typeof t.created_at==="string"?parseInt(t.created_at):t.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",t.created_at);e=new Date}else{e=new Date(i*1e3)}if(isNaN(e.getTime())){console.warn("无效的日期对象:",t.created_at);e=new Date}const n=new Date;const r=n.getTime()-e.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const t=["周日","周一","周二","周三","周四","周五","周六"];o=`${t[e.getDay()]} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}else{o=`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}}catch(e){console.error("时间格式化错误:",e,t.created_at);o="时间解析失败"}return{id:t.id,name:t.name||"新会话",created_at:t.created_at,updated_at:t.updated_at,status:t.status,message_count:t.message_count||0,timeDisplay:o}}))}}catch(t){console.error("获取历史会话失败:",t);I.captureError(t,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});this.someErrorEvent.emit({error:t,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){j.info("请上传简历");return}if(this.resumeType==="paste"&&!this.resumeText.trim()){j.info("请粘贴简历文本");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};closeResumeChat=()=>{this.isSuccess=false;this.resumeType="upload"};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.isSuccess};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=Boolean(this.customInputs&&this.customInputs.file_url);const r=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&!this.showChatModal&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&!this.showIframe&&i("div",{class:"input-container"},i("div",{class:"resume-type-container"},i("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="paste"},onClick:()=>this.changeType("paste")},"粘贴简历"),this.showHistory&&i("div",{class:{"resume-type-item":true,selected:this.resumeType==="history"},onClick:()=>{this.changeType("history");this.loadHistoryConversations()}},"历史对话")),!n&&this.resumeType==="upload"&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.resumeType==="paste"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请粘贴简历文本"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请粘贴简历文本...",rows:6,value:this.resumeText,onInput:this.handleResumeTextChange})),this.resumeType==="chat"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"从头开始创建"),i("div",{class:"chat-content"},i("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),this.resumeType==="history"?i("div",{class:"converstation-list"},this.historyConversations.map((t=>i("div",{key:t.id,class:{"conversation-item":true,active:t.id===this.conversationId},onClick:()=>{this.conversationId=t.id;this.isSuccess=true;this.showChatModal=true;this.showIframe=true}},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))),t.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))):i("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.resumeType==="paste"&&!this.resumeText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":["upload","paste"].includes(this.resumeType)?"开始制作":"开始对话"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&i(i.Fragment,null,i("div",{style:{display:this.resumeType==="chat"?"block":"none"}},i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery:this.resumeType==="paste"?this.resumeText:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.resumeType==="upload"?this.customInputs.file_url||this.uploadedFileInfo?.cos_key:"",mode_type:this.resumeType==="chat"?1:0,introduction_prompt:this.introduction_prompt},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete})),this.resumeType!=="chat"&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"AI正在优化您的简历...")),this.showIframe&&i(i.Fragment,null,i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"iframe-container"},i("iframe",{ref:t=>this._iframeEl=t,src:`${c}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};En.style=Tn+(Fn+Mn);const Dn="面试出题大师";const Bn="请输入职位描述 (JD)";const Rn="请输入职位描述,包括职责、要求等信息...";const On="上传简历";const An="点击上传简历";const Hn="支持 txt、markdown、pdf、docx、doc、md 格式";const Ln="面试题数量:";const Pn="题";const qn="是否需要参考答案:";const $n="开启";const Un="关闭";const Nn="开始分析";const Vn="上传中...";const Wn="处理中...";const Jn="所有内容均由AI生成仅供参考";const Qn="中央网信办生成式人工智能服务备案号";const Yn="Hunan-PinCaiMao-202412310003";const Gn="正在加载对话...";const Xn="历史会话";const Kn={loading:"加载中...",noHistory:"暂无历史会话"};const Zn={uploadResume:"请上传简历",enterJobDescription:"请输入职位描述"};const tr={uploadFailed:"文件上传失败,请重试",startInterviewFailed:"开始面试时出错,请重试"};var er={modalTitle:Dn,jobDescriptionLabel:Bn,jobDescriptionPlaceholder:Rn,resumeUploadLabel:On,uploadPlaceholder:An,uploadHint:Hn,questionNumberLabel:Ln,questionUnit:Pn,analysisToggleLabel:qn,toggleOn:$n,toggleOff:Un,startAnalysis:Nn,uploading:Vn,processing:Wn,aiDisclaimer:Jn,beianLabel:Qn,beianNumber:Yn,loadingConversation:Gn,historyConversations:Xn,history:Kn,alerts:Zn,errors:tr};const or="Interview Question Master";const ir="Please enter job description (JD)";const nr="Please enter job description, including responsibilities, requirements, etc...";const rr="Upload Resume";const ar="Click to upload resume";const sr="Supports txt, markdown, pdf, docx, doc, md formats";const lr="Number of Interview Questions:";const dr="questions";const cr="Reference answers required:";const pr="On";const hr="Off";const fr="Start Analysis";const ur="Uploading...";const gr="Processing...";const mr="All content is AI-generated and for reference only";const br="Cyberspace Administration of China Generative AI Service Registration Number";const xr="Hunan-PinCaiMao-202412310003";const yr="Loading conversation...";const wr="History";const vr={loading:"Loading...",noHistory:"No history conversations"};const kr={uploadResume:"Please upload resume",enterJobDescription:"Please enter job description"};const Cr={uploadFailed:"File upload failed, please try again",startInterviewFailed:"Failed to start interview, please try again"};var zr={modalTitle:or,jobDescriptionLabel:ir,jobDescriptionPlaceholder:nr,resumeUploadLabel:rr,uploadPlaceholder:ar,uploadHint:sr,questionNumberLabel:lr,questionUnit:dr,analysisToggleLabel:cr,toggleOn:pr,toggleOff:hr,startAnalysis:fr,uploading:ur,processing:gr,aiDisclaimer:mr,beianLabel:br,beianNumber:xr,loadingConversation:yr,historyConversations:wr,history:vr,alerts:kr,errors:Cr};const Ir="";const Sr='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const jr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const _r=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="面试出题大师";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始出题";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;questionNumber=6;canOutputAnalysis=true;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}strings;jobDescription="";isSubmitting=false;pcmUploadRef;getBotId(){const t=this.locale||this.hostElement?.lang||"zh";const e={zh:"3022316191018876",en:"8164755731671041"};return e[t]||e["zh"]}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.uploadedFileInfo=null;this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true}}}async componentWillLoad(){this.strings=this.locale==="en"?zr:er;if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleQuestionNumberChange=t=>{const e=t.target;const o=parseInt(e.value);this.questionNumber=o>=3&&o<=20?o:6};handleAnalysisToggle=t=>{const e=t.target;this.canOutputAnalysis=e.checked};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T(this.getBotId(),"pcm-mnct-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info(this.strings.alerts.uploadResume);return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info(this.strings.alerts.enterJobDescription);return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:this.strings?.historyConversations},this.strings?.historyConversations)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},this.strings.jobDescriptionLabel),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:this.strings.jobDescriptionPlaceholder,rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,this.strings.resumeUploadLabel),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("div",{class:"interview-settings-section"},i("div",{class:"settings-row"},i("div",{class:"question-number-section"},i("label",{class:"settings-label"},this.strings.questionNumberLabel),i("div",{class:"slider-container"},i("input",{type:"range",min:"3",max:"20",value:this.questionNumber,class:"question-slider",onInput:this.handleQuestionNumberChange}),i("div",{class:"slider-value"},this.questionNumber,this.strings.questionUnit)))),i("div",{class:"settings-row"},i("div",{class:"analysis-toggle-section"},i("label",{class:"settings-label"},this.strings.analysisToggleLabel),i("div",{class:"toggle-container"},i("label",{class:"toggle-switch"},i("input",{type:"checkbox",checked:this.canOutputAnalysis,onChange:this.handleAnalysisToggle}),i("span",{class:"toggle-slider"})),i("span",{class:"toggle-text"},this.canOutputAnalysis?this.strings.toggleOn:this.strings.toggleOff))))),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isSubmitting?this.strings.processing:this.strings.startAnalysis),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber)))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings?.history?.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings?.history?.noHistory)):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.questionNumber,can_outputAnalysis:this.canOutputAnalysis?"true":"false"},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};_r.style=Ir+(Sr+jr);const Tr="";const Fr='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Mr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Er=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.recordingError=o(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";skipResumeUpload=false;recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content||this.skipResumeUpload)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content))||!!this.skipResumeUpload;const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:t=>this.virtualChatModalRef=t,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018884",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018884",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId||(this.interviewMode==="video"?"2":"1")},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Er.style=Tr+(Fr+Mr);const Dr="";const Br='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Rr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Or=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.recordingError=o(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:t=>this.virtualChatModalRef=t,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018907",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018907",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId||(this.interviewMode==="video"?"2":"1")},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Or.style=Dr+(Br+Rr);const Ar="";const Hr='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Lr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Pr=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="面试报告";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.clearSelectedFile();this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||this.customInputs?.file_urls&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("3022316191018877","pcm-msbg-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleFileChange=t=>{const e=t.target;if(e.files&&e.files.length>0){this.selectedFile=e.files[0]}};handleUploadClick=()=>{const t=this.hostElement.shadowRoot?.querySelector(".file-input");t?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const t=this.hostElement.shadowRoot?.querySelector(".file-input");if(t){t.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const t=await m(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=t;this.uploadSuccess.emit(t)}catch(t){console.error("文件上传错误:",t);this.clearSelectedFile();I.captureError(t,{action:"uploadFile",component:"pcm-msbg-modal",title:"文件上传失败"});this.someErrorEvent.emit({error:t,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(t){console.error("开始面试时出错:",t);I.captureError(t,{action:"handleStartInterview",component:"pcm-msbg-modal",title:"开始面试时出错"});this.someErrorEvent.emit({error:t,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&this.customInputs.file_urls);const s=Boolean(this.customInputs?.file_urls&&this.customInputs?.job_info);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传面试内容"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传面试内容"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018877",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_urls:this.customInputs?.file_urls||this.uploadedFileInfo?.cos_key,file_names:this.customInputs?.file_names||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Pr.style=Ar+(Hr+Lr);const qr=".iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.step-section{margin-bottom:20px}.step-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e8e8e8}.mode-options{display:grid;grid-template-columns:repeat(2, 1fr);gap:8px}.mode-option{padding:16px;border:2px solid #e2e8f0;border-radius:8px;cursor:pointer;transition:all 0.2s ease}.mode-option:hover{border-color:#94a3b8}.mode-option.selected{border-color:#0D75FB;background-color:#f0f7ff}.option-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.option-title{font-weight:600;color:#333}.check-icon{color:#0D75FB;font-size:16px}.option-desc{font-size:14px;color:#666}.option-suitable{font-size:12px;color:#999}.output-options{display:flex;flex-direction:column;gap:12px}.output-option{padding:12px 16px;border:2px solid #e2e8f0;border-radius:8px;cursor:pointer;transition:all 0.2s ease}.output-option:hover{border-color:#94a3b8}.output-option.selected{border-color:#0D75FB;background-color:#f0f7ff}.option-time{font-size:12px;color:#999}.jd-hint{padding:12px;background-color:#f6f8fa;border-radius:8px;text-align:center}.jd-hint p{font-size:14px;color:#666;margin:0}.form-hint{font-size:12px;color:#fa8c16;text-align:center;margin-top:8px}.form-hint.warning{color:#fa8c16}@media screen and (max-width: 768px){.mode-options{grid-template-columns:1fr}}";const $r='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Ur=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Nr=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.getResumeData=o(this,"getResumeData");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="千岗千简历";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我优化简历";getResumeData;hideExportButton=false;exportButtonText="导出简历json数据";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";autoStart;isUploading=false;uploadedFileInfo=null;showChatModal=false;showIframe=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;_internalConversationId;selectedOptimizationMode="";selectedOutputType=null;get hostElement(){return t(this)}jobDescription="";isSubmitting=false;_iframeEl;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=10;pcmUploadRef;optimizationModes=[{id:"targeted",title:"针对性优化",desc:"基于具体职位描述进行优化",suitable:"有明确目标职位"},{id:"general",title:"通用优化",desc:"提升简历整体质量和专业度",suitable:"广撒网投递"}];outputTypes=[{id:0,title:"直接改写",desc:"给我优化后的完整简历",time:"2-3分钟"},{id:1,title:"改进建议",desc:"告诉我哪里需要改,怎么改",time:"1-2分钟"},{id:2,title:"深度分析",desc:"全面诊断+建议+改写",time:"3-5分钟"}];handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.showIframe=false;this.jobDescription="";this.uploadedFileInfo=null;this.isUploading=false;this.isSubmitting=false;this._internalConversationId=undefined;this.selectedOptimizationMode="";this.conversationId=undefined;this.selectedOutputType=null}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}if(this.customInputs){if(this.customInputs.optimization_type!==undefined&&this.customInputs.optimization_type!==""){this.selectedOutputType=Number(this.customInputs.optimization_type)}if(!!this.customInputs.job_info){this.selectedOptimizationMode="targeted"}}await f(this.token);if(this.currentConversationId||this.getShouldAutoStart()){this.showChatModal=true;this.showIframe=false}}}get currentConversationId(){return this.conversationId||this._internalConversationId}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}handleStreamComplete=t=>{this._internalConversationId=t.detail.conversation_id};componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("45444431062634496","pcm-qgqjl-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t.id;this.selectedOutputType=t.inputs?.optimization_type??0;this.isHistoryDrawerOpen=false;this.showChatModal=true;this.showIframe=false};closeResumeChat=()=>{this.showIframe=true;this.showChatModal=false};handleIframeLoad=()=>{};handleIframeMessage=t=>{const e=["http://localhost:3000",c];if(!e.includes(t.origin))return;const{type:o,value:i}=t.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const t=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},t);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},t);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},t)}};exampleMethodFromIframe(t){this.getResumeData.emit(JSON.parse(t))}handleJobDescriptionChange=t=>{const e=t.target;this.jobDescription=e.value};handleOptimizationModeChange=t=>{this.selectedOptimizationMode=t};handleOutputTypeChange=t=>{this.selectedOutputType=t};getShouldAutoStart=()=>{const t=Boolean(this.customInputs?.file_url||this.customInputs?.resume_content);const e=Boolean(this.customInputs?.job_info);const o=this.customInputs?.optimization_type!==undefined;if(this.autoStart!==undefined){if(this.autoStart===true){return t}else{return t&&e&&o}}return t&&e};isFormValid=()=>{if(this.customInputs?.optimization_type!==undefined){const t=this.customInputs?.file_url||this.customInputs?.resume_content||this.uploadedFileInfo;return Boolean(t)}const t=this.customInputs?.file_url||this.customInputs?.resume_content||this.uploadedFileInfo;const e=t&&this.selectedOptimizationMode&&this.selectedOutputType!==null;if(this.selectedOptimizationMode==="targeted"){return e&&Boolean(this.customInputs?.job_info||this.jobDescription.trim())}return e};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(!this.customInputs?.optimization_type){if(!this.selectedOptimizationMode){j.info("请选择优化模式");return}if(this.selectedOutputType===null){j.info("请选择输出方式");return}}if(this.selectedOptimizationMode==="targeted"&&!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info("针对性优化需要提供职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};getEffectiveOptimizationType=()=>{const t=this.customInputs?.optimization_type??(this.selectedOutputType??0);return typeof t==="string"?Number(t):t};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.showIframe};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.currentConversationId&&!this.showChatModal;const r=Boolean(this.customInputs?.job_info);const a=Boolean(this.customInputs?.optimization_type);const s=Boolean(this.selectedOptimizationMode);const l=!s||this.selectedOptimizationMode==="general"&&Boolean(this.customInputs?.file_url||this.customInputs?.resume_content)||this.selectedOptimizationMode==="targeted"&&Boolean(this.customInputs?.job_info)&&Boolean(this.customInputs?.file_url||this.customInputs?.resume_content);const d=Boolean(this.customInputs&&this.customInputs.job_info);const p=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const h=this.getShouldAutoStart();return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.currentConversationId&&!h&&i("div",{class:"input-container"},!r&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第一步:选择优化模式"),i("div",{class:"mode-options"},this.optimizationModes.map((t=>i("div",{class:{"mode-option":true,selected:this.selectedOptimizationMode===t.id},onClick:()=>this.handleOptimizationModeChange(t.id)},i("div",{class:"option-header"},i("span",{class:"option-title"},t.title),this.selectedOptimizationMode===t.id&&i("span",{class:"check-icon"},"✓")),i("div",{class:"option-desc"},t.desc),i("span",{class:"option-suitable"},"适合:",t.suitable)))))),!a&&this.selectedOptimizationMode&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第二步:你希望得到什么?"),i("div",{class:"output-options"},this.outputTypes.map((t=>i("div",{class:{"output-option":true,selected:this.selectedOutputType===t.id},onClick:()=>this.handleOutputTypeChange(t.id)},i("div",{class:"option-header"},i("span",{class:"option-title"},t.title),this.selectedOutputType===t.id&&i("span",{class:"check-icon"},"✓")),i("div",{class:"option-desc"},t.desc),i("span",{class:"option-time"},"预计 ",t.time)))))),!l&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第三步:提供材料"),!p&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),!d&&this.selectedOptimizationMode==="targeted"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange}))),i("button",{class:"submit-button",disabled:!this.isFormValid()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),!a&&!this.selectedOptimizationMode&&i("div",{class:"form-hint"},"请先选择优化模式和输出方式"),!a&&this.selectedOptimizationMode&&this.selectedOutputType===null&&i("div",{class:"form-hint"},"请选择输出方式"),s&&!p&&!this.uploadedFileInfo&&i("div",{class:"form-hint warning"},"请上传简历文件"),this.selectedOptimizationMode==="targeted"&&!d&&!this.jobDescription.trim()&&s&&i("div",{class:"form-hint warning"},"针对性优化需要提供职位描述"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.getEffectiveOptimizationType()===1||this.getEffectiveOptimizationType()===2?i("components-thousand-resume-wrapper",{isOpen:true,token:this.token,conversationId:this.currentConversationId,botId:"45444431062634496",optimizationType:this.getEffectiveOptimizationType(),customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||(this.selectedOptimizationMode==="targeted"?this.jobDescription:""),job_title:this.customInputs?.job_title||"",optimization_type:this.getEffectiveOptimizationType()},defaultQuery:this.defaultQuery,modalTitle:this.modalTitle,icon:this.icon,fullscreen:this.fullscreen,zIndex:this.zIndex,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,onModalClosed:this.handleClose,onConversationStart:t=>this.handleStreamComplete(t),onStreamComplete:t=>this.handleStreamComplete(t),onInterviewComplete:t=>this.handleStreamComplete(t)}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"45444431062634496",conversationId:this.currentConversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,closeResume:this.closeResumeChat,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||(this.selectedOptimizationMode==="targeted"?this.jobDescription:""),job_title:this.customInputs?.job_title||"",optimization_type:this.getEffectiveOptimizationType()},interviewMode:"text",onStreamComplete:this.handleStreamComplete,onHistoryConversationSelect:t=>{if(t.detail?.inputs?.optimization_type==1||t.detail?.inputs?.optimization_type==2){t.preventDefault();this.handleSelectConversation(t.detail)}}})),this.showIframe&&i(i.Fragment,null,i("div",{class:"iframe-container"},i("iframe",{ref:t=>this._iframeEl=t,src:`${c}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Nr.style=qr+($r+Ur);const Vr=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow:hidden;padding:0;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:#fff;border-radius:0;width:100%;height:100%;display:flex;flex-direction:column;position:relative;margin:0;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.digital-human-background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;overflow:hidden;display:flex;justify-content:center}.digital-human-background-video{width:100%;height:100%;object-fit:cover;object-position:center;max-width:1200px}.modal-container:not(.digital-human-mode){background:white;border-radius:8px;width:100%;max-width:900px;height:90vh;max-height:800px}.modal-content-layer{position:relative;z-index:10;height:100%;display:flex;flex-direction:column;background:linear-gradient(\r\n 180deg,\r\n rgba(0, 0, 0, 0.3) 0%,\r\n rgba(0, 0, 0, 0.1) 20%,\r\n rgba(0, 0, 0, 0.1) 80%,\r\n rgba(0, 0, 0, 0.4) 100%\r\n )}.main-content{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:24px 24px 40px 24px;position:absolute;bottom:0px;width:-webkit-fill-available}.chat-history-section{width:100%;max-width:800px;text-align:center;color:white}.ai-message-item{padding:12px 20px;border-radius:12px;margin-bottom:12px;animation:fadeIn 0.5s ease-in-out}.recording-preview-top-right{position:absolute;top:20px;right:20px;width:180px;height:120px;border-radius:12px;overflow:hidden;border:2px solid rgba(255, 255, 255, 0.5);box-shadow:0 4px 12px rgba(0, 0, 0, 0.3);background-color:#000;z-index:10}.user-video-preview{width:100%;height:100%;object-fit:cover}.recording-status-bar{display:flex;align-items:center;justify-content:space-between;background-color:white;padding:8px 12px;border-radius:999px;margin-top:4px;width:100%;max-width:400px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);animation:slideInUp 0.5s ease-out;line-height:40px}.audio-waveform{display:flex;align-items:center;height:24px}.waveform-bar{width:4px;margin:0 2px;background-color:#16a34a;border-radius:2px;height:6px;animation:waveform-animation 1.2s infinite ease-in-out}.waveform-bar:nth-child(1){animation-delay:0.1s}.waveform-bar:nth-child(2){animation-delay:0.3s}.waveform-bar:nth-child(3){animation-delay:0.5s}.waveform-bar:nth-child(4){animation-delay:0.2s}.waveform-bar:nth-child(5){animation-delay:0.4s}.waveform-bar:nth-child(6){animation-delay:0.1s}.waveform-bar:nth-child(7){animation-delay:0.3s}.waveform-bar:nth-child(8){animation-delay:0.5s}@keyframes waveform-animation{0%,100%{height:6px}50%{height:35px}}.recording-timer{font-size:14px;color:#595959;font-family:'Courier New', Courier, monospace}.finish-recording-btn{background-color:#16a34a;border:none;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);transition:background-color 0.3s,\r\n transform 0.2s}.finish-recording-btn:hover{background-color:#148a3f}.finish-recording-btn:active{transform:scale(0.95)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideInUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.status-indicator-text{display:flex;align-items:center;gap:8px;font-size:14px;color:#595959;width:100%;justify-content:center}.status-indicator-text.loading .loading-spinner-small{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-top-color:#595959;border-radius:50%;animation:spin 0.8s linear infinite}.status-indicator-text.error{color:#ff4d4f}.status-indicator-text.ready{color:#16a34a}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}.ai-message-item{margin-bottom:0;animation:messageSlideIn 0.3s ease-out;width:100%;padding:20px}.ai-message-item.streaming{position:relative}@keyframes messageSlideIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.ai-message-content{color:#fff;padding:20px 24px;border-radius:16px;font-size:16px;line-height:1.6;word-wrap:break-word;backdrop-filter:blur(100px);border:1px solid rgba(255, 255, 255, 0.2);box-shadow:0 4px 20px rgba(0, 0, 0, 0.2);margin-bottom:8px;max-width:100%;text-align:left}.typing-indicator{display:flex;align-items:center;gap:4px;padding:8px 24px;margin-top:-8px}.typing-indicator span{width:8px;height:8px;border-radius:50%;background:#4facfe;animation:typingPulse 1.4s ease-in-out infinite;opacity:0.6}.typing-indicator span:nth-child(1){animation-delay:0s}.typing-indicator span:nth-child(2){animation-delay:0.2s}.typing-indicator span:nth-child(3){animation-delay:0.4s}@keyframes typingPulse{0%,60%,100%{transform:scale(1);opacity:0.4}30%{transform:scale(1.3);opacity:1}}@media screen and (max-width: 768px){.ai-message-content{padding:14px 18px;font-size:15px}}@media screen and (max-width: 480px){.ai-message-content{padding:12px 16px;font-size:14px;line-height:1.4}.typing-indicator{padding:6px 16px}.typing-indicator span{width:6px;height:6px}}@media screen and (max-width: 768px){.ai-message-item{padding:15px}.ai-message-content{padding:16px 20px;font-size:15px}.typing-indicator{padding:6px 20px}}@media screen and (max-width: 480px){.ai-message-item{padding:0px}.ai-message-content{padding:14px 18px;font-size:14px;line-height:1.5}.typing-indicator{padding:5px 18px}.typing-indicator span{width:6px;height:6px}}.waveform-bar{width:3px;background:#4facfe;border-radius:2px;min-height:2px;animation:waveformAnimation 1.2s ease-in-out infinite alternate;transform-origin:bottom}@keyframes waveformAnimation{0%{transform:scaleY(0.2)}100%{transform:scaleY(1)}}.recording-timer{font-size:14px;color:#666;white-space:nowrap}.close-button{position:absolute;top:16px;left:16px;z-index:20;background:rgba(255, 255, 255, 0.9);backdrop-filter:blur(4px);border:1px solid rgba(0, 0, 0, 0.1);border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.close-button:hover{background:rgba(255, 255, 255, 1);border-color:rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);transform:translateY(-1px)}.close-button:active{transform:translateY(0);box-shadow:0 2px 6px rgba(0, 0, 0, 0.1)}.close-button svg{color:#666;transition:color 0.2s ease}.close-button:hover svg{color:#333}.end-interview-button-container{display:flex;align-items:center;justify-content:flex-start;width:100%;max-width:400px;margin-bottom:4px;padding-left:0}.end-interview-button{padding:5px 10px;background-color:#ff4d4f;color:white;border:none;border-radius:20px;font-size:14px;font-weight:500;cursor:pointer;transition:all 0.3s ease;box-shadow:0 2px 8px rgba(255, 77, 79, 0.3);white-space:nowrap}.end-interview-button:hover{background-color:#ff7875;box-shadow:0 4px 12px rgba(255, 77, 79, 0.4);transform:translateY(-1px)}.end-interview-button:active{transform:translateY(0);box-shadow:0 2px 8px rgba(255, 77, 79, 0.3)}.end-interview-button:disabled{background-color:#f0f0f0;color:#bfbfbf;cursor:not-allowed;box-shadow:none;transform:none}";const Wr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Jr=class{constructor(t){e(this,t);this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.interviewComplete=o(this,"interviewComplete");this.recordingError=o(this,"recordingError");this.recordingStatusChange=o(this,"recordingStatusChange");this.tokenInvalid=o(this,"tokenInvalid");this.modalClosed=o(this,"modalClosed")}token;isOpen=false;messages=[];zIndex;conversationId;isLoading=false;currentStreamingMessage=null;isLoadingHistory=false;get hostElement(){return t(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;_visibilityChangeHandler=null;waitingTimeLeft=10;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;digitalHumanVideoUrl="";digitalHumanDefaultVideoUrl="";virtualmanKey="";isPlayingDigitalHumanVideo=false;digitalHumanVideoReady=false;digitalHumanOpeningContents=[];isPlayingWelcomeVideo=false;isGeneratingDigitalHumanVideo=false;pendingGeneratedVideoUrl="";preloadedVideos=new Set;preloadingVideos=new Map;waitingForDigitalHuman=false;digitalId;openingIndex=0;waitingTime=10;playbackRate=1;showEndInterviewButton=false;recordingError;recordingStatusChange;tokenInvalid;modalClosed;customInputs={};botId;agentLogo="";isTaskCompleted=false;tokenInvalidListener;deviceError=null;showConfirmModal=false;skipConfirmThisInterview=false;showCloseConfirmModal=false;showEndInterviewConfirmModal=false;isEndingInterview=false;isComponentActive=true;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async setComponentActive(t){this.isComponentActive=t}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}else{const t=S.getItem("modal-zIndex");if(t){this.zIndex=t}else{this.zIndex=1e3;S.setItem("modal-zIndex",1e3)}}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);this._visibilityChangeHandler=()=>{if(document.visibilityState==="visible"){this.handlePageResume()}};document.addEventListener("visibilitychange",this._visibilityChangeHandler);if(!this.customInputs){this.customInputs={}}if(this.botId){this.fetchAgentLogo()}console.log("componentWillLoad - 数字人相关状态:",{digitalId:this.digitalId,isOpen:this.isOpen,conversationId:this.conversationId,virtualmanKey:this.virtualmanKey});if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{if(this.digitalId){this.initializeDigitalHuman()}setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}async fetchAgentLogo(){if(!this.botId)return;try{const t=await k(this.botId);if(t&&t.logo){this.agentLogo=t.logo}}catch(t){I.captureError(t,{action:"fetchAgentLogo",component:"pcm-virtual-chat-modal",title:"获取智能体信息失败"});z.emitError({error:t,message:"获取智能体信息失败"})}}async sendMessageToAPI(t,e){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=t.trim()||"请开始";if(e){this.customInputs={...this.customInputs,video_url:e}}if(!this.customInputs.url_callback){this.customInputs={...this.customInputs,url_callback:"https://tagents.ylzhaopin.com/agents/api/test/callback"}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;const l={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};l.inputs={...this.customInputs};await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:l,onMessage:t=>{if(t.conversation_id&&!this.conversationId){this.conversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="node_finished"&&t.data.inputs&&t.data.inputs.LLMText){i=t.data.inputs.LLMText}if(t.event==="node_finished"&&t.data.title&&t.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const t=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:t})}if(t.event==="node_finished"&&t.data.title&&t.data.title.includes("聘才猫数字人题目")){const e=JSON.parse(t.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(e)}if(t.event==="error"){const e=t.data?.message||t.message||"请求失败";this.messages=[...this.messages,{...s,answer:e,error:t.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;z.emitError({error:t.data,message:e});return}if(t.event==="message"){if(t.event==="agent_message"||t.event==="message"){if(t.answer){o+=t.answer;const e={...this.currentStreamingMessage,answer:o,id:t.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:t.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:t.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=e}}}if(t.event==="message_end"){this.streamComplete.emit({conversation_id:t.conversation_id||"",event:t.event,message_id:t.message_id,id:t.id})}},onError:t=>{console.error("发生错误:",t);z.emitError({error:t,message:"消息发送失败,请稍后再试"});I.captureError(t,{action:"sendMessageToAPI",component:"pcm-virtual-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:"消息发送失败,请检查网络。",error:t,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;if(this.currentQuestionNumber===0){setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3)}const t=this.currentStreamingMessage;t.isStreaming=false;if(this.digitalId&&t&&t.answer){this.generateDigitalHumanVideo(t.answer)}this.currentStreamingMessage=null;this.messages=[...this.messages,t];this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.digitalId){this.waitingForDigitalHuman=true}}})}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let t=false;this.digitalHumanVideoReady=true;try{const e=await s({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(e.success&&e.data&&e.data.run_status=="结束"){t=true}const o=await s({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const t=o.data.data||[];const e=t.map((t=>{const e=new Date(parseInt(t.created_at)*1e3);const o=e.getHours().toString().padStart(2,"0");const i=e.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:t.id,conversation_id:t.conversation_id,inputs:t.inputs||{},query:t.query||"",answer:t.answer||"",message_files:t.message_files||[],feedback:t.feedback||{},retriever_resources:t.retriever_resources||[],created_at:t.created_at,agent_thoughts:t.agent_thoughts||[],status:t.status||"normal",error:t.error,time:n,isStreaming:false}}));this.messages=e;this.currentQuestionNumber=e.length||0}}catch(t){console.error("加载历史消息或会话状态失败:",t);I.captureError(t,{action:"loadHistoryMessages",component:"pcm-virtual-chat-modal",title:"加载历史消息失败"});z.emitError({error:t,message:"加载历史消息失败,请刷新重试"})}finally{this.isLoadingHistory=false;if(this.conversationId&&this.messages.length>0&&!t&&!this.isEndingInterview){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}));setTimeout((()=>{this.startWaitingToRecord()}),200)}else if(t){this.isTaskCompleted=true;if(this.digitalId){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}))}}}}startWaitingToRecord(){if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const t=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=t;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(t);const e=C();let o;try{o=new MediaRecorder(t,{mimeType:e,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(e){console.warn("指定的MIME类型不受支持,使用默认设置:",e);try{o=new MediaRecorder(t,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(e){try{o=new MediaRecorder(t)}catch(t){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:t});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=t=>{if(t.data.size>0){i.push(t.data)}};o.onerror=t=>{this.recordingError.emit({type:"recording_error",message:"录制过程中发生错误",details:t});this.stopRecording()};o.onstop=()=>{try{const t=e||"video/mp4";const o=new Blob(i,{type:t});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:"录制的视频为空"});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(t){this.recordingError.emit({type:"processing_error",message:"处理录制视频时出错",details:t});this.showRecordingUI=false;I.captureError(t,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(t){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:t});this.showRecordingUI=false;I.captureError(t,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const t=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-t);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(t){console.error("无法访问摄像头或麦克风:",t);let e="设备访问失败";if(t.name==="NotAllowedError"){e="请允许访问摄像头和麦克风权限"}else if(t.name==="NotFoundError"){e="未检测到摄像头或麦克风设备"}else if(t.name==="NotReadableError"){e="您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用"}else if(t.name==="OverconstrainedError"){e="摄像头不支持指定的配置"}else{e="无法访问摄像头或麦克风,请检查设备连接"}this.deviceError=e;this.showRecordingUI=false;z.emitError({error:t,message:e});I.captureError(t,{action:"startRecording",component:"pcm-virtual-chat-modal",title:e})}}setupVideoPreview(t){setTimeout((()=>{const e=this.hostElement.shadowRoot?.querySelector(".user-video-preview");if(e&&t){try{e.srcObject=t;e.play().catch((t=>{console.error("视频播放失败:",t);I.captureError(t,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"视频播放失败"});z.emitError({error:t,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(t);e.src=o;e.onended=()=>{URL.revokeObjectURL(o)}}catch(t){console.error("创建对象URL失败:",t);I.captureError(t,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"创建对象URL失败"});z.emitError({error:t,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((t=>t.stop()));this.recordingStream=null}this.videoRef=null}this.pendingGeneratedVideoUrl=""}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=t=>{const e=t.target;this.skipConfirmThisInterview=e.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const t=this.recordedBlob.type.includes("webm")?"webm":"mp4";const e=`answer.${t}`;const o=new File([this.recordedBlob],e,{type:this.recordedBlob.type});const i=await m(o,{},{tags:["other"]});const n=await y(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||"下一题",i.cos_key)}}catch(t){console.error("视频上传或处理错误:",t);this.isEndingInterview=false;I.captureError(t,{action:"uploadRecordedVideo",component:"pcm-virtual-chat-modal",title:"视频上传或处理失败"});z.emitError({error:t,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}handleCloseClick=()=>{this.showCloseConfirmModal=true};handleCloseConfirmOk=()=>{this.showCloseConfirmModal=false;this.stopRecording();this.modalClosed.emit()};handleCloseConfirmCancel=()=>{this.showCloseConfirmModal=false};disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this._visibilityChangeHandler){document.removeEventListener("visibilitychange",this._visibilityChangeHandler);this._visibilityChangeHandler=null}if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}this.stopRecording();this.preloadedVideos.clear();this.preloadingVideos.clear();this.pendingGeneratedVideoUrl=""}async precreateDigitalHumanVideos(t){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const e of t){if(!e||!e.trim())continue;try{await s({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(t){console.error(`为文本 "${e}" 创建视频任务失败:`,t);I.captureError(t,{action:"precreateDigitalHumanVideos",component:"pcm-virtual-chat-modal",title:`为文本 "${e}" 创建视频任务失败`})}}}async initializeDigitalHuman(){if(!this.digitalId)return;try{const t=await s({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(t.success){const{placeholder_video_url:e,virtualman_key:o,opening_contents:i}=t.data;if(e){this.digitalHumanDefaultVideoUrl=e;this.digitalHumanVideoUrl=e}if(o){this.virtualmanKey=o}if(i&&Array.isArray(i)&&i.length>0){this.digitalHumanOpeningContents=i;const t=Math.max(0,Math.min(2,this.openingIndex||0));const o=this.digitalHumanOpeningContents[t]||this.digitalHumanOpeningContents[0];const n=[];if(o.video_url){n.push(o.video_url)}if(e&&e!==o.video_url){n.push(e)}this.handleVideoUrlReceivedSequential(n,"数字人初始化(顺序)");if(o.video_url&&!this.digitalHumanVideoReady){this.playDigitalHumanVideo(o.video_url,true)}}else{if(e){this.handleVideoUrlReceivedSequential([e],"数字人初始化(仅默认视频)")}}}}catch(t){console.error("初始化数字人失败:",t);I.captureError(t,{action:"initializeDigitalHuman",component:"pcm-virtual-chat-modal",title:"数字人初始化失败"})}}async generateDigitalHumanVideo(t){if(!this.isComponentActive){console.warn("组件已停用,跳过数字人视频生成");return}if(!t.trim()||!this.virtualmanKey){if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}return}this.isGeneratingDigitalHumanVideo=true;try{const e=await s({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!e.success){_(e.message,"error");throw new Error(`创建视频任务失败: ${e.message}`)}const o=e.data.Payload.TaskId;const i=await this.pollVideoProgress(o);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(i){await this.preloadVideo(i);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(this.isPlayingWelcomeVideo){this.pendingGeneratedVideoUrl=i}else{await this.playDigitalHumanVideo(i)}}else{throw new Error("未能获取到数字人视频URL")}}catch(t){console.error("数字人视频生成失败:",t);I.captureError(t,{action:"generateDigitalHumanVideo",component:"pcm-virtual-chat-modal",title:"数字人视频生成失败"});if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}finally{this.isGeneratingDigitalHumanVideo=false}}async pollVideoProgress(t){const e=45;const o=2e3;for(let i=0;i<e;i++){try{const e=await s({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:t}});if(!e.success){throw new Error(`查询进度失败: ${e.message}`)}const i=e.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((t=>setTimeout(t,o)))}catch(t){console.error("轮询视频进度失败:",t);break}}throw new Error("视频生成超时")}async playDigitalHumanVideo(t,e=false){try{await this.preloadVideo(t);this.digitalHumanVideoUrl=t;this.isPlayingDigitalHumanVideo=true;this.digitalHumanVideoReady=true;this.isPlayingWelcomeVideo=e}catch(t){console.error("播放数字人视频失败:",t);if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}}async preloadVideo(t){if(!t||!t.trim()){return Promise.resolve()}const e=t.trim();const o=e.split("/").pop()||e;if(this.preloadedVideos.has(e)){return Promise.resolve()}if(this.preloadingVideos.has(e)){return this.preloadingVideos.get(e)}const i=this.executeVideoPreload(e);this.preloadingVideos.set(e,i);try{await i;this.preloadedVideos.add(e)}catch(t){console.error(`💥 视频预加载失败: ${o.substring(0,30)}${o.length>30?"...":""}`,t)}finally{this.preloadingVideos.delete(e)}}async executeVideoPreload(t){return new Promise(((e,o)=>{const i=document.createElement("video");i.preload="auto";i.src=t;i.muted=true;i.crossOrigin="anonymous";let n=false;const r=()=>{if(n)return;n=true;s();e()};const a=e=>{if(n)return;n=true;s();console.error("视频预加载失败:",t,e);o(new Error("视频预加载失败"))};const s=()=>{i.removeEventListener("canplaythrough",r);i.removeEventListener("loadeddata",r);i.removeEventListener("error",a);i.removeEventListener("abort",a);i.src=""};i.addEventListener("canplaythrough",r);i.addEventListener("loadeddata",r);i.addEventListener("error",a);i.addEventListener("abort",a);setTimeout((()=>{if(!n){console.warn("视频预加载超时:",t);a("timeout")}}),15e3);i.load()}))}async sequentialPreloadVideos(t){if(!t||t.length===0){return}const e=t.filter((t=>t&&t.trim()));if(e.length===0){return}e.forEach(((t,e)=>{t.split("/").pop()||t}));for(let t=0;t<e.length;t++){const o=e[t];const i=o.split("/").pop()||o;try{await this.preloadVideo(o)}catch(o){console.warn(`❌ [${t+1}/${e.length}] 预加载失败: ${i.substring(0,50)}${i.length>50?"...":""}`,o)}}}handleVideoUrlReceivedSequential(t,e=""){if(!t||t.length===0)return;const o=t.filter((t=>t&&t.trim()));if(o.length===0)return;this.sequentialPreloadVideos(o).catch((t=>{console.warn(`⚠️ 顺序预加载视频失败 (${e}):`,t)}))}handlePageResume(){if(this.isTaskCompleted||!this.isOpen||this.isEndingInterview){return}console.log("页面恢复可见,检查流程状态:",{waitingForDigitalHuman:this.waitingForDigitalHuman,isPlayingDigitalHumanVideo:this.isPlayingDigitalHumanVideo,waitingToRecord:this.waitingToRecord,isRecording:this.isRecording,showRecordingUI:this.showRecordingUI});if(this.isPlayingDigitalHumanVideo){const t=this.hostElement.shadowRoot?.querySelector(".digital-human-background-video");if(t){const e=t.play();if(e){e.catch((()=>{console.warn("恢复数字人视频播放失败,跳过视频");this.skipDigitalHumanVideo()}))}setTimeout((()=>{if(this.isPlayingDigitalHumanVideo){console.warn("数字人视频恢复后3秒仍未结束,强制跳过");this.skipDigitalHumanVideo()}}),3e3)}else{this.skipDigitalHumanVideo()}return}if(this.waitingForDigitalHuman&&!this.isPlayingDigitalHumanVideo){console.warn("检测到waitingForDigitalHuman卡住(视频未在播放),直接开始录制流程");this.waitingForDigitalHuman=false;this.startWaitingToRecord();return}if(this.isRecording&&this.recordingStream){const t=this.recordingStream.getTracks();const e=t.length>0&&t.every((t=>t.readyState==="ended"));if(e){console.warn("检测到录制的MediaStream已被系统回收,停止录制");this.deviceError="设备被系统中断,请重新录制";this.stopRecording()}}}skipDigitalHumanVideo(){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}handleVideoElementEnded=async()=>{if(this.isPlayingDigitalHumanVideo){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;const t=this.isPlayingWelcomeVideo;this.isPlayingWelcomeVideo=false;if(t&&this.pendingGeneratedVideoUrl){const t=this.pendingGeneratedVideoUrl;this.pendingGeneratedVideoUrl="";await this.playDigitalHumanVideo(t);return}if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview&&!t){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(t){console.error("点击结束发送消息失败:",t);this.isEndingInterview=false;I.captureError(t,{action:"handleConfirmEndInterview",component:"pcm-virtual-chat-modal",title:"点击结束发送消息失败"});z.emitError({error:t,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const t="请结束面试";console.log("面试结束消息已发送:",{conversation_id:this.conversationId,message:t});await this.sendMessageToAPI(t);this.isEndingInterview=false}catch(t){console.error("发送结束面试消息失败:",t);this.isEndingInterview=false;throw t}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((t=>t.answer&&t.answer.trim())).length;renderChatHistory(){if(this.isPlayingWelcomeVideo){const t=Math.max(0,Math.min(2,this.openingIndex||0));const e=this.digitalHumanOpeningContents[t]||this.digitalHumanOpeningContents[0];const o=e.text;return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},o))}if(this.isGeneratingDigitalHumanVideo||this.isLoading){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}if(this.currentStreamingMessage&&this.currentStreamingMessage.answer){return i("div",{class:"ai-message-item streaming"},i("div",{class:"ai-message-content",innerHTML:this.currentStreamingMessage.answer}),this.currentStreamingMessage.isStreaming&&i("div",{class:"typing-indicator"},i("span",null),i("span",null),i("span",null)))}const t=[...this.messages].reverse().find((t=>t.answer&&t.answer.trim()));if(t){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content",innerHTML:t.answer}))}return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"digital-human-mode":!!this.digitalId};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:t},i("div",{class:e},i("button",{class:"close-button",onClick:this.handleCloseClick},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))),this.digitalId&&this.digitalHumanVideoUrl&&i("div",{class:"digital-human-background"},i("video",{autoplay:true,playsinline:true,loop:!this.isPlayingDigitalHumanVideo,muted:!this.isPlayingDigitalHumanVideo,src:this.digitalHumanVideoUrl,class:"digital-human-background-video",onEnded:this.handleVideoElementEnded,onPlay:t=>{const e=t.target;const o=this.digitalHumanVideoUrl===this.digitalHumanDefaultVideoUrl;e.playbackRate=o?1:this.playbackRate},ref:t=>{if(t){const e=this.digitalHumanVideoUrl===this.digitalHumanDefaultVideoUrl;t.playbackRate=e?1:this.playbackRate;if(t.src&&t.readyState===0){t.load()}}}})),this.renderVideoPreview(),i("div",{class:"modal-content-layer"},i("div",{class:"main-content"},i("div",{class:"chat-history-section"},this.renderChatHistory()),this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId&&i("div",{class:"end-interview-button-container"},i("button",{class:"end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isEndingInterview||!this.isRecording,title:this.isEndingInterview?"正在结束面试...":!this.isRecording?"请在录制时点击":"结束面试"},this.isEndingInterview?"正在结束...":"结束面试")),this.renderRecordingStatusBar())),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:"确认完成回答?",okText:"确认完成",cancelText:"继续录制",okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前录制时长:",(()=>{const t=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const e=Math.floor(t/60);const o=t%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,"注意:录制仍在进行中")),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},'点击"确认完成"将结束本题回答'),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},"本次面试不再提醒"))))),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showCloseConfirmModal,modalTitle:"确认关闭?",okText:"确认关闭",cancelText:"取消",okType:"danger",onOk:this.handleCloseConfirmOk,onCancel:this.handleCloseConfirmCancel,onClosed:this.handleCloseConfirmCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.isTaskCompleted?"面试已结束,确认要关闭吗?":"您的面试未完成,确认要关闭吗?")))),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:"确认结束面试?",okText:"确认结束",cancelText:"取消",okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const t=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前第 ",t," 题"),t<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,"警告:"),"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。")),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},"确认要结束面试吗?结束后将生成面试报告。"))})())))))}renderVideoPreview(){if(!this.showRecordingUI){return null}return i("div",{class:"recording-preview-top-right"},i("video",{class:"user-video-preview",autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:t=>{if(t&&this.recordingStream&&!this.videoRef){this.videoRef=t}}}))}renderRecordingStatusBar(){if(this.showRecordingUI){const t=Math.floor(this.recordingTimeLeft/60).toString().padStart(2,"0");const e=(this.recordingTimeLeft%60).toString().padStart(2,"0");return i("div",{class:"recording-status-bar"},i("div",{class:"audio-waveform"},i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"})),i("span",{class:"recording-timer"},t,":",e),i("button",{class:"finish-recording-btn",onClick:()=>this.handleStopRecording()},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"完成",style:{filter:"brightness(0) invert(1)"}})))}return i("div",{class:"recording-status-bar"},this.renderStatusIndicator())}renderStatusIndicator(){if(this.deviceError){return i("div",{class:"status-indicator-text error"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.deviceError))}if(this.isTaskCompleted){return i("div",{class:"status-indicator-text"},i("span",null,"面试已完成"))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"面试官思考中..."))}if(this.isUploadingVideo){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"正在提交回答..."))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"题目生成中..."))}if(this.waitingToRecord){return i("div",{class:"status-indicator-text"},i("span",null,this.waitingTimeLeft," 秒后开始您的回答"))}return i("div",{class:"status-indicator-text ready"},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"准备就绪"}),i("span",null,"准备就绪"))}static get watchers(){return{token:["handleTokenChange"]}}};Jr.style=Vr+Wr;const Qr=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto;-webkit-overflow-scrolling:touch;}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:60vh;min-height:400px;max-height:900px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.document-download-actions{display:flex;align-items:center;gap:8px;margin-right:8px}.document-download-button{padding:4px 8px;color:#1890ff;font-size:14px;line-height:20px;background:transparent;border:none;border-radius:4px;cursor:pointer}.document-download-button:hover{background-color:#e6f7ff}.document-download-button:focus-visible{outline:2px solid #1890ff;outline-offset:2px}.document-download-qr-code{display:flex;flex-direction:column;align-items:center;padding:8px 0}.document-download-qr-code img{width:200px;height:200px}.document-download-qr-code p{margin:16px 0 0;color:#666;font-size:14px}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.toolbar-button img{width:16px;height:16px}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.references-section{margin-top:30px;padding:12px;background-color:#f9f9f9;border-radius:8px;border:1px solid #e8e8e8}.references-title{font-size:14px;color:#666;margin:0 0 8px 0;font-weight:500}.references-list{display:flex;flex-direction:column;gap:8px}.reference-item{background-color:#fff;border:1px solid #e8e8e8;border-radius:6px;padding:10px;cursor:pointer;transition:background-color 0.2s, box-shadow 0.2s}.reference-item:hover{background-color:#f5f5f5;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.reference-header{display:flex;align-items:center;gap:6px;position:relative}.reference-icon{color:#1890ff;display:flex;align-items:center}.reference-name{font-size:13px;font-weight:500;color:#333;flex:1}.download-icon{color:#1890ff;display:flex;align-items:center}.reference-content{display:none}.suggested-questions{margin-top:20px;padding:12px;background-color:#f0f7ff;border-radius:8px;border:1px solid #d6e8ff}.suggested-title{font-size:14px;color:#1890ff;margin:0 0 8px 0;font-weight:500}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#fff;border:1px solid #e6f7ff;border-radius:6px;cursor:pointer;font-size:14px;color:#1890ff;transition:all 0.3s;margin-bottom:8px}.suggested-question:last-child{margin-bottom:0}.suggested-question:hover{background-color:#e6f7ff;border-color:#91d5ff}.arrow-right{color:#1890ff;display:flex;align-items:center}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e6f7ff;border-top-color:#1890ff;border-radius:50%;animation:spin 1s linear infinite}";const Yr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Gr=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent");this.clearConversation=o(this,"clearConversation")}modalTitle;token;isOpen=false;messages=[];modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;currentAssistantMessage="";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return t(this)}streamComplete;conversationStart;tokenInvalid;someErrorEvent;SCROLL_THRESHOLD=20;fullscreen=false;textAnswer="";isSubmittingText=false;customInputs={show_suggested_questions:"false"};suggestedQuestions=[];suggestedQuestionsLoading=false;currentRefs=[];showReferences=false;employeeId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;employeeDetails=null;isLoadingEmployeeDetails=false;quickQuestions=[];tokenInvalidListener;clearConversation;shouldHideReferences=false;isUserScrolling=false;filePreviewMode="drawer";isDrawerOpen=false;previewUrl="";previewFileName="";downloadUrl="";isDownloadQrCodeOpen=false;downloadQrCodeUrl="";handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(t){if(!this.employeeId){console.error("未提供数字员工ID (employeeId)");setTimeout((()=>alert("请提供有效的数字员工ID")),0);return}await f(this.token);await this.fetchEmployeeDetails()}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopAudioRecording()}handleClose=()=>{this.modalClosed.emit()};async sendMessageToAPI(t){if(!this.employeeId){alert("请提供有效的数字员工ID");return}this.isLoading=true;let e="";const o=new Date;const i=`${o.getHours()}:${o.getMinutes().toString().padStart(2,"0")}`;const n=t.trim()||"请开始";this.suggestedQuestions=[];this.currentRefs=[];this.shouldHideReferences=false;const r={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:n,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:i,isStreaming:true};this.currentStreamingMessage=r;this.shouldAutoScroll=true;this.scrollToBottom();const a={response_mode:"streaming",conversation_id:this.conversationId,query:n,employee_id:this.employeeId};a.inputs={...this.customInputs};await u({url:`/sdk/v1/knowledge/chat/chat-messages`,method:"POST",data:a,onMessage:t=>{if(t.conversation_id&&!this.conversationId){this.conversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="node_started"&&t.data.title.includes("聘才猫推荐开始")){this.suggestedQuestionsLoading=true}if(t.event==="node_started"&&t.data.title.includes("不显示引用")){this.shouldHideReferences=true}if(t.event==="node_finished"&&t.data.title.includes("聘才猫推荐结束")){let e=[];try{let o=t.data.outputs.text;if(typeof o==="string"){o=o.replace(/```json\n/,"").replace(/```/,"").trim();const t=JSON.parse(o);if(t.status==="success"&&Array.isArray(t.items)){e=t.items.map((t=>t.question))}}else{const t=o;if(t.status==="success"&&Array.isArray(t.items)){e=t.items.map((t=>t.question))}}}catch(t){console.warn("解析问题建议失败:",t)}this.suggestedQuestions=e;this.suggestedQuestionsLoading=false}if(t.event==="node_finished"&&t.data?.inputs?.documents){const e=[];t.data.inputs.documents.forEach((t=>{if(t.result_list&&Array.isArray(t.result_list)){t.result_list.forEach((t=>{if(t.doc_info&&t.content){e.push({doc_info:{doc_name:t.doc_info.doc_name,doc_id:t.doc_info.doc_id},content:t.content})}}))}}));const o=new Map;e.forEach((t=>{if(t.doc_info&&t.doc_info.doc_id){o.set(t.doc_info.doc_id,t)}}));this.currentRefs=Array.from(o.values())}if(t.event==="message"){if(t.event==="agent_message"||t.event==="message"){if(t.answer){e+=t.answer;const o={...this.currentStreamingMessage,answer:e,id:t.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:t.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:t.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=o;this.scrollToBottom()}}}if(t.event==="error"){const e=t.data?.message||t.message||"请求失败";this.messages=[...this.messages,{...r,answer:e,error:t.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;this.someErrorEvent.emit({error:t.data,message:e});return}if(t.event==="message_end"){this.streamComplete.emit({conversation_id:t.conversation_id||"",event:t.event,message_id:t.message_id,id:t.id})}},onError:t=>{console.error("发生错误:",t);alert(t instanceof Error?t.message:"消息发送失败,请稍后再试");this.messages=[...this.messages,{...r,answer:"消息发送失败,请检查网络。",error:t,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;const t=this.currentStreamingMessage;t.isStreaming=false;this.messages=[...this.messages,t];this.currentStreamingMessage=null}})}handleScroll=()=>{if(this.isUserScrolling){const t=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!t)return;const{scrollTop:e,scrollHeight:o,clientHeight:i}=t;const n=o-e-i;this.shouldAutoScroll=n<=this.SCROLL_THRESHOLD}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const t=this.hostElement.shadowRoot?.querySelector(".chat-history");if(t&&this.isOpen){t.scrollTop=t.scrollHeight}}componentDidRender(){if(this.isLoadingHistory||this.shouldAutoScroll&&this.isOpen){const t=this.hostElement.shadowRoot?.querySelector(".chat-history");if(t){t.scrollTop=t.scrollHeight}}}async loadHistoryMessages(t){if(!this.conversationId&&!t)return;const e=t||this.conversationId;if(this.currentStreamingMessage||this.isLoading)return;this.isLoadingHistory=true;try{const t=await s({url:"/sdk/v1/knowledge/chat/conversation-history",method:"GET",data:{conversation_id:e}});if(t.success&&t.data){const e=t.data.data||[];const o=e.map((t=>{const e=new Date(parseInt(t.created_at)*1e3);const o=e.getHours().toString().padStart(2,"0");const i=e.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:t.id,conversation_id:t.conversation_id,inputs:t.inputs||{},query:t.query||"",answer:t.answer||"",message_files:t.message_files||[],feedback:t.feedback||{},retriever_resources:t.retriever_resources||[],created_at:t.created_at,agent_thoughts:t.agent_thoughts||[],status:t.status||"normal",error:t.error,time:n,isStreaming:false}}));this.messages=o}}catch(t){console.error("加载历史消息失败:",t);alert(t instanceof Error?t.message:"加载历史消息失败,请刷新重试")}finally{this.isLoadingHistory=false;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200)}}async convertAudioToText(t){try{const e=await s({url:"/sdk/v1/tts/audio_to_text",method:"POST",data:{cos_key:t}});if(e.success&&e.data&&e.data.text){return e.data.text}else{console.warn("音频转文字返回结果格式不正确");return null}}catch(t){console.error("音频转文字错误:",t);return null}}async fetchEmployeeDetails(){if(!this.employeeId||!this.token)return;this.isLoadingEmployeeDetails=true;try{const t=await s({url:`/sdk/v1/knowledge/chat/employee/${this.employeeId}`,method:"GET"});if(t.success&&t.data){this.employeeDetails=t.data;if(this.employeeDetails.show_quote_doc!==undefined){this.showReferences=this.employeeDetails.show_quote_doc}if(this.employeeDetails.quick_questions){this.quickQuestions=this.employeeDetails.quick_questions.split(",").map((t=>t.trim())).filter((t=>t))}if(this.conversationId){await this.loadHistoryMessages()}}else{alert("获取智能体详情失败,请检查token和employeeId是否正确")}}catch(t){console.error("获取智能体详情失败:",t)}finally{this.isLoadingEmployeeDetails=false}}handleTextInputChange=t=>{const e=t.target;this.textAnswer=e.value};handleKeyDown=t=>{if(t.isComposing){return}if(t.key==="Enter"){if(t.ctrlKey){return}else{t.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const t=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(t)}catch(t){console.error("提交文本回答失败:",t);alert("提交回答失败,请重试")}finally{this.isSubmittingText=false}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((t=>{this.startRecordingWithStream(t)})).catch((t=>{console.error("麦克风权限请求失败:",t);if(t.name==="NotAllowedError"||t.name==="PermissionDeniedError"){alert("麦克风访问被拒绝。\n\n在Mac上,请前往系统偏好设置 > 安全性与隐私 > 隐私 > 麦克风,确保您的浏览器已被允许访问麦克风。")}else{alert("无法访问麦克风,请确保已授予权限并且麦克风设备正常工作。")}}))}};startRecordingWithStream(t){try{const e=x();let o;try{o=new MediaRecorder(t,{mimeType:e})}catch(e){console.warn("指定的音频MIME类型不受支持,使用默认设置:",e);try{o=new MediaRecorder(t)}catch(e){t.getTracks().forEach((t=>t.stop()));console.error("无法创建音频录制器:",e);alert("您的浏览器不支持音频录制功能");return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=t=>{if(t.data.size>0){this.audioChunks.push(t.data)}};o.onstop=()=>{t.getTracks().forEach((t=>t.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const t=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-t);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(e){t.getTracks().forEach((t=>t.stop()));console.error("开始录音失败:",e);alert("开始录音失败,请确保麦克风设备正常工作")}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const t=x()||"audio/webm";const e=new Blob(this.audioChunks,{type:t});if(e.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=t.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([e],i,{type:t});const r=await m(n,{},{tags:["audio"]});const a=await this.convertAudioToText(r.cos_key);if(a){const t=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const e=t?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,e);const i=this.textAnswer.substring(e);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(t){const o=e+n.length+a.length;t.focus();t.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(t){console.error("处理音频录制失败:",t);alert("语音识别失败,请重试")}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleSuggestedQuestionClick=t=>{if(this.isLoading||this.currentStreamingMessage)return;this.textAnswer=t;this.submitTextAnswer()};async handleDocumentPreview(t){try{const e=t.doc_info.doc_id.match(/docID_(\d+)/);if(!e||!e[1]){alert("无法解析文档ID");return}const o=e[1];const i=await s({url:`/sdk/v1/files/${o}/info`,method:"GET"});if(i.success&&i.data?.file_url){const e=i.data.file_url;const o=`${e}${e.includes("?")?"&":"?"}ci-process=doc-preview©able=1&dstType=html`;if(this.filePreviewMode==="drawer"){this.previewUrl=o;this.previewFileName=t.doc_info.doc_name;this.downloadUrl=e;this.isDrawerOpen=true}else{window.open(o,"_blank")}}else{alert("获取文档链接失败")}}catch(t){console.error("打开文档预览失败:",t);alert("打开文档预览失败,请稍后再试")}}handleDocumentLocalDownload=async()=>{if(!this.downloadUrl)return;try{const t=await fetch(this.downloadUrl);if(!t.ok){throw new Error(`下载文档失败,状态码:${t.status}`)}const e=await t.blob();const o=URL.createObjectURL(e);const i=document.createElement("a");i.href=o;i.download=this.previewFileName;document.body.appendChild(i);i.click();i.remove();URL.revokeObjectURL(o)}catch(t){console.error("本地下载文档失败:",t);alert("本地下载文档失败,请稍后再试")}};handleDocumentQrCodeDownload=()=>{if(!this.downloadUrl)return;const t=Pt(0,"M");t.addData(this.downloadUrl);t.make();this.downloadQrCodeUrl=t.createDataURL(4,0);this.isDownloadQrCodeOpen=true};handleClearConversation=()=>{if(this.isLoading||this.currentStreamingMessage)return;this.clearConversation.emit(this.conversationId);this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[]};async resetEmployee(t,e){this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[];this.quickQuestions=[];this.employeeDetails=null;this.shouldHideReferences=false;this.showReferences=false;if(t){this.employeeId=t}await this.fetchEmployeeDetails();if(e){this.conversationId=e;await this.loadHistoryMessages(e)}return true}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.icon||(this.employeeDetails?.avatar||"");const r=this.modalTitle||(this.employeeDetails?.name||"在线客服");const a=()=>{if(!this.showReferences||this.currentRefs.length===0||this.currentStreamingMessage||this.shouldHideReferences)return null;return i("div",{class:"references-section"},i("h3",{class:"references-title"},"引用文档"),i("div",{class:"references-list"},this.currentRefs.map(((t,e)=>i("div",{class:"reference-item",key:`ref-${e}`,onClick:()=>this.handleDocumentPreview(t)},i("div",{class:"reference-header"},i("span",{class:"reference-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))),i("span",{class:"reference-name"},t.doc_info.doc_name),i("span",{class:"download-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})))))))))};const s=()=>{if(!this.customInputs.show_suggested_questions&&!this.currentStreamingMessage){return null}if(this.suggestedQuestionsLoading){return i("div",{class:"loading-suggestions"},i("div",{class:"loading-spinner-small"}))}if(this.suggestedQuestions.length===0)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"推荐问题"),this.suggestedQuestions.map(((t,e)=>i("div",{class:"suggested-question",key:`question-${e}`,onClick:()=>this.handleSuggestedQuestionClick(t)},i("span",null,t),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const l=()=>{if(this.conversationId||this.quickQuestions.length===0||this.currentStreamingMessage)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"常见问题"),this.quickQuestions.map(((t,e)=>i("div",{class:"suggested-question",key:`preset-question-${e}`,onClick:()=>this.handleSuggestedQuestionClick(t)},i("span",null,t),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const d=()=>i("div",{class:"text-input-area"},i("textarea",{class:"text-answer-input",placeholder:"发消息",value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:"toolbar-button",title:"清除对话记录",onClick:this.handleClearConversation,disabled:this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.messages.length===0},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/brush-alt-svgrepo-com.png",alt:"清除对话记录"}))),i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?"点击停止录音":this.isConvertingAudio?"正在识别语音...":"语音输入",onClick:this.handleVoiceInputClick,disabled:this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png",alt:"发送"}))));return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},n&&i("img",{src:n,class:"header-icon",alt:"应用图标"}),i("div",null,r)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,"加载历史消息中...")):i("div",null,this.messages.map((t=>i("div",{id:`message_${t.id}`,key:t.id},i("components-chat-message",{message:t,showFeedbackButtons:false})))),this.currentStreamingMessage&&i("div",{id:`message_${this.currentStreamingMessage.id}`},i("components-chat-message",{message:this.currentStreamingMessage,showFeedbackButtons:false})),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},this.isLoadingEmployeeDetails?i("p",null,"加载中..."):this.employeeDetails?.default_greeting?i("p",null,this.employeeDetails.default_greeting):i("p",null,"请输入...")),a(),s(),l())),i("div",{class:"recording-section"},i("div",{class:"recording-container"},d()))),i("components-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewFileName="";this.downloadUrl="";this.isDownloadQrCodeOpen=false;this.downloadQrCodeUrl=""}},this.employeeDetails?.allow_download_quote_doc===true&&this.downloadUrl&&i("div",{slot:"header-actions",class:"document-download-actions"},i("button",{class:"document-download-button",type:"button",onClick:this.handleDocumentLocalDownload,"aria-label":"本地下载文档"},"本地下载"),i("button",{class:"document-download-button",type:"button",onClick:this.handleDocumentQrCodeDownload,"aria-label":"扫码下载文档"},"扫码下载")),this.previewUrl&&i("div",{class:"file-preview-container"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",style:{border:"none",height:"calc(100vh - 120px)"}}))),i("components-confirm-modal",{isOpen:this.isDownloadQrCodeOpen,modalTitle:"扫码下载",okText:"关闭",cancelText:"取消",onOk:()=>{this.isDownloadQrCodeOpen=false},onCancel:()=>{this.isDownloadQrCodeOpen=false},onClosed:()=>{this.isDownloadQrCodeOpen=false;this.downloadQrCodeUrl=""}},i("div",{class:"document-download-qr-code"},this.downloadQrCodeUrl&&i("img",{src:this.downloadQrCodeUrl,alt:`${this.previewFileName} 下载二维码`}),i("p",null,"请使用手机扫描二维码下载文档")))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Gr.style=Qr+Yr;const Xr='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Kr=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}";const Zr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ta=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.planningComplete=o(this,"planningComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="长期规划";isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const t=this.customInputs.type;if(t==="长期规划"||t==="转行建议"||t==="晋升路径"){this.selectedPlanType=t}}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("3022316191018898","pcm-zygh-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handlePlanTypeChange=t=>{this.selectedPlanType=t};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=t=>{this.planningComplete.emit({...t.detail,type:this.selectedPlanType})};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const a=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择规划类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="长期规划"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("长期规划")},i("div",{class:"option-icon"},"📈"),i("div",{class:"option-label"},"长期规划")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转行建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转行建议")},i("div",{class:"option-icon"},"🔄"),i("div",{class:"option-label"},"转行建议")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},"🚀"),i("div",{class:"option-label"},"晋升路径")))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018898",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ta.style=Xr+(Kr+Zr);const ea='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const oa=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;border:1px solid #d9d9d9;border-radius:6px;overflow:hidden}.plan-type-option{flex:1;border:none;border-right:1px solid #d9d9d9;padding:7px 8px;cursor:pointer;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;transition:background-color 0.2s,\r\n color 0.2s;background-color:#fff}.plan-type-option:last-child{border-right:none}.plan-type-option:hover{background-color:#f0f7ff}.plan-type-option.selected{background-color:#1890ff}.plan-type-option.selected .option-icon,.plan-type-option.selected .option-label{color:#fff}.option-icon{display:flex;align-items:center;justify-content:center}.option-icon img{height:18px;width:auto}.option-label{font-size:13px;font-weight:500;color:#555;white-space:nowrap}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}.dynamic-form-section{margin-top:20px;margin-bottom:20px}.form-fields{display:flex;flex-direction:column;gap:16px}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-weight:600;color:#333;font-size:14px}.form-input{padding:10px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;transition:all 0.3s;outline:none}.form-input:hover{border-color:#40a9ff}.form-input:focus{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.1)}.form-input::placeholder{color:#bfbfbf}.form-hint{font-size:12px;color:#8c8c8c;line-height:1.5;margin-top:-8px;padding:8px 12px;background-color:#f5f5f5;border-radius:4px;border-left:3px solid #1890ff}";const ia=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const na=class{constructor(t){e(this,t);this.modalClosed=o(this,"modalClosed");this.uploadSuccess=o(this,"uploadSuccess");this.streamComplete=o(this,"streamComplete");this.conversationStart=o(this,"conversationStart");this.planningComplete=o(this,"planningComplete");this.tokenInvalid=o(this,"tokenInvalid");this.someErrorEvent=o(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="初入职场";isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;targetPosition="";industryName="";jobPosition="";timePeriod="";get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(t){if(t&&t!==h.getToken()){h.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const t=this.customInputs.type;if(t==="转型建议"||t==="晋升路径"||t==="初入职场"){this.selectedPlanType=t}}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){S.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(t,e)=>{this.isLoadingConversations=true;const o=await T("121182005294690304","pcm-zygh-v2-modal",t,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,e+1);if(o.hasMore&&o.nextCursor){i[e+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=e;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async t=>{if(t==="prev"){if(this.historyConversationPageIndex===0){return}const t=this.historyConversationPageIndex-1;const e=this.historyConversationCursorStack[t]||"";await this.loadHistoryConversations(e,t);return}if(!this.hasMoreHistoryConversations){return}const e=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[e];if(!o){return}await this.loadHistoryConversations(o,e)};handleSelectConversation=t=>{this.conversationId=t;this.isHistoryDrawerOpen=false;this.showChatModal=true};handlePlanTypeChange=t=>{this.selectedPlanType=t;this.targetPosition="";this.industryName="";this.jobPosition="";this.timePeriod=""};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=t=>{this.planningComplete.emit({...t.detail,type:this.selectedPlanType})};getPlanTypeIcon=t=>{const e=this.selectedPlanType===t;const o="https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/";const i={初入职场:"i_entry_level",晋升路径:"i_promotion",转型建议:"i_transition"};return`${o}${i[t]}${e?"_actived":""}.png`};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const a=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type);return i("div",{class:o,style:t},i("div",{class:e},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((t=>i("div",{key:t.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(t.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},t.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},t.timeDisplay),t.message_count>0&&i("span",{class:"message-count"},t.message_count,"条消息"),t.status&&i("span",{class:{"conversation-status":true,completed:t.status==="结束",running:t.status==="进行中"}},t.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择建议类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="初入职场"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("初入职场")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("初入职场"),alt:"初入职场"})),i("div",{class:"option-label"},"初入职场")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("晋升路径"),alt:"晋升路径"})),i("div",{class:"option-label"},"晋升路径")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转型建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转型建议")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("转型建议"),alt:"转型建议"})),i("div",{class:"option-label"},"转型建议")))),i("div",{class:"dynamic-form-section"},this.selectedPlanType==="初入职场"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:t=>this.industryName=t.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:t=>this.jobPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项")),this.selectedPlanType==="转型建议"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:t=>this.industryName=t.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:t=>this.jobPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项"),i("div",{class:"form-field"},i("label",null,"期望转型时间"),i("input",{type:"text",class:"form-input",placeholder:"请输入您期望的转型时间",value:this.timePeriod,onInput:t=>this.timePeriod=t.target.value}))),this.selectedPlanType==="晋升路径"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"晋升目标岗位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您的晋升目标岗位",value:this.targetPosition,onInput:t=>this.targetPosition=t.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,建议您填写晋升目标岗位名称"))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:t=>this.pcmUploadRef=t,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:t=>{const e=t.detail??[];this.uploadedFileInfo=e[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"121182005294690304",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType,...this.industryName?{industry_name:this.industryName}:{},...this.targetPosition||this.jobPosition?{target_position:this.targetPosition||this.jobPosition}:{},...this.timePeriod?{time_period:this.timePeriod}:{}},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};na.style=ea+(oa+ia);export{yt as components_chat_message,kt as components_confirm_modal,It as components_digital_human,_t as components_drawer,Et as components_export_records_modal,Rt as components_message,Vt as components_mobile_input_btn,Gt as components_mobile_upload_btn,Zt as components_position_selector,ie as components_thousand_resume_wrapper,se as components_upload,de as components_voice_input_btn,ue as oem_jlsx_modal,xe as oem_zygh_modal,ke as pcm_1zhanshi_mnms_modal,Vo as pcm_app_chat_modal,Yo as pcm_ats_mnms_modal,Ko as pcm_button,ei as pcm_card,ri as pcm_htws_modal,di as pcm_hyzj_modal,zn as pcm_jd_modal,_n as pcm_jlpp_modal,En as pcm_jlzz_modal,_r as pcm_mnct_modal,Er as pcm_mnms_modal,Or as pcm_mnms_zp_modal,Pr as pcm_msbg_modal,Nr as pcm_qgqjl_modal,Jr as pcm_virtual_chat_modal,Gr as pcm_zsk_chat_modal,ta as pcm_zygh_modal,na as pcm_zygh_v2_modal};
|
|
8
|
+
//# sourceMappingURL=p-b9368b8e.entry.js.map
|