"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[8413],{25442:(e,t,l)=>{l.d(t,{downloadPdf:()=>d});var n=l(30296),a=l.n(n),o=l(51391),s=l(56816),i=l(53618);const d=(e,t)=>{const l=e.style.display,n=document.body.style.overflowY;Object.assign(e.style,{display:"flex"}),document.body.style.overflowY="hidden",a()(e,{scale:1,useCORS:!0,allowTaint:!0,scrollY:-window.scrollY}).then((a=>{document.body.style.overflowY=n;const s=a.toDataURL("image/png",1),i=new o.Ay("p","px","a4"),d=i.internal.pageSize.getWidth(),r=i.internal.pageSize.getHeight(),c=d/a.width,g=r/a.height,w=c>g?g:c,y=a.width*w,h=a.height*w,p=(d-y)/2;i.addImage(s,"PNG",p,0,y,h),i.save(`${(e=>{const t=new Date,l=`${String(t.getDate()).padStart(2,"0")}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getFullYear())}`;return`${null===e||void 0===e?void 0:e.replace(/\s+/g,"_")}_${l}`})(t)}.pdf`),Object.assign(e.style,{display:l})})).catch((()=>{document.body.style.overflowY=n,s.hm.error((0,i.A)("__new.content.answerResults.errorDownload"))}))}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/downloadSummaryPdf.2f1dc191.chunk.js.map