import{d as L,F as E,G as b,I as T,bo as A,bI as I,N as w,J as D,M as K,aD as k,v as O,j as g,O as U,R,P as M,a3 as C,_ as S,Q as X,b2 as N,S as P,bJ as H,b4 as V,b5 as Y,bK as B,bL as y,b6 as x,b7 as F,b8 as Q}from"./index-040f8926.js";function J(){import.meta.url,import("_").catch(()=>1);async function*o(){}}(function(){if(typeof window>"u")return;var o,l="ontouchstart"in window;document.createTouch||(document.createTouch=function(r,e,i,s,d,m,v){return new c(e,i,{pageX:s,pageY:d,screenX:m,screenY:v,clientX:s-window.pageXOffset,clientY:d-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var r=u(),e=0;eawait H(),c=async()=>{try{const t=o.isCbs||window.location.href.includes("simple-detail")?{code:200,data:{}}:await l();if((t==null?void 0:t.code)===5e3){const a=C();if(S(t.message),a.isApp)postMessage({api:"login"});else{if(/(192|localhost)/.test(location.origin))return;window.parent.postMessage({api:"onLogin"},"*"),setTimeout(()=>{window.location.href=`${location.origin}/classroom`},500)}return}const n=(t==null?void 0:t.data)||{};X(n),w.platformType=n.clientType==="STUDENT"?"STUDENT":""}catch(t){w.status="error",N(),console.log("🚀 ~ error:",t)}};b(async()=>{if(o.Authorization&&T(o.Authorization),!window.location.href.includes("simple-detail")){if(!A()){const t=await I();if(t!=null&&t.content){const n=t.content,a=n.tokenType+" "+n.accessToken;T(a)}}if(o.productXmlImg){w.status="login";return}}c(),D(P())});const u=t=>{t.code==="ArrowUp"?window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowUp"},"*"):t.code==="ArrowDown"&&window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowDown"},"*")};K(()=>{const t=document.getElementById("loading");t&&document.body.removeChild(t),(o.platform=="pc"||o.isPreView)&&(document.body.addEventListener("keyup",n=>u(n)),document.addEventListener("contextmenu",function(n){n.preventDefault()}),document.addEventListener("keydown",function(n){(n.key==="F12"||n.ctrlKey&&n.shiftKey&&n.key==="I"||n.metaKey&&n.altKey&&n.key==="I")&&n.preventDefault()}))}),k(()=>{o.platform=="pc"&&document.body.removeEventListener("keyup",u)});const p=O(()=>w.status==="login");return()=>g(M,null,[w.status==="error"?g(U,null,null):p.value?g(R,null,null):null])}}),z=[{path:"/",component:B},{path:"/product-img",component:()=>y(()=>import("./index-d390b08f.js"),["./index-d390b08f.js","./index-040f8926.js","../css/index-1ec513a0.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/evaluat-report",component:()=>y(()=>import("./index-bb0d4dae.js"),["./index-bb0d4dae.js","./index-040f8926.js","../css/index-1ec513a0.css","./plyr.min-c8c2777b.js","../css/plyr-ad8ef5ae.css","./index-0daa1bde.js","../css/index-dbb7c2bb.css"],import.meta.url)},{path:"/preview",component:()=>y(()=>import("./index-653fb9df.js"),["./index-653fb9df.js","./index-040f8926.js","../css/index-1ec513a0.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/view-figner",component:()=>y(()=>import("./index-040f8926.js").then(o=>o.ca),["./index-040f8926.js","../css/index-1ec513a0.css"],import.meta.url)},{path:"/simple-detail",component:()=>y(()=>import("./index-f0a4f6db.js"),["./index-f0a4f6db.js","./index-040f8926.js","../css/index-1ec513a0.css","../css/index-2cf15a52.css"],import.meta.url)},{path:"/:pathMatch(.*)*",component:x,meta:{title:"404 Not Fund"}}],_=V({history:Y(),routes:z});_.beforeEach((o,l,c)=>{o.meta.title&&(document.title=o.meta.title),c()});(function(){var p,t,n,a,f,h;const o=E(),l=navigator.userAgent,c=window.DAYA||((t=(p=window.webkit)==null?void 0:p.messageHandlers)==null?void 0:t.DAYA)||window.COLEXIU||((a=(n=window.webkit)==null?void 0:n.messageHandlers)==null?void 0:a.COLEXIU)||window.ORCHESTRA||((h=(f=window.webkit)==null?void 0:f.messageHandlers)==null?void 0:h.ORCHESTRA),u=o.isCbs?"/cbs-app":(l.includes("COLEXIUSTUDENT"),"/edu-app");F({isApp:!!c,platformApi:u,platformType:(l.includes("COLEXIUSTUDENT"),""),proxy:""})})();Q(q).use(_).mount("#app");export{J as __vite_legacy_guard};