"use strict";exports.id=8097,exports.ids=[8097],exports.modules={35481:(a,b,c)=>{c.d(b,{i:()=>g,w:()=>e});let d={};function e(a,b=!1){b||d[a]||(d[a]=!0,console.warn(a))}let f=["png","jpg","gif","bmp","svg"],g=a=>!!a&&!!f.includes(a)},58097:(a,b,c)=>{c.r(b),c.d(b,{browserSvgToPng:()=>h,imagePlugin:()=>i});var d=c(35481),e=c(4343),f=c(14963);let g=async a=>(await fetch(a)).arrayBuffer(),h=async({buffer:a,width:b,height:c})=>{let d=new Blob([a],{type:"image/svg+xml"}),e=URL.createObjectURL(d);try{let a=new Image;a.src=e,await a.decode();let d=window.devicePixelRatio,f=document.createElement("canvas"),g=b*d,h=c*d;return f.width=g,f.height=h,f.getContext("2d").drawImage(a,0,0,g,h),new Promise(a=>{f.toBlob(b=>{b.arrayBuffer().then(a)},"image/png")})}finally{URL.revokeObjectURL(e)}},i=({load:a=g,fallbackSvg:b=h}={})=>{let c=new Map;return async({root:g,definition:h,images:i})=>{let j=[];if((0,e.YR)(g,"image",a=>{j.push(a)}),(0,e.YR)(g,"imageReference",a=>{let b=h(a.identifier);b&&j.push(b)}),0!==j.length){let e=new Map;j.forEach(({url:g})=>{if(!i.has(g)){if(c.has(g))return void i.set(g,c.get(g));e.has(g)||e.set(g,(async()=>{let e;try{e=await a(g)}catch(a){(0,d.w)(`Failed to load image: ${g} ${a}`);return}let{width:h,height:j,type:k}=(0,f.R9)(new Uint8Array(e));if(!(0,d.i)(k))return void(0,d.w)(`Not supported image type: ${k}`);if("svg"===k)try{let a=await b({buffer:e,width:h,height:j}),d={type:k,width:h,height:j,data:e,fallback:a};i.set(g,d),c.set(g,d)}catch(a){(0,d.w)(`Failed to create fallback image: ${g} ${a}`);return}else{let a={type:k,width:h,height:j,data:e};i.set(g,a),c.set(g,a)}})())}}),await Promise.all(e.values())}if(c.size>100){let a=c.size-100;for(let b of c.keys())if(c.delete(b),--a<=0)break}return{}}}}};