import{i as C}from"./icon_back-c5ec0a72-1734950731618.js";import{P as w,T,b as k,c as I,i as N,a as x}from"./index-b40f8126-1734950731618.js";import{i as A}from"./icon_default-d1bcaf5f-1734950731618.js";import{i as B}from"./icon_separator-e0f6c575-1734950731618.js";import{u as P,i as L,a as R,b as z}from"./useSpeak-591a8844-1734950731618.js";import{d as b,a as E,u as F,e as y,A as W,U as D,q as U,f as t,x as M,aS as O,aT as h,w as S,k as r,j as G,E as j}from"./index-efb66432-1734950731618.js";import{T as $}from"./index-043f1db0-1734950731618.js";import{e as V}from"./api-9f0dec79-1734950731618.js";import{N as H}from"./Slider-f8e18c57-1734950731618.js";const J="_container_dq20o_1",K="_iconBack_dq20o_6",Q="_separator_dq20o_43",X="_wrap_dq20o_48",Y="_wrapBottom_dq20o_54",Z="_content_dq20o_57",tt="_tools_dq20o_64",et="_contentWrap_dq20o_78",st="_musicList_dq20o_86",ot="_instrumentGroup_dq20o_100",it="_instrumentImg_dq20o_108",at="_otherImg_dq20o_114",nt="_instrumentName_dq20o_121",lt="_instrumentTag_dq20o_129",ct="_wrapList_dq20o_134",rt="_titlec_dq20o_144",dt="_icon2_dq20o_154",ut="_empty_dq20o_161",_t="_itemContainer_dq20o_167",mt="_item_dq20o_167",pt="_active_dq20o_189",gt="_arrow_dq20o_192",ft="_img_dq20o_195",yt="_title_dq20o_144",ht="_titleName_dq20o_224",St="_titleDes_dq20o_231",qt="_btn_dq20o_241",vt="_showPlayLoading_dq20o_265",Ct="_loadingWrap_dq20o_268",wt="_musicStaff_dq20o_273",Tt="_musicTitle_dq20o_288",kt="_musicTitleLeft_dq20o_298",It="_icon1_dq20o_302",Nt="_icon3_dq20o_303",xt="_musicTitleRight_dq20o_315",At="_textRead_dq20o_315",Bt="_textClose_dq20o_316",Pt="_icon_dq20o_6",Lt="_musicContent_dq20o_342",Rt="_staffImgs_dq20o_361",zt="_changeSizeSection_dq20o_378",bt="_iconT_dq20o_391",Et="_iconAddT_dq20o_395",Ft="_iconPlusT_dq20o_396",Wt="_selectionCouser_dq20o_423",Dt="_hide_dq20o_428",Ut="_textStart_dq20o_432",Mt="_textReadOnly_dq20o_433",s={container:J,iconBack:K,separator:Q,wrap:X,wrapBottom:Y,content:Z,tools:tt,contentWrap:et,musicList:st,instrumentGroup:ot,instrumentImg:it,otherImg:at,instrumentName:nt,instrumentTag:lt,wrapList:ct,titlec:rt,icon2:dt,empty:ut,itemContainer:_t,item:mt,active:pt,arrow:gt,img:ft,title:yt,titleName:ht,titleDes:St,btn:qt,showPlayLoading:vt,loadingWrap:Ct,musicStaff:wt,musicTitle:Tt,musicTitleLeft:kt,icon1:It,icon3:Nt,musicTitleRight:xt,textRead:At,textClose:Bt,icon:Pt,musicContent:Lt,staffImgs:Rt,changeSizeSection:zt,iconT:bt,iconAddT:Et,iconPlusT:Ft,selectionCouser:Wt,hide:Dt,textStart:Ut,textReadOnly:Mt},Xt=b({name:"instrument-detail",setup(){const m=E(),g=F(),a=P(),l=y({page:1,rows:20,status:!0,name:"",type:m.query.type}),e=y({loading:!1,finshed:!1,reshing:!1,details:{},list:[],listActive:0,playState:"pause",showPlayer:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,fontSize:18});W(()=>e.playState,()=>{e.playState==="play"&&a.onCloseSpeak()});const q=D(()=>e.list[e.listActive]||{}),u=i=>{const o=e.list.findIndex(d=>d.id===i.id);o>-1&&(e.listActive===o?e.playState=e.playState==="play"?"pause":"play":e.playState="play",e.showPlayer=!0,e.listActive=o)},_=i=>{i==="play"?e.playState="play":i==="pause"?e.playState="pause":i==="pre"?e.list[e.listActive-1]&&u(e.list[e.listActive-1]):i==="next"&&e.list[e.listActive+1]&&u(e.list[e.listActive+1])},v=async()=>{var f;e.loading=!0;let i={};try{i=await V({id:m.query.id})}catch(c){console.log(c)}e.reshing&&(e.list=[],e.reshing=!1),e.finshed=!0,e.list=i.data.knowledgeWikiResources||[],e.list.forEach(c=>{c.audioFileUrl=c.url,c.musicSheetName=c.name});const o=i.data.knowledgeWikiCategories||[];i.data.knowledgeName=o.length>0?o[0].knowledgeWikiCategoryTypeName:"",i.data.intros=i.data.intros.replace(/