/*! IDRViewer - v1.12.0 | Copyright 2021 IDRsolutions */ !function(){"use strict";var g,p,m,h,L={LAYOUT_PRESENTATION:"presentation",LAYOUT_MAGAZINE:"magazine",LAYOUT_CONTINUOUS:"continuous",SELECT_SELECT:"select",SELECT_PAN:"pan",ZOOM_SPECIFIC:"specific",ZOOM_ACTUALSIZE:"actualsize",ZOOM_FITWIDTH:"fitwidth",ZOOM_FITHEIGHT:"fitheight",ZOOM_FITPAGE:"fitpage",ZOOM_AUTO:"auto"},v=1,b=0,T=[],y=10,r=!1;L.setup=function(e){e=e||IDRViewer.config,r=!0,h=e.bounds,b=e.pagecount,(v<1||bn&&(n=h[e][0]),h[e][1]>o&&(o=h[e][1])},t.unload=function(){p.removeEventListener("scroll",i)};var i=function(){O.stopLoading(),e()},e=function(){var e;if(0h[e-1][1]?0:n)&&(n=h[e-1][1]-n)}t=C.getZoom();p.scrollTop=T[e].offsetTop-5+n*t,l.updatePage(e),r()},t.getVisiblePages=function(){return a},t.updateLayout=function(){},t.isLastPage=function(e){return e===b},t.getZoomBounds=function(){return{width:n,height:o}},t.getAutoZoom=function(e){return t.getZoomBounds().width>p.clientWidth-y?e:1},t.next=function(){L.goToPage(v+1)},t.prev=function(){L.goToPage(v-1)},t.toString=function(){return IDRViewer.LAYOUT_CONTINUOUS},t}());var c=function(){var t,n,o,a,e={},i=!1;e.setup=function(){switch((a=document.createElement("div")).id="overlay",g.parentNode.insertBefore(a,g),o){case IDRViewer.SELECT_PAN:case IDRViewer.SELECT_SELECT:break;default:o=IDRViewer.SELECT_SELECT}this.currentSelectMode=o,this.currentSelectMode==L.SELECT_SELECT?e.enableTextSelection():e.enablePanning()},e.enableTextSelection=function(){this.currentSelectMode=L.SELECT_SELECT,A.removeClass(a,"panning"),a.removeEventListener("mousedown",r),document.removeEventListener("mouseup",s),a.removeEventListener("mousemove",u)};var r=function(e){return e=e||window.event,A.addClass(a,"mousedown"),t=e.clientX,n=e.clientY,!(i=!0)},s=function(){A.removeClass(a,"mousedown"),i=!1},u=function(e){if(i)return e=e||window.event,p.scrollLeft=p.scrollLeft+t-e.clientX,p.scrollTop=p.scrollTop+n-e.clientY,t=e.clientX,n=e.clientY,!1};return e.enablePanning=function(){this.currentSelectMode=L.SELECT_PAN,E.clearSelection(),A.addClass(a,"panning"),a.addEventListener("mousedown",r),document.addEventListener("mouseup",s),a.addEventListener("mousemove",u)},e.setDefaultMode=function(e){o=e},e}();L.setSelectMode=function(e){r?(e==L.SELECT_SELECT?c.enableTextSelection():c.enablePanning(),L.fire("selectchange",{type:e})):c.setDefaultMode(e)};var d,C=function(){var s,u,t,e={},l=L.ZOOM_AUTO,i=[.25,.5,.75,1,1.25,1.5,2,2.5,3,3.5,4],r=[L.ZOOM_AUTO,L.ZOOM_FITPAGE,L.ZOOM_FITHEIGHT,L.ZOOM_FITWIDTH,L.ZOOM_ACTUALSIZE],c=0,d=1;e.setup=function(){var e=document.createElement("style");e.setAttribute("type","text/css"),document.head.appendChild(e),u=e.sheet,window.addEventListener("resize",function(){f()}),f(t)};var f=function(e){O.stopLoading();var t=!1,n=!1;4<=(d=g(e))?(d=4,n=!0):d<=.25&&(d=.25,t=!0);var o=p.scrollTop/p.scrollHeight;m.updateLayout();for(var a=m.getVisiblePages(),i=1;i<=b;i++)-1===a.indexOf(i)&&O.hide(i);s&&u.deleteRule(s);e=function(e,t,n,o){n=o?"translate3d("+e+"px, "+t+"px, 0) scale("+n+")":"translateX("+e+"px) translateY("+t+"px) scale("+n+")";return"-webkit-transform: "+n+";\n-ms-transform: "+n+";\ntransform: "+n+";"}(0,0,d,!1);s=u.insertRule(".page-inner { \n"+e+"\n}",u.cssRules.length);for(var r=0;r