import{_ as xe,a as De,b as Me,c as Oe,d as Ve,e as Fe,f as Ye}from"./icon_uploader.21a85a4d.js";import{_ as Ge}from"./icon-xin.797feb04.js";import{_ as We}from"./icon_album.4957b8e0.js";import{_ as Je}from"./icon_album_active.cb923735.js";import{_ as qe}from"./icon_exquisite.01ddc5aa.js";import{_ as ze}from"./icon_music_active.f55820b3.js";import{d as He,U as b,Q as Xe,P as Ke,S as fe,W as Y,V as Le,g,n as j,Y as Ae,a5 as je,bi as Qe,j as a,A as m,f as O,F as G,p as Ze,B as Q,bC as $e,aS as W,N as Z,X as J,y as T,D as q,T as $,bH as et}from"./ResizeObserver.es.b7226882.js";import{C as tt}from"./index.969bba7f.js";import{C as z}from"./index.40f703b6.js";import{C as at}from"./index.9269bf1e.js";import{I as R}from"./index.20c0f4c5.js";import{R as st,a as ee}from"./index.83925f29.js";import{T as ot}from"./index.ed3a5560.js";import"./index.b1e15d61.js";import"./index.77fc1df7.js";import{g as it,m as nt}from"./music.e5884c70.js";import{C as ge}from"./index.0b42adfa.js";import{o as h}from"./orderStatus.1ca966f0.js";import{i as rt}from"./icon_share.dff37aef.js";import{i as lt,a as ct,b as ut,c as dt,D as mt,s as pt,f as ft,d as At}from"./download.e3cc889c.js";import{C as gt}from"./index.0b85a0cc.js";import{a as te}from"./icon_checkbox.808b953c.js";import{i as ae}from"./icon_checkbox_default.256c0849.js";import{P as yt}from"./plyr.min.0a479001.js";/* empty css */import{s as bt,g as Ct}from"./formatSvgToImg.87bf0d28.js";import{e as vt}from"./index.1eaf642c.js";import{P as It}from"./index.e7e9e267.js";import"./index.cf00521e.js";import"./code-down-load.95f00a21.js";import"./logo.bcac726b.js";import"./browser.b3690ea1.js";import"./html2canvas.esm.3d083717.js";import"./icon_teacher.40b6f077.js";const ht="_base_brd1p_1",_t="_detail_brd1p_4",Et="_shareBtn_brd1p_21",Tt="_bgImg_brd1p_33",St="_bgContent_brd1p_42",Ut="_musicContent_brd1p_51",Rt="_musicTitle_brd1p_61",wt="_musicImg_brd1p_68",Pt="_finch_brd1p_78",Nt="_finchLoad_brd1p_82",Bt="_collectCell_brd1p_100",kt="_videoOperation_brd1p_112",xt="_audio_brd1p_115",Dt="_audition_brd1p_126",Mt="_collect_brd1p_100",Ot="_userInfo_brd1p_152",Vt="_collectSection_brd1p_172",Ft="_lookAlbum_brd1p_191",Yt="_bg_brd1p_33",Gt="_musicContainer_brd1p_217",Wt="_functionSection_brd1p_226",Jt="_functionItem_brd1p_230",qt="_disabled_brd1p_247",zt="_shareMate_brd1p_250",Ht="_icon_brd1p_123",Xt="_info_brd1p_265",Kt="_tagDiscount_brd1p_281",Lt="_shareVip_brd1p_294",jt="_buttonDiscount_brd1p_336",Qt="_pImg_brd1p_349",Zt="_musicInfo_brd1p_356",$t="_coomposer_brd1p_360",ea="_links_brd1p_370",ta="_iconAlbum2_brd1p_377",aa="_tag_brd1p_281",sa="_download_brd1p_409",oa="_iconExchange_brd1p_420",ia="_exquisiteFlag_brd1p_430",na="_songAlbum_brd1p_435",ra="_colSticky_brd1p_445",la="_priceSection_brd1p_450",ca="_price_brd1p_450",ua="_buyBtn_brd1p_464",da="_primry_brd1p_478",ma="_member_brd1p_481",pa="_empty_brd1p_487",fa="_emptyImg_brd1p_495",Aa="_staffContainer_brd1p_498",ga="_staffTitle_brd1p_501",ya="_staffImg_brd1p_507",ba="_name_brd1p_511",Ca="_boxStyle_brd1p_517",va="_active_brd1p_523";var i={base:ht,detail:_t,shareBtn:Et,bgImg:Tt,bgContent:St,musicContent:Ut,musicTitle:Rt,musicImg:wt,finch:Pt,finchLoad:Nt,collectCell:Bt,videoOperation:kt,audio:xt,audition:Dt,collect:Mt,userInfo:Ot,collectSection:Vt,lookAlbum:Ft,bg:Yt,musicContainer:Gt,functionSection:Wt,functionItem:Jt,disabled:qt,shareMate:zt,icon:Ht,info:Xt,tagDiscount:Kt,shareVip:Lt,buttonDiscount:jt,pImg:Qt,musicInfo:Zt,coomposer:$t,links:ea,iconAlbum2:ta,tag:aa,download:sa,iconExchange:oa,exquisiteFlag:ia,songAlbum:na,colSticky:ra,priceSection:la,price:ca,buyBtn:ua,primry:da,member:ma,empty:pa,emptyImg:fa,staffContainer:Aa,staffTitle:ga,staffImg:ya,name:ba,boxStyle:Ca,active:va},Ia="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAAAXNSR0IArs4c6QAAB/9JREFUaEPdWn1sHEcV/73du7NrJ7bx7c5eDjtySNJGrSgk/SNEBCEkUihQNbQlTYEWpR+URkEiRVREqGA+pCJABYkoaiEliBYKCYVUBVoSBKoIKv0nhaIWiEOwknK9291z7fojvo/dh2Z9d9nbu/N5z25y8vy3O/PevN+8N2/eezOEJW7r1q3rMM3Z7lhstkNVVY2Z1zNzHzP3yqmIaIKIxoloxHEcO5/vzAnROX369OncUopCS8VMCLHFYX4vMTYCeCcDa4lInY8/MzsE/AfA35jwokr0nGmazy+FTIsGpglxD7t8H4BVAFYuUqhJAK+RQg/ZpvnIYni1BEya2/jk5EfZcb9LRAlmXowMNbREBGZOk6rs7Vu58tetmGloYLqe+BDD2QfQ1saACFTizMxTACYAzJQQdAHoJaIV8ntuTeovjAQI8AmC+qBlpX8XZvVCAdM0/YcAbmOgo94kc4JgGoSniJWj1Bk9ybOz06qqOjMzEUd2dnUVVcdxVOrs7ObZwjVM7g1g3ACgu9FCESAdy2O2bd29UHALAmYYhii6/DiYtzVgPElEfycooVe2zG/OEtx9zPyOhnuV6HhEoU9mMhmzGcCmwPoTiSuVovMYiDYFV5Q8G6IfsEqHspnMC80mW0h/3DA2k8O7AP60ZO6n8SyC+aQbUW8bS6dfmY/fvMAkKCo6zwIYrJ0AL3MscnM2lToFwF2I0CHGKPFk8nLKF38JwlV1TPQcR9QPzgeuITBpfo7jPsPAplqB6Ohn9+y+aXh4eKkBVU01PDysfH//gScB3h6UgYCTqqpc18gsGwKL6+IYAdtqzE+hr9mm+XUAxRAaWMzQiCbEA+zyl4NWw8DxrGVeW9eR1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aBNwLKsc8x8R8sEgN6+PsQ/xhEOhTE6MoKOjg4lEzMzM+gfGEAylUQ0GsX4kzElvZLoQ3TeMIy7NgEhhMzPo7pWDh05jNnZWVtNlUQxeKnX3t6O1y9f6S4t5eOmacZIFiO5m+6bi3zeBn+iv9/+kiokysFL0o9HR20SLgbnMoUdkkAPM4+7MGCrVAJVyZ1U5XRwEFGvJHArV+7JPN/1cALnNO924VzZepuEEG9y/nTQrZGC3log5XzhwKq4mSaOt5KAzC1aNBUripeTCIVCtlwqlVI6Iy4wzEsX+pELodtcKCuRKAipRikdHET0UxJYZOYGHUUn2ecTE7gyKNOq1TE8NIxj3d1OqlrzRPTbcwLlbrTJO2AT8MyFqn0GbBfy6hDXKArNexJGneK807yW45cKv93wRaYKTlVOh4x9kW0klahxLoRCKuE6matxNrqczMktc5tO17IeWEmnJQG3Bc1yRfYOXbGualdk0n1WCxq3JaXOgfNYtrSkzLuRf4t6ScD3zyr5XfDvw5YkIJ8WW1tb40RUlUaG7rlwfFrMFx//7ONufX39nvKuzf/3vF7YVl83OIpJ+LbFVETCv02+AgnZtamrq3tarcaHjDYAesq7MZWilnIDz9eN7mLmvv3VoHz7fPuzRyU/rOXvNn8AOgKkAa3euiMAAAAASUVORK5CYII=";const be=H=>{const S=`../component/images/${H}`;return{"../component/images/collection.png":xe,"../component/images/collection_active.png":De,"../component/images/icon-xin.png":Ge,"../component/images/icon_ai.png":Me,"../component/images/icon_album.png":We,"../component/images/icon_album_active.png":Je,"../component/images/icon_author.png":Oe,"../component/images/icon_download.png":Ve,"../component/images/icon_exquisite.png":qe,"../component/images/icon_music_active.png":ze,"../component/images/icon_share.png":Fe,"../component/images/icon_uploader.png":Ye}[S].default};var os=He({name:"MusicDetail",setup(){const H=b(it());localStorage.setItem("behaviorId",H.value);const S=Xe(),p=Ke(),v=b(!1),Ce=Number(p.query.activityId)||0,ve=b(Ce),se=b(!1),oe=b(null),ie=b(null),Ie=b("0"),V=b(""),e=fe({musicId:p.query.id,instrumentId:"",subjectId:"",isConcert:!1,details:{},list:[],open:!1,closed:!0,audioReady:!1,iframeSrc:"",musicXml:"",instrumentName:"",iframeRef:null,imgs:[],musicPdfUrl:"",partList:[],partNames:[],selectedPartName:"",selectedPartIndex:0,isComberRender:!1,metronomeUrl:"",metronomeMp3Url:""}),_=Y(()=>U.value.find(t=>t.value===e.selectedPartIndex)),ne=Y(()=>{const t=e.details;let o=t.isConvertibleScore,n=!1;return!o&&["FIRST","JIAN"].includes(t.scoreType)&&(o=!0,n=!0),{isConvertibleScore:o,isHiddenStaff:n}}),F=b(!1),A=fe({status:!1,radio:"STAVE"}),re={FREE:{color:"#01B84F",text:"\u514D\u8D39"},VIP:{color:"#CD863E",text:"\u4F1A\u5458"},CHARGE:{color:"#3591CE",text:"\u70B9\u64AD"}},X=t=>{var o,n,r;if(A.radio=t,A.status=!1,e.imgs=[],t=="FIRST"){v.value=!1;const l=(o=e.details)==null?void 0:o.firstPdfUrl;K(l)}else if(t=="JIAN"){v.value=!1;const l=(n=e.details)==null?void 0:n.jianPdfUrl;K(l)}else{v.value=!1;const l=(r=e.details)==null?void 0:r.musicPdfUrl;K(l)}},K=(t,o)=>{t?e.musicPdfUrl=t:e.musicPdfUrl="",k()},he=async t=>{if(!v.value){v.value=!0,se.value=!1;try{const{data:o}=await T.post("/musicSheet/detailSmall",{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student",data:{musicSheetId:p.query.id,tenantAlbumId:p.query.tenantAlbumId,providerType:p.query.providerType,instrumentId:e.instrumentId,subjectId:e.subjectId}});e.details=o,await Be(o),o.auditStatus==="DOING"&&q.confirm({message:"\u66F2\u76EE\u5BA1\u6838\u4E2D",showConfirmButton:!0,showCancelButton:!1,confirmButtonColor:"var(--van-primary)"}).then(()=>{O().isApp?j({api:"goBack"}):S.back()})}catch{se.value=!0}v.value=!1}},P=b(null),le=b(null),N=b(0),_e=async()=>{var n;const t=["play-large","play","progress","captions","duration"];P.value=new yt(le.value,{controls:t});const o=await T.get("/sysConfig/queryByParamNameList",{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student",params:{paramNames:"music_sheet_free_rate"}});N.value=((n=o.data[0])==null?void 0:n.paramValue)||0,J(async()=>{k()}),P.value.on("timeupdate",()=>{const r=P.value,l=r.duration*N.value/100||0;r.currentTime>=l&&!E.value.play&&r.stop()})},ce=async t=>{var o;if(((o=t.data)==null?void 0:o.api)==="musicStaffRender"){const n=t.data.osmdImg,r=[];for(let l=0;l{var r,l;if(p.query.instrumentId)e.instrumentId=p.query.instrumentId;else{const d=(r=g.user.data)==null?void 0:r.instrumentId;if(d){const C=d.split(",")[0];e.instrumentId=C}}const t=(l=g.user.data)==null?void 0:l.subjectId;if(t){const d=t.split(",")[0];e.subjectId=d}j({api:"setStatusBarTextColor",content:{statusBarTextColor:!0}}),await he();const{height:o}=Ae(oe),n=Ae(ie);Ie.value=o+n.height,window.addEventListener("message",ce)}),je(()=>{j({api:"setStatusBarTextColor",content:{statusBarTextColor:!1}})}),Qe(()=>{window.removeEventListener("message",ce)});const Ee=async()=>{var n,r,l;let t="",o="";O().isTeacher&&(o=p.query.tenantAlbumId||p.query.providerType=="TENANT"?"TENANT":"PLATFORM"),t=`/music/sheet/favorite/${(n=e.details)==null?void 0:n.id}`;try{await T.post(t,{requestType:"form",data:{providerType:o},prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student"}),e.details.favorite=(r=e.details)!=null&&r.favorite?0:1,e.details.favoriteCount=(l=e.details)!=null&&l.favorite?e.details.favoriteCount+1:e.details.favoriteCount-1<0?0:e.details.favoriteCount-1,setTimeout(()=>{var d;$((d=e.details)!=null&&d.favorite?"\u6536\u85CF\u6210\u529F":"\u53D6\u6D88\u6536\u85CF\u6210\u529F")},100)}catch{}},Te=async()=>{var t;try{const o=await T.post("/api-teacher/courseCourseware/submit",{data:{musicSheetId:e.details.id,clientType:"TEACHER",userId:(t=g.user.data)==null?void 0:t.userId}});setTimeout(()=>{e.details.coursewareId=o.data.id||"",$("\u5DF2\u5C06\u66F2\u76EE\u6DFB\u52A0\u5230\u8BFE\u4EF6"),e.details.coursewareStatus=1},100)}catch{}},Se=async()=>{q.confirm({title:"\u63D0\u793A",message:"\u60A8\u662F\u5426\u786E\u5B9A\u79FB\u51FA\u8BFE\u4EF6",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88",confirmButtonText:"\u786E\u5B9A"}).then(async()=>{try{await T.post("/api-teacher/courseCourseware/remove/"+e.details.coursewareId,{data:{}}),setTimeout(()=>{$("\u79FB\u51FA\u6210\u529F"),e.details.coursewareStatus=0},100)}catch{}})},Ue=async()=>{const t=e.details;h.orderObject.orderType="MUSIC",h.orderObject.orderName=t.name,h.orderObject.orderDesc=t.name,h.orderObject.actualPrice=t.musicPrice,h.orderObject.recomUserId=p.query.recomUserId||0,h.orderObject.activityId=p.query.activityId||0,h.orderObject.orderNo="",h.orderObject.orderList=[{orderType:"MUSIC",goodsName:t.name,actualPrice:t.musicPrice,price:t.musicPrice,...t}];const n=(await T.post("/userOrder/getPendingOrder",{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student",data:{goodType:"MUSIC",bizId:t.id}})).data;n?q.confirm({title:"\u63D0\u793A",message:"\u60A8\u6709\u4E00\u4E2A\u672A\u652F\u4ED8\u7684\u8BA2\u5355\uFF0C\u662F\u5426\u7EE7\u7EED\u652F\u4ED8\uFF1F",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88\u8BA2\u5355",confirmButtonText:"\u7EE7\u7EED\u652F\u4ED8"}).then(async()=>{h.orderObject.orderNo=n.orderNo,h.orderObject.actualPrice=n.actualPrice,h.orderObject.discountPrice=n.discountPrice,h.orderObject.paymentConfig={...n.paymentConfig,paymentVendor:n.paymentVendor,paymentVersion:n.paymentVersion},ue()}).catch(()=>{q.close(),Re(n.orderNo)}):ue()},ue=()=>{const t=e.details;S.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:t.id}})},Re=async t=>{try{await T.post("/userOrder/orderCancel",{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student",data:{orderNo:t}})}catch{}},we=Y(()=>{var o;let t=(o=e.details)==null?void 0:o.paymentType;return typeof t=="string"?(t=t.split(","),t):[]}),E=Y(()=>{var o;const t=e.details;return{hasTenantAlbum:!!((o=p.query)!=null&&o.tenantAlbumId),play:!!t.play,free:t==null?void 0:t.paymentType.includes("FREE"),charge:t==null?void 0:t.paymentType.includes("CHARGE"),vip:t==null?void 0:t.paymentType.includes("VIP"),buy:(t==null?void 0:t.orderStatus)==="PAID"}}),L=b(!1),de=b(""),me=b(0),U=b([]),Pe=async()=>{var t,o,n,r;try{const l=await T.post("/api-teacher/open/musicShareProfit",{data:{bizId:(t=e.details)==null?void 0:t.id,userId:(o=g.user.data)==null?void 0:o.userId}});let d=location.origin+`/teacher/#/shareMusic?id=${(n=e.details)==null?void 0:n.id}&recomUserId=${(r=g.user.data)==null?void 0:r.userId}&userType=${g.platformType}`;l.data.discount===1&&(d+=`&activityId=${l.data.activityId}`),me.value=l.data.discount||0,de.value=d,L.value=!0;return}catch{}};function Ne(t){const o=e.instrumentId;if(o){const{track:n}=t.find(r=>o==r.musicalInstrumentId)||{};return n}return null}const B=(t,o)=>{let n="";return o==="FIRST"?n=t.firstPdfUrl:o==="JIAN"?n=t.jianPdfUrl:o==="STAVE"&&(n=t.musicPdfUrl),n||""},Be=async t=>{var l,d,C;A.radio=t.scoreType;const o=t.musicSheetSoundList||[];let n=o;e.list=o,n=n.filter(u=>{var I,s;return!((s=(I=u.track)==null?void 0:I.toLocaleUpperCase())!=null&&s.includes("COMMON"))}),U.value=n.map((u,I)=>{const s=t.musicSheetType!=="SINGLE"&&t.isScoreRender?I+1:I,c=Ct(u.track);return{text:u.track+(c?`(${c})`:""),name:u.track+(c?`(${c})`:""),track:u.track,musicPdfUrl:u.musicPdfUrl,firstPdfUrl:u.firstPdfUrl,jianPdfUrl:u.jianPdfUrl,value:s}}),e.details=t||{},e.isComberRender=(l=e.details)==null?void 0:l.isScoreRender;let r;if((d=e.details)!=null&&d.musicSheetSoundList){const u=Ne((C=e.details)==null?void 0:C.musicSheetSoundList);if(u){const I=u.split(",").map(s=>s.toLowerCase().replace(/^\d+|\d+$/g,"").trim());r=U.value.find(s=>I.includes(s.track&&s.track.toLowerCase().replace(/^\d+|\d+$/g,"").trim())),r&&(e.selectedPartIndex=r.value)}}if(t.musicSheetType==="SINGLE")e.musicPdfUrl=B(t,t.scoreType);else if(e.isComberRender){U.value.unshift({text:"\u603B\u8C31",value:0,xmlIndex:999,musicPdfUrl:t.musicPdfUrl,firstPdfUrl:t.firstPdfUrl,jianPdfUrl:t.jianPdfUrl,track:"",name:"\u603B\u8C31"}),e.selectedPartIndex=t.defaultScoreRender?0:r?r.value:1;let u="";t.defaultScoreRender?u=B(t,t.scoreType):u=B(r,t.scoreType),e.musicPdfUrl=u}else{const u=U.value.find(I=>I.value===e.selectedPartIndex);u?e.musicPdfUrl=B(u,t.scoreType):e.musicPdfUrl=""}V.value=t.mp3Url,V.value?J(async()=>{_e()}):k()},pe=(t,o,n)=>{const r=sessionStorage.getItem("Authorization")||"",l="/klx-music-score/";let C=`${et()+l}?t=${Date.now()}#/?id=${t}&Authorization=${r}&isPreView=true&zoom=0.5&downPng=A4`;return C+="&systemType="+(g.platformType==="STUDENT"?"student":"teacher"),o===999?C+=`&part-index=${o}`:C+=`&part-name=${encodeURIComponent(n||"")}`,A.radio==="STAVE"?C+="&musicRenderType=staff":A.radio==="JIAN"?C+="&musicRenderType=fixedTone":A.radio==="FIRST"&&(C+="&musicRenderType=firstTone"),C},k=async()=>{try{J(()=>{var t,o;if(e.musicPdfUrl){const n=`${location.origin}${location.pathname}pdf/web/viewer-pdf.html?file=${encodeURIComponent(e.musicPdfUrl)}&t=${Date.now()}`;document.querySelector("#staffIframeRef").contentWindow.location.replace(n)}else{const n=pe(e.musicId,((t=_.value)==null?void 0:t.xmlIndex)||0,((o=_.value)==null?void 0:o.track)||"");document.querySelector("#staffIframeRef").contentWindow.location.replace(n)}})}catch(t){console.log(t,"error")}},ke=()=>{var o;document.getElementById("staffIframeRef").contentWindow.location.replace(pe(e.musicId,((o=_.value)==null?void 0:o.xmlIndex)||0,_.value.track))};return()=>{var t,o,n,r,l,d,C,u,I;return a("div",{class:i.detail},[a(ge,{position:"top"},{default:()=>{var s;return[a("div",{ref:oe},[a(tt,{background:"transparent",hideHeader:!1,border:!1,isFixed:!1,color:"#fff",title:(s=e.details)==null?void 0:s.name,backIconColor:"white"},{right:()=>a("div",{class:i.shareBtn,style:{color:"#fff"},onClick:Pe},[a(R,{src:rt},null),m("\u5206\u4EAB")])})])]}}),a("img",{class:i.bgImg,src:(t=e.details)==null?void 0:t.musicCover},null),a("div",{class:i.bgContent},null),a("div",{class:i.musicContainer,style:{marginTop:"16px",height:"calc(100vh - var(--header-height) - var(--bottom-height) - 16px)"}},[a("div",null,[a(z,{border:!1,center:!0,class:i.musicInfo},{icon:()=>{var s;return a(R,{class:i.pImg,src:(s=e.details)==null?void 0:s.musicCover},null)},title:()=>{var s,c,f,y,x,D;return a("div",{class:i.info},[a("h4",{class:"van-ellipsis"},[(s=e.details)==null?void 0:s.name]),a("p",{style:{display:"flex",alignItems:"center"}},[we.value.map(w=>{var M;return w&&a(ot,{style:{color:(M=re[w])==null?void 0:M.color},class:i.tag,type:"success",plain:!0},{default:()=>[re[w].text]})}),((c=e.details)==null?void 0:c.exquisiteFlag)===1&&a(R,{class:i.exquisiteFlag,src:be("icon_exquisite.png")},null),((f=e.details)==null?void 0:f.albumNums)>0&&a(R,{class:i.songAlbum,src:be("icon_album_active.png")},null),a("span",{class:[i.coomposer,O().isApp&&((y=e.details)==null?void 0:y.sourceType)==="TEACHER"&&g.platformType==="STUDENT"&&i.links],onClick:()=>{var w,M;O().isApp&&((w=e.details)==null?void 0:w.sourceType)==="TEACHER"&&g.platformType==="STUDENT"&&S.push({path:"/teacherHome",query:{teacherId:(M=e.details)==null?void 0:M.userId,tabs:"music"}})}},[a("span",null,[((x=e.details)==null?void 0:x.userName)||"\u6E38\u5BA2"+(((D=e.details)==null?void 0:D.userId)||"")])])])])},value:()=>{var s,c,f;return a(G,null,[a("span",{style:{visibility:g.platformType==="TEACHER"&&!p.query.tenantAlbumId?"visible":"hidden"},class:i.download,onClick:()=>{var y;(y=e.details)!=null&&y.coursewareStatus?Se():Te()}},[a("img",{src:(s=e.details)!=null&&s.coursewareStatus?_a:ha},null),a("span",null,[(c=e.details)!=null&&c.coursewareStatus?"\u79FB\u51FA\u8BFE\u4EF6":"\u6DFB\u52A0\u8BFE\u4EF6"])]),a("span",{class:i.download,onClick:()=>Ee()},[a("img",{src:(f=e.details)!=null&&f.favorite?lt:ct},null),a("span",null,[m("\u6536\u85CF")])])])}}),a("div",{class:i.functionSection},[a("div",{class:i.functionItem,onClick:()=>{var s,c;S.push({path:"/look-album-list",query:{id:(s=e.details)==null?void 0:s.id,musicSubject:(c=e.details)==null?void 0:c.musicSubject}})}},[a("img",{src:Ia},null),a("span",null,[m("\u4E13\u8F91")])]),a("div",{class:i.functionItem,style:{display:((o=e.details)==null?void 0:o.musicSheetType)==="CONCERT"?"":"none"},onClick:()=>{var s;((s=e.details)==null?void 0:s.musicSheetType)==="CONCERT"&&(e.open=!0,e.closed=!1)}},[a("img",{src:ye},null),a("span",null,[m("\u5207\u6362\u4E50\u5668")])]),ne.value.isConvertibleScore&&((n=e.details)==null?void 0:n.musicSheetType)==="SINGLE"?a("div",{class:i.functionItem,style:{display:((r=e.details)==null?void 0:r.musicSheetType)==="SINGLE"?"":"none"},onClick:()=>{A.status=!0}},[a("img",{src:ye},null),a("span",null,[m("\u8F6C\u8C31")])]):null,a("div",{class:[i.functionItem,v.value||!e.musicPdfUrl&&e.imgs.length<=0?i.disabled:""],onClick:()=>{var s,c,f;if(!(v.value||!e.musicPdfUrl&&e.imgs.length<=0))if(e.musicPdfUrl){const y=((s=e.details)==null?void 0:s.name)+(e.isConcert&&((c=_.value)==null?void 0:c.name)?`(${((f=_.value)==null?void 0:f.name)||""})`:"");Ze({api:"downloadFile",content:{downloadUrl:e.musicPdfUrl,fileName:y}})}else F.value=!0}},[a("img",{src:ut},null),a("span",null,[m("\u4E0B\u8F7D")])])])]),a("div",{class:i.musicContent},[e.details.id?e.musicPdfUrl?a("iframe",{style:{opacity:v.value?0:1},id:"staffIframeRef",src:e.iframeSrc,onLoad:()=>{v.value=!1}},null):a(G,null,[a("p",{class:i.musicTitle},[((l=e.details)==null?void 0:l.name)&&a(G,null,[(d=e.details)==null?void 0:d.name,e.isConcert&&((C=_.value)==null?void 0:C.name)?`(${((u=_.value)==null?void 0:u.name)||""})`:""])]),a("iframe",{id:"staffIframeRef",style:{opacity:v.value?0:1},src:e.iframeSrc,onLoad:()=>{v.value=!1}},null)]):null])]),((I=e.details)==null?void 0:I.id)&&a(ge,{position:"bottom",background:"white",varName:"--bottom-height"},{default:()=>{var s;return[a("div",{ref:ie},[a("div",{class:i.videoOperation},[V.value&&a(G,null,[!E.value.play&&N.value!=100&&N.value!=0&&a("div",{class:[i.audition]},[a("img",{src:dt},null),a("span",null,[m("\u6BCF\u9996\u66F2\u76EE\u53EF\u8BD5\u542C"),N.value,m("%")])]),a("div",{class:[i.audio,i.collectCell]},[a("audio",{id:"player",controls:!0,ref:le},[a("source",{src:V.value,type:"audio/mp3"},null)])])])]),E.value.play||g.platformType==="TEACHER"&&E.value.hasTenantAlbum?a(Q,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:()=>{vt(()=>{var x,D;P.value&&P.value.stop();let f="";A.radio==="STAVE"?f="staff":A.radio==="JIAN"?f="fixedTone":A.radio==="FIRST"&&(f="firstTone");let y={"part-name":encodeURIComponent(((D=(x=_.value)==null?void 0:x.track)==null?void 0:D.trim())||""),musicRenderType:f,instrumentId:p.query.instrumentId};p.query.tenantAlbumId?y.albumId=p.query.tenantAlbumId:O().isTeacher&&p.query.providerType=="TENANT"&&(y.albumId=1),nt({id:e.details.id},()=>{},y)},300)()}},{default:()=>[m("\u7ACB\u5373\u7EC3\u4E60")]}):a("div",{class:i.colSticky},[E.value.charge&&a("div",{class:i.priceSection},[a("span",null,[m("\u70B9\u64AD\u4EF7\uFF1A")]),a("span",{class:i.price},[a("i",null,[m("\xA5")]),$e((s=e.details)==null?void 0:s.musicPrice)])]),a("div",{class:[i.buyBtn]},[E.value.charge&&a(Q,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:i.primary,onClick:Ue},{default:()=>[m("\u7ACB\u5373\u70B9\u64AD")]}),E.value.vip&&a(Q,{round:!0,block:!E.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:i.memeber,onClick:()=>{S.push({path:"/memberCenter",query:{...p.query}})}},{default:()=>[ve.value>0&&a("div",{class:[i.buttonDiscount]},[m("\u4E13\u5C5E\u4F18\u60E0")]),m("\u5F00\u901A\u4F1A\u5458")]})])])])]}}),a(W,{show:L.value,"onUpdate:show":s=>L.value=s,style:{background:"transparent"},teleport:"body"},{default:()=>{var s;return[a(gt,{teacherId:(s=g.user.data)==null?void 0:s.userId,shareUrl:de.value,shareType:"music"},{default:()=>{var c,f,y;return[a("div",{class:i.shareMate},[me.value===1&&a("div",{class:i.tagDiscount},[m("\u4E13\u5C5E\u4F18\u60E0")]),a("img",{class:i.icon,crossorigin:"anonymous",src:(c=e.details)==null?void 0:c.musicCover},null),a("div",{class:i.info},[a("h4",{class:"van-multi-ellipsis--l2"},[(f=e.details)==null?void 0:f.name]),a("p",null,[m("\u4F5C\u66F2\u4EBA\uFF1A"),(y=e.details)==null?void 0:y.composer])])])]}})]}}),a(W,{show:F.value,"onUpdate:show":s=>F.value=s,position:"bottom",round:!0},{default:()=>{var s,c;return[F.value&&a(mt,{imgList:JSON.parse(JSON.stringify(e.imgs)),musicSheetName:e.details.name+(e.isConcert&&((s=_.value)==null?void 0:s.name)?`(${((c=_.value)==null?void 0:c.name)||""})`:"")},null)]}}),a(W,{show:A.status,"onUpdate:show":s=>A.status=s,teleport:"body",closeable:!0,style:{width:"80%"},round:!0},{default:()=>[a("div",{class:i.staffContainer},[a("div",{class:i.staffTitle},[m("\u9009\u62E9\u8F6C\u6362\u66F2\u8C31")]),a(st,{modelValue:A.radio,"onUpdate:modelValue":s=>A.radio=s},{default:()=>[a(at,{border:!1},{default:()=>[ne.value.isHiddenStaff?"":a(z,{center:!0,border:!1,class:A.radio==="STAVE"?i.active:"",onClick:()=>X("STAVE")},{icon:()=>a(R,{src:pt,class:i.staffImg},null),title:()=>a("span",{class:i.name},[m("\u4E94\u7EBF\u8C31")]),value:()=>a(ee,{name:"STAVE"},{icon:s=>a(Z,{class:i.boxStyle,size:16,name:s.checked?te:ae},null)})}),a(z,{center:!0,border:!1,class:A.radio==="FIRST"?i.active:"",onClick:()=>X("FIRST")},{icon:()=>a(R,{src:ft,class:i.staffImg},null),title:()=>a("span",{class:i.name},[m("\u7B80\u8C31-\u9996\u8C03")]),value:()=>a(ee,{name:"FIRST"},{icon:s=>a(Z,{class:i.boxStyle,size:16,name:s.checked?te:ae},null)})}),a(z,{center:!0,border:!1,class:A.radio==="JIAN"?i.active:"",onClick:()=>X("JIAN")},{icon:()=>a(R,{src:At,class:i.staffImg},null),title:()=>a("span",{class:i.name},[m("\u7B80\u8C31-\u56FA\u5B9A\u8C03")]),value:()=>a(ee,{name:"JIAN"},{icon:s=>a(Z,{class:i.boxStyle,size:16,name:s.checked?te:ae},null)})})]})]})])]}),a(W,{teleport:"body",position:"bottom",round:!0,show:e.open,"onUpdate:show":s=>e.open=s,onClosed:()=>{e.closed=!0}},{default:()=>[!e.closed&&a(It,{columns:U.value,defaultIndex:e.selectedPartIndex,onConfirm:s=>{e.open=!1,e.selectedPartIndex=s.value,e.imgs=[],J(()=>{const c=U.value.find(y=>y.value===s.value),f=B(c,A.radio);e.musicPdfUrl=f,f?k():(v.value=!0,e.musicPdfUrl?ke():k())})},onCancel:()=>e.open=!1},null)]})])}}});export{os as default,be as getAssetsHomeFile};