1 |
- System.register(["./index-legacy-6e648d0e.js","./instrument-legacy-1f80c924.js","./vue3-lottie.es-legacy-2c257324.js","./index-legacy-b6cd144b.js","./index-legacy-705f8991.js","./index-legacy-30333ce6.js"],(function(e,t){"use strict";var i,n,s,o,a,r,d,l,c,u,p,g,h=document.createElement("style");return h.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(h),{setters:[e=>{i=e.d,n=e.E,s=e.U,o=e.by,a=e.K,r=e.S,d=e.an,l=e.j,c=e.aI,u=e.A,p=e.ap},e=>{g=e.s},null,null,null,null],execute:function(){const t="_detail_vtlsh_12",h="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i="productRenderType",m=s({isLoading:!0,isProductLoading:!1,step:0,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});a((()=>{window.appName="colexiu",r.xmlUrl=e.xmlUrl,sessionStorage.setItem(i,m.product[m.step].type),d({message:"生成中",duration:0}),setTimeout((()=>{m.isLoading=!1}),500)}));const v=async()=>{var e;m.product[m.step].state=!0,m.product[m.step].base64=await y();try{console.log(JSON.parse(JSON.stringify(m.product)),m.step)}catch(t){}if(m.step+=1,m.step!==m.product.length)return sessionStorage.setItem(i,m.product[m.step].type),void u((()=>{m.isLoading=!0,setTimeout((()=>{m.isLoading=!1}),500)}));p(),console.log(m.product),null===(e=window.parent)||void 0===e||e.postMessage({api:"webApi_renderSvg",product:JSON.stringify(m.product)},"*")},y=()=>new Promise((e=>{setTimeout((async()=>{try{var t;const i=null===(t=document.getElementById("osmdSvgPage1"))||void 0===t?void 0:t.cloneNode(!0);if(!i)return void e("");const n=i.width.animVal.value,s=i.height.animVal.value,o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("width",""+2*n),o.setAttribute("height",""+2*s),o.setAttribute("fill","#fff"),i.prepend(o);const a=g(i.outerHTML).toDataURL("image/png",1);e(a)}catch(i){e("")}}),500)}));return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[h,"hideCursor"]},[!m.isLoading&&l(c,{renderTypeKey:i,showSelection:!1,onRendered:v},null)])])}}))}}}));
|