1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ch-BaseDropdown-DtkgocjI.js","assets/app-index-CXQob2hh.js","assets/app-index-SWungaUD.css","assets/ex-BaseDropdown-CL-4igX4.css"])))=>i.map(i=>d[i]); 2import{_ as w,o,c as a,e as n,w as c,h,k as L,t as f,C as y,F as g,a as m,x as b,m as v,l as M,d as p,r as x}from"./app-index-CXQob2hh.js";const T={name:"BubLogos",components:{BaseDropdown:v(()=>M(()=>import("./ch-BaseDropdown-DtkgocjI.js"),__vite__mapDeps([0,1,2,3])))},data(){return{logos:[],allLogos:[],tags:{},fTag:"all",filter:[],options:{},max:12,showMore:!1}},props:{block:{type:Object,required:!0},showEditLinks:{type:Boolean,required:!1,default:!1}},created(){this.allLogos=this.block.field_items,this.tags={},this.logos=[],this.filter=[],this.showMore=this.showAll;let l=0;this.options={0:{id:"all",key:"all",label:this.block.filter_name}};for(let e in this.allLogos){let d=this.allLogos[e];for(let r in d.field_tags){let s=d.field_tags[r];this.tags[s.id]||(this.tags[s.id]=s.name,this.filter.push({id:s.id,name:s.name}),this.options[++l]={key:s.id,id:s.id,label:s.name})}this.logos.push(this.getLogoItem(d))}const t=this;this.filter.sort((e,d)=>e.name.toLowerCase().localeCompare(d.name.toLowerCase())),typeof window<"u"&&window.addEventListener("resize",()=>{t.updateMaximum()}),t.updateMaximum()},computed:{getId(){return"block_"+this.block.entity_id},showFilter(){return this.block.field_additional_class&&this.block.field_additional_class.indexOf("nofltr")===-1&&this.block.field_bub_options&&this.block.field_bub_options.indexOf("nofltr")===-1&&!b(this.block,"nofltr")},showAll(){return this.block.field_additional_class?.indexOf("show-all-logos")>=0||b(this.block,"show-all-logos")}},methods:{cmMeta(l,t=0){return{type:this.block.entity_type,id:this.block.entity_id,field:l,delta:t,langcode:this.block.langcode}},dropdownClick(l){this.fTag=l._item.key,this.updateList()},isShowMore(){return this.max<this.allLogos.length&&this.showMore===!1},showMoreLogos(){this.showMore=!0,this.updateMaximum()},getLogoItem(l){let t=l.field_media?.[0]?.data?.default?.default;return l.field_links&&(t.url=l.field_links[0].url),t},updateList(){this.logos=[];for(let l in this.allLogos){let t=this.allLogos[l],e=this.fTag==="all";if(!e){for(let d in t.field_tags)if(t.field_tags[d].id===this.fTag){e=!0;break}}e&&this.logos.length<this.max&&this.logos.push(this.getLogoItem(t))}},updateMaximum(){typeof window<"u"&&window.innerWidth>=1024?this.max=this.allLogos.length>12?11:12:this.max=this.allLogos.length>4?3:4,this.showMore&&(this.max=1e3),this.updateList()}}},C={class:"container"},B={class:"vbub-content"},D=["innerHTML"],H=["innerHTML"],I=["innerHTML"],O={key:0,class:"logos-filter"},E={class:"logos-filter-form",method:"get"},F={class:"form-items"},V={class:"form-item select"},A={for:"logos-category",class:"hidden"},S=["aria-label"],N={value:"all"},P=["value","innerHTML"],q={class:"logos-list"},j=["logo-id"],z=["href"],R=["src","width","height","alt"],U=["src","width","height","alt"];function W(l,t,e,d,r,s){const k=x("BaseDropdown"),_=p("editable");return o(),a("div",C,[n("div",B,[e.block.field_title&&l.$isBlockHtml(e.block.field_title)?c((o(),a("div",{key:0,class:"vbub-content-title",innerHTML:e.block.field_title},null,8,D)),[[_,s.cmMeta("field_title")]]):e.block.field_title?c((o(),a("h2",{key:1,class:"vbub-content-title",innerHTML:e.block.field_title},null,8,H)),[[_,s.cmMeta("field_title")]]):h("",!0),e.block.body?c((o(),a("div",{key:2,class:"vbub-content-body",innerHTML:e.block.body},null,8,I)),[[_,s.cmMeta("body")]]):h("",!0)]),s.showFilter?(o(),a("div",O,[n("form",E,[n("div",F,[n("div",V,[L(k,{options:r.options,onOptionClick:s.dropdownClick},null,8,["options","onOptionClick"]),n("label",A,f(e.block.filter_name),1),c(n("select",{id:"logos-category",class:"hidden",name:"logos_category","onUpdate:modelValue":t[0]||(t[0]=i=>r.fTag=i),onChange:t[1]||(t[1]=i=>s.updateList()),"aria-label":e.block.filter_name},[n("option",N,f(e.block.filter_name),1),(o(!0),a(g,null,m(r.filter,i=>(o(),a("option",{value:i.id,innerHTML:i.name},null,8,P))),256))],40,S),[[y,r.fTag]])])])])])):h("",!0),n("div",q,[(o(!0),a(g,null,m(r.logos,(i,u)=>(o(),a(g,{key:u},[i?(o(),a("div",{key:0,class:"logos-list-item","logo-id":u},[i.url?(o(),a("a",{key:0,href:i.url,target:"_blank"},[n("img",{src:i.src,width:i.width,height:i.height,alt:i.alt},null,8,R)],8,z)):(o(),a("img",{key:1,src:i.src,width:i.width,height:i.height,alt:i.alt}
2,null,8,U))],8,j)):h("",!0)],64))),128)),s.isShowMore()?(o(),a("div",{key:0,class:"logos-list-item show-more",onClick:t[2]||(t[2]=i=>s.showMoreLogos())},[n("span",null,f(e.block.show_more),1)])):h("",!0)])])}const J=w(T,[["render",W]]);export{J 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.