1import{e as s,b9 as C,G as w,l as I,cK as O,d as B,eA as $,aE as j,aF as A,eB as E,aj as F,a as i,b as r,f as e,a8 as S,p as c,t as v,F as b,L as _,c as y,w as x,a9 as N,s as k,b4 as T,eC as z,aS as V,a2 as U,v as D,U as K}from"./index-DcSVvNrM.js";function M(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!O(a)}const p=({image:a,label:u,price:o,profit:d,warningLabel:n,disabled:f},{slots:l,emit:h})=>{var g;return s("div",{class:["gift-grid-item",{"gift-grid-item--disabled":f,"gift-grid-item--with-icon":l.default!==void 0}],onClick:m=>h("select",m)},[d&&s("div",{class:"gift-grid-item__profit"},[d]),s("div",{class:"gift-grid-item__image"},[a&&s(C,w(a,{size:72}),null),!a&&((g=l.default)==null?void 0:g.call(l))]),s("div",{class:"gift-grid-item__label"},[s("div",{class:"gift-grid-item__label-text"},[u]),n&&s("div",{class:"gift-grid-item__label-warning"},[n])]),s(I,{size:"s",rounded:!0,isLoading:!o,disabled:f},M(o)?o:{default:()=>[o]})])},W={class:"gifts-landing"},q={key:0},H={class:"gifts-grid"},J={key:1},Q={class:"gifts-grid"},R=B({__name:"GiftsLanding",props:{user:{},source:{},context:{}},setup(a){const u=a,{isCollectiblesGiftingEnabled:o}=U(),{gifts:d}={gifts:{isLoadedInitial:!1,items:[]}},{t:n}=$(),{purchaseOptions:f}=j(),{proceedToGift:l}=A(),{proceedToGiftPurchase:h}=E(),{isMe:g}=F(),m=D(()=>!g(u.user.id));return(X,Y)=>{var G;return i(),r("div",W,[m.value?(i(),r("section",q,[s(e(S),{class:"gifts-landing__avatar",source:a.user.avatar,size:90},null,8,["source"]),c("h2",null,v(e(n)("gifts.giftPlus")),1),c("p",null,v(e(n)("gifts.forName",{name:a.user.name})),1),c("div",H,[((G=e(f))==null?void 0:G.gift)!==void 0?(i(!0),r(b,{key:0},_(e(f).gift,(t,P)=>(i(),y(e(p),{key:t.value,label:t.label,price:t.monthPrice,profit:t.profit,onSelect:Z=>{var L;return(L=e(l))==null?void 0:L(a.user,{source:a.source,period:t.value})}},{default:x(()=>[s(e(N),{size:60,"animation-delay":P*300},null,8,["animation-delay"])]),_:2},1032,["label","price","profit","onSelect"]))),128)):(i(),r(b,{key:1},_(3,t=>s(e(p),{key:`plus-item-placeholder:${t}`,disabled:!0},{default:x(()=>[s(e(N),{size:60,"animation-delay":t*300},null,8,["animation-delay"])]),_:2},1024)),64))])])):k("",!0),e(o)?(i(),r("section",J,[m.value?k("",!0):(i(),y(e(S),{key:0,class:"gifts-landing__avatar",source:a.user.avatar,size:90},null,8,["source"])),c("h2",null,v(e(n)("gifts.sendGift")),1),c("p",null,v(e(n)("gifts.forName",{name:a.user.name})),1),c("div",Q,[e(d).isLoadedInitial?(i(!0),r(b,{key:0},_(e(d).items,t=>(i(),y(e(p),{key:t.code,image:e(V)({uuid:t.previewUuid,color:"transparent",size:72}),label:e(n)("common.countOfTotal",{count:e(z)(t.counters.current,{short:!0}),total:e(z)(t.counters.total,{short:!0})}),warningLabel:t.counters.current===0?e(n)("common.soldOut"):void 0,price:e(T)(t.price),disabled:t.counters.current===0,onSelect:P=>e(h)(t,{user:u.user,context:u.context})},null,8,["image","label","warningLabel","price","disabled","onSelect"]))),128)):(i(),r(b,{key:1},_(6,t=>s(e(p),{key:`gift-item-placeholder:${t}`,disabled:!0})),64))])])):k("",!0)])}}}),te=K(R,[["__scopeId","data-v-02b4994b"]]);export{te as default};
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.