!function(){function e(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,a){if(!e)return;if("string"==typeof e)return n(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,a)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,t=new Array(n);a0&&i(c,null,[i(h,{titleClass:A.pTitle,title:"最近练习",border:!1},null),i("div",{class:A.practice},[i(y,{showTitleImg:!0,list:n,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;s(n,(function(){t.push({path:"/music-detail",query:{id:e.id}})}))}},null)])])])}}}),G=a({name:"MusicList",emits:["favorite"],props:{gift:{type:Number,default:0}},setup:function(n,a){var c=a.expose,g=(a.emit,p()),m=r(),b=v({search:g.query.search||"",musicTagIds:g.query.tagids||"",gift:n.gift,page:1}),_=u(null),h=u([]),C=u(!1),w=u(!1),S=u(!1),T=function(){var n=t(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!C.value){n.next=2;break}return n.abrupt("return");case 2:return C.value=!0,S.value=!1,n.prev=4,n.next=7,o("/music/sheet/my",{method:"TEACHER"===l.platformType?"POST":"GET",prefix:"TEACHER"===l.platformType?"/api-teacher":"/api-student",params:b,data:"TEACHER"===l.platformType?b:{}});case 7:a=n.sent,h.value=[].concat(e(h.value),e(a.data.rows)),_.value=a.data,b.page=a.data.pageNo+1,w.value=a.data.pageNo>=a.data.totalPage,n.next=17;break;case 14:n.prev=14,n.t0=n.catch(4),S.value=!0;case 17:C.value=!1;case 18:case"end":return n.stop()}}),n,null,[[4,14]])})));return function(){return n.apply(this,arguments)}}();return d((function(){return n.gift}),(function(e){S.value=!1,h.value=[],b.page=1,w.value=!1,b.gift=e,T()})),c({reset:function(){S.value=!1,h.value=[],b.page=1,w.value=!1,T()},FetchList:T}),function(){return i(x,{loading:C.value,finished:w.value,"finished-text":h.value.length?"没有更多了":"",onLoad:T,error:S.value},{default:function(){return[h.value.length?i("div",{class:A.personalSong},[i(y,{showTitleImg:!0,list:h.value,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;s(n,(function(){m.push({path:"/music-detail",query:{id:e.id}})}))}},null)]):!C.value&&i(f,{tips:"暂无单曲",classImgSize:"SMALL",btnStatus:!1},null)]}})}}}),R=a({name:"MusicList",emits:["favorite"],setup:function(n,a){var c=a.expose,d=(a.emit,p()),g=r(),m=v({search:d.query.search||"",musicTagIds:d.query.tagids||"",page:1}),b=u([]),_=u(null),h=u(!1),C=u(!1),w=u(!1),S=function(){var n=t(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!h.value){n.next=2;break}return n.abrupt("return");case 2:return h.value=!0,w.value=!1,n.prev=4,n.next=7,o("/music/sheet/favorite",{prefix:"TEACHER"===l.platformType?"/api-teacher":"/api-student",params:m});case 7:a=n.sent,b.value=[].concat(e(b.value),e(a.data.rows)),_.value=a.data,m.page=a.data.pageNo+1,C.value=a.data.pageNo>=a.data.totalPage,n.next=17;break;case 14:n.prev=14,n.t0=n.catch(4),w.value=!0;case 17:h.value=!1;case 18:case"end":return n.stop()}}),n,null,[[4,14]])})));return function(){return n.apply(this,arguments)}}();return c({reset:function(){w.value=!1,b.value=[],m.page=1,C.value=!1,S()},FetchList:S}),function(){return i(x,{loading:h.value,finished:C.value,"finished-text":b.value.length?"没有更多了":"",onLoad:S,error:w.value},{default:function(){return[b.value.length?i("div",{class:A.personalSong},[i(y,{showTitleImg:!0,list:b.value,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;s(n,(function(){g.push({path:"/music-detail",query:{id:e.id}})}))}},null)]):!h.value&&i(f,{tips:"暂无收藏单曲",classImgSize:"SMALL",btnStatus:!1},null)]}})}}}),z=a({name:"MusicList",setup:function(){var n=p(),a=r(),c=v({search:n.query.search||"",musicTagIds:n.query.tagids||"",page:1}),s=u([]),d=u(null),g=u(!1),m=u(!1),b=u(!1),_=function(){var n=t(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!g.value){n.next=2;break}return n.abrupt("return");case 2:return g.value=!0,b.value=!1,n.prev=4,n.next=7,o("/music/album/favorite",{prefix:"TEACHER"===l.platformType?"/api-teacher":"/api-student",params:c});case 7:a=n.sent,s.value=[].concat(e(s.value),e(a.data.rows)),d.value=a.data,c.page=a.data.pageNo+1,m.value=a.data.pageNo>=a.data.totalPage,n.next=17;break;case 14:n.prev=14,n.t0=n.catch(4),b.value=!0;case 17:g.value=!1;case 18:case"end":return n.stop()}}),n,null,[[4,14]])})));return function(){return n.apply(this,arguments)}}();return function(){return i(x,{loading:g.value,finished:m.value,"finished-text":s.value.length?"没有更多了":"",onLoad:_,error:b.value},{default:function(){return[s.value.length?i("div",{class:A.musicGrid},[i(C,{list:d.value.rows,onGoto:function(e){a.push({name:"music-album-detail",params:{id:e.id}})}},null)]):!g.value&&i(f,{tips:"暂无收藏专辑",classImgSize:"SMALL",btnStatus:!1},null)]}})}}}),N=a({name:"MusicList",props:{gift:{type:Number,default:0}},setup:function(n){p();var a=r(),c=v({page:1,gift:n.gift}),s=u([]),g=u(null),m=u(!1),b=u(!1),_=u(!1),h=function(){var n=t(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!m.value){n.next=2;break}return n.abrupt("return");case 2:return m.value=!0,_.value=!1,n.prev=4,n.next=7,o("/music/album/purchased",{prefix:"TEACHER"===l.platformType?"/api-teacher":"/api-student",params:c});case 7:a=n.sent,s.value=[].concat(e(s.value),e(a.data.rows)),g.value=a.data,c.page=a.data.pageNo+1,b.value=a.data.pageNo>=a.data.totalPage,n.next=17;break;case 14:n.prev=14,n.t0=n.catch(4),_.value=!0;case 17:m.value=!1;case 18:case"end":return n.stop()}}),n,null,[[4,14]])})));return function(){return n.apply(this,arguments)}}();return d((function(){return n.gift}),(function(e){_.value=!1,s.value=[],c.page=1,b.value=!1,c.gift=e,h()})),function(){return i(x,{loading:m.value,finished:b.value,"finished-text":s.value.length?"没有更多了":"",onLoad:h,error:_.value},{default:function(){return[s.value.length?i("div",{class:A.musicGrid},[i(C,{isHiddenTag:!0,list:g.value.rows,onGoto:function(e){a.push({name:"music-album-detail",params:{id:e.id}})}},null)]):!m.value&&i(f,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)]}})}}}),M=a({name:"tenant-album",setup:function(){var n=r(),a=v({page:1,rows:20}),c=u([]),s=u(null),p=u(!1),d=u(!1),g=u(!1),m=function(){var n=t(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!p.value){n.next=2;break}return n.abrupt("return");case 2:return p.value=!0,g.value=!1,n.prev=4,n.next=7,o.post("/userTenantAlbumRecord/page",{prefix:"TEACHER"===l.platformType?"/api-teacher":"/api-student",data:a});case 7:t=n.sent,c.value=[].concat(e(c.value),e(t.data.rows)),s.value=t.data,console.log(s.value),a.page=t.data.pageNo+1,d.value=t.data.pageNo>=t.data.totalPage,n.next=18;break;case 15:n.prev=15,n.t0=n.catch(4),g.value=!0;case 18:p.value=!1;case 19:case"end":return n.stop()}}),n,null,[[4,15]])})));return function(){return n.apply(this,arguments)}}();return function(){return i(x,{loading:p.value,finished:d.value,"finished-text":c.value.length?" ":"",onLoad:m,error:g.value},{default:function(){return[c.value.length?c.value.map((function(e){return i(L,{class:A.tennatCellGroup,border:!1,onClick:function(){return function(e){n.push({path:"/train-tool",query:{albumId:e.id,buy:"1"}})}(e)}},{default:function(){return[i(h,{isLink:!0,clickable:!1},{icon:function(){return i("img",{src:e.tenantImg,class:A.tenantLogo},null)},title:function(){return i("div",{class:A.tenantName},[e.tenantName])}}),i(h,null,{icon:function(){return i(j,{src:e.coverImg,class:A.tenantCoverImg},null)},title:function(){return i("div",{class:A.tenantContent},[i("h2",null,[e.name]),i("p",{class:"van-multi-ellipsis--l2"},[e.describe])])}})]}})})):!p.value&&i(f,{tips:"暂无训练教程",classImgSize:"SMALL",btnStatus:!1},null)]}})}}});n("default",a({name:"MusicPersonal",setup:function(){localStorage.setItem("behaviorId",S());var e=sessionStorage.getItem("music-personal-tab-value");sessionStorage.removeItem("music-personal-tab-value");var n=u(e||"train-course");sessionStorage.setItem("music-personal-tab-value",n.value);var a=u(),t=u(),r=u();return g((function(){T("我的乐谱")})),function(){return i("div",{class:A.personal},[i(I,{position:"top"},{default:function(){return[i(k,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null)]}}),i("img",{class:A.bgImg,src:w},null),i(E,{ref:r,onFavorite:function(){var e,r;if("personal"===n.value)null===(e=a.value)||void 0===e||null===(r=e.reset)||void 0===r||r.call(e);else if("collection"===n.value){var u,o;null===(u=t.value)||void 0===u||null===(o=u.reset)||void 0===o||o.call(u)}}},null),i(m,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,active:n.value,"onUpdate:active":function(e){return n.value=e},onChange:function(e){n.value=e,sessionStorage.setItem("music-personal-tab-value",e)}},{default:function(){return[i(b,{title:"训练教程",name:"train-course"},null),i(b,{title:"我的单曲",name:"personal"},null),i(b,{title:"我的专辑",name:"personal-album"},null),i(b,{title:"收藏单曲",name:"collection"},null),i(b,{title:"收藏专辑",name:"album"},null)]}}),"train-course"===n.value&&i(M,null,null),("personal"===n.value||"personal-gift"===n.value)&&i(G,{ref:a,gift:"personal-gift"===n.value?1:0,onFavorite:function(){var e,n;null===(e=r.value)||void 0===e||null===(n=e.reload)||void 0===n||n.call(e)}},null),("personal-album"===n.value||"album-gift"===n.value)&&i(N,{gift:"album-gift"===n.value?1:0},null),"collection"===n.value&&i(R,{ref:t,onFavorite:function(){var e,n;null===(e=r.value)||void 0===e||null===(n=e.reload)||void 0===n||n.call(e)}},null),"album"===n.value&&i(z,null,null)])}}}))}}}))}();