import{M as c}from"./music.b35eb5be.js";import{d as l,a as n,Q as u,r as g,f as d,R as o,U as f,j as h,V as m}from"./App.32e8e50f.js";const v="_container_5v2hh_1",p="_icon_5v2hh_12",R="_status_5v2hh_16",w="_noticeBar_5v2hh_20";var r={container:v,icon:p,status:R,noticeBar:w},E="/orchestra-music-score/assets/arrow.c0b252e8.svg",k=l({name:"detail-title",props:{title:{type:String,default:""},rightView:{type:Boolean,default:!0},onClick:{type:Function}},render(){return n("div",{onClick:this.onClick,class:r.container},[n("img",{class:r.icon,src:c},null),n(u,{text:this.title,color:"#4a4a4a",class:r.noticeBar,background:"none"},null),this.rightView?n("img",{class:r.status,src:E},null):null])}}),B="/orchestra-music-score/assets/arrow-left.fecfe01d.svg";const i=g(null);let e=null;var S=l({name:"music-score",props:{score:{type:String,default:""},showPartNames:{type:Boolean,default:!1},onRerender:{type:Function,default:()=>{}},opotions:{type:Object,default:()=>{}},EngravingRules:{type:Object,default:()=>{}}},data(){return{osmd:null,loading:!1}},watch:{score(){this.loadRender()}},methods:{async loadRender(){if(this.loading=!0,this.score)try{await e.load(this.score),e.zoom=d(),await e.render(),this.onRerender(e)}catch(t){console.log(t),this.onRerender(null)}o.emit("loaded"),this.loading=!1},noteClickEvent(t){o.emit("container-click",t);const a=t.path||t.composedPath&&t.composedPath();for(const s of a)s.classList&&s.classList.contains("vf-stavenote")&&o.emit("click",t,s)}},beforeUnmount(){i.value.removeEventListener("touchstart",this.noteClickEvent,!1)},async mounted(){var t;i.value.addEventListener("touchstart",this.noteClickEvent,!1),e=await new f(i.value,{followCursor:!1,autoResize:!0,drawSubtitle:!1,drawTitle:!1,autoBeam:!0,drawMetronomeMarks:!1,drawMeasureNumbers:!1,drawComposer:!1,drawLyricist:!1,drawPartNames:this.showPartNames,...this.opotions}),e.EngravingRules.CompactMode=!0,e.EngravingRules.DYMinNoteWidth=3,e.EngravingRules.VoiceSpacingMultiplierVexflow=.65,e.EngravingRules.VoiceSpacingAddendVexflow=2,e.EngravingRules.MinSkyBottomDistBetweenStaves=2,e.EngravingRules.MinSkyBottomDistBetweenSystems=2,e.EngravingRules.MinimumStaffLineDistance=4,e.EngravingRules.BetweenStaffDistance=2.5,e.EngravingRules.StaffDistance=3.5,e.EngravingRules.MinimumDistanceBetweenSystems=1,e.EngravingRules.PageBottomMargin=0,e.EngravingRules.PageLeftMargin=2,e.EngravingRules.PageRightMargin=2,e.EngravingRules.PageTopMarginNarrow=3,e.EngravingRules.WedgeEndDistanceBetweenTimestampsFactor=1,e.EngravingRules.RehearsalMarkXOffset=-18,e.EngravingRules.RehearsalMarkYOffset=10,e.EngravingRules.DYWorkId=((t=h.activeDetail)==null?void 0:t.parentCategoriesId)||0;for(const a in this.EngravingRules)if(Object.prototype.hasOwnProperty.call(this.EngravingRules,a)){const s=this.EngravingRules[a];e.EngravingRules[a]=s}this.loadRender()},render(){return n("div",{class:m.container,ref:i},null)}});export{B as I,S as M,k as T};
