!function(){var e=["musicSheet"];function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){s(i,r,a,o,c,"next",e)}function c(e){s(i,r,a,o,c,"throw",e)}o(void 0)}))}}var u=document.createElement("style");u.innerHTML=":root{--van-dialog-has-title-message-text-color: var(--van-gray-4) !important;--van-dialog-message-font-size: .42667rem !important;--van-dialog-confirm-button-text-color: #2dc7aa !important;--van-button-default-font-size: .37333rem !important}._musicSheet_19i2y_7{padding-top:0!important;padding-bottom:1.06667rem!important;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important;height:-webkit-fill-available;background:#fff!important;background-color:#fff!important;box-shadow:none!important}._musicSheet_19i2y_7 img{display:none!important}._btnWraper_19i2y_21{position:fixed;bottom:.53333rem;z-index:9;width:100%;padding:.26667rem 0;text-align:center}._btn_19i2y_21{width:6.48rem;height:1.17333rem;background:linear-gradient(180deg,#59e5d5 0%,#2dc7aa 100%);box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25);border-radius:.74667rem;font-size:.48rem}._btn_19i2y_21 ._btnCont_19i2y_37{height:auto;padding:0;background-color:transparent;border:none}._popup_19i2y_43 .plyr{min-width:auto}._popup_19i2y_43 .plyr__poster{background-image:url(./videobg.png)!important;background-size:cover!important}._share_19i2y_50{width:9.46667rem;height:1.65333rem;margin:auto;display:flex;background:url(/orchestra-music-score/assets/bg.f214a841.svg) no-repeat center;background-size:contain;margin-top:.21333rem;align-items:center;justify-content:space-between;position:fixed;top:0;z-index:999;margin-left:50%;transform:translate(-50%)}._share_19i2y_50 ._avatar_19i2y_66{width:1.06667rem;height:1.06667rem;margin:0 .34667rem}._share_19i2y_50 ._mate_19i2y_71{display:flex;align-items:center;margin-left:.48rem;margin-right:.42667rem;justify-content:space-between;flex:1}._share_19i2y_50 ._info_19i2y_79{color:#ff7100;font-size:.42667rem;width:2.66667rem}._share_19i2y_50 ._info_19i2y_79>span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;display:block}._share_19i2y_50 ._info_19i2y_79>span:last-child{font-size:.37333rem}._share_19i2y_50 ._topbtn_19i2y_94{width:3.89333rem;height:.85333rem;background:linear-gradient(180deg,#ffc000 0%,#ff6c00 100%);border-radius:.42667rem;color:#fff;font-size:.34667rem}._fullimg_19i2y_102 img{display:block!important}html,body{background-color:#fff!important}\n",document.head.appendChild(u),System.register(["./App-legacy.a7c1546c.js","./lib-flexible-legacy.e8ca3d6a.js","./index-legacy.f25f109a.js","./wx_bg-legacy.dbd1cf29.js","./index-legacy.12c4fb79.js"],(function(){"use strict";var n,r,i,s,u,l,p,d,m,f,g,v,y,h,b,_,w,x,k,S,O,I,T,j,A,P,R,D,M,C,U,z;return{setters:[function(e){n=e.b,r=e.u,i=e.r,s=e.d,u=e.w,l=e.a,p=e.g,d=e.B,m=e.i,f=e.S,g=e.E,v=e.F,y=e.M,h=e.P,b=e.o,_=e.l,w=e.a3,x=e.a4,k=e.a5,S=e.H,O=e.Z,I=e.T,T=e.q,j=e.v,A=e.x,P=e.y,R=e.f,D=e.$,M=e.D,C=e.c},function(){},function(){},function(e){U=e.w},function(e){z=e.I}],execute:function(){var B="_musicSheet_19i2y_7",N="_btnWraper_19i2y_21",E="_btn_19i2y_21",F="_share_19i2y_50",L="_avatar_19i2y_66",V="_mate_19i2y_71",W="_info_19i2y_79",q="_topbtn_19i2y_94",H="_fullimg_19i2y_102",K=n(),J=r(),$=i(0),X=function(){if(K.isApp){if(K.isTeacher)return void w.alert({message:"请使用酷乐秀学生端扫码打开"}).then((function(){S({api:"back"})}));var e=sessionStorage.getItem("behaviorId")||""+(new Date).valueOf(),t=O.stringifyUrl({url:location.origin+"/orchestra-music-score",query:{id:J.id,behaviorId:e,client:K.isTeacher?"teacher":"student",recomUserId:J.userType&&"STUDENT"==J.userType?"":J.recomUserId,activityId:J.activityId||"0",discounts:$.value}});S({api:"openAccompanyWebView",content:{url:t,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}else{var n=location.origin+"/student/#/share-music-sheet",r={url:n+="?recomUserId=".concat(J.userType&&"STUDENT"==J.userType?"":J.recomUserId,"&id=").concat(J.id,"&activityId=").concat(J.activityId||"0"),action:J.action||"h5",pageTag:J.pageTag||1},a=encodeURIComponent(JSON.stringify(r));/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href="ColexiuStudent://linkUrl=".concat(a):/(Android)/i.test(navigator.userAgent)?(r.url=encodeURIComponent(r.url),window.location.href="colexiustudent://html:8888/SplashActivity?url=".concat(encodeURIComponent(JSON.stringify(r)))):I("请用手机或移动设备打开")}},Z=function(){var e=c(regeneratorRuntime.mark((function e(t,n){var r,a,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(t);case 2:return r=e.sent,a=i(""),o=j(r),a.value=A(o.parsedXML,{title:n.musicSheetName}),s=Number(J["part-index"])||0,a.value=P(a.value,s),e.abrupt("return",a);case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),G=s({name:"Colexiu",setup:function(){var n=i(!1),r=i(!0),s=i(!1),S=i(""),O=i(""),I=function(t){var n=i("loading"),r=i({}),s=i({}),u=i(!1);return b(c(regeneratorRuntime.mark((function t(){var i,c,l,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return J.activityId&&_.post("/open/activity/state/"+J.activityId,{prefix:"/api-teacher"}).then((function(e){$.value=e.data.check,u.value=!!e.data.check,u.value||w.alert({message:"优惠活动已结束,您将按原价购买"})})).catch((function(){})),n.value="loading",t.prev=2,t.next=5,_.post("/open/musicShareProfit",{prefix:x(),requestType:"json",data:{bizId:J.id,userId:J.recomUserId}});case 5:i=t.sent,c=i.data,l=c.musicSheet,p=o(c,e),r.value=a({},l),s.value=p,n.value="success",t.next=16;break;case 12:t.prev=12,t.t0=t.catch(2),n.value="error",console.log(t.t0);case 16:case"end":return t.stop()}}),t,null,[[2,12]])})))),[n,r,s,u]}(J.id),j=t(I,4),A=j[0],P=j[1],R=j[2],D=j[3];u(A,c(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("success"!==A.value||!P.value.xmlFileUrl){e.next=11;break}if(!P.value.musicImg){e.next=7;break}return r.value=!1,e.next=5,k(P.value.musicImg+"?_t="+(new Date).valueOf());case 5:return O.value=e.sent,e.abrupt("return");case 7:return e.next=9,Z(P.value.xmlFileUrl,P.value);case 9:t=e.sent,S.value=t.value;case 11:case"end":return e.stop()}}),e)}))));var M=function(e){var t=e.Drawer.Backends[0],n=Math.max(t.width,t.height),r=5*Math.floor(n/240),a=5*Math.floor(n/200),i=t.CanvasRenderingCtx;i.font="50px 宋体",i.fillStyle="rgba(0,0,0,.1)",i.rotate(-30*Math.PI/180);for(var o=0;o