byt-lingxiao-ai 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["index"]=e():t["index"]=e()})("undefined"!==typeof self?self:this,function(){return function(){"use strict";var t={34:function(t,e,n){var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},81:function(t,e,n){var r=n(9565),o=n(9306),i=n(8551),a=n(6823),s=n(851),c=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(o(n))return i(r(n,t));throw new c(a(t)+" is not iterable")}},283:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),c=n(350).CONFIGURABLE,u=n(3706),f=n(1181),p=f.enforce,l=f.get,h=String,d=Object.defineProperty,v=r("".slice),y=r("".replace),g=r([].join),w=s&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===v(h(e),0,7)&&(e="["+y(h(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),w&&n&&a(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=p(t);return a(r,"source")||(r.source=g(m,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return i(this)&&l(this).source||u(this)},"toString")},350:function(t,e,n){var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},397:function(t,e,n){var r=n(7751);t.exports=r("document","documentElement")},421:function(t){t.exports={}},507:function(t,e,n){var r=n(9565);t.exports=function(t,e,n){var o,i,a=n?t:t.iterator,s=t.next;while(!(o=r(s,a)).done)if(i=e(o.value),void 0!==i)return i}},616:function(t,e,n){var r=n(9039);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},679:function(t,e,n){var r=n(1625),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},757:function(t,e,n){var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},851:function(t,e,n){var r=n(6955),o=n(5966),i=n(4117),a=n(6269),s=n(8227),c=s("iterator");t.exports=function(t){if(!i(t))return o(t,c)||o(t,"@@iterator")||a[r(t)]}},1072:function(t,e,n){var r=n(1828),o=n(8727);t.exports=Object.keys||function(t){return r(t,o)}},1108:function(t,e,n){var r=n(6955);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},1181:function(t,e,n){var r,o,i,a=n(8622),s=n(4576),c=n(34),u=n(6699),f=n(9297),p=n(7629),l=n(6119),h=n(421),d="Object already initialized",v=s.TypeError,y=s.WeakMap,g=function(t){return i(t)?o(t):r(t,{})},w=function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}};if(a||p.state){var m=p.state||(p.state=new y);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw new v(d);return e.facade=t,m.set(t,e),e},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var b=l("state");h[b]=!0,r=function(t,e){if(f(t,b))throw new v(d);return e.facade=t,u(t,b,e),e},o=function(t){return f(t,b)?t[b]:{}},i=function(t){return f(t,b)}}t.exports={set:r,get:o,has:i,enforce:g,getterFor:w}},1291:function(t,e,n){var r=n(741);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},1548:function(t,e,n){var r=n(4576),o=n(9039),i=n(9519),a=n(4215),s=r.structuredClone;t.exports=!!s&&!o(function(){if("DENO"===a&&i>92||"NODE"===a&&i>94||"BROWSER"===a&&i>97)return!1;var t=new ArrayBuffer(8),e=s(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})},1625:function(t,e,n){var r=n(9504);t.exports=r({}.isPrototypeOf)},1698:function(t,e,n){var r=n(6518),o=n(4204),i=n(9835),a=n(4916),s=!a("union")||!i("union");r({target:"Set",proto:!0,real:!0,forced:s},{union:o})},1767:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1828:function(t,e,n){var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,f=[];for(n in r)!o(s,n)&&o(r,n)&&c(f,n);while(e.length>u)o(r,n=e[u++])&&(~a(f,n)||c(f,n));return f}},2106:function(t,e,n){var r=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},2140:function(t,e,n){var r=n(8227),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},2195:function(t,e,n){var r=n(9504),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},2211:function(t,e,n){var r=n(9039);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2360:function(t,e,n){var r,o=n(8551),i=n(6801),a=n(8727),s=n(421),c=n(397),u=n(4055),f=n(6119),p=">",l="<",h="prototype",d="script",v=f("IE_PROTO"),y=function(){},g=function(t){return l+d+p+t+l+"/"+d+p},w=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t,e=u("iframe"),n="java"+d+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&r?w(r):m():w(r);var t=a.length;while(t--)delete b[h][a[t]];return b()};s[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(y[h]=o(t),n=new y,y[h]=null,n[v]=t):n=b(),void 0===e?n:i.f(n,e)}},2475:function(t,e,n){var r=n(6518),o=n(8527),i=n(4916),a=!i("isSupersetOf",function(t){return!t});r({target:"Set",proto:!0,real:!0,forced:a},{isSupersetOf:o})},2652:function(t,e,n){var r=n(6080),o=n(9565),i=n(8551),a=n(6823),s=n(4209),c=n(6198),u=n(1625),f=n(81),p=n(851),l=n(9539),h=TypeError,d=function(t,e){this.stopped=t,this.result=e},v=d.prototype;t.exports=function(t,e,n){var y,g,w,m,b,x,S,C=n&&n.that,O=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_RECORD),A=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),j=r(e,C),_=function(t){return y&&l(y,"normal"),new d(!0,t)},k=function(t){return O?(i(t),E?j(t[0],t[1],_):j(t[0],t[1])):E?j(t,_):j(t)};if(T)y=t.iterator;else if(A)y=t;else{if(g=p(t),!g)throw new h(a(t)+" is not iterable");if(s(g)){for(w=0,m=c(t);m>w;w++)if(b=k(t[w]),b&&u(v,b))return b;return new d(!1)}y=f(t,g)}x=T?t.next:y.next;while(!(S=o(x,y)).done){try{b=k(S.value)}catch(P){l(y,"throw",P)}if("object"==typeof b&&b&&u(v,b))return b}return new d(!1)}},2777:function(t,e,n){var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),c=n(8227),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=a(t,f);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2787:function(t,e,n){var r=n(9297),o=n(4901),i=n(8981),a=n(6119),s=n(2211),c=a("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof u?f:null}},2796:function(t,e,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===f||n!==u&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},2839:function(t,e,n){var r=n(4576),o=r.navigator,i=o&&o.userAgent;t.exports=i?String(i):""},2967:function(t,e,n){var r=n(6706),o=n(34),i=n(7750),a=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=r(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(s){}return function(n,r){return i(n),a(r),o(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},3238:function(t,e,n){var r=n(4576),o=n(7811),i=n(7394),a=r.DataView;t.exports=function(t){if(!o||0!==i(t))return!1;try{return new a(t),!1}catch(e){return!0}}},3392:function(t,e,n){var r=n(9504),o=0,i=Math.random(),a=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3440:function(t,e,n){var r=n(7080),o=n(4402),i=n(9286),a=n(5170),s=n(3789),c=n(8469),u=n(507),f=o.has,p=o.remove;t.exports=function(t){var e=r(this),n=s(t),o=i(e);return a(e)<=n.size?c(e,function(t){n.includes(t)&&p(o,t)}):u(n.getIterator(),function(t){f(o,t)&&p(o,t)}),o}},3506:function(t,e,n){var r=n(3925),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},3650:function(t,e,n){var r=n(7080),o=n(4402),i=n(9286),a=n(3789),s=n(507),c=o.add,u=o.has,f=o.remove;t.exports=function(t){var e=r(this),n=a(t).getIterator(),o=i(e);return s(n,function(t){u(e,t)?f(o,t):c(o,t)}),o}},3706:function(t,e,n){var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},3717:function(t,e){e.f=Object.getOwnPropertySymbols},3724:function(t,e,n){var r=n(9039);t.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3789:function(t,e,n){var r=n(9306),o=n(8551),i=n(9565),a=n(1291),s=n(1767),c="Invalid size",u=RangeError,f=TypeError,p=Math.max,l=function(t,e){this.set=t,this.size=p(e,0),this.has=r(t.has),this.keys=r(t.keys)};l.prototype={getIterator:function(){return s(o(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},t.exports=function(t){o(t);var e=+t.size;if(e!==e)throw new f(c);var n=a(e);if(n<0)throw new u(c);return new l(t,n)}},3838:function(t,e,n){var r=n(7080),o=n(5170),i=n(8469),a=n(3789);t.exports=function(t){var e=r(this),n=a(t);return!(o(e)>n.size)&&!1!==i(e,function(t){if(!n.includes(t))return!1},!0)}},3853:function(t,e,n){var r=n(6518),o=n(4449),i=n(4916),a=!i("isDisjointFrom",function(t){return!t});r({target:"Set",proto:!0,real:!0,forced:a},{isDisjointFrom:o})},3925:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)||null===t}},4055:function(t,e,n){var r=n(4576),o=n(34),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},4114:function(t,e,n){var r=n(6518),o=n(8981),i=n(6198),a=n(4527),s=n(6837),c=n(9039),u=c(function(){return 4294967297!==[].push.call({length:4294967296},1)}),f=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},p=u||!f();r({target:"Array",proto:!0,arity:1,forced:p},{push:function(t){var e=o(this),n=i(e),r=arguments.length;s(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return a(e,n),n}})},4117:function(t){t.exports=function(t){return null===t||void 0===t}},4204:function(t,e,n){var r=n(7080),o=n(4402).add,i=n(9286),a=n(3789),s=n(507);t.exports=function(t){var e=r(this),n=a(t).getIterator(),c=i(e);return s(n,function(t){o(c,t)}),c}},4209:function(t,e,n){var r=n(8227),o=n(6269),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},4215:function(t,e,n){var r=n(4576),o=n(2839),i=n(2195),a=function(t){return o.slice(0,t.length)===t};t.exports=function(){return a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}()},4270:function(t,e,n){var r=n(9565),o=n(4901),i=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},4376:function(t,e,n){var r=n(2195);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4402:function(t,e,n){var r=n(9504),o=Set.prototype;t.exports={Set:Set,add:r(o.add),has:r(o.has),remove:r(o["delete"]),proto:o}},4449:function(t,e,n){var r=n(7080),o=n(4402).has,i=n(5170),a=n(3789),s=n(8469),c=n(507),u=n(9539);t.exports=function(t){var e=r(this),n=a(t);if(i(e)<=n.size)return!1!==s(e,function(t){if(n.includes(t))return!1},!0);var f=n.getIterator();return!1!==c(f,function(t){if(o(e,t))return u(f,"normal",!1)})}},4483:function(t,e,n){var r,o,i,a,s=n(4576),c=n(9429),u=n(1548),f=s.structuredClone,p=s.ArrayBuffer,l=s.MessageChannel,h=!1;if(u)h=function(t){f(t,{transfer:[t]})};else if(p)try{l||(r=c("worker_threads"),r&&(l=r.MessageChannel)),l&&(o=new l,i=new p(2),a=function(t){o.port1.postMessage(null,[t])},2===i.byteLength&&(a(i),0===i.byteLength&&(h=a)))}catch(d){}t.exports=h},4495:function(t,e,n){var r=n(9519),o=n(9039),i=n(4576),a=i.String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4527:function(t,e,n){var r=n(3724),o=n(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4549:function(t,e,n){var r=n(4576);t.exports=function(t,e){var n=r.Iterator,o=n&&n.prototype,i=o&&o[t],a=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(s){s instanceof e||(a=!1)}if(!a)return i}},4576:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4644:function(t,e,n){var r,o,i,a=n(7811),s=n(3724),c=n(4576),u=n(4901),f=n(34),p=n(9297),l=n(6955),h=n(6823),d=n(6699),v=n(6840),y=n(2106),g=n(1625),w=n(2787),m=n(2967),b=n(8227),x=n(3392),S=n(1181),C=S.enforce,O=S.get,T=c.Int8Array,A=T&&T.prototype,E=c.Uint8ClampedArray,j=E&&E.prototype,_=T&&w(T),k=A&&w(A),P=Object.prototype,B=c.TypeError,I=b("toStringTag"),R=x("TYPED_ARRAY_TAG"),M="TypedArrayConstructor",D=a&&!!m&&"Opera"!==l(c.opera),L=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},$=function(t){if(!f(t))return!1;var e=l(t);return"DataView"===e||p(z,e)||p(F,e)},N=function(t){var e=w(t);if(f(e)){var n=O(e);return n&&p(n,M)?n[M]:N(e)}},U=function(t){if(!f(t))return!1;var e=l(t);return p(z,e)||p(F,e)},W=function(t){if(U(t))return t;throw new B("Target is not a typed array")},V=function(t){if(u(t)&&(!m||g(_,t)))return t;throw new B(h(t)+" is not a typed array constructor")},J=function(t,e,n,r){if(s){if(n)for(var o in z){var i=c[o];if(i&&p(i.prototype,t))try{delete i.prototype[t]}catch(a){try{i.prototype[t]=e}catch(u){}}}k[t]&&!n||v(k,t,n?e:D&&A[t]||e,r)}},Y=function(t,e,n){var r,o;if(s){if(m){if(n)for(r in z)if(o=c[r],o&&p(o,t))try{delete o[t]}catch(i){}if(_[t]&&!n)return;try{return v(_,t,n?e:D&&_[t]||e)}catch(i){}}for(r in z)o=c[r],!o||o[t]&&!n||v(o,t,e)}};for(r in z)o=c[r],i=o&&o.prototype,i?C(i)[M]=o:D=!1;for(r in F)o=c[r],i=o&&o.prototype,i&&(C(i)[M]=o);if((!D||!u(_)||_===Function.prototype)&&(_=function(){throw new B("Incorrect invocation")},D))for(r in z)c[r]&&m(c[r],_);if((!D||!k||k===P)&&(k=_.prototype,D))for(r in z)c[r]&&m(c[r].prototype,k);if(D&&w(j)!==k&&m(j,k),s&&!p(k,I))for(r in L=!0,y(k,I,{configurable:!0,get:function(){return f(this)?this[R]:void 0}}),z)c[r]&&d(c[r],R,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:L&&R,aTypedArray:W,aTypedArrayConstructor:V,exportTypedArrayMethod:J,exportTypedArrayStaticMethod:Y,getTypedArrayConstructor:N,isView:$,isTypedArray:U,TypedArray:_,TypedArrayPrototype:k}},4659:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=function(t,e,n){r?o.f(t,e,i(0,n)):t[e]=n}},4901:function(t){var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,n){var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",h="writable";e.f=r?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var r=f(t,e);r&&r[h]&&(t[e]=n.value,n={configurable:l in n?n[l]:r[l],enumerable:p in n?n[p]:r[p],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return u(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4916:function(t,e,n){var r=n(7751),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},i=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var n=r("Set");try{(new n)[t](o(0));try{return(new n)[t](o(-1)),!1}catch(s){if(!e)return!0;try{return(new n)[t](i(-1/0)),!1}catch(c){var a=new n;return a.add(1),a.add(2),e(a[t](i(1/0)))}}}catch(c){return!1}}},5024:function(t,e,n){var r=n(6518),o=n(3650),i=n(9835),a=n(4916),s=!a("symmetricDifference")||!i("symmetricDifference");r({target:"Set",proto:!0,real:!0,forced:s},{symmetricDifference:o})},5031:function(t,e,n){var r=n(7751),o=n(9504),i=n(8480),a=n(3717),s=n(8551),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?c(e,n(t)):e}},5169:function(t,e,n){var r=n(3238),o=TypeError;t.exports=function(t){if(r(t))throw new o("ArrayBuffer is detached");return t}},5170:function(t,e,n){var r=n(6706),o=n(4402);t.exports=r(o.proto,"size","get")||function(t){return t.size}},5397:function(t,e,n){var r=n(7055),o=n(7750);t.exports=function(t){return r(o(t))}},5610:function(t,e,n){var r=n(1291),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5636:function(t,e,n){var r=n(4576),o=n(9504),i=n(6706),a=n(7696),s=n(5169),c=n(7394),u=n(4483),f=n(1548),p=r.structuredClone,l=r.ArrayBuffer,h=r.DataView,d=Math.min,v=l.prototype,y=h.prototype,g=o(v.slice),w=i(v,"resizable","get"),m=i(v,"maxByteLength","get"),b=o(y.getInt8),x=o(y.setInt8);t.exports=(f||u)&&function(t,e,n){var r,o=c(t),i=void 0===e?o:a(e),v=!w||!w(t);if(s(t),f&&(t=p(t,{transfer:[t]}),o===i&&(n||v)))return t;if(o>=i&&(!n||v))r=g(t,0,i);else{var y=n&&!v&&m?{maxByteLength:m(t)}:void 0;r=new l(i,y);for(var S=new h(t),C=new h(r),O=d(i,o),T=0;T<O;T++)x(C,T,b(S,T))}return f||u(t),r}},5745:function(t,e,n){var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5854:function(t,e,n){var r=n(2777),o=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw new o("Can't convert number to bigint");return BigInt(e)}},5876:function(t,e,n){var r=n(6518),o=n(3838),i=n(4916),a=!i("isSubsetOf",function(t){return t});r({target:"Set",proto:!0,real:!0,forced:a},{isSubsetOf:o})},5917:function(t,e,n){var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,n){var r=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},6080:function(t,e,n){var r=n(7476),o=n(9306),i=n(616),a=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},6119:function(t,e,n){var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},6193:function(t,e,n){var r=n(4215);t.exports="NODE"===r},6198:function(t,e,n){var r=n(8014);t.exports=function(t){return r(t.length)}},6269:function(t){t.exports={}},6395:function(t){t.exports=!1},6518:function(t,e,n){var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),s=n(9433),c=n(7740),u=n(2796);t.exports=function(t,e){var n,f,p,l,h,d,v=t.target,y=t.global,g=t.stat;if(f=y?r:g?r[v]||s(v,{}):r[v]&&r[v].prototype,f)for(p in e){if(h=e[p],t.dontCallGetSet?(d=o(f,p),l=d&&d.value):l=f[p],n=u(y?p:v+(g?".":"#")+p,t.forced),!n&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(f,p,h,t)}}},6573:function(t,e,n){var r=n(3724),o=n(2106),i=n(3238),a=ArrayBuffer.prototype;r&&!("detached"in a)&&o(a,"detached",{configurable:!0,get:function(){return i(this)}})},6699:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6706:function(t,e,n){var r=n(9504),o=n(9306);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(i){}}},6801:function(t,e,n){var r=n(3724),o=n(8686),i=n(4913),a=n(8551),s=n(5397),c=n(1072);e.f=r&&!o?Object.defineProperties:function(t,e){a(t);var n,r=s(e),o=c(e),u=o.length,f=0;while(u>f)i.f(t,n=o[f++],r[n]);return t}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},6837:function(t){var e=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw e("Maximum allowed index exceeded");return t}},6840:function(t,e,n){var r=n(4901),o=n(4913),i=n(283),a=n(9433);t.exports=function(t,e,n,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(r(n)&&i(n,u,s),s.global)c?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(f){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,n){var r=n(2140),o=n(4901),i=n(2195),a=n(8227),s=a("toStringTag"),c=Object,u="Arguments"===i(function(){return arguments}()),f=function(t,e){try{return t[e]}catch(n){}};t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=f(e=c(t),s))?n:u?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},6969:function(t,e,n){var r=n(2777),o=n(757);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,n){var r=n(4495);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,n){var r=n(9504),o=n(9039),i=n(2195),a=Object,s=r("".split);t.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?s(t,""):a(t)}:a},7080:function(t,e,n){var r=n(4402).has;t.exports=function(t){return r(t),t}},7347:function(t,e,n){var r=n(3724),o=n(9565),i=n(8773),a=n(6980),s=n(5397),c=n(6969),u=n(9297),f=n(5917),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=s(t),e=c(e),f)try{return p(t,e)}catch(n){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},7394:function(t,e,n){var r=n(4576),o=n(6706),i=n(2195),a=r.ArrayBuffer,s=r.TypeError;t.exports=a&&o(a.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==i(t))throw new s("ArrayBuffer expected");return t.byteLength}},7476:function(t,e,n){var r=n(2195),o=n(9504);t.exports=function(t){if("Function"===r(t))return o(t)}},7588:function(t,e,n){var r=n(6518),o=n(9565),i=n(2652),a=n(9306),s=n(8551),c=n(1767),u=n(9539),f=n(4549),p=f("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:p},{forEach:function(t){s(this);try{a(t)}catch(r){u(this,"throw",r)}if(p)return o(p,this,t);var e=c(this),n=0;i(e,function(e){t(e,n++)},{IS_RECORD:!0})}})},7629:function(t,e,n){var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7642:function(t,e,n){var r=n(6518),o=n(3440),i=n(9039),a=n(4916),s=!a("difference",function(t){return 0===t.size}),c=s||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var n=t++>1;return e.has(1)&&e.clear(),{done:n,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size});r({target:"Set",proto:!0,real:!0,forced:c},{difference:o})},7657:function(t,e,n){var r,o,i,a=n(9039),s=n(4901),c=n(34),u=n(2360),f=n(2787),p=n(6840),l=n(8227),h=n(6395),d=l("iterator"),v=!1;[].keys&&(i=[].keys(),"next"in i?(o=f(f(i)),o!==Object.prototype&&(r=o)):v=!0);var y=!c(r)||a(function(){var t={};return r[d].call(t)!==t});y?r={}:h&&(r=u(r)),s(r[d])||p(r,d,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},7696:function(t,e,n){var r=n(1291),o=n(8014),i=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw new i("Wrong length or index");return n}},7740:function(t,e,n){var r=n(9297),o=n(5031),i=n(7347),a=n(4913);t.exports=function(t,e,n){for(var s=o(e),c=a.f,u=i.f,f=0;f<s.length;f++){var p=s[f];r(t,p)||n&&r(n,p)||c(t,p,u(e,p))}}},7750:function(t,e,n){var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,n){var r=n(4576),o=n(4901),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},7811:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7936:function(t,e,n){var r=n(6518),o=n(5636);o&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},8004:function(t,e,n){var r=n(6518),o=n(9039),i=n(8750),a=n(4916),s=!a("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});r({target:"Set",proto:!0,real:!0,forced:s},{intersection:i})},8014:function(t,e,n){var r=n(1291),o=Math.min;t.exports=function(t){var e=r(t);return e>0?o(e,9007199254740991):0}},8100:function(t,e,n){var r=n(6518),o=n(5636);o&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},8111:function(t,e,n){var r=n(6518),o=n(4576),i=n(679),a=n(8551),s=n(4901),c=n(2787),u=n(2106),f=n(4659),p=n(9039),l=n(9297),h=n(8227),d=n(7657).IteratorPrototype,v=n(3724),y=n(6395),g="constructor",w="Iterator",m=h("toStringTag"),b=TypeError,x=o[w],S=y||!s(x)||x.prototype!==d||!p(function(){x({})}),C=function(){if(i(this,d),c(this)===d)throw new b("Abstract class Iterator not directly constructable")},O=function(t,e){v?u(d,t,{configurable:!0,get:function(){return e},set:function(e){if(a(this),this===d)throw new b("You can't redefine this property");l(this,t)?this[t]=e:f(this,t,e)}}):d[t]=e};l(d,m)||O(m,w),!S&&l(d,g)&&d[g]!==Object||O(g,C),C.prototype=d,r({global:!0,constructor:!0,forced:S},{Iterator:C})},8227:function(t,e,n){var r=n(4576),o=n(5745),i=n(9297),a=n(3392),s=n(4495),c=n(7040),u=r.Symbol,f=o("wks"),p=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(u,t)?u[t]:p("Symbol."+t)),f[t]}},8469:function(t,e,n){var r=n(9504),o=n(507),i=n(4402),a=i.Set,s=i.proto,c=r(s.forEach),u=r(s.keys),f=u(new a).next;t.exports=function(t,e,n){return n?o({iterator:u(t),next:f},e):c(t,e)}},8480:function(t,e,n){var r=n(1828),o=n(8727),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},8527:function(t,e,n){var r=n(7080),o=n(4402).has,i=n(5170),a=n(3789),s=n(507),c=n(9539);t.exports=function(t){var e=r(this),n=a(t);if(i(e)<n.size)return!1;var u=n.getIterator();return!1!==s(u,function(t){if(!o(e,t))return c(u,"normal",!1)})}},8551:function(t,e,n){var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},8622:function(t,e,n){var r=n(4576),o=n(4901),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8686:function(t,e,n){var r=n(3724),o=n(9039);t.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8750:function(t,e,n){var r=n(7080),o=n(4402),i=n(5170),a=n(3789),s=n(8469),c=n(507),u=o.Set,f=o.add,p=o.has;t.exports=function(t){var e=r(this),n=a(t),o=new u;return i(e)>n.size?c(n.getIterator(),function(t){p(e,t)&&f(o,t)}):s(e,function(t){n.includes(t)&&f(o,t)}),o}},8773:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},9039:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},9286:function(t,e,n){var r=n(4402),o=n(8469),i=r.Set,a=r.add;t.exports=function(t){var e=new i;return o(t,function(t){a(e,t)}),e}},9297:function(t,e,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},9306:function(t,e,n){var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},9429:function(t,e,n){var r=n(4576),o=n(6193);t.exports=function(t){if(o){try{return r.process.getBuiltinModule(t)}catch(e){}try{return Function('return require("'+t+'")')()}catch(e){}}}},9433:function(t,e,n){var r=n(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9504:function(t,e,n){var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);t.exports=r?a:function(t){return function(){return i.apply(t,arguments)}}},9519:function(t,e,n){var r,o,i=n(4576),a=n(2839),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f&&(r=f.split("."),o=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(o=+r[1]))),t.exports=o},9539:function(t,e,n){var r=n(9565),o=n(8551),i=n(5966);t.exports=function(t,e,n){var a,s;o(t);try{if(a=i(t,"return"),!a){if("throw"===e)throw n;return n}a=r(a,t)}catch(c){s=!0,a=c}if("throw"===e)throw n;if(s)throw a;return o(a),n}},9565:function(t,e,n){var r=n(616),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},9577:function(t,e,n){var r=n(9928),o=n(4644),i=n(1108),a=n(1291),s=n(5854),c=o.aTypedArray,u=o.getTypedArrayConstructor,f=o.exportTypedArrayMethod,p=function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),l=p&&function(){try{new Int8Array(1)["with"](-.5,1)}catch(t){return!0}}();f("with",{with:function(t,e){var n=c(this),o=a(t),f=i(n)?s(e):+e;return r(n,u(n),o,f)}}["with"],!p||l)},9617:function(t,e,n){var r=n(5397),o=n(5610),i=n(6198),a=function(t){return function(e,n,a){var s=r(e),c=i(s);if(0===c)return!t&&-1;var u,f=o(a,c);if(t&&n!==n){while(c>f)if(u=s[f++],u!==u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9835:function(t){t.exports=function(t){try{var e=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[t](n);return 1===r.size&&4===r.values().next().value}catch(o){return!1}}},9928:function(t,e,n){var r=n(6198),o=n(1291),i=RangeError;t.exports=function(t,e,n,a){var s=r(t),c=o(n),u=c<0?s+c:c;if(u>=s||u<0)throw new i("Incorrect index");for(var f=new e(s),p=0;p<s;p++)f[p]=p===u?a:t[p];return f}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}!function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.p=""}();var r={};if(n.r(r),n.d(r,{ChatWindow:function(){return d},default:function(){return w}}),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n(8111),n(7588);var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat"},[e("audio",{ref:"audioPlayer",staticClass:"hidden-audio",on:{timeupdate:t.onTimeUpdate,ended:t.onAudioEnded}},[e("source",{attrs:{src:t.audioSrc,type:"audio/mpeg"}}),t._v(" 您的浏览器不支持音频元素。 ")]),"leaving"!==t.robotStatus?e("div",{class:["chat-robot",t.robotStatus]}):e("div",{staticClass:"chat-ai",on:{click:t.toggleWindow}},[e("div",{class:["chat-ai-avater",t.avaterStatus]}),e("div",{staticClass:"chat-ai-text"},[t._v(t._s(t.avaterText))])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"chat-overlay",on:{click:t.handleOverlayClick}},[e("div",{staticClass:"chat-window",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"chat-window-header"},[e("div",{staticClass:"chat-window-header-title"},[t._v("凌霄大模型AI对话")]),e("div",{staticClass:"chat-window-header-close",on:{click:function(e){t.visible=!1}}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"}},[e("path",{attrs:{d:"M5.50002 5.5L18.5 18.5",stroke:"#4E5969","stroke-width":"1.89404","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M5.50002 18.5L18.5 5.5",stroke:"#4E5969","stroke-width":"1.89404","stroke-linecap":"round","stroke-linejoin":"round"}})])])]),e("div",{ref:"chatArea",staticClass:"chat-window-content scrollbar-hide"},t._l(t.messages,function(n){return e("div",{key:n.id,staticClass:"chat-window-message"},["user"===n.type?e("div",{staticClass:"chat-window-message-user"},[e("div",{staticClass:"user-message"},[t._v(t._s(n.content))])]):e("div",{staticClass:"chat-window-message-ai"},[e("div",{staticClass:"ai-render"},[e("div",{staticClass:"ai-thinking"},[e("div",{staticClass:"ai-thinking-time"},[t._v("思考用时"+t._s(n.time)+"秒")]),e("div",{staticClass:"ai-thinking-content"},[t._v(t._s(n.thinking))])]),e("div",{staticClass:"ai-content"},[t._v(t._s(n.content))])])])])}),0),e("div",{staticClass:"chat-window-footer"},[e("div",{staticClass:"chat-window-textarea"},[e("el-input",{staticClass:"chat-window-input",attrs:{type:"textarea",placeholder:"有什么我能帮您的吗?",rows:"2",resize:"none"},on:{keydown:t.handleKeyDown},model:{value:t.inputMessage,callback:function(e){t.inputMessage=e},expression:"inputMessage"}}),e("div",{staticClass:"chat-window-bar"},[e("div",{staticClass:"chat-window-send",on:{click:t.handleSend}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"}},[e("g",{attrs:{"clip-path":"url(#clip0_640_2107)"}},[e("path",{attrs:{d:"M18.6427 2.37822C19.3253 2.47432 19.8025 3.10738 19.7065 3.79002C19.6871 3.97072 19.5381 4.41327 19.5403 4.41161L14.9673 17.8079L14.9632 17.8093C14.7858 18.3838 14.212 18.7607 13.5971 18.6744C13.4173 18.6492 13.2504 18.5862 13.1055 18.4949L13.0973 18.4977L9.83449 16.3686C9.58371 16.2584 9.4276 15.9939 9.46729 15.7115C9.5154 15.3691 9.83278 15.1317 10.1751 15.1798C10.293 15.1964 10.3988 15.2448 10.4853 15.3161L13.4054 17.2314L13.4073 17.2317C13.4452 17.2566 13.4882 17.2746 13.5364 17.2814C13.6911 17.3029 13.8371 17.2052 13.8793 17.0593L18.0469 4.89796L8.27396 14.3367L7.77435 17.8916C7.72706 18.2281 7.41369 18.464 7.07727 18.4169C6.74073 18.3696 6.50469 18.0564 6.55198 17.7198L7.07633 13.9889C7.08231 13.9464 7.09382 13.9066 7.10727 13.867C7.13549 13.7645 7.19079 13.6657 7.27291 13.5866L17.0754 4.12041L2.68514 8.17767L2.68487 8.1796C2.58481 8.21873 2.50686 8.31058 2.49042 8.42643C2.47412 8.5424 2.52417 8.65007 2.6093 8.71729L2.60903 8.71922L3.28261 9.16101L3.28013 9.16461C3.47505 9.29254 3.58819 9.52563 3.55386 9.77111C3.50575 10.1134 3.18836 10.3509 2.84602 10.3028C2.75512 10.29 2.6708 10.2584 2.59833 10.2127L2.59806 10.2147L1.37843 9.42001L1.37951 9.41227C1.02215 9.14901 0.816644 8.70195 0.882687 8.23203C0.951867 7.74096 1.29791 7.35545 1.73968 7.21445L1.73995 7.21251L17.7833 2.57104C18.0287 2.41036 18.3294 2.3342 18.6427 2.37822Z",fill:"#013378"}}),e("path",{attrs:{d:"M3.1309 10.9936C3.2178 10.5684 3.82528 10.5684 3.91218 10.9936C4.10411 11.9326 4.83794 12.6664 5.77697 12.8584C6.20213 12.9453 6.20213 13.5527 5.77697 13.6397C4.83794 13.8316 4.10411 14.5654 3.91218 15.5044C3.82528 15.9296 3.2178 15.9296 3.1309 15.5044C2.93897 14.5654 2.20513 13.8316 1.26611 13.6397C0.840944 13.5527 0.840944 12.9453 1.26611 12.8584C2.20513 12.6664 2.93897 11.9326 3.1309 10.9936Z",fill:"#2B80F6"}}),e("path",{attrs:{d:"M6.20382 8.56242C6.25596 8.30732 6.62045 8.30732 6.67259 8.56242C6.78775 9.12583 7.22805 9.56613 7.79146 9.68129C8.04656 9.73343 8.04656 10.0979 7.79146 10.1501C7.22805 10.2652 6.78775 10.7055 6.67259 11.2689C6.62045 11.524 6.25596 11.524 6.20382 11.2689C6.08866 10.7055 5.64836 10.2652 5.08495 10.1501C4.82985 10.0979 4.82985 9.73343 5.08495 9.68129C5.64836 9.56613 6.08866 9.12583 6.20382 8.56242Z",fill:"#2B80F6"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_640_2107"}},[e("rect",{attrs:{width:"20",height:"20",fill:"white"}})])])])])])],1)])])])])},s=[];n(4114),n(6573),n(8100),n(7936),n(7642),n(8004),n(3853),n(5876),n(2475),n(5024),n(1698),n(9577);const c=16e3,u=512;var f={name:"ChatWindow",props:{appendToBody:{type:Boolean,default:!0}},data(){return{audioSrc:"/minio/lingxiaoai/byt.mp3",inputMessage:"",visible:!1,messages:[{id:1,type:"user",sender:"",time:"",content:"你好,欢迎来到凌霄大模型AI对话。"},{id:2,type:"ai",sender:"AI",time:"",thinking:"嗯,用户问的是回转窑的工业应用。首先,我需要回忆一下之前对话的内容。用户之前让我解释了水泥的制作流程,特别是提到了回转窑在高温煅烧熟料中的作用。",charts:[{title:"",options:{}}],content:"回转窑(Rotary Kiln)是一种长筒形旋转煅烧设备(类似倾斜安装的大管子),因其独特的旋转运动和高温耐火衬里设计,在多个工业领域都有广泛应用"}],isRecording:!1,isMicAvailable:!1,mediaRecorder:null,ws:null,wsUrl:"ws://192.168.8.9:9999/ai_model/ws/voice-stream",isConnected:!1,audioContext:null,microphone:null,processor:null,robotStatus:"leaving",avaterStatus:"normal",buffer:"",currentMessage:null,inTag:!1,tagBuilder:"",audioBuffer:new Float32Array(0)}},computed:{avaterText(){const t={normal:"凌霄AI",thinking:"思考中",output:"语音中"};return t[this.avaterStatus]}},mounted(){this.initWebSocket(),this.appendToBody&&this.appendToBodyHandler()},unmounted(){this.closeWebSocket(),this.stopRecording()},beforeDestroy(){this.appendToBody&&this.$el.parentElement===document.body&&document.body.removeChild(this.$el),this.closeWebSocket(),this.stopRecording()},methods:{onAudioEnded(){this.robotStatus="leaving",this.jumpedTimePoints.clear()},onTimeUpdate(){const t=this.$refs.audioPlayer,e=t.currentTime;this.jumpedTimePoints||(this.jumpedTimePoints=new Set);const n=[{time:40,url:"/permission/user",name:"permission_user",title:"用户管理"},{time:65,url:"/permission/menu",name:"permission_menu",title:"菜单管理"},{time:75,url:"/permission/role",name:"permission_role",title:"角色管理"}];n.forEach(t=>{e>=t.time&&e<t.time+.5&&!this.jumpedTimePoints.has(t.time)&&(this.jumpedTimePoints.add(t.time),console.log(`到达时间点 ${t.time} 秒,跳转到 ${t.title}`),this.$appOptions.store.dispatch("tags/addTagview",{path:t.url,fullPath:t.url,label:t.title,name:t.title,meta:{title:t.title},query:{},params:{}}),this.$appOptions.router.push({path:t.url}))}),console.log("当前播放时间:",e)},play(){this.robotStatus="speaking",this.$refs.audioPlayer.play()},pause(){this.robotStatus="waiting",this.$refs.audioPlayer.pause()},stop(){this.robotStatus="leaving",this.$refs.audioPlayer.pause(),this.$refs.audioPlayer.currentTime=0,this.jumpedTimePoints.clear()},initWebSocket(){try{this.ws=new WebSocket(this.wsUrl),this.ws.binaryType="arraybuffer",this.ws.onopen=async()=>{console.log("连接成功"),this.isConnected=!0,this.initAudio()},this.ws.onmessage=t=>{try{if(console.log("收到原始消息:",t.data),t.data instanceof ArrayBuffer)return void console.log("收到二进制音频数据");const e=JSON.parse(t.data);console.log("解析后的数据:",e),"config"===e.type?console.log("配置信息:",e):0===e.code?"detection"===e.data.type?(console.log("检测到唤醒词..."),this.avaterStatus="normal"):"Collecting"===e.data.type?(console.log("状态: 采集中..."),this.avaterStatus="thinking"):"command"===e.data.type?(console.log("状态: 处理中..."),this.analyzeAudioCommand(e.data.category)):console.log("状态: 其他..."):console.error("服务器返回错误:",e.msg)}catch(e){console.error("消息解析错误:",e)}},this.ws.onclose=()=>{console.log("连接关闭"),this.isConnected=!1,this.isRecording&&this.stopRecording(),setTimeout(()=>{console.log("尝试重新建立连接"),this.isConnected||this.initWebSocket()},3e3)}}catch(t){console.error("WebSocket连接失败:",t)}},closeWebSocket(){this.ws&&this.ws.close()},createAiMessage(){const t={id:this.messages.length+1,type:"ai",sender:"AI",time:"",thinking:"",charts:[],content:""};return this.messages.push(t),this.currentMessage=t,t},createUserMessage(t){const e={id:this.messages.length+1,type:"user",sender:"用户",time:"",content:t};return this.messages.push(e),this.inputMessage="",e},async initAudio(){if(!this.isRecording)try{this.isMicAvailable=!0;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:c,channelCount:1,noiseSuppression:!0,echoCancellation:!0}});this.audioContext=new AudioContext({sampleRate:c});const e=this.audioContext.sampleRate;this.microphone=this.audioContext.createMediaStreamSource(t),this.processor=this.audioContext.createScriptProcessor(u,1,1),this.processor.onaudioprocess=this.processAudio,this.microphone.connect(this.processor),this.processor.connect(this.audioContext.destination),this.isRecording=!0,console.log(`状态: 录音中 (采样率: ${e}Hz)`)}catch(t){console.error("音频初始化失败:",t),this.isRecording=!1,this.isMicAvailable=!1}},async handleSend(){if(!this.inputMessage.trim())return;const t=this.inputMessage.trim();this.initState(),this.createUserMessage(t),this.createAiMessage();try{const e=new AbortController,n="Bearer e298f087-85bc-48c2-afb9-7c69ffc911aa",r=await fetch("/bytserver/api-model/chat/stream",{timeout:3e4,method:"POST",signal:e.signal,headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({content:t})});if(!r.ok)throw new Error(`${r.status}`);const o=r.body.getReader(),i=new TextDecoder;while(1){const{done:t,value:e}=await o.read();if(t)break;const n=i.decode(e,{stream:!0});this.processStreamChunk(n)}}catch(e){console.error("发送消息失败:",e)}},initState(){},analyzeAudioCommand(t){console.log("分析音频命令:",t),"C5"===t?(this.robotStatus="entering",setTimeout(()=>{this.robotStatus="speaking",this.play()},3e3)):"C8"===t?(this.robotStatus="speaking",this.play()):"C7"===t?(this.robotStatus="waiting",this.pause()):"C6"===t&&(this.robotStatus="leaving",this.stop())},processStreamChunk(t){console.log("原始数据:",t);try{this.buffer+=t;while(1){const t=this.buffer.indexOf("\n\n");if(-1===t)break;const e=this.buffer.slice(0,t);this.buffer=this.buffer.slice(t+2),console.log("解析数据:",e),this.processEventData(e)}}catch(e){console.error("流数据处理异常:",e),this.streaming=!1,this.response=this.$t("3d.chat.dataFormatError"),this.$forceUpdate()}},processEventData(t){t.split("\n").forEach(t=>{if(console.log("原始数据:",t),!t.startsWith("data:"))return;const e=t.replace(/^data:\s*/,"").trim();if("[DONE]"!==e)try{const t=this.safeJsonParse(e);this.processContentDelta(t.choices[0].delta)}catch(n){console.warn("JSON解析跳过:",n.message)}})},safeJsonParse(t){try{return JSON.parse(t)}catch(e){return console.warn("JSON parse failed:",t),null}},processContentDelta(t){const e=t.content||"";if(e&&this.currentMessage){for(let t=0;t<e.length;t++){const n=e[t];if(this.inTag){if(this.tagBuilder+=n,">"===n){const t=this.tagBuilder;"<think>"===t?this.avaterStatus="thinking":"</think>"===t?this.avaterStatus="output":console.log("无效标签:",t),this.inTag=!1,this.tagBuilder=""}}else"<"!==n?"thinking"===this.avaterStatus?this.currentMessage.thinking+=n:this.currentMessage.content+=n:(this.inTag=!0,this.tagBuilder="<")}this.$forceUpdate()}},processAudio(t){if(!this.isRecording)return;const e=t.inputBuffer.getChannelData(0),n=new Float32Array(this.audioBuffer.length+e.length);n.set(this.audioBuffer,0),n.set(e,this.audioBuffer.length),this.audioBuffer=n;while(this.audioBuffer.length>=u){const t=this.audioBuffer.slice(0,u);this.audioBuffer=this.audioBuffer.slice(u);const e=this.floatTo16BitPCM(t);this.ws&&this.ws.readyState===this.ws.OPEN&&this.ws.send(e)}},floatTo16BitPCM(t){const e=new Int16Array(t.length);for(let n=0;n<t.length;n++){const r=Math.max(-1,Math.min(1,t[n]));e[n]=r<0?32768*r:32767*r}return e.buffer},toggleWindow(){this.visible=!this.visible},showWindow(){this.visible=!0},hideWindow(){this.visible=!1},scrollToBottom(){this.$nextTick(()=>{const t=this.$refs.chatArea;t&&(t.scrollTop=t.scrollHeight)})},handleKeyDown(t){"Enter"!==t.key||t.shiftKey||(t.preventDefault(),this.handleSend())},stopRecording(){this.isRecording&&(this.microphone&&this.microphone.disconnect(),this.processor&&this.processor.disconnect(),this.analyser&&this.analyser.disconnect(),this.audioContext&&this.audioContext.close().catch(t=>{console.error("关闭音频上下文失败:",t)}),this.isRecording=!1)},appendToBodyHandler(){this.$nextTick(()=>{this.$el.parentElement!==document.body&&document.body.appendChild(this.$el)})},handleOverlayClick(){this.visible=!1}},watch:{messages:{handler(){this.scrollToBottom()},deep:!0}}},p=f;function l(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:u}}var h=l(p,a,s,!1,null,"62955cf4",null),d=h.exports;const v={ChatWindow:d},y=function(t,e={}){y.installed||(y.installed=!0,t.prototype.$appOptions=e,Object.keys(v).forEach(e=>{t.component(e,v[e])}))};"undefined"!==typeof window&&window.Vue&&y(window.Vue);var g={install:y,...v},w=g;return r}()});
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["index"]=e():t["index"]=e()})("undefined"!==typeof self?self:this,function(){return function(){"use strict";var t={34:function(t,e,n){var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},81:function(t,e,n){var r=n(9565),o=n(9306),i=n(8551),s=n(6823),a=n(851),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(o(n))return i(r(n,t));throw new u(s(t)+" is not iterable")}},283:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),s=n(9297),a=n(3724),u=n(350).CONFIGURABLE,c=n(3706),f=n(1181),h=f.enforce,l=f.get,p=String,d=Object.defineProperty,v=r("".slice),y=r("".replace),g=r([].join),m=a&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),w=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===v(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||u&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=h(t);return s(r,"source")||(r.source=g(w,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return i(this)&&l(this).source||c(this)},"toString")},350:function(t,e,n){var r=n(3724),o=n(9297),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},397:function(t,e,n){var r=n(7751);t.exports=r("document","documentElement")},421:function(t){t.exports={}},507:function(t,e,n){var r=n(9565);t.exports=function(t,e,n){var o,i,s=n?t:t.iterator,a=t.next;while(!(o=r(a,s)).done)if(i=e(o.value),void 0!==i)return i}},616:function(t,e,n){var r=n(9039);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},679:function(t,e,n){var r=n(1625),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},757:function(t,e,n){var r=n(7751),o=n(4901),i=n(1625),s=n(7040),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},851:function(t,e,n){var r=n(6955),o=n(5966),i=n(4117),s=n(6269),a=n(8227),u=a("iterator");t.exports=function(t){if(!i(t))return o(t,u)||o(t,"@@iterator")||s[r(t)]}},1072:function(t,e,n){var r=n(1828),o=n(8727);t.exports=Object.keys||function(t){return r(t,o)}},1108:function(t,e,n){var r=n(6955);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},1181:function(t,e,n){var r,o,i,s=n(8622),a=n(4576),u=n(34),c=n(6699),f=n(9297),h=n(7629),l=n(6119),p=n(421),d="Object already initialized",v=a.TypeError,y=a.WeakMap,g=function(t){return i(t)?o(t):r(t,{})},m=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}};if(s||h.state){var w=h.state||(h.state=new y);w.get=w.get,w.has=w.has,w.set=w.set,r=function(t,e){if(w.has(t))throw new v(d);return e.facade=t,w.set(t,e),e},o=function(t){return w.get(t)||{}},i=function(t){return w.has(t)}}else{var b=l("state");p[b]=!0,r=function(t,e){if(f(t,b))throw new v(d);return e.facade=t,c(t,b,e),e},o=function(t){return f(t,b)?t[b]:{}},i=function(t){return f(t,b)}}t.exports={set:r,get:o,has:i,enforce:g,getterFor:m}},1291:function(t,e,n){var r=n(741);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},1548:function(t,e,n){var r=n(4576),o=n(9039),i=n(9519),s=n(4215),a=r.structuredClone;t.exports=!!a&&!o(function(){if("DENO"===s&&i>92||"NODE"===s&&i>94||"BROWSER"===s&&i>97)return!1;var t=new ArrayBuffer(8),e=a(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})},1625:function(t,e,n){var r=n(9504);t.exports=r({}.isPrototypeOf)},1698:function(t,e,n){var r=n(6518),o=n(4204),i=n(9835),s=n(4916),a=!s("union")||!i("union");r({target:"Set",proto:!0,real:!0,forced:a},{union:o})},1767:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1828:function(t,e,n){var r=n(9504),o=n(9297),i=n(5397),s=n(9617).indexOf,a=n(421),u=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,f=[];for(n in r)!o(a,n)&&o(r,n)&&u(f,n);while(e.length>c)o(r,n=e[c++])&&(~s(f,n)||u(f,n));return f}},2106:function(t,e,n){var r=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},2140:function(t,e,n){var r=n(8227),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},2195:function(t,e,n){var r=n(9504),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},2211:function(t,e,n){var r=n(9039);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2360:function(t,e,n){var r,o=n(8551),i=n(6801),s=n(8727),a=n(421),u=n(397),c=n(4055),f=n(6119),h=">",l="<",p="prototype",d="script",v=f("IE_PROTO"),y=function(){},g=function(t){return l+d+h+t+l+"/"+d+h},m=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},w=function(){var t,e=c("iframe"),n="java"+d+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&r?m(r):w():m(r);var t=s.length;while(t--)delete b[p][s[t]];return b()};a[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(y[p]=o(t),n=new y,y[p]=null,n[v]=t):n=b(),void 0===e?n:i.f(n,e)}},2475:function(t,e,n){var r=n(6518),o=n(8527),i=n(4916),s=!i("isSupersetOf",function(t){return!t});r({target:"Set",proto:!0,real:!0,forced:s},{isSupersetOf:o})},2652:function(t,e,n){var r=n(6080),o=n(9565),i=n(8551),s=n(6823),a=n(4209),u=n(6198),c=n(1625),f=n(81),h=n(851),l=n(9539),p=TypeError,d=function(t,e){this.stopped=t,this.result=e},v=d.prototype;t.exports=function(t,e,n){var y,g,m,w,b,x,S,C=n&&n.that,k=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_RECORD),A=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),E=r(e,C),_=function(t){return y&&l(y,"normal"),new d(!0,t)},j=function(t){return k?(i(t),O?E(t[0],t[1],_):E(t[0],t[1])):O?E(t,_):E(t)};if(T)y=t.iterator;else if(A)y=t;else{if(g=h(t),!g)throw new p(s(t)+" is not iterable");if(a(g)){for(m=0,w=u(t);w>m;m++)if(b=j(t[m]),b&&c(v,b))return b;return new d(!1)}y=f(t,g)}x=T?t.next:y.next;while(!(S=o(x,y)).done){try{b=j(S.value)}catch(M){l(y,"throw",M)}if("object"==typeof b&&b&&c(v,b))return b}return new d(!1)}},2777:function(t,e,n){var r=n(9565),o=n(34),i=n(757),s=n(5966),a=n(4270),u=n(8227),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,u=s(t,f);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},2787:function(t,e,n){var r=n(9297),o=n(4901),i=n(8981),s=n(6119),a=n(2211),u=s("IE_PROTO"),c=Object,f=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=i(t);if(r(e,u))return e[u];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof c?f:null}},2796:function(t,e,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,s=function(t,e){var n=u[a(t)];return n===f||n!==c&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},2839:function(t,e,n){var r=n(4576),o=r.navigator,i=o&&o.userAgent;t.exports=i?String(i):""},2967:function(t,e,n){var r=n(6706),o=n(34),i=n(7750),s=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=r(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(a){}return function(n,r){return i(n),s(r),o(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},3238:function(t,e,n){var r=n(4576),o=n(7811),i=n(7394),s=r.DataView;t.exports=function(t){if(!o||0!==i(t))return!1;try{return new s(t),!1}catch(e){return!0}}},3392:function(t,e,n){var r=n(9504),o=0,i=Math.random(),s=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},3440:function(t,e,n){var r=n(7080),o=n(4402),i=n(9286),s=n(5170),a=n(3789),u=n(8469),c=n(507),f=o.has,h=o.remove;t.exports=function(t){var e=r(this),n=a(t),o=i(e);return s(e)<=n.size?u(e,function(t){n.includes(t)&&h(o,t)}):c(n.getIterator(),function(t){f(o,t)&&h(o,t)}),o}},3506:function(t,e,n){var r=n(3925),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},3650:function(t,e,n){var r=n(7080),o=n(4402),i=n(9286),s=n(3789),a=n(507),u=o.add,c=o.has,f=o.remove;t.exports=function(t){var e=r(this),n=s(t).getIterator(),o=i(e);return a(n,function(t){c(e,t)?f(o,t):u(o,t)}),o}},3706:function(t,e,n){var r=n(9504),o=n(4901),i=n(7629),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},3717:function(t,e){e.f=Object.getOwnPropertySymbols},3724:function(t,e,n){var r=n(9039);t.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3789:function(t,e,n){var r=n(9306),o=n(8551),i=n(9565),s=n(1291),a=n(1767),u="Invalid size",c=RangeError,f=TypeError,h=Math.max,l=function(t,e){this.set=t,this.size=h(e,0),this.has=r(t.has),this.keys=r(t.keys)};l.prototype={getIterator:function(){return a(o(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},t.exports=function(t){o(t);var e=+t.size;if(e!==e)throw new f(u);var n=s(e);if(n<0)throw new c(u);return new l(t,n)}},3838:function(t,e,n){var r=n(7080),o=n(5170),i=n(8469),s=n(3789);t.exports=function(t){var e=r(this),n=s(t);return!(o(e)>n.size)&&!1!==i(e,function(t){if(!n.includes(t))return!1},!0)}},3853:function(t,e,n){var r=n(6518),o=n(4449),i=n(4916),s=!i("isDisjointFrom",function(t){return!t});r({target:"Set",proto:!0,real:!0,forced:s},{isDisjointFrom:o})},3925:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)||null===t}},4055:function(t,e,n){var r=n(4576),o=n(34),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},4114:function(t,e,n){var r=n(6518),o=n(8981),i=n(6198),s=n(4527),a=n(6837),u=n(9039),c=u(function(){return 4294967297!==[].push.call({length:4294967296},1)}),f=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=c||!f();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=o(this),n=i(e),r=arguments.length;a(n+r);for(var u=0;u<r;u++)e[n]=arguments[u],n++;return s(e,n),n}})},4117:function(t){t.exports=function(t){return null===t||void 0===t}},4204:function(t,e,n){var r=n(7080),o=n(4402).add,i=n(9286),s=n(3789),a=n(507);t.exports=function(t){var e=r(this),n=s(t).getIterator(),u=i(e);return a(n,function(t){o(u,t)}),u}},4209:function(t,e,n){var r=n(8227),o=n(6269),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},4215:function(t,e,n){var r=n(4576),o=n(2839),i=n(2195),s=function(t){return o.slice(0,t.length)===t};t.exports=function(){return s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}()},4270:function(t,e,n){var r=n(9565),o=n(4901),i=n(34),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw new s("Can't convert object to primitive value")}},4376:function(t,e,n){var r=n(2195);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4402:function(t,e,n){var r=n(9504),o=Set.prototype;t.exports={Set:Set,add:r(o.add),has:r(o.has),remove:r(o["delete"]),proto:o}},4449:function(t,e,n){var r=n(7080),o=n(4402).has,i=n(5170),s=n(3789),a=n(8469),u=n(507),c=n(9539);t.exports=function(t){var e=r(this),n=s(t);if(i(e)<=n.size)return!1!==a(e,function(t){if(n.includes(t))return!1},!0);var f=n.getIterator();return!1!==u(f,function(t){if(o(e,t))return c(f,"normal",!1)})}},4483:function(t,e,n){var r,o,i,s,a=n(4576),u=n(9429),c=n(1548),f=a.structuredClone,h=a.ArrayBuffer,l=a.MessageChannel,p=!1;if(c)p=function(t){f(t,{transfer:[t]})};else if(h)try{l||(r=u("worker_threads"),r&&(l=r.MessageChannel)),l&&(o=new l,i=new h(2),s=function(t){o.port1.postMessage(null,[t])},2===i.byteLength&&(s(i),0===i.byteLength&&(p=s)))}catch(d){}t.exports=p},4495:function(t,e,n){var r=n(9519),o=n(9039),i=n(4576),s=i.String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4527:function(t,e,n){var r=n(3724),o=n(4376),i=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!s(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4549:function(t,e,n){var r=n(4576);t.exports=function(t,e){var n=r.Iterator,o=n&&n.prototype,i=o&&o[t],s=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(a){a instanceof e||(s=!1)}if(!s)return i}},4576:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4644:function(t,e,n){var r,o,i,s=n(7811),a=n(3724),u=n(4576),c=n(4901),f=n(34),h=n(9297),l=n(6955),p=n(6823),d=n(6699),v=n(6840),y=n(2106),g=n(1625),m=n(2787),w=n(2967),b=n(8227),x=n(3392),S=n(1181),C=S.enforce,k=S.get,T=u.Int8Array,A=T&&T.prototype,O=u.Uint8ClampedArray,E=O&&O.prototype,_=T&&m(T),j=A&&m(A),M=Object.prototype,B=u.TypeError,P=b("toStringTag"),I=x("TYPED_ARRAY_TAG"),R="TypedArrayConstructor",L=s&&!!w&&"Opera"!==l(u.opera),D=!1,$={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},U=function(t){if(!f(t))return!1;var e=l(t);return"DataView"===e||h($,e)||h(F,e)},W=function(t){var e=m(t);if(f(e)){var n=k(e);return n&&h(n,R)?n[R]:W(e)}},z=function(t){if(!f(t))return!1;var e=l(t);return h($,e)||h(F,e)},N=function(t){if(z(t))return t;throw new B("Target is not a typed array")},V=function(t){if(c(t)&&(!w||g(_,t)))return t;throw new B(p(t)+" is not a typed array constructor")},q=function(t,e,n,r){if(a){if(n)for(var o in $){var i=u[o];if(i&&h(i.prototype,t))try{delete i.prototype[t]}catch(s){try{i.prototype[t]=e}catch(c){}}}j[t]&&!n||v(j,t,n?e:L&&A[t]||e,r)}},H=function(t,e,n){var r,o;if(a){if(w){if(n)for(r in $)if(o=u[r],o&&h(o,t))try{delete o[t]}catch(i){}if(_[t]&&!n)return;try{return v(_,t,n?e:L&&_[t]||e)}catch(i){}}for(r in $)o=u[r],!o||o[t]&&!n||v(o,t,e)}};for(r in $)o=u[r],i=o&&o.prototype,i?C(i)[R]=o:L=!1;for(r in F)o=u[r],i=o&&o.prototype,i&&(C(i)[R]=o);if((!L||!c(_)||_===Function.prototype)&&(_=function(){throw new B("Incorrect invocation")},L))for(r in $)u[r]&&w(u[r],_);if((!L||!j||j===M)&&(j=_.prototype,L))for(r in $)u[r]&&w(u[r].prototype,j);if(L&&m(E)!==j&&w(E,j),a&&!h(j,P))for(r in D=!0,y(j,P,{configurable:!0,get:function(){return f(this)?this[I]:void 0}}),$)u[r]&&d(u[r],I,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:D&&I,aTypedArray:N,aTypedArrayConstructor:V,exportTypedArrayMethod:q,exportTypedArrayStaticMethod:H,getTypedArrayConstructor:W,isView:U,isTypedArray:z,TypedArray:_,TypedArrayPrototype:j}},4659:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=function(t,e,n){r?o.f(t,e,i(0,n)):t[e]=n}},4901:function(t){var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,n){var r=n(3724),o=n(5917),i=n(8686),s=n(8551),a=n(6969),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",p="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"===typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var r=f(t,e);r&&r[p]&&(t[e]=n.value,n={configurable:l in n?n[l]:r[l],enumerable:h in n?n[h]:r[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4916:function(t,e,n){var r=n(7751),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},i=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var n=r("Set");try{(new n)[t](o(0));try{return(new n)[t](o(-1)),!1}catch(a){if(!e)return!0;try{return(new n)[t](i(-1/0)),!1}catch(u){var s=new n;return s.add(1),s.add(2),e(s[t](i(1/0)))}}}catch(u){return!1}}},5024:function(t,e,n){var r=n(6518),o=n(3650),i=n(9835),s=n(4916),a=!s("symmetricDifference")||!i("symmetricDifference");r({target:"Set",proto:!0,real:!0,forced:a},{symmetricDifference:o})},5031:function(t,e,n){var r=n(7751),o=n(9504),i=n(8480),s=n(3717),a=n(8551),u=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?u(e,n(t)):e}},5169:function(t,e,n){var r=n(3238),o=TypeError;t.exports=function(t){if(r(t))throw new o("ArrayBuffer is detached");return t}},5170:function(t,e,n){var r=n(6706),o=n(4402);t.exports=r(o.proto,"size","get")||function(t){return t.size}},5397:function(t,e,n){var r=n(7055),o=n(7750);t.exports=function(t){return r(o(t))}},5610:function(t,e,n){var r=n(1291),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5636:function(t,e,n){var r=n(4576),o=n(9504),i=n(6706),s=n(7696),a=n(5169),u=n(7394),c=n(4483),f=n(1548),h=r.structuredClone,l=r.ArrayBuffer,p=r.DataView,d=Math.min,v=l.prototype,y=p.prototype,g=o(v.slice),m=i(v,"resizable","get"),w=i(v,"maxByteLength","get"),b=o(y.getInt8),x=o(y.setInt8);t.exports=(f||c)&&function(t,e,n){var r,o=u(t),i=void 0===e?o:s(e),v=!m||!m(t);if(a(t),f&&(t=h(t,{transfer:[t]}),o===i&&(n||v)))return t;if(o>=i&&(!n||v))r=g(t,0,i);else{var y=n&&!v&&w?{maxByteLength:w(t)}:void 0;r=new l(i,y);for(var S=new p(t),C=new p(r),k=d(i,o),T=0;T<k;T++)x(C,T,b(S,T))}return f||c(t),r}},5745:function(t,e,n){var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5854:function(t,e,n){var r=n(2777),o=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw new o("Can't convert number to bigint");return BigInt(e)}},5876:function(t,e,n){var r=n(6518),o=n(3838),i=n(4916),s=!i("isSubsetOf",function(t){return t});r({target:"Set",proto:!0,real:!0,forced:s},{isSubsetOf:o})},5917:function(t,e,n){var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,n){var r=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},6080:function(t,e,n){var r=n(7476),o=n(9306),i=n(616),s=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?s(t,e):function(){return t.apply(e,arguments)}}},6119:function(t,e,n){var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},6193:function(t,e,n){var r=n(4215);t.exports="NODE"===r},6198:function(t,e,n){var r=n(8014);t.exports=function(t){return r(t.length)}},6269:function(t){t.exports={}},6395:function(t){t.exports=!1},6518:function(t,e,n){var r=n(4576),o=n(7347).f,i=n(6699),s=n(6840),a=n(9433),u=n(7740),c=n(2796);t.exports=function(t,e){var n,f,h,l,p,d,v=t.target,y=t.global,g=t.stat;if(f=y?r:g?r[v]||a(v,{}):r[v]&&r[v].prototype,f)for(h in e){if(p=e[h],t.dontCallGetSet?(d=o(f,h),l=d&&d.value):l=f[h],n=c(y?h:v+(g?".":"#")+h,t.forced),!n&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),s(f,h,p,t)}}},6573:function(t,e,n){var r=n(3724),o=n(2106),i=n(3238),s=ArrayBuffer.prototype;r&&!("detached"in s)&&o(s,"detached",{configurable:!0,get:function(){return i(this)}})},6699:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6706:function(t,e,n){var r=n(9504),o=n(9306);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(i){}}},6801:function(t,e,n){var r=n(3724),o=n(8686),i=n(4913),s=n(8551),a=n(5397),u=n(1072);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);var n,r=a(e),o=u(e),c=o.length,f=0;while(c>f)i.f(t,n=o[f++],r[n]);return t}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},6837:function(t){var e=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw e("Maximum allowed index exceeded");return t}},6840:function(t,e,n){var r=n(4901),o=n(4913),i=n(283),s=n(9433);t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&i(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(f){}u?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6955:function(t,e,n){var r=n(2140),o=n(4901),i=n(2195),s=n(8227),a=s("toStringTag"),u=Object,c="Arguments"===i(function(){return arguments}()),f=function(t,e){try{return t[e]}catch(n){}};t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=f(e=u(t),a))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},6969:function(t,e,n){var r=n(2777),o=n(757);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,n){var r=n(4495);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,n){var r=n(9504),o=n(9039),i=n(2195),s=Object,a=r("".split);t.exports=o(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?a(t,""):s(t)}:s},7080:function(t,e,n){var r=n(4402).has;t.exports=function(t){return r(t),t}},7347:function(t,e,n){var r=n(3724),o=n(9565),i=n(8773),s=n(6980),a=n(5397),u=n(6969),c=n(9297),f=n(5917),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=u(e),f)try{return h(t,e)}catch(n){}if(c(t,e))return s(!o(i.f,t,e),t[e])}},7394:function(t,e,n){var r=n(4576),o=n(6706),i=n(2195),s=r.ArrayBuffer,a=r.TypeError;t.exports=s&&o(s.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==i(t))throw new a("ArrayBuffer expected");return t.byteLength}},7476:function(t,e,n){var r=n(2195),o=n(9504);t.exports=function(t){if("Function"===r(t))return o(t)}},7588:function(t,e,n){var r=n(6518),o=n(9565),i=n(2652),s=n(9306),a=n(8551),u=n(1767),c=n(9539),f=n(4549),h=f("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:h},{forEach:function(t){a(this);try{s(t)}catch(r){c(this,"throw",r)}if(h)return o(h,this,t);var e=u(this),n=0;i(e,function(e){t(e,n++)},{IS_RECORD:!0})}})},7629:function(t,e,n){var r=n(6395),o=n(4576),i=n(9433),s="__core-js_shared__",a=t.exports=o[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7642:function(t,e,n){var r=n(6518),o=n(3440),i=n(9039),s=n(4916),a=!s("difference",function(t){return 0===t.size}),u=a||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var n=t++>1;return e.has(1)&&e.clear(),{done:n,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size});r({target:"Set",proto:!0,real:!0,forced:u},{difference:o})},7657:function(t,e,n){var r,o,i,s=n(9039),a=n(4901),u=n(34),c=n(2360),f=n(2787),h=n(6840),l=n(8227),p=n(6395),d=l("iterator"),v=!1;[].keys&&(i=[].keys(),"next"in i?(o=f(f(i)),o!==Object.prototype&&(r=o)):v=!0);var y=!u(r)||s(function(){var t={};return r[d].call(t)!==t});y?r={}:p&&(r=c(r)),a(r[d])||h(r,d,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},7696:function(t,e,n){var r=n(1291),o=n(8014),i=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw new i("Wrong length or index");return n}},7740:function(t,e,n){var r=n(9297),o=n(5031),i=n(7347),s=n(4913);t.exports=function(t,e,n){for(var a=o(e),u=s.f,c=i.f,f=0;f<a.length;f++){var h=a[f];r(t,h)||n&&r(n,h)||u(t,h,c(e,h))}}},7750:function(t,e,n){var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,n){var r=n(4576),o=n(4901),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},7811:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7936:function(t,e,n){var r=n(6518),o=n(5636);o&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},8004:function(t,e,n){var r=n(6518),o=n(9039),i=n(8750),s=n(4916),a=!s("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});r({target:"Set",proto:!0,real:!0,forced:a},{intersection:i})},8014:function(t,e,n){var r=n(1291),o=Math.min;t.exports=function(t){var e=r(t);return e>0?o(e,9007199254740991):0}},8100:function(t,e,n){var r=n(6518),o=n(5636);o&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},8111:function(t,e,n){var r=n(6518),o=n(4576),i=n(679),s=n(8551),a=n(4901),u=n(2787),c=n(2106),f=n(4659),h=n(9039),l=n(9297),p=n(8227),d=n(7657).IteratorPrototype,v=n(3724),y=n(6395),g="constructor",m="Iterator",w=p("toStringTag"),b=TypeError,x=o[m],S=y||!a(x)||x.prototype!==d||!h(function(){x({})}),C=function(){if(i(this,d),u(this)===d)throw new b("Abstract class Iterator not directly constructable")},k=function(t,e){v?c(d,t,{configurable:!0,get:function(){return e},set:function(e){if(s(this),this===d)throw new b("You can't redefine this property");l(this,t)?this[t]=e:f(this,t,e)}}):d[t]=e};l(d,w)||k(w,m),!S&&l(d,g)&&d[g]!==Object||k(g,C),C.prototype=d,r({global:!0,constructor:!0,forced:S},{Iterator:C})},8227:function(t,e,n){var r=n(4576),o=n(5745),i=n(9297),s=n(3392),a=n(4495),u=n(7040),c=r.Symbol,f=o("wks"),h=u?c["for"]||c:c&&c.withoutSetter||s;t.exports=function(t){return i(f,t)||(f[t]=a&&i(c,t)?c[t]:h("Symbol."+t)),f[t]}},8469:function(t,e,n){var r=n(9504),o=n(507),i=n(4402),s=i.Set,a=i.proto,u=r(a.forEach),c=r(a.keys),f=c(new s).next;t.exports=function(t,e,n){return n?o({iterator:c(t),next:f},e):u(t,e)}},8480:function(t,e,n){var r=n(1828),o=n(8727),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},8527:function(t,e,n){var r=n(7080),o=n(4402).has,i=n(5170),s=n(3789),a=n(507),u=n(9539);t.exports=function(t){var e=r(this),n=s(t);if(i(e)<n.size)return!1;var c=n.getIterator();return!1!==a(c,function(t){if(!o(e,t))return u(c,"normal",!1)})}},8551:function(t,e,n){var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},8622:function(t,e,n){var r=n(4576),o=n(4901),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8686:function(t,e,n){var r=n(3724),o=n(9039);t.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8750:function(t,e,n){var r=n(7080),o=n(4402),i=n(5170),s=n(3789),a=n(8469),u=n(507),c=o.Set,f=o.add,h=o.has;t.exports=function(t){var e=r(this),n=s(t),o=new c;return i(e)>n.size?u(n.getIterator(),function(t){h(e,t)&&f(o,t)}):a(e,function(t){n.includes(t)&&f(o,t)}),o}},8773:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},9039:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},9286:function(t,e,n){var r=n(4402),o=n(8469),i=r.Set,s=r.add;t.exports=function(t){var e=new i;return o(t,function(t){s(e,t)}),e}},9297:function(t,e,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},9306:function(t,e,n){var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},9429:function(t,e,n){var r=n(4576),o=n(6193);t.exports=function(t){if(o){try{return r.process.getBuiltinModule(t)}catch(e){}try{return Function('return require("'+t+'")')()}catch(e){}}}},9433:function(t,e,n){var r=n(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9504:function(t,e,n){var r=n(616),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);t.exports=r?s:function(t){return function(){return i.apply(t,arguments)}}},9519:function(t,e,n){var r,o,i=n(4576),s=n(2839),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,f=c&&c.v8;f&&(r=f.split("."),o=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(o=+r[1]))),t.exports=o},9539:function(t,e,n){var r=n(9565),o=n(8551),i=n(5966);t.exports=function(t,e,n){var s,a;o(t);try{if(s=i(t,"return"),!s){if("throw"===e)throw n;return n}s=r(s,t)}catch(u){a=!0,s=u}if("throw"===e)throw n;if(a)throw s;return o(s),n}},9565:function(t,e,n){var r=n(616),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},9577:function(t,e,n){var r=n(9928),o=n(4644),i=n(1108),s=n(1291),a=n(5854),u=o.aTypedArray,c=o.getTypedArrayConstructor,f=o.exportTypedArrayMethod,h=function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),l=h&&function(){try{new Int8Array(1)["with"](-.5,1)}catch(t){return!0}}();f("with",{with:function(t,e){var n=u(this),o=s(t),f=i(n)?a(e):+e;return r(n,c(n),o,f)}}["with"],!h||l)},9617:function(t,e,n){var r=n(5397),o=n(5610),i=n(6198),s=function(t){return function(e,n,s){var a=r(e),u=i(a);if(0===u)return!t&&-1;var c,f=o(s,u);if(t&&n!==n){while(u>f)if(c=a[f++],c!==c)return!0}else for(;u>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9835:function(t){t.exports=function(t){try{var e=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[t](n);return 1===r.size&&4===r.values().next().value}catch(o){return!1}}},9928:function(t,e,n){var r=n(6198),o=n(1291),i=RangeError;t.exports=function(t,e,n,s){var a=r(t),u=o(n),c=u<0?a+u:u;if(c>=a||c<0)throw new i("Incorrect index");for(var f=new e(a),h=0;h<a;h++)f[h]=h===c?s:t[h];return f}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}!function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.p=""}();var r={};if(n.r(r),n.d(r,{ChatWindow:function(){return lt},default:function(){return yt}}),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n(8111),n(7588);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat"},[e("audio",{ref:"audioPlayer",staticClass:"hidden-audio",on:{timeupdate:t.onTimeUpdate,ended:t.onAudioEnded}},[e("source",{attrs:{src:t.audioSrc,type:"audio/mpeg"}}),t._v(" 您的浏览器不支持音频元素。 ")]),"leaving"!==t.robotStatus?e("ChatRobot",{attrs:{status:t.robotStatus}}):e("ChatAvatar",{attrs:{status:t.avaterStatus},on:{click:t.toggleWindow}}),e("ChatWindowDialog",{attrs:{messages:t.messages,"input-message":t.inputMessage,"think-status":t.thinkStatus},on:{"update:inputMessage":function(e){t.inputMessage=e},send:t.handleSend,"thinking-click":t.handleThinkingClick,"overlay-click":t.handleOverlayClick},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}})],1)},a=[],u=(n(4114),n(7642),n(8004),n(3853),n(5876),n(2475),n(5024),n(1698),function(){var t=this,e=t._self._c;return e("div",{class:["chat-robot",t.status]})}),c=[],f={name:"ChatRobot",props:{status:{type:String,required:!0,validator:t=>["entering","waiting","speaking"].includes(t)}}},h=f;function l(t,e,n,r,o,i,s,a){var u,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=u):o&&(u=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var f=c.render;c.render=function(t,e){return u.call(e),f(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,u):[u]}return{exports:t,options:c}}var p=l(h,u,c,!1,null,"3d936cb2",null),d=p.exports,v=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-ai",on:{click:function(e){return t.$emit("click")}}},[e("div",{class:["chat-ai-avater",t.status]}),e("div",{staticClass:"chat-ai-text"},[t._v(t._s(t.statusText))])])},y=[],g={name:"ChatAvatar",props:{status:{type:String,required:!0,validator:t=>["normal","thinking","output"].includes(t)}},computed:{statusText(){const t={normal:"凌霄AI",thinking:"思考中",output:"语音中"};return t[this.status]}}},m=g,w=l(m,v,y,!1,null,"7b09a9c8",null),b=w.exports,x=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.value,expression:"value"}],staticClass:"chat-overlay",on:{click:function(e){return t.$emit("overlay-click")}}},[e("div",{staticClass:"chat-window",on:{click:function(t){t.stopPropagation()}}},[e("ChatWindowHeader",{on:{close:function(e){return t.$emit("input",!1)}}}),e("ChatMessageList",{ref:"messageList",attrs:{messages:t.messages,"think-status":t.thinkStatus},on:{"thinking-click":function(e){return t.$emit("thinking-click")}}}),e("ChatInputBox",{attrs:{value:t.inputMessage},on:{input:function(e){return t.$emit("update:inputMessage",e)},send:function(e){return t.$emit("send")}}})],1)])},S=[],C=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-window-header"},[e("div",{staticClass:"chat-window-header-title"},[t._v("凌霄大模型AI123对话")]),e("div",{staticClass:"chat-window-header-open",on:{click:t.handleOpen}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"}},[e("path",{attrs:{d:"M14.5 4.5H19.5V9.5",stroke:"#4E5969","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M9.5 19.5H4.5V14.5",stroke:"#4E5969","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M19.5 4.5L14.0833 9.91667",stroke:"#4E5969","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M9.91667 14.083L4.5 19.4997",stroke:"#4E5969","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}})])]),e("div",{staticClass:"chat-window-header-close",on:{click:function(e){return t.$emit("close")}}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"}},[e("path",{attrs:{d:"M5.50002 5.5L18.5 18.5",stroke:"#4E5969","stroke-width":"1.89404","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M5.50002 18.5L18.5 5.5",stroke:"#4E5969","stroke-width":"1.89404","stroke-linecap":"round","stroke-linejoin":"round"}})])])])},k=[],T={name:"ChatWindowHeader",methods:{handleOpen(){const t=this.$router.resolve({name:"/chat"});window.open(t.href,"_blank")}}},A=T,O=l(A,C,k,!1,null,"6518e4ca",null),E=O.exports,_=function(){var t=this,e=t._self._c;return e("div",{ref:"chatArea",staticClass:"chat-window-content scrollbar-hide"},t._l(t.messages,function(n){return e("div",{key:n.id,staticClass:"chat-window-message"},["user"===n.type?e("UserMessage",{attrs:{content:n.content}}):e("AiMessage",{attrs:{message:n,"think-status":t.thinkStatus},on:{"thinking-click":function(e){return t.$emit("thinking-click")}}})],1)}),0)},j=[],M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-window-message-user"},[e("div",{staticClass:"user-message"},[t._v(t._s(t.content))])])},B=[],P={name:"UserMessage",props:{content:{type:String,required:!0}}},I=P,R=l(I,M,B,!1,null,"6a2b6167",null),L=R.exports,D=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-window-message-ai"},[e("div",{staticClass:"ai-render"},[e("div",{staticClass:"ai-thinking",on:{click:function(e){return t.$emit("thinking-click")}}},[e("div",{staticClass:"ai-thinking-time"},[t._v("思考用时"+t._s(t.message.time)+"秒")]),t.thinkStatus?e("div",{staticClass:"ai-thinking-content"},[t._v(t._s(t.message.thinking))]):t._e()]),e("div",{staticClass:"ai-content"},[t._v(t._s(t.message.content))])])])},$=[],F={name:"AiMessage",props:{message:{type:Object,required:!0},thinkStatus:{type:Boolean,default:!0}}},U=F,W=l(U,D,$,!1,null,"3347daf6",null),z=W.exports,N={name:"ChatMessageList",components:{UserMessage:L,AiMessage:z},props:{messages:{type:Array,required:!0},thinkStatus:{type:Boolean,default:!0}},methods:{scrollToBottom(){this.$nextTick(()=>{const t=this.$refs.chatArea;t&&(t.scrollTop=t.scrollHeight)})}},watch:{messages:{handler(){this.scrollToBottom()},deep:!0}}},V=N,q=l(V,_,j,!1,null,"ba7356ea",null),H=q.exports,Y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-window-footer"},[e("div",{staticClass:"chat-window-textarea"},[e("el-input",{staticClass:"chat-window-input",attrs:{type:"textarea",placeholder:"有什么我能帮您的吗?",rows:"2",resize:"none",value:t.value},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{keydown:function(e){return t.handleKeyDown.apply(null,arguments)}}}),e("div",{staticClass:"chat-window-bar"},[e("div",{staticClass:"chat-window-send",on:{click:function(e){return t.$emit("send")}}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"}},[e("g",{attrs:{"clip-path":"url(#clip0_640_2107)"}},[e("path",{attrs:{d:"M18.6427 2.37822C19.3253 2.47432 19.8025 3.10738 19.7065 3.79002C19.6871 3.97072 19.5381 4.41327 19.5403 4.41161L14.9673 17.8079L14.9632 17.8093C14.7858 18.3838 14.212 18.7607 13.5971 18.6744C13.4173 18.6492 13.2504 18.5862 13.1055 18.4949L13.0973 18.4977L9.83449 16.3686C9.58371 16.2584 9.4276 15.9939 9.46729 15.7115C9.5154 15.3691 9.83278 15.1317 10.1751 15.1798C10.293 15.1964 10.3988 15.2448 10.4853 15.3161L13.4054 17.2314L13.4073 17.2317C13.4452 17.2566 13.4882 17.2746 13.5364 17.2814C13.6911 17.3029 13.8371 17.2052 13.8793 17.0593L18.0469 4.89796L8.27396 14.3367L7.77435 17.8916C7.72706 18.2281 7.41369 18.464 7.07727 18.4169C6.74073 18.3696 6.50469 18.0564 6.55198 17.7198L7.07633 13.9889C7.08231 13.9464 7.09382 13.9066 7.10727 13.867C7.13549 13.7645 7.19079 13.6657 7.27291 13.5866L17.0754 4.12041L2.68514 8.17767L2.68487 8.1796C2.58481 8.21873 2.50686 8.31058 2.49042 8.42643C2.47412 8.5424 2.52417 8.65007 2.6093 8.71729L2.60903 8.71922L3.28261 9.16101L3.28013 9.16461C3.47505 9.29254 3.58819 9.52563 3.55386 9.77111C3.50575 10.1134 3.18836 10.3509 2.84602 10.3028C2.75512 10.29 2.6708 10.2584 2.59833 10.2127L2.59806 10.2147L1.37843 9.42001L1.37951 9.41227C1.02215 9.14901 0.816644 8.70195 0.882687 8.23203C0.951867 7.74096 1.29791 7.35545 1.73968 7.21445L1.73995 7.21251L17.7833 2.57104C18.0287 2.41036 18.3294 2.3342 18.6427 2.37822Z",fill:"#013378"}}),e("path",{attrs:{d:"M3.1309 10.9936C3.2178 10.5684 3.82528 10.5684 3.91218 10.9936C4.10411 11.9326 4.83794 12.6664 5.77697 12.8584C6.20213 12.9453 6.20213 13.5527 5.77697 13.6397C4.83794 13.8316 4.10411 14.5654 3.91218 15.5044C3.82528 15.9296 3.2178 15.9296 3.1309 15.5044C2.93897 14.5654 2.20513 13.8316 1.26611 13.6397C0.840944 13.5527 0.840944 12.9453 1.26611 12.8584C2.20513 12.6664 2.93897 11.9326 3.1309 10.9936Z",fill:"#2B80F6"}}),e("path",{attrs:{d:"M6.20382 8.56242C6.25596 8.30732 6.62045 8.30732 6.67259 8.56242C6.78775 9.12583 7.22805 9.56613 7.79146 9.68129C8.04656 9.73343 8.04656 10.0979 7.79146 10.1501C7.22805 10.2652 6.78775 10.7055 6.67259 11.2689C6.62045 11.524 6.25596 11.524 6.20382 11.2689C6.08866 10.7055 5.64836 10.2652 5.08495 10.1501C4.82985 10.0979 4.82985 9.73343 5.08495 9.68129C5.64836 9.56613 6.08866 9.12583 6.20382 8.56242Z",fill:"#2B80F6"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_640_2107"}},[e("rect",{attrs:{width:"20",height:"20",fill:"white"}})])])])])])],1)])},Z=[],G={name:"ChatInputBox",props:{value:{type:String,default:""}},methods:{handleKeyDown(t){"Enter"!==t.key||t.shiftKey||(t.preventDefault(),this.$emit("send"))}}},J=G,K=l(J,Y,Z,!1,null,"6f416073",null),X=K.exports,Q={name:"ChatWindowDialog",components:{ChatWindowHeader:E,ChatMessageList:H,ChatInputBox:X},props:{value:{type:Boolean,required:!0},messages:{type:Array,required:!0},inputMessage:{type:String,default:""},thinkStatus:{type:Boolean,default:!0}}},tt=Q,et=l(tt,x,S,!1,null,"5eca994a",null),nt=et.exports,rt=(n(6573),n(8100),n(7936),n(9577),{data(){return{isRecording:!1,isMicAvailable:!1,audioContext:null,microphone:null,processor:null,audioBuffer:new Float32Array(0)}},methods:{async initAudio(){if(!this.isRecording)try{this.isMicAvailable=!0;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:this.SAMPLE_RATE,channelCount:1,noiseSuppression:!0,echoCancellation:!0}});this.audioContext=new AudioContext({sampleRate:this.SAMPLE_RATE}),this.microphone=this.audioContext.createMediaStreamSource(t),this.processor=this.audioContext.createScriptProcessor(this.FRAME_SIZE,1,1),this.processor.onaudioprocess=this.processAudio,this.microphone.connect(this.processor),this.processor.connect(this.audioContext.destination),this.isRecording=!0,console.log(`录音中 (采样率: ${this.audioContext.sampleRate}Hz)`)}catch(t){console.error("音频初始化失败:",t),this.isRecording=!1,this.isMicAvailable=!1}},processAudio(t){if(!this.isRecording)return;const e=t.inputBuffer.getChannelData(0),n=new Float32Array(this.audioBuffer.length+e.length);n.set(this.audioBuffer,0),n.set(e,this.audioBuffer.length),this.audioBuffer=n;while(this.audioBuffer.length>=this.FRAME_SIZE){const t=this.audioBuffer.slice(0,this.FRAME_SIZE);this.audioBuffer=this.audioBuffer.slice(this.FRAME_SIZE);const e=this.floatTo16BitPCM(t);this.ws&&this.ws.readyState===this.ws.OPEN&&this.ws.send(e)}},floatTo16BitPCM(t){const e=new Int16Array(t.length);for(let n=0;n<t.length;n++){const r=Math.max(-1,Math.min(1,t[n]));e[n]=r<0?32768*r:32767*r}return e.buffer},stopRecording(){this.isRecording&&(this.microphone&&this.microphone.disconnect(),this.processor&&this.processor.disconnect(),this.analyser&&this.analyser.disconnect(),this.audioContext&&this.audioContext.close().catch(t=>{console.error("关闭音频上下文失败:",t)}),this.isRecording=!1)},play(){this.robotStatus="speaking",this.$refs.audioPlayer.play()},pause(){this.robotStatus="waiting",this.$refs.audioPlayer.pause()},stop(){this.robotStatus="leaving",this.$refs.audioPlayer.pause(),this.$refs.audioPlayer.currentTime=0,this.jumpedTimePoints.clear()},analyzeAudioCommand(t){console.log("分析音频命令:",t),"C5"===t?(this.robotStatus="entering",setTimeout(()=>{this.robotStatus="speaking",this.play()},3e3)):"C8"===t?(this.robotStatus="speaking",this.play()):"C7"===t?(this.robotStatus="waiting",this.pause()):"C6"===t&&(this.robotStatus="leaving",this.stop())}}}),ot={data(){return{ws:null,wsUrl:"ws://192.168.8.9:9999/ai_model/ws/voice-stream",isConnected:!1}},methods:{initWebSocket(){try{this.ws=new WebSocket(this.wsUrl),this.ws.binaryType="arraybuffer",this.ws.onopen=async()=>{console.log("WebSocket 连接成功"),this.isConnected=!0,this.initAudio()},this.ws.onmessage=t=>{try{if(console.log("收到原始消息:",t.data),t.data instanceof ArrayBuffer)return void console.log("收到二进制音频数据");const e=JSON.parse(t.data);console.log("解析后的数据:",e),"config"===e.type?console.log("配置信息:",e):0===e.code?this.handleWebSocketMessage(e.data):console.error("服务器返回错误:",e.msg)}catch(e){console.error("消息解析错误:",e)}},this.ws.onclose=()=>{console.log("WebSocket 连接关闭"),this.isConnected=!1,this.isRecording&&this.stopRecording(),setTimeout(()=>{console.log("尝试重新建立连接"),this.isConnected||this.initWebSocket()},3e3)},this.ws.onerror=t=>{console.error("WebSocket 错误:",t)}}catch(t){console.error("WebSocket连接失败:",t)}},handleWebSocketMessage(t){"detection"===t.type?(console.log("检测到唤醒词"),this.avaterStatus="normal"):"Collecting"===t.type?(console.log("状态: 采集中"),this.avaterStatus="thinking"):"command"===t.type?(console.log("状态: 处理中"),this.analyzeAudioCommand(t.category)):console.log("状态: 其他")},closeWebSocket(){this.ws&&this.ws.close()}}};class it{constructor(t={}){this.options={updateInterval:16,batchSize:100,debug:!1,...t},this.reset()}reset(){this.buffer="",this.contentBuffer=[],this.thinkingBuffer=[],this.inTag=!1,this.tagBuffer="",this.updateTimer=null,this.status="output",this.metrics={startTime:Date.now(),chunks:0,events:0,chars:0}}processChunk(t,e){this.metrics.chunks++,this.buffer+=t;const n=this.buffer.split("\n\n");this.buffer=n.pop()||"";for(const r of n)r.trim()&&(this.metrics.events++,this.processEvent(r,e))}processEvent(t,e){const n=t.split("\n");for(const o of n)if(o.startsWith("data:")){const t=o.substring(5).trim();if("[DONE]"===t)return void this.flush(e);try{const n=JSON.parse(t),r=n?.choices?.[0]?.delta?.content;r&&(this.metrics.chars+=r.length,this.parseContent(r,e))}catch(r){this.options.debug&&console.warn("[StreamParser] JSON解析失败:",t)}}}parseContent(t,e){let n=0;while(n<t.length)if(this.inTag){const e=t.indexOf(">",n);if(-1===e){this.tagBuffer+=t.substring(n);break}this.tagBuffer+=t.substring(n,e+1),this.handleTag(this.tagBuffer),this.tagBuffer="",this.inTag=!1,n=e+1}else{const e=t.indexOf("<",n);if(-1===e){this.appendText(t.substring(n));break}{e>n&&this.appendText(t.substring(n,e));const r=t.indexOf(">",e);if(-1===r){this.inTag=!0,this.tagBuffer=t.substring(e);break}{const o=t.substring(e,r+1);this.handleTag(o),n=r+1}}}this.scheduleUpdate(e)}handleTag(t){const e=t.toLowerCase();"<think>"===e?this.status="thinking":"</think>"===e&&(this.status="output")}appendText(t){t&&("thinking"===this.status?this.thinkingBuffer.push(t):this.contentBuffer.push(t))}scheduleUpdate(t){this.updateTimer||(this.updateTimer=setTimeout(()=>{this.flush(t),this.updateTimer=null},this.options.updateInterval))}flush(t){if(!t)return;const e=this.thinkingBuffer.length>0,n=this.contentBuffer.length>0;if(!e&&!n)return;const r={thinking:e?this.thinkingBuffer.join(""):null,content:n?this.contentBuffer.join(""):null,status:this.status};this.thinkingBuffer=[],this.contentBuffer=[],t(r)}finish(t){if(this.flush(t),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null),this.options.debug){const t=Date.now()-this.metrics.startTime;console.log("[StreamParser] 解析完成:",{"耗时":`${t}ms`,"数据块":this.metrics.chunks,"事件数":this.metrics.events,"字符数":this.metrics.chars,"平均速度":`${(this.metrics.chars/t*1e3).toFixed(0)} chars/s`})}}destroy(){this.updateTimer&&clearTimeout(this.updateTimer),this.reset()}}var st={data(){return{streamParser:null}},created(){this.streamParser=new it({updateInterval:16,debug:!1})},methods:{createAiMessage(){const t={id:this.messages.length+1,type:"ai",sender:"AI",time:"",thinking:"",charts:[],content:""};return this.messages.push(t),this.currentMessage=t,t},createUserMessage(t){const e={id:this.messages.length+1,type:"user",sender:"用户",time:"",content:t};return this.messages.push(e),this.inputMessage="",e},async handleSend(){if(!this.inputMessage.trim())return;const t=this.inputMessage.trim();this.createUserMessage(t),this.createAiMessage(),this.streamParser.reset();try{const e=Date.now(),n=new AbortController,r="Bearer ac627d0a-8346-4ae9-b93a-f37ff6210adc",o=await fetch("/bytserver/api-model/chat/stream",{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({content:t})});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);await this.consumeStream(o.body),this.streamParser.finish(this.handleStreamUpdate);const i=Date.now()-e;this.currentMessage&&(this.currentMessage.time=(i/1e3).toFixed(2)),console.log(`流处理完成,总耗时: ${i}ms`)}catch(e){console.error("发送消息失败:",e),this.currentMessage&&(this.currentMessage.content="抱歉,发生了错误,请重试。",this.$forceUpdate())}},async consumeStream(t){const e=t.getReader(),n=new TextDecoder("utf-8");try{while(1){const{done:t,value:r}=await e.read();if(t)break;const o=n.decode(r,{stream:!0});this.streamParser.processChunk(o,this.handleStreamUpdate)}}finally{e.releaseLock()}},handleStreamUpdate(t){this.currentMessage&&(t.thinking&&(this.currentMessage.thinking+=t.thinking),t.content&&(this.currentMessage.content+=t.content),"thinking"===t.status?this.avaterStatus="thinking":this.avaterStatus="output",this.$forceUpdate())}},beforeDestroy(){this.streamParser&&this.streamParser.destroy()}};const at=16e3,ut=512;var ct={name:"ChatWindow",components:{ChatRobot:d,ChatAvatar:b,ChatWindowDialog:nt},mixins:[rt,ot,st],props:{appendToBody:{type:Boolean,default:!0}},data(){return{audioSrc:"/minio/lingxiaoai/byt.mp3",inputMessage:"",visible:!1,messages:[{id:1,type:"user",sender:"",time:"",content:"你好,欢迎来到凌霄大模型AI对话。"},{id:2,type:"ai",sender:"AI",time:"",thinking:"嗯,用户问的是回转窑的工业应用。首先,我需要回忆一下之前对话的内容。用户之前让我解释了水泥的制作流程,特别是提到了回转窑在高温煅烧熟料中的作用。",charts:[{title:"",options:{}}],content:"回转窑(Rotary Kiln)是一种长筒形旋转煅烧设备(类似倾斜安装的大管子),因其独特的旋转运动和高温耐火衬里设计,在多个工业领域都有广泛应用"}],robotStatus:"leaving",avaterStatus:"normal",currentMessage:null,thinkStatus:!0,jumpedTimePoints:new Set,SAMPLE_RATE:at,FRAME_SIZE:ut}},mounted(){this.initWebSocket(),this.appendToBody&&this.appendToBodyHandler()},beforeDestroy(){this.appendToBody&&this.$el.parentElement===document.body&&document.body.removeChild(this.$el),this.closeWebSocket(),this.stopRecording()},methods:{toggleWindow(){this.visible=!this.visible},handleThinkingClick(){this.thinkStatus=!this.thinkStatus},handleOverlayClick(){this.visible=!1},appendToBodyHandler(){this.$nextTick(()=>{this.$el.parentElement!==document.body&&document.body.appendChild(this.$el)})},onTimeUpdate(){const t=this.$refs.audioPlayer,e=t.currentTime;this.jumpedTimePoints||(this.jumpedTimePoints=new Set);const n=[{time:40,url:"/permission/user",name:"permission_user",title:"用户管理"},{time:65,url:"/permission/menu",name:"permission_menu",title:"菜单管理"},{time:75,url:"/permission/role",name:"permission_role",title:"角色管理"}];n.forEach(t=>{e>=t.time&&e<t.time+.5&&!this.jumpedTimePoints.has(t.time)&&(this.jumpedTimePoints.add(t.time),this.$appOptions.store.dispatch("tags/addTagview",{path:t.url,fullPath:t.url,label:t.title,name:t.title,meta:{title:t.title},query:{},params:{}}),this.$appOptions.router.push({path:t.url}))})},onAudioEnded(){this.robotStatus="leaving",this.jumpedTimePoints.clear()}}},ft=ct,ht=l(ft,s,a,!1,null,"d604373c",null),lt=ht.exports;const pt={ChatWindow:lt},dt=function(t,e={}){dt.installed||(dt.installed=!0,t.prototype.$appOptions=e,Object.keys(pt).forEach(e=>{t.component(e,pt[e])}))};"undefined"!==typeof window&&window.Vue&&dt(window.Vue);var vt={install:dt,...pt},yt=vt;return r}()});
2
2
  //# sourceMappingURL=index.umd.min.js.map