!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(["./ResizeObserver.es-legacy.5b47f92b.js","./header-legacy.225388cb.js","./music-legacy.710ef876.js","./hooks-legacy.8425e14f.js","./index-legacy.d82effde.js","./index-legacy.55b0810a.js","./index-legacy.239a53d5.js","./index-legacy.baada8e3.js","./index-legacy.3c9ddca0.js","./index-legacy.9245a6f9.js","./use-id-legacy.06255fee.js","./use-tab-status-legacy.3c2ae760.js","./use-refs-legacy.4d303b22.js","./index-legacy.b3ddbc7e.js","./index-legacy.81d1573d.js","./index-legacy.571708b1.js","./index-legacy.c3464ae8.js","./index-legacy.4ffeb408.js","./index-legacy.40a7d43e.js","./index-legacy.6e10cd37.js","./select-subject-legacy.39877122.js","./index-legacy.ab1c8461.js","./index-legacy.5dda57aa.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.933dc860.js"],(function(n){"use strict";var a,t,c,u,i,s,o,r,l,d,f,v,g,y,m,h,b,j,p;return{setters:[function(e){a=e.d,t=e.Q,c=e.S,u=e.V,i=e.U,s=e.W,o=e.bk,r=e.j,l=e.A,d=e.bf,f=e.C,v=e.y},function(e){g=e.m,y=e.s},function(e){m=e.g},function(e){h=e.b,b=e.S},function(e){j=e.L},function(e){p=e.S},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",m());var n=t(),a=c(),x=u(n.query.keyword||""),w=u(),S=h(b.SEARCH);w.value=S.id;var k=function(e){x.value=e,I.value&&(I.value.rows=[]),A.name=e,A.page=1,C()},A=i({name:n.query.search||"",rows:20,page:1}),I=u(null),N=u(!1),R=u(!1),q=u(!1),C=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(!N.value){e.next=2;break}return e.abrupt("return");case 2:return N.value=!0,q.value=!1,e.prev=4,e.next=7,v.post("/api-student/music/sheet/searchTenant",{data:A});case 7:n=e.sent,I.value&&(t=((null===(a=I.value)||void 0===a?void 0:a.rows)||[]).concat(n.data.music.rows||[]),I.value.rows=t),I.value=I.value||n.data.music,(c=I.value.rows||[]).forEach((function(e){x.value&&(e.musicSheetName=e.musicSheetName.replace(x.value,'<span style="color: #FE2451">'.concat(x.value,"</span>")))})),I.value.rows=c,A.page=n.data.music.pageNo+1,R.value=n.data.music.pageNo>=n.data.music.totalPage,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(4),q.value=!0;case 20:N.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(){g.on("search",k),C()})),o((function(){g.off("search",k)})),function(){return r("div",{class:[y.search,y.searchAlbum]},[I.value&&I.value.rows.length?r(j,{finished:R.value,"finished-text":(I.value&&I.value.rows.length,""),onLoad:C,error:q.value,immediateCheck:!1},{default:function(){return[r(p,{showTitleImg:!0,list:I.value.rows,onDetail:function(e){var n=l()+location.pathname+"#/music-detail?id="+e.id+"&tenantAlbumId="+e.tenantAlbumId+"&type=search";d(n,(function(){a.push({path:"/music-detail",query:{id:e.id,tenantAlbumId:e.tenantAlbumId,type:"search"}})}))}},null)]}}):!N.value&&r(f,{tips:"暂无曲目",btnStatus:!1},null)])}}}))}}}))}();
