import{g as e,l as n,_ as t,r as o,k as r,w as a,m as l,i,n as s,t as u,q as c,s as d,v as f,x as g,y as p,E as h,o as v,z as m,b as y,c as w,e as b,d as _,f as k,F as I,A as x,B as A,C as S,D as T,u as C,G as E,H as P,I as z,J as D,K as L,L as j,M as F,N as O,O as R,P as U,Q as W,R as M,S as $,T as V,U as H,V as N,W as B,X as K,Y as q}from"./index-7d881374.js";import{s as Y}from"./setHeight-96dcefe6.js";import{u as G}from"./userPessionCode-33b4794f.js";import{u as J}from"./chat-52f319e2.js";import{u as X}from"./dataList-3b7c4b7e.js";import{m as Z}from"./marked.esm-cf4f21f5.js";import{h as Q,v as ee,a as ne,t as te,b as oe,g as re,u as ae,A as le}from"./AiEmotion-99036b55.js";import{k as ie,A as se}from"./AIfind-b761aee6.js";import{e as ue}from"./marketTemperature-3afd7f01.js";import{h as ce}from"./moment-6961f857.js";import de from"./Feedback-5e237f54.js";import fe from"./Announcement-911e0476.js";import"./index-bce0856e.js";import"./emoEnergyConverter-7a8b83fd.js";import"./back-9e899973.js";const ge=e("audio",{state:()=>({soundInstance:null,isPlaying:!1,isVoiceEnabled:!0,playbackPosition:0,lastVoiceState:null,ttsUrl:"",isNewInstance:!1,nowSound:"",currentAudioUrl:"",isPaused:!1,duration:0}),actions:{setAudioInstance(e){this.soundInstance=e},play(){this.soundInstance&&(this.isPaused&&this.playbackPosition>0&&this.soundInstance.seek(this.playbackPosition),this.soundInstance.play(),this.isPlaying=!0,this.isPaused=!1)},pause(){this.soundInstance&&this.isPlaying&&(this.playbackPosition=this.soundInstance.seek()||0,this.soundInstance.pause(),this.isPlaying=!1,this.isPaused=!0)},stop(){this.soundInstance&&(this.soundInstance.stop(),this.isPlaying=!1,this.isPaused=!1,this.playbackPosition=0)},togglePlayPause(){this.isPlaying?this.pause():this.play()},setCurrentAudioUrl(e){this.currentAudioUrl!==e&&(this.stop(),this.currentAudioUrl=e,this.playbackPosition=0,this.isPaused=!1)},toggleVoice(){this.isVoiceEnabled=!this.isVoiceEnabled,this.isVoiceEnabled||this.stop()},resetAudioState(){this.stop(),this.currentAudioUrl="",this.ttsUrl="",this.soundInstance=null,this.nowSound=""}}});var pe,he,ve={exports:{}}; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */pe=ve,he=ve.exports,function(){var e,t="Expected a function",o="__lodash_hash_undefined__",r="__lodash_placeholder__",a=16,l=32,i=64,s=128,u=256,c=1/0,d=9007199254740991,f=NaN,g=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",l],["partialRight",i],["rearg",u]],h="[object Arguments]",v="[object Array]",m="[object Boolean]",y="[object Date]",w="[object Error]",b="[object Function]",_="[object GeneratorFunction]",k="[object Map]",I="[object Number]",x="[object Object]",A="[object Promise]",S="[object RegExp]",T="[object Set]",C="[object String]",E="[object Symbol]",P="[object WeakMap]",z="[object ArrayBuffer]",D="[object DataView]",L="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",O="[object Int16Array]",R="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",M="[object Uint16Array]",$="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,q=RegExp(B.source),Y=RegExp(K.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ne.source),oe=/^\s+/,re=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ie=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="['’]",Pe="[\\ud800-\\udfff]",ze="["+Ce+"]",De="["+Ie+"]",Le="\\d+",je="[\\u2700-\\u27bf]",Fe="["+Ae+"]",Oe="[^\\ud800-\\udfff"+Ce+Le+xe+Ae+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",Ue="[^\\ud800-\\udfff]",We="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Se+"]",Ve="(?:"+Fe+"|"+Oe+")",He="(?:"+$e+"|"+Oe+")",Ne="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+De+"|"+Re+")?",qe="[\\ufe0e\\ufe0f]?",Ye=qe+Ke+"(?:\\u200d(?:"+[Ue,We,Me].join("|")+")"+qe+Ke+")*",Ge="(?:"+[je,We,Me].join("|")+")"+Ye,Je="(?:"+[Ue+De+"?",De,We,Me,Pe].join("|")+")",Xe=RegExp(Ee,"g"),Ze=RegExp(De,"g"),Qe=RegExp(Re+"(?="+Re+")|"+Je+Ye,"g"),en=RegExp([$e+"?"+Fe+"+"+Ne+"(?="+[ze,$e,"$"].join("|")+")",He+"+"+Be+"(?="+[ze,$e+Ve,"$"].join("|")+")",$e+"?"+Ve+"+"+Ne,$e+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ge].join("|"),"g"),nn=RegExp("[\\u200d\\ud800-\\udfff"+Ie+Te+"]"),tn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,on=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rn=-1,an={};an[L]=an[j]=an[F]=an[O]=an[R]=an[U]=an[W]=an[M]=an[$]=!0,an[h]=an[v]=an[z]=an[m]=an[D]=an[y]=an[w]=an[b]=an[k]=an[I]=an[x]=an[S]=an[T]=an[C]=an[P]=!1;var ln={};ln[h]=ln[v]=ln[z]=ln[D]=ln[m]=ln[y]=ln[L]=ln[j]=ln[F]=ln[O]=ln[R]=ln[k]=ln[I]=ln[x]=ln[S]=ln[T]=ln[C]=ln[E]=ln[U]=ln[W]=ln[M]=ln[$]=!0,ln[w]=ln[b]=ln[P]=!1;var sn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},un=parseFloat,cn=parseInt,dn="object"==typeof n&&n&&n.Object===Object&&n,fn="object"==typeof self&&self&&self.Object===Object&&self,gn=dn||fn||Function("return this")(),pn=he&&!he.nodeType&&he,hn=pn&&pe&&!pe.nodeType&&pe,vn=hn&&hn.exports===pn,mn=vn&&dn.process,yn=function(){try{var e=hn&&hn.require&&hn.require("util").types;return e||mn&&mn.binding&&mn.binding("util")}catch(n){}}(),wn=yn&&yn.isArrayBuffer,bn=yn&&yn.isDate,_n=yn&&yn.isMap,kn=yn&&yn.isRegExp,In=yn&&yn.isSet,xn=yn&&yn.isTypedArray;function An(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}function Sn(e,n,t,o){for(var r=-1,a=null==e?0:e.length;++r-1}function Dn(e,n,t){for(var o=-1,r=null==e?0:e.length;++o-1;);return t}function nt(e,n){for(var t=e.length;t--&&$n(n,e[t],0)>-1;);return t}function tt(e,n){for(var t=e.length,o=0;t--;)e[t]===n&&++o;return o}var ot=Kn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rt=Kn({"&":"&","<":"<",">":">",'"':""","'":"'"});function at(e){return"\\"+sn[e]}function lt(e){return nn.test(e)}function it(e){var n=-1,t=Array(e.size);return e.forEach((function(e,o){t[++n]=[o,e]})),t}function st(e,n){return function(t){return e(n(t))}}function ut(e,n){for(var t=-1,o=e.length,a=0,l=[];++t",""":'"',"'":"'"}),ht=function n(re){var pe,he=(re=null==re?gn:ht.defaults(gn.Object(),re,ht.pick(gn,on))).Array,Ie=re.Date,xe=re.Error,Ae=re.Function,Se=re.Math,Te=re.Object,Ce=re.RegExp,Ee=re.String,Pe=re.TypeError,ze=he.prototype,De=Ae.prototype,Le=Te.prototype,je=re["__core-js_shared__"],Fe=De.toString,Oe=Le.hasOwnProperty,Re=0,Ue=(pe=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||""))?"Symbol(src)_1."+pe:"",We=Le.toString,Me=Fe.call(Te),$e=gn._,Ve=Ce("^"+Fe.call(Oe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=vn?re.Buffer:e,Ne=re.Symbol,Be=re.Uint8Array,Ke=He?He.allocUnsafe:e,qe=st(Te.getPrototypeOf,Te),Ye=Te.create,Ge=Le.propertyIsEnumerable,Je=ze.splice,Qe=Ne?Ne.isConcatSpreadable:e,nn=Ne?Ne.iterator:e,sn=Ne?Ne.toStringTag:e,dn=function(){try{var e=ga(Te,"defineProperty");return e({},"",{}),e}catch(n){}}(),fn=re.clearTimeout!==gn.clearTimeout&&re.clearTimeout,pn=Ie&&Ie.now!==gn.Date.now&&Ie.now,hn=re.setTimeout!==gn.setTimeout&&re.setTimeout,mn=Se.ceil,yn=Se.floor,Un=Te.getOwnPropertySymbols,Kn=He?He.isBuffer:e,vt=re.isFinite,mt=ze.join,yt=st(Te.keys,Te),wt=Se.max,bt=Se.min,_t=Ie.now,kt=re.parseInt,It=Se.random,xt=ze.reverse,At=ga(re,"DataView"),St=ga(re,"Map"),Tt=ga(re,"Promise"),Ct=ga(re,"Set"),Et=ga(re,"WeakMap"),Pt=ga(Te,"create"),zt=Et&&new Et,Dt={},Lt=Ha(At),jt=Ha(St),Ft=Ha(Tt),Ot=Ha(Ct),Rt=Ha(Et),Ut=Ne?Ne.prototype:e,Wt=Ut?Ut.valueOf:e,Mt=Ut?Ut.toString:e;function $t(e){if(li(e)&&!Gl(e)&&!(e instanceof Bt)){if(e instanceof Nt)return e;if(Oe.call(e,"__wrapped__"))return Na(e)}return new Nt(e)}var Vt=function(){function n(){}return function(t){if(!ai(t))return{};if(Ye)return Ye(t);n.prototype=t;var o=new n;return n.prototype=e,o}}();function Ht(){}function Nt(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=e}function Bt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Kt(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n=t?n:t)),n}function uo(n,t,o,r,a,l){var i,s=1&t,u=2&t,c=4&t;if(o&&(i=a?o(n,r,a,l):o(n)),i!==e)return i;if(!ai(n))return n;var d=Gl(n);if(d){if(i=function(e){var n=e.length,t=new e.constructor(n);return n&&"string"==typeof e[0]&&Oe.call(e,"index")&&(t.index=e.index,t.input=e.input),t}(n),!s)return zr(n,i)}else{var f=va(n),g=f==b||f==_;if(Ql(n))return Ar(n,s);if(f==x||f==h||g&&!a){if(i=u||g?{}:ya(n),!s)return u?function(e,n){return Dr(e,ha(e),n)}(n,function(e,n){return e&&Dr(n,Ri(n),e)}(i,n)):function(e,n){return Dr(e,pa(e),n)}(n,ao(i,n))}else{if(!ln[f])return a?n:{};i=function(e,n,t){var o,r=e.constructor;switch(n){case z:return Sr(e);case m:case y:return new r(+e);case D:return function(e,n){var t=n?Sr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,t);case L:case j:case F:case O:case R:case U:case W:case M:case $:return Tr(e,t);case k:return new r;case I:case C:return new r(e);case S:return function(e){var n=new e.constructor(e.source,fe.exec(e));return n.lastIndex=e.lastIndex,n}(e);case T:return new r;case E:return o=e,Wt?Te(Wt.call(o)):{}}}(n,f,s)}}l||(l=new Jt);var p=l.get(n);if(p)return p;l.set(n,i),di(n)?n.forEach((function(e){i.add(uo(e,t,o,e,n,l))})):ii(n)&&n.forEach((function(e,r){i.set(r,uo(e,t,o,r,n,l))}));var v=d?e:(c?u?la:aa:u?Ri:Oi)(n);return Tn(v||n,(function(e,r){v&&(e=n[r=e]),to(i,r,uo(e,t,o,r,n,l))})),i}function co(n,t,o){var r=o.length;if(null==n)return!r;for(n=Te(n);r--;){var a=o[r],l=t[a],i=n[a];if(i===e&&!(a in n)||!l(i))return!1}return!0}function fo(n,o,r){if("function"!=typeof n)throw new Pe(t);return La((function(){n.apply(e,r)}),o)}function go(e,n,t,o){var r=-1,a=zn,l=!0,i=e.length,s=[],u=n.length;if(!i)return s;t&&(n=Ln(n,Xn(t))),o?(a=Dn,l=!1):n.length>=200&&(a=Qn,l=!1,n=new Gt(n));e:for(;++r-1},qt.prototype.set=function(e,n){var t=this.__data__,o=oo(t,e);return o<0?(++this.size,t.push([e,n])):t[o][1]=n,this},Yt.prototype.clear=function(){this.size=0,this.__data__={hash:new Kt,map:new(St||qt),string:new Kt}},Yt.prototype.delete=function(e){var n=da(this,e).delete(e);return this.size-=n?1:0,n},Yt.prototype.get=function(e){return da(this,e).get(e)},Yt.prototype.has=function(e){return da(this,e).has(e)},Yt.prototype.set=function(e,n){var t=da(this,e),o=t.size;return t.set(e,n),this.size+=t.size==o?0:1,this},Gt.prototype.add=Gt.prototype.push=function(e){return this.__data__.set(e,o),this},Gt.prototype.has=function(e){return this.__data__.has(e)},Jt.prototype.clear=function(){this.__data__=new qt,this.size=0},Jt.prototype.delete=function(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t},Jt.prototype.get=function(e){return this.__data__.get(e)},Jt.prototype.has=function(e){return this.__data__.has(e)},Jt.prototype.set=function(e,n){var t=this.__data__;if(t instanceof qt){var o=t.__data__;if(!St||o.length<199)return o.push([e,n]),this.size=++t.size,this;t=this.__data__=new Yt(o)}return t.set(e,n),this.size=t.size,this};var po=Fr(ko),ho=Fr(Io,!0);function vo(e,n){var t=!0;return po(e,(function(e,o,r){return t=!!n(e,o,r)})),t}function mo(n,t,o){for(var r=-1,a=n.length;++r0&&t(i)?n>1?wo(i,n-1,t,o,r):jn(r,i):o||(r[r.length]=i)}return r}var bo=Or(),_o=Or(!0);function ko(e,n){return e&&bo(e,n,Oi)}function Io(e,n){return e&&_o(e,n,Oi)}function xo(e,n){return Pn(n,(function(n){return ti(e[n])}))}function Ao(n,t){for(var o=0,r=(t=_r(t,n)).length;null!=n&&on}function Eo(e,n){return null!=e&&Oe.call(e,n)}function Po(e,n){return null!=e&&n in Te(e)}function zo(n,t,o){for(var r=o?Dn:zn,a=n[0].length,l=n.length,i=l,s=he(l),u=1/0,c=[];i--;){var d=n[i];i&&t&&(d=Ln(d,Xn(t))),u=bt(d.length,u),s[i]=!o&&(t||a>=120&&d.length>=120)?new Gt(i&&d):e}d=n[0];var f=-1,g=s[0];e:for(;++f=i?s:s*("desc"==t[o]?-1:1)}return e.index-n.index}(e,n,t)}))}function qo(e,n,t){for(var o=-1,r=n.length,a={};++o-1;)i!==e&&Je.call(i,s,1),Je.call(e,s,1);return e}function Go(e,n){for(var t=e?n.length:0,o=t-1;t--;){var r=n[t];if(t==o||r!==a){var a=r;ba(r)?Je.call(e,r,1):gr(e,r)}}return e}function Jo(e,n){return e+yn(It()*(n-e+1))}function Xo(e,n){var t="";if(!e||n<1||n>d)return t;do{n%2&&(t+=e),(n=yn(n/2))&&(e+=e)}while(n);return t}function Zo(e,n){return ja(Ca(e,n,ss),e+"")}function Qo(e){return Zt(Bi(e))}function er(e,n){var t=Bi(e);return Ra(t,so(n,0,t.length))}function nr(n,t,o,r){if(!ai(n))return n;for(var a=-1,l=(t=_r(t,n)).length,i=l-1,s=n;null!=s&&++ar?0:r+n),(t=t>r?r:t)<0&&(t+=r),r=n>t?0:t-n>>>0,n>>>=0;for(var a=he(r);++o>>1,l=e[a];null!==l&&!gi(l)&&(t?l<=n:l=200){var u=n?null:Xr(e);if(u)return ct(u);l=!1,r=Qn,s=new Gt}else s=n?[]:i;e:for(;++o=r?n:ar(n,t,o)}var xr=fn||function(e){return gn.clearTimeout(e)};function Ar(e,n){if(n)return e.slice();var t=e.length,o=Ke?Ke(t):new e.constructor(t);return e.copy(o),o}function Sr(e){var n=new e.constructor(e.byteLength);return new Be(n).set(new Be(e)),n}function Tr(e,n){var t=n?Sr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function Cr(n,t){if(n!==t){var o=n!==e,r=null===n,a=n==n,l=gi(n),i=t!==e,s=null===t,u=t==t,c=gi(t);if(!s&&!c&&!l&&n>t||l&&i&&u&&!s&&!c||r&&i&&u||!o&&u||!a)return 1;if(!r&&!l&&!c&&n1?o[a-1]:e,i=a>2?o[2]:e;for(l=n.length>3&&"function"==typeof l?(a--,l):e,i&&_a(o[0],o[1],i)&&(l=a<3?e:l,a=1),t=Te(t);++r-1?a[l?t[i]:i]:e}}function $r(n){return ra((function(o){var r=o.length,a=r,l=Nt.prototype.thru;for(n&&o.reverse();a--;){var i=o[a];if("function"!=typeof i)throw new Pe(t);if(l&&!s&&"wrapper"==sa(i))var s=new Nt([],!0)}for(a=s?a:r;++a1&&y.reverse(),f&&cs))return!1;var c=l.get(n),d=l.get(t);if(c&&d)return c==t&&d==n;var f=-1,g=!0,p=2&o?new Gt:e;for(l.set(n,t),l.set(t,n);++f-1&&e%1==0&&e1?"& ":"")+n[o],n=n.join(t>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+n+"] */\n")}(o,function(e,n){return Tn(p,(function(t){var o="_."+t[0];n&t[1]&&!zn(e,o)&&e.push(o)})),e.sort()}(function(e){var n=e.match(le);return n?n[1].split(ie):[]}(o),t)))}function Oa(n){var t=0,o=0;return function(){var r=_t(),a=16-(r-o);if(o=r,a>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(e,arguments)}}function Ra(n,t){var o=-1,r=n.length,a=r-1;for(t=t===e?r:t;++o1?n[t-1]:e;return o="function"==typeof o?(n.pop(),o):e,cl(n,o)}));function ml(e){var n=$t(e);return n.__chain__=!0,n}function yl(e,n){return n(e)}var wl=ra((function(n){var t=n.length,o=t?n[0]:0,r=this.__wrapped__,a=function(e){return io(e,n)};return!(t>1||this.__actions__.length)&&r instanceof Bt&&ba(o)?((r=r.slice(o,+o+(t?1:0))).__actions__.push({func:yl,args:[a],thisArg:e}),new Nt(r,this.__chain__).thru((function(n){return t&&!n.length&&n.push(e),n}))):this.thru(a)})),bl=Lr((function(e,n,t){Oe.call(e,t)?++e[t]:lo(e,t,1)})),_l=Mr(Ya),kl=Mr(Ga);function Il(e,n){return(Gl(e)?Tn:po)(e,ca(n,3))}function xl(e,n){return(Gl(e)?Cn:ho)(e,ca(n,3))}var Al=Lr((function(e,n,t){Oe.call(e,t)?e[t].push(n):lo(e,t,[n])})),Sl=Zo((function(e,n,t){var o=-1,r="function"==typeof n,a=Xl(e)?he(e.length):[];return po(e,(function(e){a[++o]=r?An(n,e,t):Do(e,n,t)})),a})),Tl=Lr((function(e,n,t){lo(e,t,n)}));function Cl(e,n){return(Gl(e)?Ln:$o)(e,ca(n,3))}var El=Lr((function(e,n,t){e[t?0:1].push(n)}),(function(){return[[],[]]})),Pl=Zo((function(e,n){if(null==e)return[];var t=n.length;return t>1&&_a(e,n[0],n[1])?n=[]:t>2&&_a(n[0],n[1],n[2])&&(n=[n[0]]),Ko(e,wo(n,1),[])})),zl=pn||function(){return gn.Date.now()};function Dl(n,t,o){return t=o?e:t,t=n&&null==t?n.length:t,Qr(n,s,e,e,e,e,t)}function Ll(n,o){var r;if("function"!=typeof o)throw new Pe(t);return n=wi(n),function(){return--n>0&&(r=o.apply(this,arguments)),n<=1&&(o=e),r}}var jl=Zo((function(e,n,t){var o=1;if(t.length){var r=ut(t,ua(jl));o|=l}return Qr(e,o,n,t,r)})),Fl=Zo((function(e,n,t){var o=3;if(t.length){var r=ut(t,ua(Fl));o|=l}return Qr(n,o,e,t,r)}));function Ol(n,o,r){var a,l,i,s,u,c,d=0,f=!1,g=!1,p=!0;if("function"!=typeof n)throw new Pe(t);function h(t){var o=a,r=l;return a=l=e,d=t,s=n.apply(r,o)}function v(e){return d=e,u=La(y,o),f?h(e):s}function m(n){var t=n-c;return c===e||t>=o||t<0||g&&n-d>=i}function y(){var e=zl();if(m(e))return w(e);u=La(y,function(e){var n=o-(e-c);return g?bt(n,i-(e-d)):n}(e))}function w(n){return u=e,p&&a?h(n):(a=l=e,s)}function b(){var n=zl(),t=m(n);if(a=arguments,l=this,c=n,t){if(u===e)return v(c);if(g)return xr(u),u=La(y,o),h(c)}return u===e&&(u=La(y,o)),s}return o=_i(o)||0,ai(r)&&(f=!!r.leading,i=(g="maxWait"in r)?wt(_i(r.maxWait)||0,o):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){u!==e&&xr(u),d=0,a=c=l=u=e},b.flush=function(){return u===e?s:w(zl())},b}var Rl=Zo((function(e,n){return fo(e,1,n)})),Ul=Zo((function(e,n,t){return fo(e,_i(n)||0,t)}));function Wl(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Pe(t);var o=function(){var t=arguments,r=n?n.apply(this,t):t[0],a=o.cache;if(a.has(r))return a.get(r);var l=e.apply(this,t);return o.cache=a.set(r,l)||a,l};return o.cache=new(Wl.Cache||Yt),o}function Ml(e){if("function"!=typeof e)throw new Pe(t);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}Wl.Cache=Yt;var $l=kr((function(e,n){var t=(n=1==n.length&&Gl(n[0])?Ln(n[0],Xn(ca())):Ln(wo(n,1),Xn(ca()))).length;return Zo((function(o){for(var r=-1,a=bt(o.length,t);++r=n})),Yl=Lo(function(){return arguments}())?Lo:function(e){return li(e)&&Oe.call(e,"callee")&&!Ge.call(e,"callee")},Gl=he.isArray,Jl=wn?Xn(wn):function(e){return li(e)&&To(e)==z};function Xl(e){return null!=e&&ri(e.length)&&!ti(e)}function Zl(e){return li(e)&&Xl(e)}var Ql=Kn||_s,ei=bn?Xn(bn):function(e){return li(e)&&To(e)==y};function ni(e){if(!li(e))return!1;var n=To(e);return n==w||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!ui(e)}function ti(e){if(!ai(e))return!1;var n=To(e);return n==b||n==_||"[object AsyncFunction]"==n||"[object Proxy]"==n}function oi(e){return"number"==typeof e&&e==wi(e)}function ri(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ai(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}function li(e){return null!=e&&"object"==typeof e}var ii=_n?Xn(_n):function(e){return li(e)&&va(e)==k};function si(e){return"number"==typeof e||li(e)&&To(e)==I}function ui(e){if(!li(e)||To(e)!=x)return!1;var n=qe(e);if(null===n)return!0;var t=Oe.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&Fe.call(t)==Me}var ci=kn?Xn(kn):function(e){return li(e)&&To(e)==S},di=In?Xn(In):function(e){return li(e)&&va(e)==T};function fi(e){return"string"==typeof e||!Gl(e)&&li(e)&&To(e)==C}function gi(e){return"symbol"==typeof e||li(e)&&To(e)==E}var pi=xn?Xn(xn):function(e){return li(e)&&ri(e.length)&&!!an[To(e)]},hi=Yr(Mo),vi=Yr((function(e,n){return e<=n}));function mi(e){if(!e)return[];if(Xl(e))return fi(e)?ft(e):zr(e);if(nn&&e[nn])return function(e){for(var n,t=[];!(n=e.next()).done;)t.push(n.value);return t}(e[nn]());var n=va(e);return(n==k?it:n==T?ct:Bi)(e)}function yi(e){return e?(e=_i(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function wi(e){var n=yi(e),t=n%1;return n==n?t?n-t:n:0}function bi(e){return e?so(wi(e),0,g):0}function _i(e){if("number"==typeof e)return e;if(gi(e))return f;if(ai(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=ai(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=Jn(e);var t=ve.test(e);return t||ye.test(e)?cn(e.slice(2),t?2:8):ge.test(e)?f:+e}function ki(e){return Dr(e,Ri(e))}function Ii(e){return null==e?"":dr(e)}var xi=jr((function(e,n){if(Aa(n)||Xl(n))Dr(n,Oi(n),e);else for(var t in n)Oe.call(n,t)&&to(e,t,n[t])})),Ai=jr((function(e,n){Dr(n,Ri(n),e)})),Si=jr((function(e,n,t,o){Dr(n,Ri(n),e,o)})),Ti=jr((function(e,n,t,o){Dr(n,Oi(n),e,o)})),Ci=ra(io),Ei=Zo((function(n,t){n=Te(n);var o=-1,r=t.length,a=r>2?t[2]:e;for(a&&_a(t[0],t[1],a)&&(r=1);++o1),n})),Dr(e,la(e),t),o&&(t=uo(t,7,ta));for(var r=n.length;r--;)gr(t,n[r]);return t})),$i=ra((function(e,n){return null==e?{}:function(e,n){return qo(e,n,(function(n,t){return Di(e,t)}))}(e,n)}));function Vi(e,n){if(null==e)return{};var t=Ln(la(e),(function(e){return[e]}));return n=ca(n),qo(e,t,(function(e,t){return n(e,t[0])}))}var Hi=Zr(Oi),Ni=Zr(Ri);function Bi(e){return null==e?[]:Zn(e,Oi(e))}var Ki=Ur((function(e,n,t){return n=n.toLowerCase(),e+(t?qi(n):n)}));function qi(e){return ns(Ii(e).toLowerCase())}function Yi(e){return(e=Ii(e))&&e.replace(be,ot).replace(Ze,"")}var Gi=Ur((function(e,n,t){return e+(t?"-":"")+n.toLowerCase()})),Ji=Ur((function(e,n,t){return e+(t?" ":"")+n.toLowerCase()})),Xi=Rr("toLowerCase"),Zi=Ur((function(e,n,t){return e+(t?"_":"")+n.toLowerCase()})),Qi=Ur((function(e,n,t){return e+(t?" ":"")+ns(n)})),es=Ur((function(e,n,t){return e+(t?" ":"")+n.toUpperCase()})),ns=Rr("toUpperCase");function ts(n,t,o){return n=Ii(n),(t=o?e:t)===e?function(e){return tn.test(e)}(n)?function(e){return e.match(en)||[]}(n):function(e){return e.match(se)||[]}(n):n.match(t)||[]}var os=Zo((function(n,t){try{return An(n,e,t)}catch(o){return ni(o)?o:new xe(o)}})),rs=ra((function(e,n){return Tn(n,(function(n){n=Va(n),lo(e,n,jl(e[n],e))})),e}));function as(e){return function(){return e}}var ls=$r(),is=$r(!0);function ss(e){return e}function us(e){return Ro("function"==typeof e?e:uo(e,1))}var cs=Zo((function(e,n){return function(t){return Do(t,e,n)}})),ds=Zo((function(e,n){return function(t){return Do(e,t,n)}}));function fs(e,n,t){var o=Oi(n),r=xo(n,o);null!=t||ai(n)&&(r.length||!o.length)||(t=n,n=e,e=this,r=xo(n,Oi(n)));var a=!(ai(t)&&"chain"in t&&!t.chain),l=ti(e);return Tn(r,(function(t){var o=n[t];e[t]=o,l&&(e.prototype[t]=function(){var n=this.__chain__;if(a||n){var t=e(this.__wrapped__),r=t.__actions__=zr(this.__actions__);return r.push({func:o,args:arguments,thisArg:e}),t.__chain__=n,t}return o.apply(e,jn([this.value()],arguments))})})),e}function gs(){}var ps=Br(Ln),hs=Br(En),vs=Br(Rn);function ms(e){return ka(e)?Bn(Va(e)):function(e){return function(n){return Ao(n,e)}}(e)}var ys=qr(),ws=qr(!0);function bs(){return[]}function _s(){return!1}var ks,Is=Nr((function(e,n){return e+n}),0),xs=Jr("ceil"),As=Nr((function(e,n){return e/n}),1),Ss=Jr("floor"),Ts=Nr((function(e,n){return e*n}),1),Cs=Jr("round"),Es=Nr((function(e,n){return e-n}),0);return $t.after=function(e,n){if("function"!=typeof n)throw new Pe(t);return e=wi(e),function(){if(--e<1)return n.apply(this,arguments)}},$t.ary=Dl,$t.assign=xi,$t.assignIn=Ai,$t.assignInWith=Si,$t.assignWith=Ti,$t.at=Ci,$t.before=Ll,$t.bind=jl,$t.bindAll=rs,$t.bindKey=Fl,$t.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gl(e)?e:[e]},$t.chain=ml,$t.chunk=function(n,t,o){t=(o?_a(n,t,o):t===e)?1:wt(wi(t),0);var r=null==n?0:n.length;if(!r||t<1)return[];for(var a=0,l=0,i=he(mn(r/t));aa?0:a+o),(r=r===e||r>a?a:wi(r))<0&&(r+=a),r=o>r?0:bi(r);o>>0)?(n=Ii(n))&&("string"==typeof t||null!=t&&!ci(t))&&!(t=dr(t))&<(n)?Ir(ft(n),0,o):n.split(t,o):[]},$t.spread=function(e,n){if("function"!=typeof e)throw new Pe(t);return n=null==n?0:wt(wi(n),0),Zo((function(t){var o=t[n],r=Ir(t,0,n);return o&&jn(r,o),An(e,this,r)}))},$t.tail=function(e){var n=null==e?0:e.length;return n?ar(e,1,n):[]},$t.take=function(n,t,o){return n&&n.length?ar(n,0,(t=o||t===e?1:wi(t))<0?0:t):[]},$t.takeRight=function(n,t,o){var r=null==n?0:n.length;return r?ar(n,(t=r-(t=o||t===e?1:wi(t)))<0?0:t,r):[]},$t.takeRightWhile=function(e,n){return e&&e.length?hr(e,ca(n,3),!1,!0):[]},$t.takeWhile=function(e,n){return e&&e.length?hr(e,ca(n,3)):[]},$t.tap=function(e,n){return n(e),e},$t.throttle=function(e,n,o){var r=!0,a=!0;if("function"!=typeof e)throw new Pe(t);return ai(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),Ol(e,n,{leading:r,maxWait:n,trailing:a})},$t.thru=yl,$t.toArray=mi,$t.toPairs=Hi,$t.toPairsIn=Ni,$t.toPath=function(e){return Gl(e)?Ln(e,Va):gi(e)?[e]:zr($a(Ii(e)))},$t.toPlainObject=ki,$t.transform=function(e,n,t){var o=Gl(e),r=o||Ql(e)||pi(e);if(n=ca(n,4),null==t){var a=e&&e.constructor;t=r?o?new a:[]:ai(e)&&ti(a)?Vt(qe(e)):{}}return(r?Tn:ko)(e,(function(e,o,r){return n(t,e,o,r)})),t},$t.unary=function(e){return Dl(e,1)},$t.union=ll,$t.unionBy=il,$t.unionWith=sl,$t.uniq=function(e){return e&&e.length?fr(e):[]},$t.uniqBy=function(e,n){return e&&e.length?fr(e,ca(n,2)):[]},$t.uniqWith=function(n,t){return t="function"==typeof t?t:e,n&&n.length?fr(n,e,t):[]},$t.unset=function(e,n){return null==e||gr(e,n)},$t.unzip=ul,$t.unzipWith=cl,$t.update=function(e,n,t){return null==e?e:pr(e,n,br(t))},$t.updateWith=function(n,t,o,r){return r="function"==typeof r?r:e,null==n?n:pr(n,t,br(o),r)},$t.values=Bi,$t.valuesIn=function(e){return null==e?[]:Zn(e,Ri(e))},$t.without=dl,$t.words=ts,$t.wrap=function(e,n){return Vl(br(n),e)},$t.xor=fl,$t.xorBy=gl,$t.xorWith=pl,$t.zip=hl,$t.zipObject=function(e,n){return yr(e||[],n||[],to)},$t.zipObjectDeep=function(e,n){return yr(e||[],n||[],nr)},$t.zipWith=vl,$t.entries=Hi,$t.entriesIn=Ni,$t.extend=Ai,$t.extendWith=Si,fs($t,$t),$t.add=Is,$t.attempt=os,$t.camelCase=Ki,$t.capitalize=qi,$t.ceil=xs,$t.clamp=function(n,t,o){return o===e&&(o=t,t=e),o!==e&&(o=(o=_i(o))==o?o:0),t!==e&&(t=(t=_i(t))==t?t:0),so(_i(n),t,o)},$t.clone=function(e){return uo(e,4)},$t.cloneDeep=function(e){return uo(e,5)},$t.cloneDeepWith=function(n,t){return uo(n,5,t="function"==typeof t?t:e)},$t.cloneWith=function(n,t){return uo(n,4,t="function"==typeof t?t:e)},$t.conformsTo=function(e,n){return null==n||co(e,n,Oi(n))},$t.deburr=Yi,$t.defaultTo=function(e,n){return null==e||e!=e?n:e},$t.divide=As,$t.endsWith=function(n,t,o){n=Ii(n),t=dr(t);var r=n.length,a=o=o===e?r:so(wi(o),0,r);return(o-=t.length)>=0&&n.slice(o,a)==t},$t.eq=Bl,$t.escape=function(e){return(e=Ii(e))&&Y.test(e)?e.replace(K,rt):e},$t.escapeRegExp=function(e){return(e=Ii(e))&&te.test(e)?e.replace(ne,"\\$&"):e},$t.every=function(n,t,o){var r=Gl(n)?En:vo;return o&&_a(n,t,o)&&(t=e),r(n,ca(t,3))},$t.find=_l,$t.findIndex=Ya,$t.findKey=function(e,n){return Wn(e,ca(n,3),ko)},$t.findLast=kl,$t.findLastIndex=Ga,$t.findLastKey=function(e,n){return Wn(e,ca(n,3),Io)},$t.floor=Ss,$t.forEach=Il,$t.forEachRight=xl,$t.forIn=function(e,n){return null==e?e:bo(e,ca(n,3),Ri)},$t.forInRight=function(e,n){return null==e?e:_o(e,ca(n,3),Ri)},$t.forOwn=function(e,n){return e&&ko(e,ca(n,3))},$t.forOwnRight=function(e,n){return e&&Io(e,ca(n,3))},$t.get=zi,$t.gt=Kl,$t.gte=ql,$t.has=function(e,n){return null!=e&&ma(e,n,Eo)},$t.hasIn=Di,$t.head=Xa,$t.identity=ss,$t.includes=function(e,n,t,o){e=Xl(e)?e:Bi(e),t=t&&!o?wi(t):0;var r=e.length;return t<0&&(t=wt(r+t,0)),fi(e)?t<=r&&e.indexOf(n,t)>-1:!!r&&$n(e,n,t)>-1},$t.indexOf=function(e,n,t){var o=null==e?0:e.length;if(!o)return-1;var r=null==t?0:wi(t);return r<0&&(r=wt(o+r,0)),$n(e,n,r)},$t.inRange=function(n,t,o){return t=yi(t),o===e?(o=t,t=0):o=yi(o),function(e,n,t){return e>=bt(n,t)&&e=-9007199254740991&&e<=d},$t.isSet=di,$t.isString=fi,$t.isSymbol=gi,$t.isTypedArray=pi,$t.isUndefined=function(n){return n===e},$t.isWeakMap=function(e){return li(e)&&va(e)==P},$t.isWeakSet=function(e){return li(e)&&"[object WeakSet]"==To(e)},$t.join=function(e,n){return null==e?"":mt.call(e,n)},$t.kebabCase=Gi,$t.last=nl,$t.lastIndexOf=function(n,t,o){var r=null==n?0:n.length;if(!r)return-1;var a=r;return o!==e&&(a=(a=wi(o))<0?wt(r+a,0):bt(a,r-1)),t==t?function(e,n,t){for(var o=t+1;o--;)if(e[o]===n)return o;return o}(n,t,a):Mn(n,Hn,a,!0)},$t.lowerCase=Ji,$t.lowerFirst=Xi,$t.lt=hi,$t.lte=vi,$t.max=function(n){return n&&n.length?mo(n,ss,Co):e},$t.maxBy=function(n,t){return n&&n.length?mo(n,ca(t,2),Co):e},$t.mean=function(e){return Nn(e,ss)},$t.meanBy=function(e,n){return Nn(e,ca(n,2))},$t.min=function(n){return n&&n.length?mo(n,ss,Mo):e},$t.minBy=function(n,t){return n&&n.length?mo(n,ca(t,2),Mo):e},$t.stubArray=bs,$t.stubFalse=_s,$t.stubObject=function(){return{}},$t.stubString=function(){return""},$t.stubTrue=function(){return!0},$t.multiply=Ts,$t.nth=function(n,t){return n&&n.length?Bo(n,wi(t)):e},$t.noConflict=function(){return gn._===this&&(gn._=$e),this},$t.noop=gs,$t.now=zl,$t.pad=function(e,n,t){e=Ii(e);var o=(n=wi(n))?dt(e):0;if(!n||o>=n)return e;var r=(n-o)/2;return Kr(yn(r),t)+e+Kr(mn(r),t)},$t.padEnd=function(e,n,t){e=Ii(e);var o=(n=wi(n))?dt(e):0;return n&&ot){var r=n;n=t,t=r}if(o||n%1||t%1){var a=It();return bt(n+a*(t-n+un("1e-"+((a+"").length-1))),t)}return Jo(n,t)},$t.reduce=function(e,n,t){var o=Gl(e)?Fn:qn,r=arguments.length<3;return o(e,ca(n,4),t,r,po)},$t.reduceRight=function(e,n,t){var o=Gl(e)?On:qn,r=arguments.length<3;return o(e,ca(n,4),t,r,ho)},$t.repeat=function(n,t,o){return t=(o?_a(n,t,o):t===e)?1:wi(t),Xo(Ii(n),t)},$t.replace=function(){var e=arguments,n=Ii(e[0]);return e.length<3?n:n.replace(e[1],e[2])},$t.result=function(n,t,o){var r=-1,a=(t=_r(t,n)).length;for(a||(a=1,n=e);++rd)return[];var t=g,o=bt(e,g);n=ca(n),e-=g;for(var r=Gn(o,n);++t=l)return n;var s=o-dt(r);if(s<1)return r;var u=i?Ir(i,0,s).join(""):n.slice(0,s);if(a===e)return u+r;if(i&&(s+=u.length-s),ci(a)){if(n.slice(s).search(a)){var c,d=u;for(a.global||(a=Ce(a.source,Ii(fe.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var f=c.index;u=u.slice(0,f===e?s:f)}}else if(n.indexOf(dr(a),s)!=s){var g=u.lastIndexOf(a);g>-1&&(u=u.slice(0,g))}return u+r},$t.unescape=function(e){return(e=Ii(e))&&q.test(e)?e.replace(B,pt):e},$t.uniqueId=function(e){var n=++Re;return Ii(e)+n},$t.upperCase=es,$t.upperFirst=ns,$t.each=Il,$t.eachRight=xl,$t.first=Xa,fs($t,(ks={},ko($t,(function(e,n){Oe.call($t.prototype,n)||(ks[n]=e)})),ks),{chain:!1}),$t.VERSION="4.17.21",Tn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$t[e].placeholder=$t})),Tn(["drop","take"],(function(n,t){Bt.prototype[n]=function(o){o=o===e?1:wt(wi(o),0);var r=this.__filtered__&&!t?new Bt(this):this.clone();return r.__filtered__?r.__takeCount__=bt(o,r.__takeCount__):r.__views__.push({size:bt(o,g),type:n+(r.__dir__<0?"Right":"")}),r},Bt.prototype[n+"Right"]=function(e){return this.reverse()[n](e).reverse()}})),Tn(["filter","map","takeWhile"],(function(e,n){var t=n+1,o=1==t||3==t;Bt.prototype[e]=function(e){var n=this.clone();return n.__iteratees__.push({iteratee:ca(e,3),type:t}),n.__filtered__=n.__filtered__||o,n}})),Tn(["head","last"],(function(e,n){var t="take"+(n?"Right":"");Bt.prototype[e]=function(){return this[t](1).value()[0]}})),Tn(["initial","tail"],(function(e,n){var t="drop"+(n?"":"Right");Bt.prototype[e]=function(){return this.__filtered__?new Bt(this):this[t](1)}})),Bt.prototype.compact=function(){return this.filter(ss)},Bt.prototype.find=function(e){return this.filter(e).head()},Bt.prototype.findLast=function(e){return this.reverse().find(e)},Bt.prototype.invokeMap=Zo((function(e,n){return"function"==typeof e?new Bt(this):this.map((function(t){return Do(t,e,n)}))})),Bt.prototype.reject=function(e){return this.filter(Ml(ca(e)))},Bt.prototype.slice=function(n,t){n=wi(n);var o=this;return o.__filtered__&&(n>0||t<0)?new Bt(o):(n<0?o=o.takeRight(-n):n&&(o=o.drop(n)),t!==e&&(o=(t=wi(t))<0?o.dropRight(-t):o.take(t-n)),o)},Bt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Bt.prototype.toArray=function(){return this.take(g)},ko(Bt.prototype,(function(n,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=$t[r?"take"+("last"==t?"Right":""):t],l=r||/^find/.test(t);a&&($t.prototype[t]=function(){var t=this.__wrapped__,i=r?[1]:arguments,s=t instanceof Bt,u=i[0],c=s||Gl(t),d=function(e){var n=a.apply($t,jn([e],i));return r&&f?n[0]:n};c&&o&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,g=!!this.__actions__.length,p=l&&!f,h=s&&!g;if(!l&&c){t=h?t:new Bt(this);var v=n.apply(t,i);return v.__actions__.push({func:yl,args:[d],thisArg:e}),new Nt(v,f)}return p&&h?n.apply(this,i):(v=this.thru(d),p?r?v.value()[0]:v.value():v)})})),Tn(["pop","push","shift","sort","splice","unshift"],(function(e){var n=ze[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);$t.prototype[e]=function(){var e=arguments;if(o&&!this.__chain__){var r=this.value();return n.apply(Gl(r)?r:[],e)}return this[t]((function(t){return n.apply(Gl(t)?t:[],e)}))}})),ko(Bt.prototype,(function(e,n){var t=$t[n];if(t){var o=t.name+"";Oe.call(Dt,o)||(Dt[o]=[]),Dt[o].push({name:n,func:t})}})),Dt[Vr(e,2).name]=[{name:"wrapper",func:e}],Bt.prototype.clone=function(){var e=new Bt(this.__wrapped__);return e.__actions__=zr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=zr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=zr(this.__views__),e},Bt.prototype.reverse=function(){if(this.__filtered__){var e=new Bt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Bt.prototype.value=function(){var e=this.__wrapped__.value(),n=this.__dir__,t=Gl(e),o=n<0,r=t?e.length:0,a=function(e,n,t){for(var o=-1,r=t.length;++o=this.__values__.length;return{done:n,value:n?e:this.__values__[this.__index__++]}},$t.prototype.plant=function(n){for(var t,o=this;o instanceof Ht;){var r=Na(o);r.__index__=0,r.__values__=e,t?a.__wrapped__=r:t=r;var a=r;o=o.__wrapped__}return a.__wrapped__=n,t},$t.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),(t=t.reverse()).__actions__.push({func:yl,args:[al],thisArg:e}),new Nt(t,this.__chain__)}return this.thru(al)},$t.prototype.toJSON=$t.prototype.valueOf=$t.prototype.value=function(){return vr(this.__wrapped__,this.__actions__)},$t.prototype.first=$t.prototype.head,nn&&($t.prototype[nn]=function(){return this}),$t}();hn?((hn.exports=ht)._=ht,pn._=ht):gn._=ht}.call(n);var me=ve.exports,ye="/aixiaocaishen/static/images/主力作战-a51cdcde.png",we="/aixiaocaishen/static/images/攻防三维-7988c82b.png",be="/aixiaocaishen/static/images/综合作战-687fb8d6.png";const _e={class:"chat-container"},ke={class:"gif-area"},Ie=["src"],xe=["src"],Ae={key:0,class:"user-message-container"},Se={class:"user-msg"},Te={class:"user-content"},Ce=["src","onClick"],Ee=["innerHTML"],Pe={key:0,class:"user-sendTime"},ze={key:0,class:"kline-container"},De=["id"],Le={key:0,class:"no-data-message"},je={key:1,class:"ai-message-container"},Fe=["src"],Oe={key:0},Re=["innerHTML"],Ue={key:2,style:{display:"flex",width:"100%"}},We={class:"mainTitle"},Me={class:"date"},$e={key:3,class:"title2"},Ve=["src"],He={key:4,class:"title3"},Ne=["src"],Be={key:5,class:"content1"},Ke={key:0,class:"kline-container content1chart"},qe=["id"],Ye={key:0,class:"no-data-message"},Ge={key:1,class:"content1Text"},Je=["innerHTML"],Xe={key:6,class:"content2"},Ze={class:"kline-container content2chart"},Qe=["id"],en={key:0,class:"no-data-message"},nn={key:7,class:"content3"},tn={class:"content3Text"},on=["innerHTML"],rn={key:8,class:"mianze"},an=["innerHTML"],ln=["innerHTML"];var sn=t({__name:"AIchat",props:{messages:Array,chartData:{type:Object,default:null},index:{type:Number,required:!0}},emits:["updateMessage","sendMessage","enableInput"],setup(e,{emit:n}){const t=J(),C=ge(),E=X(),P=o([]),z=o(!1);let D=0,L=!1;const j={one:{loaded:!1,url:null},two:{loaded:!1,url:null},three:{loaded:!1,url:null},four:{loaded:!1,url:null}},F={"API1-第一个":1,"API2-第二个":2,"API3-第三个":3,"API4-第四个":4},O=()=>{if(L)return void console.log("playNextAudio已在执行中,跳过重复调用");if(D>=P.value.length)return console.log("所有音频播放完成,重置到第一个音频 currentPlayIndex",D),D=0,C.isPlaying=!1,C.isPaused=!1,C.playbackPosition=0,C.soundInstance=null,C.nowSound=null,void(P.value.length>0&&C.setCurrentAudioUrl(P.value[0]));L=!0;const e=P.value[D];if(!e||!e.url)return console.warn(`音频信息无效,跳过索引 ${D}`),D++,L=!1,void O();console.log(`开始播放 ${e.name},索引: ${D}`);const n=new Q.Howl({src:[e.url],html5:!1,format:["mp3","acc"],retryCount:0,onplay:()=>{C.isPlaying=!0,z.value=!0,L=!1,console.log(`${e.name}音频开始播放111`)},onpause:()=>{C.isPlaying=!1,C.isPaused=!0,C.playbackPosition=n.seek()||0,console.log(`${e.name}音频已暂停`)},onresume:()=>{C.isPlaying=!0,C.isPaused=!1,console.log(`${e.name}音频继续播放`)},onend:()=>{console.log(`${e.name}音频播放完成,准备播放下一个`),C.isPlaying=!1,C.isPaused=!1,C.playbackPosition=0,z.value=!1,D++,console.log("currentPlayIndex",D,"audioQueue.value.length",P.value.length),D{L=!1,O()}),200)):(console.log("🎉 所有音频播放完成,清除音频实例"),t.messages[t.currentUserIndex].audioStatus=!1,C.nowSound=null,C.soundInstance=null,L=!1)},onstop:()=>{console.log(`${e.name}音频被停止`),C.isPlaying=!1,C.isPaused=!1,C.playbackPosition=0},onloaderror:(n,t)=>{console.error(`${e.name}音频播放失败:`,t),z.value=!1,L=!1,setTimeout((()=>{O()}),100)}});C.setCurrentAudioUrl(e.url),C.nowSound=n,C.setAudioInstance(n),console.log(`尝试播放${e.name}音频`),n.play()},R=(e,n)=>{if(console.log("=== 添加音频到队列 ==="),console.log("URL:",e),console.log("Name:",n),console.log("音频启用状态:",C.isVoiceEnabled),e&&C.isVoiceEnabled){const t={url:e,name:n,order:F[n]||999};P.value.push(t),P.value.sort(((e,n)=>e.order-n.order)),console.log(`音频${n}已添加到播放队列,顺序:${t.order}`),console.log("当前队列顺序:",P.value.map((e=>`${e.name}(${e.order})`))),z.value||C.isPlaying||1!==P.value.length?console.log("⏳ 等待条件:",{isPlayingAudio:z.value,audioStoreIsPlaying:C.isPlaying,queueLength:P.value.length,reason:P.value.length>1?"队列中已有其他音频":"有音频正在播放"}):(console.log("✅ 条件满足:没有音频在播放且这是第一个音频,立即开始播放",{isPlayingAudio:z.value,audioStoreIsPlaying:C.isPlaying,queueLength:P.value.length}),O())}else console.log("❌ 跳过添加音频:",{hasUrl:!!e,voiceEnabled:C.isVoiceEnabled});console.log("=== 添加音频完成 ===")};r((()=>C.isVoiceEnabled)),o("");const U=new Z.Renderer;U.del=function(e){return console.log("text",e),"~"+e.tokens[0].raw+"
"+e.tokens[2].raw+"~"};const W=n,M=r((()=>t.messages)),$=e;o(""),o(!1);const V=e=>{const n=e.YaLiZhiChengLuoPan;let t=o(5.5);const r=n.Yali,a=n.ZhiCheng;return console.log("yl",r,"zc",a),"较大"==r&&"较弱"==a?t.value=.5:"一般"==r&&"较弱"==a?t.value=1.5:"较弱"==r&&"较弱"==a?t.value=2.5:"较大"==r&&"较大"==a?t.value=3.5:"一般"==r&&"较大"==a?t.value=4.5:"较弱"==r&&"较大"==a?t.value=5.5:"较大"==r&&"一般"==a?t.value=.2:"一般"==r&&"一般"==a?t.value=3:"较弱"==r&&"一般"==a&&(t.value=5.8),t.value},H=o([]),N=o(!1),B=(e,n,o)=>new Promise((r=>{if(t.messages.push(e),Array.isArray(n)&&n.length>0){e.content="",e.isTyping=!0;let a=0;const l=()=>{if(a>=n.length)return e.isEnd&&("1"==e.isEnd?K.one.isEnd=!0:"2"==e.isEnd?K.two.isEnd=!0:"3"==e.isEnd?K.three.isEnd=!0:"4"==e.isEnd&&(K.four.isEnd=!0)),e.error&&(t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"),"2"==e.error?K.two.isError=!0:"3"==e.error?K.three.isError=!0:"4"==e.error&&(K.four.isError=!0)),e.end&&(t.getUserCount(),t.isLoading=!1,console.log("打印完毕,接触输入框禁用状态"),t.chatInput=!1,W("enableInput")),e.isTyping=!1,void p((()=>{r()}));if(a%2==0)e.content+=n[a],a++,l();else{const t=n[a];let r=0;const i=setInterval((()=>{r{console.log("nextTick开始 - 准备渲染图表"),console.log("消息列表:",t.messages);let n=-1;for(let o=0;o{console.log("延时执行,确保DOM已渲染"),se(e)}),100)}else console.warn("未找到K线消息")}))):(console.log("K线消息已添加到聊天列表"),p((()=>{console.log("nextTick开始 - 准备渲染图表"),console.log("消息列表:",t.messages);let n=-1;for(let o=0;o{console.log("延时执行,确保DOM已渲染"),se(e)}),100)}else console.warn("未找到K线消息")}))),e.isEnd&&("1"==e.isEnd?K.one.isEnd=!0:"2"==e.isEnd?K.two.isEnd=!0:"3"==e.isEnd?K.three.isEnd=!0:"4"==e.isEnd&&(K.four.isEnd=!0)),e.error&&(t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"),"2"==e.error?K.two.isError=!0:"3"==e.error?K.three.isError=!0:"4"==e.error&&(K.four.isError=!0)),setTimeout((()=>{r()}),1e3)):(e.isEnd&&("1"==e.isEnd?K.one.isEnd=!0:"2"==e.isEnd?K.two.isEnd=!0:"3"==e.isEnd?K.three.isEnd=!0:"4"==e.isEnd&&(K.four.isEnd=!0)),e.error&&(t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"),"2"==e.error?K.two.isError=!0:"3"==e.error?K.three.isError=!0:"4"==e.error&&(K.four.isError=!0)),setTimeout((()=>{r()}),1e3))}));let K={};const q=(e,n,t)=>{H.value.push({message:e,content:n,speed:t}),(async()=>{if(!N.value&&0!==H.value.length){for(N.value=!0;H.value.length>0;){const e=H.value.shift();await B(e.message,e.content,e.speed)}N.value=!1}})()};const Y=o(!1),ae={},le=o(0);function se(e){const n=t.messages;let r=-1,a=null;r=e.split("-")[2],n[r].kline&&n[r].chartData&&(a=n[r].chartData);var l={};const i=window.innerWidth<768,s=window.innerWidth>=768&&window.innerWidth<1024;if(console.log("KLine渲染: 设备类型",i?"移动设备":s?"平板设备":"桌面设备"),1==n[r].klineType){if(!a)return;const n=document.getElementById(e);if(!n)return;try{ae[e]&&(ae[e].dispose(),delete ae[e]),ae[e]=ue.init(n)}catch(h){return}const t=o("六色罗盘"),r=o(16);window.innerWidth>768&&(r.value=25),l={tooltip:{show:!1},series:[{name:"仪表盘",type:"gauge",center:["50%","50%"],radius:window.innerWidth>768?"90%":"70%",startAngle:140,endAngle:-140,min:0,max:6,precision:0,splitNumber:30,axisLine:{show:!0,lineStyle:{color:[[.17,"#FC4407"],[.33,"#FDC404"],[.5,"#2D8FFD"],[.67,"#87CCE7"],[.83,"#C1F478"],[1,"#8FEB8D"]],width:20}},axisTick:{show:!0,splitNumber:9,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,formatter:function(e){},textStyle:{color:"auto"}},splitLine:{show:!0,length:20,lineStyle:{color:"#eee",width:2,type:"solid"}},pointer:{length:"80%",width:8,color:"auto"},title:{show:!0,offsetCenter:["-65%",-10],textStyle:{color:"#333",fontSize:15}},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:40,offsetCenter:["-90%",0],formatter:function(){return t.value},textStyle:{color:"auto",fontSize:r.value}},data:[{value:a}]}]}}else if(2==n[r].klineType){let n=function(e){let n=[];e.forEach(((e,t)=>{n.push({date:e[0],value:e[1],type:e[2]})}));let t=[{min:0,max:0,color:"#000"}],o=[{min:0,max:0,color:"#000"}],r=[{min:0,max:0,color:"#000"}];for(let s=1;s{const o=[e.date,e.value];0===e.type?(a.push(o),l.push([e.date,"-"]),i.push([e.date,"-"]),e.isTransitionGreen?a[a.length-1]=[n[t].date,n[t].value]:e.isTransitionRed?l[l.length-1]=[n[t].date,n[t].value]:e.isTransitionYellow&&(i[i.length-1]=[n[t].date,n[t].value])):1===e.type?(l.push(o),a.push([e.date,"-"]),i.push([e.date,"-"]),e.isTransitionGreen?a[a.length-1]=[n[t].date,n[t].value]:e.isTransitionRed?l[l.length-1]=[n[t].date,n[t].value]:e.isTransitionYellow&&(i[i.length-1]=[n[t].date,n[t].value])):2===e.type&&(l.push([e.date,"-"]),a.push([e.date,"-"]),i.push(o),e.isTransitionGreen?a[a.length-1]=[n[t].date,n[t].value]:e.isTransitionRed?l[l.length-1]=[n[t].date,n[t].value]:e.isTransitionYellow&&(i[i.length-1]=[n[t].date,n[t].value]))})),{greenData:a,redData:l,yellowData:i,singleTypeGreen:r,singleTypeRed:t,singleTypeYellow:o}};if(!a||!a.Kline)return;const t=document.getElementById(e);if(!t)return;try{ae[e]&&(ae[e].dispose(),delete ae[e]),ae[e]=ue.init(t)}catch(h){return}const r=a.Kline,i=e=>{const n=[];let t=[];for(let o=0;o{e&&e.map((e=>{n.map((n=>{1==e[1]&&e[0]==n[0]&&(s.push(n),v.push([n[0],null,null,null,null,null,null,null]),m.push([n[0],null,null,null,null,null,null,null]),y.push([n[0],null,null,null,null,null,null,null])),2==e[1]&&e[0]==n[0]&&(v.push(n),s.push([n[0],null,null,null,null,null,null,null]),m.push([n[0],null,null,null,null,null,null,null]),y.push([n[0],null,null,null,null,null,null,null])),3==e[1]&&e[0]==n[0]&&(m.push(n),v.push([n[0],null,null,null,null,null,null,null]),s.push([n[0],null,null,null,null,null,null,null]),y.push([n[0],null,null,null,null,null,null,null])),4==e[1]&&e[0]==n[0]&&(y.push(n),v.push([n[0],null,null,null,null,null,null,null]),m.push([n[0],null,null,null,null,null,null,null]),s.push([n[0],null,null,null,null,null,null,null]))}))}))};console.log(s,v,m,y),w(r.QSXH,r.KLine20);var u=i(r.KLine20),c=i(s),d=i(v),f=i(m),g=i(y),p=r.JN;const b=n(r.FCX),_=n(r.DNC);"-1"==r.FCX[0][1]&&(b.greenData=[],b.redData=[],b.yellowData=[]);const k=e=>{const n=[],t=[];return e.forEach((e=>{let o;switch(e[4]){case 1:o="#13E113";break;case 2:o="#FF0E00";break;case 3:o="#0000FE";break;case 4:o="#1397FF"}n.push({value:e[5],itemStyle:{normal:{color:o}}}),1===e[1]&&t.push({coord:[e[0],e[5]],symbol:"image://https://d31zlh4on95l9h.cloudfront.net/images/5iujb101000d5si3v3hr7w2vg0h43z1u.png",symbolSize:[30,30],label:{normal:{color:"rgba(0, 0, 0, 0)"}}}),1===e[2]&&t.push({coord:[e[0],e[5]/2],symbol:"image://https://d31zlh4on95l9h.cloudfront.net/images/5iujaz01000d5si016bxdf6vh0377d2h.png",symbolSize:[30,30],label:{normal:{color:"rgba(0, 0, 0, 0)"}}}),1===e[3]&&t.push({coord:[e[0],0],symbol:"image://https://d31zlh4on95l9h.cloudfront.net/images/5iujb001000d5shzls0tmd4vs0e5tdrw.png",symbolSize:[30,30],label:{normal:{color:"rgba(0, 0, 0, 0)"}}})})),{barData:n,markPointData:t}},{barData:I,markPointData:x}=k(p);l={legend:[{textStyle:{color:"black",fontSize:window.innerWidth>768?12:9},width:"100%",top:window.innerWidth>768?"5%":"4%",left:"center",itemGap:window.innerWidth>768?20:10,itemWidth:10,itemHeight:10,data:[{name:"进攻K线",itemStyle:{color:"rgb(255,0,0)"}},{name:"防守K线",itemStyle:{color:"red"}},{name:"推进K线",itemStyle:{color:"orange"}},{name:"撤退K线",itemStyle:{color:"rgb(84,252,252)"}}]},{textStyle:{color:"black",fontSize:window.innerWidth>768?12:9},orient:"horizontal",top:window.innerWidth>768?"8%":"7%",width:"100%",left:"center",itemGap:15,data:[{name:"{green|━}{red|━} 牵牛绳",icon:"none",textStyle:{rich:{green:{color:"green",fontSize:window.innerWidth>768?12:9},red:{color:"red",fontSize:window.innerWidth>768?12:9}}}},{name:"龙线"},{name:"虫线"}]},{textStyle:{color:"black",fontSize:window.innerWidth>768?12:9},orient:"horizontal",top:window.innerWidth>768?"62%":"60%",width:"100%",left:"center",itemGap:15,data:[{name:"{green|━}{red|━} 度牛尺",icon:"none",textStyle:{rich:{green:{color:"green",fontSize:window.innerWidth>768?12:9},red:{color:"red",fontSize:window.innerWidth>768?12:9}}}}]}],tooltip:{formatter:function(e,n,t){var r,a;if(0==e[0].seriesIndex){const n=o([]),t=o([]);return n.value=(null==(r=e.find((e=>e.data[1])))?void 0:r.data)||[],t.value=(null==(a=e.slice(4).find((e=>"-"!==e.data[1])))?void 0:a.data)||[],e[0].name+"
开盘价:"+n.value[1]+"
收盘价:"+n.value[2]+"
最低价:"+n.value[3]+"
最高价:"+n.value[4]+"
牵牛绳:"+t.value[1]}if(4==e[0].seriesIndex){let n;return n=e[0].data.value>=1e4?(e[0].data.value/1e4).toFixed(2)+"w":e[0].data.value,e[0].name+"
成交量:"+n}if([10,11,12].includes(e[0].seriesIndex)){const n=e.find((e=>e.data&&"-"!==e.data[1]));return n?e[0].axisValue+"
度牛尺:"+n.data[1]:null}},trigger:"axis",axisPointer:{type:"cross"},backgroundColor:"rgba(119, 120, 125, 0.6)",borderWidth:1,borderColor:"#77787D",padding:10,textStyle:{color:"#fff"}},axisPointer:{link:[{xAxisIndex:"all"}],label:{backgroundColor:"#77787D"}},toolbox:{show:!1},grid:[{top:window.innerWidth>768?"12%":"10%",left:window.innerWidth>1024?"14%":window.innerWidth>768?"18%":window.innerWidth>375?"20%":"22%",right:window.innerWidth>1024?"9%":window.innerWidth>768?"12%":"14%",height:window.innerWidth>768?"27%":"29%",containLabel:!1},{top:(window.innerWidth,"42%"),left:window.innerWidth>1024?"14%":window.innerWidth>768?"18%":window.innerWidth>375?"20%":"22%",right:window.innerWidth>1024?"9%":window.innerWidth>768?"12%":"14%",height:window.innerWidth>768?"20%":"18%",containLabel:!1},{top:window.innerWidth>768?"66%":"64%",left:window.innerWidth>1024?"14%":window.innerWidth>768?"18%":window.innerWidth>375?"20%":"22%",right:window.innerWidth>1024?"9%":window.innerWidth>768?"12%":"14%",height:window.innerWidth>768?"20%":"22%",containLabel:!1}],xAxis:[{type:"category",data:u.categoryData,boundaryGap:!0,axisLine:{onZero:!1},splitLine:{show:!1},min:"dataMin",max:"dataMax",axisPointer:{z:100},axisLine:{lineStyle:{color:"black"}},axisLabel:{show:!1},axisTick:{show:!1}},{type:"category",gridIndex:1,data:u.categoryData,boundaryGap:!0,axisLine:{lineStyle:{color:"black"}},axisLabel:{show:!1,interval:"auto"}},{type:"category",gridIndex:2,data:u.categoryData,boundaryGap:!0,axisLine:{lineStyle:{color:"black"}},axisLabel:{show:!0,interval:"auto",fontSize:window.innerWidth>768?12:9}}],yAxis:[{scale:!0,gridIndex:0,position:"left",axisLabel:{inside:!1,align:"right",fontSize:window.innerWidth>768?15:10},axisLine:{show:!0,lineStyle:{fontSize:"",color:"black"}},axisTick:{show:!1},splitLine:{show:!1}},{scale:!0,gridIndex:1,splitNumber:4,min:0,minInterval:1,axisLabel:{show:!0,fontSize:window.innerWidth>768?15:10,margin:8,formatter:e=>e>=1e9?(e/1e9).toFixed(1)+"B":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e4?(e/1e4).toFixed(1)+"W":e.toFixed(0)},axisLine:{show:!0,lineStyle:{color:"black"}},axisTick:{show:!1},splitLine:{show:!0,lineStyle:{type:"dashed"}},boundaryGap:["20%","20%"]},{type:"value",gridIndex:2,min:0,max:100,axisLabel:{show:!0,fontSize:window.innerWidth>768?15:10,formatter:function(e){return[0,20,50,80,100].indexOf(e)>-1?e:""}},axisLine:{show:!0,lineStyle:{color:"black"}},axisTick:{show:!1},splitNumber:10,splitLine:{show:!0,lineStyle:{type:"dashed",color:"#fff",width:1},interval:function(e,n){return[20,50,80,100].indexOf(n)>-1}}}],dataZoom:[{type:"inside",xAxisIndex:[0,1,2],start:55,end:100},{show:!0,xAxisIndex:[0,1,2],type:"slider",top:window.innerWidth>768?"90%":"91%",height:20,start:98,end:100,textStyle:{fontSize:window.innerWidth>768?12:9}}],visualMap:[{type:"piecewise",show:!1,pieces:b.singleTypeGreen,outOfRange:{color:"green"},dimension:0,seriesIndex:7},{type:"piecewise",show:!1,pieces:b.singleTypeRed,outOfRange:{color:"red"},dimension:0,seriesIndex:8},{type:"piecewise",show:!1,pieces:b.singleTypeYellow,outOfRange:{color:"yellow"},dimension:0,seriesIndex:9}],series:[{name:"进攻K线",type:"candlestick",barWidth:"50%",data:c.values,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"rgb(255,0,0)",color0:"rgb(255,0,0)",borderColor:"rgb(255,0,0)",borderColor0:"rgb(255,0,0)"}},gridIndex:0},{name:"推进K线",type:"candlestick",barWidth:"50%",data:d.values,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"rgb(0,0,252)",color0:"rgb(0,0,252)",borderColor:"rgb(0,0,252)",borderColor0:"rgb(0,0,252)"}},gridIndex:0},{name:"防守K线",type:"candlestick",barWidth:"50%",data:f.values,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"orange",color0:"orange",borderColor:"orange",borderColor0:"orange"}},gridIndex:0},{name:"撤退K线",type:"candlestick",barWidth:"50%",data:g.values,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"rgb(84,252,252)",color0:"rgb(84,252,252)",borderColor:"rgb(84,252,252)",borderColor0:"rgb(84,252,252)"}},gridIndex:0},{name:"成交量",type:"bar",barWidth:"70%",xAxisIndex:1,yAxisIndex:1,data:I,markPoint:{data:x,label:{show:!1}}},{name:"{green|━}{red|━} 牵牛绳",type:"line",data:[],smooth:!0,symbol:"none",xAxisIndex:0,yAxisIndex:0,showSymbol:!1,lineStyle:{opacity:0},itemStyle:{normal:{color:"green"}},gridIndex:0},{name:"{green|━}{red|━} 度牛尺",type:"line",data:[],smooth:!0,symbol:"none",xAxisIndex:0,yAxisIndex:0,showSymbol:!1,lineStyle:{opacity:0},itemStyle:{normal:{color:"green"}},gridIndex:0},{name:"虫线",type:"line",data:b.greenData,smooth:!0,symbol:"none",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"green",lineStyle:{width:2,type:"solid"}}},gridIndex:0},{name:"龙线",type:"line",data:b.redData,smooth:!0,symbol:"none",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"red",lineStyle:{width:2,type:"solid"}}},gridIndex:0},{name:"黄色",type:"line",data:b.yellowData,smooth:!0,symbol:"none",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"yellow",lineStyle:{width:2,type:"solid"}}},gridIndex:0},{name:"背景区域",type:"line",data:[],xAxisIndex:2,yAxisIndex:2,markArea:{silent:!0,itemStyle:{normal:{opacity:1}},label:{normal:{show:!0,position:"insideRight",fontSize:window.innerWidth>768?16:12,fontWeight:"bold",color:"#13E113",distance:10}},data:[[{yAxis:0,itemStyle:{normal:{color:"#CFFFCF"}},label:{normal:{formatter:"度牛区"}}},{yAxis:20}],[{yAxis:20,itemStyle:{normal:{color:"#A6FFFF"}}},{yAxis:40}],[{yAxis:40,itemStyle:{normal:{color:"#FFF686"}}},{yAxis:60}],[{yAxis:60,itemStyle:{normal:{color:"#FFD2B3"}}},{yAxis:80}],[{yAxis:80,itemStyle:{normal:{color:"#FFB8B8"}},label:{normal:{formatter:"度牛区",color:"#FF0000",position:"insideLeft",distance:10}}},{yAxis:100}]]}},{name:"度牛尺",type:"line",data:_.greenData,symbol:"none",xAxisIndex:2,yAxisIndex:2,itemStyle:{normal:{color:"green",lineStyle:{width:2,type:"solid"}}},gridIndex:2,markPoint:{symbol:"rect",symbolSize:(e,n)=>[2,22],itemStyle:{normal:{label:{show:!1}}},data:[..._.greenData.map((e=>{if(0===e[1])return{coord:[e[0],20],symbolOffset:[0,10],itemStyle:{color:"#00ff00"}}})).filter(Boolean)]}},{type:"line",data:_.redData,symbol:"none",xAxisIndex:2,yAxisIndex:2,itemStyle:{normal:{color:"red",lineStyle:{width:2,type:"solid"}}},gridIndex:2,markPoint:{symbol:"rect",symbolSize:(e,n)=>[2,22],itemStyle:{normal:{label:{show:!1}}},data:[..._.redData.map((e=>{if(100===e[1])return{coord:[e[0],80],symbolOffset:[0,-10],itemStyle:{color:"#ff0000"}}})).filter(Boolean)]}},{name:"辅助线",type:"line",data:[],xAxisIndex:2,yAxisIndex:2,markLine:{silent:!0,symbol:"none",lineStyle:{color:"#000000",width:3,type:"solid"},data:[{yAxis:20}],label:{normal:{fontSize:window.innerWidth>768?12:9}}}},{name:"辅助线",type:"line",data:[],xAxisIndex:2,yAxisIndex:2,markLine:{silent:!0,symbol:"none",lineStyle:{color:"#000000",width:3,type:"solid"},data:[{yAxis:50}],label:{normal:{fontSize:window.innerWidth>768?12:9}}}},{name:"辅助线",type:"line",data:[],xAxisIndex:2,yAxisIndex:2,markLine:{silent:!0,symbol:"none",lineStyle:{color:"#000000",width:3,type:"solid"},data:[{yAxis:80}],label:{normal:{fontSize:window.innerWidth>768?12:9}}}},{name:"辅助线",type:"line",data:[],xAxisIndex:2,yAxisIndex:2,markLine:{silent:!0,symbol:"none",lineStyle:{color:"#000000",width:3,type:"solid"},data:[{yAxis:100}],label:{normal:{fontSize:window.innerWidth>768?12:9}}}}]}}try{ae[e].setOption(l);const n=me.throttle((function(){if(console.log("窗口大小改变,调整图表大小"),ae[e]&&!ae[e].isDisposed()){const n=window.innerWidth<768,t=window.innerWidth>=768&&window.innerWidth<1024;if(n!==i||t!==s)return console.log("设备类型变化,重新渲染图表"),void se(e);ae[e].resize()}}),1e3,{trailing:!1});window[`resize_${e}`]=n,window.removeEventListener("resize",window[`resize_${e}`]),window.addEventListener("resize",window[`resize_${e}`])}catch(h){}}a((()=>$.messages),(async(e,n)=>{var r,a;if((null==e?void 0:e.length)&&e!==le.value&&(t.firstAPICall=!0,console.log("第一阶段,意图识别,获取回复,历史记录禁止点击"),le.value=e.length,e.length>0)){console.log("chatStore.currentUserIndex",t.currentUserIndex),null!=t.currentUserIndex&&(t.messages[t.currentUserIndex].audioStatus=!1),t.currentUserIndex=null,C.stop(),P.value=[],z.value=!1,D=0,L=!1,j.one={loaded:!1,url:null},j.two={loaded:!1,url:null},j.three={loaded:!1,url:null},j.four={loaded:!1,url:null},C.soundInstance=null,C.nowSound=null,C.isPlaying=!1,C.isPaused=!1,C.playbackPosition=0,console.log("消息列表已更新,最新消息:",e[e.length-1]),t.messages.push(e[e.length-1]),t.currentUserIndex=t.messages.length-1,t.inputUserIndex=t.messages.length-1,console.log("消息列表已更新,最新消息:",t.messages[t.messages.length-1],"最新用户坐标",t.currentUserIndex),G();const n={language:"cn",marketList:"usa,sg,my,hk,cn,can,vi,th,in",content:e[e.length-1].content,token:localStorage.getItem("localToken"),model:1};let h=!0;const v=o(),m=await async function(e=null){const n=s({sender:"ai",class:"ing",type:"ing",flag:!0,content:"夺宝奇兵大模型正在思考",gif:te,nowrap:!0});t.messages.push(n),await new Promise((e=>setTimeout(e,1500))),t.messages.pop();const o=s({sender:"ai",class:"ing",type:"ing",flag:!0,content:"正在解析关键数据",gif:oe,nowrap:!0});if(t.messages.push(o),!e)return o;await new Promise((e=>setTimeout(e,1500))),t.messages.pop();const r=s({sender:"ai",class:"ing",type:"ing",flag:!0,content:`正在生成${e}全景作战报告`,gif:re,nowrap:!0});t.messages.push(r),await new Promise((e=>setTimeout(e,1500))),t.messages.pop();const a=s({sender:"ai",class:"ing",type:"ing",content:"报告已生成!",nowrap:!0});return t.messages.push(a),await new Promise((e=>setTimeout(e,1500))),t.messages.pop(),null}();try{const e=await l(n);if(v.value=e.data,console.log(v.value,"codeData"),200==e.code)t.searchRecord=!0,m&&v.value.name&&await async function(e,n){if(!e||!n)return;await new Promise((e=>setTimeout(e,1500)));const o=t.messages.indexOf(e);o>-1&&t.messages.splice(o,1);const r=s({sender:"ai",class:"ing",type:"ing",flag:!0,content:`正在生成${n}全景作战报告`,gif:re});t.messages.push(r),await new Promise((e=>setTimeout(e,1500))),t.messages.pop();const a=s({sender:"ai",class:"ing",type:"ing",content:"报告已生成!"});t.messages.push(a),await new Promise((e=>setTimeout(e,1500))),t.messages.pop()}(m,v.value.name),t.messages.push({});else{if(m){const e=t.messages.indexOf(m);e>-1&&t.messages.splice(e,1)}h=!1,console.log("执行回绝话术");const n=o(e.msg),r=Z(n.value),a=/\$\$(.*?)\$\$/g;r.replace(a,((e,n)=>{try{return ie.renderToString(n,{throwOnError:!1})}catch(t){return console.error("KaTeX 渲染错误:",t),e}}));console.log(n,"AIcontent"),406==e.code&&(n.value='

尊敬的用户,目前您的token余额为0,系统将无法处理您的搜索请求,您可以补充token后再进行搜索。token兑换的入口在右上角“获取token次数”,点击即可操作哦~

');const l={class:"ing",type:"ing",flag:h,content:n};t.messages.push(l),t.isLoading=!1,t.chatInput=!1,t.firstAPICall=!1,console.log("历史记录可以点击"),W("enableInput")}}catch(p){if(m){const e=t.messages.indexOf(m);e>-1&&t.messages.splice(e,1)}console.log(p,"意图识别失败"),t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,t.firstAPICall=!1,console.log("历史记录可以点击"),W("enableInput")}if(h){const e={language:"cn",token:localStorage.getItem("localToken"),parentId:v.value.parentId,stockId:v.value.stockId,recordId:v.value.recordId};try{const n="development",o=await i({token:"development"==n||"test"==n?"8Csj5VVX1UbIb4C3oxrnbZi0+fEeMx8pywnIlrmTm45Cb/EllzWACLto9J9+fCFsfdgBOvKvyY94FvqlvM0":"8nkj4QBV1RPIb4CzoRTnbZi0+fEeMx8pywnIlrmTxdwROKkuwWqAWu9orpkpeXVqL98DPfeonNYpHv+mucA",market:v.value.market,code:v.value.code,language:"cn",brainPrivilegeState:1,swordPrivilegeState:1,stockForecastPrivilegeState:1,spaceForecastPrivilegeState:1,aibullPrivilegeState:1,aigoldBullPrivilegeState:1,airadarPrivilegeState:1,marketList:"usa,sg,my,hk,cn,can,vi,th,in,gb"}),l=(null==(r=o.data)?void 0:r.HomePage)||null,p=(null==(a=o.data)?void 0:a.AIGoldBull)||null,h=!!l,m=!!(p&&p.DNC&&p.FCX&&p.JN&&p.KLine20&&p.QSXH),y=/\$\$(.*?)\$\$/g;let w,b,_,k;K={one:{completed:!1,result:null,error:null,isError:!1,isEnd:!1},two:{completed:!1,result:null,error:null,isError:!1,isEnd:!1},three:{completed:!1,result:null,error:null,isError:!1,isEnd:!1},four:{completed:!1,result:null,error:null,isError:!1,isEnd:!1}};C.togglePlayPause;const I=(e,n)=>e&&C.isVoiceEnabled?(j[n].url=e,console.log(`设置音频${n}的URL:`,e),new Promise((t=>{new Q.Howl({src:[e],html5:!0,format:["mp3","acc"],rate:1.2,preload:!0,onload:()=>{console.log(`音频${n}预加载完成:`,e),j[n].loaded=!0,t()},onloaderror:(e,o)=>{console.error(`音频${n}预加载失败:`,o),j[n].loaded=!0,t()}})}))):(j[n].loaded=!0,Promise.resolve()),x=()=>K.one.completed&&j.one.loaded,A=()=>{if(x()&&!K.one.executed)if(K.one.result){K.one.executed=!0,console.log("执行OneAPI代码(文本和音频同步开始):",K.one.result),j.one.url&&(t.messages[t.inputUserIndex].audioArray.push(j.one.url),t.currentUserIndex==t.inputUserIndex?(t.messages[t.inputUserIndex].audioStatus=!0,R(j.one.url,"API1-第一个")):t.messages[t.inputUserIndex].audioStatus=!1,console.log("音频队列:添加API1音频,当前队列长度:",P.value.length)),t.messages.pop(),q({sender:"ai",class:"title1",type:"title1",content:v.value.name+"全景作战报告",date:w.data.date},"",50),t.firstAPICall=!1,console.log("历史记录可以点击");const e=Z(w.data.name+"\n"+w.data.price+"\n"+w.data.date).replace(y,((e,n)=>{try{return ie.renderToString(n,{throwOnError:!1})}catch(t){return console.error("KaTeX 渲染错误:",t),e}})),n=s({sender:"ai",class:"content1",type:"content1",content:"",isTyping:!0});if(q(n,["",e],130),l){const e=JSON.parse(JSON.stringify(u(l))),n=V(e);n&&(Y.value=!0,console.log("hasValidData设置为:",Y.value));const t=`kline-${Date.now()}`;console.log("生成K线消息ID:",t),q({sender:"ai",class:"content1",type:"content1",kline:!0,chartData:n,messageId:t,hasValidData:!0,klineType:1},"",50)}if(p&&p.DNC&&p.FCX&&p.JN&&p.KLine20&&p.QSXH){const e=JSON.parse(JSON.stringify(u(p))),n=JSON.parse(JSON.stringify(u(l)));console.log("处理 K 线数据 - 开始"),console.log("AIGoldBullData",e),console.log("HomePageData",n);const t={name:n.StockInformation.Name,Kline:e};console.log("K线数据结构:",t),console.log("K线数据名称:",t.name),console.log("K线数据:",t.Kline?t.Kline:null),Y.value=!0,console.log("hasValidData设置为:",Y.value);const o=`kline-${Date.now()+1}`;console.log("生成K线消息ID:",o),q({sender:"ai",class:"content2",type:"content2",kline:!0,chartData:t,messageId:o,hasValidData:!0,klineType:2,error:K.two.error?"2":"",isEnd:"1"},"",50)}}else t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput");if(K.one.executed&&K.two.completed&&!K.two.executed)if(K.two.result){K.two.executed=!0,console.log("执行TwoAPI代码:",K.two.result),j.two.url&&(t.messages[t.inputUserIndex].audioArray.push(j.two.url),t.currentUserIndex==t.inputUserIndex?R(j.two.url,"API2-第二个"):t.messages[t.inputUserIndex].audioStatus=!1,console.log("音频队列:添加API2音频,当前队列长度:",P.value.length)),q({sender:"ai",class:"title2",type:"title2",content:""},"",50);const e=Z(b.data.hxjzpg);console.log(e,"pc2");const n=e.replace(y,((e,n)=>{try{return ie.renderToString(n,{throwOnError:!1})}catch(t){return console.error("KaTeX 渲染错误:",t),e}})),o=s({sender:"ai",class:"content3",type:"content3",content:"",isTyping:!0,error:K.three.error?"3":"",isEnd:"2"});q(o,["",n],130)}else console.log("1111111111111111111"),K.one.isEnd&&K.two.error&&!K.two.isError&&(K.two.isError=!0,t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"));if(K.two.executed&&K.three.completed&&!K.three.executed)if(K.three.result){K.three.executed=!0,console.log("执行ThreeAPI代码:",K.three.result),j.three.url&&(t.messages[t.inputUserIndex].audioArray.push(j.three.url),t.currentUserIndex==t.inputUserIndex?R(j.three.url,"API3-第三个"):t.messages[t.inputUserIndex].audioStatus=!1,console.log("音频队列:添加API3音频,当前队列长度:",P.value.length)),q({sender:"ai",class:"title3",type:"title3",content:ye},"",50);const e='

【主力行为】

',n=`${_.data.zhuli1}

${_.data.zhuli2}

${_.data.zhuli3}

`,o=(_.data.zhuli1,_.data.zhuli2,_.data.zhuli3,s({sender:"ai",class:"content3",type:"content3",content:"",isTyping:!0}));q(o,[e,n],200),q({sender:"ai",class:"title3",type:"title3",content:we},"",50);const r=_.data.kongjian.split(","),a=(r[0],r[1],r[2],r[3],_.data.shijian,_.data.nengliang,'

【空间维度】

'),l=`${r[0]},${r[1]}`,i='

',u=`${r[2]},${r[3]}

`,c='

【时间维度】

',d=`${_.data.shijian}

`,f='

【能量维度】

',g=`${_.data.nengliang}

`,p=s({sender:"ai",class:"content3",type:"content3",content:"",isTyping:!0,error:K.four.error?"4":"",isEnd:"3"});q(p,[a,l,i,u,c,d,f,g],200)}else K.two.isEnd&&K.three.error&&!K.three.isError&&(K.three.isError=!0,t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"));if(K.three.executed&&K.four.completed&&!K.four.executed)if(K.four.result){K.four.executed=!0,console.log("执行FourAPI代码:",K.four.result),j.four.url&&(t.messages[t.inputUserIndex].audioArray.push(j.four.url),t.currentUserIndex==t.inputUserIndex?R(j.four.url,"API4-第四个"):t.messages[t.inputUserIndex].audioStatus=!1,console.log("音频队列:添加API4音频,当前队列长度:",P.value.length)),q({sender:"ai",class:"title3",type:"title3",content:be},"",50);k.data.cftl,k.data.gfzl;const e='

【触发条件】

',n=`${k.data.cftl}

`,o='

【攻防指令】

',r=`${k.data.gfzl}

`,a=s({sender:"ai",class:"content3",type:"content3",content:"",isTyping:!0});q(a,[e,n,o,r],240);const l="该内容由AI生成,请注意甄别",i=s({sender:"ai",class:"mianze",type:"mianze",content:"",isTyping:!0,end:!0});q(i,["",l],210)}else K.three.isEnd&&K.four.error&&!K.four.isError&&(K.four.isError=!0,t.messages.push({class:"ing",type:"ing",flag:!1,content:"系统正在为您努力加载中,请稍后再试"}),t.isLoading=!1,t.chatInput=!1,W("enableInput"));if(K.one.completed&&K.two.completed&&K.three.completed&&K.four.completed&&K.four.executed){console.log("所有API已完成,开始收集预加载的音频URL");const e=[];console.log("预加载音频状态检查:"),console.log("audioPreloadStatus:",j),j.one.url&&(console.log("添加预加载音频URL one:",j.one.url),e.push(j.one.url)),j.two.url&&(console.log("添加预加载音频URL two:",j.two.url),e.push(j.two.url)),j.three.url&&(console.log("添加预加载音频URL three:",j.three.url),e.push(j.three.url)),j.four.url&&(console.log("添加预加载音频URL four:",j.four.url),e.push(j.four.url)),console.log("收集到的预加载音频URLs:",e),console.log("语音是否启用:",C.isVoiceEnabled),console.log("所有接口执行完成,音频已在各接口中单独播放")}},S=async()=>{var n;try{if(w=await c(e),400==w.code)throw new Error("API返回错误码400,请求失败");console.log("OneAPI成功返回:",w),K.one.completed=!0,K.one.result=w,(null==(n=null==w?void 0:w.data)?void 0:n.url)?await I(w.data.url.trim(),"one"):j.one.loaded=!0,A()}catch(t){console.error("OneAPI失败:",t),K.one.completed=!0,K.one.error=t,j.one.loaded=!0,A()}},T=async()=>{var n;try{if(b=await d(e),400==b.code)throw new Error("API返回错误码400,请求失败");console.log("TwoAPI成功返回:",b),K.two.completed=!0,K.two.result=b,(null==(n=null==b?void 0:b.data)?void 0:n.url)?await I(b.data.url.trim(),"two"):j.two.loaded=!0,A()}catch(t){console.error("TwoAPI失败:",t),K.two.completed=!0,K.two.error=t,j.two.loaded=!0,A()}},E=async()=>{var n;try{if(_=await f(e),400==_.code)throw new Error("API返回错误码400,请求失败");console.log("ThreeAPI成功返回:",_),K.three.completed=!0,K.three.result=_,(null==(n=null==_?void 0:_.data)?void 0:n.url)?await I(_.data.url.trim(),"three"):j.three.loaded=!0,A()}catch(t){console.error("ThreeAPI失败:",t),K.three.completed=!0,K.three.error=t,j.three.loaded=!0,A()}},z=async()=>{var n;try{if(k=await g(e),400==k.code)throw new Error("API返回错误码400,请求失败");console.log("FourAPI成功返回:",k),K.four.completed=!0,K.four.result=k,(null==(n=null==k?void 0:k.data)?void 0:n.url)?await I(k.data.url.trim(),"four"):j.four.loaded=!0,A()}catch(t){console.error("FourAPI失败:",t),K.four.completed=!0,K.four.error=t,j.four.loaded=!0,A()}};h&&m?(S(),T(),E(),z()):(t.messages.pop(),t.messages.push({class:"ing",type:"ing",flag:!1,content:"数据缺失,请稍后重试"}),t.isLoading=!1,t.chatInput=!1,t.firstAPICall=!1,W("enableInput"))}catch(p){console.error("请求失败:",p),t.firstAPICall=!1,Y.value=!1}finally{await t.getUserCount()}}}}),{deep:!1}),a((()=>t.dbqbClickRecord),((e,n)=>{if(console.log("new",e),!e||0===Object.keys(e).length)return;const r=o(e);console.log("dbqbClickRecord 发生变化:",r.value);try{t.currentUserIndex=null,C.stop(),P.value=[],z.value=!1,D=0,L=!1,j.one={loaded:!1,url:null},j.two={loaded:!1,url:null},j.three={loaded:!1,url:null},j.four={loaded:!1,url:null},C.soundInstance&&(C.soundInstance.stop(),C.soundInstance.unload(),C.soundInstance=null),C.nowSound=null,K.one={completed:!1,result:null,error:null,isError:!1,isEnd:!1},K.two={completed:!1,result:null,error:null,isError:!1,isEnd:!1},K.three={completed:!1,result:null,error:null,isError:!1,isEnd:!1},K.four={completed:!1,result:null,error:null,isError:!1,isEnd:!1},Y.value=!1,H.value=[],N.value=!1,t.isLoading=!1,t.chatInput=!1,W("enableInput"),setTimeout((()=>{t.dbqbClickRecord={},console.log("dbqbClickRecord 已清空")}),0)}catch(a){console.error("停止任务时发生错误:",a)}if(r.value.wokeFlowData.One&&r.value.wokeFlowData.Two&&r.value.wokeFlowData.Three&&r.value.wokeFlowData.Four)try{t.messages=[],t.messages.push({sender:"user",timestamp:r.value.createdTime,content:r.value.keyword,audioArray:[r.value.wokeFlowData.One.url,r.value.wokeFlowData.Two.url,r.value.wokeFlowData.Three.url,r.value.wokeFlowData.Four.url],audioStatus:!1}),t.messages.push({sender:"ai",class:"title1",type:"title1",content:r.value.stockName+"全景作战报告",date:r.value.wokeFlowData.One.date});const e=Z(r.value.wokeFlowData.One.name+"\n"+r.value.wokeFlowData.One.price+"\n"+r.value.wokeFlowData.One.date);t.messages.push({sender:"ai",class:"content1",type:"content1",content:e});const n=r.value.stockData.HomePage;if(n){const e=JSON.parse(JSON.stringify(u(n))),o=V(e);o&&(Y.value=!0,console.log("hasValidData设置为:",Y.value));const r=`kline-${Date.now()}`;console.log("生成K线消息ID:",r),t.messages.push({sender:"ai",class:"content1",type:"content1",kline:!0,chartData:o,messageId:r,hasValidData:!0,klineType:1}),p((()=>{console.log("nextTick开始 - 准备渲染图表"),console.log("消息列表:",t.messages);let e=-1;for(let n=0;n{console.log("延时执行,确保DOM已渲染"),se(n)}),100)}else console.warn("未找到K线消息")}))}const o=r.value.stockData.AIGoldBull;if(o&&o.DNC&&o.FCX&&o.JN&&o.KLine20&&o.QSXH){const e=JSON.parse(JSON.stringify(u(o))),r=JSON.parse(JSON.stringify(u(n)));console.log("处理 K 线数据 - 开始"),console.log("AIGoldBullData",e),console.log("HomePageData",r);const a={name:r.StockInformation.Name,Kline:e};console.log("K线数据结构:",a),console.log("K线数据名称:",a.name),console.log("K线数据:",a.Kline?a.Kline:null),Y.value=!0,console.log("hasValidData设置为:",Y.value);const l=`kline-${Date.now()+1}`;console.log("生成K线消息ID:",l),t.messages.push({sender:"ai",class:"content2",type:"content2",kline:!0,chartData:a,messageId:l,hasValidData:!0,klineType:2}),p((()=>{console.log("nextTick开始 - 准备渲染图表"),console.log("消息列表:",t.messages);let e=-1;for(let n=0;n{console.log("延时执行,确保DOM已渲染"),se(n)}),100)}else console.warn("未找到K线消息")}))}t.messages.push({sender:"ai",class:"title2",type:"title2",content:""});const a=Z(r.value.wokeFlowData.Two.hxjzpg);t.messages.push({sender:"ai",class:"content3",type:"content3",content:a}),t.messages.push({sender:"ai",class:"title3",type:"title3",content:ye});const l=`

【主力行为】

${r.value.wokeFlowData.Three.zhuli1}

${r.value.wokeFlowData.Three.zhuli2}

${r.value.wokeFlowData.Three.zhuli3}

`;t.messages.push({sender:"ai",class:"content3",type:"content3",content:l,isTyping:!0}),t.messages.push({sender:"ai",class:"title3",type:"title3",content:we});const i=r.value.wokeFlowData.Three.kongjian.split(","),s=`

【空间维度】

${i[0]},${i[1]}

${i[2]},${i[3]}

`,c=`

【时间维度】

${r.value.wokeFlowData.Three.shijian}

`,d=s+c+`

【能量维度】

${r.value.wokeFlowData.Three.nengliang}

`;t.messages.push({sender:"ai",class:"content3",type:"content3",content:d}),t.messages.push({sender:"ai",class:"title3",type:"title3",content:be});const f=`

【触发条件】

${r.value.wokeFlowData.Four.cftl}

`,g=f+`

【攻防指令】

${r.value.wokeFlowData.Four.gfzl}

`;t.messages.push({sender:"ai",class:"content3",type:"content3",content:g}),t.messages.push({sender:"ai",class:"mianze",type:"mianze",content:"该内容由AI生成,请注意甄别",end:!0})}catch(l){h.error("历史数据获取出错!"),console.error("e",l)}}),{deep:!0,immediate:!0}),a((()=>C.isVoiceEnabled),(e=>{if(e!==C.lastVoiceState)if(C.lastVoiceState=e,e){console.log("开启语音播放");(()=>{var e;C.ttsUrl&&((null==(e=C.soundInstance)?void 0:e.playing())||((e=>{if(!e)return console.warn("音频URL为空,跳过播放"),void(C.isPlaying=!1);(()=>{if(C.isNewInstance){const n=new Q.Howl({src:[e],html5:!0,format:["mp3","acc"],rate:1.2,onplay:()=>{C.isPlaying=!0,n.volume(1)},onend:()=>C.isPlaying=!1,onstop:()=>C.isPlaying=!1,onloaderror:(e,n)=>{console.error("音频加载失败:",n),h.error("音频播放失败,请检查网络连接")}});C.nowSound&&C.nowSound.stop(),C.nowSound=n,C.isNewInstance=!1,console.log("新音频")}else console.log("已经有音频");const n=C.nowSound;n.play(),C.setAudioInstance(n),Q.Howler._howls.push(n)})()})(C.ttsUrl),setTimeout((()=>{var e;(null==(e=C.soundInstance)?void 0:e.playing())||Q.Howler.unload()}),1e3)))})()}else console.log("关闭语音播放"),C.soundInstance&&(C.soundInstance.pause(),C.isPlaying=!1)}),{immediate:!0}),a((()=>E.activeTabIndex),(e=>{setTimeout((()=>{console.log("activeTabIndex变化:",e),0===e&&(console.log("切换到AI聊天页,重新渲染图表"),fe())}),1e3)}),{immediate:!0});const de=()=>{t.dbqbScrollToTop=!t.dbqbScrollToTop};function fe(){console.log("重新渲染所有K线图");const e=t.messages;for(let n=0;n{C.isPlaying&&(C.stop(),console.log("组件卸载,音频已停止")),P.value=[],z.value=!1,D=0,L=!1,C.soundInstance=null,C.nowSound=null,Q.Howler.stop(),Q.Howler.unload(),C.isPlaying=!1,C.isPaused=!1,C.playbackPosition=0,Object.keys(j).forEach((e=>{j[e]={loaded:!1,url:null}})),t.currentUserIndex=-1};v((()=>{pe();if(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){Q.Howler.html5PoolSize=1,Q.Howler.autoSuspend=!1,Q.Howler.usingWebAudio=!0;const e=()=>{Q.Howler.ctx&&"suspended"===Q.Howler.ctx.state&&(Q.Howler.ctx.resume(),console.log("音频上下文已激活"))};document.addEventListener("touchstart",e,{once:!0}),document.addEventListener("click",e,{once:!0})}Z.setOptions({breaks:!0,gfm:!0,sanitize:!1,smartLists:!0,smartypants:!0,xhtml:!1,renderer:U}),fe(),console.log("组件挂载完成"),t.currentUserIndex=null,t.messages.forEach((e=>{"user"==e.sender&&(e.audioStatus=!1)})),document.addEventListener("visibilitychange",ve);new MutationObserver((e=>{e.forEach((e=>{if("childList"===e.type&&e.addedNodes.length){document.querySelectorAll('[id^="kline-container-"]').length}}))})).observe(document.body,{childList:!0,subtree:!0})}));let he=!1;const ve=()=>{document.hidden?C.isPlaying?(he=!0,C.pause(),console.log("页面切换离开,音频已暂停")):he=!1:he&&!C.isPlaying&&(C.play(),console.log("页面切换回来,音频已恢复播放"),he=!1)};return m((()=>{document.removeEventListener("visibilitychange",ve),pe(),Object.keys(ae).forEach((e=>{ae[e]&&(window[`resize_${e}`]&&(window.removeEventListener("resize",window[`resize_${e}`]),delete window[`resize_${e}`]),ae[e].dispose(),delete ae[e])}))})),(e,n)=>(y(),w(I,null,[b("div",_e,[_(" GIF区域 "),b("div",ke,[n[0]||(n[0]=b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/03ddbbbee489f29dc6a1427f9ed4f389.png",alt:"夺宝奇兵大模型logo",class:"bgc"},null,-1)),b("img",{src:k("/aixiaocaishen/static/images/-s-夺宝奇兵logo-985375a7.png"),alt:"夺宝奇兵大模型logo",class:"logo1"},null,8,Ie),b("img",{src:k("/aixiaocaishen/static/images/开启无限财富-3b89b7e4.png"),alt:"夺宝奇兵大模型logo",class:"logo2"},null,8,xe)]),(y(!0),w(I,null,x(k(M),((e,o)=>(y(),w("div",{key:o},[_(" 用户消息容器,包含喇叭按钮 "),"user"===e.sender?(y(),w("div",Ae,[b("div",Se,[b("div",Te,[b("img",{src:e.audioStatus?k(ee):k(ne),class:A(["user-message-speaker",{"speaker-active":e.audioStatus}]),onClick:e=>(e=>{console.log("上一个按钮坐标",t.currentUserIndex,"当前按钮坐标",e),t.messages[e].audioArray[0]&&t.messages[e].audioArray[1]&&t.messages[e].audioArray[2]&&t.messages[e].audioArray[3]&&(t.messages[e].audioStatus=!t.messages[e].audioStatus,t.currentUserIndex!=e?(null!=t.currentUserIndex&&(C.isPlaying&&C.togglePlayPause(),t.messages[t.currentUserIndex].audioStatus=!1),C.soundInstance&&(C.soundInstance.stop(),C.soundInstance=null),j.one={loaded:!1,url:null},j.two={loaded:!1,url:null},j.three={loaded:!1,url:null},j.four={loaded:!1,url:null},t.messages[e].audioArray[0]&&(j.one.loaded=!0,j.one.url=t.messages[e].audioArray[0]),t.messages[e].audioArray[1]&&(j.two.loaded=!0,j.two.url=t.messages[e].audioArray[1]),t.messages[e].audioArray[2]&&(j.three.loaded=!0,j.three.url=t.messages[e].audioArray[2]),t.messages[e].audioArray[3]&&(j.four.loaded=!0,j.four.url=t.messages[e].audioArray[3]),t.currentUserIndex=e,P.value=[],z.value=!1,C.soundInstance=null,D=0,L=!1,setTimeout((()=>{R(t.messages[e].audioArray[0],"API1-第一个"),R(t.messages[e].audioArray[1],"API2-第二个"),R(t.messages[e].audioArray[2],"API3-第三个"),R(t.messages[e].audioArray[3],"API4-第四个"),C.isVoiceEnabled&&(C.currentAudioUrl||C.ttsUrl)||C.toggleVoice()}),100)):C.isVoiceEnabled?D>=P.value.length?(console.log("重新开始播放音频序列"),D=0,z.value=!1,L=!1,C.soundInstance=null,P.value.length>0&&O()):C.currentAudioUrl||C.ttsUrl?(console.log("2222"),C.togglePlayPause()):(console.log("3333"),C.toggleVoice()):(console.log("1111"),C.toggleVoice()))})(o),alt:"喇叭"},null,10,Ce),b("div",{class:A({"message-bubble":!0,[e.sender]:e.sender,[e.class]:e.class})},[b("div",{innerHTML:e.content},null,8,Ee)],2)]),e.timestamp?(y(),w("div",Pe,S(k(ce)(e.timestamp).format("YYYY-MM-DD HH:mm:ss")),1)):_("v-if",!0)])])):(y(),w(I,{key:1},[_(" AI消息和其他类型消息 "),b("div",{class:A({"message-bubble":!0,[e.sender]:e.sender,[e.class]:e.class})},["kline"===e.type?(y(),w("div",ze,[b("div",{id:"kline-container-"+o,class:"chart-mount-point"},[e.hasValidData?_("v-if",!0):(y(),w("div",Le,[...n[1]||(n[1]=[b("p",null,"暂无K线数据",-1)])]))],8,De)])):"ing"==e.type?(y(),w("div",je,[e.gif?(y(),w("img",{key:0,src:e.gif,alt:"思考过程",class:"thinking-gif"},null,8,Fe)):_("v-if",!0),b("div",{class:A(["ai-message-content",{fourStep:e.nowrap}])},[e.flag?(y(),w("div",Oe,[b("span",null,S(e.content),1),n[2]||(n[2]=T('......',1))])):(y(),w("div",{key:1,innerHTML:e.content},null,8,Re))],2)])):"title1"==e.type?(y(),w("div",Ue,[b("div",We,S(e.content),1),b("div",Me,S(e.date),1)])):"title2"==e.type?(y(),w("div",$e,[b("img",{class:"title1Img",src:k("/aixiaocaishen/static/images/核心价值评估-c1ed0285.png"),alt:"出错了"},null,8,Ve)])):"title3"==e.type?(y(),w("div",He,[b("img",{class:"title2Img",src:e.content,alt:"出错了"},null,8,Ne)])):"content1"==e.type?(y(),w("div",Be,[e.kline?(y(),w("div",Ke,[b("div",{id:"kline-container-"+o,class:"chart-mount-point"},[e.hasValidData?_("v-if",!0):(y(),w("div",Ye,[...n[3]||(n[3]=[b("p",null,"暂无数据",-1)])]))],8,qe)])):(y(),w("div",Ge,[b("div",{innerHTML:e.content,class:"text1"},null,8,Je)]))])):"content2"==e.type?(y(),w("div",Xe,[b("div",Ze,[b("div",{id:"kline-container-"+o,class:"chart-mount-pointJN"},[e.hasValidData?_("v-if",!0):(y(),w("div",en,[...n[4]||(n[4]=[b("p",null,"暂无数据",-1)])]))],8,Qe)])])):"content3"==e.type?(y(),w("div",nn,[b("div",tn,[b("div",{innerHTML:e.content,class:"text3"},null,8,on)])])):"mianze"==e.type?(y(),w("div",rn,[b("div",{innerHTML:e.content},null,8,an)])):(y(),w("div",{key:9,innerHTML:e.content},null,8,ln))],2)],2112))])))),128))]),_(" 全局返回顶部按钮 "),k(M).length>0?(y(),w("div",{key:0,class:"back-to-top",onClick:de},n[5]||(n[5]=[b("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("path",{d:"M12 4L12 20M12 4L6 10M12 4L18 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):_("v-if",!0)],64))}},[["__scopeId","data-v-4a4ebe1a"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/AIchat.vue"]]),un="/aixiaocaishen/static/images/logo-6d056fd7.png";const cn={key:0,class:"collapsed-container"},dn={key:1,class:"collapsed-bottom-container"},fn={key:2,class:"history-content"},gn={class:"history-list"},pn={key:0,class:"empty-state"},hn={class:"empty-icon"},vn={key:0,class:"categoryName"},mn=["onClick"],yn={class:"record-img"},wn=["src","alt"],bn={key:1,src:"https://d31zlh4on95l9h.cloudfront.net/images/9a431843b182c64a05fa3c8f6772b8a4.png",alt:"record.stockMarket"},_n={class:"record-msg"},kn={class:"record-text"},In={class:"stock-name"},xn={class:"stock-code"},An={key:0},Sn={class:"record-time"},Tn={class:"record-actions"},Cn={class:"popover-content"},En={class:"popover-item"},Pn=["onClick"],zn=["onClick"],Dn=["onClick"],Ln={key:0,class:"history-content"},jn={class:"history-list"},Fn={key:0,class:"empty-state"},On={class:"empty-icon"},Rn={key:0,class:"categoryName"},Un=["onClick"],Wn={class:"record-img"},Mn=["src","alt"],$n={key:1,src:"https://d31zlh4on95l9h.cloudfront.net/images/9a431843b182c64a05fa3c8f6772b8a4.png",alt:"record.stockMarket"},Vn={class:"record-msg"},Hn={class:"record-text"},Nn={class:"stock-name"},Bn={class:"stock-code"},Kn={key:0},qn={class:"record-time"},Yn={class:"record-actions"},Gn={class:"popover-content"},Jn={class:"popover-item"},Xn=["onClick"],Zn=["onClick"],Qn=["onClick"],et={class:"dialog-footer"};var nt=t({__name:"HistoryRecord",props:{currentType:{type:String,default:"AIchat"}},emits:["selectRecord","recordAdded","startNewChat","showAnnouncement","showFeedback"],setup(e,{expose:n,emit:t}){const l=J(),i=X();C();const s=e,u=o(null),c=t,d=o({cn:"https://d31zlh4on95l9h.cloudfront.net/images/c685daa929d80a03c26841dfa783cc3c.png",usa:"https://d31zlh4on95l9h.cloudfront.net/images/bccbc3058f327f72aa158fa0852dce19.png",hk:"https://d31zlh4on95l9h.cloudfront.net/images/ab050afe6867e9f961561f665ed12d10.png",sg:"https://d31zlh4on95l9h.cloudfront.net/images/90c5ce1edef2235a100e3ee0ad3cac92.png",vi:"https://d31zlh4on95l9h.cloudfront.net/images/59404c85889abd57dfd15040099edc1a.png",th:"https://d31zlh4on95l9h.cloudfront.net/images/31f5433264cf1f84cf550995fa16d86e.png",can:"https://d31zlh4on95l9h.cloudfront.net/images/26382451bfa08e6a419a2190b799dae5.png",my:"https://d31zlh4on95l9h.cloudfront.net/images/7efa8487a1317ed17eacc77b58e0a26d.png"}),f=o(!0),g=o(null),m=o({}),T=o(!1),R=o("500px"),U=r((()=>u.value?"70%":R.value)),W=()=>{m.value={},T.value=!1},M=o([]),$=o([]);let V=!0,H=!0,N=null,B=null;const K=async e=>{try{const n=await L(e);M.value=n.data;const t=JSON.stringify(n.data.map((e=>({id:e.id,isTop:e.isTop,createdTime:e.createdTime}))));if(N&&B===t)return void($.value=N);let o=n.data;V&&1==e.model&&0!=n.data.length&&(u.value||(l.aiChatCall=!0),V=!1),H&&2==e.model&&0!=n.data.length&&(u.value||(l.aiEmotionCall=!0),H=!1),u.value?(console.log("移动设备默认关闭"),f.value=!0):(console.log("pc设备进行判断"),"AIchat"==s.currentType?(f.value=!l.aiChatCall,console.log("夺宝奇兵页面",f.value)):"AiEmotion"==s.currentType&&(f.value=!l.aiEmotionCall,console.log("情绪大模型页面",f.value)));const r=ce().format("YYYY-MM-DD"),a=ce().subtract(3,"days").startOf("day"),i=ce().subtract(1,"days").endOf("day"),c=ce().subtract(7,"days").startOf("day"),d=ce().subtract(30,"days").startOf("day"),g=[],p=[],h=[],v=[],m=[];o.forEach((e=>{if(1===e.isTop)return void g.push(e);const n=ce(e.createdTime);n.format("YYYY-MM-DD")===r?p.push(e):n.isAfter(a)&&n.isBefore(i)?h.push(e):n.isAfter(c)?v.push(e):n.isAfter(d)&&m.push(e)})),M.value=n.data,$.value=[{name:"置顶",list:g},{name:"今日",list:p},{name:"近3日",list:h},{name:"近7日",list:v},{name:"近30日",list:m}],N=$.value,B=t}catch(n){console.error("获取历史记录出错",n),M.value=[],$.value=[]}},q=async(e,n)=>{try{const t=document.querySelector(".el-popover");if(t&&(t.style.display="none"),0==e&&$.value[0].list.length>=3)return console.log("超过置顶上线"),void h.warning("最多置顶三条内容,已达上限!");await(async e=>{try{await O(e)}catch(n){console.error("置顶或取消置顶失败",n)}})({model:"AIchat"==s.currentType?1:2,recordId:n,isTop:1==e?0:1}),await K({model:"AIchat"==s.currentType?1:2,token:localStorage.getItem("localToken")})}catch(t){console.error("操作失败:",t)}},Y=()=>{f.value=!1,"AIchat"==s.currentType?l.aiChatCall=!0:"AiEmotion"==s.currentType&&(l.aiEmotionCall=!0)},G=()=>{f.value=!0,"AIchat"==s.currentType?l.aiChatCall=!1:"AiEmotion"==s.currentType&&(l.aiEmotionCall=!1)},Z=o({}),Q=async e=>{var n,t;if("AIchat"==s.currentType&&l.firstAPICall)h.warning("正在获取回复中,请稍后");else try{g.value=e.id;const o=await j({model:"AIchat"==s.currentType?1:2,parentId:e.parentId,recordId:e.id});if(o&&o.data){u.value&&(f.value=!0,"AIchat"==s.currentType?l.aiChatCall=!1:"AiEmotion"==s.currentType&&(l.aiEmotionCall=!1)),i.isFeedback=!1,Z.value=o.data,l.dbqbClickRecord=Z.value;const r={queryText:o.data.keyword,stockInfo:{name:(null==(n=o.data.stockData)?void 0:n.stockName)||e.stockName||"",code:e.stockCode||"",market:e.stockMarket||"cn"},apiData:o.data.stockData||{},conclusionData:(null==(t=o.data.wokeFlowData)?void 0:t.One)||{},timestamp:e.createdTime||(new Date).toISOString()};c("selectRecord",r),console.log("历史记录数据已发送给父组件:",r)}else console.error("历史记录数据格式不正确:",o)}catch(o){console.error("获取历史记录数据失败",o)}},ee=e=>{m.value.id=e,p((()=>{const e=document.querySelector(".el-popover");e&&(e.style.display="none"),document.body.click()})),T.value=!0},ne=()=>{"AIchat"==s.currentType&&l.firstAPICall?h.warning("正在获取回复中,请稍后"):c("showAnnouncement")},te=()=>{"AIchat"==s.currentType&&l.firstAPICall?h.warning("正在获取回复中,请稍后"):c("showFeedback")};return a((()=>l.searchRecord),(e=>{l.searchRecord&&(K({model:"AIchat"==s.currentType?1:2,token:localStorage.getItem("localToken")}),l.searchRecord=!1)})),n({isCollapsed:f,toggleCollapse:()=>{f.value=!f.value,localStorage.setItem("historyRecordCollapsed",f.value)},getHistoryList:K,selectedRecordId:g}),v((()=>{const e=navigator.userAgent;u.value=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),K({model:"AIchat"==s.currentType?1:2,token:localStorage.getItem("localToken")})})),(e,n)=>{const t=E("DocumentDelete"),o=E("el-icon"),r=E("MoreFilled"),a=E("el-popover"),l=E("el-button"),i=E("el-dialog");return y(),w(I,null,[u.value?(y(),w("div",{key:1,class:A(["mobile-history-record-container",{mobileCollapsed:!f.value}])},[_(" 历史记录内容 "),f.value?_("v-if",!0):(y(),w("div",Ln,[b("div",{class:"mobile-head-container"},[_(" 折叠/展开按钮 "),b("img",{class:"mobile-toggle-btn",onClick:G,src:"https://d31zlh4on95l9h.cloudfront.net/images/37fe3d79a8a700f6c674c9f0e7af066b.png",alt:"icon"}),_(" 标题 "),n[15]||(n[15]=b("div",{class:"mobile-history-actions"},[b("img",{src:un,alt:"Logo",class:"logo-img"})],-1))]),_(" 历史记录列表 "),b("div",jn,[_(" 空状态 "),0===M.value.length?(y(),w("div",Fn,[b("div",On,[P(o,{class:"documentDelete"},{default:z((()=>[P(t)])),_:1})]),n[16]||(n[16]=b("p",{class:"empty-text"},"暂无历史记录",-1))])):(y(!0),w(I,{key:1},x($.value,(e=>(y(),w("div",{key:e.name},[0!=e.list.length?(y(),w("div",Rn,S(e.name),1)):_("v-if",!0),(y(!0),w(I,null,x(e.list,(t=>(y(),w("div",{key:t.id,class:A(["history-item",{active:g.value===t.id}])},[b("div",{class:"record-content",onClick:e=>Q(t)},[b("div",Wn,[d.value[t.stockMarket]?(y(),w("img",{key:0,src:d.value[t.stockMarket],alt:t.stockMarket},null,8,Mn)):(y(),w("img",$n))]),b("div",Vn,[b("div",Hn,[b("span",Nn,S(t.stockName),1),b("span",Bn,"("+S(t.stockCode)+")",1),"置顶"===e.name?(y(),w("div",Kn,[...n[17]||(n[17]=[b("svg",{t:"1755227529729",class:"top-icon",viewBox:"320 280 380 460",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7392"},[b("path",{d:"M351.085714 292.571429h321.828572v29.257142H351.085714v-29.257142z m175.542857 125.805714l146.285715 146.285714-20.48 20.48-125.805715-125.805714V731.428571h-29.257142v-272.091428L371.565714 585.142857l-20.48-20.48 146.285715-146.285714h29.257142z",fill:"#FFFFFF","p-id":"7393"})],-1)])])):_("v-if",!0)]),b("div",qn,S(k(ce)(t.createdTime).format("YYYY-MM-DD HH:mm:ss")),1)])],8,Un),b("div",Yn,[P(a,{class:"box-item",placement:"right-start",trigger:"click"},{reference:z((()=>[P(o,{class:"more-btn"},{default:z((()=>[P(r)])),_:1})])),default:z((()=>[b("div",Gn,[b("div",Jn,[n[18]||(n[18]=b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/9ad3617c94955bcb76e1b11db70bb80b.png",alt:""},null,-1)),D(" 数据更新时间:"+S(k(ce)(t.date).format("D/M/YYYY")),1)]),t.isTop?(y(),w("div",{key:0,class:"popover-item popover-btn",onClick:e=>q(t.isTop,t.id)},[...n[19]||(n[19]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/a458305d8275734cc96bf6cad29864bf.png",alt:""},null,-1),D(" 取消置顶 ")])],8,Xn)):(y(),w("div",{key:1,class:"popover-item popover-btn",onClick:e=>q(t.isTop,t.id)},[...n[20]||(n[20]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/a458305d8275734cc96bf6cad29864bf.png",alt:""},null,-1),D(" 置顶 ")])],8,Zn)),b("div",{class:"popover-item popover-btn",onClick:e=>ee(t.id)},[...n[21]||(n[21]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/027718d41523375a69e9cac927601cf8.png",alt:""},null,-1),D(" 删除 ")])],8,Qn)])])),_:2},1024)])],2)))),128))])))),128))]),b("div",{class:"mobile-bottom-container"},[b("div",{class:"mobile-bottom-btn",onClick:ne,title:"公告"},n[22]||(n[22]=[b("img",{class:"mobile-bottom-announcement",src:"https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png",alt:"icon"},null,-1),b("div",{class:"mobile-bottom-text"},"公告",-1)])),b("div",{class:"mobile-bottom-btn",onClick:te,title:"用户反馈"},n[23]||(n[23]=[b("img",{class:"mobile-bottom-feedback",src:"https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png",alt:"icon"},null,-1),b("div",{class:"mobile-bottom-text"},"用户反馈",-1)]))])]))],2)):(y(),w("div",{key:0,class:A(["history-record-container",{collapsed:!f.value}])},[_(" 收起状态的展开按钮和图标 "),f.value?(y(),w("div",cn,[n[3]||(n[3]=b("img",{class:"collapsed-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/74430a4ebbb67aefc713bf694147fb2a.png",alt:"icon"},null,-1)),b("img",{class:"collapsed-toggle-btn",onClick:Y,src:"https://d31zlh4on95l9h.cloudfront.net/images/815e7ebfb1963eadca9435e82c3c4a8d.png",alt:"icon",title:"打开边栏"})])):_("v-if",!0),f.value?(y(),w("div",dn,[b("div",{class:"collapsed-bottom-btn",onClick:ne,title:"公告"},n[4]||(n[4]=[b("img",{class:"collapsed-bottom-announcement",src:"https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png",alt:"icon"},null,-1)])),b("div",{class:"collapsed-bottom-btn",onClick:te,title:"用户反馈"},n[5]||(n[5]=[b("img",{class:"collapsed-bottom-feedback",src:"https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png",alt:"icon"},null,-1)]))])):_("v-if",!0),_(" 历史记录内容 "),f.value?_("v-if",!0):(y(),w("div",fn,[b("div",{class:"head-container"},[_(" 标题 "),n[6]||(n[6]=b("div",{class:"history-actions"},[b("img",{src:un,alt:"Logo",class:"logo-img"})],-1)),_(" 折叠/展开按钮 "),b("img",{class:"toggle-btn",onClick:G,src:"https://d31zlh4on95l9h.cloudfront.net/images/815e7ebfb1963eadca9435e82c3c4a8d.png",alt:"icon",title:"收起边栏"})]),_(" 历史记录列表 "),b("div",gn,[_(" 空状态 "),0===M.value.length?(y(),w("div",pn,[b("div",hn,[P(o,{class:"documentDelete"},{default:z((()=>[P(t)])),_:1})]),n[7]||(n[7]=b("p",{class:"empty-text"},"暂无历史记录",-1))])):(y(!0),w(I,{key:1},x($.value,(e=>(y(),w("div",{key:e.name},[0!=e.list.length?(y(),w("div",vn,S(e.name),1)):_("v-if",!0),(y(!0),w(I,null,x(e.list,(t=>(y(),w("div",{key:t.id,class:A(["history-item",{active:g.value===t.id}])},[b("div",{class:"record-content",onClick:e=>Q(t)},[b("div",yn,[d.value[t.stockMarket]?(y(),w("img",{key:0,src:d.value[t.stockMarket],alt:t.stockMarket},null,8,wn)):(y(),w("img",bn))]),b("div",_n,[b("div",kn,[b("span",In,S(t.stockName),1),b("span",xn,"("+S(t.stockCode)+")",1),"置顶"===e.name?(y(),w("div",An,[...n[8]||(n[8]=[b("svg",{t:"1755227529729",class:"top-icon",viewBox:"320 280 380 460",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7392"},[b("path",{d:"M351.085714 292.571429h321.828572v29.257142H351.085714v-29.257142z m175.542857 125.805714l146.285715 146.285714-20.48 20.48-125.805715-125.805714V731.428571h-29.257142v-272.091428L371.565714 585.142857l-20.48-20.48 146.285715-146.285714h29.257142z",fill:"#FFFFFF","p-id":"7393"})],-1)])])):_("v-if",!0)]),b("div",Sn,S(k(ce)(t.createdTime).format("YYYY-MM-DD HH:mm:ss")),1)])],8,mn),b("div",Tn,[P(a,{class:"box-item",placement:"right-start",trigger:"click"},{reference:z((()=>[P(o,{class:"more-btn"},{default:z((()=>[P(r)])),_:1})])),default:z((()=>[b("div",Cn,[b("div",En,[n[9]||(n[9]=b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/9ad3617c94955bcb76e1b11db70bb80b.png",alt:""},null,-1)),D(" 数据更新时间:"+S(k(ce)(t.date).format("D/M/YYYY")),1)]),t.isTop?(y(),w("div",{key:0,class:"popover-item popover-btn",onClick:e=>q(t.isTop,t.id)},[...n[10]||(n[10]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/a458305d8275734cc96bf6cad29864bf.png",alt:""},null,-1),D(" 取消置顶 ")])],8,Pn)):(y(),w("div",{key:1,class:"popover-item popover-btn",onClick:e=>q(t.isTop,t.id)},[...n[11]||(n[11]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/a458305d8275734cc96bf6cad29864bf.png",alt:""},null,-1),D(" 置顶 ")])],8,zn)),b("div",{class:"popover-item popover-btn",onClick:e=>ee(t.id)},[...n[12]||(n[12]=[b("img",{class:"popover-icon",src:"https://d31zlh4on95l9h.cloudfront.net/images/027718d41523375a69e9cac927601cf8.png",alt:""},null,-1),D(" 删除 ")])],8,Dn)])])),_:2},1024)])],2)))),128))])))),128))]),b("div",{class:"bottom-container"},[b("div",{class:"bottom-btn",onClick:ne,title:"公告"},n[13]||(n[13]=[b("img",{class:"bottom-announcement",src:"https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png",alt:"icon"},null,-1)])),b("div",{class:"bottom-btn",onClick:te,title:"用户反馈"},n[14]||(n[14]=[b("img",{class:"bottom-feedback",src:"https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png",alt:"icon"},null,-1)]))])]))],2)),P(i,{modelValue:T.value,"onUpdate:modelValue":n[2]||(n[2]=e=>T.value=e),title:"永久删除记录",width:U.value},{footer:z((()=>[b("div",et,[P(l,{onClick:n[0]||(n[0]=e=>W())},{default:z((()=>n[24]||(n[24]=[D("取消")]))),_:1}),P(l,{type:"primary",onClick:n[1]||(n[1]=e=>(async()=>{try{const e=await F({model:"AIchat"==s.currentType?1:2,recordId:m.value.id});console.log(e.msg),W(),await K({model:"AIchat"==s.currentType?1:2,token:localStorage.getItem("localToken")})}catch(e){console.error("删除失败",e)}})())},{default:z((()=>n[25]||(n[25]=[D(" 删除 ")]))),_:1})])])),default:z((()=>[n[26]||(n[26]=b("span",null,"删除后,该记录将不可恢复。确认删除吗?",-1))])),_:1},8,["modelValue","width"])],64)}}},[["__scopeId","data-v-5d08dac6"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/components/HistoryRecord.vue"]]);const tt={class:"homepage",id:"testId"},ot={key:0,class:"homepage-logo"},rt=["src"],at={key:1,class:"homepage-right-group"},lt={class:"count-number"},it={class:"main-wrapper"},st={class:"tab-section"},ut=["onClick"],ct={key:0,class:"pc-count-badge"},dt={class:"pc-action-btn"},ft={class:"pc-count-number"},gt={class:"footer-first-line"},pt={class:"left-group"},ht=["src"],vt=["src"],mt={class:"footer-second-line"},yt={class:"input-container"},wt=["src"],bt={class:"homepage-right-group"},_t={class:"count-number"},kt={class:"changeMsg"},It={class:"changeInfo"},xt={class:"changeImg"},At=["src"],St={class:"changeContent"},Tt={class:"changeUsername"},Ct={class:"changeJwcode"},Et={class:"changeRule"},Pt={class:"changeLevel"},zt={class:"changeLevelContent"},Dt=["onClick"],Lt={class:"changeLevelItem"},jt={class:"changeLevelItemToken"},Ft={class:"changeLevelItemToken"},Ot={class:"changeNow"},Rt={class:"changePay"},Ut={class:"changeMsg"},Wt={class:"changeInfo"},Mt={class:"changeImg"},$t=["src"],Vt={class:"changeContent"},Ht={class:"changeJwcode"},Nt={class:"changeLevel"},Bt={class:"changeLevelTitle"},Kt={class:"changeRule"},qt={class:"changeLevelContent"},Yt=["onClick"],Gt={class:"changeLevelItem"},Jt={class:"changeLevelItemToken"},Xt={class:"changeLevelItemToken"},Zt={class:"changeNow"},Qt={class:"changePay"},eo={class:"rechargeDialogBtnGroup"},no={class:"confirmDialogContent"},to={class:"confirmDialogBtnGroup"},oo={class:"changeSuccessDialogContent"};var ro=t({__name:"homePage",setup(e){const n=o(null),t=o(null),l=o(null),{getQueryVariable:i,setActiveTabIndex:s,getUserInfo:u}=X(),c=X(),d=J(),f=ae(),g=ge();r((()=>("AiEmotion"===C.value?f:g).isVoiceEnabled));const C=o(sessionStorage.getItem("activeTabAI")||"AIchat"),L=o(parseInt(sessionStorage.getItem("activeIndexAI")||"0")),j=r((()=>[{name:"AIchat",label:"夺宝奇兵大模型"},{name:"AiEmotion",label:"AI情绪大模型"}])),F=(e,n,t=!1)=>{xe.value=!1,pe.value=!1,console.log("tab",e,"index",n),"AIchat"==e?(oe.value=d.chatInput,console.log("切换到AIchat页面,输入框状态为",oe.value)):"AiEmotion"==e?(oe.value=d.emotionInput,console.log("切换到AiEmotion页面,输入框状态为",oe.value)):oe.value=!1,t&&"AIchat"!==C.value?(C.value="AIchat",L.value=0,sessionStorage.setItem("activeTabAI","AIchat"),sessionStorage.setItem("activeIndexAI","0")):(C.value=e,L.value=n,sessionStorage.setItem("activeTabAI",e),sessionStorage.setItem("activeIndexAI",n.toString())),s(n),console.log(e,n,"tab, index"),Y(document.getElementById("testId"))},O=r((()=>"AIchat"===C.value?sn:"AIfind"===C.value?se:"AiEmotion"===C.value?le:void 0)),G=r((()=>pe.value?fe:de)),Z=()=>{F("AIchat",0,!0)},Q=r((()=>d.UserCount));o(!0);const ee=o(""),ne=o([]),te=r((()=>{d.isLoading})),oe=o(!1),re=e=>{ee.value=e,console.log("updateMessage 的值:",e)};a((()=>d.announcementMsg),(e=>{console.log("监听到公告改变",d.announcementMsg),d.announcementMsg&&!oe.value&&(ee.value=d.announcementMsg,d.announcementMsg=null)})),a((()=>c.isFeedback),(async e=>{c.isFeedback||(pe.value=!1,await p(),Re())})),a((()=>d.chatInput),(async e=>{"AIchat"==C.value&&(oe.value=d.chatInput)})),a((()=>d.emotionInput),(async e=>{"AiEmotion"==C.value&&(oe.value=d.emotionInput)}));const ie=async()=>{var e;if(null==localStorage.getItem("localToken")||""==localStorage.getItem("localToken"))return void h.error("请先登录");if(!ee.value||!ee.value.trim())return void h.warning("输入内容不能为空");if(xe.value=!1,l&&(l.value.selectedRecordId=null),"AiEmotion"===C.value)return oe.value=!0,d.emotionInput=!0,null==(e=t.value)||e.handleSendMessage(ee.value,(()=>{oe.value=!1,d.emotionInput=!1})),void(ee.value="");if(Z(),oe.value)return;oe.value=!0,d.chatInput=!0;const n=ee.value;ee.value="",setTimeout((()=>{console.log("延时后添加消息",n),ne.value=[...ne.value,{sender:"user",content:n,audioArray:[],audioStatus:!1}],console.log(ne.value,"messages.value")}),200)},ue=()=>{console.log("解除禁用"),oe.value=!1},ce=e=>{console.log("接收到历史记录数据:",e),p((()=>{t.value&&t.value.addStock?t.value.addStock(e):console.error("AiEmotion组件或addStock方法不可用")}))},pe=o(!1),he=o(!1),ve=o({AIchat:"true"===sessionStorage.getItem("hasShownTokenRule_AIchat"),AiEmotion:"true"===sessionStorage.getItem("hasShownTokenRule_AiEmotion")}),ye=()=>{he.value=!1},we=()=>{he.value&&(he.value=!1)};v((()=>{document.addEventListener("click",we)})),m((()=>{document.removeEventListener("click",we)}));const be=async()=>{console.log("打开公告"),c.isFeedback=!0,xe.value=!1,pe.value=!0,n.value&&l&&(l.value.isCollapsed=!0)},_e=()=>{console.log("打开用户反馈"),c.isFeedback=!0,pe.value=!1,n.value&&l&&(l.value.isCollapsed=!0)},ke=o(null),Ie=o(null),xe=o(!1),Ae=o(null),Se=o(!1),Te=o(!1),Ce=o(null),Ee=o(!1),Pe=o(null),ze=()=>"AIchat"===C.value?ke.value:"AiEmotion"===C.value?Ie.value:null,De=me.throttle((async()=>{const e=ze();e&&(await p(),xe.value||(e.scrollTop=e.scrollHeight-e.offsetHeight))}),300,{trailing:!1}),Le=me.debounce((()=>{if("AiEmotion"===C.value&&Se.value&&!Te.value&&!Ee.value){const e=Ie.value;e&&(e.scrollTop=e.scrollHeight-e.offsetHeight)}}),150),je=()=>{Te.value=!0,Ce.value&&clearTimeout(Ce.value)};window.handleChartInteractionStart=()=>{console.log("图表交互开始,临时禁用自动滚动"),Ee.value=!0,Pe.value&&clearTimeout(Pe.value)},window.handleChartInteractionEnd=()=>{Pe.value&&clearTimeout(Pe.value),Pe.value=setTimeout((()=>{Ee.value=!1,console.log("图表交互结束,恢复自动滚动")}),1e3)};const Fe=()=>{if("AiEmotion"===C.value){const e=Ie.value;e&&p((()=>{e.scrollTop=e.scrollHeight-e.offsetHeight,console.log("AiEmotion页面:执行容器滚动到底部")}))}},Oe=()=>{Se.value=!1,Te.value=!1,Ce.value&&(clearTimeout(Ce.value),Ce.value=null),Ae.value&&(Ae.value.disconnect(),Ae.value.mutationObserver&&(Ae.value.mutationObserver.disconnect(),Ae.value.mutationObserver=null),Ae.value.scrollListener&&Ie.value&&(Ie.value.removeEventListener("scroll",Ae.value.scrollListener),Ae.value.scrollListener=null),Ae.value=null),console.log("AiEmotion页面高度监听器已停止")};a((()=>d.messages.length),(()=>{"AIchat"===C.value&&De()}),{deep:!1,immediate:!0}),a((()=>d.dbqbClickRecord),(async(e,n)=>{const t=ze();t&&(await p(),t.scrollTop=0)})),a((()=>d.dbqbScrollToTop),(async(e,n)=>{const t=ze();t&&(await p(),t.scrollTop=0)})),a(C,(async()=>{console.log("activeTab变化了",C.value),"AIchat"!=C.value&&"AiEmotion"!=C.value||l.value&&l.value.getHistoryList&&l.value.getHistoryList({model:"AIchat"==C.value?1:2,token:localStorage.getItem("localToken")}),"AIchat"===C.value?(xe.value=!1,Oe(),setTimeout((()=>{}),100)):"AiEmotion"===C.value?(await p(),(()=>{Oe(),Se.value=!0,Ae.value=new ResizeObserver((e=>{Se.value&&"AiEmotion"===C.value&&!Ee.value&&Le()})),document.body&&Ae.value.observe(document.body);const e=new MutationObserver((e=>{let n=!1;e.forEach((e=>{"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>e.nodeType===Node.ELEMENT_NODE?e.offsetHeight>0||e.scrollHeight>0:e.nodeType===Node.TEXT_NODE&&e.textContent.trim().length>0))&&(n=!0)})),n&&Se.value&&"AiEmotion"===C.value&&!Ee.value&&Le()})),n=Ie.value;n&&e.observe(n,{childList:!0,subtree:!0,attributes:!1,characterData:!0}),Ae.value.mutationObserver=e,n&&(n.addEventListener("scroll",je,{passive:!0}),Ae.value.scrollListener=je),console.log("AiEmotion页面高度监听器已启动")})()):Oe()}),{deep:!0,immediate:!0});const Re=me.throttle((()=>{const e=ze();if(!e)return;let n=0;e.addEventListener("scroll",(()=>{const t=e.scrollTop,o=t+e.offsetHeight+70>=e.scrollHeight;"AIchat"===C.value&&(xe.value=!0,o&&(xe.value=!1)),n=t}))}),500,{trailing:!1}),Ue=e=>{const n=document.querySelector("html"),t=document.querySelector("body");if(/Android/i.test(navigator.userAgent)){console.log("是安卓设备"),console.log("window.visualViewport",window.visualViewport.height);document.querySelector(".homepage").style.height=`${e}px`,n.scrollTop=0}else{console.log("非安卓设备"),console.log("调整底部位置",e);document.querySelector(".homepage").style.height=`${e}px`,n.scrollTop=0}setTimeout((()=>{n.style.overflow="hidden",t.style.overflow="hidden"}),200)},We=o(!1),Me=function(){const e=window.visualViewport;setTimeout((()=>{console.log("输入框聚焦"),console.log(e.height,"visualViewport.height");const n=window.innerHeight-e.height;console.log(window.innerHeight,"window.innerHeight"),console.log(n,"keyboardHeight"),Ue(e.height)}),200)},$e=function(){We.value=!1;const e=window.visualViewport;setTimeout((()=>{console.log("输入框失焦");const n=window.innerHeight-e.height;console.log(window.innerHeight,"window.innerHeight"),console.log(e.height,"visualViewport.height"),console.log(n,"keyboardHeight"),Ue(e.height)}),200)};let Ve=null;const He=e=>{if(!c.isFeedback){if(l&&!l.value.isCollapsed)return;const n=ze();n&&n.contains(e.target)||e.preventDefault()}},Ne=me.throttle((async()=>{await new Promise((e=>setTimeout(e,200)));const e=navigator.userAgent;n.value=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),console.log("当前设备为:",n.value?"移动端":"PC端")}),300,{trailing:!1}),Be=()=>{l.value&&void 0!==l.value.isCollapsed&&(console.log("存在"),l.value.isCollapsed=!l.value.isCollapsed,"AIchat"==C.value?d.aiChatCall=!0:"AiEmotion"==C.value&&(d.aiEmotionCall=!0))},Ke=()=>{if(n.value)console.log("用户是移动端"),uni.postMessage({data:{val:{name:"JWopenView",extra:{data:{type:3}}}}});else{console.log("用户是pc端");const e="development";console.log("当前的环境为:",e),window.parent.location.href="http://121.89.234.155:8807/hljw/homepage?menu=999999991"}},qe=o({nickname:"",img:"",jwcode:""}),Ye=o({gold:1,token:1}),Ge=o([{position:10,calculatedPosition:10},{position:20,calculatedPosition:20},{position:50,calculatedPosition:50},{position:100,calculatedPosition:100},{position:200,calculatedPosition:200},{position:500,calculatedPosition:500},{position:1e3,calculatedPosition:1e3}]),Je=o(Ge.value[0]||{position:10,calculatedPosition:10}),Xe=o(90),Ze=o(!1),Qe=o(!1),en=o(!1),nn=o(!1),tn=e=>{console.error("图片加载失败:",e.target.src),e.target.src="https://cdn.legu168.com/jtzy/Product/pcjingwang/images/userimg.png"},on=async()=>{try{c.userInfo.img&&c.userInfo.nickname&&c.userInfo.jwcode||(console.log("缺少用户信息,调用方法"),await u()),qe.value.nickname=c.userInfo.nickname,qe.value.img=c.userInfo.img,qe.value.jwcode=c.userInfo.jwcode,console.log("userInfo",qe.value);const[e,n]=await Promise.all([$(),U({token:String(localStorage.getItem("localToken"))})]);Ge.value=e.data,Je.value=Ge.value[0],Ye.value.token=e.data[0].ratio,Xe.value=n.data.total,Ze.value=!0,console.log("dialogVisible 的值:",Ze.value)}catch(e){console.error("获取兑换列表出错",e)}},rn=e=>{Je.value=e},an=()=>{Xe.value{if(console.log("执行前往充值方法"),sessionStorage.setItem("rechargeFlag","1"),sessionStorage.setItem("activeLevel",JSON.stringify(Je.value)),n.value)console.log("用户是移动端"),uni.postMessage({data:{val:{name:"JWopenView",extra:{data:{type:4}}}}});else{console.log("用户是pc端");const e="development";console.log("当前的环境为:",e),window.parent.location.href="http://121.89.234.155:8807/user/myGold?token="+encodeURIComponent(localStorage.getItem("localToken"))+"&where=xiaocaishen&successUrl=https://hwjb.homilychart.com/aixiaocaishen/homePage"}};return v((async()=>{(()=>{const e=sessionStorage.getItem("activeTabAI");"true"===sessionStorage.getItem("fromExternalPage")&&e&&!ve.value[e]&&(he.value=!0,ve.value[e]=!0,sessionStorage.setItem(`hasShownTokenRule_${e}`,"true"),sessionStorage.removeItem("fromExternalPage"))})(),Ne(),Ve=He,document.addEventListener("touchmove",Ve,{passive:!1}),Y(document.getElementById("testId")),await d.getUserCount(),De(),Re(),window.showCountHandler=on,window.addEventListener("resize",Ne),window.receiveUniAppMessage=async function(e){if(console.log("收到 uni-app 消息:",e),"paymentSuccess"===e.type){const[e,n]=await Promise.all([R({state:1}),U({token:String(localStorage.getItem("localToken"))})]);Xe.value=n.data.total,Qe.value=!1}else console.log("未知消息类型:",e.type)},"1"==sessionStorage.getItem("rechargeFlag")&&"success"==i("successType")&&(await R({state:1}),await on(),Je.value=JSON.parse(sessionStorage.getItem("activeLevel"))||Ge.value[0],console.log("activeLevel",Je.value),sessionStorage.removeItem("activeLevel"),sessionStorage.setItem("rechargeFlag","0"))})),m((()=>{window.removeEventListener("resize",Ne),Ve&&(console.log("卸载touchmoveHandlerRef组件"),document.removeEventListener("touchmove",Ve)),Oe(),delete window.showCountHandler,delete window.receiveUniAppMessage,Pe.value&&clearTimeout(Pe.value),window.handleChartInteractionStart&&delete window.handleChartInteractionStart,window.handleChartInteractionEnd&&delete window.handleChartInteractionEnd})),(e,o)=>{var r,a,i,s,u;const f=E("el-header"),g=E("el-main"),p=E("el-input"),h=E("el-footer"),v=E("el-container"),m=E("el-dialog"),R=E("Close"),U=E("el-icon");return y(),w("div",tt,[_(" 历史记录组件 "),P(nt,{ref_key:"historyRecordRef",ref:l,"current-type":C.value,onSelectRecord:ce,isMobile:n.value,onShowAnnouncement:be,onShowFeedback:_e},null,8,["current-type","isMobile"]),n.value&&!(null==(r=l.value)?void 0:r.isCollapsed)?(y(),w("div",{key:0,class:"zhezhao",onClick:Be})):_("v-if",!0),k(c).isFeedback?(y(),W(v,{key:2,class:A(["main-container",{collapsed:(null==(s=l.value)?void 0:s.isCollapsed)&&!n.value,unCollapsed:!(null==(u=l.value)?void 0:u.isCollapsed)&&!n.value}])},{default:z((()=>[P(f,{class:"homepage-head"},{default:z((()=>[_(" logo "),_(' '),b("div",bt,[b("div",{class:"count-badge",onClick:on},[o[23]||(o[23]=b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/74e20c65c9ef2526477c63ad68698a50.png",class:"action-btn"},null,-1)),b("div",_t,S(Q.value),1),o[24]||(o[24]=b("div",{class:"clickGetCount"},"点击获取Token",-1))]),b("div",{class:"backToHomeBtn",onClick:o[8]||(o[8]=e=>Ke())},o[25]||(o[25]=[b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png",alt:"返回首页",class:"backImg"},null,-1),b("div",{class:"backContent"},"返回首页",-1)])),_(' \r\n ')])])),_:1}),_(" 主体部分:小人 问题轮询图 对话内容 "),P(g,{class:"homepage-body"},{default:z((()=>[(y(),W(N(G.value)))])),_:1})])),_:1},8,["class"])):(y(),W(v,{key:1,class:A(["main-container",{collapsed:(null==(a=l.value)?void 0:a.isCollapsed)&&!n.value,unCollapsed:!(null==(i=l.value)?void 0:i.isCollapsed)&&!n.value}])},{default:z((()=>[_(" AI小财神头部: logo 次数 公告 "),P(f,{class:"homepage-head"},{default:z((()=>[_(" logo "),n.value?(y(),w("div",ot,[b("img",{class:"expand",onClick:Be,src:"https://d31zlh4on95l9h.cloudfront.net/images/37fe3d79a8a700f6c674c9f0e7af066b.png",alt:"icon"}),b("img",{src:k(un),alt:"图片加载失败",class:"logo1"},null,8,rt),_(' 图片加载失败 ')])):_("v-if",!0),n.value?(y(),w("div",at,[b("div",{class:"count-badge",onClick:on},[o[18]||(o[18]=b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/74e20c65c9ef2526477c63ad68698a50.png",class:"action-btn"},null,-1)),b("div",lt,S(Q.value),1),o[19]||(o[19]=b("div",{class:"clickGetCount"},"点击获取Token",-1))]),b("div",{class:"backToHomeBtn",onClick:o[0]||(o[0]=e=>Ke())},o[20]||(o[20]=[b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png",alt:"返回首页",class:"backImg"},null,-1),b("div",{class:"backContent"},"返回首页",-1)])),_(' \r\n ')])):_("v-if",!0)])),_:1}),_(" 主体部分:小人 问题轮询图 对话内容 "),P(g,{class:"homepage-body"},{default:z((()=>[b("div",it,[b("section",st,[b("div",{class:A(["tab-container",{pcTabContainer:!n.value}])},[(y(!0),w(I,null,x(j.value,((e,n)=>(y(),w("div",{key:e.name,onClick:t=>F(e.name,n),class:A(["tab-item",{active:L.value===n&&!pe.value}])},[b("span",null,S(e.label),1)],10,ut)))),128)),n.value?_("v-if",!0):(y(),w("div",ct,[b("div",{class:"pc-countBtn",onClick:on},[b("div",dt,[b("div",ft,S(Q.value),1)]),o[21]||(o[21]=b("div",{class:"pc-clickGetCount"},"点击获取Token",-1))]),b("div",{class:"pc-backToHomeBtn",onClick:o[1]||(o[1]=e=>Ke())},o[22]||(o[22]=[b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png",alt:"返回首页",class:"pc-backImg"},null,-1),b("div",{class:"pc-backContent"},"返回首页",-1)]))]))],2)]),_(" AIchat页面的独立滚动容器 "),V(b("div",{class:A(["tab-content",{pcTabContent:!n.value}]),ref_key:"tabContentAIchat",ref:ke},["AIchat"===C.value?(y(),W(N(O.value),{key:0,messages:ne.value,onUpdateMessage:re,onSendMessage:ie,onEnsureAIchat:Z,onEnableInput:ue},null,40,["messages"])):_("v-if",!0)],2),[[H,"AIchat"===C.value]]),_(" AiEmotion页面的独立滚动容器 "),V(b("div",{class:A(["tab-content",{pcTabContent:!n.value}]),ref_key:"tabContentAiEmotion",ref:Ie},["AiEmotion"===C.value?(y(),W(N(O.value),{key:0,messages:ne.value,onUpdateMessage:re,onSendMessage:ie,onEnsureAIchat:Z,onEnableInput:ue,onScrollToBottom:Fe,onShowCount:on,ref_key:"aiEmotionRef",ref:t},null,40,["messages"])):_("v-if",!0)],2),[[H,"AiEmotion"===C.value]])])])),_:1}),_(" 尾部: 问题输入框 深度思考 多语言 语音播报 "),P(h,{class:A(["homepage-footer",{pcFooter:!n.value}]),id:"input"},{default:z((()=>[_(" 第一行按钮 "),b("div",gt,[b("div",pt,[_(' \r\n \r\n '),_(" 夺宝奇兵大模型按钮 "),b("img",{src:"AIchat"===C.value?k("/aixiaocaishen/static/images/dbqb-button01-62205d53.png"):k("/aixiaocaishen/static/images/dbqb-button02-1cbaed86.png"),onClick:o[2]||(o[2]=e=>F("AIchat",0)),class:"action-btn model-btn",alt:"夺宝奇兵大模型"},null,8,ht),_(" AI情绪大模型按钮 "),b("img",{src:"AiEmotion"===C.value?k("/aixiaocaishen/static/images/emotion-button01-a55ac1f4.png"):k("/aixiaocaishen/static/images/emotion-button02-0024387c.png"),onClick:o[3]||(o[3]=e=>F("AiEmotion",1)),class:"action-btn model-btn",alt:"AI情绪大模型"},null,8,vt),_(' \r\n \r\n ')])]),_(" 第二行输入框 "),b("div",mt,[_(' '),b("div",yt,[P(p,{type:"textarea",modelValue:ee.value,"onUpdate:modelValue":o[4]||(o[4]=e=>ee.value=e),onFocus:Me,onBlur:$e,autosize:{minRows:1,maxRows:4},class:A(["msg-input",{input:!ee.value&&!We.value}]),onKeydown:o[5]||(o[5]=B(M((e=>te.value||oe.value?null:ie()),["exact","prevent"]),["enter"])),disabled:oe.value,resize:"none",onCompositionstart:o[6]||(o[6]=e=>We.value=!0),onCompositionend:o[7]||(o[7]=e=>We.value=!1)},null,8,["modelValue","disabled","class"]),b("img",{src:oe.value?"https://d31zlh4on95l9h.cloudfront.net/images/aa192bcbc1682c97e1bc6fb422f2afff.png":"https://d31zlh4on95l9h.cloudfront.net/images/e6ec2ae238ced85b74e0912e988f243e.png",onClick:ie,class:"action-btn send-btn-inner",style:K({opacity:oe.value?.5:1,cursor:oe.value?"not-allowed":"pointer"})},null,12,wt)])])])),_:1},8,["class"])])),_:1},8,["class"])),_(" 弹窗 "),_(" 新增弹窗组件 "),n.value?(y(),W(m,{key:4,modelValue:Ze.value,"onUpdate:modelValue":o[10]||(o[10]=e=>Ze.value=e),width:"80%"},{default:z((()=>[_(" 中间内容部分 "),b("div",Ut,[b("div",Wt,[b("div",Mt,[b("img",{src:qe.value.img,alt:"头像",class:"changeImgClass",onError:tn},null,40,$t)]),b("div",Vt,[b("div",Ht,"精网号:"+S(qe.value.jwcode),1)])])]),b("div",Nt,[b("div",Bt,[o[29]||(o[29]=D(" 兑换Token ")),b("div",Kt," (兑换规则:"+S(Ye.value.gold)+"金币="+S(Ye.value.token)+"Token) ",1)]),b("div",qt,[(y(!0),w(I,null,x(Ge.value,(e=>(y(),w("div",{class:A(["changeLevelItems",{changeLevelItemsActive:e.position==Je.value.position}]),key:e,onClick:n=>rn(e)},[b("div",Gt,[b("div",Jt,[o[30]||(o[30]=b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/403ef762dd2f335df3b0c9e3fe488375.png",alt:"token",class:"changeLevelItemTokenImg"},null,-1)),D(" "+S(e.calculatedPosition),1)]),b("div",Xt,S(e.position)+" 金币",1)])],10,Yt)))),128))])]),b("div",Zt,[o[31]||(o[31]=D(" 应付金额 ")),b("div",Qt,S(Je.value.position),1),D(" (金币余额:"+S(Xe.value)+") ",1)]),b("div",{class:"changeBtn",onClick:an},"立即兑换")])),_:1},8,["modelValue"])):(y(),W(m,{key:3,modelValue:Ze.value,"onUpdate:modelValue":o[9]||(o[9]=e=>Ze.value=e),width:"48%"},{default:z((()=>[_(" 中间内容部分 "),b("div",kt,[b("div",It,[b("div",xt,[b("img",{src:qe.value.img,alt:"头像",class:"changeImgClass",onError:tn},null,40,At)]),b("div",St,[b("div",Tt,S(qe.value.nickname),1),b("div",Ct,"精网号:"+S(qe.value.jwcode),1)])]),b("div",Et," 兑换规则:"+S(Ye.value.gold)+"金币="+S(Ye.value.token)+"Token ",1)]),b("div",Pt,[o[27]||(o[27]=b("div",{class:"changeLevelTitle"},"兑换Token",-1)),b("div",zt,[(y(!0),w(I,null,x(Ge.value,(e=>(y(),w("div",{class:A(["changeLevelItems",{changeLevelItemsActive:e.position==Je.value.position}]),key:e,onClick:n=>rn(e)},[b("div",Lt,[b("div",jt,[o[26]||(o[26]=b("img",{src:"https://d31zlh4on95l9h.cloudfront.net/images/403ef762dd2f335df3b0c9e3fe488375.png",alt:"token",class:"changeLevelItemTokenImg"},null,-1)),D(" "+S(e.calculatedPosition),1)]),b("div",Ft,S(e.position)+" 金币",1)])],10,Dt)))),128))])]),b("div",Ot,[o[28]||(o[28]=D(" 应付金额 ")),b("div",Rt,S(Je.value.position),1),D(" (金币余额:"+S(Xe.value)+") ",1)]),b("div",{class:"changeBtn",onClick:an},"立即兑换")])),_:1},8,["modelValue"])),P(m,{modelValue:Qe.value,"onUpdate:modelValue":o[12]||(o[12]=e=>Qe.value=e),width:n.value?"60%":"30%","show-close":!1},{default:z((()=>[o[32]||(o[32]=b("div",{class:"rechargeDialogTitle"},"温馨提示",-1)),o[33]||(o[33]=b("div",{class:"rechargeDialogContent"}," 尊敬的用户您好!您当前的金币余额不足,无法进行兑换,可充值金币后进行兑换。点击下方的“前往充值”可进行充值。 ",-1)),b("div",eo,[b("div",{class:"recharge",onClick:ln},"前往充值"),b("div",{class:"rechargeDialogCancel",onClick:o[11]||(o[11]=e=>Qe.value=!1)}," 取消 ")])])),_:1},8,["modelValue","width"]),P(m,{modelValue:en.value,"onUpdate:modelValue":o[15]||(o[15]=e=>en.value=e),width:n.value?"60%":"30%","show-close":!1},{default:z((()=>[o[34]||(o[34]=b("div",{class:"confirmDialogTitle"},"兑换",-1)),b("div",no," 尊敬的用户您好!您确认要花费"+S(Je.value.position)+"金币兑换"+S(Je.value.calculatedPosition)+"Token吗? ",1),b("div",to,[b("div",{class:"confirmDialogConfirm",onClick:o[13]||(o[13]=e=>(async()=>{try{await q({token:String(localStorage.getItem("localToken")),num:Je.value.position}),en.value=!1,Ze.value=!1,nn.value=!0,setTimeout((()=>{nn.value=!1}),2e3),await d.getUserCount()}catch(e){console.error("兑换失败",e)}})())},"确认"),b("div",{class:"confirmDialogCancel",onClick:o[14]||(o[14]=e=>en.value=!1)}," 取消 ")])])),_:1},8,["modelValue","width"]),P(m,{modelValue:nn.value,"onUpdate:modelValue":o[16]||(o[16]=e=>nn.value=e),width:n.value?"60%":"30%","show-close":!1,class:"changeSuccessDialog"},{default:z((()=>[o[35]||(o[35]=b("div",{class:"changeSuccessDialogTitle"},"兑换成功",-1)),b("div",oo," 尊敬的用户,恭喜您成功兑换:"+S(Je.value.calculatedPosition)+" Token ",1)])),_:1},8,["modelValue","width"]),_(" Token规则提示框 "),he.value?(y(),w("div",{key:5,class:"tokenRuleDialog",onClick:ye},[b("div",{class:"tokenRuleDialogContent",onClick:o[17]||(o[17]=M((()=>{}),["stop"]))},[b("div",{class:"tokenRuleDialogClose",onClick:ye},[P(U,null,{default:z((()=>[P(R)])),_:1})]),o[36]||(o[36]=T('
Token规则
Token消耗规则
• 在"夺宝奇兵大模型"、"AI情绪大模型"中搜索股票,若搜索成功,内容正常生成,则会消耗1Token
• 在"夺宝奇兵大模型"、"AI情绪大模型"中搜索股票,若搜索有误,无法生成内容,则不会消耗Token
• 搜索同一只股票,产出内容相同时,只扣除1Token
• "夺宝奇兵"和"AI小财神"中Token是互通的
Token兑换规则
• 点击右上角"获取Token",即可进入Token兑换页进行金币兑换Token
• 金币兑换Token的比例为:1金币=1Token;一经兑换,不予退还
注意:报告生成过程中,请耐心等待,在此期间请勿进行页面刷新操作,以免导致报告生成进程中断
',4))])])):_("v-if",!0)])}}},[["__scopeId","data-v-da5469b0"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/homePage.vue"]]);export{ro as default};