!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.77fd7daf.js","./header-legacy.bf087270.js","./music-legacy.3bc332f8.js","./hooks-legacy.eeb437e3.js","./index-legacy.5fb6b8d3.js","./index-legacy.778a953c.js","./index-legacy.586e7b6f.js","./index-legacy.c6503c7a.js","./index-legacy.d57a9644.js","./index-legacy.78f6e587.js","./use-id-legacy.4a1010a1.js","./use-tab-status-legacy.f1ce0ec9.js","./use-refs-legacy.1266fefa.js","./index-legacy.4fc826f4.js","./index-legacy.2393a936.js","./index-legacy.571708b1.js","./index-legacy.be62956a.js","./index-legacy.33c6b81d.js","./index-legacy.3aa427b0.js","./index-legacy.6e10cd37.js","./select-subject-legacy.12eccd86.js","./index-legacy.140ee8f4.js","./index-legacy.6d038ac6.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.16d6e7da.js"],(function(n){"use strict";var a,t,c,u,i,s,o,r,l,f,d,v,g,y,m,h,j,p;return{setters:[function(e){a=e.d,t=e.O,c=e.P,u=e.S,i=e.Q,s=e.U,o=e.bC,r=e.j,l=e.be,f=e.C,d=e.w},function(e){v=e.m,g=e.s},function(e){y=e.g},function(e){m=e.a,h=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",y());var n=t(),a=c(),x=u(n.query.keyword||""),b=u(),w=m(h.SEARCH);b.value=w.id;var S=function(e){x.value=e,C.value&&(C.value.rows=[]),k.name=e,k.page=1,E()},k=i({name:n.query.search||"",rows:20,page:1}),C=u(null),N=u(!1),P=u(!1),q=u(!1),E=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,d.post("/api-student/music/sheet/searchTenant",{data:k});case 7:n=e.sent,C.value&&(t=((null===(a=C.value)||void 0===a?void 0:a.rows)||[]).concat(n.data.music.rows||[]),C.value.rows=t),C.value=C.value||n.data.music,(c=C.value.rows||[]).forEach((function(e){x.value&&(e.musicSheetName=e.musicSheetName.replace(x.value,'<span style="color: #FE2451">'.concat(x.value,"</span>")))})),C.value.rows=c,k.page=n.data.music.pageNo+1,P.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(){v.on("search",S),E()})),o((function(){v.off("search",S)})),function(){return r("div",{class:[g.search,g.searchAlbum]},[C.value&&C.value.rows.length?r(j,{finished:P.value,"finished-text":(C.value&&C.value.rows.length,""),onLoad:E,error:q.value,immediateCheck:!1},{default:function(){return[r(p,{showTitleImg:!0,list:C.value.rows,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;l(n,(function(){a.push({path:"/music-detail",query:{id:e.id}})}))}},null)]}}):!N.value&&r(f,{tips:"暂无曲目",btnStatus:!1},null)])}}}))}}}))}();
