!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.bb3fc8a7.js","./header-legacy.63a2ca57.js","./music-legacy.264baa5c.js","./hooks-legacy.4ded6f98.js","./index-legacy.149f3f64.js","./index-legacy.733f979a.js","./index-legacy.1838cb67.js","./index-legacy.4ffb1bc3.js","./index-legacy.80ef726b.js","./index-legacy.9d80b290.js","./use-id-legacy.dfefd685.js","./use-tab-status-legacy.3bc0fa08.js","./use-refs-legacy.5e8345f3.js","./index-legacy.27e1d0fd.js","./index-legacy.b5d1f27c.js","./index-legacy.571708b1.js","./index-legacy.b8f5f1f3.js","./index-legacy.67c7d1bf.js","./index-legacy.8785c82f.js","./index-legacy.6e10cd37.js","./select-subject-legacy.f6d7abc8.js","./index-legacy.980e36ce.js","./index-legacy.42480338.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.f3ef216d.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.P,c=e.Q,u=e.U,i=e.S,s=e.V,o=e.bi,r=e.j,l=e.bg,f=e.C,d=e.y},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(){}],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,R()},I=i({name:n.query.search||"",rows:20,page:1}),k=u(null),A=u(!1),N=u(!1),P=u(!1),R=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),R()})),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:R,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)])}}}))}}}))}();
