!function(){function e(e,n,a,t,c,u,i){try{var s=e[u](i),o=s.value}catch(r){return void a(r)}s.done?n(o):Promise.resolve(o).then(t,c)}System.register(["./index-legacy.2562bdba.js","./header-legacy.d6366bac.js","./music-legacy.1d776e5e.js","./hooks-legacy.4a4d2e12.js","./index-legacy.e6740abe.js","./index-legacy.06cb19e1.js","./index-legacy.6018f988.js","./index-legacy.b85658dd.js","./index-legacy.b550cfe2.js","./index-legacy.2eb6777c.js","./use-id-legacy.d6f0d8ea.js","./use-tab-status-legacy.f4341042.js","./use-refs-legacy.7602bd51.js","./index-legacy.9e545f10.js","./index-legacy.af0efc4c.js","./index-legacy.571708b1.js","./index-legacy.c90df848.js","./index-legacy.5831e2a1.js","./index-legacy.1f1e6dc3.js","./index-legacy.da89f2f1.js","./index-legacy.6e10cd37.js","./select-subject-legacy.bcf8059d.js","./index-legacy.71094bb0.js","./index-legacy.83ebfae8.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.523bef85.js"],(function(n){"use strict";var a,t,c,u,i,s,o,r,l,f,d,v,g,y,m,h,b,j;return{setters:[function(e){a=e.d,t=e.O,c=e.P,u=e.S,i=e.Q,s=e.U,o=e.bD,r=e.j,l=e.bf,f=e.C,d=e.x},function(e){v=e.m,g=e.s},function(e){y=e.g},function(e){m=e.a,h=e.S},function(e){b=e.L},function(e){j=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){n("default",a({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",y());var n=t(),a=c(),p=u(n.query.keyword||""),x=u(),w=m(h.SEARCH);x.value=w.id;var S=function(e){p.value=e,k.value&&(k.value.rows=[]),I.name=e,I.page=1,q()},I=i({name:n.query.search||"",rows:20,page:1}),k=u(null),A=u(!1),N=u(!1),P=u(!1),q=function(){var n,a=(n=regeneratorRuntime.mark((function e(){var n,a,t,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A.value){e.next=2;break}return e.abrupt("return");case 2:return A.value=!0,P.value=!1,e.prev=4,e.next=7,d.post("/api-student/music/sheet/searchTenant",{data:I});case 7:n=e.sent,k.value&&(t=((null===(a=k.value)||void 0===a?void 0:a.rows)||[]).concat(n.data.music.rows||[]),k.value.rows=t),k.value=k.value||n.data.music,(c=k.value.rows||[]).forEach((function(e){p.value&&(e.musicSheetName=e.musicSheetName.replace(p.value,'<span style="color: #FE2451">'.concat(p.value,"</span>")))})),k.value.rows=c,I.page=n.data.music.pageNo+1,N.value=n.data.music.pageNo>=n.data.music.totalPage,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(4),P.value=!0;case 20:A.value=!1;case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var a=this,t=arguments;return new Promise((function(c,u){var i=n.apply(a,t);function s(n){e(i,c,u,s,o,"next",n)}function o(n){e(i,c,u,s,o,"throw",n)}s(void 0)}))});return function(){return a.apply(this,arguments)}}();return s((function(){v.on("search",S),q()})),o((function(){v.off("search",S)})),function(){return r("div",{class:[g.search,g.searchAlbum]},[k.value&&k.value.rows.length?r(b,{finished:N.value,"finished-text":(k.value&&k.value.rows.length,""),onLoad:q,error:P.value,immediateCheck:!1},{default:function(){return[r(j,{showTitleImg:!0,list:k.value.rows,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id+"&tenantAlbumId="+e.tenantAlbumId+"&type=search";l(n,(function(){a.push({path:"/music-detail",query:{id:e.id,tenantAlbumId:e.tenantAlbumId,type:"search"}})}))}},null)]}}):!A.value&&r(f,{tips:"暂无曲目",btnStatus:!1},null)])}}}))}}}))}();
