1import{b as g}from"./chunk-MJDNH7QI.js";import{i as p}from"./chunk-BXLI5HAL.js";import{g as h}from"./chunk-QMQ54HP6.js";import{Ca as m,Kb as c,ve as a,wb as f}from"./chunk-ZIECK5QA.js";var A=["format",""],I=(()=>{let o=class o{constructor(){this.ASPECT_RATIOS={},this.FALLBACK_ASPECT_RATIO={width:1,height:1},Object.values(h).forEach(e=>this.ASPECT_RATIOS[e]=this.FALLBACK_ASPECT_RATIO)}ngOnInit(){let e=this.format+p,t,i,d=this.product.images&&this.product.images[a.PRIMARY]?this.product.images[a.PRIMARY][this.format]:void 0,r=this.product.images?this.product.images[a.GALLERY]:void 0;if(d)t=this.product.images[a.PRIMARY][this.format],i=this.product.images[a.PRIMARY][e];else if(r)if(r instanceof Array){for(let n of r)if(n[this.format]){t=n[this.format],i=n[e];break}}else t=r[this.format],i=r[e];this.container={},t&&(this.container[this.format]=t),i&&(this.container[e]=i),this.imageTitle=t?.altText||this.product.name,this.imageRatio=this.format?this.ASPECT_RATIOS[this.format]||this.FALLBACK_ASPECT_RATIO:this.FALLBACK_ASPECT_RATIO}};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=m({type:o,selectors:[["sip-primary-image","format",""]],inputs:{product:"product",format:"format",imageLoadingStrategy:"imageLoadingStrategy"},attrs:A,decls:1,vars:4,consts:[[3,"container","format","alt","loading"]],template:function(t,i){t&1&&c(0,"sip-media",0),t&2&&f("container",i.container)("format",i.format)("alt",i.imageTitle)("loading",i.imageLoadingStrategy)},dependencies:[g],styles:["img[_ngcontent-%COMP%]{width:100%;height:auto}"],changeDetection:0});let s=o;return s})();export{I as a};
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.