1 |
- import{d as me,e as F,$ as m,r as N,q as pe,C as se,T as fe,f as i,a0 as Se,a1 as Ie,k as S,F as O,c as ie,a as xe,u as Te,U as L,A as be,x as ae,aP as Pe,aQ as oe,j as ne,w as Be,E as le,z as ke,aC as ce,_ as Ce,l as Re,m as Ee,D as Le,aR as Ne,aS as _e}from"./index-8151123c-1725962701482.js";import{i as ze}from"./icon_back-c5ec0a72-1725962701482.js";import{i as Ge}from"./icon_separator-e0f6c575-1725962701482.js";import{T as Me}from"./index-6ac9882e-1725962701482.js";import{P as Qe,T as He,i as Ue,a as We}from"./index-2cb7fc8a-1725962701482.js";import{i as je}from"./icon_default-d1bcaf5f-1725962701482.js";import{u as Ve}from"./catchData-4810754f-1725962701482.js";import{c as De,d as Fe,e as Oe}from"./api-f2ab1cd4-1725962701482.js";import{g as V,s as A}from"./index-db345329-1725962701482.js";import{s as re}from"./api-875eec05-1725962701482.js";import{T as ue}from"./index-b03328a0-1725962701482.js";import{u as Xe}from"./index-6fa64c7e-1725962701482.js";import{v as D}from"./urlUtils-72ef455d-1725962701482.js";import{a as de}from"./contants-81f70019-1725962701482.js";import{C as qe}from"./index-b5a59ad8-1725962701482.js";import"./Slider-3d2a3287-1725962701482.js";import"./index-19765c31-1725962701482.js";import"./Scrollbar-ac0a11ae-1725962701482.js";const Ke="_container_19x41_1",Ze="_iconBack_19x41_6",Je="_separator_19x41_39",Ye="_wrap_19x41_44",$e="_wrapBottom_19x41_50",et="_content_19x41_53",tt="_tools_19x41_60",st="_contentWrap_19x41_84",it="_musicList_19x41_91",at="_wrapList_19x41_105",ot="_empty_19x41_111",nt="_searchSection_19x41_117",lt="_itemContainer_19x41_140",ct="_item_19x41_140",rt="_active_19x41_162",ut="_arrow_19x41_165",dt="_img_19x41_168",mt="_title_19x41_190",pt="_titleName_19x41_197",ft="_titleDes_19x41_204",vt="_iconType_19x41_218",gt="_iconPlay_19x41_229",ht="_iconSing_19x41_233",yt="_btn_19x41_237",wt="_showPlayLoading_19x41_262",At="_loadingWrap_19x41_265",St="_showLoading_19x41_270",It="_musicStaff_19x41_276",xt="_goBtn_19x41_291",Tt="_rightBtns_19x41_300",bt="_textBtn_19x41_307",Pt="_transBtn_19x41_315",Bt="_favitor_19x41_324",kt="_musicName_19x41_338",Ct="_staffImgs_19x41_346",Rt="_previewWindow_19x41_363",Et="_previewClose_19x41_369",Lt="_previewIframe_19x41_377",Nt="_popSelect_19x41_383",_t="_popSelect1_19x41_395",zt="_popTrans_19x41_405",Gt="_iconArrow_19x41_416",Mt="_textBtnActive_19x41_431",o={container:Ke,iconBack:Ze,separator:Je,wrap:Ye,wrapBottom:$e,content:et,tools:tt,contentWrap:st,musicList:it,wrapList:at,empty:ot,searchSection:nt,itemContainer:lt,item:ct,active:rt,arrow:ut,img:dt,title:mt,titleName:pt,titleDes:ft,iconType:vt,iconPlay:gt,iconSing:ht,btn:yt,showPlayLoading:wt,loadingWrap:At,showLoading:St,musicStaff:It,goBtn:xt,rightBtns:Tt,textBtn:bt,transBtn:Pt,favitor:Bt,musicName:kt,staffImgs:Ct,previewWindow:Rt,previewClose:Et,previewIframe:Lt,popSelect:Nt,popSelect1:_t,popTrans:zt,iconArrow:Gt,textBtnActive:Mt},Qt=""+new URL("icon_goXiaoku-5d0db670.png",import.meta.url).href,Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAD1NJREFUeF7tXXucjNUb/z7vzNqZ2ZaS7oRuS0o/lXKLrH6KRVLyEXItpUR8ShQiKfXBSjeVRchHIrEoZUVZIooS241Kfl3otnZmdmfmPb/PM3tpd96Zed935j1jyzx/7WfnPJdzvu+5Pc9zziFUUxJCpLt9vgwloGSoEBkEkQFQXQGRTkC6EJROhHQ2XwgUEolCARQSqBAQhwSoQAEVqDa1wJWSUkDE/69+RNXFJCFEzeLiQFtVFZkCoj0RXSaEsMQ+IhJCiN0E2qgolJeaattMRH9Vh7pbUsFYKyKEqOX1BnoKiH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qv/MTJ5ZeXVy6N0he3m0MBrL+8u6KVVHy+vqoGEi9vr5cc/IBh/AYJOQBh78n5eD7McknTMoaJKFPmISAkHzE53g84hMyHCWfsToez1hVnpiTD7kZWx+FK2VoH6AnPvmUoV4LRf7dEgDK/Eb8mOdT//anTvhpEqfT/qCR92GMwGIZABVDUvI5WyPtXlHGcgAqvKjJB50NASEFgEpOvOST5jowSAWgrDfYvN7AAAH1oUS+SWDo84tQiAPoBOVJh8M2P9yrF/HIDuWVDkC5Qs628HoDvVSo42Rfjx9zAxH2KlCmOhy2pbIbvtzGhAFQCQgqLg50UoXaH6Busi4LNwoC52oCYpVCyoLUVNu6ynf7G5URT7mEA1DZWE4I9noDPQUEH9ptLevqZE23L31GZAuBFjoctmXlN5nH05Cx8h5XAELAqFlcHGirqiJTQGQSUVOr7jLlr1oIsYdAeYpCeampts18b3OsjWYlX7UBILRSfHrT7fNlKAElQ4XIIIgMgOoKiHQC0oWgdCIEH5IRAoVEolAAhQQqBMQhASpQQAWqTS1wpaQUEPH/qx/9H/I1mUEEuLtxAAAAAElFTkSuQmCC",Ut=""+new URL("icon-collect-active-5b621440.png",import.meta.url).href,Wt=""+new URL("icon-close-1bf25bcf.png",import.meta.url).href,jt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAABDlBMVEUAAAD29/v39/z////19vv19/r19vr29/r29vv39/z4+Pz29/v29/v19vv29/r29/r29vv29/v19/r19/v1+fz4+Pv29vv1+vr1+vr39//////29/v29/v19voTFBXW19rv8PTf4OR+f4JmZ2pKS0wqKyzy8/fLzM9iY2W/wMMkJCYdHh+Sk5ZVVlg3ODq6vL8ZGhurq66WlpmUlJiJi42kpqhvb3Jqa21OT1EmJygXGBlBQkPr7PDj5Ojh4ubc3eDY2dzNztGmp6qbm5+DhIc6Oz0vMDLn6OzQ0dRaW13IyM2ztLd5eXx1d3g9PkAhIiPT1NjFxcnCw8agoaQ1Nje2t7qwsbVdX2GNj5FERke8i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wAvZsprVPJU1C/lzXpB+DANx7vkUQxOPrEBmVhIIqa9vjxhQwQgkafUuer6RVKREBArkIhSLqS5vjxhRf7sHaHUo7J8lAlusS6tgsbmC+O7p5v/NKQ3UOm53W30WhceaLStMUzvJ7sV0ctjT/pSd9ZThl44yS5H6OEf8Hz8QGYxyEV+Z9ssppvtnZ2tNhzLlqC0Es7ipgL5GLdshqBRyZLMwymoWDoixX6lU6jtKyYcl0ex+EWSTsdQujZLSNKPl5TL93M6/YDKIQ0FOM0rH0BQCxsyJDNh02ZWs5wPm1WcrcMkewARAV3RhmDZVQeE/tBwCaeA/RCokCNbGBRQOaeh2Ja2oVc+yG2TqUEB9TINpQScfAM3G8vkpT4gdlKk6QES7t6tBHljPdEFVB/StEj7yEf9ZoihTjKhCIj/2LuM8EX2ATLzA7dzzFZalQcU2BG9h4xftyFVC5ty5E341Q2ZC4dj9r3ZkqcVSH3SbKmVqXBThaVq//rLGuSWNZuCNSr9xIuDLJOPka07qHi/arY1Q0UqlM7s/2lDa1W7MRtqbMq1MaS5WW8tz3xzfNbb+7M+oJj1EcusD4lmfcw164O6/3/UONFh6Vs57h33wPotHbmP/tLAW3ztYfgXN97yqyezf3lm8td//gIiGGYI8PHpugAAAABJRU5ErkJggg==",Vt=me({name:"music-guide",emits:["close"],setup(I,{emit:X}){const l=F({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:V("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:m(-4),left:m(0),width:m(533),height:m(271)},btnsStyle:{bottom:m(40),left:m(-10)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:V("music2.png"),imgStyle:{top:m(-4),left:m(-205),width:m(420),height:m(228)},btnsStyle:{bottom:m(35),left:m(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:V("music3.png"),imgStyle:{top:"100%",left:m(-130),width:m(401),height:m(304)},btnsStyle:{bottom:m(100),left:m(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),g=N(!1),r=N({});(async()=>{try{const c=localStorage.getItem("teacher-guideInfo");c?r.value=JSON.parse(c)||null:r.value={},r.value&&r.value.musicGuide?g.value=!1:g.value=!0}catch(c){console.log(c)}})();const x=()=>{var p,y,b,w;const c=document.getElementById("music-".concat(l.step));if(c){const h=c.getBoundingClientRect();if(console.log(c.style.display,"ele"),c.style.display=="none"){T();return}const E=((p=l.steps[l.step].eleRectPadding)==null?void 0:p.left)||0,f=((y=l.steps[l.step].eleRectPadding)==null?void 0:y.top)||0,_=((b=l.steps[l.step].eleRectPadding)==null?void 0:b.width)||0,z=((w=l.steps[l.step].eleRectPadding)==null?void 0:w.height)||0;l.box={left:h.x-E+"px",top:h.y-f+"px",width:h.width+_+"px",height:h.height+z+"px"}}else T()},k=async c=>{try{if(c!=="xiaoku-music")return;r.value?r.value.musicGuide=!1:r.value={musicGuide:!1};try{re({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(r.value)})}catch(p){console.log(p)}l.step=0,x(),g.value=!0}catch(p){}};pe(()=>{x(),window.addEventListener("resize",C),se.on("teacher-guideInfo",k)});const C=()=>{x()};fe(()=>{window.removeEventListener("resize",C),se.off("teacher-guideInfo",k)});const T=()=>{if(l.step>=3){R();return}l.step=l.step+1,x()},R=async()=>{r.value?r.value.musicGuide=!0:r.value={musicGuide:!0};try{re({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(r.value)})}catch(c){console.log(c)}g.value=!1};return()=>i(O,null,[g.value?Se(i("div",{"onUpdate:show":c=>g.value=c,class:["n-modal-mask","n-modal-mask-guide"]},[i("div",{class:A.content,onClick:()=>T()},[i("div",{class:A.backBtn,onClick:c=>{c.stopPropagation(),R()}},[S("跳过")]),i("div",{class:A.box,style:{...l.box,...l.steps[l.step].boxStyle},id:"modeType-".concat(l.step)},[l.steps.map((c,p)=>{var y,b,w,h;return i("div",{onClick:E=>E.stopPropagation(),class:A.item,style:c.type=="bottom"?{display:p===l.step?"":"none",left:"".concat((y=c.eleRect)==null?void 0:y.left,"px"),top:"-".concat((b=c.imgStyle)==null?void 0:b.height)}:{display:p===l.step?"":"none",left:"".concat((w=c.eleRect)==null?void 0:w.left,"px"),top:"".concat((h=l.box)==null?void 0:h.height)}},[i("img",{class:A.img,style:c.imgStyle,src:c.img},null),i("div",{class:A.btns,style:c.btnsStyle},[l.step+1==l.steps.length?i(O,null,[i("div",{class:[A.endBtn],onClick:()=>R()},[S("完成")])]):i("div",{class:A.btn,onClick:()=>T()},[S("下一步 ("),l.step+1,S("/"),l.steps.length,S(")")])])])})])])]),[[Ie,g.value,"show"]]):null])}});function Dt(I){return typeof I=="function"||Object.prototype.toString.call(I)==="[object Object]"&&!Le(I)}const rs=me({name:"XiaokuMusic",setup(){const I=Ve(),X=ie(),l=xe(),g=Te(),r=F({page:1,rows:20,status:!0,name:"",audioPlayTypes:"",musicSheetCategoriesId:l.query.id||""}),e=F({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,musicalInstrumentId:"",musicSubject:"",list:[],listActive:0,musicInstrumentIndex:0,playState:"pause",showPlayer:!1,previewModal:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,audioPlayTypeList:[],iframeSrc:"",showMusicImg:"staff",trackList:[],showTransBtn:!0,trackName:"切换声部"}),x=N(""),k=N(!1),C=ie(),T=s=>{for(const t of s)t.instruments&&t.instruments.length>0&&(t.instruments.forEach(a=>{a.columnName="乐器"}),t.children=t.instruments,T(t.instruments))},R=async()=>{const s=I.getSubjectList,t=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],a=[];s.forEach(n=>{t.find(u=>u.id===n.id)&&a.push(n)}),T(a),e.tags=[{columnName:"声部",name:"全部声部",id:""},...a]},c=async()=>{var t,a;e.loading=!0;let s={};try{const{audioPlayTypes:n,...d}=r;s=await De({...d,audioPlayTypes:n?n==="PLAY_SING"?["PLAY","SING"]:[n]:[],musicSubject:e.musicSubject,musicalInstrumentId:e.musicalInstrumentId})}catch(n){console.log(n)}if(e.reshing&&(e.list=[],e.reshing=!1),(s==null?void 0:s.code)===200&&Array.isArray((t=s==null?void 0:s.data)==null?void 0:t.rows)){(((a=s==null?void 0:s.data)==null?void 0:a.rows)||[]).forEach(u=>{u.audioPlayTypeArray=u.audioPlayTypes?u.audioPlayTypes.split(","):[]}),e.list=[...e.list,...s.data.rows],e.finshed=r.page>=s.data.pages;const d=e.list[e.listActive];d&&d.isScoreRender&&e.listActive===0&&(e.musicInstrumentIndex=999),await M(),G()}else e.finshed=!0;e.list[e.listActive]&&h(e.list[e.listActive]),e.loading=!1,setTimeout(()=>{k.value=!0},500)},p=async()=>{e.listActive=0,e.showPlayer=!1,e.playState="pause",r.page=1,e.finshed=!1,await c()},y=N(),b=()=>{e.loading||e.finshed||(r.page=r.page+1,c())},w=s=>{var t;((t=s.data)==null?void 0:t.api)==="api_fingerPreView"&&(e.showCloseBtn=!s.data.state)};pe(async()=>{const s=Object.keys(de).map(a=>({value:a,label:de[a]}));e.audioPlayTypeList=[{label:"全部",value:""},...s],await I.getSubjects(),Xe(document.querySelector(".musicList-container"),a=>{const n=a[0],{height:d}=n.contentRect;document.documentElement.style.setProperty("--xiaoku-music-height",d+"px")}),R(),await c(),new IntersectionObserver(a=>{a[0].intersectionRatio>0&&b()}).observe(y.value),window.addEventListener("message",w)}),fe(()=>{window.removeEventListener("message",w)});const h=async s=>{const t=await Fe({type:"MUSIC",materialId:s.id});(t==null?void 0:t.code)===200&&(s.favitor=t.data)},E=s=>{const t=e.list.findIndex(a=>a.id===s.id);t>-1&&(e.listActive=t),h(s)},f=L(()=>{var s;return e.list[e.listActive]&&"".concat(D(),"/instrument/?modelType=practise&id=").concat((s=e.list[e.listActive])==null?void 0:s.xmlFileUrl,"&Authorization=").concat(C.getToken,"/#/preview"),e.list[e.listActive]||{}}),_=()=>{e.list[e.listActive].favitor=!e.list[e.listActive].favitor,Oe({favoriteFlag:e.list[e.listActive].favitor,type:"MUSIC",materialId:e.list[e.listActive].id})},z=s=>{const t=e.list.findIndex(a=>a.id===s.id);t>-1&&(e.listActive===t?e.playState=e.playState==="play"?"pause":"play":e.playState="play",e.showPlayer=!0,e.listActive=t)};L(()=>{const s=e.list[e.listActive],t=(s==null?void 0:s.musicalInstruments)||[],a=[];return t.forEach((n,d)=>{a.push({label:n.name,value:d})}),a});const W=L(()=>{var s;return e.list.length?((s=e.list[e.listActive])==null?void 0:s.musicSheetType)!=="SINGLE":!1}),q=(s,t)=>!!(s||s===""||s===void 0||s===null||["JIAN","FIRST"].includes(t)&&!s),G=()=>{const s=C.getToken,t=e.list[e.listActive];if(!(t!=null&&t.id)){e.iframeSrc="";return}const a=e.showMusicImg==="first"?"firstTone":e.showMusicImg==="fixed"?"fixedTone":(e.showMusicImg==="staff","staff");e.iframeSrc="".concat(D(),"/instrument/?id=").concat(t==null?void 0:t.id,"&modelType=practise&modeType=json&Authorization=").concat(s,"&isPreView=true&part-index=").concat(e.musicInstrumentIndex,"&musicRenderType=").concat(a),console.log(e.iframeSrc,"iframeSrc")},K=s=>{s==="play"?e.playState="play":s==="pause"?e.playState="pause":s==="pre"?e.list[e.listActive-1]&&z(e.list[e.listActive-1]):s==="next"?e.list[e.listActive+1]&&z(e.list[e.listActive+1]):s==="favitor"&&_()},ve=L(()=>{const s=e.list[e.listActive],{scoreType:t,isConvertibleScore:a}=s||{},n=[{value:"first",label:"首调"},{value:"fixed",label:"固定调"}];return!(["JIAN","FIRST"].includes(t)&&a===!1)&&a!=null&&n.unshift({value:"staff",label:"五线谱"}),n}),M=async()=>{const s=e.list[e.listActive];if((s==null?void 0:s.musicSheetType)==="CONCERT"){if(s.xmlFileUrl){const t=await fetch(s.xmlFileUrl).then(a=>a.text());ge(t)}}else{const{scoreType:t,isConvertibleScore:a}=s||{};let n="first";n=t==="STAVE"?"staff":t==="JIAN"?"fixed":"first",e.showMusicImg=n,e.showTransBtn=q(a,t)}},ge=s=>{var Y,$,H,ee,te;const a=(($=(Y=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("part-list"))==null?void 0:Y[0])==null?void 0:$.getElementsByTagName("score-part"))||[],n=Array.from(a).map(v=>{var P,U,B;return((B=(U=(P=v.getElementsByTagName("part-name"))==null?void 0:P[0])==null?void 0:U.textContent)==null?void 0:B.trim())||v.getAttribute("id")||""});((ee=(H=n[0])==null?void 0:H.toLocaleUpperCase)==null?void 0:ee.call(H))==="COMMON"&&n.shift();const d=(te=e.list[e.listActive])==null?void 0:te.multiTracksSelection,u=d?d==null?void 0:d.split(","):[],he=n.map((v,P)=>{const U=!!(u.length==0||u.includes(v)),B=Ne(v),Ae=_e(B,P);return{label:v+(B?"(".concat(B,")"):""),value:P,sortId:Ae,canselect:U,track:v}}).filter(v=>v.canselect).sort((v,P)=>v.sortId-P.sortId);e.trackList=he;const Z=e.list[e.listActive];Z&&Z.isScoreRender&&e.trackList.unshift({label:"总谱",value:999,sortId:0,canselect:!0,track:999});const ye=e.list[e.listActive],{scoreType:Q,isConvertibleScore:we}=ye||{};let J="first";J=Q==="STAVE"?"staff":Q==="JIAN"?"fixed":"first",e.showMusicImg=J,e.showTransBtn=q(we,Q)};be(()=>e.listActive,async()=>{e.musicInstrumentIndex=0,M()});const j=L(()=>{var t,a,n,d;let s=[];if(e.showMusicImg==="first"){const u=(t=f.value)==null?void 0:t.musicFirstImg;s=u?u.split(","):[]}else if(e.showMusicImg==="fixed"){const u=(a=f.value)==null?void 0:a.musicJianImg;s=u?u.split(","):[]}else if(e.showMusicImg==="staff"){const u=((n=f.value)==null?void 0:n.musicImg)||((d=f.value)==null?void 0:d.musicSvg);s=u?u.split(","):[]}return s});return()=>{let s;return i("div",{class:o.container},[i(ae,{align:"center",wrapItem:!1,size:16},{default:()=>[i("img",{style:{cursor:"pointer"},src:ze,class:o.iconBack,onClick:()=>g.push({path:"/xiaoku-ai"})},null),i(Pe,{separator:""},{default:()=>[i(oe,{onClick:()=>g.push({path:"/xiaoku-ai"})},{default:()=>[S("全部列表")]}),i("img",{class:o.separator,src:Ge},null),i(oe,null,{default:()=>[l.query.name]})]})]}),i("div",{class:[o.wrap,e.showPlayer?o.wrapBottom:""]},[i("div",{class:o.content},[i("div",{class:o.tools},[i(ae,{style:{width:"100%"},size:[12,6],wrapItem:!1},Dt(s=e.audioPlayTypeList.map(t=>i(ne,{round:!0,textColor:r.audioPlayTypes===t.value?"#fff":"#000",color:r.audioPlayTypes===t.value?"#198CFE":"#fff",type:r.audioPlayTypes===t.value?"primary":"default",onClick:async()=>{var a;r.audioPlayTypes=t.value||"",t.value==="SING"&&(e.musicalInstrumentId="",e.musicSubject=""),e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),await p()}},{default:()=>[t.label]})))?s:{default:()=>[s]})]),i("div",{class:o.contentWrap},[i("div",{class:[o.musicList,"musicList-container"]},[i("div",{class:o.searchSection},[r.audioPlayTypes!=="SING"&&i(qe,{placeholder:"全部乐器",arrowType:"small",childShowAllCheck:!1,class:o.instrumentSection,value:x.value,"onUpdate:value":t=>x.value=t,options:e.tags,onMoreId:async t=>{var a;e.loading||(e.musicalInstrumentId=t.childId,e.musicSubject=t.parentId,e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),await p())}},null),i(Me,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:t=>{var a;e.loading||(r.name=t,e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),p())}},null)]),i("div",{class:[o.wrapList,"music-wrap-list"]},[e.list.map((t,a)=>{var n,d;return i("div",{class:o.itemContainer},[i("div",{class:[o.item,e.listActive===a&&o.active],onClick:async()=>{E(t),await M();const u=e.list[e.listActive];u&&u.isScoreRender?e.musicInstrumentIndex=999:e.musicInstrumentIndex=0,G()}},[i("div",{class:o.img},[i(Be,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:t.titleImg||je,onLoad:u=>{u.target.dataset.loaded="true"}},null),i(Qe,{class:[e.listActive===a&&e.playState==="play"?"":o.showPlayLoading]},null)]),i("div",{class:o.title},[i("div",{class:o.titleName},[i(He,{text:t.musicSheetName},null)]),i("div",{class:o.titleDes},[((n=t.audioPlayTypeArray)==null?void 0:n.includes("PLAY"))&&i("span",{class:[o.iconType,o.iconPlay]},[S("演奏")]),((d=t.audioPlayTypeArray)==null?void 0:d.includes("SING"))&&i("span",{class:[o.iconType,o.iconSing]},[S("演唱")]),i("span",{class:o.composer},[t.composer])])]),i("img",{class:o.arrow,src:Ue},null)])])}),i("div",{ref:y,class:[o.loadingWrap,e.finshed&&o.showLoading]},[i(le,{show:!0},null)]),!e.loading&&e.list.length===0&&i("div",{class:o.empty},[i(ue,null,null)])])]),i("div",{class:o.musicStaff},[i("div",{class:o.musicName},[f.value.musicSheetName]),i("img",{id:"music-2",style:{display:f.value.id?"":"none"},class:[o.goBtn],src:Qt,onClick:()=>{K("pause");let t="staff";e.showMusicImg==="first"?t="firstTone":e.showMusicImg==="fixed"?t="fixedTone":e.showMusicImg==="staff"&&(t="staff");let a="".concat(D(),"/instrument?v=").concat(+new Date,"&platform=pc&id=").concat(f.value.id,"&Authorization=").concat(X.getToken,"&musicRenderType=").concat(t,"&showGuide=true&part-index=").concat(e.musicInstrumentIndex);e.musicalInstrumentId&&(a+="&instrumentId="+e.musicalInstrumentId),window.matchMedia("(display-mode: standalone)").matches?(ke.application=window.matchMedia("(display-mode: standalone)").matches,e.previewModal=!0,e.previewUrl=a,e.showPreivew=!1):window.open(a)}},null),i("div",{class:o.rightBtns,style:{display:f.value.id?"":"none"}},[W.value&&i(ce,{options:e.trackList,trigger:"hover",value:e.musicInstrumentIndex,"onUpdate:value":[t=>e.musicInstrumentIndex=t,async t=>{var a;await M(),e.trackName=((a=e.trackList.find(n=>n.value===e.musicInstrumentIndex))==null?void 0:a.label)||"切换声部",G()}],class:[o.popSelect]},{default:()=>[i(ne,{round:!0,class:[o.textBtn]},{default:()=>{var t;return[((t=e.trackList.find(a=>a.value===e.musicInstrumentIndex))==null?void 0:t.label)||"切换声部",i("i",{class:o.iconArrow},null)]}})]}),e.showTransBtn&&i(ce,{options:ve.value,trigger:"hover",value:e.showMusicImg,"onUpdate:value":[t=>e.showMusicImg=t,async t=>{e.showMusicImg=t,W.value&&G()}],class:[o.popTrans]},{default:()=>[i("img",{class:[o.transBtn],src:jt},null)]}),i("div",{class:o.favitor,onClick:()=>_()},[i(Ce,{name:"favitor",mode:"out-in"},{default:()=>[f.value.favitor?i("img",{src:Ut,key:"1"},null):i("img",{src:Ht,key:"2"},null)]})])]),i("div",{class:o.staffImgs},[e.iframeSrc&&(W.value||j.value.length===0)?i("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%",paddingTop:"20px"},src:e.iframeSrc,onLoad:()=>{}},null):i(O,null,[j.value.length>0?j.value.map(t=>i("img",{src:t,key:t},null)):i(ue,null,null)])])])])])]),e.list.length!==0&&i(We,{show:e.showPlayer,playState:e.playState,item:f.value,onChange:t=>K(t)},null),k.value?i(Vt,null,null):null,i(Re,{maskClosable:Ee,show:e.previewModal,"onUpdate:show":[t=>e.previewModal=t,t=>{t||(e.previewUrl="")}],class:o.previewWindow,showIcon:!1,displayDirective:"show"},{default:()=>[i(le,{show:e.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[i("img",{style:{display:e.showCloseBtn?"":"none"},src:Wt,class:o.previewClose,onClick:()=>{e.previewModal=!1,e.previewUrl=""}},null),i("iframe",{class:o.previewIframe,onLoad:()=>{e.showPreivew=!1},frameborder:"0",src:e.previewUrl},null)]})]})])}}});export{rs as default};
|