var ht=Object.defineProperty,yt=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var je=(u,I,c)=>I in u?ht(u,I,{enumerable:!0,configurable:!0,writable:!0,value:c}):u[I]=c,G=(u,I)=>{for(var c in I||(I={}))Re.call(I,c)&&je(u,c,I[c]);if(Te)for(var c of Te(I))_e.call(I,c)&&je(u,c,I[c]);return u},Z=(u,I)=>yt(u,St(I));var Oe=(u,I)=>{var c={};for(var a in u)Re.call(u,a)&&I.indexOf(a)<0&&(c[a]=u[a]);if(u!=null&&Te)for(var a of Te(u))I.indexOf(a)<0&&_e.call(u,a)&&(c[a]=u[a]);return c};var D=(u,I,c)=>new Promise((a,e)=>{var s=h=>{try{k(c.next(h))}catch(x){e(x)}},y=h=>{try{k(c.throw(h))}catch(x){e(x)}},k=h=>h.done?a(h.value):Promise.resolve(h.value).then(s,y);k((c=c.apply(u,I)).next())});import{S as et}from"./index.a513af07.js";import{P as tt}from"./index.146ca7db.js";import{a as at,b as bt,c as qe,d as vt,e as Tt,f as It,m as Ne,g as kt,h as Ye,i as xt,j as Ft,k as ze,l as Lt,n as Ct,o as wt,p as Ut,q as Pt}from"./api.bf369421.js";import{U as X}from"./index.d684469d.js";import{cj as At,cG as Nt,d as le,cI as Mt,cJ as lt,F as Fe,cP as Et,bi as Ge,dx as Bt,dy as Ke,a as te,u as de,r as H,B as pe,dj as xe,i as t,l as T,ce as M,aj as fe,_ as ue,a9 as Q,p as q,k as m,cg as Le,bx as st,b as it,dk as ut,q as Me,ac as _,ad as C,m as me,db as oe,M as rt,ai as Ee,dz as Dt,di as ye,a8 as W,a7 as O,dA as jt,ag as we,aa as ce,bn as ot,dB as Rt,H as J,ae as _t,ch as Ve,d9 as se,da as Ie,bC as $,a0 as Ot,a1 as qt,e as Yt,d7 as zt,d8 as Je}from"./index.f62e787a.js";import{D as Se,E as Gt,C as nt,F as Pe,c as $e}from"./constant.b4bfe346.js";import{g as ne,a as Xe}from"./objectUtil.ec24ceed.js";import{c as Ae}from"./api.c41edd9e.js";import{x as ct}from"./api.a0a55d55.js";import{s as dt}from"./api.1e66c704.js";import{f as pt}from"./index.dc7a0b7b.js";import{a as Kt}from"./uploadFile.3a7dfa67.js";import{N as P}from"./FormItemGridItem.9b5fe2fd.js";import{N as Be}from"./Cascader.9d57142c.js";import{e as Vt,g as Jt}from"./filters.0e1cdfd6.js";import{c as $t,g as Xt}from"./musicUtil.56af1657.js";import{T as be}from"./index.18e02e62.js";import{a as Ht}from"./searchArray.617a5610.js";import{g as Zt,s as Wt}from"./use-async.dd1ac6f3.js";import"./searchs.b637f0d6.js";import"./oss-file-upload.39c53139.js";import"./api.d408a8a2.js";import"./vuedraggable.umd.d9085aca.js";import"./DeleteFilled.4766ad79.js";import"./api.ba521d6f.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.944c0d67.js";import"./dayjs.min.6fb25495.js";const Qt=At("input-group-label",`
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 box-sizing: border-box;
 padding: 0 12px;
 display: inline-block;
 border-radius: var(--n-border-radius);
 background-color: var(--n-group-label-color);
 color: var(--n-group-label-text-color);
 font-size: var(--n-font-size);
 line-height: var(--n-height);
 height: var(--n-height);
 flex-shrink: 0;
 white-space: nowrap;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
`,[Nt("border",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
 border: var(--n-group-label-border);
 transition: border-color .3s var(--n-bezier);
 `)]),ea=Object.assign(Object.assign({},lt.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),He=le({name:"InputGroupLabel",props:ea,setup(u){const{mergedBorderedRef:I,mergedClsPrefixRef:c,inlineThemeDisabled:a}=Mt(u),e=lt("Input","-input-group-label",Qt,Bt,u,c),s=Fe(()=>{const{size:k}=u,{common:{cubicBezierEaseInOut:h},self:{groupLabelColor:x,borderRadius:B,groupLabelTextColor:S,lineHeight:d,groupLabelBorder:v,[Ke("fontSize",k)]:w,[Ke("height",k)]:F}}=e.value;return{"--n-bezier":h,"--n-group-label-color":x,"--n-group-label-border":v,"--n-border-radius":B,"--n-group-label-text-color":S,"--n-font-size":w,"--n-line-height":d,"--n-height":F}}),y=a?Et("input-group-label",Fe(()=>u.size[0]),s,u):void 0;return{mergedClsPrefix:c,mergedBordered:I,cssVars:a?void 0:s,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){var u,I,c;const{mergedClsPrefix:a}=this;return(u=this.onRender)===null||u===void 0||u.call(this),Ge("div",{class:[`${a}-input-group-label`,this.themeClass],style:this.cssVars},(c=(I=this.$slots).default)===null||c===void 0?void 0:c.call(I),this.mergedBordered?Ge("div",{class:`${a}-input-group-label__border`}):null)}}),ta="_audioSection_d7561_1",aa="_btnRemove_d7561_9",la="_formContainer_d7561_14",sa="_productModal_d7561_19",ia="_productIframe_d7561_27",ua="_musicPreView_d7561_32",ra="_musicList_d7561_37",oa="_musicImg_d7561_53",na="_tipImg_d7561_57",ae={audioSection:ta,btnRemove:aa,formContainer:la,productModal:sa,productIframe:ia,musicPreView:ua,musicList:ra,musicImg:oa,tipImg:na},ca=le({name:"musicSheetOwnerDialog",props:{musicSheetExtend:{type:Object,default:()=>{}},sourceType:{type:String,required:!0},appData:{type:Array,required:!0,default:[]}},emits:["close","getList","choseMusicSheetOwnerData"],setup(u,{slots:I,attrs:c,emit:a}){const e=te({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,name:null,sourceType:null},dataList:[],appData:[]}),s=de(),y=H(),k=()=>{e.pagination.page=1,x()},h=()=>{var d;(d=y.value)==null||d.submit()},x=()=>D(this,null,function*(){try{e.searchForm.applicationId||s.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=u.sourceType;const{data:v}=yield at(G(G({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(v.total),e.dataList=v.rows||[]}catch(d){}e.loading=!1});pe(()=>D(this,null,function*(){{if(e.appData=xe(u.appData),e.appData.length==0){s.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25");return}u.musicSheetExtend&&u.musicSheetExtend.applicationId?e.searchForm.applicationId=u.musicSheetExtend.applicationId:e.searchForm.applicationId=e.appData[0].value,e.searchForm.name=null}x()}));const B=()=>e.searchForm.sourceType==="ORG"?[{title:"\u673A\u6784\u540D\u79F0",key:"orgName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(d){return t(Q,null,{default:()=>[t(q,{type:"primary",size:"small",text:!0,onClick:()=>{const v=Z(G({},d),{applicationId:e.searchForm.applicationId});a("choseMusicSheetOwnerData",v),a("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}]:[{title:"\u4EBA\u5458\u540D\u79F0",key:"userName"},{title:"\u624B\u673A\u53F7",key:"phone"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(d){return t(Q,null,{default:()=>[t(q,{type:"primary",size:"small",text:!0,onClick:()=>{const v=Z(G({},d),{applicationId:e.searchForm.applicationId});a("choseMusicSheetOwnerData",v),a("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}],S=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(d){return t(Q,null,{default:()=>[t(q,{type:"primary",size:"small",text:!0,onClick:()=>{const v=Z(G({},d),{applicationId:e.searchForm.applicationId});a("choseMusicSheetOwnerData",v),a("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(et,{ref:y,model:e.searchForm,onSubmit:k,onSetModel:d=>e.searchForm=d},{default:()=>[t(T,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId",size:"small",style:"width:250px"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u6240\u5C5E\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":d=>e.searchForm.applicationId=d,options:e.appData},null)]}),e.searchForm.sourceType==="PERSON"&&t(fe,null,[t(T,{label:"\u6240\u5C5E\u4EBA",path:"name",size:"small",style:"width:250px"},{default:()=>[t(ue,{placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u4EBA/\u624B\u673A\u53F7",value:e.searchForm.name,"onUpdate:value":d=>e.searchForm.name=d,clearable:!0},null)]})]),e.searchForm.sourceType==="ORG"&&t(fe,null,[t(T,{label:"\u673A\u6784\u540D\u79F0",path:"name",size:"small",style:"width:250px"},{default:()=>[t(ue,{placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u540D\u79F0",value:e.searchForm.name,"onUpdate:value":d=>e.searchForm.name=d,clearable:!0},null)]})]),t(T,{size:"small"},{default:()=>[t(Q,null,{default:()=>[t(q,{type:"primary",onClick:h},{default:()=>[m("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[u.sourceType==="PERSON"&&t(Le,{loading:e.loading,columns:B(),data:e.dataList},null),u.sourceType==="ORG"&&t(Le,{loading:e.loading,columns:S(),data:e.dataList},null),t(tt,{page:e.pagination.page,"onUpdate:page":d=>e.pagination.page=d,pageSize:e.pagination.rows,"onUpdate:pageSize":d=>e.pagination.rows=d,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":d=>e.pagination.pageTotal=d,onList:x,sync:!0,pageSlot:5},null)])])}}),mt=le({name:"music-create-img",props:{xmlFileUrl:{type:String,default:""}},emits:["close","confirm"],setup(u,{emit:I}){const c=de(),a=te({productOpen:!1,productIfameSrc:""}),e=te({musicImg:"",musicFirstImg:"",musicJianImg:""}),s=()=>{if(!u.xmlFileUrl){c.error("\u8BF7\u5148\u4E0A\u4F20XML");return}const x={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},B=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec")?"online":"dev",S=x[B],d=/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":S,v=encodeURIComponent(u.xmlFileUrl);a.productIfameSrc=d+`/instrument/#/product-img?xmlUrl=${v}&isCreateImg=true&isCbs=true`},y=x=>{const B=x.data;if((B==null?void 0:B.api)==="webApi_renderSvg"){let S=[];try{S=JSON.parse(B.product)}catch(d){console.log("\u{1F680} ~ error:",d)}S=S.filter(d=>d.base64),S.length===3?(c.success("\u56FE\u7247\u751F\u6210\u6210\u529F"),k(S)):c.error("\u56FE\u7247\u751F\u6210\u5931\u8D25")}},k=x=>D(this,null,function*(){var B,S,d;for(let v=0;v<x.length;v++){const w=h(x[v].base64,`${Date.now()}p${v}.png`);x[v].url=yield Kt(w)}e.musicImg=((B=x[0])==null?void 0:B.url)||"",e.musicFirstImg=((S=x[1])==null?void 0:S.url)||"",e.musicJianImg=((d=x[2])==null?void 0:d.url)||"",x=[],I("close"),I("confirm",e)}),h=(x,B)=>{var R;let S=x.split(",")||[],d=(R=S[0].match(/:(.*?);/))==null?void 0:R[1],v=atob(S[1]),w=v.length,F=new Uint8Array(w);for(;w--;)F[w]=v.charCodeAt(w);return new File([F],B,{type:d})};return pe(()=>{s(),window.addEventListener("message",y)}),st(()=>{window.removeEventListener("message",y)}),()=>t("iframe",{class:ae.productIframe,src:a.productIfameSrc},null)}}),da="_musiceBeatTime_khkvo_1",pa="_tit_khkvo_10",ma="_iframe_khkvo_18",Ue={musiceBeatTime:da,tit:pa,iframe:ma},ft=le({name:"musiceBeatTime",props:{id:{type:String}},emits:["close"],setup(u,{emit:I}){const c=de();pe(()=>{window.addEventListener("message",a)}),st(()=>{window.removeEventListener("message",a)});function a(v){const w=v.data;(w==null?void 0:w.api)==="webApi_beatTimes"&&(s.value=!1,e(w))}function e(v){return D(this,null,function*(){try{const{beatTime:w,singBeatTime:F,mingBeatTime:R,isBeatTime:V,isSingBeatTime:K,isMingBeatTime:o}=JSON.parse(v.data);yield bt({id:u.id,playTimeList:w,singTimeList:F,solmizationTimeList:R,playTimeSilence:V,singTimeSilence:K,solmizationTimeSilence:o}),c.success("\u8282\u62CD\u5668\u751F\u6210\u6210\u529F"),I("close")}catch(w){console.log("\u{1F680} ~ \u97F3\u9891\u5408\u6210\u5931\u8D25",w),c.error("\u8282\u62CD\u5668\u751F\u6210\u5931\u8D25"),I("close",!0)}})}const s=H(!0),k=it().getToken,h={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},x=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec.colexiu")?"online":"dev",B=h[x];let d=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":B)+`/instrument/?_t=${Date.now()}&id=${u.id}&Authorization=${k}&isCbs=true&isbeatTimes=true&musicRenderType=staff`;return()=>t("div",{class:Ue.musiceBeatTime},[t("div",{class:Ue.tit},[m("\u8282\u62CD\u5668\u97F3\u9891\u751F\u6210\u4E2D...")]),s.value&&t("iframe",{class:Ue.iframe,width:"667px",height:"375px",frameborder:"0",src:d},null)])}}),gt=le({name:"music-platform",props:{type:{type:String,default:""},useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(u,{emit:I}){const c=de(),a=te({gym:{applicationId:"",checked:!0,paymentType:"VIP",isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},gyt:{applicationId:"",checked:!0,availableType:"PLATFORM",isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},klxt:{applicationId:"",checked:!0,isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},klx:{applicationId:"",checked:!0,musicTagIds:[],paymentType:["VIP"],musicPrice:null,availableType:"PLATFORM",topFlag:!1,exquisiteFlag:!1,isConvertibleScore:!0,scoreType:"FIRST",status:!0,sortNo:null},kt:{applicationId:"",checked:!0,musicSheetCategoryId:null,paymentType:"VIP",isConvertibleScore:!0,scoreType:"FIRST",status:!0,sortNo:null,musicTagIds:[],recommendFlag:!1}}),e=Fe(()=>({GYM:S("GYM"),KLX_JG:S("KLX_JG"),KLX:S("KLX"),KT:S("KT"),GYT:S("GYT")})),s=H(),y=H(!1),k=H([]),h=H([]),x=H([]),B=H(!1),S=o=>(u.useProject||[]).findIndex(l=>l.appKey===o)!==-1,d=()=>{let o=!1;const b=a.gym;if(b.checked){if(!b.paymentType)return c.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(console.log(b.isConvertibleScore,"gym.isConvertibleScore"),b.isConvertibleScore==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!b.scoreType)return c.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(b.status==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const l=a.gyt;if(l.checked){if(!l.availableType)return c.error("\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84"),!0;if(l.isConvertibleScore==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!l.scoreType)return c.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(l.status==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const f=a.klxt;if(f.checked){if(f.isConvertibleScore==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!f.scoreType)return c.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(f.status==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const A=a.klx;if(A.checked){if(A.musicTagIds.length<=0)return c.error("\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"),!0;if(!A.paymentType||A.paymentType.length<=0)return c.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(!A.paymentType.includes("CHARGE"))A.musicPrice=0;else if(A.musicPrice===null||A.musicPrice===void 0||A.musicPrice==="")return c.error("\u66F2\u76EE\u4EF7\u683C\u4E0D\u80FD\u4E3A\u7A7A"),!0;if(typeof A.topFlag!="boolean")return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876"),!0;if(typeof A.exquisiteFlag!="boolean")return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1"),!0;if(A.isConvertibleScore==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!A.scoreType)return c.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(A.status==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const Y=a.kt;if(Y.checked){if(!Y.musicSheetCategoryId)return c.error("\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750"),!0;if(!Y.paymentType)return c.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(Y.isConvertibleScore==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!Y.scoreType)return c.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(Y.status==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0;if(Y.musicTagIds.length<=0)return c.error("\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"),!0;if(Y.recommendFlag==null)return c.error("\u8BF7\u9009\u62E9\u662F\u5426\u63A8\u8350"),!0}return o},v=()=>{const o=[],b=[];return a.gym.checked&&(o.push(G({},a.gym)),b.push(a.gym.applicationId)),a.gyt.checked&&(o.push(G({},a.gyt)),b.push(a.gyt.applicationId)),a.klxt.checked&&(o.push(G({},a.klxt)),b.push(a.klxt.applicationId)),a.klx.checked&&(o.push(Z(G({},a.klx),{musicTagIds:a.klx.musicTagIds.join(","),paymentType:a.klx.paymentType.join(",")})),b.push(a.klx.applicationId)),a.kt.checked&&(o.push(Z(G({},a.kt),{musicTagIds:a.kt.musicTagIds.join(",")})),b.push(a.kt.applicationId)),{musicSheetId:u.id,applicationExtends:o||{},useApplicationIds:b.join(",")||""}},w=()=>D(this,null,function*(){try{if(d())return;B.value=!0;const o=v();yield It(o),c.success("\u4FDD\u5B58\u6210\u529F"),I("close"),I("getList")}catch(o){}B.value=!1}),F=()=>D(this,null,function*(){try{const b=(u.useProject||[]).find(f=>f.appKey==="KLX");if(!b)return;const{data:l}=yield qe({applicationId:b.id});l&&l.length>0&&l.forEach(f=>{k.value.push(Z(G({},f),{label:f.name,value:f.id}))})}catch(o){}}),R=()=>D(this,null,function*(){try{const b=(u.useProject||[]).find(f=>f.appKey==="KT");if(!b)return;const{data:l}=yield qe({applicationId:b.id});l&&l.length>0&&l.forEach(f=>{h.value.push(Z(G({},f),{label:f.name,value:f.id}))})}catch(o){}}),V=()=>D(this,null,function*(){const b=(u.useProject||[]).find(f=>f.appKey==="KT");if(!b)return;const l=yield vt({applicationIds:b.id});l.data&&l.data.length>0&&(x.value=l.data[0].musicSheetCategories)}),K=()=>D(this,null,function*(){try{const{data:o}=yield Tt({musicSheetId:u.id});(o||[]).forEach(l=>{l.appKey==="GYM"?(a.gym.checked=!0,a.gym.paymentType=l.paymentType,a.gym.isConvertibleScore=l.isConvertibleScore,a.gym.scoreType=l.scoreType,a.gym.status=l.status,a.gym.sortNo=l.sortNo):l.appKey==="GYT"?(a.gyt.checked=!0,a.gyt.availableType=l.availableType,a.gyt.isConvertibleScore=l.isConvertibleScore,a.gyt.scoreType=l.scoreType,a.gyt.status=l.status,a.gyt.sortNo=l.sortNo):l.appKey==="KLX_JG"?(a.klxt.checked=!0,a.klxt.isConvertibleScore=l.isConvertibleScore,a.klxt.scoreType=l.scoreType,a.klxt.status=l.status,a.klxt.sortNo=l.sortNo):l.appKey==="KLX"?(a.klx.checked=!0,a.klx.musicTagIds=l.musicTagIds?l.musicTagIds.split(","):[],a.klx.paymentType=l.paymentType?l.paymentType.split(","):[],a.klx.musicPrice=l.musicPrice,a.klx.availableType=l.availableType,a.klx.topFlag=l.topFlag,a.klx.exquisiteFlag=l.exquisiteFlag,a.klx.isConvertibleScore=l.isConvertibleScore,a.klx.scoreType=l.scoreType,a.klx.status=l.status,a.klx.sortNo=l.sortNo):l.appKey==="KT"&&(a.kt.checked=!0,a.kt.musicSheetCategoryId=l.musicSheetCategoryId,a.kt.paymentType=l.paymentType,a.kt.isConvertibleScore=l.isConvertibleScore,a.kt.scoreType=l.scoreType,a.kt.status=l.status,a.kt.sortNo=l.sortNo,a.kt.musicTagIds=l.musicTagIds?l.musicTagIds.split(","):[],a.kt.recommendFlag=l.recommendFlag)})}catch(o){}});return pe(()=>D(this,null,function*(){y.value=!0,u.type!=="add"&&(a.gym.checked=!1,a.gyt.checked=!1,a.klxt.checked=!1,a.klx.checked=!1,a.kt.checked=!1),(u.useProject||[]).forEach(b=>{b.appKey==="GYM"?a.gym.applicationId=b.id:b.appKey==="KLX_JG"?a.klxt.applicationId=b.id:b.appKey==="KLX"?a.klx.applicationId=b.id:b.appKey==="KT"?a.kt.applicationId=b.id:b.appKey==="GYT"&&(a.gyt.applicationId=b.id)}),yield F(),yield R(),yield V(),yield K(),y.value=!1})),()=>t(ut,{show:y.value},{default:()=>[t(Me,{model:a,ref:s,"label-placement":"top","label-width":"85"},{default:()=>[e.value.GYM&&t(_,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(C,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(me,{checked:a.gym.checked,"onUpdate:checked":o=>a.gym.checked=o},{default:()=>[m("\u7BA1\u4E50\u8FF7")]})]}),t(C,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(_,{cols:6,xGap:12},{default:()=>[t(C,null,{default:()=>[t(T,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:a.gym.paymentType,"onUpdate:value":o=>a.gym.paymentType=o,clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u6536\u8D39",value:"VIP"}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:a.gym.isConvertibleScore,"onUpdate:value":o=>a.gym.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:a.gym.scoreType,"onUpdate:value":o=>a.gym.scoreType=o,options:ne(Se)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:a.gym.status,"onUpdate:value":o=>a.gym.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(oe,{precision:0,min:0,max:999999999,value:a.gym.sortNo,"onUpdate:value":o=>a.gym.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.GYT&&t(_,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(C,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(me,{checked:a.gyt.checked,"onUpdate:checked":o=>a.gyt.checked=o},{default:()=>[m("\u7BA1\u4E50\u56E2")]})]}),t(C,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(_,{cols:6,xGap:12},{default:()=>[t(C,null,{default:()=>[t(T,{label:"\u53EF\u7528\u9014\u5F84",path:"availableType",required:!0},{default:()=>[t(M,{value:a.gyt.availableType,"onUpdate:value":o=>a.gyt.availableType=o,clearable:!0,options:[{label:"\u5B66\u6821",value:"ORG"},{label:"\u5E73\u53F0",value:"PLATFORM"}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:a.gyt.isConvertibleScore,"onUpdate:value":o=>a.gyt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:a.gyt.scoreType,"onUpdate:value":o=>a.gyt.scoreType=o,options:ne(Se)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:a.gyt.status,"onUpdate:value":o=>a.gyt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(oe,{precision:0,min:0,max:999999999,value:a.gyt.sortNo,"onUpdate:value":o=>a.gyt.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KLX_JG&&t(_,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(C,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(me,{checked:a.klxt.checked,"onUpdate:checked":o=>a.klxt.checked=o},{default:()=>[m("\u9177\u4E50\u79C0\u673A\u6784")]})]}),t(C,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(_,{cols:6,xGap:12},{default:()=>[t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:a.klxt.isConvertibleScore,"onUpdate:value":o=>a.klxt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:a.klxt.scoreType,"onUpdate:value":o=>a.klxt.scoreType=o,options:ne(Se)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:a.klxt.status,"onUpdate:value":o=>a.klxt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(oe,{precision:0,min:0,max:999999999,value:a.klxt.sortNo,"onUpdate:value":o=>a.klxt.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KLX&&t(_,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(C,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(me,{checked:a.klx.checked,"onUpdate:checked":o=>a.klx.checked=o},{default:()=>[m("\u9177\u4E50\u79C0\u5E73\u53F0")]})]}),t(C,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(_,{cols:6,xGap:12},{default:()=>[t(C,null,{default:()=>[t(T,{label:"\u66F2\u76EE\u6807\u7B7E",required:!0},{default:()=>[t(M,{value:a.klx.musicTagIds,"onUpdate:value":[o=>a.klx.musicTagIds=o,()=>{k.value.forEach(o=>{var b,l;((b=a.klx.musicTagIds)==null?void 0:b.length)>=3?(l=a.klx.musicTagIds)!=null&&l.includes(o.id)?o.disabled=!1:o.disabled=!0:o.disabled=!1})}],multiple:!0,maxTagCount:1,clearable:!0,options:k.value},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:a.klx.paymentType,"onUpdate:value":[o=>a.klx.paymentType=o,o=>{a.klx.paymentType=o;const b="FREE";a.klx.paymentType[a.klx.paymentType.length-1]==b?a.klx.paymentType=[b]:a.klx.paymentType.length>1&&a.klx.paymentType.includes(b)&&a.klx.paymentType.splice(a.klx.paymentType.indexOf(b),1),a.klx.paymentType.includes("CHARGE")||(a.klx.musicPrice=0)}],multiple:!0,maxTagCount:1,clearable:!0,options:ne(Gt)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u66F2\u76EE\u4EF7\u683C",path:"musicPrice",required:!0},{default:()=>{var o;return[t(oe,{disabled:!((o=a.klx.paymentType)!=null&&o.includes("CHARGE")),precision:2,min:0,max:9999,value:a.klx.musicPrice,"onUpdate:value":b=>a.klx.musicPrice=b,showButton:!1},null)]}})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u7F6E\u9876",path:"topFlag",required:!0},{default:()=>[t(M,{value:a.klx.topFlag,"onUpdate:value":o=>a.klx.topFlag=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u7CBE\u54C1",path:"exquisiteFlag",required:!0},{default:()=>[t(M,{value:a.klx.exquisiteFlag,"onUpdate:value":o=>a.klx.exquisiteFlag=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:a.klx.isConvertibleScore,"onUpdate:value":o=>a.klx.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:a.klx.scoreType,"onUpdate:value":o=>a.klx.scoreType=o,options:ne(Se)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:a.klx.status,"onUpdate:value":o=>a.klx.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(oe,{precision:0,min:0,max:999999999,value:a.klx.sortNo,"onUpdate:value":o=>a.klx.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KT&&t(_,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(C,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(me,{checked:a.kt.checked,"onUpdate:checked":o=>a.kt.checked=o},{default:()=>[m("\u97F3\u4E50\u6570\u5B57\u8BFE\u5802")]})]}),t(C,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(_,{cols:6,xGap:12},{default:()=>[t(C,null,{default:()=>[t(T,{label:"\u4E50\u8C31\u6559\u6750",path:"musicSheetCategoryId",required:!0},{default:()=>[t(M,{filterable:!0,value:a.kt.musicSheetCategoryId,"onUpdate:value":o=>a.kt.musicSheetCategoryId=o,clearable:!0,options:x.value,labelField:"name",valueField:"id"},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:a.kt.paymentType,"onUpdate:value":o=>a.kt.paymentType=o,clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:a.kt.isConvertibleScore,"onUpdate:value":o=>a.kt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:a.kt.scoreType,"onUpdate:value":o=>a.kt.scoreType=o,options:ne(Se)},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:a.kt.status,"onUpdate:value":o=>a.kt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(oe,{precision:0,min:0,max:999999999,value:a.kt.sortNo,"onUpdate:value":o=>a.kt.sortNo=o,showButton:!1},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u66F2\u76EE\u6807\u7B7E",required:!0},{default:()=>[t(M,{value:a.kt.musicTagIds,"onUpdate:value":[o=>a.kt.musicTagIds=o,()=>{h.value.forEach(o=>{var b;a.kt.musicTagIds.length>=3?(b=a.kt.musicTagIds)!=null&&b.includes(o.id)?o.disabled=!1:o.disabled=!0:o.disabled=!1})}],multiple:!0,maxTagCount:1,clearable:!0,options:h.value,"onUpdate:show":o=>{h.value.forEach(b=>{var l;a.kt.musicTagIds.length>=3?(l=a.kt.musicTagIds)!=null&&l.includes(b.id)?b.disabled=!1:b.disabled=!0:b.disabled=!1})}},null)]})]}),t(C,null,{default:()=>[t(T,{label:"\u662F\u5426\u63A8\u8350",required:!0},{default:()=>[t(M,{value:a.kt.recommendFlag,"onUpdate:value":o=>a.kt.recommendFlag=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]})]})]})]}),t(Q,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(q,{type:"default",onClick:()=>I("close",!0)},{default:()=>[m("\u53D6\u6D88")]}),t(q,{type:"primary",onClick:()=>w(),loading:B.value,disabled:B.value},{default:()=>[m("\u786E\u8BA4")]})]})]})]})}});function Ze(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!ot(u)}const fa=(u,I)=>{var k;let c=0;const a=u.closest(I);let e=a;const s=a==null?void 0:a.closest("measure");let y=null;for(;!y&&c<((s==null?void 0:s.childNodes.length)||50);)c++,((k=e==null?void 0:e.nextElementSibling)==null?void 0:k.tagName)==="note"&&(y=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return y},ga=(u,I)=>{var y,k;if(!u)return"";const c=new DOMParser().parseFromString(u,"text/xml"),a=((k=(y=c.getElementsByTagName("part-list"))==null?void 0:y[0])==null?void 0:k.getElementsByTagName("score-part"))||[],e=c.getElementsByTagName("part"),s=a[I];if(s){const h=s.getAttribute("id");Array.from(e).forEach(S=>{var d,v,w;if(S&&S.getAttribute("id")!==h&&((d=S.parentNode)==null||d.removeChild(S)),S&&S.getAttribute("id")===h){const F=S.getElementsByTagName("barline"),R=(v=F[F.length-1])==null?void 0:v.parentElement;if(((w=R==null?void 0:R.lastElementChild)==null?void 0:w.tagName)!=="barline"){const V=(R==null?void 0:R.children)||[];for(let K of V)if(K.tagName==="barline"){R==null||R.appendChild(K);break}}}}),Array.from(a).forEach(S=>{var d;S&&S.getAttribute("id")!==h&&((d=S.parentNode)==null||d.removeChild(S))});const x=c.getElementsByTagName("note"),B=S=>{var v;let d=x[S+1];for(let w=S;w<x.length;w++){const F=x[w];if(!((v=F.getElementsByTagName("grace"))!=null&&v.length)){d=F;break}}return d==null?void 0:d.getElementsByTagName("duration")[0]};Array.from(x).forEach((S,d)=>{var w;const v=S.getElementsByTagName("grace");v&&v.length&&B(d)&&(S==null||S.appendChild((w=B(d))==null?void 0:w.cloneNode(!0)))})}return new XMLSerializer().serializeToString(c)},ha={"rall.":1.333333333,"poco rit.":1.333333333,"rit.":1.333333333,"molto rit.":1.333333333,"molto rall":1.333333333,molto:1.333333333,lentando:1.333333333,allargando:1.333333333,morendo:1.333333333,"accel.":.8,calando:2,"poco accel.":.8,"gradually slowing":1.333333333,slowing:1.333333333,slow:1.333333333,slowly:1.333333333,faster:1.333333333};function We(u){var S,d,v,w;const I=ga(u,0),c=new DOMParser().parseFromString(I,"text/xml"),a=Array.from(c.querySelectorAll("measure")),e=Array.from(c.querySelectorAll("note")),s=Array.from(c.querySelectorAll("words")),y=Array.from(c.querySelectorAll("metronome")),k=[];for(const F of[...s,...y]){const R=fa(F,"direction");if(R){const V=R==null?void 0:R.closest("measure"),K=Array.from(V.querySelectorAll("note")),o=Array.from(V.childNodes).filter(f=>f.nodeName==="note").findIndex(f=>f===R);let b=0,l=0;for(let f=0;f<K.length;f++){const Y=+(((S=K[f].querySelector("duration"))==null?void 0:S.textContent)||"0");b+=Y,f<o&&(l=b)}k.push({ele:F,index:e.indexOf(R),noteInMeasureIndex:o,textContent:F.textContent,measureIndex:a.indexOf(V),type:F.tagName,allDuration:b,leftDuration:l})}}k.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:a.length});const h=[];k.sort((F,R)=>F.index-R.index);const x=Object.keys(ha).map(F=>F.toLocaleLowerCase());let B=!1;for(const F of k){const R=(d=F.textContent)==null?void 0:d.toLocaleLowerCase().trim();F===k[k.length-1]&&((v=h[h.length-1])==null?void 0:v.length)===1&&(B=!0);const V=x.find(K=>{const o=K.split(" ");return R&&o.includes(R)});if(F.type==="metronome"||F.type==="words"&&(R.startsWith("a tempo")||V)||B){const K=h.findIndex(o=>o.length===1);K>-1&&F.index>((w=h[K])==null?void 0:w[0].start)&&(h[K][1]={start:F.index,measureIndex:F.measureIndex,noteInMeasureIndex:F.noteInMeasureIndex,allDuration:F.allDuration,leftDuration:F.leftDuration,type:R})}F.type==="words"&&V&&h.push([{start:F.index,measureIndex:F.measureIndex,noteInMeasureIndex:F.noteInMeasureIndex,allDuration:F.allDuration,leftDuration:F.leftDuration,type:R}])}return h}const ya=u=>{var e,s,y;const I={speed:0,title:"",composer:"",partNames:[]},c=new DOMParser().parseFromString(u,"text/xml");I.title=((e=c.getElementsByTagName("work-title")[0])==null?void 0:e.textContent)||"",I.composer=((s=c.getElementsByTagName("creator")[0])==null?void 0:s.textContent)||"";const a=c.getElementsByTagName("measure");for(const k of Array.from(c.getElementsByTagName("part-name")))(y=k.textContent)!=null&&y.trim()&&I.partNames.push(k.textContent);for(const k of Array.from(a)){const h=k.getElementsByTagName("per-minute");if(h.length&&h[h.length-1]){I.speed=parseFloat(h[h.length-1].textContent||"0");break}}return I},Sa=le({name:"music-operation",props:{type:{type:String,default:"add"},data:{type:Object,default:()=>{}},tagList:{type:Array,default:()=>[]},subjectList:{type:Array,default:()=>[]}},emits:["close","getList"],setup(u,{slots:I,attrs:c,emit:a}){const e=te({details:{},graduals:{},playMode:"MP3",xmlFileUrl:null,midiUrl:null,name:null,composer:null,playSpeed:null,musicCover:null,remark:null,musicSheetSoundList_YY:[],musicSheetSoundList_YZ:[],musicSheetSoundList_all_subject:null,status:!0,musicSheetType:"CONCERT",sourceType:"PLATFORM",appAuditFlag:0,midiFileUrl:null,subjectIds:[],musicalInstrumentIdList:[],musicCategoryId:null,musicSheetAccompanimentList:[],audioType:"HOMEMODE",isPlayBeat:!0,isUseSystemBeat:!0,isUseSingSystemBeat:!0,repeatedBeats:!1,repeatedBeatsToSing:!1,isPlaySingBeat:!0,evaluationStandard:"FREQUENCY",multiTracksSelection:[],musicSheetExtend:{},musicImg:"",musicFirstImg:"",musicJianImg:"",isEvxml:!1,isShowFingering:!0,solmizationFileUrl:null,isAllSubject:!1,isMixBeat:!0,musicPdfUrl:"",firstPdfUrl:"",jianPdfUrl:"",fSongList:[],isScoreRender:!0,defaultScoreRender:!0,scoreAudioFileUrl:null}),s=te({loading:!1,musicUpdateLoading:!1,previewMode:!1,tagList:[...u.tagList],xmlFirstSpeed:null,partListNames:[],musicSheetCategories:[],musicSheetAccompanimentUrl:null,instrumentData:[],instrumentList:[],instrumentIdNameMap:new Map,subjectList:[],showMusicSheetOwnerDialog:!1,multiTracks:null,multiInstruments:null,appData:[],ownerName:null,productOpen:!1,productItem:{},productIfameSrc:"",isAutoSave:!1,bSongFile:null,musicSheetSoundList:[],subjectDisabled:!1,instrumentDisabled:!1,initFSongMap:new Map,showUseProject:!1,showUseProjectId:null,useProjectData:[],isCreateImg:!1,isBeatTime:!1}),y=te({list:[],gradualRefs:[]}),k=te({beatTimeOpen:!1,musicId:""});rt(()=>e.multiTracksSelection,p=>{if(s.musicUpdateLoading){s.musicUpdateLoading=!1;return}K(p),F()});const h=H(!1),x=H(),B=de(),S=Ee(),d=()=>D(this,null,function*(){x.value.validate(p=>D(this,null,function*(){if(!p){if(e.musicSheetType=="CONCERT"){let r=[];const{data:i}=yield Ae({page:1,rows:9999});i.rows.map(g=>{g.code&&g.code.split(",").forEach(N=>{r.push(N.replaceAll(" ","").toLocaleLowerCase())})});let n=[];if(e.multiTracksSelection.forEach(g=>{if(g&&!w(g)){let N=!1,j=g.replace(" ","").toLocaleLowerCase();for(let z=0;z<r.length;z++)if(j.startsWith(r[z])){N=!0;break}N||n.push(g)}}),n.length>0){S.warning({title:"\u63D0\u793A",content:`\u58F0\u8F68\u672A\u914D\u7F6E\uFF1A${n.join(",")}`,positiveText:"\u786E\u5B9A",onPositiveClick:()=>{}});return}}try{let r=new Set,i=[],n=e.musicSheetType,g=!1,N=!1;for(let U=0;U<e.fSongList.length;U++){let ee=e.fSongList[U];(ee.audioFileUrl||ee.solmizationFileUrl||ee.femaleSolmizationFileUrl)&&(i.push(ee),r.add("SING"),N=!0)}if(n=="SINGLE"?e.isAllSubject?e.musicSheetSoundList_all_subject&&(r.add("PLAY"),i.push({audioFileUrl:e.musicSheetSoundList_all_subject,musicSheetId:u.data.id,audioPlayType:"PLAY"}),g=!0):e.musicSheetSoundList_YZ.length>0&&e.musicSheetSoundList_YZ.forEach(U=>{e.musicalInstrumentIdList.includes(U.musicalInstrumentId)&&U.audioFileUrl&&(g=!0,i.push(Z(G({},U),{musicSheetId:u.data.id})),r.has("PLAY")||r.add("PLAY"))}):n=="CONCERT"&&e.musicSheetSoundList_YY.forEach(U=>{U.audioFileUrl&&e.multiTracksSelection.includes(U.track)&&(i.push(Z(G({},U),{musicalInstrumentId:U.musicalInstrumentId||l(U.track),musicSheetId:u.data.id,audioPlayType:"PLAY"})),g=!0,r.has("PLAY")||r.add("PLAY"))}),(e.scoreAudioFileUrl||s.bSongFile)&&(N=!0),!N&&!g){B.warning("\u8BF7\u4E0A\u4F20\u97F3\u9891\u6587\u4EF6");return}if(!s.isAutoSave&&s.isCreateImg){s.isAutoSave=!0,s.productOpen=!0;return}e.scoreAudioFileUrl?e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:s.bSongFile,scoreAudioFileUrl:e.multiTracksSelection.length>1&&e.isScoreRender&&e.scoreAudioFileUrl?e.scoreAudioFileUrl:null,audioPlayType:"SING"}):s.bSongFile&&e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:s.bSongFile,audioPlayType:"SING"}),s.musicSheetAccompanimentUrl&&e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:s.musicSheetAccompanimentUrl,audioPlayType:"PLAY"});let j,z;e.multiTracksSelection.length>1&&(j=e.isScoreRender,e.isScoreRender&&(z=e.defaultScoreRender));const E={musicCategoryId:e.musicCategoryId,musicCover:e.musicCover,name:e.name,appAuditFlag:e.appAuditFlag,subjectIds:e.isAllSubject?"":e.subjectIds.join(","),remark:e.remark,audioPlayTypes:Array.from(r).join(","),musicalInstrumentIds:e.isAllSubject?"":e.musicalInstrumentIdList.join(","),composer:e.composer,musicSheetType:e.musicSheetType,isUseSystemBeat:e.isUseSystemBeat,isShowFingering:e.isShowFingering,isPlayBeat:e.isPlayBeat,multiTracksSelection:e.multiTracksSelection.join(","),playSpeed:e.playSpeed,playMode:e.playMode,xmlFileUrl:e.xmlFileUrl,isMixBeat:e.isMixBeat,musicImg:e.musicImg,musicFirstImg:e.musicFirstImg,musicJianImg:e.musicJianImg,musicPdfUrl:e.musicPdfUrl,firstPdfUrl:e.firstPdfUrl,jianPdfUrl:e.jianPdfUrl,extConfigJson:JSON.stringify({repeatedBeats:e.repeatedBeats?1:0,gradualTimes:e.graduals,isEvxml:e.isEvxml?1:0,repeatedBeatsToSing:e.repeatedBeatsToSing?1:0}),sourceType:e.sourceType,audioType:e.audioType,status:e.status,evaluationStandard:e.evaluationStandard,musicSheetAccompanimentList:e.musicSheetAccompanimentList,musicSheetSoundList:i,musicTag:"-1",isUseSingSystemBeat:e.isUseSingSystemBeat,isPlaySingBeat:e.isPlaySingBeat,isAllSubject:e.isAllSubject,musicSheetExtend:e.sourceType=="PLATFORM"?null:e.musicSheetExtend,isScoreRender:j,defaultScoreRender:z};e.audioType=="MIDI"&&(E.musicSheetSoundList=[]),console.log(E,"obj"),h.value=!0;let L;u.type==="add"?L=yield Ye(E):u.type==="edit"&&(L=yield Ye(Z(G({},E),{id:u.data.id}))),e.isMixBeat?(k.beatTimeOpen=!0,k.musicId=L.data,s.showUseProjectId=L.data):(s.showUseProjectId=L.data,s.showUseProject=!0,setTimeout(()=>{h.value=!1,s.isAutoSave=!1},100))}catch(r){console.log(r),setTimeout(()=>{h.value=!1,s.isAutoSave=!1},100)}}}))});function v(p){p||(u.type==="add"?B.success("\u6DFB\u52A0\u6210\u529F"):u.type==="edit"&&B.success("\u4FEE\u6539\u6210\u529F")),a("getList"),a("close"),setTimeout(()=>{h.value=!1,s.isAutoSave=!1},100)}const w=p=>D(this,null,function*(){return!!(p&&(p=="P1"||p=="P2"||p=="P3"||p=="P4"))}),F=()=>D(this,null,function*(){e.fSongList.forEach(r=>{s.initFSongMap.set(r.track,r)});let p=[];e.multiTracksSelection.forEach(r=>{s.initFSongMap.has(r)?p.push(s.initFSongMap.get(r)):p.push({musicSheetId:u.data.id,audioFileUrl:null,audioPlayType:"SING",musicalInstrumentId:null,track:r,musicalInstrumentName:null,solmizationFileUrl:null,femaleSolmizationFileUrl:null})}),e.fSongList=p}),R=p=>{s.isCreateImg=!0;const r=new FileReader;r.onload=i=>{var j,z,E;try{y.list=We((j=i==null?void 0:i.target)==null?void 0:j.result).filter(U=>U.length===2);const L=ya((z=i==null?void 0:i.target)==null?void 0:z.result);e.composer||(e.composer=L.composer)}catch(L){}e.musicSheetSoundList_YY=e.musicSheetSoundList_YY.filter(L=>{var U,ee;return!L.track||!V(L.track)||((ee=(U=L.track)==null?void 0:U.toLocaleUpperCase)==null?void 0:ee.call(U))!="COMMON"&&e.multiTracksSelection.includes(L.track)}),s.partListNames=f((E=i==null?void 0:i.target)==null?void 0:E.result);let n=new Map;for(let L=0;L<e.musicSheetSoundList_YY.length;L++){let U=e.musicSheetSoundList_YY[L].track;U&&n.set(U,e.musicSheetSoundList_YY[L])}let g=[],N=[];for(let L=0;L<s.partListNames.length;L++){let U=s.partListNames[L].value;n.has(U)?g.push(n.get(U)):g.push({audioFileUrl:null,track:U,musicalInstrumentId:null}),N.push(U),e.multiTracksSelection.includes(U)||e.multiTracksSelection.push(U)}for(let L=0;L<e.musicSheetSoundList_YY.length;L++){let U=e.musicSheetSoundList_YY[L].track;(!U||!N.includes(U))&&(e.musicSheetSoundList_YY[L].track=null,g.push(e.musicSheetSoundList_YY[L]))}e.musicSheetSoundList_YY=g,e.multiTracksSelection=e.multiTracksSelection.filter(L=>N.includes(L)),s.multiTracks="all",e.musicSheetSoundList_YY.length==0&&e.musicSheetSoundList_YY.push({audioFileUrl:"",track:"",musicPdfUrl:"",firstPdfUrl:"",jianPdfUrl:""})},r.readAsText(p)},V=p=>{for(let r=0;r<s.partListNames.length;r++)if(s.partListNames[r].value==p)return!0;return!1},K=p=>D(this,null,function*(){e.musicSheetType=!p||p.length<=1?"SINGLE":"CONCERT",s.subjectDisabled=!0,s.instrumentDisabled=!0,yield b(p)}),o=(p,r="")=>{if(r=r.toLocaleLowerCase().replace(/ /g,"").replace(/\d*/gi,""),!r)return"";for(let i of p){const n=i.toLocaleLowerCase().replace(/ /g,"");if(n===r)return n}return""},b=p=>D(this,null,function*(){console.log("1111"),e.subjectIds=[];const r=new Map,i=[];s.instrumentData.forEach(n=>{n.disabled||n.code.split(/[,，]/).forEach(N=>{let j=N.replaceAll(" ","").toLowerCase();if(i.push(j),r.has(j))r.get(j).push(n.id+"");else{const z=[];z.push(n.id+""),r.set(j,z)}})});for(let n=0;n<p.length;n++){let g=p[n].replaceAll(" ","").toLowerCase();const N=o(i,g);r.has(N)&&r.get(N).forEach(j=>{const z=s.instrumentList.findIndex(E=>E.id.toString()===j);!e.musicalInstrumentIdList.includes(j)&&z!==-1&&e.musicalInstrumentIdList.push(j)})}e.musicalInstrumentIdList.length>0&&(yield Y(e.musicalInstrumentIdList))}),l=p=>{const r=new Map,i=[];if(s.instrumentData.forEach(g=>{g.disabled||g.code.split(/[,，]/).forEach(j=>{let z=j.replaceAll(" ","").toLowerCase();if(i.push(z),r.has(z))r.get(z).push(g.id+"");else{const E=[];E.push(g.id+""),r.set(z,E)}})}),!p)return"";p=p.replaceAll(" ","").toLowerCase();const n=o(i,p);if(r.has(n)){const g=r.get(n);return console.log("result:",g),g[0]||""}return""},f=p=>{var g,N,j,z;if(!p)return[];const r=new DOMParser().parseFromString(p,"text/xml"),i=((N=(g=r.getElementsByTagName("part-list"))==null?void 0:g[0])==null?void 0:N.getElementsByTagName("score-part"))||[];let n=Array.from(i).map(E=>{var ee,ge;let L=(ee=E.getElementsByTagName("part-name"))==null?void 0:ee[0],U="";if(L&&((ge=L.textContent)==null?void 0:ge.trim()))U=L.textContent||"";else{let he=E.getAttribute("id");he&&(U=he)}return{value:U.trim(),label:U.trim()}});return n=n.filter(E=>{var L,U;return((U=(L=E.value)==null?void 0:L.toLocaleUpperCase)==null?void 0:U.call(L))!="COMMON"}),s.xmlFirstSpeed=((z=(j=r.getElementsByTagName("per-minute"))==null?void 0:j[0])==null?void 0:z.textContent)||"",e.playSpeed||(s.xmlFirstSpeed?e.playSpeed=Number.parseFloat(s.xmlFirstSpeed):e.playSpeed=100),n},A=p=>{const r=xe(s.partListNames)||[],i=e.multiTracksSelection;return r.forEach(n=>{i.includes(n.value)?n.disabled=!0:n.disabled=!1}),r||[]},Y=p=>D(this,null,function*(){if(!p||p.length==0){e.subjectIds=[];return}try{const{data:r}=yield ct({page:1,rows:999,musicalInstrumentIdList:p}),i=r.rows||[],n=[];i.forEach(g=>{g.enableFlag&&n.push(g.id+"")}),e.subjectIds=n}catch(r){}}),ie=p=>{S.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u539F\u97F3\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>D(this,null,function*(){let i=e.musicSheetSoundList_YY[p].track;const n=e.multiTracksSelection.indexOf(i);n>-1?e.multiTracksSelection.splice(n,1):e.musicSheetSoundList_YY.splice(p,1),s.multiTracks=="all"&&s.partListNames.length!=e.multiTracksSelection.length&&(s.multiTracks=null)})})},Ce=p=>{if(!p)return;let r=[];p==="all"?s.partListNames.forEach(i=>{r.push(i.value)}):p==="invert"&&s.partListNames.forEach(i=>{e.multiTracksSelection.includes(i.value)||r.push(i.value)}),e.multiTracksSelection=r},ve=()=>{var i;if(e.sourceType=="PLATFORM"){s.ownerName="";return}if(!e.sourceType||!((i=e.musicSheetExtend)!=null&&i.userId))return;const p=e.musicSheetExtend.applicationId,r=s.appData.filter(n=>n.id==p);r.length>0&&(s.ownerName=r[0].appName),e.sourceType=="ORG"?s.ownerName=s.ownerName?s.ownerName+"-"+e.musicSheetExtend.organizationRole:e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(s.ownerName=s.ownerName?s.ownerName+"-"+Xe(e.musicSheetExtend.clientType,new Map(Object.entries($e))):Xe(e.musicSheetExtend.clientType,new Map(Object.entries($e))),e.musicSheetExtend.userName&&(s.ownerName=s.ownerName?s.ownerName+"-"+e.musicSheetExtend.userName:e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(s.ownerName+="("+e.musicSheetExtend.phone+")"))};return pe(()=>D(this,null,function*(){s.loading=!0,u.type==="preview"&&(s.previewMode=!0);{if(s.instrumentList&&s.instrumentList.length>0)return;try{const{data:p}=yield Ae({page:1,rows:999}),r=p.rows||[];r.forEach(i=>{i.label=i.name,i.value=i.id+"",s.instrumentIdNameMap.set(i.id+"",i.name),e.musicSheetSoundList_YZ.push({musicSheetId:u.data.id,musicalInstrumentId:i.id+"",musicalInstrumentName:i.name,audioFileUrl:null,audioPlayType:"PLAY"})}),s.instrumentData=r,s.instrumentList=xe(r)}catch(p){}}s.subjectList=xe(u.subjectList),s.subjectList.forEach(p=>{p.disabled=!p.enableFlag});{const p=Object.keys(nt),{data:r}=yield dt({page:1,rows:999,parentId:0,hiddenFlag:!0}),i=r.rows||[],n=i.filter(N=>p.includes(N.appKey));n.forEach(N=>{N.label=N.appName,N.value=N.id}),s.useProjectData=n;const g=i.filter(N=>p.includes(N.appKey)&&N.appKey!=="KLX_JG");g.forEach(N=>{N.label=N.appName,N.value=N.id}),s.appData=g}try{const{data:p}=yield Ne({enable:!0});s.musicSheetCategories=pt(p,"musicSheetCategoriesList")}catch(p){}if(u.type==="edit"||u.type==="preview"){const p=u.data;try{const{data:r}=yield kt({id:p.id});if(e.details=r,e.playMode=r.playMode,e.xmlFileUrl=r.xmlFileUrl,e.midiUrl=r.midiUrl,e.name=r.name,e.composer=r.composer,e.playSpeed=r.playSpeed?Number.parseFloat(r.playSpeed):100,e.defaultScoreRender=r.defaultScoreRender,e.isScoreRender=r.isScoreRender,e.musicCover=r.musicCover,e.remark=r.remark,e.status=r.status,e.sourceType=r.sourceType,e.appAuditFlag=r.appAuditFlag?1:0,e.midiFileUrl=r.midiFileUrl,e.isShowFingering=r.isShowFingering,e.isMixBeat=r.isMixBeat,e.musicFirstImg=r.musicFirstImg,e.musicJianImg=r.musicJianImg,e.musicImg=r.musicImg,e.musicPdfUrl=r.musicPdfUrl,e.firstPdfUrl=r.firstPdfUrl,e.jianPdfUrl=r.jianPdfUrl,e.isAllSubject=r.isAllSubject,e.isUseSingSystemBeat=r.isUseSingSystemBeat,e.isPlaySingBeat=r.isPlaySingBeat,e.subjectIds=[],r.subjectIds){const n=r.subjectIds.split(",")||[];console.log(n,"subjectIds",e.subjectIds),n.forEach(g=>{e.subjectIds.includes(g)||e.subjectIds.push(g)}),s.subjectList=s.subjectList.filter(g=>!g.disabled||n.includes(g.value))}e.musicCategoryId=r.musicCategoryId,e.audioType=r.audioType,e.isPlayBeat=r.isPlayBeat,e.isUseSystemBeat=r.isUseSystemBeat;try{const n=r.extConfigJson?JSON.parse(r.extConfigJson):{};e.graduals=n.gradualTimes||{},e.repeatedBeats=!!n.repeatedBeats,e.isEvxml=!!n.isEvxml,e.repeatedBeatsToSing=!!n.repeatedBeatsToSing}catch(n){}e.evaluationStandard=r.evaluationStandard,e.musicSheetExtend=r.musicSheetExtend,s.musicSheetSoundList=r.musicSheetSoundList?r.musicSheetSoundList:[],(r.musicSheetAccompanimentList?r.musicSheetAccompanimentList:[]).forEach(n=>{let g=n.audioPlayType;g&&g=="SING"?(s.bSongFile=n.audioFileUrl,e.scoreAudioFileUrl=n.scoreAudioFileUrl):s.musicSheetAccompanimentUrl=n.audioFileUrl});for(let n=0;n<s.musicSheetSoundList.length;n++)if(s.musicSheetSoundList[n].audioPlayType=="SING"&&s.musicSheetSoundList[n].track!=null)s.initFSongMap.set(s.musicSheetSoundList[n].track,G({},s.musicSheetSoundList[n]));else if(e.isAllSubject)e.musicSheetSoundList_all_subject=s.musicSheetSoundList[n].audioFileUrl;else for(let g=0;g<e.musicSheetSoundList_YZ.length;g++){let N=s.musicSheetSoundList[n].musicalInstrumentId;N&&N==e.musicSheetSoundList_YZ[g].musicalInstrumentId&&(e.musicSheetSoundList_YZ[g].audioFileUrl=s.musicSheetSoundList[n].audioFileUrl)}e.musicalInstrumentIdList=r.musicalInstrumentIds?r.musicalInstrumentIds.split(","):[],s.instrumentList=s.instrumentList.filter(n=>n.enableFlag||e.musicalInstrumentIdList.includes(n.id+"")),ve(),Dt.get(r.xmlFileUrl).then(n=>{if(n!=null&&n.data){s.musicUpdateLoading=!0,y.list=We(n==null?void 0:n.data).filter(E=>E.length===2),s.partListNames=f(n==null?void 0:n.data);let g=[];r.multiTracksSelection&&(r.multiTracksSelection=r.multiTracksSelection.toLocaleUpperCase()),!r.multiTracksSelection||r.multiTracksSelection.trim()==""||r.multiTracksSelection.trim()=="NULL"?g.push(""):r.multiTracksSelection.split(",").forEach(E=>{g.push(E.trim())}),g=s.partListNames.map(E=>E.label).filter(E=>g.includes(E.toLocaleUpperCase())),e.multiTracksSelection=g,e.musicSheetType=e.multiTracksSelection.length>1?"CONCERT":"SINGLE";const j=r.musicSheetSoundList?r.musicSheetSoundList:[],z=[];s.partListNames.forEach(E=>{let L=null,U=null,ee=null,ge=null,he=null;e.musicSheetType=="CONCERT"&&j.forEach(re=>{if(re.audioPlayType=="PLAY"){let De="";re.track&&(De=re.track.trim()),De==E.value&&(L=re.audioFileUrl,U=re.musicalInstrumentId,ee=re.musicPdfUrl,ge=re.firstPdfUrl,he=re.jianPdfUrl)}}),e.musicSheetSoundList_YY.push({audioFileUrl:L,musicPdfUrl:ee,firstPdfUrl:ge,jianPdfUrl:he,musicalInstrumentId:U,track:E.value,audioPlayType:"PLAY"}),z.push(E.value)}),z.length==e.multiTracksSelection.length&&(s.multiTracks="all"),e.musicSheetType=="CONCERT"&&s.musicSheetSoundList.forEach(E=>{E.audioPlayType=="PLAY"&&E.track&&!z.includes(E.track.trim())&&E.audioPlayType=="PLAY"&&e.musicSheetSoundList_YY.push({audioFileUrl:E.audioFileUrl,musicalInstrumentId:E.musicalInstrumentId,track:E.track?E.track.trim():"",audioPlayType:"PLAY"})}),F()}})}catch(r){}}else s.subjectList=s.subjectList.filter(p=>p.enableFlag==!0),s.instrumentList=s.instrumentList.filter(p=>p.enableFlag==!0);s.loading=!1})),()=>{let p,r;return t("div",{style:"background: #fff; padding-top: 12px"},[t(ut,{show:s.loading},{default:()=>[t(Me,{class:ae.formContainer,model:e,ref:x,"label-placement":"left","label-width":"150",disabled:s.previewMode},{default:()=>[t(ye,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u57FA\u672C\u4FE1\u606F")]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u66F2\u76EE\u540D\u79F0",path:"name",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",trigger:["input","blur"]}]},{default:()=>[t(ue,{value:e.name,"onUpdate:value":i=>e.name=i,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",maxlength:50,showCount:!0},null)]}),t(P,{label:"\u97F3\u4E50\u4EBA",path:"composer",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA",trigger:["input","blur"]}]},{default:()=>[t(ue,{value:e.composer,"onUpdate:value":i=>e.composer=i,placeholder:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA\u540D\u79F0",showCount:!0,maxlength:14},null)]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u66F2\u76EE\u5C01\u9762",path:"musicCover",rule:[{required:!1,message:"\u8BF7\u4E0A\u4F20\u66F2\u76EE\u5C01\u9762",trigger:["input","blur"]}]},{default:()=>[t(X,{desc:"\u5C01\u9762\u56FE",disabled:s.previewMode,accept:".jpg,.jpeg,.png",tips:"\u8BF7\u4E0A\u4F20\u5927\u5C0F1M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247",size:1,fileList:e.musicCover,"onUpdate:fileList":i=>e.musicCover=i,cropper:!0,bucketName:"cbs",options:{autoCrop:!0,enlarge:2,autoCropWidth:200,fixedBox:!0,autoCropHeight:200,previewsCircle:!1,title:"\u66F2\u76EE\u5C01\u9762"}},null)]}),t(P,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",trigger:["change"]}]},{default:()=>[t(Be,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:e.musicCategoryId,"onUpdate:value":i=>e.musicCategoryId=i,options:s.musicSheetCategories,clearable:!0},null)]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",trigger:"change"}]},{default:()=>[t(M,{value:e.sourceType,"onUpdate:value":i=>e.sourceType=i,options:ne(Pe),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},s.ownerName=null}},null)]}),e.sourceType==="PERSON"&&t(P,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.userId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u4EBA",trigger:["input","change"]}]},{default:()=>[t(q,{disabled:s.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{s.showMusicSheetOwnerDialog=!0}},{default:()=>[s.ownerName?s.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA"]})]}),e.sourceType==="ORG"&&t(P,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.organizationRoleId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u673A\u6784",trigger:["input","change"]}]},{default:()=>[t(q,{disabled:s.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{s.showMusicSheetOwnerDialog=!0}},{default:()=>[s.ownerName?s.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u673A\u6784"]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",trigger:"change",type:"number"}]},{default:()=>[t(M,{options:[{label:"\u662F",value:1},{label:"\u5426",value:0}],value:e.appAuditFlag,"onUpdate:value":i=>e.appAuditFlag=i},null)]})]}),t(ye,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u66F2\u76EE\u8BBE\u7F6E")]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u64AD\u653E\u6A21\u5F0F",path:"playMode",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u6A21\u5F0F"}]},{default:()=>[t(W,{value:e.playMode,"onUpdate:value":i=>e.playMode=i,onUpdateValue:i=>{i==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(O,{value:"MP3"},{default:()=>[m("MP3")]}),e.playMode=="MIDI"&&u.type==="preview"&&t(O,{value:"MIDI"},{default:()=>[m("MID")]})]})]}),e.playMode==="MP3"&&t(P,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B"}]},{default:()=>[t(W,{value:e.audioType,"onUpdate:value":i=>e.audioType=i},{default:()=>[t(O,{value:"HOMEMODE"},{default:()=>[m("\u81EA\u5236\u4F34\u594F")]}),t(O,{value:"COMMON"},{default:()=>[m("\u666E\u901A\u4F34\u594F")]})]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u4E0A\u4F20XML",path:"xmlFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20XML",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"XML\u6587\u4EF6",disabled:s.previewMode,size:30,key:"xmlFileUrl",fileList:e.xmlFileUrl,"onUpdate:fileList":i=>e.xmlFileUrl=i,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.xml/.mxml\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".xml,.mxml,.evxml",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20XML\u6587\u4EF6",onReadFileInputEventAsArrayBuffer:R,onRemove:()=>{}},null)]}),t(P,{label:"\u603B\u8C31\u4E94\u7EBF\u8C31PDF",path:"musicPdfUrl",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u603B\u8C31\u4E94\u7EBF\u8C31PDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u603B\u8C31\u4E94\u7EBF\u8C31PDF",disabled:s.previewMode,size:30,max:1,fileList:e.musicPdfUrl,"onUpdate:fileList":i=>e.musicPdfUrl=i,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(P,{label:"\u603B\u8C31\u9996\u8C03PDF",path:"firstPdfUrl",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u603B\u8C31\u9996\u8C03PDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u603B\u8C31\u9996\u8C03PDF",disabled:s.previewMode,size:30,max:1,fileList:e.firstPdfUrl,"onUpdate:fileList":i=>e.firstPdfUrl=i,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(P,{label:"\u603B\u8C31\u56FA\u5B9APDF",path:"jianPdfUrl",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u603B\u8C31\u56FA\u5B9APDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u603B\u8C31\u56FA\u5B9APDF",disabled:s.previewMode,size:30,max:1,fileList:e.jianPdfUrl,"onUpdate:fileList":i=>e.jianPdfUrl=i,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(P,{label:"\u8BC4\u5206\u6807\u51C6",path:"evaluationStandard",rule:[{required:!0}]},{default:()=>[t(W,{value:e.evaluationStandard,"onUpdate:value":i=>e.evaluationStandard=i},{default:()=>[t(O,{value:"FREQUENCY"},{default:()=>[m("\u6807\u51C6\u8BC4\u6D4B")]}),t(O,{value:"AMPLITUDE"},{default:()=>[m("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(O,{value:"DECIBELS"},{default:()=>[m("\u8282\u594F(\u5206\u8D1D)")]})]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u662F\u5426\u5168\u58F0\u90E8",path:"isAllSubject",rule:[{required:!0,message:"\u662F\u5426\u5168\u58F0\u90E8"}]},{default:()=>[t(W,{value:e.isAllSubject,"onUpdate:value":i=>e.isAllSubject=i},{default:()=>[t(O,{value:!1},{default:()=>[m("\u5426")]}),t(O,{value:!0},{default:()=>[m("\u662F")]})]})]}),t(P,{label:"\u901F\u5EA6",path:"playSpeed",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u901F\u5EA6"}]},{default:()=>[t(oe,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":i=>e.playSpeed=i,min:0,style:"width:100%"},null)]})]}),!e.isAllSubject&&t(_,{cols:2},{default:()=>[t(P,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentIdList",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",trigger:"change",type:"array"}]},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",options:s.instrumentList,value:e.musicalInstrumentIdList,"onUpdate:value":i=>e.musicalInstrumentIdList=i,clearable:!0,multiple:!0,filterable:!0,maxTagCount:10,onUpdateValue:i=>D(this,null,function*(){yield Y(i)})},null)]}),t(P,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",trigger:"change",type:"array"}]},{default:()=>[t(M,{value:e.subjectIds,"onUpdate:value":i=>e.subjectIds=i,options:s.subjectList,multiple:!0,filterable:!0,clearable:!0,placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",maxTagCount:10,onUpdateValue:i=>D(this,null,function*(){})},null)]})]}),t(_,{cols:1},{default:()=>[t(P,{label:"\u662F\u5426\u751F\u6210\u8282\u62CD\u5668",path:"isMixBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u751F\u6210\u8282\u62CD\u5668"}]},{default:()=>[t(W,{value:e.isMixBeat,"onUpdate:value":[i=>e.isMixBeat=i,()=>{s.isBeatTime=!0}]},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]})]}),t(_,{cols:1},{default:()=>[t(P,{label:"\u5207\u6362\u58F0\u8F68",path:"multiTracksSelection",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5207\u6362\u58F0\u8F68",trigger:"change",type:"array"}]},{default:()=>[t(_,{style:"padding-top: 4px;"},{default:()=>[t(C,{span:24},{default:()=>[t(W,{value:s.multiTracks,"onUpdate:value":i=>s.multiTracks=i,onUpdateValue:i=>{Ce(i)}},{default:()=>[t(O,{value:"all"},{default:()=>[m("\u5168\u9009")]}),t(O,{value:"allUncheck"},{default:()=>[m("\u91CD\u7F6E")]}),t(O,{value:"invert"},{default:()=>[m("\u53CD\u9009")]})]})]}),s.partListNames&&s.partListNames.length>0&&t(C,{span:24,style:"margin-top:5px"},{default:()=>[t(P,{label:"",path:"multiTracksSelection",rule:[{required:!1}]},{default:()=>[t(jt,{value:e.multiTracksSelection,"onUpdate:value":i=>e.multiTracksSelection=i,onUpdateValue:i=>{s.partListNames.length!=i.length?s.multiTracks=null:s.multiTracks="all"}},{default:()=>[t(_,{yGap:2,cols:4},Ze(p=s.partListNames.map(i=>t(C,null,{default:()=>[t(me,{value:i.value,label:i.label},null)]})))?p:{default:()=>[p]})]})]})]})]})]})]}),e.multiTracksSelection.length>1&&t(_,{cols:2},{default:()=>[t(P,{label:"\u603B\u8C31\u6E32\u67D3",path:"isScoreRender",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u603B\u8C31\u6E32\u67D3"}]},{default:()=>[t(W,{value:e.isScoreRender,"onUpdate:value":i=>e.isScoreRender=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u652F\u6301")]}),t(O,{value:!1},{default:()=>[m("\u4E0D\u652F\u6301")]})]})]}),e.isScoreRender&&t(P,{label:"\u9ED8\u8BA4\u663E\u793A",path:"defaultScoreRender",rule:[{required:!1}]},{default:()=>[t(W,{value:e.defaultScoreRender,"onUpdate:value":i=>e.defaultScoreRender=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u603B\u8C31")]}),t(O,{value:!1},{default:()=>[m("\u5206\u8F68")]})]})]})]}),t(ye,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u6F14\u594F\u6587\u4EF6")]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u662F\u5426\u64AD\u653E\u9884\u5907\u62CD",path:"isPlayBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u64AD\u653E\u9884\u5907\u62CD"}]},{default:()=>[t(W,{value:e.isPlayBeat,"onUpdate:value":i=>e.isPlayBeat=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]}),e.isPlayBeat&&t(P,{label:"\u64AD\u653E\u65B9\u5F0F",path:"isUseSystemBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(W,{value:e.isUseSystemBeat,"onUpdate:value":i=>e.isUseSystemBeat=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u7CFB\u7EDF\u9884\u5907\u62CD")]}),t(O,{value:!1},{default:()=>[m("MP3\u9884\u5907\u62CD")]})]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u91CD\u590D\u8282\u62CD\u65F6\u957F",path:"repeatedBeats",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F"}]},{default:()=>[t(W,{value:e.repeatedBeats,"onUpdate:value":i=>e.repeatedBeats=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]}),t(P,{label:"\u662F\u5426\u663E\u793A\u6307\u6CD5",path:"isShowFingering",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u663E\u793A\u6307\u6CD5"}]},{default:()=>[t(W,{value:e.isShowFingering,"onUpdate:value":i=>e.isShowFingering=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]})]}),t(_,{cols:2},{default:()=>[e.playMode==="MP3"&&t(P,{label:"\u4E0A\u4F20\u4F34\u594F",path:"musicSheetAccompanimentList",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.mp3"}]},{default:()=>[t(X,{disabled:s.previewMode,size:30,fileList:s.musicSheetAccompanimentUrl,"onUpdate:fileList":[i=>s.musicSheetAccompanimentUrl=i,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6",max:1,desc:"\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6"},null)]}),e.isAllSubject&&e.musicSheetType=="SINGLE"&&t(P,{label:"\u4E0A\u4F20\u539F\u97F3",path:"musicSheetSoundList_all_subject",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20\u539F\u97F3",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u539F\u97F3",disabled:s.previewMode,size:30,max:1,fileList:e.musicSheetSoundList_all_subject,"onUpdate:fileList":[i=>e.musicSheetSoundList_all_subject=i,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u539F\u97F3",onRemove:()=>{}},null)]})]}),!!y.list.length&&t(fe,null,[t(ye,{showIcon:!1,type:"info"},{default:()=>[m("\u8BC6\u522B\u5230\u51711\u5904\u6E10\u53D8\u901F\u5EA6\uFF0C\u8BF7\u8F93\u5165Dorico\u5BF9\u5E94\u5C0F\u8282\u65F6\u95F4\u4FE1\u606F")]}),t(T,{label:"rit.",required:!0,style:{marginTop:"10px"}},{default:()=>[t(Q,{vertical:!0},Ze(r=y.list.map((i,n)=>t(we,null,{default:()=>[t(T,{path:`graduals.${i[0].measureIndex}`,rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u594F\u66F2\u76EE\u65F6\u95F4"},{pattern:/^((\d{2}):?){2,3}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u66F2\u76EE\u65F6\u95F4",trigger:"blur"}]},{default:()=>[t(we,null,{default:()=>[t(He,null,{default:()=>[i[0].measureIndex+1,m("\u5C0F\u8282\u5F00\u59CB")]}),t(ue,{placeholder:"00:00:00",value:e.graduals[i[0].measureIndex],"onUpdate:value":g=>e.graduals[i[0].measureIndex]=g},null)]})]}),t("div",{style:{lineHeight:"30px",padding:"0 4px"}},[m("~")]),t(T,{path:`graduals.${i[1].measureIndex}`,rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u594F\u66F2\u76EE\u65F6\u95F4"},{pattern:/^((\d{2}):?){2,3}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u66F2\u76EE\u65F6\u95F4",trigger:"blur"}]},{default:()=>[t(we,null,{default:()=>[t(ue,{placeholder:"00:00:00",value:e.graduals[i[1].measureIndex],"onUpdate:value":g=>e.graduals[i[1].measureIndex]=g},null),t(He,null,{default:()=>[i[1].measureIndex,m("\u5C0F\u8282\u7ED3\u675F")]})]})]})]})))?r:{default:()=>[r]})]})]),e.musicSheetType=="SINGLE"&&e.playMode==="MP3"&&!e.isAllSubject&&e.musicSheetSoundList_YZ.map((i,n)=>t(fe,null,[e.musicalInstrumentIdList.includes(i.musicalInstrumentId)&&t(_,{class:ae.audioSection},{default:()=>[t(P,{span:12,label:i.musicalInstrumentName,path:`musicSheetSoundList_YZ[${n}].audioFileUrl`,rule:[{required:!1,message:"\u8BF7\u4E0A\u4F20\u4E50\u5668\u6F14\u594F\u6587\u4EF6"}]},{default:()=>[t(X,{desc:"\u4E50\u5668\u6F14\u594F\u6587\u4EF6",disabled:s.previewMode,size:100,fileList:i.audioFileUrl,"onUpdate:fileList":[g=>i.audioFileUrl=g,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",text:"\u70B9\u51FB\u4E0A\u4F20MP3\u6587\u4EF6",bucketName:"cloud-coach"},null)]})]})])),e.musicSheetType=="CONCERT"&&e.playMode==="MP3"&&e.musicSheetSoundList_YY.length>0&&t(fe,null,[e.musicSheetSoundList_YY.map((i,n)=>{var g,N;return t(fe,null,[(!V(i.track)||((N=(g=i.track)==null?void 0:g.toLocaleUpperCase)==null?void 0:N.call(g))!="COMMON"&&e.multiTracksSelection.includes(i.track))&&t(_,{class:ae.audioSection},{default:()=>[t(P,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList_YY[${n}].audioFileUrl`,rule:[{required:!1,message:`\u8BF7\u4E0A\u4F20${i.track?i.track+"\u7684":"\u7B2C"+(n+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t(X,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:s.previewMode,size:100,fileList:i.audioFileUrl,"onUpdate:fileList":[j=>i.audioFileUrl=j,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach"},null)]}),s.partListNames.length>0&&t(P,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList_YY[${n}].track`,rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:i.track,options:A(i.track),onUpdateValue:j=>{const z=i.track;if(z){e.musicSheetSoundList_YY.forEach(L=>{L.track==j&&(L.track=z)});const E=e.multiTracksSelection.indexOf(i.track);e.multiTracksSelection.splice(E,1)}else e.musicSheetSoundList_YY=e.musicSheetSoundList_YY.filter(E=>E.track!=j);j!=null&&!e.multiTracksSelection.includes(j)&&e.multiTracksSelection.push(j),i.track=j,s.partListNames.length==e.multiTracksSelection.length&&(s.multiTracks="all")}},null)]}),t(P,{span:12,label:"\u4E94\u7EBF\u8C31PDF",path:`musicSheetSoundList_YY[${n}].musicPdfUrl`,rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E94\u7EBF\u8C31PDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u4E94\u7EBF\u8C31PDF",disabled:s.previewMode,size:30,max:1,fileList:i.musicPdfUrl,"onUpdate:fileList":j=>i.musicPdfUrl=j,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(P,{span:12,label:"\u9996\u8C03PDF",path:`musicSheetSoundList_YY[${n}].firstPdfUrl`,rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u9996\u8C03PDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u9996\u8C03PDF",disabled:s.previewMode,size:30,max:1,fileList:i.firstPdfUrl,"onUpdate:fileList":j=>i.firstPdfUrl=j,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(P,{span:12,label:"\u56FA\u5B9APDF",path:`musicSheetSoundList_YY[${n}].jianPdfUrl`,rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u56FA\u5B9APDF",trigger:["change","input"]}]},{default:()=>[t(X,{desc:"\u56FA\u5B9APDF",disabled:s.previewMode,size:30,max:1,fileList:i.jianPdfUrl,"onUpdate:fileList":j=>i.jianPdfUrl=j,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".pdf",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20PDF"},null)]}),t(C,{class:ae.btnRemove},{default:()=>[t(q,{type:"primary",text:!0,onClick:()=>ie(n)},{default:()=>[m("\u5220\u9664")]})]})]})])})]),t(ye,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u6F14\u5531\u6587\u4EF6")]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u662F\u5426\u64AD\u653E\u9884\u5907\u62CD",path:"isPlaySingBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u64AD\u653E\u9884\u5907\u62CD"}]},{default:()=>[t(W,{value:e.isPlaySingBeat,"onUpdate:value":i=>e.isPlaySingBeat=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]}),e.isPlaySingBeat&&t(P,{label:"\u64AD\u653E\u65B9\u5F0F",path:"isUseSingSystemBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(W,{value:e.isUseSingSystemBeat,"onUpdate:value":i=>e.isUseSingSystemBeat=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u7CFB\u7EDF\u9884\u5907\u62CD")]}),t(O,{value:!1},{default:()=>[m("MP3\u9884\u5907\u62CD")]})]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u91CD\u590D\u8282\u62CD\u65F6\u957F",path:"repeatedBeatsToSing",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F"}]},{default:()=>[t(W,{value:e.repeatedBeatsToSing,"onUpdate:value":i=>e.repeatedBeatsToSing=i},{default:()=>[t(O,{value:!0},{default:()=>[m("\u662F")]}),t(O,{value:!1},{default:()=>[m("\u5426")]})]})]})]}),t(_,{cols:2},{default:()=>[t(P,{label:"\u4E0A\u4F20\u4F34\u5531",path:"bSongFile",rule:[{required:!1}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u4F34\u5531",disabled:s.previewMode,size:30,fileList:s.bSongFile,"onUpdate:fileList":[i=>s.bSongFile=i,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u4F34\u5531\u6587\u4EF6"},null)]})]}),e.fSongList.length>0&&e.fSongList.map(i=>t(_,{class:ae.audioSection},{default:()=>[t(P,{span:12,label:i.track+"\u8303\u5531",path:i.audioFileUrl,rule:[{required:!1}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:s.previewMode,size:100,fileList:i.audioFileUrl,"onUpdate:fileList":[n=>i.audioFileUrl=n,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u8303\u5531\u6587\u4EF6"},null)]})]})),e.multiTracksSelection.length>1&&e.isScoreRender&&t(_,{cols:2,class:ae.audioSection},{default:()=>[t(P,{label:"\u603B\u8C31\u8303\u5531",path:"scoreRenderFile",rule:[{required:!1}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u603B\u8C31\u8303\u5531",disabled:s.previewMode,size:30,fileList:e.scoreAudioFileUrl,"onUpdate:fileList":[i=>e.scoreAudioFileUrl=i,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u603B\u8C31\u8303\u5531"},null)]})]}),e.fSongList.length>0&&e.fSongList.map(i=>t(_,{cols:2},{default:()=>[t(P,{label:i.track+"\u5531\u540D(\u7537)",path:i.solmizationFileUrl,rule:[{required:!1}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:s.previewMode,size:100,fileList:i.solmizationFileUrl,"onUpdate:fileList":[n=>i.solmizationFileUrl=n,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u5531\u540D\u6587\u4EF6"},null)]}),t(P,{label:i.track+"\u5531\u540D(\u5973)",path:i.femaleSolmizationFileUrl,rule:[{required:!1}]},{default:()=>[t(X,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:s.previewMode,size:100,fileList:i.femaleSolmizationFileUrl,"onUpdate:fileList":[n=>i.femaleSolmizationFileUrl=n,()=>{s.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u5531\u540D\u6587\u4EF6"},null)]})]}))]})]}),u.type!=="preview"&&t(Q,{justify:"end",style:"padding-top:12px"},{default:()=>[t(q,{type:"default",onClick:()=>a("close")},{default:()=>[m("\u53D6\u6D88")]}),t(q,{type:"primary",onClick:()=>d(),loading:h.value,disabled:h.value},{default:()=>[m("\u786E\u8BA4")]})]}),t(ce,{show:s.showMusicSheetOwnerDialog,"onUpdate:show":i=>s.showMusicSheetOwnerDialog=i,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(ca,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:s.appData,onClose:()=>{s.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:i=>{e.musicSheetExtend=G({},i),ve()}},null)]}),t(ce,{class:ae.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:s.productOpen,"onUpdate:show":i=>s.productOpen=i,preset:"dialog",closeOnEsc:!1,maskClosable:!1,onClose:()=>{s.isAutoSave=!1},showIcon:!1},{default:()=>[t(mt,{xmlFileUrl:e.xmlFileUrl||"",onClose:()=>s.productOpen=!1,onConfirm:i=>D(this,null,function*(){try{e.musicImg=i.musicImg,e.musicFirstImg=i.musicFirstImg,e.musicJianImg=i.musicJianImg,yield d()}catch(n){console.log(n,"e")}})},null)]}),k.beatTimeOpen&&t(ft,{id:k.musicId,onClose:i=>{k.beatTimeOpen=!1,!i&&(s.showUseProject=!0)}},null),t(ce,{blockScroll:!0,show:s.showUseProject,"onUpdate:show":i=>s.showUseProject=i,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"1200px"},onMaskClick:()=>{a("getList"),a("close"),setTimeout(()=>{h.value=!1,s.isAutoSave=!1},100)},onClose:()=>{a("getList"),a("close"),setTimeout(()=>{h.value=!1,s.isAutoSave=!1},100)}},{default:()=>[t(gt,{type:u.type,id:s.showUseProjectId,useProject:s.useProjectData,onClose:v},null)]})])}}}),ba="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAflBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////vroaSAAAAKXRSTlMA9IO3Uad0Cve/VuDZ1a6TGGZgLiwlDep67B2fOzIHxYt+FuTcukRqWYVSXmoAAAG3SURBVDjLvZXbloIwDEVbwFIUhBFFxft15vz/D05bCi3E4cFZyzzFsA0nJE3Z52wlJknKeZpMxGqcLIIMnmVB8SdaBRwD40H1mp2uzXMZ5pvFYpOH0vxcT1+xgXk2ieI2EEcTEwoIGs91PCz70TLU0Xk8gDXLI5LiIg1NNcyWpIoZQJVMNXsdoHViwLP+h1dltVYaSN6TRk8HtuTAuuqJIHrZFrj9aCfyhRQcCNkr+KvxQoAXXuJyDC691JnqBRuDmepOZueMKCawVt3MoABkr0eLx43fdwcPjiUg7Dt65S1PaEw6mIWt0gTIHXtwY+rBOZAYJwU2HXvMFJNdvnLegzdAahwVXniNt+8pUuV9d2UAnMI74N54ez0XPkxlPICddRUsfBm0wHlbCasVHPkF0k8nFPJsBaH2Px1tSi2VOlEfD3PYHK4ptN0CnW1XbNhuN0g7rg/ERVp2tmdsOEhuRGfgWuTSHCd+1tLIiNrhNwrS0gSe0f7YoXb4h8dKpZR7x/iKA3JgK0ULwtoDS1fBVByH7NWtArJkSF7NBqPry+nldn29vRjHV+77y3z8mvj/BUSvto/ZL9G9S97INuj8AAAAAElFTkSuQmCC",va="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAMCAMAAABRJ730AAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAV/jw7Ofd0MGkTj4vIhgPSYQHfQAAAE1JREFUGNOFzkcSgCAQBdE/5Az3P60KhgGr9C171dh50Rjh0VFb0FeGm6vDUC2vtuJUzFNNwS3rq+oMJslRZcIkiv4csQhHDnghpQg/Ni2rB1mZg3PWAAAAAElFTkSuQmCC",Ta=le({name:"musicPreView",props:{item:{type:Object,default:()=>{}},scoreType:{type:String,default:"staff"}},setup(u,{emit:I}){const a=it().getToken,e=H(""),s=H([]),y=H(void 0);xt(u.item.id).then(v=>{if(v.code===200){const{isAllSubject:w,musicSheetType:F,audioPlayTypes:R,musicalInstruments:V}=v.data;!w&&F==="SINGLE"&&R.includes("PLAY")&&(s.value=(V||[]).map(K=>({value:K.id,label:K.name}))),s.value.length?(y.value=s.value[0].value,d(y.value)):d()}});const k=Fe(()=>{var v;return(v=s.value.find(w=>w.value===y.value))==null?void 0:v.label}),h={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},x=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec.colexiu")?"online":"dev",B=h[x],S=/(localhost|192)/.test(location.host)?"https://test.kt.colexiu.com/":B;function d(v){let w=S+`/instrument/?_t=${Date.now()}&id=${u.item.id}&modelType=practise&modeType=json&Authorization=${a}&isCbs=true&isMove=1`;w+="&musicRenderType="+u.scoreType,v&&(w+=`&instrumentId=${v}`),e.value=w}return()=>t("div",{class:ae.musicPreView},[s.value.length>1&&t(Rt,{value:y.value,"onUpdate:value":[v=>y.value=v,d],options:s.value,scrollable:!0,size:"large",trigger:"click",class:"musicalInstrumentsListPop"},{default:()=>[t("div",{class:ae.musicList},[t("img",{class:ae.musicImg,src:ba},null),t("div",null,[k.value]),t("img",{class:ae.tipImg,src:va},null)])]}),e.value&&t("iframe",{width:"100%",height:"100%",frameborder:"0",src:e.value},null)])}}),Ia="_productModal_geqxn_1",ka="_productIframe_geqxn_9",xa="_musicPreviewModal_geqxn_14",Qe={productModal:Ia,productIframe:ka,musicPreviewModal:xa};function ke(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!ot(u)}const Fa=le({name:"music-list",props:["searchId","musicCategoryId"],setup(u,{emit:I}){const c=Ee(),a=de(),e=te({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,isScoreRender:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null,useAppId:[],status:null,appAuditFlag:null,categoriesId:null,musicCategoryId:null,musicalInstrumentId:null,dataCorrect:null,generateFirst:null,audioPlayTypes:null,generateMetronomeAudio:null},dataList:[],subjectList:[],instrumentList:[],tagList:[],visiableMusic:!1,musicOperation:"add",musicData:{},musicSheetCategories:[],musicPreview:!1,musicPreviewScoreType:"staff",musicScore:null,showUseProject:!1,useProjectData:[],showUseProjectId:null,detailReadonly:!1,userIdDisable:!0,userIdData:[],productOpen:!1,beatTimeOpen:!1,productItem:{}}),s=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",minWidth:"200px",key:"id",render(l){return t(Ie,{labelPlacement:"left",column:1},{default:()=>[t(se,{label:"\u540D\u79F0"},{default:()=>[t(be,{content:l.name},null)]}),t(se,{label:"\u7F16\u53F7"},{default:()=>[t("div",{onDblclick:()=>{$t(a,l.id)}},[t(be,{content:l.id},null)])]})]})}},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(l){return t(_t,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",minWidth:"200px",key:"composer",render(l){return t(Ie,{labelPlacement:"left",column:1},{default:()=>[t(se,{label:"\u97F3\u4E50\u4EBA"},{default:()=>[l.composer]}),t(se,{label:"\u603B\u8C31\u6E32\u67D3"},{default:()=>[l.isScoreRender?"\u652F\u6301":"\u4E0D\u652F\u6301"]}),t(se,{label:"\u5206\u7C7B"},{default:()=>[t(be,{content:l.musicCategoryName},null)]}),t(se,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[t(be,{content:l.subjectNames},null)]})]})}},{title:"\u4F5C\u8005\u5C5E\u6027",key:"sourceType",minWidth:"120px",render(l){let f,A;return t(Ie,{labelPlacement:"left",column:1},{default:()=>[t(se,{label:"\u5C5E\u6027"},ke(f=Jt(l.sourceType,new Map(Object.entries(Pe))))?f:{default:()=>[f]}),t(se,{label:"\u6240\u5C5E\u4EBA"},ke(A=Xt(l.musicSheetExtend,l.sourceType))?A:{default:()=>[A]})]})}},{title:"\u9002\u7528\u9879\u76EE",key:"projectName",render(l){return t(Q,null,{default:()=>[J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.showUseProject=!0,e.showUseProjectId=l.id}},{default:()=>[t(be,{content:l.musicSheetExtend&&l.musicSheetExtend.useApplicationNames?l.musicSheetExtend.useApplicationNames:""},null),t(Ot,{size:15,style:"padding-left: 9px"},{default:()=>[t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),t("path",{d:"M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z",fill:"currentColor"},null)])]})]}),[[$("auth"),"musicSheetApplicationExtend/save1752901206883221506"]])]})}},{title:"\u66F4\u65B0\u4FE1\u606F",minWidth:"250px",key:"updateBy",render(l){return t(Ie,{labelPlacement:"left",column:1},{default:()=>[t(se,{label:"\u66F4\u65B0\u4EBA"},{default:()=>[l.updateByName]}),t(se,{label:"\u66F4\u65B0\u65F6\u95F4"},{default:()=>[l.updateTime]})]})}},{title:"\u573A\u666F",key:"audioPlayTypes",render(l){let f;return t(Q,null,ke(f=l.audioPlayTypeArray.map(A=>{let Y;return t(Ve,{type:A==="SING"?"warning":"success"},ke(Y=Vt(A))?Y:{default:()=>[Y]})}))?f:{default:()=>[f]})}},{title:"\u5BA1\u6838\u7248\u672C",minWidth:"100px",key:"appAuditFlag",render(l){return t("div",null,[l.appAuditFlag?"\u662F":"\u5426"])}},{title:"\u72B6\u6001",minWidth:"50px",key:"status",render(l){return t(Ve,{type:l.status?"primary":"default"},{default:()=>[l.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",width:"300px",render(l){return t(Q,null,{default:()=>[t(qt,{trigger:"hover",options:[{label:"\u4E94\u7EBF\u8C31",key:"staff"},{label:"\u9996\u8C03",key:"firstTone"},{label:"\u56FA\u5B9A\u8C03",key:"fixedTone"}],onSelect:f=>{e.musicPreview=!0,e.musicScore=l,e.musicPreviewScoreType=f}},{default:()=>[t(q,{type:"primary",size:"small",text:!0,onClick:f=>f.stopPropagation()},{default:()=>[m("\u9884\u89C8")]})]}),J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=l,e.detailReadonly=!0}},{default:()=>[m("\u67E5\u770B")]}),[[$("auth"),"musicSheet/detail1751241103201271810"]]),J(t(q,{type:"primary",size:"small",text:!0,disabled:l.playMode==="MIDI",onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=l,e.detailReadonly=!0}},{default:()=>[m("\u4FEE\u6539")]}),[[$("auth"),"musicSheet/save1751241178962984962"]]),J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>k(l)},{default:()=>[l.status?"\u505C\u7528":"\u542F\u7528"]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]]),J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.productOpen=!0,e.productItem=l}},{default:()=>[m("\u751F\u6210\u56FE\u7247")]}),[[$("auth"),"musicSheet/img1751240591299051522"]]),l.isMixBeat&&J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.productItem=l,e.beatTimeOpen=!0}},{default:()=>[m("\u751F\u6210\u8282\u62CD\u5668\u97F3\u9891")]}),[[$("auth"),"musicSheet/addMix1819259767120539649"]]),J(t(q,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>B(l)},{default:()=>[m("\u5220\u9664")]}),[[$("auth"),"musicSheet/remove1753457445635645442"]])]})}}],y=H([]),k=l=>{const f=l.status?"\u505C\u7528":"\u542F\u7528";c.warning({title:"\u63D0\u793A",content:`\u662F\u5426${f}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>D(this,null,function*(){try{yield ze({ids:new Array(l.id),status:!l.status}),S(),a.success(`${f}\u6210\u529F`)}catch(A){}})})},h=l=>{const f=y.value.length;f==0&&a.warning("\u672A\u9009\u62E9\u6570\u636E");const A=l?"\u542F\u7528":"\u505C\u7528";c.warning({title:"\u63D0\u793A",content:`\u662F\u5426${A}`+f+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>D(this,null,function*(){try{yield ze({ids:y.value,status:l}),S(),a.success(`${A}\u6210\u529F`)}catch(Y){}})})},x=l=>D(this,null,function*(){if(!!e.searchForm.applicationId&&(e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:f}=yield at({page:1,rows:9999,sourceType:l,applicationId:e.searchForm.applicationId});(f.rows||[]).forEach(Y=>{e.userIdData.push(Z(G({},Y),{label:l==="PERSON"?Y.userName:Y.organizationRole,value:l==="PERSON"?Y.userId:Y.organizationRoleId}))})}}),B=l=>{c.warning({title:"\u63D0\u793A",content:`\u5220\u9664"${l.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>D(this,null,function*(){try{yield Ct({id:l.id}),S(),a.success("\u5220\u9664\u6210\u529F")}catch(f){}})})},S=()=>D(this,null,function*(){try{e.loading=!0;const f=e.searchForm.sourceType,A=e.searchForm.userId,Y=e.searchForm.audioPlayTypes,l=e.searchForm,{generateFirst:ie,musicCategoryId:Ce}=l,ve=Oe(l,["generateFirst","musicCategoryId"]);let p=Z(G({},ve),{useAppId:e.searchForm.useAppId?e.searchForm.useAppId.join(","):e.searchForm.useAppId,audioPlayTypes:[],musicCategoryId:Ce||ie});Y&&(Y==="PLAY_SING"?p.audioPlayTypes=["PLAY","SING"]:p.audioPlayTypes=[Y]),f&&f=="ORG"&&(p.organizationRoleId=A,p.userId=null);const{data:r}=yield Lt(G(G({},e.pagination),p));e.pagination.pageTotal=Number(r.total);const i=r.rows||[];i.forEach(n=>{n.audioPlayTypeArray=n.audioPlayTypes?n.audioPlayTypes.split(","):[]}),e.dataList=i}catch(f){}e.loading=!1}),d=()=>D(this,null,function*(){try{const{data:l}=yield Ne({});e.musicSheetCategories=l||[],v(e.musicSheetCategories)}catch(l){}}),v=l=>{for(let f=0;f<l.length;f++)l[f].musicSheetCategoriesList.length<1?l[f].musicSheetCategoriesList=null:v(l[f].musicSheetCategoriesList)},w=()=>D(this,null,function*(){try{const{data:l}=yield ct({page:1,rows:999}),f=l.rows||[];f.forEach(A=>{A.label=A.name,A.value=A.id+""}),e.subjectList=f}catch(l){}}),F=()=>D(this,null,function*(){try{const{data:l}=yield Ae({page:1,rows:999}),f=l.rows||[];f.forEach(A=>{A.label=A.name,A.value=A.id+""}),e.instrumentList=f}catch(l){}}),R=()=>D(this,null,function*(){try{const l=Object.keys(nt),{data:f}=yield dt({page:1,rows:999,hiddenFlag:!0}),A=f.rows||[];e.useProjectData=[],A.filter(ie=>l.includes(ie.appKey)).forEach(ie=>{e.useProjectData.push(Z(G({},ie),{label:ie.appName,value:ie.id}))})}catch(l){}}),V=H(),K=()=>{e.pagination.page=1,S()};rt(()=>u.searchId,l=>{console.log(l,"searchId")});const o=()=>{var l;y.value=[],(l=V.value)==null||l.submit()},b=()=>{var l;(l=V.value)==null||l.reset()};return pe(()=>D(this,null,function*(){e.loading=!0,u.searchId&&(e.searchForm.categoriesId=u.searchId||null),u.musicCategoryId&&(e.searchForm.musicCategoryId=u.musicCategoryId||null),w(),F(),R(),d(),S()})),()=>t("div",{class:"system-menu-container"},[t(et,{ref:V,model:e.searchForm,onSubmit:K,saveKey:"music-list",onSetModel:l=>e.searchForm=l},{default:()=>[t(T,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(ue,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":l=>e.searchForm.keyword=l,clearable:!0},null)]}),t(T,{label:"\u603B\u8C31\u6E32\u67D3",path:"isScoreRender"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u603B\u8C31\u6E32\u67D3",value:e.searchForm.isScoreRender,"onUpdate:value":l=>e.searchForm.isScoreRender=l,filterable:!0,options:[{label:"\u652F\u6301",value:!0},{label:"\u4E0D\u652F\u6301",value:!1}],clearable:!0},null)]}),t(T,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId"},{default:()=>[t(Be,{filterable:!0,valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:e.searchForm.musicCategoryId,"onUpdate:value":l=>e.searchForm.musicCategoryId=l,options:e.musicSheetCategories,clearable:!0},null)]}),t(T,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":l=>e.searchForm.subjectId=l,options:e.subjectList,filterable:!0,clearable:!0},null)]}),t(T,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",filterable:!0,value:e.searchForm.musicalInstrumentId,"onUpdate:value":l=>e.searchForm.musicalInstrumentId=l,options:e.instrumentList,clearable:!0},null)]}),t(T,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(ue,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":l=>e.searchForm.composer=l,clearable:!0},null)]}),t(T,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",filterable:!0,value:e.searchForm.sourceType,"onUpdate:value":l=>e.searchForm.sourceType=l,options:ne(Pe),onUpdateValue:l=>D(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM"?(yield x(l),e.userIdDisable=!e.searchForm.applicationId):e.userIdDisable=!0}),clearable:!0},null)]}),t(T,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":l=>e.searchForm.applicationId=l,options:e.useProjectData,clearable:!0,filterable:!0,onUpdateValue:l=>D(this,null,function*(){e.searchForm.applicationId=l,l?(yield x(e.searchForm.sourceType),e.userIdDisable=!(e.searchForm.sourceType&&e.searchForm.sourceType!=="PLATFORM")):(e.searchForm.userId=null,e.userIdDisable=!0,e.userIdData=[])})},null)]}),t(T,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{label:()=>t("div",null,[m("\u6240\u5C5E\u4EBA")]),default:()=>t(M,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:e.userIdDisable||!e.searchForm.applicationId&&!e.searchForm.sourceType,value:e.searchForm.userId,"onUpdate:value":l=>e.searchForm.userId=l,options:e.userIdData,clearable:!0},null)}),t(T,{label:"\u9002\u7528\u9879\u76EE",path:"useAppId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.useAppId,"onUpdate:value":l=>e.searchForm.useAppId=l,options:e.useProjectData,multiple:!0,filterable:!0,maxTagCount:1},null)]}),t(T,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(M,{value:e.searchForm.status,"onUpdate:value":l=>e.searchForm.status=l,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:!0,filterable:!0,options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}]},null)]}),t(T,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag"},{default:()=>[t(M,{value:e.searchForm.appAuditFlag,"onUpdate:value":l=>e.searchForm.appAuditFlag=l,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",clearable:!0,filterable:!0,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(T,{label:"\u573A\u666F",path:"audioPlayTypes"},{default:()=>[t(M,{value:e.searchForm.audioPlayTypes,"onUpdate:value":l=>e.searchForm.audioPlayTypes=l,placeholder:"\u8BF7\u9009\u62E9\u573A\u666F",filterable:!0,options:Ht,clearable:!0},null)]}),J(t(T,{label:"\u56FE\u7247\u4FEE\u590D",path:"dataCorrect"},{default:()=>[t(M,{value:e.searchForm.dataCorrect,"onUpdate:value":l=>e.searchForm.dataCorrect=l,placeholder:"\u8BF7\u9009\u62E9\u56FE\u7247\u4FEE\u590D",clearable:!0,filterable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]}),[[$("auth"),"music-list/search/data1836581471828160514"]]),J(t(T,{label:"\u8282\u62CD\u5668\u4FEE\u590D",path:"generateMetronomeAudio"},{default:()=>[t(M,{value:e.searchForm.generateMetronomeAudio,"onUpdate:value":l=>e.searchForm.generateMetronomeAudio=l,placeholder:"\u8BF7\u9009\u62E9\u8282\u62CD\u5668\u4FEE\u590D",clearable:!0,filterable:!0,options:[{label:"\u5DF2\u751F\u6210",value:!0},{label:"\u672A\u751F\u6210",value:!1}]},null)]}),[[$("auth"),"music-list/search/data1836581471828160514"]]),J(t(T,{label:"\u4FEE\u590D\u6570\u636E\u5206\u7C7B",path:"generateFirst"},{default:()=>[t(oe,{showButton:!1,placeholder:"\u8BF7\u8F93\u5165\u4FEE\u590D\u6570\u636E\u5206\u7C7B",clearable:!0,value:e.searchForm.generateFirst,"onUpdate:value":l=>e.searchForm.generateFirst=l},null)]}),[[$("auth"),"music-list/search/data1836581471828160514"]]),t(T,null,{default:()=>[t(Q,null,{default:()=>[t(q,{type:"primary",onClick:o},{default:()=>[m("\u641C\u7D22")]}),t(q,{type:"default",onClick:b},{default:()=>[m("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(Q,{style:{paddingBottom:"12px"}},{default:()=>[J(t(q,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[m("\u65B0\u589E\u66F2\u76EE")]}),[[$("auth"),"musicSheet/save1751241178962984962"]]),J(t(q,{disabled:y.value.length==0,onClick:()=>{h(!1)}},{default:()=>[m("\u6279\u91CF\u505C\u7528")]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]]),J(t(q,{disabled:y.value.length==0,onClick:()=>{h(!0)}},{default:()=>[m("\u6279\u91CF\u542F\u7528")]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]])]}),t(Le,{loading:e.loading,columns:s(),data:e.dataList,rowKey:l=>l.id,checkedRowKeys:y.value,"onUpdate:checkedRowKeys":l=>y.value=l,scrollX:"1200"},null),t(tt,{page:e.pagination.page,"onUpdate:page":l=>e.pagination.page=l,pageSize:e.pagination.rows,"onUpdate:pageSize":l=>e.pagination.rows=l,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":l=>e.pagination.pageTotal=l,onList:S,sync:!0,saveKey:"music-list"},null)]),t(ce,{show:e.visiableMusic,"onUpdate:show":l=>e.visiableMusic=l,preset:"dialog",showIcon:!1,maskClosable:!1,title:()=>e.musicOperation==="add"?"\u6DFB\u52A0\u66F2\u76EE":e.musicOperation==="preview"?"\u66F2\u76EE\u8BE6\u60C5":"\u4FEE\u6539\u66F2\u76EE",style:{width:"980px"}},{default:()=>[t(Sa,{type:e.musicOperation,data:e.musicData,subjectList:e.subjectList,onClose:()=>e.visiableMusic=!1,onGetList:S},null)]}),t(ce,{blockScroll:!0,show:e.musicPreview,"onUpdate:show":l=>e.musicPreview=l,preset:"card",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",class:Qe.musicPreviewModal,"mask-closable":!1},{default:()=>[t(Ta,{item:e.musicScore,scoreType:e.musicPreviewScoreType},null)]}),t(ce,{blockScroll:!0,show:e.showUseProject,"onUpdate:show":l=>e.showUseProject=l,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"1200px"}},{default:()=>[t(gt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:S},null)]}),t(ce,{class:Qe.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:e.productOpen,"onUpdate:show":l=>e.productOpen=l,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(mt,{xmlFileUrl:e.productItem.xmlFileUrl,onClose:()=>e.productOpen=!1,onConfirm:l=>D(this,null,function*(){try{yield Ft(Z(G({},l),{id:e.productItem.id}))}catch(f){}})},null)]}),e.beatTimeOpen&&t(ft,{id:e.productItem.id,onClose:()=>{e.beatTimeOpen=!1}},null)])}}),La="_instrumentSave_1gfcu_1",Ca="_updateFile_1gfcu_5",wa={instrumentSave:La,updateFile:Ca},Ua=le({emits:["close","getList"],props:["activeRow","saveMode","list"],name:"save-categroy-dialog",setup(u,{emit:I}){const c=de(),a=H(),e=H([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...pt(u.list,"musicSheetCategoriesList")]),s=te({loading:!1,dataList:[],btnLoading:!1,options:{enlarge:2,autoCropWidth:350,autoCropHeight:140},messageTip:"\u8BF7\u4E0A\u4F20\u5C3A\u5BF8\u4E3A700*280\u5927\u5C0F5M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247"}),y=te({id:"",name:"",coverImg:"",enable:!0,parentId:"0"}),k=()=>D(this,null,function*(){var h;(h=a.value)==null||h.validate(x=>D(this,null,function*(){if(!x){s.btnLoading=!0;try{if(u.saveMode==="add"){const{data:B}=yield wt(G({},y));I("getList"),c.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:B}=yield Ut(G({},y));I("getList"),c.success("\u4FEE\u6539\u6210\u529F")}}catch(B){}s.btnLoading=!1}}))});return pe(()=>{if(u.saveMode==="add")u.activeRow&&u.activeRow.id&&(y.parentId=(u==null?void 0:u.activeRow.id)+"");else{for(let h in u==null?void 0:u.activeRow)y[h]=u==null?void 0:u.activeRow[h];(u==null?void 0:u.activeRow.currentLevel)>1&&(s.options.autoCropWidth=210,s.options.autoCropHeight=268,s.messageTip="\u8BF7\u4E0A\u4F20\u5C3A\u5BF8\u4E3A210*268\u5927\u5C0F5M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247")}}),()=>t("div",null,[t(Me,{ref:a,model:y},{default:()=>[u.saveMode==="add"&&u.activeRow&&t(T,{label:"\u7236\u7EA7\u5206\u7C7B",path:"parentId"},{default:()=>[t(Be,{placeholder:"\u8BF7\u9009\u62E9\u7236\u7EA7\u5206\u7C7B",value:y.parentId,"onUpdate:value":h=>y.parentId=h,options:e.value,checkStrategy:"all",expandTrigger:"hover",childrenField:"musicSheetCategoriesList",valueField:"id",labelField:"name",disabled:!0},null)]}),t(T,{label:"\u5206\u7C7B\u540D\u79F0",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",trigger:["blur","input"]}],path:"name"},{default:()=>[t(ue,{value:y.name,"onUpdate:value":h=>y.name=h,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]}),t(T,{label:"\u5C01\u9762\u56FE",path:"coverImg",rule:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE",trigger:["input","blur"]}]},{default:()=>[t(X,{fileList:y.coverImg,"onUpdate:fileList":h=>y.coverImg=h,accept:".jpg,.jpeg,.png",cropper:!0,size:5,class:wa.updateFile,bucketName:"news-info",options:s.options,tips:s.messageTip},null)]})]}),t(Q,{justify:"end"},{default:()=>[t(q,{type:"default",onClick:()=>I("close")},{default:()=>[m("\u53D6\u6D88")]}),t(q,{type:"primary",onClick:()=>k(),loading:s.btnLoading,disabled:s.btnLoading},{default:()=>[m("\u786E\u8BA4")]})]})])}}),Pa=le({emits:["setTabName","jump"],name:"music-category",setup(u,{slots:I,attrs:c,emit:a}){const e=te({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),s=Ee(),y=de(),k=()=>D(this,null,function*(){try{e.loading=!0;const d={page:e.pagination.page,rows:e.pagination.rows},{data:v}=yield Ne(d);e.dataList=v||[]}catch(d){}e.loading=!1});pe(()=>{k()});const h=d=>{a("jump",d)},x=()=>[{title:"\u5206\u7C7B\u540D\u79F0",key:"id",render(d){return d.name+"("+d.id+")"}},{title:"\u66F2\u76EE\u6570\u91CF",key:"musicSheetNum",render(d){return t("div",null,[t(q,{type:"primary",size:"small",text:!0,onClick:()=>{h({tabName:"MusicList",musicCategoryId:d.id})}},{default:()=>[d.musicSheetNum]})])}},{title:"\u6700\u540E\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(d){return t(Q,null,{default:()=>[J(t(q,{type:"error",size:"small",text:!0,onClick:()=>S(d)},{default:()=>[m("\u5220\u9664")]}),[[$("auth"),"musicSheetCategories/remove1751239397398806530"]]),J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=d,e.saveMode="edit",e.showSaveDialog=!0}},{default:()=>[m("\u4FEE\u6539")]}),[[$("auth"),"musicSheetCategories/update1751239533856292866"]]),d.currentLevel<4&&J(t(q,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=d,e.showSaveDialog=!0,e.saveMode="add"}},{default:()=>[m("\u6DFB\u52A0\u5B50\u5206\u7C7B")]}),[[$("auth"),"musicSheetCategories/save1751239479284203521"]])]})}}],B=()=>{e.pagination.page=1,k()},S=d=>D(this,null,function*(){s.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+d.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>D(this,null,function*(){(yield Pt(d.id)).data&&(B(),y.success("\u5220\u9664\u6210\u529F"))})})});return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"]},[t(Q,{style:{paddingBottom:"12px"}},{default:()=>[J(t(q,{type:"primary",onClick:()=>{e.saveMode="add",e.showSaveDialog=!0,e.saveRowData=null}},{default:()=>[m("\u65B0\u589E\u5206\u7C7B")]}),[[$("auth"),"musicSheetCategories/save1751239479284203521"]])]}),t(Le,{loading:e.loading,columns:x(),data:e.dataList,rowKey:d=>d.id,childrenKey:"musicSheetCategoriesList"},null)]),t(ce,{show:e.showSaveDialog,"onUpdate:show":d=>e.showSaveDialog=d,preset:"dialog",showIcon:!1,title:e.saveRowData?"\u4FEE\u6539\u5206\u7C7B":"\u65B0\u589E\u5206\u7C7B",style:{width:"600px"}},{default:()=>[t(Ua,{onGetList:()=>{e.showSaveDialog=!1,k()},onClose:()=>{e.showSaveDialog=!1},list:e.dataList,saveMode:e.saveMode,activeRow:e.saveRowData},null)]})])}}),ul=le({name:"music-sheet",setup(){const u=te({tabName:"MusicList",searchId:null,musicCategoryId:null}),I=Yt();Zt(e=>{e.form.tabName&&(u.tabName=e.form.tabName)});const c=e=>{console.log("setTabName",e),u.tabName=e.tabName,u.searchId=e.id},a=e=>{Wt(e,"tabName",I)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(zt,{type:"line",size:"large",value:u.tabName,"onUpdate:value":[e=>u.tabName=e,e=>a(e)]},{default:()=>[J(t(Je,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Fa,{searchId:u.searchId,musicCategoryId:u.musicCategoryId},null)]}),[[$("auth"),"musicSheet/page1751238894313013249"]]),J(t(Je,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B"},{default:()=>[t(Pa,{onSetTabName:c,onJump:e=>{u.tabName=e.tabName,u.musicCategoryId=e.musicCategoryId}},null)]}),[[$("auth"),"musicSheetCategories/queryTree1751238805699952641"]])]})])])}});export{ul as default};
