1import{bv as C,bA as b,bf as y,a$ as k,by as d,aM as s,aS as i,aN as l,aR as g,aO as _,aY as o,aU as h,bD as a,bE as m,aT as D,b8 as v,bF as B,bB as $}from"./v2.5-BMcaV3uw.js";import{d as r}from"./v2.5-EOH6kKMT.js";import{T as L}from"./v2.5-DWISQF8l.js";import{B as z}from"./v2.5-BiI7n_B2.js";import{B as M}from"./v2.5-D9iPzYsL.js";import"./v2.5-BRJEEl2u.js";import"./v2.5-B7N6t0J0.js";import"./v2.5-DkGqg5mS.js";import"./v2.5-oTGtRQ8F.js";import"./v2.5-BQYU8Zrc.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7660947b-b2f1-486e-96bc-faa0958bd4e1",e._sentryDebugIdIdentifier="sentry-dbid-7660947b-b2f1-486e-96bc-faa0958bd4e1")}catch{}const S=C({name:"GoodsItem",components:{BasePicture:M,BHLink:z,TheContent:L},provide(){return{eventCategory:()=>"ÐнÑÑÑеннÑÑ",eventAction:()=>"ТоваÑнÑй блок_ÐнеÑний пеÑÐµÑ Ð¾Ð´"}},inject:{eventCategory:{default(){return()=>""}}},props:{elem:{type:Object,required:!0}},data:()=>({isDescriptionCollapsed:!1,styleContent:null,descriptionHeightMobile:160,$description:null,descriptionEl:null}),computed:{goods(){return this.elem.attributes},title(){return this.goods.title?.trim()||null},price(){return this.goods.price?.toString().trim()||null},goodsLink(){return this.goods.button_link||this.goods.link||""},goodsContent(){return this.elem.children},isGoodsButton(){return!!(this.goods.button_text?.trim()&&this.goodsLink)},descriptionContentClass(){return{"goods-item__description-content--collapse":this.isDescriptionCollapsed}},descriptionContentStyle(){return r.isMobile?{height:this.isDescriptionCollapsed?`${this.descriptionHeightMobile}px`:"auto"}:null},image(){return this.goods.image},sizes(){return this.image?.sizes||[]},fullSizeUrl(){return this.image?.origin||""},currentSlug(){return b((this._.provides[y]||this.$route).fullPath)}},mounted(){const e=this.$refs.descriptionContent,t=this.$refs.description;this.descriptionEl=r.isMobile?e:t,r.isMobile&&this.getDescriptionCollapsedMobile()},methods:{onClickMore(){this.expand(),this.sendAnalytics("РазвеÑнÑÑÑ")},onClickBuy(){this.sendAnalytics("ÐÑпиÑÑ")},sendAnalytics(e){},expand(){this.styleContent={height:"auto"},this.isDescriptionCollapsed=!1},async getDescriptionCollapsedMobile(){this.descriptionEl&&(this.isDescriptionCollapsed=!0,await this.$nextTick(),this.isDescriptionCollapsed=this.isCollapsedContent(this.descriptionEl))},async getDescriptionCollapsed(){this.descriptionEl&&(r.isMobile||(this.isDescriptionCollapsed=!0,await this.$nextTick(),this.isDescriptionCollapsed=this.isCollapsedContent(this.descriptionEl)))},isCollapsedContent(e){const{clientHeight:t,scrollHeight:p}=e;return t<p},onImgLoad(){if(r.isMobile)return;const e=this.$refs.image.$el,t=this.$refs.content;this.styleContent={height:t.offsetHeight>e.offsetHeight?`${e.offsetHeight}px`:"auto"},this.getDescriptionCollapsed()}}},"$QnWdqGMx0x"),I={class:"goods-item"},E={key:0,class:"goods-item__image-container"},H={key:0,class:"goods-item__title"},T={key:1,class:"goods-item__price"},w={key:2,ref:"description",class:"goods-item__description"},A={key:0,class:"goods-item__description-shadow"};function N(e,t,p,G,P,U){const c=d("BasePicture"),u=d("BHLink"),f=d("TheContent");return s(),i("div",I,[e.goods.image?(s(),i("div",E,[e.goodsLink?(s(),l(u,{key:0,href:e.goodsLink,target:"_blank"},{default:g(()=>[_(c,{ref:"image",class:"goods-item__picture",alt:e.image?.alt||"",sizes:e.sizes,origin:e.fullSizeUrl,onLoad:e.onImgLoad},null,8,["alt","sizes","origin","onLoad"])]),_:1},8,["href"])):(s(),l(c,{key:1,ref:"image",class:"goods-item__picture",fullsize:e.fullSizeUrl,sizes:e.sizes,onLoad:e.onImgLoad},null,8,["fullsize","sizes","onLoad"]))])):o("",!0),h("div",{ref:"content",class:"goods-item__content",style:m(e.styleContent)},[e.title?(s(),i("div",H,a(e.title),1)):o("",!0),e.price?(s(),i("div",T,a(e.price),1)):o("",!0),e.goodsContent.length?(s(),i("div",w,[h("div",{ref:"descriptionContent",class:D(["goods-item__description-content",e.descriptionContentClass]),style:m(e.descriptionContentStyle)},[(s(!0),i(v,null,B(e.goodsContent,n=>(s(),l(f,{key:n.id,elem:n},null,8,["elem"]))),128))],6),e.isDescriptionCollapsed?(s(),i("div",A)):o("",!0)],512)):o("",!0),e.isDescriptionCollapsed&&e.goodsContent.length?(s(),i("button",{key:3,class:"goods-item__description-collapse",onClick:t[0]||(t[0]=(...n)=>e.onClickMore&&e.onClickMore(...n))}," ÐоказаÑÑ ÐµÑÑ ")):o("",!0),e.isGoodsButton?(s(),l(u,{key:4,class:"goods-item__button",href:e.goodsLink,target:"_blank",onClick:t[1]||(t[1]=n=>e.onClickBuy())},{default:g(()=>[$(a(e.goods.button_text),1)]),_:1},8,["href"])):o("",!0)],4)])}const K=k(S,[["render",N],["__scopeId","data-v-9de96a92"]]);export{K as default}; 2//# sourceMappingURL=v2.5-DjcYFzJL.js.map
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.