import{d as E,R as A,$ as f,_ as y,b3 as q,c as e,q as a,B as w,ah as C,r as B,f as P,a5 as T,F as N}from"./index.332c7f08.js";import{s as i,a as L}from"./signin-tips.4edbed1d.js";import{C as _}from"./index.324108a5.js";import{F as n}from"./index.1ed6273e.js";import{s as r}from"./video.module.2569ebf7.js";import{P as M}from"./plyr.min.22fd58dd.js";/* empty css */import{d as k}from"./deep-clone.c5af4e6b.js";import{F as j}from"./index.f74c7b35.js";import{R as b,a as d}from"./index.a4155be3.js";import{T as p}from"./index.98482791.js";import"./index.91135ff9.js";import"./Checker.1af5496e.js";var R=E({name:"pre-register",emits:["tabChange"],setup(c,{emit:F}){const o=A(""),m=()=>{},l=v=>{v.data.api==="parent-agenda"&&(o.value=v.data.message||"")};return f(()=>{y(()=>{window.parent&&window.parent.postMessage({api:"onLoad",status:!0},"*")}),window.addEventListener("message",l)}),q(()=>{window.removeEventListener("message",l)}),()=>e("div",{class:i["per-register-active"]},[e("div",{class:i.flowPath},[e("i",{class:i.flowPathTitle},null),e("div",{class:i.flowPathContent,innerHTML:o.value},null)]),e("div",{class:i.signin},[e("div",{class:i.tips},[e("img",{src:L,class:i.signinTips},null),e("p",null,[a("\u8BF7\u5148\u8FDB\u884C"),e("span",null,[a("\u7B7E\u5230")]),a("\uFF0C\u518D\u89C2\u770B"),e("span",null,[a("\u7BA1\u4E50\u56E2\u5BB6\u957F\u4F1A\u89C6\u9891")])])]),e(_,{class:i.cellGroup,border:!1},{default:()=>[e(n,{label:"\u5B66\u751F\u59D3\u540D",labelAlign:"top",placeholder:"\u8BF7\u8F93\u5165\u5B66\u751F\u59D3\u540D",autocomplete:"off"},null),e(n,{label:"\u5E74\u7EA7",labelAlign:"top",placeholder:"\u8BF7\u9009\u62E9\u5E74\u7EA7",isLink:!0,readonly:!0,clickable:!1},null),e(n,{label:"\u73ED\u7EA7",labelAlign:"top",placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",isLink:!0,readonly:!0,clickable:!1},null),e(w,{class:i.submitBtn,onClick:m},null)]})])])}}),V=E({name:"pre-register",emits:["tabChange"],setup(c,{emit:F}){const o=C(),m=o.query.v?JSON.parse(o.query.v):[];console.log(o.query,"query");const l=B({coverImg:o.query.coverImg,introductionVideo:o.query.introductionVideo,id:null,videoDetails:k(m),player:null,currentTime:0}),v=()=>{const g={controls:["play-large","play","progress","captions","current-time","duration","settings","fullscreen"],settings:["speed"],speed:{selected:1,options:[.5,1,1.5,2]},i18n:{speed:"\u901F\u5EA6",normal:"\u9ED8\u8BA4"},invertTime:!1};P().iPhone&&(g.fullscreen={enabled:!0,fallback:"force",iosNative:!0});const x=[];k(l.videoDetails).forEach(s=>{x.push({time:s.startNode,label:s.desc})}),g.markers={enabled:!0,points:x},l.player=new M("#register-video",g),l.player.on("loadedmetadata",()=>{h(l.player.currentTime)}),l.player.on("timeupdate",s=>{console.log(l.player.currentTime,"forms.player.currentTime",s),h(l.player.currentTime)}),l.player.on("enterfullscreen",()=>{console.log("fullscreen");const s=document.createElement("i");s.id="fullscreen-back",s.className="van-icon van-icon-arrow-left video-back",s.addEventListener("click",()=>{l.player.fullscreen.exit()}),console.log(document.getElementsByClassName("plyr")),document.getElementsByClassName("plyr")[0].appendChild(s)}),l.player.on("exitfullscreen",()=>{console.log("exitfullscreen");const s=document.getElementById("fullscreen-back");s&&s.remove()})},h=u=>{l.videoDetails.forEach(g=>{g.startNode<=u&&u<=g.endNode&&(l.id=g.id)})};f(()=>{y(()=>{v()})});const z=()=>{},D=A(""),S=A(),I=u=>{u.data.api==="parent-notes"&&(console.log(u.data,"data"),D.value=u.data.message||"",S.value=u.data.registerDisplay||!1)};return f(()=>{y(()=>{window.parent&&window.parent.postMessage({api:"onLoad",status:!0},"*")}),window.addEventListener("message",I)}),q(()=>{window.removeEventListener("message",I)}),()=>e("div",{class:r["pre-register-video"]},[e("div",{class:r.videoContainer},[e("div",{class:r["video-content"]},[e("img",{src:l.coverImg,class:r.coverImg},null)])]),e("div",{class:r.videoCount},[e("div",{class:r.videoTitle},null),e("div",{class:r.videoCountContent},[l.videoDetails.map(u=>e("span",{class:[u.id===l.id?r.active:""],onClick:()=>{l.player.currentTime=u.startNode}},[u.desc]))])]),e("div",{class:r.messageContainer},[e("div",{class:r.messageContent},[e("div",{innerHTML:D.value},null),S.value&&e(w,{class:r.submitBtn,onClick:z},null)])])])}});const G="_registerShow_wv681_1",$="_banner_wv681_39",H="_system_wv681_52",J="_title_wv681_82",O="_radioSection_wv681_94",U="_radioItem_wv681_100",K="_otherSubject_wv681_114",Q="_wxPopupDialog_wv681_155",W="_popupContainer_wv681_170",X="_title1_wv681_176",Y="_popupTips_wv681_183";var t={registerShow:G,banner:$,"btn-submit":"_btn-submit_wv681_44",system:H,"van-cell--required":"_van-cell--required_wv681_25","top-tips":"_top-tips_wv681_61",title:J,radioSection:O,radioItem:U,"van-picker__confirm":"_van-picker__confirm_wv681_111",otherSubject:K,"submit-container":"_submit-container_wv681_122","submit-title":"_submit-title_wv681_131","submit-tips":"_submit-tips_wv681_138","submit-btn":"_submit-btn_wv681_144","van-button":"_van-button_wv681_151",wxPopupDialog:Q,popupContainer:W,title1:X,popupTips:Y},Z=E({name:"register-show",setup(){const c=C(),F=B({instrumentPriceImg:c.query.instrumentPriceImg,name:c.query.name});return()=>e("div",{class:t.registerShow},[e("div",{class:t.title},[F.name,a("\u7BA1\u4E50\u56E2\u62A5\u540D\u7533\u8BF7")]),e(j,{validateFirst:!0,scrollToError:!0,ref:"form",class:t.form},{default:()=>[e("div",{class:t["top-tips"]},[a("1\u3001\u4E3A\u4E86\u4FDD\u969C\u4E50\u56E2\u987A\u5229\u7EC4\u5EFA\uFF0C\u907F\u514D\u540D\u989D\u6D6A\u8D39\uFF1B\u8BF7\u5BB6\u957F\u4E0E\u5B69\u5B50\u4EE5\u81EA\u613F\u4E3A\u539F\u5219\uFF0C\u5728\u786E\u8BA4\u610F\u5411\u540E\u586B\u5199\u76F8\u5173\u4FE1\u606F\uFF1B\u4E13\u4E1A\u8001\u5E08\u5C06\u6839\u636E\u5BB6\u957F\u7684\u76F8\u5173\u586B\u62A5\uFF0C\u786E\u8BA4\u5B69\u5B50\u662F\u5426\u80FD\u591F\u52A0\u5165\u4E50\u56E2\uFF1B"),e("br",null,null),a("2\u3001\u81EA\u7528\u4E50\u5668\u53CA\u8BFE\u540E\u7EC3\u4E60\uFF0C\u5BB6\u957F\u81EA\u613F\u9009\u62E9\u51C6\u5907\u65B9\u5F0F\u3002")]),e(_,{inset:!0,class:t["cell-group"]},{default:()=>[e(n,{labelAlign:"top",label:"\u6027\u522B",name:"sex"},{input:()=>e(b,{checkedColor:"#57ABF8",direction:"horizontal"},{default:()=>[e(p,{size:"large",type:"primary",color:"#57ABF8",textColor:"#FFF",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:1},null),a("\u7537\u751F")]}),e(p,{size:"large",type:"primary",color:"#EAEAEA",textColor:"#AAA",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:0},null),a("\u5973\u751F")]})]})}),e(n,{labelAlign:"top",label:"\u5B69\u5B50\u662F\u5426\u6709\u5B66\u4E60\u8FC7\u7684\u4E50\u5668(\u6709\u8BF7\u5907\u6CE8)",name:"learningSubjectName",placeholder:"\u8BF7\u8F93\u5165\u5B66\u4E60\u8FC7\u7684\u4E50\u5668"},null),e(n,{labelAlign:"top",label:"\u9009\u62A5\u58F0\u90E81",readonly:!0,name:"registerSubjectId",placeholder:"\u8BF7\u9009\u62E9\u9009\u62A5\u58F0\u90E81"},{"right-icon":()=>e(T,{name:"arrow",color:"#323233",size:"16"},null)}),e(n,{labelAlign:"top",label:"\u9009\u62A5\u58F0\u90E82",readonly:!0,name:"standbyRegisterSubjectId",placeholder:"\u8BF7\u9009\u62E9\u9009\u62A5\u58F0\u90E82"},{"right-icon":()=>e(T,{name:"arrow",color:"#323233",size:"16"},null)}),e(n,{labelAlign:"top",label:"\u662F\u5426\u670D\u4ECE\u8C03\u914D",name:"adjust"},{input:()=>e("div",null,[e("p",{class:t.otherSubject},[a("(\u5982\u679C\u81EA\u9009\u58F0\u90E8\u540D\u989D\u5DF2\u6EE1\uFF0C\u662F\u5426\u613F\u610F\u63A5\u53D7\u5B89\u6392\u5176\u4ED6\u58F0\u90E8?)")]),e(b,{"checked-color":"#57ABF8",direction:"horizontal"},{default:()=>[e(p,{size:"large",type:"primary",color:"#57ABF8",textColor:"#FFF",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:1},null),a("\u613F\u610F")]}),e(p,{size:"large",type:"primary",color:"#EAEAEA",textColor:"#AAA",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:0},null),a("\u4E0D\u613F\u610F")]})]})])})]}),e(_,{inset:!0,class:t["cell-group"]},{default:()=>[e(n,{labelAlign:"top",label:"\u4E50\u5668\u53C2\u8003\u8868&Ai\u7EC3\u4E60\u53C2\u8003\u8868",border:!1,style:"padding-bottom: 0;"},{input:()=>e("img",{src:F.instrumentPriceImg,style:"width: 100%"},null)}),e(n,{labelAlign:"top",label:"\u4E50\u5668\u51C6\u5907\u65B9\u5F0F",name:"instrumentsPrepareMode"},{input:()=>e(b,{"checked-color":"#57ABF8",direction:"horizontal"},{default:()=>[e(p,{size:"large",type:"primary",color:"#57ABF8",textColor:"#FFF",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:1},null),a("\u81EA\u884C\u8D2D\u7F6E")]}),e(p,{size:"large",type:"primary",color:"#EAEAEA",textColor:"#AAA",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:0},null),a("\u5E0C\u671B\u57FA\u91D1\u4F1A\u63D0\u4F9B\u6E20\u9053\u8D2D\u7F6E")]})]})}),e(n,{labelAlign:"top",label:"\u4E50\u56E2\u5B66\u4E60\u7CFB\u7EDF\u51C6\u5907\u65B9\u5F0F",name:"learningSystemPrepareMode"},{input:()=>e(b,{"checked-color":"#57ABF8",direction:"horizontal"},{default:()=>[e(p,{size:"large",type:"primary",color:"#57ABF8",textColor:"#FFF",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:1},null),a("\u81EA\u884C\u8D2D\u7F6E")]}),e(p,{size:"large",type:"primary",color:"#EAEAEA",textColor:"#AAA",class:t.radioSection},{default:()=>[e(d,{class:t.radioItem,name:0},null),a("\u5E0C\u671B\u57FA\u91D1\u4F1A\u63D0\u4F9B\u6E20\u9053\u8D2D\u7F6E")]})]})}),e(n,{labelAlign:"top",type:"tel",label:"\u8054\u7CFB\u7535\u8BDD(\u76F4\u63A5\u76D1\u62A4\u4EBA)",name:"phone",placeholder:"\u8BF7\u8F93\u5165\u76D1\u62A4\u4EBA\u624B\u673A\u53F7\u7801"},null)]}),e(w,{size:"large",block:!0,round:!0,class:t["btn-submit"],"native-type":"submit"},null)]})])}}),me=E({name:"show-page",setup(){const c=C();console.log(c.query,"query");const F=c.query.index?Number(c.query.index):1,o=B({tabIndex:F||1});return()=>e(N,null,[o.tabIndex===1&&e(R,{onTabChange:m=>{o.tabIndex=m}},null),o.tabIndex===2&&e(V,{onTabChange:m=>{o.tabIndex=m}},null),o.tabIndex===3&&e(Z,null,null)])}});export{me as default};