@file-viewer/vue3 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -36,6 +36,8 @@ The component instance exposes `destroy()`, `downloadOriginalFile()`, `printRend
36
36
 
37
37
  The Vue 3 component follows host lifecycle teardown. Inside Element Plus `el-dialog destroy-on-close`, `v-if`, route tabs, or drawers, unmounting the component cancels active loading, destroys the renderer session, clears the rendered DOM, and emits `unload-complete` with `reason: "component-unmount"`. If a dialog only hides the component, such as `v-show` or no `destroy-on-close`, the active document stays mounted. For explicit cleanup while keeping the surrounding component alive, call `viewerRef.value?.destroy()` through the template ref.
38
38
 
39
+ PPTX charts follow the same lifecycle. They stay bound to the active viewer root, including Shadow DOM, and their chart instances are destroyed on component unmount, explicit `destroy()`, source replacement, or slide-window eviction. No chart nodes are left under `document.body`.
40
+
39
41
  ## Capabilities
40
42
 
41
43
  `@file-viewer/vue3` shares the same `@file-viewer/core` contracts with the Pure Web, Vue 2, React, jQuery, and Svelte standard component packages. It supports PDF, Word, Excel, PowerPoint, OFD, CAD/DWG/DXF/DWF, EPUB/UMD, archives, email, Markdown, highlighted code, images, audio, video, 3D models, geospatial files, and structured data assets. See the complete format matrix and option reference at https://doc.file-viewer.app/guide/formats
package/README.md CHANGED
@@ -36,6 +36,8 @@ createApp(App).use(FileViewer).mount('#app')
36
36
 
37
37
  Vue3 组件会跟随宿主生命周期自动释放资源。放在 Element Plus `el-dialog destroy-on-close`、`v-if`、路由页签或抽屉中时,组件卸载会取消当前加载、销毁 renderer session、清空预览 DOM,并触发 `unload-complete`,`reason` 为 `component-unmount`。如果弹窗只是隐藏组件,例如 `v-show` 或未开启 `destroy-on-close`,预览器会继续保留当前文档;需要主动释放时可通过模板 `ref` 调用 `viewerRef.value?.destroy()`。
38
38
 
39
+ PPTX 图表同样遵循这套生命周期。图表会绑定当前预览根节点(包括 Shadow DOM);组件卸载、主动 `destroy()`、切换文件或幻灯片窗口回收时都会销毁图表实例,不会向 `document.body` 泄漏图表 DOM。
40
+
39
41
  ## 能力范围
40
42
 
41
43
  `@file-viewer/vue3` 与其他标准组件包共享同一套 core 接口和 renderer/preset 装配模型;完整能力可通过按需 renderer 或 `@file-viewer/preset-all` 覆盖 PDF、Word、Excel、PPT、OFD、CAD/DWG/DXF/DWF、EPUB/UMD、压缩包、邮件、Markdown、代码高亮、图片、音频、视频、3D 模型、地理数据和结构化数据资产等预览链路。完整格式矩阵和参数说明见官方文档: https://doc.file-viewer.app/guide/formats
@@ -1 +1 @@
1
- const aG=a1;function a1(a,b){a=a-0x1bc;const c=a0();let d=c[a];return d;}(function(a3,a4){const aA=a1,a5=a3();while(!![]){try{const a6=parseInt(aA(0x202))/0x1*(-parseInt(aA(0x1c0))/0x2)+-parseInt(aA(0x1e1))/0x3*(parseInt(aA(0x1f4))/0x4)+parseInt(aA(0x1bd))/0x5+parseInt(aA(0x1f8))/0x6*(parseInt(aA(0x1f5))/0x7)+-parseInt(aA(0x1ce))/0x8+parseInt(aA(0x1ff))/0x9+-parseInt(aA(0x1e8))/0xa*(-parseInt(aA(0x201))/0xb);if(a6===a4)break;else a5['push'](a5['shift']());}catch(a7){a5['push'](a5['shift']());}}}(a0,0xadfea));import{i as a2}from'./messages.js';function t(a3,a4,a5,a6,a7,a8,a9){const aB=a1;try{var aa=a3[a8](a9),ab=aa['value'];}catch(ac){a5(ac);return;}aa['done']?a4(ab):Promise[aB(0x1d5)](ab)[aB(0x1c1)](a6,a7);}function n(a3){return function(){var a4=this,a5=arguments;return new Promise(function(a6,a7){var a8=a3['apply'](a4,a5);function a9(ab){const aC=a1;t(a8,a6,a7,a9,aa,aC(0x1f3),ab);}function aa(ab){t(a8,a6,a7,a9,aa,'throw',ab);}a9(void 0x0);});};}var r=(a3={})=>{const aD=a1;var a4,a5,a6;let a7=Number['isFinite'](a3['scale'])&&a3['scale']?Number(a3[aD(0x1fc)]):0x1;return{'scale':a7,'label':a3['label']||Math['round'](a7*0x64)+'%','canZoomIn':(a4=a3['canZoomIn'])==null?!0x1:a4,'canZoomOut':(a5=a3['canZoomOut'])==null?!0x1:a5,'canReset':(a6=a3['canReset'])==null?!0x1:a6,'minScale':a3['minScale'],'maxScale':a3['maxScale']};},i=a3=>a3===!0x1?{'enabled':!0x1}:a3===!0x0||a3===void 0x0?{}:a3,a=(a3='')=>({'query':a3,'total':0x0,'currentIndex':-0x1,'current':null,'matches':[]}),o=a3=>a3===!0x1?{'enabled':!0x1,'collectText':!0x1}:a3===!0x0||a3===void 0x0?{}:a3,s=(a3,a4)=>{const aE=a1;var a5;let a6=o(a4);if(a6['enabled']===!0x1||a6['collectText']===!0x1)return[];let a7=Math['max'](0xc8,a6['chunkSize']||0x4b0),a8=Math['max'](0x0,Math['min'](a7-0x1,(a5=a6['chunkOverlap'])==null?0xa0:a5)),a9=Math['max'](0x0,a6[aE(0x1ea)]||0x0),aa=[];return a3['forEach'](ab=>{const aF=aE;let ac=a9?ab['text']['slice'](0x0,a9):ab['text'];if(!ac)return;if(ac['length']<=a7){aa[aF(0x1eb)]({'id':ab['id']+'-chunk-1','text':ac,'anchor':ab,'startLine':ab[aF(0x1dd)],'endLine':ab['line']});return;}let ad=0x0,af=0x1;for(;ad<ac[aF(0x1df)];){let ag=ac['slice'](ad,ad+a7);if(aa['push']({'id':ab['id']+'-chunk-'+af,'text':ag,'anchor':ab,'startLine':ab['line'],'endLine':ab['line']}),ad+a7>=ac['length'])break;ad+=a7-a8,af+=0x1;}}),aa;},c='[data-viewer-anchor-id],.pdfViewer\x20.page,.docx-wrapper\x20section,.docx\x20p,.docx\x20li,.docx\x20table,.markdown-body\x20h1,.markdown-body\x20h2,.markdown-body\x20h3,.markdown-body\x20h4,.markdown-body\x20h5,.markdown-body\x20h6,.markdown-body\x20p,.markdown-body\x20li,.markdown-body\x20pre,.markdown-body\x20table,article\x20h1,article\x20h2,article\x20h3,article\x20h4,article\x20h5,article\x20h6,article\x20p,article\x20li,article\x20pre,article\x20table,pre\x20code,p,li,tr,h1,h2,h3,h4,h5,h6,pre,table'['split'](',')['join'](','),l=['.viewer-actions',aG(0x1cc),'.state-panel','.pdf-toolbar','.pdf-nav-pane',aG(0x1c9)]['join'](','),u=a3=>typeof CSS<'u'&&typeof CSS['escape']=='function'?CSS[aG(0x1ef)](a3):a3[aG(0x1c5)](/["\\]/g,'\x5c$&'),d=(a3,a4=0xa0)=>{const aH=aG;let a5=a3['replace'](/\s+/g,'\x20')[aH(0x1c3)]();return a5['length']>a4?a5['slice'](0x0,a4-0x1)+'…':a5;},f=a3=>{const aI=aG;let a4=a3['getBoundingClientRect']();return a4[aI(0x1dc)]>0x0||a4['height']>0x0;},p=a3=>!!a3[aG(0x1cb)](l),m=a3=>{const aJ=aG;let a4=a3[aJ(0x1cb)]('[data-page-number],\x20[data-page]'),a5=(a4==null?void 0x0:a4['dataset']['pageNumber'])||(a4==null?void 0x0:a4['dataset']['page']),a6=a5?Number['parseInt'](a5,0xa):NaN;return Number['isFinite'](a6)?a6:void 0x0;},h=a3=>a3['matches']('.pdfViewer\x20.page,\x20[data-page-number],\x20[data-page]')?aG(0x1e6):a3['matches']('p,\x20li,\x20tr,\x20pre,\x20code')?aG(0x1dd):aG(0x1ec),g=(a3,a4)=>{const aK=aG;let a5=a3[aK(0x1e9)];for(;a5;){if(a4['has'](a5))return!0x0;a5=a5[aK(0x1e9)];}return!0x1;},_=a3=>{const aL=aG;if(!a3)return[];let a4=a3['getBoundingClientRect'](),a5=new Set(),a6=[];return Array['from'](a3[aL(0x1e2)](c))['forEach'](a7=>{const aM=aL;if(p(a7)||!f(a7))return;let a8=d(a7['textContent']||'',0x3e8);if(!a8||g(a7,a5)&&!a7['matches']('p,\x20li,\x20tr,\x20pre,\x20code'))return;a5[aM(0x1d4)](a7);let a9=a7['dataset']['viewerAnchorId']||'viewer-anchor-'+(a6[aM(0x1df)]+0x1);a7['dataset']['viewerAnchorId']=a9,a7['dataset']['viewerLine']=String(a6['length']+0x1);let aa=a7['getBoundingClientRect']();a6['push']({'id':a9,'index':a6['length'],'line':a6['length']+0x1,'type':h(a7),'label':d(a8,0x60),'text':a8,'page':m(a7),'top':aa['top']-a4['top']+a3['scrollTop'],'left':aa['left']-a4['left']+a3['scrollLeft'],'width':aa['width'],'height':aa['height']});}),a6;},v=(a3,a4,a5)=>{const aN=aG;if(!a3)return null;let a6=a3[aN(0x1cb)]('[data-viewer-anchor-id]');if(a6!=null&&a6[aN(0x1d6)]['viewerAnchorId']){let aa=a4['find'](ab=>ab['id']===a6['dataset']['viewerAnchorId']);if(aa)return aa;}if(!a5)return null;let a7=a5['getBoundingClientRect'](),a8=a3['getBoundingClientRect']()['top']-a7['top']+a5[aN(0x1e7)],a9=null;for(let ab of a4){if(ab[aN(0x1d8)]<=a8+0x1){a9=ab;continue;}break;}return a9;},y=(a3,a4)=>{if(!a3||!a4['length'])return null;let a5=a3['scrollTop']+a3['clientHeight']*0.42,a6=a4[0x0];for(let a7 of a4){if(a7['top']<=a5){a6=a7;continue;}break;}return a6;},b=(a3,a4)=>{const aO=aG;if(!a3||a4==null)return!0x1;let a5=typeof a4==aO(0x200)?'[data-viewer-anchor-id=\x22'+u(a4['id'])+'\x22]':typeof a4=='number'?'[data-viewer-line=\x22'+a4+'\x22]':'[data-viewer-anchor-id=\x22'+u(a4)+'\x22]',a6=a3['querySelector'](a5);return a6?(a6['scrollIntoView']({'block':aO(0x1db),'inline':'nearest'}),!0x0):typeof a4=='object'?(a3['scrollTo']({'top':Math['max'](0x0,a4['top']-a3['clientHeight']*0.18),'left':Math['max'](0x0,Math[aO(0x1f7)](a4['left'],a3[aO(0x203)]-a3['clientWidth'])),'behavior':'smooth'}),!0x0):!0x1;},x=new WeakMap(),S=new WeakMap(),C=new WeakMap(),w=a3=>!!a3&&a3[aG(0x1fa)]===0x1,T=(a3,a4)=>{const aP=aG;if(!(a3!=null&&a3['querySelectorAll']))return[];let a5=Array['from'](a3[aP(0x1e2)](a4));w(a3)&&a3[aP(0x1be)]&&a5['push'](...T(a3['shadowRoot'],a4));let a6=Array['from'](a3['querySelectorAll']('*'));for(let a7 of a6)a7['shadowRoot']&&a5['push'](...T(a7['shadowRoot'],a4));return a5;},E=a3=>{if(!a3)return null;let a4=w(a3)?x['get'](a3)||a3['__flyfishViewerSearchProvider']:null;if(a4)return a4;let a5=T(a3,'[data-viewer-search-provider]')[0x0];return a5&&(x['get'](a5)||a5['__flyfishViewerSearchProvider'])||null;},D=(a3,a4)=>{const aQ=aG;S['set'](a3,a4),a3['dataset'][aQ(0x1f9)]=a3[aQ(0x1d6)]['viewerZoomProvider']||'custom',a3['__flyfishViewerZoomProvider']=a4;},O=a3=>{const aR=aG;a3&&(S['delete'](a3),delete a3[aR(0x1d6)]['viewerZoomProvider'],delete a3[aR(0x1f0)]);},k=a3=>{if(!a3)return null;let a4=w(a3)?S['get'](a3)||a3['__flyfishViewerZoomProvider']:null;if(a4)return a4;let a5=T(a3,'[data-viewer-zoom-provider]')[0x0];return a5&&(S['get'](a5)||a5['__flyfishViewerZoomProvider'])||null;},ee=(a3,a4)=>{const aS=aG;C['set'](a3,a4),a3['dataset']['viewerViewStateProvider']=a3['dataset']['viewerViewStateProvider']||aS(0x1e3),a3['__flyfishViewerViewStateProvider']=a4;},te=a3=>{a3&&(C['delete'](a3),delete a3['dataset']['viewerViewStateProvider'],delete a3['__flyfishViewerViewStateProvider']);},A=a3=>{const aT=aG;if(!a3)return null;let a4=w(a3)?C['get'](a3)||a3[aT(0x1f1)]:null;if(a4&&(!w(a3)||a3['dataset'][aT(0x1c4)]!=='generic'))return a4;let a5=T(a3,aT(0x1bf)),a6=a5[aT(0x1de)](a9=>a9['dataset']['viewerViewStateProvider']!=='generic'),a7=a5['find'](a9=>a9['dataset'][aT(0x1c4)]==='generic'),a8=a6||a7;return a8?C['get'](a8)||a8['__flyfishViewerViewStateProvider']||null:a4||null;},j=['auto','scroll','overlay'],M=a3=>Math[aG(0x1d2)](0x0,a3['scrollHeight']-a3['clientHeight']),N=(a3,a4={})=>{const aU=aG;var a5,a6;let a7=(a5=a4['minScrollRange'])==null?0x2:a5;if(M(a3)<=a7)return!0x1;let a8=(a6=a3[aU(0x1f2)])==null?void 0x0:a6['defaultView'],a9=a8!=null&&a8['getComputedStyle']?a8:typeof window<'u'?window:void 0x0;if(!(a9!=null&&a9['getComputedStyle']))return!0x1;let aa=a9['getComputedStyle'](a3),ab=aa['overflowY']||aa['overflow'];return(a4['overflowValues']||j)['includes'](ab);},P=(a3,a4={})=>{const aV=aG;if(!a3)return null;let a5=a4['preferredSelector']||'[data-viewer-scroll-container],\x20.pdf-wrapper',a6=a4[aV(0x1d9)]||'div,\x20section,\x20article,\x20pre',a7=a3['querySelector'](a5);return a7&&N(a7,a4)?a7:N(a3,a4)?a3:Array['from'](a3['querySelectorAll'](a6))['filter'](a8=>N(a8,a4))['sort']((a8,a9)=>M(a9)-M(a8))[0x0]||a7||a3;},F=a3=>({'scale':a3['scale'],'label':a3['label'],'canZoomIn':a3[aG(0x1d7)],'canZoomOut':a3['canZoomOut'],'canReset':a3['canReset'],'minScale':a3['minScale'],'maxScale':a3['maxScale']}),I=(a3,a4)=>{const aW=aG;let a5=r(a4||{});return a3['scale']=a5['scale'],a3['label']=a5[aW(0x1f6)],a3['canZoomIn']=a5['canZoomIn'],a3['canZoomOut']=a5['canZoomOut'],a3['canReset']=a5['canReset'],a3['minScale']=a5['minScale'],a3['maxScale']=a5['maxScale'],a3;},L=a3=>F(a3);function a0(){const bd=['closest','.viewer-watermark','isFinite','9346064hCOujz','initial','until-interaction','initial-view-state','max','requestAnimationFrame','add','resolve','dataset','canZoomIn','top','candidateSelector','padding','center','width','line','find','length','actual','15sxrIhe','querySelectorAll','custom','contain','api','page','scrollTop','16770580xIKEJV','parentElement','maxTextLength','push','block','image-not-ready','forEach','escape','__flyfishViewerZoomProvider','__flyfishViewerViewStateProvider','ownerDocument','next','1034548VsyZFS','21imNBQH','label','min','746178NSUVrj','viewerZoomProvider','nodeType','observe','scale','rotation','auto','7463259VrXghG','object','11OrtNLH','205397HPoQMx','scrollWidth','zoomIn','applied','getState','5581575IMhJdI','shadowRoot','[data-viewer-view-state-provider]','8LlssZh','then','zoom','trim','viewerViewStateProvider','replace','viewer','resetZoom','disconnect','.flyfish-search-match','no-provider'];a0=function(){return bd;};return a0();}(function(){var a3=n(function*(a4,a5){return I(a4,yield a5()),L(a4);});return function(a4,a5){return a3['apply'](this,arguments);};}());var R=()=>{let a3=new Set();return{'emit'(){const aX=a1;a3[aX(0x1ee)](a4=>a4());},'subscribe'(a4){const aY=a1;return a3[aY(0x1d4)](a4),()=>{a3['delete'](a4);};}};},z=a3=>{var a4,a5;return((a5=(a4=a3==null?void 0x0:a3['ownerDocument'])==null?void 0x0:a4['defaultView'])==null?void 0x0:a5['MutationObserver'])||(typeof MutationObserver<'u'?MutationObserver:void 0x0);},B=({root:a3,enabled:a4,beforeZoom:a5,onChange:a6})=>{const b2=aG;let a7=null,a8=null,a9=null,aa=!0x1,ab=r(),ac=()=>{a6==null||a6(F(ab));},ad=()=>{a8==null||a8(),a8=null,a7=null,I(ab,null);},af=()=>{var ai,aj;if((a4==null?void 0x0:a4())===!0x1)return ad(),null;let ak=k(a3());return ak!==a7&&(a8==null||a8(),a7=ak,a8=((ai=ak==null?void 0x0:ak['subscribe'])==null?void 0x0:ai['call'](ak,()=>{I(ab,ak['getState']()),aa||ac();}))||null),I(ab,((aj=ak==null?void 0x0:ak['getState'])==null?void 0x0:aj['call'](ak))||null),ak;},ag=()=>{const aZ=a1;a9==null||a9[aZ(0x1c8)](),a9=null;},ah=(function(){var ai=n(function*(aj,ak){const b0=a1;let al=af();if(!al||a5&&(yield a5(aj))===!0x1)return F(ab);aa=!0x0;try{return I(ab,(yield ak(al))||al[b0(0x1bc)]()),F(ab);}finally{aa=!0x1;}});return function(aj,ak){return ai['apply'](this,arguments);};}());return{get 'provider'(){return a7;},'state':ab,'hasProvider'(){return!!af();},'refreshProvider':af,'observe'(){const b1=a1;ag();let ai=a3(),aj=z(ai);if(!ai||!aj){af();return;}a9=new aj(()=>{af();}),a9[b1(0x1fb)](ai,{'childList':!0x0,'subtree':!0x0}),af();},'clearProvider':ad,'getState'(){return F(ab);},'zoomIn':()=>ah('zoom-in',ai=>ai[b2(0x204)]()),'zoomOut':()=>ah('zoom-out',ai=>ai['zoomOut']()),'resetZoom':()=>ah('zoom-reset',ai=>ai[b2(0x1c7)]()),'destroy'(){ag(),ad();}};},V=['auto',aG(0x1e4),'cover',aG(0x1dc),'height','actual','scale-down'],H=[aG(0x1d0),'always','initial'],U='until-interaction',W=0x0,G=0x8,K=a3=>!!a3&&typeof a3=='object'&&!Array['isArray'](a3),q=a3=>typeof a3=='string'&&V['includes'](a3),J=a3=>typeof a3=='string'&&H['includes'](a3),Y=a3=>{const b3=aG;let a4=Number(a3);return Number[b3(0x1cd)](a4)&&a4>0x0?a4:void 0x0;},X=a3=>{let a4=Number(a3);return Number['isFinite'](a4)&&a4>0x0?a4:W;},Z=a3=>{const b4=aG;if(a3==null||a3===!0x1)return null;if(q(a3))return{'mode':a3,'resize':U,'padding':W};if(!K(a3))return null;let a4=Y(a3['minScale']),a5=Y(a3['maxScale']),a6=a4!==void 0x0&&a5!==void 0x0&&a5<a4?a4:a5;return{'mode':q(a3['mode'])?a3['mode']:'auto','resize':J(a3['resize'])?a3['resize']:U,'padding':X(a3[b4(0x1da)]),'minScale':a4,'maxScale':a6};},ne=(a3,a4,a5)=>{const b5=aG;let a6=a3;return Number['isFinite'](a4)&&(a6=Math[b5(0x1d2)](Number(a4),a6)),Number['isFinite'](a5)&&(a6=Math['min'](Number(a5),a6)),a6;},re=({mode:a3,viewportWidth:a4,viewportHeight:a5,contentWidth:a6,contentHeight:a7,minScale:a8,maxScale:a9})=>{if(a4<=0x0||a5<=0x0||a6<=0x0||a7<=0x0)return;let aa=a4/a6,ab=a5/a7,ac=Math['min'](aa,ab),ad=Math['max'](aa,ab),af=((()=>{const b6=a1;switch(a3){case'cover':return ad;case b6(0x1dc):return aa;case'height':return ab;case b6(0x1e0):return 0x1;case'scale-down':return Math['min'](0x1,ac);default:return ac;}})());if(!(!Number['isFinite'](af)||af<=0x0))return ne(af,a8,a9);},ie=a3=>{const b7=aG;var a4,a5;if(!a3)return!0x1;let a6=Number((a4=a3['scale'])==null?(a5=a3['zoom'])==null?void 0x0:a5['scale']:a4);if(Number['isFinite'](a6)&&a6>0x0||Number['isFinite'](a3[b7(0x1e6)])||Number['isFinite'](a3[b7(0x1fd)])||a3['navigation']&&Object['keys'](a3['navigation'])['length']>0x0||a3['extra']&&Object['keys'](a3['extra'])[b7(0x1df)]>0x0)return!0x0;let a7=a3['scroll']||{};return['top','left','topRatio','leftRatio']['some'](a8=>{let a9=a7[a8];return Number['isFinite'](a9);});},Q=(a3,a4,a5=aG(0x1c6),a6='none')=>({'applied':!0x1,'mode':a3['mode'],'resize':a3['resize'],'source':a5,'reason':a4,'provider':a6}),$=(a3,a4,a5)=>({'applied':!!(a3!=null&&a3[aG(0x205)]),'mode':(a3==null?void 0x0:a3['mode'])||a4['mode'],'resize':(a3==null?void 0x0:a3['resize'])||a4['resize'],'scale':a3==null?void 0x0:a3['scale'],'source':(a3==null?void 0x0:a3['source'])||a4['source'],'reason':a3==null?void 0x0:a3['reason'],'provider':(a3==null?void 0x0:a3['provider'])||a5,'state':a3==null?void 0x0:a3['state']}),ae=a3=>a3==='pending'||a3==='retry'||a3===aG(0x1ed)||a3==='unmeasurable',oe=a3=>{const b8=aG;var a4;let a5=(a4=a3['getBoundingClientRect'])==null?void 0x0:a4['call'](a3);return{'width':Math['max'](0x0,(a5==null?void 0x0:a5['width'])||a3['clientWidth']||0x0),'height':Math[b8(0x1d2)](0x0,(a5==null?void 0x0:a5['height'])||a3['clientHeight']||0x0)};},se=({root:a3,enabled:a4,getFit:a5=()=>void 0x0,onFit:a6})=>{let a7=null,a8=null,a9=null,aa=!0x1,ab=0x0,ac=()=>{var al;let am=a3();return((al=am==null?void 0x0:am['ownerDocument'])==null?void 0x0:al['defaultView'])||(typeof window<'u'?window:void 0x0);},ad=()=>{if(a8===null)return;let al=ac();al!=null&&al['cancelAnimationFrame']&&al['cancelAnimationFrame'](a8),a8=null;},af=()=>{a9&&clearTimeout(a9),a9=null;},ag=(al,am)=>{let an=al===void 0x0?a5():al;return an==null?am==='api'?Z('auto'):null:Z(an);},ah=(al,am,an)=>{ab>=G||(af(),ab+=0x1,a9=setTimeout(()=>{a9=null,ai(al,{'source':am,'reason':an==='api'?'api':'retry'});},0x20*ab));},ai=(function(){var al=n(function*(am,an={}){const b9=a1;let ao=an['source']||'api',ap=an['reason']||'api',aq=ag(am,ap);if(!aq)return{'applied':!0x1,'mode':b9(0x1fe),'resize':U,'source':ao,'reason':'not-configured','provider':'none'};if((a4==null?void 0x0:a4())===!0x1)return Q(aq,'disabled',ao);let ar=a3();if(!ar)return ah(am,ao,ap),Q(aq,'no-root',ao);let as=oe(ar);if(as['width']<=0x0||as['height']<=0x0)return ah(am,ao,ap),Q(aq,'zero-size',ao);let at=a2(a2({},aq),{},{'source':ao,'reason':ap,'viewportWidth':Math['max'](0x0,as['width']-aq['padding']*0x2),'viewportHeight':Math['max'](0x0,as['height']-aq['padding']*0x2),'container':ar}),au=A(ar),av=null;if(au!=null&&au['fit']){let ay=$(yield au['fit'](at),at,'view-state');if(ay['applied'])return ab=0x0,a6==null||a6(ay),ay;av=ay;}let aw=k(ar);if(aw!=null&&aw['fit']){let az=$(yield aw['fit'](at),at,b9(0x1c2));if(az[b9(0x205)])return ab=0x0,a6==null||a6(az),az;av=az;}let ax=Q(aq,au||aw?'unsupported':b9(0x1ca),ao);return(ax['reason']===b9(0x1ca)||ae(av==null?void 0x0:av['reason']))&&ah(am,ao,ap),ax;});return function(am){return al['apply'](this,arguments);};}()),aj=(al='resize')=>{const ba=a1;let am=Z(a5());if(!am||am['resize']==='initial'||am['resize']===ba(0x1d0)&&aa)return;ad();let an=ac(),ao=()=>{a8=null,ai(void 0x0,{'source':'viewer','reason':al});};if(an!=null&&an['requestAnimationFrame']){a8=an[ba(0x1d3)](ao);return;}a8=setTimeout(ao,0x10);},ak=()=>{ad(),a7==null||a7['disconnect'](),a7=null;};return{'normalize':Z,'fit':(function(){var al=n(function*(am,an){const bb=a1;return af(),aa=!0x1,ai(am,{'source':(an==null?void 0x0:an['source'])||bb(0x1e5),'reason':(an==null?void 0x0:an['reason'])||'api'});});return function(am,an){return al['apply'](this,arguments);};}()),'applyInitialFit':(function(){var al=n(function*(am={}){const bc=a1;return af(),ab=0x0,aa=!0x1,am['skip']?Q(Z(a5())||Z('auto'),bc(0x1d1),bc(0x1cf)):ai(void 0x0,{'source':'initial','reason':bc(0x1cf)});});return function(){return al['apply'](this,arguments);};}()),'scheduleFit':aj,'observe'(){var al,am;ak();let an=a3(),ao=((am=(al=an==null?void 0x0:an['ownerDocument'])==null?void 0x0:al['defaultView'])==null?void 0x0:am['ResizeObserver'])||(typeof ResizeObserver<'u'?ResizeObserver:void 0x0);!an||!ao||(a7=new ao(()=>aj('resize')),a7['observe'](an));},'markUserInteraction'(){aa=!0x0,af();},'resetAutoFit'(){aa=!0x1,ab=0x0;},'destroy'(){ak(),af(),ab=0x0;}};};export{b as _,B as a,i as b,A as c,D as d,te as f,y as g,v as h,R as i,k as l,_ as m,ie as n,P as o,O as p,re as r,E as s,se as t,ee as u,s as v,n as x,a as y};
1
+ const aF=a1;(function(a4,a5){const aB=a1,a6=a4();while(!![]){try{const a7=parseInt(aB(0x20a))/0x1*(parseInt(aB(0x231))/0x2)+-parseInt(aB(0x204))/0x3*(parseInt(aB(0x1f0))/0x4)+parseInt(aB(0x1f7))/0x5+-parseInt(aB(0x20d))/0x6+parseInt(aB(0x21c))/0x7*(-parseInt(aB(0x211))/0x8)+-parseInt(aB(0x1f3))/0x9+parseInt(aB(0x22b))/0xa*(parseInt(aB(0x1ef))/0xb);if(a7===a5)break;else a6['push'](a6['shift']());}catch(a8){a6['push'](a6['shift']());}}}(a0,0xf4053));function a0(){const b7=['none','22qHcVsB','500aavzar','smooth','left','8788536WbmADk','canZoomOut','minScale','top','3102465DBSEqC','overflowY','forEach','minScrollRange','clientWidth','join','line','find','__flyfishViewerViewStateProvider','max','reason','split','nodeType','18747LBmExb','extra','viewerViewStateProvider','call','getBoundingClientRect','number','9698lTaoXv','generic','getComputedStyle','5759442wiqsaf','slice','__flyfishViewerSearchProvider','.state-panel','1710256Imxcat','canReset','.pdf-nav-pane','scroll','unsupported','resize','length','height','auto','shadowRoot','actual','21CgKsJr','add','scale-down','push','padding','pending','viewer-anchor-','canZoomIn','.pdfViewer\x20.page,\x20[data-page-number],\x20[data-page]','isFinite','dataset','viewerAnchorId','width','escape','viewer','11949370JKAMqd','unmeasurable','source','.pdf-toolbar','initial','navigation','278VHgweQ','from','min','scale','maxTextLength','leftRatio'];a0=function(){return b7;};return a0();}function a1(a,b){a=a-0x1ef;const c=a0();let d=c[a];return d;}import{a as a2,i as a3}from'./messages.js';var n=(a4={})=>{const aC=a1;var a5,a6,a7;let a8=Number['isFinite'](a4['scale'])&&a4['scale']?Number(a4['scale']):0x1;return{'scale':a8,'label':a4['label']||Math['round'](a8*0x64)+'%','canZoomIn':(a5=a4[aC(0x223)])==null?!0x1:a5,'canZoomOut':(a6=a4['canZoomOut'])==null?!0x1:a6,'canReset':(a7=a4['canReset'])==null?!0x1:a7,'minScale':a4['minScale'],'maxScale':a4['maxScale']};},r=a4=>a4===!0x1?{'enabled':!0x1}:a4===!0x0||a4===void 0x0?{}:a4,i=(a4='')=>({'query':a4,'total':0x0,'currentIndex':-0x1,'current':null,'matches':[]}),a=a4=>a4===!0x1?{'enabled':!0x1,'collectText':!0x1}:a4===!0x0||a4===void 0x0?{}:a4,o=(a4,a5)=>{const aD=a1;var a6;let a7=a(a5);if(a7['enabled']===!0x1||a7['collectText']===!0x1)return[];let a8=Math[aD(0x200)](0xc8,a7['chunkSize']||0x4b0),a9=Math['max'](0x0,Math[aD(0x233)](a8-0x1,(a6=a7['chunkOverlap'])==null?0xa0:a6)),aa=Math['max'](0x0,a7[aD(0x235)]||0x0),ab=[];return a4['forEach'](ac=>{const aE=aD;let ad=aa?ac['text'][aE(0x20e)](0x0,aa):ac['text'];if(!ad)return;if(ad['length']<=a8){ab[aE(0x21f)]({'id':ac['id']+'-chunk-1','text':ad,'anchor':ac,'startLine':ac[aE(0x1fd)],'endLine':ac['line']});return;}let af=0x0,ag=0x1;for(;af<ad['length'];){let ah=ad['slice'](af,af+a8);if(ab['push']({'id':ac['id']+'-chunk-'+ag,'text':ah,'anchor':ac,'startLine':ac['line'],'endLine':ac['line']}),af+a8>=ad['length'])break;af+=a8-a9,ag+=0x1;}}),ab;},s='[data-viewer-anchor-id],.pdfViewer\x20.page,.docx-wrapper\x20section,.docx\x20p,.docx\x20li,.docx\x20table,.markdown-body\x20h1,.markdown-body\x20h2,.markdown-body\x20h3,.markdown-body\x20h4,.markdown-body\x20h5,.markdown-body\x20h6,.markdown-body\x20p,.markdown-body\x20li,.markdown-body\x20pre,.markdown-body\x20table,article\x20h1,article\x20h2,article\x20h3,article\x20h4,article\x20h5,article\x20h6,article\x20p,article\x20li,article\x20pre,article\x20table,pre\x20code,p,li,tr,h1,h2,h3,h4,h5,h6,pre,table'[aF(0x202)](',')['join'](','),c=['.viewer-actions','.viewer-watermark',aF(0x210),aF(0x22e),aF(0x213),'.flyfish-search-match'][aF(0x1fc)](','),l=a4=>typeof CSS<'u'&&typeof CSS[aF(0x229)]=='function'?CSS['escape'](a4):a4['replace'](/["\\]/g,'\x5c$&'),u=(a4,a5=0xa0)=>{let a6=a4['replace'](/\s+/g,'\x20')['trim']();return a6['length']>a5?a6['slice'](0x0,a5-0x1)+'…':a6;},d=a4=>{const aG=aF;let a5=a4[aG(0x208)]();return a5['width']>0x0||a5['height']>0x0;},f=a4=>!!a4['closest'](c),p=a4=>{const aH=aF;let a5=a4['closest']('[data-page-number],\x20[data-page]'),a6=(a5==null?void 0x0:a5[aH(0x226)]['pageNumber'])||(a5==null?void 0x0:a5[aH(0x226)]['page']),a7=a6?Number['parseInt'](a6,0xa):NaN;return Number['isFinite'](a7)?a7:void 0x0;},m=a4=>a4['matches'](aF(0x224))?'page':a4['matches']('p,\x20li,\x20tr,\x20pre,\x20code')?'line':'block',h=(a4,a5)=>{let a6=a4['parentElement'];for(;a6;){if(a5['has'](a6))return!0x0;a6=a6['parentElement'];}return!0x1;},g=a4=>{const aI=aF;if(!a4)return[];let a5=a4['getBoundingClientRect'](),a6=new Set(),a7=[];return Array[aI(0x232)](a4['querySelectorAll'](s))['forEach'](a8=>{const aJ=aI;if(f(a8)||!d(a8))return;let a9=u(a8['textContent']||'',0x3e8);if(!a9||h(a8,a6)&&!a8['matches']('p,\x20li,\x20tr,\x20pre,\x20code'))return;a6[aJ(0x21d)](a8);let aa=a8[aJ(0x226)]['viewerAnchorId']||aJ(0x222)+(a7['length']+0x1);a8[aJ(0x226)]['viewerAnchorId']=aa,a8['dataset']['viewerLine']=String(a7[aJ(0x217)]+0x1);let ab=a8['getBoundingClientRect']();a7['push']({'id':aa,'index':a7['length'],'line':a7['length']+0x1,'type':m(a8),'label':u(a9,0x60),'text':a9,'page':p(a8),'top':ab['top']-a5[aJ(0x1f6)]+a4['scrollTop'],'left':ab['left']-a5['left']+a4['scrollLeft'],'width':ab['width'],'height':ab['height']});}),a7;},_=(a4,a5,a6)=>{const aK=aF;if(!a4)return null;let a7=a4['closest']('[data-viewer-anchor-id]');if(a7!=null&&a7['dataset']['viewerAnchorId']){let ab=a5[aK(0x1fe)](ac=>ac['id']===a7['dataset'][aK(0x227)]);if(ab)return ab;}if(!a6)return null;let a8=a6[aK(0x208)](),a9=a4['getBoundingClientRect']()['top']-a8['top']+a6['scrollTop'],aa=null;for(let ac of a5){if(ac['top']<=a9+0x1){aa=ac;continue;}break;}return aa;},v=(a4,a5)=>{if(!a4||!a5['length'])return null;let a6=a4['scrollTop']+a4['clientHeight']*0.42,a7=a5[0x0];for(let a8 of a5){if(a8['top']<=a6){a7=a8;continue;}break;}return a7;},ee=(a4,a5)=>{const aL=aF;if(!a4||a5==null)return!0x1;let a6=typeof a5=='object'?'[data-viewer-anchor-id=\x22'+l(a5['id'])+'\x22]':typeof a5==aL(0x209)?'[data-viewer-line=\x22'+a5+'\x22]':'[data-viewer-anchor-id=\x22'+l(a5)+'\x22]',a7=a4['querySelector'](a6);return a7?(a7['scrollIntoView']({'block':'center','inline':'nearest'}),!0x0):typeof a5=='object'?(a4['scrollTo']({'top':Math[aL(0x200)](0x0,a5[aL(0x1f6)]-a4['clientHeight']*0.18),'left':Math['max'](0x0,Math[aL(0x233)](a5['left'],a4['scrollWidth']-a4['clientWidth'])),'behavior':aL(0x1f1)}),!0x0):!0x1;},y=new WeakMap(),b=new WeakMap(),x=new WeakMap(),S=a4=>!!a4&&a4[aF(0x203)]===0x1,C=(a4,a5)=>{const aM=aF;if(!(a4!=null&&a4['querySelectorAll']))return[];let a6=Array['from'](a4['querySelectorAll'](a5));S(a4)&&a4['shadowRoot']&&a6[aM(0x21f)](...C(a4['shadowRoot'],a5));let a7=Array['from'](a4['querySelectorAll']('*'));for(let a8 of a7)a8['shadowRoot']&&a6['push'](...C(a8[aM(0x21a)],a5));return a6;},w=a4=>{const aN=aF;if(!a4)return null;let a5=S(a4)?y['get'](a4)||a4['__flyfishViewerSearchProvider']:null;if(a5)return a5;let a6=C(a4,'[data-viewer-search-provider]')[0x0];return a6&&(y['get'](a6)||a6[aN(0x20f)])||null;},T=(a4,a5)=>{b['set'](a4,a5),a4['dataset']['viewerZoomProvider']=a4['dataset']['viewerZoomProvider']||'custom',a4['__flyfishViewerZoomProvider']=a5;},E=a4=>{a4&&(b['delete'](a4),delete a4['dataset']['viewerZoomProvider'],delete a4['__flyfishViewerZoomProvider']);},D=a4=>{if(!a4)return null;let a5=S(a4)?b['get'](a4)||a4['__flyfishViewerZoomProvider']:null;if(a5)return a5;let a6=C(a4,'[data-viewer-zoom-provider]')[0x0];return a6&&(b['get'](a6)||a6['__flyfishViewerZoomProvider'])||null;},O=(a4,a5)=>{const aO=aF;x['set'](a4,a5),a4['dataset'][aO(0x206)]=a4['dataset']['viewerViewStateProvider']||'custom',a4[aO(0x1ff)]=a5;},k=a4=>{a4&&(x['delete'](a4),delete a4['dataset']['viewerViewStateProvider'],delete a4['__flyfishViewerViewStateProvider']);},A=a4=>{const aP=aF;if(!a4)return null;let a5=S(a4)?x['get'](a4)||a4['__flyfishViewerViewStateProvider']:null;if(a5&&(!S(a4)||a4[aP(0x226)]['viewerViewStateProvider']!=='generic'))return a5;let a6=C(a4,'[data-viewer-view-state-provider]'),a7=a6['find'](aa=>aa['dataset']['viewerViewStateProvider']!=='generic'),a8=a6['find'](aa=>aa[aP(0x226)]['viewerViewStateProvider']===aP(0x20b)),a9=a7||a8;return a9?x['get'](a9)||a9['__flyfishViewerViewStateProvider']||null:a5||null;},j=['auto','scroll','overlay'],M=a4=>Math['max'](0x0,a4['scrollHeight']-a4['clientHeight']),N=(a4,a5={})=>{const aQ=aF;var a6,a7;let a8=(a6=a5[aQ(0x1fa)])==null?0x2:a6;if(M(a4)<=a8)return!0x1;let a9=(a7=a4['ownerDocument'])==null?void 0x0:a7['defaultView'],aa=a9!=null&&a9[aQ(0x20c)]?a9:typeof window<'u'?window:void 0x0;if(!(aa!=null&&aa['getComputedStyle']))return!0x1;let ab=aa[aQ(0x20c)](a4),ac=ab[aQ(0x1f8)]||ab['overflow'];return(a5['overflowValues']||j)['includes'](ac);},P=(a4,a5={})=>{if(!a4)return null;let a6=a5['preferredSelector']||'[data-viewer-scroll-container],\x20.pdf-wrapper',a7=a5['candidateSelector']||'div,\x20section,\x20article,\x20pre',a8=a4['querySelector'](a6);return a8&&N(a8,a5)?a8:N(a4,a5)?a4:Array['from'](a4['querySelectorAll'](a7))['filter'](a9=>N(a9,a5))['sort']((a9,aa)=>M(aa)-M(a9))[0x0]||a8||a4;},F=a4=>({'scale':a4[aF(0x234)],'label':a4['label'],'canZoomIn':a4['canZoomIn'],'canZoomOut':a4['canZoomOut'],'canReset':a4[aF(0x212)],'minScale':a4[aF(0x1f5)],'maxScale':a4['maxScale']}),I=(a4,a5)=>{const aR=aF;let a6=n(a5||{});return a4['scale']=a6['scale'],a4['label']=a6['label'],a4[aR(0x223)]=a6['canZoomIn'],a4[aR(0x1f4)]=a6['canZoomOut'],a4['canReset']=a6['canReset'],a4['minScale']=a6[aR(0x1f5)],a4['maxScale']=a6['maxScale'],a4;},te=a4=>F(a4);(function(){var a4=a3(function*(a5,a6){return I(a5,yield a6()),te(a5);});return function(a5,a6){return a4['apply'](this,arguments);};}());var L=()=>{let a4=new Set();return{'emit'(){const aS=a1;a4[aS(0x1f9)](a5=>a5());},'subscribe'(a5){return a4['add'](a5),()=>{a4['delete'](a5);};}};},R=a4=>{var a5,a6;return((a6=(a5=a4==null?void 0x0:a4['ownerDocument'])==null?void 0x0:a5['defaultView'])==null?void 0x0:a6['MutationObserver'])||(typeof MutationObserver<'u'?MutationObserver:void 0x0);},z=({root:a4,enabled:a5,beforeZoom:a6,onChange:a7})=>{let a8=null,a9=null,aa=null,ab=!0x1,ac=n(),ad=()=>{a7==null||a7(F(ac));},af=()=>{a9==null||a9(),a9=null,a8=null,I(ac,null);},ag=()=>{const aT=a1;var aj,ak;if((a5==null?void 0x0:a5())===!0x1)return af(),null;let al=D(a4());return al!==a8&&(a9==null||a9(),a8=al,a9=((aj=al==null?void 0x0:al['subscribe'])==null?void 0x0:aj[aT(0x207)](al,()=>{I(ac,al['getState']()),ab||ad();}))||null),I(ac,((ak=al==null?void 0x0:al['getState'])==null?void 0x0:ak['call'](al))||null),al;},ah=()=>{aa==null||aa['disconnect'](),aa=null;},ai=(function(){var aj=a3(function*(ak,al){let am=ag();if(!am||a6&&(yield a6(ak))===!0x1)return F(ac);ab=!0x0;try{return I(ac,(yield al(am))||am['getState']()),F(ac);}finally{ab=!0x1;}});return function(ak,al){return aj['apply'](this,arguments);};}());return{get 'provider'(){return a8;},'state':ac,'hasProvider'(){return!!ag();},'refreshProvider':ag,'observe'(){ah();let aj=a4(),ak=R(aj);if(!aj||!ak){ag();return;}aa=new ak(()=>{ag();}),aa['observe'](aj,{'childList':!0x0,'subtree':!0x0}),ag();},'clearProvider':af,'getState'(){return F(ac);},'zoomIn':()=>ai('zoom-in',aj=>aj['zoomIn']()),'zoomOut':()=>ai('zoom-out',aj=>aj['zoomOut']()),'resetZoom':()=>ai('zoom-reset',aj=>aj['resetZoom']()),'destroy'(){ah(),af();}};},B=[aF(0x219),'contain','cover','width','height','actual',aF(0x21e)],V=['until-interaction','always','initial'],H='until-interaction',U=0x0,W=0x8,G=a4=>!!a4&&typeof a4=='object'&&!Array['isArray'](a4),K=a4=>typeof a4=='string'&&B['includes'](a4),q=a4=>typeof a4=='string'&&V['includes'](a4),J=a4=>{const aU=aF;let a5=Number(a4);return Number[aU(0x225)](a5)&&a5>0x0?a5:void 0x0;},Y=a4=>{let a5=Number(a4);return Number['isFinite'](a5)&&a5>0x0?a5:U;},X=a4=>{const aV=aF;if(a4==null||a4===!0x1)return null;if(K(a4))return{'mode':a4,'resize':H,'padding':U};if(!G(a4))return null;let a5=J(a4['minScale']),a6=J(a4['maxScale']),a7=a5!==void 0x0&&a6!==void 0x0&&a6<a5?a5:a6;return{'mode':K(a4['mode'])?a4['mode']:'auto','resize':q(a4['resize'])?a4['resize']:H,'padding':Y(a4[aV(0x220)]),'minScale':a5,'maxScale':a7};},Z=(a4,a5,a6)=>{const aW=aF;let a7=a4;return Number[aW(0x225)](a5)&&(a7=Math['max'](Number(a5),a7)),Number['isFinite'](a6)&&(a7=Math['min'](Number(a6),a7)),a7;},ne=({mode:a4,viewportWidth:a5,viewportHeight:a6,contentWidth:a7,contentHeight:a8,minScale:a9,maxScale:aa})=>{const aX=aF;if(a5<=0x0||a6<=0x0||a7<=0x0||a8<=0x0)return;let ab=a5/a7,ac=a6/a8,ad=Math['min'](ab,ac),af=Math[aX(0x200)](ab,ac),ag=((()=>{const aY=aX;switch(a4){case'cover':return af;case'width':return ab;case aY(0x218):return ac;case aY(0x21b):return 0x1;case'scale-down':return Math['min'](0x1,ad);default:return ad;}})());if(!(!Number['isFinite'](ag)||ag<=0x0))return Z(ag,a9,aa);},re=a4=>{const aZ=aF;var a5,a6;if(!a4)return!0x1;let a7=Number((a5=a4['scale'])==null?(a6=a4['zoom'])==null?void 0x0:a6['scale']:a5);if(Number[aZ(0x225)](a7)&&a7>0x0||Number['isFinite'](a4['page'])||Number['isFinite'](a4['rotation'])||a4['navigation']&&Object['keys'](a4[aZ(0x230)])[aZ(0x217)]>0x0||a4['extra']&&Object['keys'](a4[aZ(0x205)])['length']>0x0)return!0x0;let a8=a4[aZ(0x214)]||{};return['top',aZ(0x1f2),'topRatio',aZ(0x236)]['some'](a9=>{let aa=a8[a9];return Number['isFinite'](aa);});},Q=(a4,a5,a6=aF(0x22a),a7='none')=>({'applied':!0x1,'mode':a4['mode'],'resize':a4['resize'],'source':a6,'reason':a5,'provider':a7}),$=(a4,a5,a6)=>({'applied':!!(a4!=null&&a4['applied']),'mode':(a4==null?void 0x0:a4['mode'])||a5['mode'],'resize':(a4==null?void 0x0:a4['resize'])||a5[aF(0x216)],'scale':a4==null?void 0x0:a4['scale'],'source':(a4==null?void 0x0:a4['source'])||a5[aF(0x22d)],'reason':a4==null?void 0x0:a4['reason'],'provider':(a4==null?void 0x0:a4['provider'])||a6,'state':a4==null?void 0x0:a4['state']}),ie=a4=>a4===aF(0x221)||a4==='retry'||a4==='image-not-ready'||a4===aF(0x22c),ae=a4=>{const b0=aF;var a5;let a6=(a5=a4['getBoundingClientRect'])==null?void 0x0:a5['call'](a4);return{'width':Math['max'](0x0,(a6==null?void 0x0:a6['width'])||a4[b0(0x1fb)]||0x0),'height':Math['max'](0x0,(a6==null?void 0x0:a6['height'])||a4['clientHeight']||0x0)};},oe=({root:a4,enabled:a5,getFit:a6=()=>void 0x0,onFit:a7})=>{const b3=aF;let a8=null,a9=null,aa=null,ab=!0x1,ac=0x0,ad=()=>{var am;let an=a4();return((am=an==null?void 0x0:an['ownerDocument'])==null?void 0x0:am['defaultView'])||(typeof window<'u'?window:void 0x0);},af=()=>{if(a9===null)return;let am=ad();am!=null&&am['cancelAnimationFrame']&&am['cancelAnimationFrame'](a9),a9=null;},ag=()=>{aa&&clearTimeout(aa),aa=null;},ah=(am,an)=>{const b1=a1;let ao=am===void 0x0?a6():am;return ao==null?an==='api'?X(b1(0x219)):null:X(ao);},ai=(am,an,ao)=>{ac>=W||(ag(),ac+=0x1,aa=setTimeout(()=>{aa=null,aj(am,{'source':an,'reason':ao==='api'?'api':'retry'});},0x20*ac));},aj=(function(){var am=a3(function*(an,ao={}){const b2=a1;let ap=ao['source']||'api',aq=ao['reason']||'api',ar=ah(an,aq);if(!ar)return{'applied':!0x1,'mode':'auto','resize':H,'source':ap,'reason':'not-configured','provider':b2(0x237)};if((a5==null?void 0x0:a5())===!0x1)return Q(ar,'disabled',ap);let as=a4();if(!as)return ai(an,ap,aq),Q(ar,'no-root',ap);let at=ae(as);if(at['width']<=0x0||at['height']<=0x0)return ai(an,ap,aq),Q(ar,'zero-size',ap);let au=a2(a2({},ar),{},{'source':ap,'reason':aq,'viewportWidth':Math['max'](0x0,at[b2(0x228)]-ar['padding']*0x2),'viewportHeight':Math['max'](0x0,at[b2(0x218)]-ar[b2(0x220)]*0x2),'container':as}),av=A(as),aw=null;if(av!=null&&av['fit']){let az=$(yield av['fit'](au),au,'view-state');if(az['applied'])return ac=0x0,a7==null||a7(az),az;aw=az;}let ax=D(as);if(ax!=null&&ax['fit']){let aA=$(yield ax['fit'](au),au,'zoom');if(aA['applied'])return ac=0x0,a7==null||a7(aA),aA;aw=aA;}let ay=Q(ar,av||ax?b2(0x215):'no-provider',ap);return(ay['reason']==='no-provider'||ie(aw==null?void 0x0:aw['reason']))&&ai(an,ap,aq),ay;});return function(an){return am['apply'](this,arguments);};}()),ak=(am=b3(0x216))=>{const b4=b3;let an=X(a6());if(!an||an[b4(0x216)]==='initial'||an[b4(0x216)]==='until-interaction'&&ab)return;af();let ao=ad(),ap=()=>{a9=null,aj(void 0x0,{'source':'viewer','reason':am});};if(ao!=null&&ao['requestAnimationFrame']){a9=ao['requestAnimationFrame'](ap);return;}a9=setTimeout(ap,0x10);},al=()=>{af(),a8==null||a8['disconnect'](),a8=null;};return{'normalize':X,'fit':(function(){var am=a3(function*(an,ao){const b5=a1;return ag(),ab=!0x1,aj(an,{'source':(ao==null?void 0x0:ao['source'])||'api','reason':(ao==null?void 0x0:ao[b5(0x201)])||'api'});});return function(an,ao){return am['apply'](this,arguments);};}()),'applyInitialFit':(function(){var am=a3(function*(an={}){const b6=a1;return ag(),ac=0x0,ab=!0x1,an['skip']?Q(X(a6())||X('auto'),'initial-view-state','initial'):aj(void 0x0,{'source':'initial','reason':b6(0x22f)});});return function(){return am['apply'](this,arguments);};}()),'scheduleFit':ak,'observe'(){var am,an;al();let ao=a4(),ap=((an=(am=ao==null?void 0x0:ao['ownerDocument'])==null?void 0x0:am['defaultView'])==null?void 0x0:an['ResizeObserver'])||(typeof ResizeObserver<'u'?ResizeObserver:void 0x0);!ao||!ap||(a8=new ap(()=>ak('resize')),a8['observe'](ao));},'markUserInteraction'(){ab=!0x0,ag();},'resetAutoFit'(){ab=!0x1,ac=0x0;},'destroy'(){al(),ag(),ac=0x0;}};};export{ee as _,z as a,r as b,A as c,T as d,k as f,v as g,_ as h,L as i,D as l,g as m,re as n,P as o,E as p,ne as r,w as s,oe as t,O as u,o as v,i as y};
@@ -1 +1 @@
1
- const ak=g;(function(y,z){const aj=g,A=y();while(!![]){try{const B=parseInt(aj(0x123))/0x1*(parseInt(aj(0x11a))/0x2)+parseInt(aj(0x121))/0x3*(parseInt(aj(0x11c))/0x4)+-parseInt(aj(0x137))/0x5+-parseInt(aj(0x136))/0x6+-parseInt(aj(0x128))/0x7+parseInt(aj(0x12e))/0x8*(-parseInt(aj(0x125))/0x9)+parseInt(aj(0x11e))/0xa;if(B===z)break;else A['push'](A['shift']());}catch(C){A['push'](A['shift']());}}}(b,0x9ca24));import{t as j}from'./messages.js';import{d as k,i as q,p as v,r as w,x}from'./fit.js';function g(a,c){a=a-0x110;const d=b();let e=d[a];return e;}var o={'avif':'image/avif','bmp':ak(0x130),'gif':'image/gif','heic':'image/heic','heif':'image/heif','ico':'image/x-icon','jxl':'image/jxl','jpg':'image/jpeg','jpeg':'image/jpeg','png':'image/png','svg':ak(0x117),'tif':'image/tiff','tiff':'image/tiff','webp':'image/webp'},s=ak(0x131),c=y=>{const al=ak;let z=y['createElement'](al(0x135));return z[al(0x110)]=s,z;},l=y=>o[(y||'')['trim']()['toLowerCase']()]||'image/*',u=(function(){var y=x(function*(z){return yield new Promise((A,B)=>{const am=g;let C=new FileReader();C[am(0x139)]=D=>{const an=am;var E;let F=(E=D['target'])==null?void 0x0:E['result'];if(typeof F==an(0x129)){A(F);return;}B(Error('Unable\x20to\x20read\x20image\x20data\x20URL.'));},C['onerror']=()=>B(C['error']||Error(am(0x132))),C['readAsDataURL'](z);});});return function(z){const ao=g;return y[ao(0x134)](this,arguments);};}()),d=(function(){var y=x(function*(z,A){let B=(A||'')['trim']()['toLowerCase']();if(B==='heic'||B==='heif')throw Error('HEIC/HEIF\x20image\x20conversion\x20has\x20moved\x20out\x20of\x20@file-viewer/core.\x20Install\x20and\x20pass\x20@file-viewer/renderer-image,\x20or\x20use\x20@file-viewer/preset-all.');return u(new Blob([z],{'type':l(B)}));});return function(z,A){return y['apply'](this,arguments);};}()),f=y=>Number(y['toFixed'](0x3)),p=(y,z,A)=>{const ap=ak;let B=y[ap(0x114)]('div');B['className']='image-lightbox',B['hidden']=!0x0,B['setAttribute']('role',ap(0x133)),B['setAttribute']('aria-modal','true');let C=y[ap(0x114)]('img');C['alt']=A('image.lightbox.alt'),C['src']=z;let D=y['createElement']('button');D['type']='button',D[ap(0x113)]('aria-label',A('image.lightbox.close')),D['textContent']='x';let E=()=>{B['hidden']=!0x0;};return D['addEventListener']('click',E),C['addEventListener']('click',E),B['addEventListener']('click',F=>{F['target']===B&&E();}),B[ap(0x138)](C,D),{'element':B,'open'(){B['hidden']=!0x1;},'destroy'(){const aq=ap;D['removeEventListener']('click',E),C['removeEventListener'](aq(0x12a),E),B['remove']();}};};function m(y,z,A,B){const ar=ak;return h[ar(0x134)](this,arguments);}function h(){return h=x(function*(z,B,G,H){const as=g;var J,K;let L=j(H==null?void 0x0:H['options']),Q=B['ownerDocument']||document,R=yield d(z,G);(J=H==null?void 0x0:H['registerThumbnailAdapter'])==null||J['call'](H,{'capture':()=>new Blob([z],{'type':l(G)})});let U=0x1,V=0x1,W=0x1,X=0x0,Y=q(),Z=Q['createElement']('div');Z['className']='image-viewer',Z[as(0x12b)]['viewerZoomProvider']='image';let a0=Q['createElement']('div');a0[as(0x122)]=as(0x11f);let a1=Q['createElement']('img');a1['alt']=L(as(0x111)),a1['src']=R,a0['append'](a1),Z[as(0x138)](a0);let a2=p(Q,R,L),a3=()=>a2[as(0x120)]();a1['addEventListener']('click',a3);let a4=()=>Math['min'](0.1,V||0.1),a5=ac=>{let ad=a4();return Math['min'](0x5,Math['max'](ad,f(ac)));},a6=()=>{const at=as;let ac=a1[at(0x127)]||0x0,ad=a1['naturalHeight']||0x0;if(!ac||!ad)return 0x1;let ae=Math['max']((Z[at(0x11b)]||0x0)-0x30,0x1),af=Math['max']((Z['clientHeight']||X||0x0)-0x30,0x1);return Math['min'](0x1,ae/ac,af/ad);},a7=()=>{const au=as;if(V=a6(),W=a5(V*U),a1['naturalWidth']&&a1['naturalHeight']){a1[au(0x135)]['width']=Math['max'](0x1,Math['round'](a1['naturalWidth']*W))+'px',a1['style']['height']=Math['max'](0x1,Math[au(0x119)](a1['naturalHeight']*W))+'px';return;}a1['style']['width']='auto',a1[au(0x135)]['height']=X>0x0?Math['max'](0x1,Math['round'](X*U))+'px':U*0x64+'%';},a8=()=>{X=Z['clientHeight']||0x0,a7(),Y['emit']();},a9=new ResizeObserver(a8);a9[as(0x115)](Z),a1['addEventListener']('load',a8);let aa=()=>({'scale':W,'label':Math['round'](W*0x64)+'%','canZoomIn':W<0x5,'canZoomOut':W>a4(),'canReset':Math['abs'](U-0x1)>0.001,'minScale':a4(),'maxScale':0x5}),ab=ac=>(U=a5(ac)/Math['max'](V,0.001),a7(),Y[as(0x12d)](),aa());return k(Z,{'zoomIn':()=>ab(W+0.15),'zoomOut':()=>ab(W-0.15),'resetZoom':()=>(U=0x1,a7(),Y[as(0x12d)](),aa()),'setZoom':ab,'fit':ac=>{const av=as;var ad,ae;let af=a1[av(0x127)]||0x0,ag=a1['naturalHeight']||0x0;if(!af||!ag)return{'applied':!0x1,'mode':ac['mode'],'resize':ac[av(0x12c)],'source':ac['source'],'reason':'image-not-ready','provider':'zoom'};let ah=w({'mode':ac['mode']==='auto'?'scale-down':ac['mode'],'viewportWidth':Math['max'](0x1,ac['viewportWidth']||Z['clientWidth']||0x0),'viewportHeight':Math['max'](0x1,ac['viewportHeight']||Z['clientHeight']||X||0x0),'contentWidth':af,'contentHeight':ag,'currentScale':W,'minScale':(ad=ac[av(0x118)])==null?a4():ad,'maxScale':(ae=ac['maxScale'])==null?0x5:ae});if(!ah)return{'applied':!0x1,'mode':ac['mode'],'resize':ac['resize'],'source':ac['source'],'reason':av(0x12f),'provider':av(0x112)};let ai=ab(ah);return{'applied':!0x0,'mode':ac['mode'],'resize':ac['resize'],'scale':ai[av(0x124)],'source':ac['source'],'provider':'zoom'};},'getState':aa,'subscribe':Y[as(0x126)]}),B['replaceChildren'](c(Q),Z),(((K=H==null?void 0x0:H['surface'])==null?void 0x0:K['shadowRoot'])||B)['append'](a2[as(0x116)]),a8(),{'$el':B,'unmount'(){const aw=as;var ac;(ac=H==null?void 0x0:H['registerThumbnailAdapter'])==null||ac['call'](H,null),v(Z),a9[aw(0x11d)](),a1['removeEventListener']('load',a8),a1['removeEventListener'](aw(0x12a),a3),a2['destroy'](),B['replaceChildren']();}};}),h['apply'](this,arguments);}function b(){const ax=['subscribe','naturalWidth','1058568XrpAXw','string','click','dataset','resize','emit','16myLWvU','unmeasurable','image/bmp','\x0a.image-viewer{position:relative;width:100%;height:100%;overflow:auto;background:var(--file-viewer-render-surface-background,#eef1f4);box-sizing:border-box}\x0a.image-stage{min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}\x0a.image-stage\x20img{display:block;width:auto;max-width:none;margin:0\x20auto;border:0;box-shadow:0\x2018px\x2048px\x20rgba(15,23,42,.16);background:#fff;cursor:zoom-in}\x0a.image-lightbox{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:40px;background:rgba(15,23,42,.88);box-sizing:border-box}\x0a.image-lightbox[hidden]{display:none}\x0a.image-lightbox\x20img{display:block;max-width:100%;max-height:100%;object-fit:contain;background:#fff;box-shadow:0\x2030px\x2080px\x20rgba(0,0,0,.4);cursor:zoom-out}\x0a.image-lightbox\x20button{position:absolute;top:20px;right:20px;width:40px;height:40px;border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#172033;font-size:24px;line-height:40px;cursor:pointer;box-shadow:0\x2012px\x2028px\x20rgba(0,0,0,.18)}\x0a[data-viewer-theme=\x27dark\x27]\x20.image-viewer{background:var(--file-viewer-render-surface-background,#101820)}\x0a@media\x20(prefers-color-scheme:dark){[data-viewer-theme=\x27system\x27]\x20.image-viewer{background:var(--file-viewer-render-surface-background,#101820)}}\x0a@media\x20(max-width:767px){.image-stage{padding:12px}.image-lightbox{padding:16px}.image-lightbox\x20button{top:12px;right:12px}}\x0a','Unable\x20to\x20read\x20image\x20data\x20URL.','dialog','apply','style','2461710IZHdbV','625660fvjPxU','append','onload','textContent','image.alt','zoom','setAttribute','createElement','observe','element','image/svg+xml','minScale','round','46iGoptO','clientWidth','4EYOCNL','disconnect','9481750dEoLov','image-stage','open','3777063ZYTvJQ','className','3473DnTSjU','scale','4314879VKJMmC'];b=function(){return ax;};return b();}export{m as default};
1
+ const am=g;(function(x,y){const al=g,z=x();while(!![]){try{const A=-parseInt(al(0x76))/0x1+parseInt(al(0x85))/0x2*(-parseInt(al(0x7c))/0x3)+parseInt(al(0x6c))/0x4*(parseInt(al(0x88))/0x5)+parseInt(al(0x8a))/0x6+parseInt(al(0x94))/0x7*(-parseInt(al(0x83))/0x8)+parseInt(al(0x6e))/0x9*(parseInt(al(0x6a))/0xa)+parseInt(al(0x6d))/0xb;if(A===y)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(b,0xa6bc1));import{i as j,t}from'./messages.js';import{d as k,i as q,p as v,r as w}from'./fit.js';function g(a,c){a=a-0x67;const d=b();let e=d[a];return e;}function b(){const az=['round','2072tNksVY','13829651JcdhHn','9CeoUDi','element','unmeasurable','image-lightbox','auto','heif','alt','replaceChildren','700121DBpuDS','registerThumbnailAdapter','image/jxl','style','activeElement','maxScale','21KwrYKK','height','viewportWidth','naturalHeight','aria-hidden','true','string','636512aGzAIu','append','243458CjRubz','mode','setAttribute','495BzgIHs','surface','4279758BRTstZ','naturalWidth','textContent','options','addEventListener','dataset','max','destroy','image.lightbox.close','image/gif','35JtJtAG','subscribe','removeEventListener','observe','button','Unable\x20to\x20read\x20image\x20data\x20URL.','min','createElement','6111730pevRWg'];b=function(){return az;};return b();}var o={'avif':'image/avif','bmp':'image/bmp','gif':am(0x93),'heic':'image/heic','heif':'image/heif','ico':'image/x-icon','jxl':am(0x78),'jpg':'image/jpeg','jpeg':'image/jpeg','png':'image/png','svg':'image/svg+xml','tif':'image/tiff','tiff':'image/tiff','webp':'image/webp'},s='\x0a.image-viewer{position:relative;width:100%;height:100%;overflow:auto;background:var(--file-viewer-render-surface-background,#eef1f4);box-sizing:border-box}\x0a.image-stage{min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}\x0a.image-stage\x20img{display:block;width:auto;max-width:none;margin:0\x20auto;border:0;box-shadow:0\x2018px\x2048px\x20rgba(15,23,42,.16);background:#fff;cursor:zoom-in}\x0a.image-stage\x20img:focus-visible{outline:3px\x20solid\x20#2563eb;outline-offset:4px}\x0a.image-lightbox{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:40px;background:rgba(15,23,42,.9);box-sizing:border-box;opacity:0;visibility:hidden;pointer-events:none;transition:opacity\x20.18s\x20ease,visibility\x200s\x20linear\x20.18s}\x0a.image-lightbox[data-open=\x27true\x27]{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}\x0a.image-lightbox\x20img{display:block;max-width:100%;max-height:100%;object-fit:contain;background:#fff;box-shadow:0\x2030px\x2080px\x20rgba(0,0,0,.4);cursor:default;transform:scale(.985);transition:transform\x20.18s\x20ease}\x0a.image-lightbox[data-open=\x27true\x27]\x20img{transform:scale(1)}\x0a.image-lightbox\x20button{position:absolute;top:16px;right:16px;display:grid;width:40px;height:40px;place-items:center;padding:0;border:1px\x20solid\x20rgba(255,255,255,.7);border-radius:999px;background:rgba(255,255,255,.96);color:#172033;font:400\x2027px/1\x20Arial,sans-serif;cursor:pointer;box-shadow:0\x2012px\x2028px\x20rgba(0,0,0,.24);transition:background-color\x20.14s\x20ease,transform\x20.14s\x20ease}\x0a.image-lightbox\x20button:hover{background:#fff;transform:scale(1.04)}\x0a.image-lightbox\x20button:focus-visible{outline:3px\x20solid\x20#60a5fa;outline-offset:2px}\x0a[data-viewer-theme=\x27dark\x27]\x20.image-viewer{background:var(--file-viewer-render-surface-background,#101820)}\x0a@media\x20(prefers-color-scheme:dark){[data-viewer-theme=\x27system\x27]\x20.image-viewer{background:var(--file-viewer-render-surface-background,#101820)}}\x0a@media\x20(max-width:767px){.image-stage{padding:12px}.image-lightbox{padding:16px}.image-lightbox\x20button{top:12px;right:12px}}\x0a@media\x20(prefers-reduced-motion:reduce){.image-lightbox,.image-lightbox\x20img,.image-lightbox\x20button{transition:none}}\x0a',c=x=>{const an=am;let y=x[an(0x69)](an(0x79));return y[an(0x8c)]=s,y;},l=x=>o[(x||'')['trim']()['toLowerCase']()]||'image/*',u=(function(){var x=j(function*(y){return yield new Promise((z,A)=>{let B=new FileReader();B['onload']=C=>{const ao=g;var D;let E=(D=C['target'])==null?void 0x0:D['result'];if(typeof E==ao(0x82)){z(E);return;}A(Error(ao(0x67)));},B['onerror']=()=>A(B['error']||Error('Unable\x20to\x20read\x20image\x20data\x20URL.')),B['readAsDataURL'](y);});});return function(y){return x['apply'](this,arguments);};}()),d=(function(){var x=j(function*(y,z){const ap=g;let A=(z||'')['trim']()['toLowerCase']();if(A==='heic'||A===ap(0x73))throw Error('HEIC/HEIF\x20image\x20conversion\x20has\x20moved\x20out\x20of\x20@file-viewer/core.\x20Install\x20and\x20pass\x20@file-viewer/renderer-image,\x20or\x20use\x20@file-viewer/preset-all.');return u(new Blob([y],{'type':l(A)}));});return function(y,z){return x['apply'](this,arguments);};}()),f=x=>Number(x['toFixed'](0x3)),p=(x,y,z)=>{const aq=am;let A=x['createElement']('div');A['className']=aq(0x71),A[aq(0x8f)]['open']='false',A[aq(0x87)]('role','dialog'),A['setAttribute']('aria-modal','true'),A[aq(0x87)]('aria-hidden','true');let B=x['createElement']('img');B['alt']=z('image.lightbox.alt'),B['src']=y;let C=x['createElement']('button');C['type']='button',C['setAttribute']('aria-label',z(aq(0x92))),C['textContent']='×';let D=null,E=()=>{const ar=aq;A['dataset']['open']==='true'&&(A['dataset']['open']='false',A['setAttribute'](ar(0x80),ar(0x81)),D!=null&&D['isConnected']&&D['focus']({'preventScroll':!0x0}),D=null);},F=G=>{G['key']==='Escape'&&A['dataset']['open']==='true'&&(G['preventDefault'](),E());};return C['addEventListener']('click',E),A[aq(0x8e)]('click',G=>{G['target']===A&&E();}),x['addEventListener']('keydown',F),A['append'](B,C),{'element':A,'open'(G){const as=aq;D=G||(x[as(0x7a)]instanceof HTMLElement?x['activeElement']:null),A['dataset']['open']='true',A[as(0x87)]('aria-hidden','false'),C['focus']({'preventScroll':!0x0});},'destroy'(){const at=aq;C['removeEventListener']('click',E),x[at(0x96)]('keydown',F),A['remove']();}};};function m(x,y,z,A){return h['apply'](this,arguments);}function h(){return h=j(function*(z,B,G,H){const au=g;var J,K;let Q=t(H==null?void 0x0:H[au(0x8d)]),R=B['ownerDocument']||document,U=yield d(z,G);(J=H==null?void 0x0:H[au(0x77)])==null||J['call'](H,{'capture':()=>new Blob([z],{'type':l(G)})});let V=0x1,W=0x1,X=0x1,Y=0x0,Z=q(),a0=R['createElement']('div');a0['className']='image-viewer',a0['dataset']['viewerZoomProvider']='image';let a1=R['createElement']('div');a1['className']='image-stage';let a2=R['createElement']('img');a2[au(0x74)]=Q('image.alt'),a2['src']=U,a2['tabIndex']=0x0,a2['setAttribute']('role',au(0x98)),a2['setAttribute']('aria-haspopup','dialog'),a1[au(0x84)](a2),a0['append'](a1);let a3=p(R,U,Q),a4=()=>a3['open'](a2),a5=ae=>{(ae['key']==='Enter'||ae['key']==='\x20')&&(ae['preventDefault'](),a3['open'](a2));};a2['addEventListener']('click',a4),a2['addEventListener']('keydown',a5);let a6=()=>Math['min'](0.1,W||0.1),a7=ae=>{const av=au;let af=a6();return Math[av(0x68)](0x5,Math['max'](af,f(ae)));},a8=()=>{let ae=a2['naturalWidth']||0x0,af=a2['naturalHeight']||0x0;if(!ae||!af)return 0x1;let ag=Math['max']((a0['clientWidth']||0x0)-0x30,0x1),ah=Math['max']((a0['clientHeight']||Y||0x0)-0x30,0x1);return Math['min'](0x1,ag/ae,ah/af);},a9=()=>{const aw=au;if(W=a8(),X=a7(W*V),a2['naturalWidth']&&a2['naturalHeight']){a2['style']['width']=Math['max'](0x1,Math['round'](a2['naturalWidth']*X))+'px',a2['style'][aw(0x7d)]=Math['max'](0x1,Math[aw(0x6b)](a2['naturalHeight']*X))+'px';return;}a2['style']['width']='auto',a2['style']['height']=Y>0x0?Math['max'](0x1,Math[aw(0x6b)](Y*V))+'px':V*0x64+'%';},aa=()=>{Y=a0['clientHeight']||0x0,a9(),Z['emit']();},ab=new ResizeObserver(aa);ab[au(0x97)](a0),a2[au(0x8e)]('load',aa);let ac=()=>({'scale':X,'label':Math['round'](X*0x64)+'%','canZoomIn':X<0x5,'canZoomOut':X>a6(),'canReset':Math['abs'](V-0x1)>0.001,'minScale':a6(),'maxScale':0x5}),ad=ae=>(V=a7(ae)/Math[au(0x90)](W,0.001),a9(),Z['emit'](),ac());return k(a0,{'zoomIn':()=>ad(X+0.15),'zoomOut':()=>ad(X-0.15),'resetZoom':()=>(V=0x1,a9(),Z['emit'](),ac()),'setZoom':ad,'fit':ae=>{const ax=au;var af,ag;let ah=a2[ax(0x8b)]||0x0,ai=a2[ax(0x7f)]||0x0;if(!ah||!ai)return{'applied':!0x1,'mode':ae['mode'],'resize':ae['resize'],'source':ae['source'],'reason':'image-not-ready','provider':'zoom'};let aj=w({'mode':ae['mode']===ax(0x72)?'scale-down':ae['mode'],'viewportWidth':Math['max'](0x1,ae[ax(0x7e)]||a0['clientWidth']||0x0),'viewportHeight':Math['max'](0x1,ae['viewportHeight']||a0['clientHeight']||Y||0x0),'contentWidth':ah,'contentHeight':ai,'currentScale':X,'minScale':(af=ae['minScale'])==null?a6():af,'maxScale':(ag=ae[ax(0x7b)])==null?0x5:ag});if(!aj)return{'applied':!0x1,'mode':ae[ax(0x86)],'resize':ae['resize'],'source':ae['source'],'reason':ax(0x70),'provider':'zoom'};let ak=ad(aj);return{'applied':!0x0,'mode':ae['mode'],'resize':ae['resize'],'scale':ak['scale'],'source':ae['source'],'provider':'zoom'};},'getState':ac,'subscribe':Z[au(0x95)]}),B['replaceChildren'](c(R),a0),(((K=H==null?void 0x0:H[au(0x89)])==null?void 0x0:K['shadowRoot'])||B)['append'](a3[au(0x6f)]),aa(),{'$el':B,'unmount'(){const ay=au;var ae;(ae=H==null?void 0x0:H['registerThumbnailAdapter'])==null||ae['call'](H,null),v(a0),ab['disconnect'](),a2['removeEventListener']('load',aa),a2['removeEventListener']('click',a4),a2[ay(0x96)]('keydown',a5),a3[ay(0x91)](),B[ay(0x75)]();}};}),h['apply'](this,arguments);}export{m as default};