!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r{r=e.d,l=e.x,i=e.r,a=e.y,s=e.a8,c=e.a,u=e.V,d=e.A,p=e.F,g=e.C,y=e.q,m=e.U,f=e.S,v=e.h,b=e.a1,w=e.a2,h=e.D,k=e.E},e=>{S=e.M},e=>{x=e.s},e=>{j=e.u,O=e.a},e=>{C=e.g,P=e.s,I=e.a,D=e.b},e=>{T=e.C,E=e.a},e=>{N=e.I},null],execute:function(){const R=""+new URL("library-1-96754f77.png",n.meta.url).href,L=""+new URL("library-2-18c7f885.png",n.meta.url).href,U=""+new URL("library-3-784f5dd5.png",n.meta.url).href,q=r({name:"knowledge-guide",emits:["close"],setup(e,{emit:n}){const r=l({box:{},show:!1,steps:[{ele:"",eleRect:{},img:C("knowledge1.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{width:"5.46rem",height:"2.30rem",top:"1.9rem"},btnsStyle:{top:"4.5rem",left:"1rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",eleRect:{},img:C("knowledge2.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{top:"1.9rem",left:"-1.5rem"},btnsStyle:{top:"4.5rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",img:C("knowledge3.png"),handStyle:{top:"4.1rem",left:"3.6rem"},imgStyle:{top:"4.8rem",left:"1.2rem",width:"7.2rem",height:"3.45rem"},btnsStyle:{top:"8.8rem",left:"2.3rem",transform:"scale(1.2)"},boxStyle:{transform:"scale(1)"}}],step:0}),y=i(!1),m=i({}),f=function(){var e=o((function*(){try{const t=yield I({guideTag:"guideInfo"});var e;if(t.data)m.value=JSON.parse(null===(e=t.data)||void 0===e?void 0:e.guideValue)||null;else m.value={};m.value&&m.value.knowledge?y.value=!1:y.value=!0}catch(t){console.log(t)}}));return function(){return e.apply(this,arguments)}}(),v=()=>{const e=document.getElementById(`knowledge-${r.step}`);if(console.log(e,"ele"),e){const t=e.getBoundingClientRect();r.box={left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}}else w()};a((()=>{f(),v(),window.addEventListener("resize",b)}));const b=()=>{v()};s((()=>{window.removeEventListener("resize",b)}));const w=()=>{console.log(r.step,""),r.step>=2?h():(r.step=r.step+1,v())},h=function(){var e=o((function*(){m.value?m.value.knowledge=!0:m.value={knowledge:!0};try{yield D({guideTag:"guideInfo",guideValue:JSON.stringify(m.value)})}catch(e){console.log(e)}y.value=!1}));return function(){return e.apply(this,arguments)}}();return()=>c(u,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",P.guidePopup],show:y.value,"onUpdate:show":e=>y.value=e},{default:()=>[c("div",{class:P.content,onClick:()=>w()},[r.step!=r.steps.length-1&&c("div",{class:[P.backBtn,P.right],onClick:e=>{e.stopPropagation(),h()}},[d("跳过")]),c("div",{class:[P.box,P.noscalc],style:t(t({},r.box),r.steps[r.step].boxStyle),id:`modeType-${r.step}`},[r.steps.map(((e,t)=>{var n,o;return c("div",{onClick:e=>e.stopPropagation(),class:P.item,style:{display:t===r.step?"":"none",left:`${null===(n=e.eleRect)||void 0===n?void 0:n.left}px`,top:`${null===(o=e.eleRect)||void 0===o?void 0:o.top}px`}},[c("img",{class:P.img,style:e.imgStyle,src:e.img},null),c("img",{class:P.iconHead,style:e.handStyle,src:C("indexDot.png")},null),c("div",{class:P.btns,style:e.btnsStyle},[r.step+1==r.steps.length?c(p,null,[c(g,{class:P.btn,round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{r.step=0,v()}},{default:()=>[d("再看一遍")]}),c(g,{class:[P.btn,P.endBtn],round:!0,type:"primary",onClick:()=>h()},{default:()=>[d("完成")]})]):c(g,{class:P.btn,round:!0,type:"primary",onClick:()=>w()},{default:()=>[d("下一步 ("),r.step+1,d("/"),r.steps.length,d(")")]})])])}))])])]})}});e("default",r({name:"knowledge-ligrary",setup(){const e=y(),t=m(),n=i(),r=l({cid:t.query.cid,list:[],activeNames:sessionStorage.getItem("knowledge-ligrary-key")?Number(sessionStorage.getItem("knowledge-ligrary-key")):0,background:"transparent",color:"#fff"}),s=function(){var e=o((function*(){try{const{data:e}=yield h.post("/edu-app/lessonCourseware/queryStudentLessonDetail",{requestType:"form",data:{lessonCoursewareId:r.cid}});r.list=e,n.value=!0}catch(e){}}));return function(){return e.apply(this,arguments)}}(),u=e=>e%3==1?R:e%3==2?L:e%3==0?U:void 0,p=function(){var t=o((function*(t){try{const{data:n}=yield h.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:r.cid}});if(!n)return void setTimeout((()=>{k("暂无题目")}),100);"TEST"===t?e.push({path:"/examination-mode",query:{lessonCoursewareId:r.cid}}):e.push({path:"/practice-mode",query:{lessonCoursewareId:r.cid}})}catch(n){}}));return function(e){return t.apply(this,arguments)}}();return a((()=>{j(document,"scroll",(()=>{const{y:e}=O();e.value>52?(r.background="#fff",r.color="#323333"):(r.background="transparent",r.color="#fff")})),s()})),()=>{let t;return c("div",{class:x.knowledgeLibrary},[c(S,{position:"top"},{default:()=>[c(f,{border:!1,background:r.background,color:r.color},{right:()=>c("div",{class:[x.wroingBtn],onClick:()=>e.push("/wroing-book")},[c("i",{class:x.iconWroing},null),d("错题本")])})]}),c("div",{class:x.btnGroup},[c("div",{id:"knowledge-0",class:x.btnPractice,onClick:()=>p("PRACTICE")},null),c("div",{id:"knowledge-1",class:x.btnTest,onClick:()=>p("TEST")},null)]),c("div",{class:[x.containerSection,x.librarySection]},[c(T,{modelValue:r.activeNames,"onUpdate:modelValue":e=>r.activeNames=e,accordion:!0,border:!1,onChange:e=>{sessionStorage.setItem("knowledge-ligrary-key",e)}},(o=t=r.list.map(((t,n)=>c(E,{title:t.lessonCoursewareDetailName,name:n,value:r.activeNames===n?"收起":"展开",border:!1},{default:()=>[t.knowledgeDetails&&t.knowledgeDetails.map(((t,n)=>c("div",{class:x.unitItem,onClick:()=>e.push({path:"/unit-detail",query:{detailId:t.lessonCoursewareKnowledgeDetailId}})},[c(N,v({id:0==n?"knowledge-2":""},{class:x.unitImg,lazyLoad:!0,src:u(n)}),null),c("p",{class:x.name},[c("span",null,[t.name])])]))),t.knowledgeDetails&&t.knowledgeDetails.length<=0&&c(b,{description:"暂无章节"},null)]}))),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!w(o)?t:{default:()=>[t]}))]),n.value&&c(q,null,null)]);var o}}}))}}}))}();