PageSourceSearch

https://beta.mewod.ai/assets/character_live_douyin-0b4458cb.js

js mewod.ai collected 2026-10-05 15:39:51 UTC 9,178 bytes, 1 lines download raw bytes

1import{_ as e}from"./loading_text-c4684dbd.js";import{u as a}from"./character-92642c8a.js";import{d as t,r as l,o,e as n,f as r,g as s,k as u,F as i,a5 as c,b as v,u as m,R as d,ch as g,S as p,E as b,q as h,a1 as y,j as k,i as f,l as _,a2 as M,y as T,G as x}from"./index-b25171b5.js";import{_ as S}from"./youtube-player-9da57baf.js";import{_ as w}from"./canvas_home-ee0cc5dd.js";import{L as I}from"./live-view-d6b0467f.js";import{u as C}from"./useWebSocket-3b0c6655.js";import{_ as j}from"./lodash-c200b85d.js";import{a as N}from"./socket-connect-e7dcba0d.js";import"./plugin-vue_export-helper-1b428a4d.js";import"./tts-8a89173b.js";import"./v4-ba5d26a9.js";import"./__vite-browser-external-874befbc.js";import"./controller-aa1def94.js";import"./router_controller-8f776b59.js";import"./aigc-2eb3aff5.js";import"./mic_on_svg-04c6f2ad.js";import"./blue_loading_circle-5ebcdbf9.js";import"./xunfei_vad-a27bf52d.js";import"./x_svg-9dcb2188.js";import"./sha256-a33e07d1.js";import"./___vite-browser-external_commonjs-proxy-ec477302.js";const A=s("div",{class:"fixed w-screen h-screen bg-chatBg"},null,-1),P=s("div",{class:"flex flex-col justify-center space-y-6 items-center text-gray-200"},[s("div",{class:"mb-20"},[s("span",{class:"mewod-ai-title"},"LearnAI")]),s("span",{class:"text-sm text-gray-300"},"Experience the Future of Learning with AI.")],-1),L=s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5 mr-2 -ml-1"},[s("path",{"fill-rule":"evenodd",d:"M17.303 5.197A7.5 7.5 0 006.697 15.803a.75.75 0 01-1.061 1.061A9 9 0 1121 10.5a.75.75 0 01-1.5 0c0-1.92-.732-3.839-2.197-5.303zm-2.121 2.121a4.5 4.5 0 00-6.364 6.364.75.75 0 11-1.06 1.06A6 6 0 1118 10.5a.75.75 0 01-1.5 0c0-1.153-.44-2.303-1.318-3.182zm-3.634 1.314a.75.75 0 01.82.311l5.228 7.917a.75.75 0 01-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 01-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 01-1.247-.606l.569-9.47a.75.75 0 01.554-.68z","clip-rule":"evenodd"})],-1),O=t({__name:"choose_video",emits:["onTap"],setup(e,{emit:t}){const c=a(),v=l(!1),m=l(!0),d=async()=>{t("onTap",v.value,m.value)};return o((()=>{v.value=c.enableMic,m.value=c.enableSound})),(e,a)=>(n(),r(i,null,[A,s("div",{class:"fixed w-screen h-screen"},[s("div",{class:"flex flex-col justify-center w-full h-full space-y-12"},[P,s("div",{class:"flex justify-center"},[s("button",{type:"button",onClick:d,class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[L,u(" Tap to start ")])])])])],64))}}),B=t({__name:"live-socket-douyin",props:{characterInfo:{},characterId:{},conversationId:{}},emits:["onSocketMessage"],setup(e,{expose:t,emit:n}){const r=e,s=a();s.characterId=r.characterId,s.conversationId=r.conversationId;const u=l(!1),i=N("livebot",s.userId,s.conversationId,s.characterId),{sendMessage:v,connect:m,disconnect:d}=C((e=>{const a=JSON.parse(e);a.init&&(s.liveAudioData=a.data),a.type,n("onSocketMessage",a)}),(()=>{}),(()=>{u.value=!1,j.delay((()=>{m(i)}),5e3)}),(e=>{}));return o((()=>{m(i)})),c((()=>{d()})),t({sendMessage:v}),(e,a)=>null}}),R={key:6,class:"z-0 screen-h screen-w fixed left-0 top-0 right-0 bottom-0 bg-cover bg-center"},D=t({__name:"character_live_douyin",setup(t){const s=v(),u=l(!0),c=l(""),C=s.currentRoute.value.query.youtube;C?(c.value=C,u.value=!0):u.value=!1;const j=a(),N=m(),A=l(),P=l(),L=l(),D=l({}),$=l(!1),z=l(!1),E=l(""),H=l(""),V=l(""),q=l(0),F=l(!0),Y=l(!0),J=d({me:"",npc:"",skybox:""}),G=l(!0),Q=(e,a)=>{1==a?(Y.value=e,localStorage.setItem("enableBgm",e?"1":"0")):(F.value=e,localStorage.setItem("enableAmbient",e?"1":"0"))},W=s.currentRoute.value.query.id;W||s.push({path:"/"});const K=s.currentRoute.value.query.c;let U=0;K&&(U=Number(K));const X=l(Number(W)),Z=l(U);o((()=>{document.documentElement.classList.add("dark"),J.me="",J.skybox="",G.value="1"===localStorage.getItem("enableSound")||!localStorage.getItem("enableSound");let e=localStorage.getItem("access_token")||"";const a={character_id:X.value,conversation_id:Z.value};g(a,e).then((e=>{var a,t,l,o;if(1===e.code){j.ttsToken=JSON.parse(e.data.tts_token),localStorage.setItem("ttstoken",e.data.tts_token),D.value=e.data,J.npc=e.data.readyplayerme_id,z.value=!0,E.value=(null==(a=e.data)?void 0:a.world_ambient_name)||"",H.value=(null==(t=e.data)?void 0:t.world_bgm_name)||"",V.value=(null==(l=e.data)?void 0:l.world_skybox)||"",q.value=(null==(o=e.data)?void 0:o.world_particle_id)||0,J.skybox=V.value;const n=+(localStorage.getItem("sex")||0);if(e.data.user_readyplayer_id?J.me=e.data.user_readyplayer_id:n===p.MALE?J.me="mewod-649e369d788d4b23797ab352":J.me="mewod-649e378512a3f1019d5ed3a5",e.data.user_type&&(N.userType=e.data.user_type),e.data.conversation_history){e.data.conversation_history.forEac
1h((e=>{j.chatHistory[e.id]={user_content:e.user_content,chat_content:e.character_content}}))}}else s.push({path:"/"})})).catch((function(e){b.error("Something went wrong, please try again later.")}))}));const ee=l("Loading metaverse ..."),ae=e=>{e>0&&(ee.value=`Loading metaverse ... ${e}%`),$.value=e>=100},te=(e,a)=>{j.isAgreedMicTips=!0,j.enableMic=e,G.value=a,localStorage.setItem("enableSound",a?"1":"0")},le=h((()=>$.value&&z.value&&j.isAgreedMicTips));y((()=>le.value),((e,a)=>{null!=a&&e&&x((()=>{var e;null==(e=P.value)||e.playMusic((()=>{Y.value="1"===localStorage.getItem("enableBgm")||!localStorage.getItem("enableBgm")}),(()=>{F.value="1"===localStorage.getItem("enableAmbient")||!localStorage.getItem("enableAmbient")}))}))})),y((()=>Y.value),((e,a)=>{H.value&&x((()=>{var a,t;e?null==(a=P.value)||a.playBgm():null==(t=P.value)||t.pauseBgm()}))})),y((()=>F.value),((e,a)=>{var t,l;E.value&&(e?null==(t=P.value)||t.playAmbient():null==(l=P.value)||l.pauseAmbient())}));const oe=l(),ne=e=>{var a;null==(a=oe.value)||a.onSocketMessage(e)},re=e=>{var a;null==(a=L.value)||a.sendMessage(e)},se=()=>{var e;null==(e=A.value)||e.unMute()},ue=()=>{var e;null==(e=A.value)||e.onVolumeHigh()},ie=()=>{var e;null==(e=A.value)||e.onVolumeLow()};return(a,t)=>{var l,o,s,v,m,d,g,p,b,h,y,x,C,N;return n(),r(i,null,[z.value?f(j).isAgreedMicTips?_("",!0):(n(),k(O,{key:1,onOnTap:te})):(n(),k(e,{key:0,"loading-text":"Loading character info ..."})),!f(j).isAgreedMicTips||$.value||u.value?_("",!0):(n(),k(e,{key:2,"loading-text":ee.value},null,8,["loading-text"])),z.value&&!u.value?(n(),k(w,{key:3,onLoaded:ae,ref_key:"canvasHome",ref:P,skybox:J.skybox?`/metaverse/skybox/ai/${J.skybox}.jpg`:"",me:J.me?-1==J.me.indexOf("mewod-")?`https://api.readyplayer.me/v1/avatars/${J.me}.glb?useDracoMeshCompression=true&textureAtlas=256&textureSizeLimit=256&meshLod=2&morphTargets=mouthSmile,mouthOpen,eyesClosed`:`/metaverse/avatar/glb/mewod/${J.me}.glb`:"/metaverse/avatar/glb/62a2b0461e270d2d0b50ad9a.glb",npc:J.npc?-1==J.npc.indexOf("mewod-")?`https://api.readyplayer.me/v1/avatars/${J.npc}.glb?useDracoMeshCompression=true&textureAtlas=256&textureSizeLimit=256&meshLod=2&morphTargets=mouthSmile,mouthOpen,eyesClosed`:`/metaverse/avatar/glb/mewod/${J.npc}.glb`:"/metaverse/avatar/glb/648806c44e7fe89b29a55a38.glb",particle:q.value||f(M).NONE,bgm:H.value,ambient:E.value,environment:null==(l=D.value)?void 0:l.world_environment,"only-display-npc":!0},null,8,["skybox","me","npc","particle","bgm","ambient","environment"])):_("",!0),le.value||u.value&&f(j).liveAudioData?(n(),k(I,{key:4,ref_key:"chatViewRef",ref:oe,startNPCTalking:null==(o=P.value)?void 0:o.startNPCTalking,stopNPCTalking:null==(s=P.value)?void 0:s.stopNPCTalking,characterInfo:D.value,cameraToNPC:null==(v=P.value)?void 0:v.cameraToNPC,cameraToMe:null==(m=P.value)?void 0:m.cameraToMe,cameraToDefault:null==(d=P.value)?void 0:d.cameraToDefault,startMyMouthTalking:null==(g=P.value)?void 0:g.startMyMouthTalking,stopMyMouthTalking:null==(p=P.value)?void 0:p.stopMyMouthTalking,startNPCMouthTalking:null==(b=P.value)?void 0:b.startNPCMouthTalking,startNPCSinging:null==(h=P.value)?void 0:h.startNPCSinging,stopNPCMouthTalking:null==(y=P.value)?void 0:y.stopNPCMouthTalking,startMeTalking:null==(x=P.value)?void 0:x.startMeTalking,stopMeTalking:null==(C=P.value)?void 0:C.stopMeTalking,cameraToRandomNPC:null==(N=P.value)?void 0:N.cameraToRandomNPC,enableMic:f(j).enableMic,enableSound:G.value,setAudio:Q,enableBgm:Y.value,enableAmbient:F.value,vad:null,onOnSendMessage:re,onOnMuteYoutube:se,onOnYoutubeVolumeHigh:ue,onOnYoutubeVolumeLow:ie},null,8,["startNPCTalking","stopNPCTalking","characterInfo","cameraToNPC","cameraToMe","cameraToDefault","startMyMouthTalking","stopMyMouthTalking","startNPCMouthTalking","startNPCSinging","stopNPCMouthTalking","startMeTalking","stopMeTalking","cameraToRandomNPC","enableMic","enableSound","enableBgm","enableAmbient"])):_("",!0),z.value||u.value?(n(),k(B,{key:5,characterInfo:D.value,characterId:X.value,conversationId:Z.value,onOnSocketMessage:ne,ref_key:"socketConnect",ref:L},null,8,["characterInfo","characterId","conversationId"])):_("",!0),u.value&&f(j).isAgreedMicTips?(n(),r("div",R,[T(S,{ref_key:"ytPlayerRef",ref:A,id:c.value},null,8,["id"])])):_("",!0)],64)}}});
1export{D as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.