var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function u(t){try{h(n.next(t))}catch(t){s(t)}}function a(t){try{h(n["throw"](t))}catch(t){s(t)}}function h(t){t.done?i(t.value):r(t.value).then(u,a)}h((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(t){return function(e){return h([t,e])}}function h(a){if(n)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(i=0)),i)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-9744e7cb.system.js"],(function(t){"use strict";var e,i;return{setters:[function(t){e=t.r;i=t.h}],execute:function(){var n=":host{display:inline-block}";var r=n;var s=t("bds_image",function(){function t(t){e(this,t);this.src=undefined;this.alt=undefined;this.width=undefined;this.height=undefined;this.objectFit="cover";this.dataTest=null;this.imageLoaded=false;this.loadError=false;this.currentSrc=undefined}t.prototype.loadImage=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,n;return __generator(this,(function(r){switch(r.label){case 0:if(!this.src)return[3,7];r.label=1;case 1:r.trys.push([1,6,,7]);return[4,fetch(this.src)];case 2:t=r.sent();if(!t.ok)return[3,4];return[4,t.blob()];case 3:e=r.sent();i=URL.createObjectURL(e);this.currentSrc=i;this.imageLoaded=true;return[3,5];case 4:this.loadError=true;r.label=5;case 5:return[3,7];case 6:n=r.sent();this.loadError=true;return[3,7];case 7:return[2]}}))}))};t.prototype.render=function(){if(!this.imageLoaded&&!this.loadError){this.loadImage()}if(this.imageLoaded){return i("img",{src:this.currentSrc,alt:this.alt,style:{objectFit:this.objectFit,width:this.width,height:this.height},"data-test":this.dataTest})}else if(!this.src){return i("div",{style:{width:this.width||this.height?this.width:"100%"}},i("bds-illustration",{type:"empty-states",name:"image-not-found",alt:this.alt,"data-test":this.dataTest}))}else{return i("div",{style:{width:this.width||this.height?this.width:"100%"}},i("bds-illustration",{type:"empty-states",name:"broken-image",alt:this.alt,"data-test":this.dataTest}))}};return t}());s.style=r}}}));
//# sourceMappingURL=p-8fbb596b.system.entry.js.map