"use strict";(globalThis.webpackChunkacmsWebpackJsonp||=[]).push([[6189],{33828(t,e,a){async function s(t,e){const s=t.querySelector(e.previewMark);if(!s)return;const r=s.getAttribute(e.pdfAttr);if(!r)return;const n=parseInt(s.getAttribute(e.pageAttr)??"",10)||1,c=parseInt(s.getAttribute(e.widthAttr)??"",10)||s.clientWidth,{default:i}=await a.e(5822).then(a.bind(a,84979)),l=new i(r,e.workerSource),o=t.querySelector(e.prevBtnMark),u=t.querySelector(e.nextBtnMark),{showBtnClass:d}=e,g=await l.getPageImage(n,c);g&&(s.src=g);const w=async()=>{o&&(await l.hasPrevPage()?o.classList.add(d):o.classList.remove(d)),u&&(await l.hasNextPage()?u.classList.add(d):u.classList.remove(d))};w(),o&&o.addEventListener("click",t=>{t.preventDefault(),(async()=>{const t=await l.getPrevImage(c);t&&(s.src=t),await w()})()}),u&&u.addEventListener("click",t=>{t.preventDefault(),(async()=>{const t=await l.getNextImage(c);t&&(s.src=t),await w()})()})}a.d(e,{default:()=>s})}}]);