index-f0085ed9-1726219372904.js 25 KB

1
  1. import{d as me,e as F,$ as m,r as N,q as pe,C as se,T as fe,f as a,a0 as Se,a1 as Ie,k as S,F as O,c as ae,a as Te,u as xe,U as L,A as be,x as ie,aR as Pe,aS as oe,j as ne,w as Be,E as le,z as ke,ay as ce,_ as Ce,l as Re,m as Ee,D as Le,aT as Ne,aU as _e}from"./index-1ec0a32d-1726219372904.js";import{i as ze}from"./icon_back-c5ec0a72-1726219372904.js";import{i as Ge}from"./icon_separator-e0f6c575-1726219372904.js";import{T as Me}from"./index-446e8014-1726219372904.js";import{P as He,T as Qe,i as Ue,a as We}from"./index-b48cb97f-1726219372904.js";import{i as je}from"./icon_default-d1bcaf5f-1726219372904.js";import{u as Ve}from"./catchData-04337fe1-1726219372904.js";import{c as De,d as Fe,e as Oe}from"./api-bead5221-1726219372904.js";import{g as V,s as A}from"./index-db345329-1726219372904.js";import{s as re}from"./api-f5057ed1-1726219372904.js";import{T as ue}from"./index-2727764b-1726219372904.js";import{u as Xe}from"./index-29523425-1726219372904.js";import{v as D}from"./urlUtils-72ef455d-1726219372904.js";import{a as de}from"./contants-32f8b17d-1726219372904.js";import{C as qe}from"./index-31d1c307-1726219372904.js";import"./Slider-bd832880-1726219372904.js";import"./index-ff9a89ac-1726219372904.js";import"./Scrollbar-c3ae1e59-1726219372904.js";const Ke="_container_123a5_1",Ze="_iconBack_123a5_6",Je="_separator_123a5_39",Ye="_wrap_123a5_44",$e="_wrapBottom_123a5_50",et="_content_123a5_53",tt="_tools_123a5_60",st="_contentWrap_123a5_84",at="_musicList_123a5_91",it="_wrapList_123a5_105",ot="_empty_123a5_111",nt="_searchSection_123a5_117",lt="_itemContainer_123a5_140",ct="_item_123a5_140",rt="_active_123a5_162",ut="_arrow_123a5_165",dt="_img_123a5_168",mt="_title_123a5_190",pt="_titleName_123a5_197",ft="_titleDes_123a5_204",vt="_iconType_123a5_218",gt="_iconPlay_123a5_229",ht="_iconSing_123a5_233",yt="_btn_123a5_237",wt="_showPlayLoading_123a5_262",At="_loadingWrap_123a5_265",St="_showLoading_123a5_270",It="_musicStaff_123a5_276",Tt="_goBtn_123a5_291",xt="_rightBtns_123a5_300",bt="_textBtn_123a5_307",Pt="_transBtn_123a5_315",Bt="_favitor_123a5_324",kt="_musicName_123a5_338",Ct="_staffImgs_123a5_346",Rt="_previewWindow_123a5_363",Et="_previewClose_123a5_369",Lt="_previewIframe_123a5_377",Nt="_popSelect_123a5_383",_t="_popSelect1_123a5_395",zt="_popTrans_123a5_405",Gt="_iconArrow_123a5_416",Mt="_textBtnActive_123a5_431",o={container:Ke,iconBack:Ze,separator:Je,wrap:Ye,wrapBottom:$e,content:et,tools:tt,contentWrap:st,musicList:at,wrapList:it,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:Tt,rightBtns:xt,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},Ht=""+new URL("icon_goXiaoku-5d0db670.png",import.meta.url).href,Qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAD1NJREFUeF7tXXucjNUb/z7vzNqZ2ZaS7oRuS0o/lXKLrH6KRVLyEXItpUR8ShQiKfXBSjeVRchHIrEoZUVZIooS241Kfl3otnZmdmfmPb/PM3tpd96Zed935j1jyzx/7WfnPJdzvu+5Pc9zziFUUxJCpLt9vgwloGSoEBkEkQFQXQGRTkC6EJROhHQ2XwgUEolCARQSqBAQhwSoQAEVqDa1wJWSUkDE/69+RNXFJCFEzeLiQFtVFZkCoj0RXSaEsMQ+IhJCiN0E2qgolJeaattMRH9Vh7pbUsF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46HEa2qMnry7Wa8aqv/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+DhIc6Oz0vMDLn6OzQ0dRaW13IyM2ztLd5eXx1d3g9PkAhIiPT1NjFxcnCw8agoaQ1Nje2t7qw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6BUL10OQ8goXZso1+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}),v=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?v.value=!1:v.value=!0}catch(c){console.log(c)}})();const T=()=>{var p,y,b,w;const c=document.getElementById("music-".concat(l.step));if(c){const g=c.getBoundingClientRect();if(console.log(c.style.display,"ele"),c.style.display=="none"){x();return}const R=((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:g.x-R+"px",top:g.y-f+"px",width:g.width+_+"px",height:g.height+z+"px"}}else x()},B=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,T(),v.value=!0}catch(p){}};pe(()=>{T(),window.addEventListener("resize",k),se.on("teacher-guideInfo",B)});const k=()=>{T()};fe(()=>{window.removeEventListener("resize",k),se.off("teacher-guideInfo",B)});const x=()=>{if(l.step>=3){C();return}l.step=l.step+1,T()},C=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)}v.value=!1};return()=>a(O,null,[v.value?Se(a("div",{"onUpdate:show":c=>v.value=c,class:["n-modal-mask","n-modal-mask-guide"]},[a("div",{class:A.content,onClick:()=>x()},[a("div",{class:A.backBtn,onClick:c=>{c.stopPropagation(),C()}},[S("跳过")]),a("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,g;return a("div",{onClick:R=>R.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((g=l.box)==null?void 0:g.height)}},[a("img",{class:A.img,style:c.imgStyle,src:c.img},null),a("div",{class:A.btns,style:c.btnsStyle},[l.step+1==l.steps.length?a(O,null,[a("div",{class:[A.endBtn],onClick:()=>C()},[S("完成")])]):a("div",{class:A.btn,onClick:()=>x()},[S("下一步 ("),l.step+1,S("/"),l.steps.length,S(")")])])])})])])]),[[Ie,v.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=ae(),l=Te(),v=xe(),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:"切换声部"}),T=N(""),B=N(!1),k=ae(),x=s=>{for(const t of s)t.instruments&&t.instruments.length>0&&(t.instruments.forEach(i=>{i.columnName="乐器"}),t.children=t.instruments,x(t.instruments))},C=async()=>{const s=I.getSubjectList,t=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],i=[];s.forEach(n=>{t.find(u=>u.id===n.id)&&i.push(n)}),x(i),e.tags=[{columnName:"声部",name:"全部声部",id:""},...i]},c=async()=>{var t,i;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)){(((i=s==null?void 0:s.data)==null?void 0:i.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]&&g(e.list[e.listActive]),e.loading=!1,setTimeout(()=>{B.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(i=>({value:i,label:de[i]}));e.audioPlayTypeList=[{label:"全部",value:""},...s],await I.getSubjects(),Xe(document.querySelector(".musicList-container"),i=>{const n=i[0],{height:d}=n.contentRect;document.documentElement.style.setProperty("--xiaoku-music-height",d+"px")}),C(),await c(),new IntersectionObserver(i=>{i[0].intersectionRatio>0&&b()}).observe(y.value),window.addEventListener("message",w)}),fe(()=>{window.removeEventListener("message",w)});const g=async s=>{const t=await Fe({type:"MUSIC",materialId:s.id});(t==null?void 0:t.code)===200&&(s.favitor=t.data)},R=s=>{const t=e.list.findIndex(i=>i.id===s.id);t>-1&&(e.listActive=t),g(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(k.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(i=>i.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)||[],i=[];return t.forEach((n,d)=>{i.push({label:n.name,value:d})}),i});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=k.getToken,t=e.list[e.listActive];if(!(t!=null&&t.id)){e.iframeSrc="";return}const i=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(i),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:i}=s||{},n=[{value:"first",label:"首调"},{value:"fixed",label:"固定调"}];return!(["JIAN","FIRST"].includes(t)&&i===!1)&&i!=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(i=>i.text());ge(t)}}else{const{scoreType:t,isConvertibleScore:i}=s||{};let n="first";n=t==="STAVE"?"staff":t==="JIAN"?"fixed":"first",e.showMusicImg=n,e.showTransBtn=q(i,t)}},ge=s=>{var Y,$,Q,ee,te;const i=(($=(Y=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("part-list"))==null?void 0:Y[0])==null?void 0:$.getElementsByTagName("score-part"))||[],n=Array.from(i).map(h=>{var E,U,P;return((P=(U=(E=h.getElementsByTagName("part-name"))==null?void 0:E[0])==null?void 0:U.textContent)==null?void 0:P.trim())||h.getAttribute("id")||""});((ee=(Q=n[0])==null?void 0:Q.toLocaleUpperCase)==null?void 0:ee.call(Q))==="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((h,E)=>{const U=!!(u.length==0||u.includes(h)),P=Ne(h),Ae=_e(P,E);return{label:h+(P?"(".concat(P,")"):""),value:E,sortId:Ae,canselect:U,track:h}}).filter(h=>h.canselect);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:H,isConvertibleScore:we}=ye||{};let J="first";J=H==="STAVE"?"staff":H==="JIAN"?"fixed":"first",e.showMusicImg=J,e.showTransBtn=q(we,H)};be(()=>e.listActive,async()=>{e.musicInstrumentIndex=0,M()});const j=L(()=>{var t,i,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=(i=f.value)==null?void 0:i.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 a("div",{class:o.container},[a(ie,{align:"center",wrapItem:!1,size:16},{default:()=>[a("img",{style:{cursor:"pointer"},src:ze,class:o.iconBack,onClick:()=>v.push({path:"/xiaoku-ai"})},null),a(Pe,{separator:""},{default:()=>[a(oe,{onClick:()=>v.push({path:"/xiaoku-ai"})},{default:()=>[S("全部列表")]}),a("img",{class:o.separator,src:Ge},null),a(oe,null,{default:()=>[l.query.name]})]})]}),a("div",{class:[o.wrap,e.showPlayer?o.wrapBottom:""]},[a("div",{class:o.content},[a("div",{class:o.tools},[a(ie,{style:{width:"100%"},size:[12,6],wrapItem:!1},Dt(s=e.audioPlayTypeList.map(t=>a(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 i;r.audioPlayTypes=t.value||"",t.value==="SING"&&(e.musicalInstrumentId="",e.musicSubject=""),e.reshing=!0,(i=document.querySelector(".musicList-container"))==null||i.scroll(0,0),await p()}},{default:()=>[t.label]})))?s:{default:()=>[s]})]),a("div",{class:o.contentWrap},[a("div",{class:[o.musicList,"musicList-container"]},[a("div",{class:o.searchSection},[r.audioPlayTypes!=="SING"&&a(qe,{placeholder:"全部乐器",arrowType:"small",childShowAllCheck:!1,class:o.instrumentSection,value:T.value,"onUpdate:value":t=>T.value=t,options:e.tags,onMoreId:async t=>{var i;e.loading||(e.musicalInstrumentId=t.childId,e.musicSubject=t.parentId,e.reshing=!0,(i=document.querySelector(".musicList-container"))==null||i.scroll(0,0),await p())}},null),a(Me,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:t=>{var i;e.loading||(r.name=t,e.reshing=!0,(i=document.querySelector(".musicList-container"))==null||i.scroll(0,0),p())}},null)]),a("div",{class:[o.wrapList,"music-wrap-list"]},[e.list.map((t,i)=>{var n,d;return a("div",{class:o.itemContainer},[a("div",{class:[o.item,e.listActive===i&&o.active],onClick:async()=>{R(t),await M();const u=e.list[e.listActive];u&&u.isScoreRender?e.musicInstrumentIndex=999:e.musicInstrumentIndex=0,G()}},[a("div",{class:o.img},[a(Be,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:t.titleImg||je,onLoad:u=>{u.target.dataset.loaded="true"}},null),a(He,{class:[e.listActive===i&&e.playState==="play"?"":o.showPlayLoading]},null)]),a("div",{class:o.title},[a("div",{class:o.titleName},[a(Qe,{text:t.musicSheetName},null)]),a("div",{class:o.titleDes},[((n=t.audioPlayTypeArray)==null?void 0:n.includes("SING"))&&a("span",{class:[o.iconType,o.iconSing]},[S("演唱")]),((d=t.audioPlayTypeArray)==null?void 0:d.includes("PLAY"))&&a("span",{class:[o.iconType,o.iconPlay]},[S("演奏")]),a("span",{class:o.composer},[t.composer])])]),a("img",{class:o.arrow,src:Ue},null)])])}),a("div",{ref:y,class:[o.loadingWrap,e.finshed&&o.showLoading]},[a(le,{show:!0},null)]),!e.loading&&e.list.length===0&&a("div",{class:o.empty},[a(ue,null,null)])])]),a("div",{class:o.musicStaff},[a("div",{class:o.musicName},[f.value.musicSheetName]),a("img",{id:"music-2",style:{display:f.value.id?"":"none"},class:[o.goBtn],src:Ht,onClick:()=>{K("pause");let t="staff";e.showMusicImg==="first"?t="firstTone":e.showMusicImg==="fixed"?t="fixedTone":e.showMusicImg==="staff"&&(t="staff");let i="".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&&(i+="&instrumentId="+e.musicalInstrumentId),window.matchMedia("(display-mode: standalone)").matches?(ke.application=window.matchMedia("(display-mode: standalone)").matches,e.previewModal=!0,e.previewUrl=i,e.showPreivew=!1):window.open(i)}},null),a("div",{class:o.rightBtns,style:{display:f.value.id?"":"none"}},[W.value&&a(ce,{options:e.trackList,trigger:"hover",value:e.musicInstrumentIndex,"onUpdate:value":[t=>e.musicInstrumentIndex=t,async t=>{var i;await M(),e.trackName=((i=e.trackList.find(n=>n.value===e.musicInstrumentIndex))==null?void 0:i.label)||"切换声部",G()}],class:[o.popSelect]},{default:()=>[a(ne,{round:!0,class:[o.textBtn]},{default:()=>{var t;return[((t=e.trackList.find(i=>i.value===e.musicInstrumentIndex))==null?void 0:t.label)||"切换声部",a("i",{class:o.iconArrow},null)]}})]}),e.showTransBtn&&a(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:()=>[a("img",{class:[o.transBtn],src:jt},null)]}),a("div",{class:o.favitor,onClick:()=>_()},[a(Ce,{name:"favitor",mode:"out-in"},{default:()=>[f.value.favitor?a("img",{src:Ut,key:"1"},null):a("img",{src:Qt,key:"2"},null)]})])]),a("div",{class:o.staffImgs},[e.iframeSrc&&(W.value||j.value.length===0)?a("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%",paddingTop:"20px"},src:e.iframeSrc,onLoad:()=>{}},null):a(O,null,[j.value.length>0?j.value.map(t=>a("img",{src:t,key:t},null)):a(ue,null,null)])])])])])]),e.list.length!==0&&a(We,{show:e.showPlayer,playState:e.playState,item:f.value,onChange:t=>K(t),onShow:t=>{e.showPlayer=t}},null),B.value?a(Vt,null,null):null,a(Re,{maskClosable:Ee,show:e.previewModal,"onUpdate:show":[t=>e.previewModal=t,t=>{t||(e.previewUrl="")}],class:o.previewWindow,showIcon:!1,displayDirective:"show"},{default:()=>[a(le,{show:e.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[a("img",{style:{display:e.showCloseBtn?"":"none"},src:Wt,class:o.previewClose,onClick:()=>{e.previewModal=!1,e.previewUrl=""}},null),a("iframe",{class:o.previewIframe,onLoad:()=>{e.showPreivew=!1},frameborder:"0",src:e.previewUrl},null)]})]})])}}});export{rs as default};