import{d as A,g as E,o as L,s as T,b0 as b,bz as I,f as w,a as K,c as k,ad as D,e as U,h as g,T as O,R,F as C,v as M,q as X,i as S,aG as H,j as N,bA as B,aI as Y,aJ as P,bB as V,bC as y,aK as x,aL as F,aM as q}from"./index-c7c47f9a.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,t,i,s,d,m,v){return new c(t,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(),t=0;tawait B(),c=async()=>{try{const e=o.isCbs?{code:200,data:{}}:await l();if((e==null?void 0:e.code)===5e3){const a=M();if(X(e.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=(e==null?void 0:e.data)||{};S(n),w.platformType=n.clientType==="STUDENT"?"STUDENT":""}catch(e){w.status="error",H(),console.log("🚀 ~ error:",e)}};L(async()=>{if(o.Authorization&&T(o.Authorization),!b()){const e=await I();if(e!=null&&e.content){const n=e.content,a=n.tokenType+" "+n.accessToken;T(a)}}if(o.productXmlImg){w.status="login";return}c(),K(N())});const u=e=>{e.code==="ArrowUp"?window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowUp"},"*"):e.code==="ArrowDown"&&window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowDown"},"*")};k(()=>{const e=document.getElementById("loading");e&&document.body.removeChild(e),o.platform=="pc"&&document.body.addEventListener("keyup",n=>u(n)),document.addEventListener("contextmenu",function(n){}),document.addEventListener("keydown",function(n){(n.key==="F12"||n.ctrlKey&&n.shiftKey&&n.key==="I"||n.metaKey&&n.altKey&&n.key==="I")&&n.preventDefault()})}),D(()=>{o.platform=="pc"&&document.body.removeEventListener("keyup",u)});const p=U(()=>w.status==="login");return()=>g(C,null,[w.status==="error"?g(O,null,null):p.value?g(R,null,null):null])}}),Q=[{path:"/",component:V},{path:"/product-img",component:()=>y(()=>import("./index-9bdbac24.js"),["./index-9bdbac24.js","./index-c7c47f9a.js","..\\css\\index-bf8f1009.css","..\\css\\index-e2246bb5.css"],import.meta.url)},{path:"/evaluat-report",component:()=>y(()=>import("./index-3c9a2adb.js"),["./index-3c9a2adb.js","./index-c7c47f9a.js","..\\css\\index-bf8f1009.css","./plyr.min-c8c2777b.js","..\\css\\plyr-ad8ef5ae.css","..\\css\\index-7e33bddc.css"],import.meta.url)},{path:"/preview",component:()=>y(()=>import("./index-33433c30.js"),["./index-33433c30.js","./index-c7c47f9a.js","..\\css\\index-bf8f1009.css","..\\css\\index-e2246bb5.css"],import.meta.url)},{path:"/view-figner",component:()=>y(()=>import("./index-c7c47f9a.js").then(o=>o.bQ),["./index-c7c47f9a.js","..\\css\\index-bf8f1009.css"],import.meta.url)},{path:"/:pathMatch(.*)*",component:x,meta:{title:"404 Not Fund"}}],_=Y({history:P(),routes:Q});_.beforeEach((o,l,c)=>{o.meta.title&&(document.title=o.meta.title),c()});(function(){var p,e,n,a,f,h;const o=E(),l=navigator.userAgent,c=window.DAYA||((e=(p=window.webkit)==null?void 0:p.messageHandlers)==null?void 0:e.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(z).use(_).mount("#app");export{j as __vite_legacy_guard};