import{d as I,F as L,G as k,I as T,bo as D,bI as K,N as w,J as U,M as O,aD as R,v as $,j as y,O as M,R as C,P as N,a3 as S,_ as X,Q as x,b2 as P,S as V,bJ as H,b4 as Y,b5 as B,bK as F,bL as g,b6 as j,V as _,bM as q,b7 as z,b8 as Q}from"./index-6f82b769.js";function ee(){import.meta.url,import("_").catch(()=>1);async function*o(){}}(function(){if(typeof window>"u")return;var o,d="ontouchstart"in window;document.createTouch||(document.createTouch=function(r,e,s,p,l,m,A){return new c(e,s,{pageX:p,pageY:l,screenX:m,screenY:A,clientX:p-window.pageXOffset,clientY:l-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var r=i(),e=0;eawait H(),c=async()=>{try{const t=o.isCbs||window.location.href.includes("simple-detail")?{code:200,data:{}}:await d();if((t==null?void 0:t.code)===5e3){const u=S();if(X(t.message),u.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",P(),console.log("🚀 ~ error:",t)}};k(async()=>{if(o.Authorization&&T(o.Authorization),!window.location.href.includes("simple-detail")){if(!D()){const t=await K();if(t!=null&&t.content){const n=t.content,u=n.tokenType+" "+n.accessToken;T(u)}}if(o.productXmlImg){w.status="login";return}}c(),U(V())});const i=t=>{t.code==="ArrowUp"?window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowUp"},"*"):t.code==="ArrowDown"&&window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowDown"},"*")};O(()=>{const t=document.getElementById("loading");t&&document.body.removeChild(t),(o.platform=="pc"||o.isPreView)&&(document.body.addEventListener("keyup",n=>i(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()}))}),R(()=>{o.platform=="pc"&&document.body.removeEventListener("keyup",i)});const a=$(()=>w.status==="login");return()=>y(N,null,[w.status==="error"?y(M,null,null):a.value?y(C,null,null):null])}}),G=[{path:"/",component:F},{path:"/product-img",component:()=>g(()=>import("./index-59f3b70d.js"),["./index-59f3b70d.js","./index-6f82b769.js","../css/index-1ec513a0.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/evaluat-report",component:()=>g(()=>import("./index-2d47a45b.js"),["./index-2d47a45b.js","./index-6f82b769.js","../css/index-1ec513a0.css","./plyr.min-c8c2777b.js","../css/plyr-ad8ef5ae.css","./index-c8a62d72.js","../css/index-775a7918.css"],import.meta.url)},{path:"/preview",component:()=>g(()=>import("./index-3d8a0f43.js"),["./index-3d8a0f43.js","./index-6f82b769.js","../css/index-1ec513a0.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/view-figner",component:()=>g(()=>import("./index-6f82b769.js").then(o=>o.cb),["./index-6f82b769.js","../css/index-1ec513a0.css"],import.meta.url)},{path:"/simple-detail",component:()=>g(()=>import("./index-7b920124.js"),["./index-7b920124.js","./index-6f82b769.js","../css/index-1ec513a0.css","../css/index-2cf15a52.css"],import.meta.url)},{path:"/:pathMatch(.*)*",component:j,meta:{title:"404 Not Fund"}}],b=Y({history:B(),routes:G});b.beforeEach((o,d,c)=>{o.meta.title&&(document.title=o.meta.title),c()});const E=L();function W(){const o=async i=>{var t,n;const a=`Error message: ${i.target.tagName||""};${i.target.src||i.target.href||""};lineno: ${i.lineno||""};colno: ${i.colno||""};message: ${i.message||""};filename: ${i.filename||""};fileUrl: ${window.location.href};reason: ${((t=i.reason)==null?void 0:t.message)||""}; stack: ${((n=i.reason)==null?void 0:n.stack)||""}; bizId: ${_.examSongId||E.id||""}; partIndex: ${E["part-index"]||_.partIndex||0} partName: ${decodeURIComponent(E["part-name"]||"")||""};`;q(a)};return{startListenErrorLog:()=>{console.log("mount useErrorLog"),window.addEventListener("error",o),window.addEventListener("unhandledrejection",o)},stopListenErrorLog:()=>{window.removeEventListener("error",o),window.removeEventListener("unhandledrejection",o)}}}(function(){var a,t,n,u,f,h;const o=L(),d=navigator.userAgent,c=window.DAYA||((t=(a=window.webkit)==null?void 0:a.messageHandlers)==null?void 0:t.DAYA)||window.COLEXIU||((u=(n=window.webkit)==null?void 0:n.messageHandlers)==null?void 0:u.COLEXIU)||window.ORCHESTRA||((h=(f=window.webkit)==null?void 0:f.messageHandlers)==null?void 0:h.ORCHESTRA),i=o.isCbs?"/cbs-app":(d.includes("COLEXIUSTUDENT"),"/edu-app");z({isApp:!!c,platformApi:i,platformType:(d.includes("COLEXIUSTUDENT"),""),proxy:""})})();const v=Q(J);v.use(b);const Z=W();Z.startListenErrorLog();v.mount("#app");export{ee as __vite_legacy_guard};