1import{B as e,It as t,L as n,Nt as r,b as i,d as a,f as o,p as s,r as c,u as l,v as u}from"./lGFqJZKe.js";import{t as d}from"./BDNMzG2s.js";import{m as f,n as p,t as m}from"./Cbm9Eovo.js";import{n as h,t as g}from"./CNqcqr43.js";import{t as _}from"./BlXB0xSO.js";var v={name:`TestimonialSlider`,props:{testimonials:{type:Array,required:!0},section_id:{type:String,default:`testimonial-slider`}},computed:{hasNothingBelow(){if(this.testimonials.length===0)return!0;let e=this.testimonials[0];return!e.quote_credit&&!e.quote_credit_description&&!(e.cta&&e.cta.url)}},components:{PrimaryButton:_,CarouselArrow:f},watch:{testimonials:{handler(){this.$nextTick(()=>{this.testimonials.length>1&&this.initSwiper()})},deep:!0}},mounted(){this.testimonials.length>1&&this.initSwiper(),window.addEventListener(`resize`,this.handleResize)},beforeUnmount(){window.removeEventListener(`resize`,this.handleResize),this.swiper&&typeof this.swiper.destroy==`function`&&this.swiper.destroy(!0,!0)},methods:{handleResize(){this.testimonials.length>1?this.initSwiper():this.swiper&&typeof this.swiper.destroy==`function`&&(this.swiper.destroy(!0,!0),this.swiper=null)},initSwiper(){this.swiper&&typeof this.swiper.destroy==`function`&&this.swiper.destroy(!0,!0);let e=m(this.$el,`.`+this.section_id);e&&(this.swiper=new p(e,{modules:[h,g],slidesPerView:1,spaceBetween:32,autoHeight:!0,loop:!1,grabCursor:!0,pagination:{el:e.querySelector(`.swiper-pagination`),clickable:!0},navigation:{nextEl:this.$el.querySelector(`.swiper-button-next`),prevEl:this.$el.querySelector(`.swiper-button-prev`)}}))}}},y={class:`testimonial-slider`},b={class:`inner`},x={class:`swiper-wrapper`},S={class:`container`},C={key:0,class:`testimonial-image`},w=[`src`,`alt`],T={class:`testimonial-content`},E={key:0,class:`testimonial-title`},D={key:1,class:`testimonial-credit-desc`},O={key:3,class:`testimonial-cta`},k={key:1},A={class:`testimonial-slide`},j={class:`container`},M={key:0,class:`testimonial-image`},N=[`src`,`alt`],P={class:`testimonial-content`},F={key:0,class:`testimonial-title`},I={key:1,class:`testimonial-credit-desc`},L={key:0,class:`swiper-next-prev`};function R(i,d,p,m,h,g){let v=_,R=f;return n(),s(`div`,y,[l(`div`,b,[p.testimonials.length>1?(n(),s(`div`,{key:0,class:r([`swiper`,p.section_id])},[l(`div`,x,[(n(!0),s(c,null,e(p.testimonials,(e,i)=>(n(),s(`div`,{key:i,class:r([`swiper-slide testimonial-slide`,{"no-image":!e.image}])},[l(`div`,S,[l(`div`,{class:r([`testimonial-inner`,{"has-image":e.image}])},[e.image?(n(),s(`div`,C,[l(`img`,{src:e.image.url,alt:e.title||`Testimonial image`},null,8,w)])):o(``,!0),l(`div`,T,[e.title?(n(),s(`h2`,E,t(e.title),1)):o(``,!0),e.quote?(n(),s(`blockquote`,{key:1,class:r([`testimonial-quote`,{"nothing-below":!e.quote_credit&&!e.quote_credit_description&&!(e.cta&&e.cta.url)}])},` "`+t(e.quote)+`" `,3)):o(``,!0),e.quote_credit||e.quote_credit_description?(n(),s(`div`,{key:2,class:r([`testimonial-credit`,{"no-description":!e.quote_credit_description}])},[e.quote_credit?(n(),s(`div`,{key:0,class:r([`testimonial-credit-name`,{"no-description":!e.quote_credit_description}])},t(e.quote_credit),3)):o(``,!0),e.quote_credit_description?(n(),s(`div`,D,t(e.quote_credit_description),1)):o(``,!0)],2)):o(``,!0),e.cta&&e.cta.url?(n(),s(`div`,O,[e.cta&&e.cta.url?(n(),a(v,{key:0,link:e.cta},null,8,[`link`])):o(``,!0)])):o(``,!0)])],2)])],2))),128))]),d[0]||=l(`div`,{class:`swiper-pagination`},null,-1)],2)):p.testimonials.length===1?(n(),s(`div`,k,[l(`div`,A,[l(`div`,j,[l(`div`,{class:r([`testimonial-inner`,{"has-image":p.testimonials[0].image}])},[p.testimonials[0].image?(n(),s(`div`,M,[l(`img`,{src:p.testimonials[0].image.url,alt:p.testimonials[0].title||`Testimonial image`},null,8,N)])):o(``,!0),l(`div`,P,[p.testimonials[0].title?(n(),s(`h2`,F,t(p.testimonials[0].title),1)):o(``,!0),l(`blockquote`,{class:r([`testimonial-quote`,{"nothing-below":g.hasNothingBelow}])},` "`+t(p.testimonials[0].quote)+`" `,3),p.testimonials[0].quote_credit||p.testimonials[0].quote_credit_description?(n(),s(`div`,{key:1,class:r([`testimonial-credit`,{"no-description":!p.testimonials[0].quote_credit_description}])},[p.testimonials[0].quote_credit?(n(),s(`div`,{key:0,class:r([`testimonial-credit-name`,{"no-description":!p.testimonials[0].quote_credit_description}])},t(p.testimonials[0].quote_credit),3)):o(``,!0),p.testimonials[0].quote_credit_description?(n(),s(`div`,I,t(p.testimonials[0].quote_credit_description),1)):o(``,!0)],2)):o(``,!0),p.testimonials[0].cta&&p.testimonials[0].cta.url?(n(),a(v,{key:2,link:p.testimonials[0].cta,class:`testimonial-cta`},null,8,[`link`])):o(``,!0)])],2)])])])):o(``,!0)]),p.testimonials.length>1?(n(),s(`div`,L,[u(R,{class:`swiper-button-prev`,direction:`prev`,theme:`dark`}),u(R,{class:`swiper-button-next`,direction:`next`,theme:`dark`})])):o(``,!0)])}var z=Object.assign(d(v,[[`render`,R],[`__scopeId`,`data-v-796373e2`]]),{__name:`TestimonialSlider`}),B=Object.assign(i({__name:`TestimonialSliderBlock`,props:{testimonials:{}},setup(e){return(t,r)=>(n(),a(z,{testimonials:e.testimonials},null,8,[`testimonials`]))}}),{__name:`BlocksTestimonialSliderBlock`});export{B 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.