1"use strict";(self["webpackChunkredgalaxy_portal_fo"]=self["webpackChunkredgalaxy_portal_fo"]||[]).push([[330],{56007:(e,n,t)=>{t.r(n),t.d(n,{default:()=>E});var r=t(49497),u=t(48534),a=(t(26699),t(32023),t(57658),t(66252)),c=t(49963),o=t(3577),i=t(2262),l=t(22201),s=t(51239),f=t(82427),v=t(49091),b=t(9508),p=t(72947),_=t(78025),d=t(37012),T=["aria-label","onKeydown"];const A={__name:"index",props:{product:{type:Object,required:!0}},setup:function(e){var n=e,t=(0,l.yj)(),A=(0,l.tv)(),y=(0,a.f3)("translate"),E=f.Z.resolve(s.UW.CONFIGURATION),O=f.Z.resolve(s.UW.FAVOURITES),R=E.get(b.XL.yT),I=(0,v.Qb)(),F=I.isSubscriberFetchedRef,U=I.isSubscriberLoggedRef,h=I.isSubscriberLoginEnabledRef,k=(0,i.iH)(!1),g=(0,i.iH)(!1),w=(0,a.Fl)((function(){return y(k.value?b.Wb.ARIA_LABEL_REMOVE_FAVOURITE:b.Wb.ARIA_LABEL_ADD_FAVOURITE)})),C=(0,a.Fl)((function(){return b.gT.WATCHABLE_PRODUCT_TYPES.includes(n.product.type)&&R&&F.value&&h.value})),D=(0,a.Fl)((function(){return[k.value?"icon-favourite-full":"icon-favourite",g.value&&"pending"]})),L=(0,a.Fl)((function(){return(0,d.R7)(y(k.value?b.Wb.TOOLTIP_REMOVE_FAVOURITE:b.Wb.TOOLTIP_ADD_FAVOURITE))})),x=function(){var e=(0,u.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(U.value){e.next=2;break}return e.abrupt("return",A.push({name:_.ar,query:{redirect:t.fullPath}}));case 2:if(g.value=!0,!k.value){e.next=8;break}return e.next=6,O.remove(n.product,{sync:!0})["catch"]((function(){}));case 6:e.next=11;break;case 8:return e.next=10,O.create(n.product,{sync:!0})["catch"]((function(){}));case 10:p.Z.emit(p.Z.EventType.ACTION,p.Z.EventType.ADDED_TO_FAVOURITES);case 11:g.value=!1;case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){k.value=!!O.get(n.product.id)&&U.value};return O.on(b.Us.SYNC,S),(0,a.YP)((function(){return n.product}),S),(0,a.bv)(S),(0,a.Jd)((function(){return O.off(b.Us.SYNC,S)})),function(e,n){var t=(0,a.Q2)("tooltip");return C.value?(0,a.wy)(((0,a.wg)(),(0,a.iD)("button",{key:0,"aria-label":w.value,class:"button button--secondary",onKeydown:(0,c.D2)(x,["enter"]),onClick:x},[(0,a._)("i",{class:(0,o.C_)([D.value,"button__icon button__icon--always-visible"])},null,2)],40,T)),[[t,L.value]]):(0,a.kq)("",!0)}}},y=A,E=y}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.