⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
ef.electronharmony.com
/
1
/
T9
/
build
/
js
/
View File Name :
flipbook.min.js
"use strict";var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.version="4.10.4",function(t,e,i){"undefined"!=typeof jQuery&&(jQuery.fn.flipBook=function(t){return new FLIPBOOK.Main(t,this)},jQuery.fn.swipeBook=function(t){return t.viewMode="swipe",new FLIPBOOK.Main(t,this)}),t.FlipBook=function(t,e){return new FLIPBOOK.Main(e,t)}}(window,document),FLIPBOOK.Main=class{static defaultOptions={name:"",pages:[],tableOfContent:[],tableOfContentCloseOnClick:!0,thumbsCloseOnClick:!0,thumbsStyle:"overlay",deeplinkingEnabled:!1,deeplinkingPrefix:"",assets:{preloader:"assets/images/preloader.jpg",flipMp3:"assets/mp3/turnPage.mp3",spinner:"assets/images/spinner.gif",backgroundMp3:"assets/mp3/background.mp3"},pdfUrl:null,pdfBrowserViewerIfMobile:!1,pdfBrowserViewerIfIE:!1,pdfBrowserViewerFullscreen:!0,pdfBrowserViewerFullscreenTarget:"_blank",rangeChunkSize:64,disableRange:!1,disableStream:!0,disableAutoFetch:!0,pdfAutoLinks:!1,htmlLayer:!0,rightToLeft:!1,startPage:0,sound:!0,backgroundColor:"rgb(81, 85, 88)",backgroundImage:"",backgroundPattern:"",backgroundTransparent:!1,thumbSize:150,loadAllPages:!1,loadPagesF:2,loadPagesB:1,autoplayOnStart:!1,autoplayInterval:3e3,autoplayLoop:!0,skin:"",menuOverBook:!1,menuFloating:!1,menuBackground:"",menuShadow:"",menuMargin:0,menuPadding:0,menuTransparent:!1,menu2OverBook:!0,menu2Floating:!1,menu2Background:"",menu2Shadow:"",menu2Margin:0,menu2Padding:0,menu2Transparent:!0,skinColor:"#222",skinColorHover:"#111",skinBackground:"#FFF",floatingBtnColor:"#FFF",floatingBtnBackground:"#00000055",btnColor:"",btnBackground:"none",btnSize:18,btnRadius:2,btnMargin:2,btnPaddingV:10,btnPaddingH:10,btnShadow:"",btnTextShadow:"",btnBorder:"",btnColorHover:"",btnBackgroundHover:"",arrowColor:"#FFF",arrowColorHover:"#FFF",arrowBackground:"rgba(0, 0, 0, 0)",arrowBackgroundHover:"rgba(0, 0, 0, .15)",arrowSize:40,arrowRadius:4,arrowMargin:4,arrowPadding:10,arrowTextShadow:"0px 0px 1px rgba(0, 0, 0, 1)",arrowBorder:"",floatingBtnColorHover:"",floatingBtnBackgroundHover:"",floatingBtnSize:null,floatingBtnRadius:null,floatingBtnMargin:null,floatingBtnPadding:null,floatingBtnShadow:"",floatingBtnTextShadow:"",floatingBtnBorder:"",btnOrder:["currentPage","progressBar","btnFirst","btnPrev","btnNext","btnLast","btnZoomOut","btnZoomIn","btnThumbs","btnToc","search","btnRotateLeft","btnRotateRight","btnAutoplay","btnSearch","btnBookmark","btnDownloadPages","btnShare","btnPrint","btnDownloadPdf","btnSound","btnTools","btnSingle","btnExpand","btnClose"],currentPage:{enabled:!0,title:"Current page",vAlign:"top",hAlign:"left",marginH:0,marginV:0,color:"",background:""},progressBar:{enabled:!0,vAlign:"bottom",height:5,color:"",background:""},search:{enabled:!1},btnFirst:{enabled:!1,title:"First page",svg:"last",iconReverse:!0},btnPrev:{enabled:!0,title:"Previous page",svg:"next",iconReverse:!0},btnNext:{enabled:!0,title:"Next page"},btnLast:{enabled:!1,title:"Last page"},btnZoomIn:{enabled:!0,title:"Zoom in",svg:"plus"},btnZoomOut:{enabled:!0,title:"Zoom out",svg:"minus"},btnRotateLeft:{enabled:!1,title:"Rotate left"},btnRotateRight:{enabled:!1,title:"Rotate right"},btnAutoplay:{enabled:!0,title:"Autoplay",svg:"play",svgAlt:"pause"},btnSearch:{enabled:!1,title:"Search"},btnBookmark:{enabled:!0,title:"Bookmarks"},btnNotes:{enabled:!1,title:"Notes"},btnToc:{enabled:!0,title:"Table of Contents",svg:"list"},btnThumbs:{enabled:!0,title:"Pages"},btnShare:{enabled:!0,title:"Share"},btnPrint:{enabled:!0,title:"Print",toolsMenu:!0},btnDownloadPages:{enabled:!0,title:"Download",url:"",name:"",svg:"download",toolsMenu:!0},btnDownloadPdf:{forceDownload:!1,enabled:!0,title:"View PDF",url:null,openInNewWindow:!0,name:"allPages.pdf",svg:"pdf",toolsMenu:!0},btnSound:{enabled:!0,title:"Sound",svgAlt:"mute",toolsMenu:!0},btnTools:{enabled:!0,title:"Tools"},btnExpand:{enabled:!0,title:"Toggle fullscreen",svgAlt:"compress"},btnSingle:{enabled:!0,title:"Toggle single page",svgAlt:"double",toolsMenu:!0},btnClose:{title:"Close",hAlign:"right",vAlign:"top",size:20},sideNavigationButtons:!0,hideMenu:!1,shareUrl:null,shareTitle:null,shareImage:null,whatsapp:{enabled:!0,title:"WhatsApp"},twitter:{enabled:!0,title:"X (Twitter)"},facebook:{enabled:!0,title:"Facebook"},pinterest:{enabled:!0,title:"Pinterest"},email:{enabled:!0,title:"Email"},linkedin:{enabled:!0,title:"LinkedIn"},digg:{enabled:!1,title:"Digg"},reddit:{enabled:!1,title:"Reddit"},copyLink:{enabled:!0},pdf:{annotationLayer:!1},pageTextureSize:3e3,pageTextureSizeSmall:1500,thumbTextureSize:300,pageTextureSizeMobile:1500,pageTextureSizeMobileSmall:1e3,pagesInMemory:20,viewMode:"webgl",singlePageMode:!1,singlePageModeIfMobile:!1,bookMargin:20,zoomMin:.95,zoomMin2:.15,zoomMax2:null,zoomSize:null,zoomStep:1.5,zoomTime:300,zoomReset:!1,zoomResetTime:300,wheelDisabledNotFullscreen:!1,arrowsDisabledNotFullscreen:!1,arrowsAlwaysEnabledForNavigation:!0,responsiveView:!0,responsiveViewRatio:1,responsiveViewTreshold:768,responsiveContainer:!0,minPixelRatio:1,pageFlipDuration:1,contentOnStart:!1,thumbnailsOnStart:!1,searchOnStart:!1,sideMenuOverBook:!0,sideMenuOverMenu:!1,sideMenuOverMenu2:!0,sideMenuPosition:"left",lightBox:!1,lightBoxOpened:!1,lightBoxFullscreen:!1,lightboxResetOnOpen:!0,lightboxBackground:null,lightboxBackgroundColor:null,lightboxBackgroundPattern:null,lightboxBackgroundImage:null,lightboxStartPage:null,lightboxMarginV:"0",lightboxMarginH:"0",lightboxCSS:"",lightboxPreload:!1,lightboxShowMenu:!1,lightboxCloseOnBack:!0,lightboxFromStart:!0,disableImageResize:!0,pan:0,panMax:10,panMax2:2,panMin:-10,panMin2:-2,tilt:0,tiltMax:0,tiltMax2:0,tiltMin:0,tiltMin2:-5,rotateCameraOnMouseMove:!1,rotateCameraOnMouseDrag:!0,lights:!0,lightColor:16777215,lightPositionX:0,lightPositionY:150,lightPositionZ:1400,lightIntensity:.6,shadows:!0,shadowMapSize:1024,shadowOpacity:.3,pageRoughness:1,pageMetalness:0,pageHardness:2,coverHardness:2,pageSegmentsW:10,pageSegmentsH:1,pageMiddleShadowSize:4,pageMiddleShadowColorL:"#7E7E7E",pageMiddleShadowColorR:"#AAAAAA",antialias:!1,bitmapResizeHeight:null,bitmapResizeQuality:"medium",preloaderText:"",fillPreloader:{enabled:!1,imgEmpty:"images/logo_light.png",imgFull:"images/logo_dark.png"},logoImg:"",logoUrl:"",logoCSS:"position:absolute;",logoHideOnMobile:!1,printMenu:!0,downloadMenu:!0,cover:!0,backCover:!0,pdfTextLayer:!0,annotationLayer:!0,googleAnalyticsTrackingCode:null,linkColor:"rgba(0, 0, 0, 0)",linkColorHover:"rgba(255, 255, 0, 1)",linkOpacity:.4,linkTarget:"_blank",rightClickEnabled:!0,pageNumberOffset:0,flipSound:!0,backgroundMusic:!1,doubleClickZoomDisabled:!1,pageDragDisabled:!1,pageClickAreaWdith:"10%",noteTypes:[{id:1,title:"User",color:"green",enabled:!0},{id:2,title:"Group",color:"yellow",enabled:!0},{id:3,title:"Admin",color:"blue",enabled:!0}],pageRangeStart:null,pageRangeEnd:null,previewMode:{},strings:{print:"Print",printLeftPage:"Print left page",printRightPage:"Print right page",printCurrentPage:"Print current page",printAllPages:"Print all pages",download:"Download",downloadLeftPage:"Download left page",downloadRightPage:"Download right page",downloadCurrentPage:"Download current page",downloadAllPages:"Download all pages",bookmarks:"Bookmarks",bookmarkLeftPage:"Bookmark left page",bookmarkRightPage:"Bookmark right page",bookmarkCurrentPage:"Bookmark current page",search:"Search",findInDocument:"Find in document",pagesFoundContaining:"pages found containing",noMatches:"No matches",matchesFound:"matches found",page:"Page",matches:"matches",thumbnails:"Thumbnails",tableOfContent:"Table of Contents",share:"Share",notes:"Notes",pressEscToClose:"Press ESC to close",password:"Password",addNote:"Add note",typeInYourNote:"Type in your note...",copyLink:"Copy link",copied:"Copied"},mobile:{shadows:!1,pageSegmentsW:5,btnAutoplay:{toolsMenu:!0},btnBookmark:{toolsMenu:!0},btnZoomIn:{enabled:!1},btnZoomOut:{enabled:!1},btnFirst:{enabled:!1},btnLast:{enabled:!1},currentPage:{enabled:!1},pagesInMemory:6}};constructor(t,e){e.length?(this.elem=e[0],this.elements=Array.from(e)):(this.elem=e,this.elements=[e]),void 0===FLIPBOOK.hasWebGl&&(FLIPBOOK.hasWebGl=function(){const t=document.createElement("canvas");return(t.getContext("webgl")||t.getContext("experimental-webgl"))instanceof WebGLRenderingContext}()),this.hasWebGl=FLIPBOOK.hasWebGl,this.thumbsShowing=!1,this.bookmarkShowing=!1,this.searchingString=!1,this.tocShowing=!1,this.menuShowing=!0,this.fullscreenActive=!1;const i={2:{currentPage:{vAlign:"bottom",hAlign:"center"},btnAutoplay:{hAlign:"right",vAlign:"top"},btnSound:{hAlign:"right",vAlign:"top"},btnSingle:{hAlign:"right",vAlign:"top"},btnExpand:{hAlign:"right",vAlign:"top"},btnSearch:{hAlign:"left",vAlign:"top"},btnBookmark:{hAlign:"left",vAlign:"top"},btnToc:{hAlign:"left",vAlign:"top"},btnThumbs:{hAlign:"left",vAlign:"top"},btnShare:{hAlign:"right",vAlign:"top"},btnPrint:{hAlign:"right",vAlign:"top"},btnDownloadPages:{hAlign:"right",vAlign:"top"},btnDownloadPdf:{hAlign:"right",vAlign:"top"},btnTools:{hAlign:"right",vAlign:"top"},menuTransparent:!0},3:{menuTransparent:!0,menu2Transparent:!1,menu2OverBook:!1,menu2Padding:5,btnMargin:5,currentPage:{vAlign:"top",hAlign:"center"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnThumbs:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnSearch:{vAlign:"top",hAlign:"left"},btnShare:{vAlign:"top",hAlign:"right"},btnAutoplay:{vAlign:"top",hAlign:"right"},btnSingle:{vAlign:"top",hAlign:"right"},btnExpand:{vAlign:"top",hAlign:"right"},btnZoomIn:{hAlign:"right"},btnZoomOut:{hAlign:"right"},btnSound:{vAlign:"top",hAlign:"right"},btnTools:{vAlign:"top",hAlign:"right"},menuPadding:5},4:{menu2Transparent:!1,menu2OverBook:!1,sideMenuOverMenu2:!1,currentPage:{vAlign:"top",hAlign:"center"},btnAutoplay:{vAlign:"top",hAlign:"left"},btnSound:{vAlign:"top",hAlign:"left"},btnSingle:{vAlign:"top",hAlign:"right"},btnExpand:{vAlign:"top",hAlign:"right"},btnZoomIn:{vAlign:"top"},btnZoomOut:{vAlign:"top"},btnSearch:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnThumbs:{vAlign:"top",hAlign:"left"},btnShare:{vAlign:"top",hAlign:"right"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnTools:{vAlign:"top",hAlign:"right"}}},o={dark:{skinColor:"#EEE",btnColorHover:"#FFF",skinBackground:"#313538"},gradient:{skinColor:"#EEE",btnColor:"#EEE",btnColorHover:"#FFF",skinBackground:"rgba(0,0,0,.7)",menuOverBook:!0,menu2OverBook:!0,sideMenuOverMenu:!0,sideMenuOverMenu2:!0,menuBackground:"linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%)",menu2Background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%)"}};t.skin&&o[t.skin]&&(t=FLIPBOOK.extend(!0,{},t,o[t.skin])),t.layout&&i[t.layout]&&(t=FLIPBOOK.extend(!0,{},t,i[t.layout])),this.options=FLIPBOOK.extend(!0,{},FLIPBOOK.Main.defaultOptions,t),FLIPBOOK.count=FLIPBOOK.count||0,FLIPBOOK.count++,this.uniqueID=FLIPBOOK.count,this.options.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),this.options.isMobile&&FLIPBOOK.extend(!0,this.options,this.options.mobile),this.initOptions(this.options)}initOptions(t){const e=this;if(this.strings=t.strings,t.pageShininess=t.pageShininess/2,this.s=0,t.isMobile&&(t.singlePageMode=!!t.singlePageModeIfMobile||t.singlePageMode,t.viewModeMobile&&(t.viewMode=t.viewModeMobile),t.pageTextureSizeMobile&&(t.pageTextureSize=t.pageTextureSizeMobile),t.pageTextureSizeMobileSmall&&(t.pageTextureSizeSmall=t.pageTextureSizeMobileSmall)),"3dSinglePage"==t.viewMode&&(t.singlePageMode=!0),"2dSinglePage"==t.viewMode&&(t.singlePageMode=!0,t.viewMode="2d"),t.singlePageMode&&("2d"!=t.viewMode&&"swipe"!=t.viewMode&&(t.viewMode="3d"),t.rightToLeft&&(t.viewMode="swipe"),t.cover=!0),t.singlePageMode&&"3d"==t.viewMode&&(t.rightToLeft=!1),"simple"==t.viewMode&&(t.viewMode="3d",t.instantFlip=!0),t.cover||(t.responsiveView=!1),t.webgl){var i={a:5,b:6,c:2};t.pageTextureSize=Math.pow(i.a*i.b-i.c,i.c),t.pageTextureSizeSmall=Math.pow(i.a*i.b-i.c,i.c),t.zoomSize=Math.pow(i.b*i.a+i.a,i.c)}Object.assign(t,{e:"toString",f:"padStart",g:"decodeURIComponent",h:97,i:16}),t.sideMenuPosition=t.rightToLeft?"right":"left","webgl"==t.viewMode&&(this.hasWebGl||(t.viewMode="3d")),"webgl"!=t.viewMode&&"scroll"!=t.viewMode&&"swipe"!=t.viewMode||(t.btnSingle.enabled=!1),this.webgl="webgl"==t.viewMode,t.menuFloating&&(t.menuOverBook=!0,t.sideMenuOverMenu=!0),t.menu2Floating&&(t.menu2OverBook=!0,t.sideMenuOverMenu2=!0),t.menuTransparent&&(t.menuOverBook=!0,t.sideMenuOverMenu=!0,t.menuBackground="none"),t.menu2Transparent?(t.menu2OverBook=!0,t.sideMenuOverMenu2=!0,t.menu2Background="none"):t.sideMenuOverMenu2=!1,t.menuOverBook&&(t.sideMenuOverMenu=!0),t.menu2OverBook&&(t.sideMenuOverMenu2=!0),t.pdfMode=Boolean(t.pdfUrl||t.pdfBase64),t.backgroundTransparent&&(t.backgroundColor="none"),this.options.containerRatio=function(t){if(void 0!==t){if("number"==typeof t)return t;if((t=String(t).trim().replace("/",":")).includes(":")){const e=t.split(":");return parseFloat(e[0])/parseFloat(e[1])}return parseFloat(t)}}(this.options.containerRatio),this.wrapper=document.createElement("div"),this.wrapper.classList.add("flipbook-main-wrapper");let o={};if(t.skinColor&&(o.color=t.skinColor),t.skinBackground&&(o.bg=t.skinBackground),t.skin&&Object.assign(o,{light:{color:"#222",bg:"#fff"},dark:{color:"rgba(255, 255, 255, 0.75)",bg:"rgb(49, 53, 56)"},gradient:{color:"#eee",bg:"rgba(30,30,30,.8)"},twilight:{color:"#feffd3",bg:"#141414"},darkGrey:{color:"#9e9e9e",bg:"#212121"},lightGrey:{color:"#757575",bg:"#e0e0e0"}}[t.skin]),this.wrapper.style.setProperty("--flipbook-bg",o.bg),this.wrapper.style.setProperty("--flipbook-color",o.color),this.tooltip2=new FLIPBOOK.Tooltip2(this.wrapper),""!==t.backgroundColor&&(this.wrapper.style.background=t.backgroundColor),""!==t.backgroundPattern&&(this.wrapper.style.background=`url(${t.backgroundPattern}) repeat`),""!==t.backgroundImage&&(this.wrapper.style.background=`url(${t.backgroundImage}) no-repeat`,this.wrapper.style.backgroundSize="cover",this.wrapper.style.backgroundPosition="center center"),this.bookLayer=document.createElement("div"),this.bookLayer.classList.add("flipbook-bookLayer"),this.wrapper.appendChild(this.bookLayer),t.pageDragDisabled&&(this.bookLayer.style.cursor="auto"),"spotlight"===t.linkTarget&&this.bookLayer.addEventListener("click",(t=>{"a"===t.target.tagName.toLowerCase()&&(t.preventDefault(),this.spotlight(t.target.href))})),t.rightClickEnabled||this.bookLayer.addEventListener("contextmenu",(function(t){t.preventDefault()})),t.hideMenu&&(this.bookLayer.style.bottom="0",t.menuOverBook=!0),t.pagesOriginal=JSON.parse(JSON.stringify(t.pages)),this.book=document.createElement("div"),this.book.classList.add("book"),this.bookLayer.appendChild(this.book),t.preloader&&"undefined"!=typeof jQuery)this.preloader=jQuery(t.preloader);else{this.preloader=document.createElement("div"),this.preloader.classList.add("flipbook-preloader","cssload-container");var n=document.createElement("div");n.classList.add("cssload-speeding-wheel"),this.preloader.appendChild(n);var s=document.createElement("div");s.classList.add("flipbook-loading-text"),s.textContent=t.preloaderText,this.preloader.appendChild(s);var a=document.createElement("div");a.classList.add("flipbook-loading-bg"),this.preloader.appendChild(a)}this.setLoadingProgress(0),this.dispose=function(){this.disposed=!0},t.main=this,this._events={},this.on=function(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)},this.off=function(t,e){if(this._events[t]){var i=this._events[t].indexOf(e);i>-1&&this._events[t].splice(i,1)}},this.trigger=function(t){if(this._events[t]){var e=0,i=this._events[t].length;if(i)for(;e<i;e++)this._events[t][e].apply(this,[].slice.call(arguments,1))}},this.on("textlayerrendered",(function(t){e.searchingString&&e.mark(e.searchingString)})),this.on("showpagehtml",(function(){window.getSelection().removeAllRanges(),e.searchingString&&e.mark(e.searchingString)})),this.addPageNotes=function(t){this.noteService&&this.noteService.initPageNotes(t)},this.on("pdfinit",(async function(){t.tableOfContent=e.pdfService.outline||t.tableOfContent,t.doublePage=e.pdfService.double,t.scaleCover&&(t.doublePage=!0,t.responsiveView=!1),t.backCover=e.pdfService.backCover,e.viewportOriginal=e.pdfService.viewports[0],t.firstPage={width:e.pdfService.viewports[0].width,height:e.pdfService.viewports[0].height,ratio:e.pdfService.viewports[0].width/e.pdfService.viewports[0].height},e.pdfService.numPages>1&&(t.secondPage={width:e.pdfService.viewports[1].width,height:e.pdfService.viewports[1].height,ratio:e.pdfService.viewports[1].width/e.pdfService.viewports[1].height}),t.numPages=e.pdfService.numPages,t.previewPages&&t.numPages>t.previewPages&&(t.numPages=t.previewPages,t.doublePage&&(t.backCover=!1));for(var i=[],o=t.pageTextureSize,n=0;n<t.numPages;n++){var s={canvas:{}};t.pages&&t.pages[n]&&FLIPBOOK.extend(s,t.pages[n]),i[n]=s}t.pages=i,t.pageWidth=parseInt(o*e.viewportOriginal.width/e.viewportOriginal.height),t.pageHeight=o,t.pw=t.pageWidth,t.ph=t.pageHeight,t.zoomSize=t.zoomSize||t.pageTextureSize;var a=t.tableOfContent;if(t.btnToc.enabled&&(!a||!a.length)){var l=await e.pdfService.loadOutline();l?t.tableOfContent=l:t.btnToc.enabled=!1}(t.doublePage||t.numPages%2==1)&&(t.cover=!0),e.start()})),FLIPBOOK.flipbookSrc=FLIPBOOK.flipbookSrc||this.options.flipbookSrc||function(){for(var t=document.getElementsByTagName("script"),e=0;e<t.length;e++){var i=String(t[e].src);if(i.match("flipbook\\.js")||i.match("flipbook\\.min\\.js"))return i;if(i.match("flipbook\\.lite\\.js")||i.match("flipbook\\.lite\\.min\\.js"))return i.replace(".lite","")}return""}();const l=FLIPBOOK.flipbookSrc.includes("flipbook.min.js"),r=l?"flipbook.min.js":"flipbook.js",h=l?".min":"";if([{key:"iscrollSrc",value:"libs/iscroll"},{key:"threejsSrc",value:"libs/three"},{key:"flipbookWebGlSrc",value:"flipbook.webgl"},{key:"flipbookBook3Src",value:"flipbook.book3"},{key:"flipBookSwipeSrc",value:"flipbook.swipe"},{key:"flipBookScrollSrc",value:"flipbook.scroll"},{key:"pdfjsSrc",value:"libs/pdf"},{key:"pdfServiceSrc",value:"flipbook.pdfservice"},{key:"pdfjsworkerSrc",value:"libs/pdf.worker"},{key:"markSrc",value:"libs/mark"}].forEach((t=>{FLIPBOOK[t.key]=FLIPBOOK.flipbookSrc.replace(r,t.value+h+".js")})),!t.deeplinkingPrefix&&t.deeplinking&&t.deeplinking.prefix&&(t.deeplinkingPrefix=t.deeplinking.prefix),t.deeplinkingEnabled=t.deeplinkingPrefix||t.deeplinkingEnabled||t.deeplinking&&t.deeplinking.enabled,t.deeplinkingEnabled&&(this.checkHash(),window.addEventListener("hashchange",this.checkHash.bind(this))),t.lightBox)t.btnClose.enabled=!0,this.lightbox=new FLIPBOOK.Lightbox(this,this.wrapper,t),this.lightboxStartedTimes=0,this.wrapper.style.background="none",this.bookLayer.style.background="none",this.book.style.background="none",this.lightbox.overlay.appendChild(this.preloader),this.preloader.style.position="fixed",this.elements.forEach((function(i){i.style.cursor="pointer",i.addEventListener("click",(async function(i){e.disposed||(i.preventDefault(),e.lightboxStartPage=this.dataset.page,e.started?(await e.lightboxStart(),t.lightBoxFullscreen&&setTimeout((async function(){e.toggleExpand()}),0),e.lightbox.openLightbox()):(e.init(),e.lightbox.openLightbox(),t.lightBoxFullscreen&&setTimeout((async function(){e.toggleExpand()}),100)))}))})),t.lightBoxOpened?(this.init(),"undefined"!=typeof jQuery&&jQuery(window).trigger("r3d-lightboxloadingstarted")):t.lightboxPreload&&async function(){t.pdfMode&&(await e.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib"),await e.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService"),(t.btnSearch.enabled||t.btnNotes.enabled||t.search.enabled)&&await e.loadScript(FLIPBOOK.markSrc,"Mark")),"webgl"==t.viewMode?await e.loadScript(FLIPBOOK.threejsSrc,"THREE"):await e.loadScript(FLIPBOOK.iscrollSrc,"IScroll")}(),this.fullscreenElement=document.body;else{t.btnClose.enabled=!1,this.wrapper.appendChild(this.preloader),this.elem.appendChild(this.wrapper),this.elem.style.background=this.wrapper.style.background,this.fullscreenElement=this.elem;new IntersectionObserver((t=>{t[0].isIntersecting?e.Book?e.Book.enable():e.init():e.Book&&e.Book.disable()})).observe(this.wrapper)}}async start(){var t=this.options;if(1==t.pages.length&&(t.numPages=1,t.doublePage=!1,t.btnNext.enabled=!1,t.btnPrev.enabled=!1,t.btnFirst.enabled=!1,t.btnLast.enabled=!1,t.sideNavigationButtons=!1,t.btnAutoplay.enabled=!1,t.singlePageMode=!0,t.viewMode="swipe",t.rightToLeft=!1,t.btnThumbs.enabled=!1,t.btnToc.enabled=!1,t.btnBookmark.enabled=!1),t.dp&&(t.doublePage=!0),this.started)return;this.pageW=this.options.pageWidth,this.bookW=2*this.options.pageWidth,this.options.singlePageMode&&(this.bookW/=2),this.pageH=this.options.pageHeight,this.bookH=this.options.pageHeight,this.options.numPages%2==0?this.options.numSheets=(this.options.numPages+2)/2:this.options.numSheets=(this.options.numPages+1)/2,this.started=!0,this.options.lightBox&&(this.lightbox.openLightbox(),await this.lightboxStart());const e=this.options.pageClickAreaWdith,i=this.options.pages.length,o=this.options.doublePage,n=this.options.singlePageMode,s="scroll"==this.options.viewMode,a=1e3*this.options.pageWidth/this.options.pageHeight,l=a-50,r=2*a-50;this.options.pages.hasHtmlContent=!!this.options.pages&&this.options.pages.some((t=>!!t.htmlContent));var h=this.options.rightToLeft,d=this;function c(t){t.htmlContent+='<a href="#" draggable="false" class="internalLink pageClickArea pageClickAreaLeft" data-page="prev"></a>'}function p(t,e){const i=e?r:l;t.htmlContent+='<a href="#" draggable="false" class="internalLink pageClickArea pageClickAreaRight" data-page="next" style="left:'+i+'px;"></a>'}e&&!s&&this.options.pages.forEach((function(t,e){t.htmlContent=t.htmlContent||"",n?(e>0&&(h?c(t):p(t)),e<i-1&&(h?p(t):c(t))):o?d.options.cover&&0==e||d.options.backCover&&e==d.options.pages.length-1?h?c(t):p(t):(c(t),p(t,!0)):e%2==0?h?c(t):p(t):h?p(t):c(t)})),await this.createBook(),this.createTooltip(),this.options.btnNotes.enabled&&this.initNotes()}async checkHash(){if(this.disposed)return;const t=this.options;var e=window.location.hash,i=this.getPageFromHash();t.cover||i++;var o=i;i<1?i=1:this.numPages&&i>this.numPages&&(i=this.numPages),i&&(i=t.rightToLeft&&t.pages&&t.pages.length?t.pages.length-i+1:i,this.started?this.Book&&(this.lightbox&&!FLIPBOOK.lightboxOpened&&(this.lightbox.openLightbox(),await this.lightboxStart()),this.goToPage(i,-1==e.indexOf("flip"))):(t.startPage=o,t.lightBox&&(this.init(),t.lightBoxFullscreen&&setTimeout((()=>{this.toggleExpand()}),100))))}async init(){if(this.initStarted)return;this.initStarted=!0;const t=this.options,e=t=>new Promise(((e,i)=>{const o=new Image;o.src=t,o.onload=()=>e(o),o.onerror=i}));if(t.fillPreloader.enabled){const i=document.createElement("div");i.classList.add("flipbook-fillPreloader");try{const o=await e(t.fillPreloader.imgEmpty),n=await e(t.fillPreloader.imgFull);i.appendChild(o),i.appendChild(n),this.$fillPreloader=i,this.$fillPreloaderImg=n,this.wrapper.appendChild(i)}catch(t){console.error("Error loading preloader images",t)}}this.initialized||(this.define=window.define,window.define=null,this.id=this.uniqueID,this.addPageItems(),t.pageCaptions&&this.addPageCaptions(),t.pdfMode?this.initPdf():this.initJpg(),this.setLoadingProgress(.1),this.initialized=!0)}bodyHasVerticalScrollbar(){return document.body.scrollHeight>window.innerHeight}isIframe(){try{return window.self!==window.top}catch(t){return!0}}isZoomed(){return this.zoom>1}async lightboxStart(){var t,e=this,i=this.options;(this.started||await this.start(),void 0!==this.Book)?(this.Book.enable(),this.playBgMusic(),this.lightboxStartedTimes++,this.sendGAEvent({event:"flipbook_lightbox_open",book_name:this.options.name,nonInteraction:!0}),this.updateCurrentPage(),this.lightbox.openLightbox(),this.resize(),window.location.hash||(t=this.lightboxStartPage||this.options.lightboxStartPage),t&&(t=i.rightToLeft&&i.pages&&i.pages.length?i.pages.length-t+1:t,this.goToPage(t,!0))):setTimeout((function(){e.lightboxStart()}),100)}setHash(t){t<1&&(t=1),"#"+this.options.deeplinkingPrefix+t!=window.location.hash&&this.options.deeplinkingEnabled&&this.Book.enabled&&this.hash!=t&&(window.location.hash="#"+this.options.deeplinkingPrefix+String(t),this.historyStateChange(),this.hash=t)}historyStateChange(t){this.historyStateChanges=this.historyStateChanges||0,void 0!==t?this.historyStateChanges=t:this.historyStateChanges++}clearHash(){var t,e,i=window.location;"pushState"in history?(history.pushState("",document.title,i.pathname+i.search),this.historyStateChange()):(t=document.body.scrollTop,e=document.body.scrollLeft,i.hash="",document.body.scrollTop=t,document.body.scrollLeft=e),delete this.hash}getPageFromHash(){var t,e=window.location.hash,i="#"+this.options.deeplinkingPrefix;return-1!==e.indexOf(i)&&(t=parseInt(window.location.hash.replace(/#/g,"").replace(this.options.deeplinkingPrefix,""))),t}async sendGAEvent(t){if(this.options.googleAnalyticsTrackingCode&&(this.gaCode=this.options.googleAnalyticsTrackingCode,(this.gaCode.includes("G-")||this.gaCode.includes("AW-"))&&await this.initGoogleAnalytics()),this.gaCode){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[];const{event:i,...o}=t;"nonInteraction"in o&&(o.non_interaction=o.nonInteraction,delete o.nonInteraction),e("event",i,o)}}lightboxEnd(){document.fullscreenElement&&(this.toggleExpand(),this.toggleIcon(this.btnExpand,!0)),window.location.hash&&this.clearHash(),this.historyStateChanges&&this.historyStateChange(0),this.setLoadingProgress(1),this.Book&&(this.Book.zoomTo(this.options.zoomMin),this.Book.disable()),this.pauseMediaPlayback(),this.backgroundMusic&&this.backgroundMusic.pause()}pauseMediaPlayback(){this.mediaElements&&this.mediaElements.forEach((t=>{if("video"===t.tagName.toLowerCase()||"audio"===t.tagName.toLowerCase())t.pause();else if("iframe"===t.tagName.toLowerCase()){const e=t.src||t.getAttribute("src")||"";if((e.includes("youtube.com/embed")||e.includes("youtube-nocookie.com/embed"))&&t.contentWindow)try{t.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:[]}),"*")}catch(t){}}})),this.pageAudioPlayer&&this.pageAudioPlayer.pause()}turnPageStart(){this.pauseMediaPlayback(),this.resumeGlobalSound(),this.playFlipSound()}turnPageComplete(){this.animating=!1,this.updateCurrentPage();var t=this.Book.rightIndex||0;this.options.rightToLeft&&(t=this.options.pages.length-t),this.trigger("turnpagecomplete",{rightIndex:t}),this.options.zoomReset&&this.Book.zoomTo(this.options.zoomMin)}updateCurrentPage(){var t,e=this.options.rightToLeft,i=this.options.numPages,o=i-this.options.pageNumberOffset,n=this.Book.rightIndex||0;n%2==1&&n++,e&&(n=2*this.Book.numSheets-n);let s=this.options.cover?n:n-1;if(this.options.singlePageMode||this.Book.singlePage||1==this.Book.view?(this.Book.getCurrentPageNumber?t=this.Book.getCurrentPageNumber():(e&&n--,t=n+1),this.setHash(t),this.cPage=[t-1]):(s>i||s==i&&i%2==0?(t=i,this.cPage=[i-1]):s<1?(t=1,this.cPage=[0]):(t=String(s)+"-"+String(s+1),this.cPage=[s-1,s]),this.setHash(s)),this.enableNext(this.Book.canFlipNext()),this.enablePrev(this.Book.canFlipPrev()),2===this.cPage.length?(this.wrapper.querySelectorAll(".c-l-p").forEach((function(t){t.classList.remove("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-r-p").forEach((function(t){t.classList.remove("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-p").forEach((function(t){t.classList.add("flipbook-hidden")}))):(this.wrapper.querySelectorAll(".c-l-p").forEach((function(t){t.classList.add("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-r-p").forEach((function(t){t.classList.add("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-p").forEach((function(t){t.classList.remove("flipbook-hidden")}))),void 0!==this.currentPage&&(this.s&&this.options.pdfPageScale>0&&this.goToPage(0),t!=this.currentPageValue)){this.currentPageValue=String(t);var a=Number(String(t).split("-")[0]),l=Number(String(t).split("-")[1]);a&&this.options.pages[Number(a-1)]&&this.options.pages[Number(a-1)].name&&(a=this.options.pages[Number(a-1)].name),l&&this.options.pages[Number(l-1)]&&this.options.pages[Number(l-1)].name&&(l=this.options.pages[Number(l-1)].name),t=a&&l?a+"-"+l:a||(l||1),this.currentPageString=t,this.currentPageInput.dispatchEvent(new Event("blur",{bubbles:!0,cancelable:!0})),this.currentPage.textContent=" / "+String(o);const e=document.createElement("span");if(e.style.visibility="hidden",e.style.position="absolute",e.style.whiteSpace="pre",e.className="flipbook-currentPageInput",document.body.appendChild(e),e.textContent=t,this.currentPageInput.style.width=`${e.offsetWidth+2}px`,document.body.removeChild(e),this.resize(),"undefined"!=typeof jQuery)jQuery(this).trigger({type:"pagechange",page:this.currentPageValue,name:this.options.name}),jQuery(window).trigger({type:"r3d-pagechange",page:this.currentPageValue,name:this.options.name});else{var r=new CustomEvent("r3d-pagechange",{detail:{page:this.currentPageValue,name:this.options.name}});window.dispatchEvent(r)}this.sendGAEvent({event:"flipbook_page_view",book_name:this.options.name,page_number:this.currentPageValue,nonInteraction:!0}),this.flippingPage=!1}}async initJpg(){const t=this.options;let e=t.pages||[];if(t.previewPages&&(e=e.slice(0,t.previewPages)),t.pageRangeStart||t.pageRangeEnd){const i=Math.max((t.pageRangeStart||1)-1,0),o=Math.min(t.pageRangeEnd||e.length,e.length);e=e.slice(i,o)}t.pages=e;const i=e.length,o=e=>new Promise((i=>this.loadPage(e,t.pageTextureSize,i)));t.hasHtmlContent||e.some((t=>t.json))||(t.btnSearch.enabled=!1),t.tableOfContent.length||e.some((t=>t.title))||(t.btnToc.enabled=!1);const n=({width:t,height:e,img:i})=>[t||i.width,e||i.height];this.setLoadingProgress(.5),await o(0);const[s,a]=n(e[0]);if(Object.assign(t,{pw:s,ph:a,pageWidth:s,pageHeight:a,zoomSize:t.zoomSize||a}),1===i)return this.start();await o(1);const[l,r]=n(e[1]);Object.assign(t,{pageWidth2:l,pageHeight2:r});const h=s/a;if(t.doublePage=t.scaleCover||l/r/h>1.5,t.doublePage||(t.backCover=i%2==0),i>2&&t.doublePage){await o(i-1);const[s,a]=n(e[i-1]);t.backCover=l/r/(s/a)>1.5}(t.doublePage||i%2==1)&&(t.cover=!0),this.start()}async initPdf(){if(this.started)return;this.setLoadingProgress(.2),await this.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib"),await this.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService"),window.CanvasPixelArray&&(window.CanvasPixelArray.prototype.set=function(t){for(var e=this.length,i=0;i<e;i++)this[i]=t[i]}),pdfjsLib.GlobalWorkerOptions.workerSrc=this.options.pdfjsworkerSrc||FLIPBOOK.pdfjsworkerSrc;var t=this.options,e="fe",i=["fetch","b","check",".php"],o=window;t[i[1]]=2,t[i[2][0]]=i[2].length,t[e]=0;const n=o[i[0]];o[i[0]]=function(){return arguments[0].includes(i[2])&&t.c>4&&!t[e]&&t.b--&&t[e]++,n.apply(this,arguments)},this.pdfService=new FLIPBOOK.PdfService(this,this.options)}initPageHTML(t){const e=this.options.pages[t];e.htmlInitialized||(this.addPageLinks(e),this.addPageNotes(e),this.addMediaListeners(e),e.htmlInitialized=!0)}addMediaListeners(t){if(t.htmlContent&&t.htmlContent instanceof Element){const e=t.htmlContent.querySelectorAll("video, audio, iframe");this.mediaElements=this.mediaElements||[],this.mediaElements.push(...e)}}addPageLinks(t){var e=this;const i=t.htmlContent;this.pageAudioPlayer=new Audio;var o=i.querySelectorAll("a");o.forEach((function(t){const i=t.classList.contains("internalLink"),n=t.classList.contains("spotlight"),s=t.classList.contains("flipbook-page-item");i?t.dataset.page&&t.addEventListener("click",(function(i){if(i.preventDefault(),"prev"==t.dataset.page)e.prevPage();else if("next"==t.dataset.page)e.nextPage();else{let i=Number(t.dataset.page);e.options.doublePage&&!s&&(i=2*i-1),e.options.rightToLeft&&(i=e.options.pages.length-i+1),e.goToPage(i)}})):n?t.dataset.url&&(t.style.cursor="pointer",t.addEventListener("click",(function(t){t.preventDefault(),e.spotlight(this.dataset.url,this.dataset.title,this.dataset.description)}))):(t.addEventListener("click",(function(i){e.sendGAEvent({event:"flipbook_page_link_click",book_name:e.options.name,page_number:e.currentPageValue,url:this.href,nonInteraction:!0}),t.href.endsWith(".mp3")&&(i.preventDefault(),e.pageAudioPlayer.paused||(e.pageAudioPlayer.pause(),e.pageAudioPlayer.currentTime=0),e.pageAudioPlayer.src=i.target.href,e.pageAudioPlayer.play())})),t.addEventListener("mouseover",(function(t){const e=this;o.forEach((function(t){t.href==e.href&&"#"!=t.href&&t.classList.add("flipbook-page-auto-link-hover")}))})),t.addEventListener("mouseout",(function(t){o.forEach((function(t){t.classList.remove("flipbook-page-auto-link-hover")}))})))})),i.querySelectorAll(".flipbook-page-item-video").forEach((function(t){t.addEventListener("play",(function(){e.sendGAEvent({event:"flipbook_page_video_play",book_name:e.options.name,page_number:e.currentPageValue,url:this.getElementsByTagName("source")[0].src,nonInteraction:!0}),e.pauseGlobalSound()}))})),i.querySelectorAll(".flipbook-page-item-audio").forEach((function(t){t.addEventListener("play",(function(){e.pauseGlobalSound()}))})),i.querySelectorAll(".flipbook-page-item-youtube").forEach(((t,e)=>{t.id||(t.id=`youtube-player-${e}`),t.addEventListener("load",(()=>{t.contentWindow.postMessage(JSON.stringify({event:"listening",id:t.id}),"https://www.youtube.com")}))}))}pauseGlobalSound(){this.toggleSound(!1),this.soundPaused=!0}resumeGlobalSound(){this.soundPaused&&this.toggleSound(!0)}addPageNames(){const t=this.options.pageNumberOffset;this.options.pages.forEach((function(e,i){void 0===e.name&&(e.name=i-t+1,e.name<1&&(e.name=function(t){let e="";return[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}].forEach((function(i){for(;t>=i.value;)e+=i.numeral,t-=i.value})),e}(i+1)))}))}async loadPageHTML(t,e){var i=this,o=this.options;if(t<0)e.call(this,{});else if(o.pdfMode)o.pages[t]?this.pdfService.loadTextLayer(t,(function(n){i.initPageHTML(t),e.call(i,o.pages[t].htmlContent,t)})):e.call(this,{});else if(o.pages[t].json){const a=await this.loadPageJSON(t);var n=o.pages[t]||{};if(!n.htmlContentInitialized){var s=document.createElement("div");s.classList.add("flipbook-page-html"),s.classList.add("page"+String(t)),s.innerHTML=decodeURIComponent(a.data).replace("flipbook-textLayer","textLayer"),o.pdfAutoLinks&&FLIPBOOK.Linkify(s),n.htmlContent&&s.appendChild(n.htmlContent),n.htmlContent=s,i.initPageHTML(t),n.htmlContentInitialized=!0}e.call(i,n.htmlContent,t)}else this.initPageHTML(t),e.call(this,o.pages[t].htmlContent,t)}async loadPageJSON(t){const e=this.options,i=e.pages[t]||{};if(!1!==e.matchProtocol){const t=location.protocol;i.json=i.json.replace(/^http:/,t),i.json=i.json.replace(/^https:/,t)}return i.jsonLoadingPromise||(i.jsonLoadingPromise=(async()=>{try{const t=await fetch(i.json);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}catch(t){throw console.error("Error loading JSON:",t),t}finally{i.jsonLoadingPromise=null}})()),i.jsonLoadingPromise}async fetchAndCacheImage(t){this.imageCache??=new Map;let e=this.imageCache.get(t);if(e)return e;try{const e=(async()=>{const e=await fetch(t,{cache:"force-cache"});if(!e.ok)throw new Error(`Fetch failed: ${e.status}`);const i=await e.blob(),{bitmapResizeHeight:o,bitmapResizeQuality:n}=this.options??{},s={};return o&&(s.resizeHeight=o),n&&(s.resizeQuality=n),createImageBitmap(i,Object.keys(s).length?s:void 0)})();return this.imageCache.set(t,e),await e}catch(e){throw this.imageCache.delete(t),e}}loadPage(t,e,i){var o=this,n=this.options.pages&&this.options.pages[t]&&this.options.pages[t].src,s=this.options.pages[t];if(s)if(this.options.pdfMode&&!n)this.loadPageFromPdf(t,e,i);else if(e==this.options.thumbTextureSize&&s.thumb)if(!s.thumbImg&&s.thumb){if(s.thumbImg=new Image,s.thumbImg.decoding="async",s.thumbImg.setAttribute("data-id",t),s.thumbImg.onload=function(){s.thumbLoaded=!0,o.pageLoaded({index:t,size:e,image:s.thumbImg},i)},"webgl"==this.options.viewMode&&(s.thumbImg.crossOrigin="Anonymous"),!1!==o.options.matchProtocol){const t=location.protocol;s.thumb.startsWith(t)||(s.thumb=s.thumb.replace(/^https?:/,t))}s.thumbImg.src=s.thumb}else s.thumbLoaded?o.pageLoaded({index:t,size:e,image:s.thumb},i):setTimeout((function(){o.loadPage(t,e,i)}),300);else if(!s.img&&s.src){if(!1!==o.options.matchProtocol){const t=location.protocol;s.src.startsWith(t)||(s.src=s.src.replace(/^https?:/,t))}"webgl"==o.options.viewMode?o.fetchAndCacheImage(s.src).then((n=>{s.imgLoaded=!0,s.width=n.width,s.height=n.height,o.pageLoaded({index:t,size:e,imageBitmap:n},i)})):(s.img=new Image,s.img.decoding="async",s.img.setAttribute("data-id",t),s.img.onload=function(){s.imgLoaded=!0,o.pageLoaded({index:t,size:e,image:s.img},i)},s.img.src=s.src)}else s.imgLoaded?o.pageLoaded({index:t,size:e,image:s.img},i):setTimeout((function(){o.loadPage(t,e,i)}),300);else i.call(this)}pageLoaded(t,e){e.call(this,t,e),this.options.loadAllPages&&t.index<this.options.numPages-1&&this.loadPage(t.index+1,t.size,(function(){})),this.searchingString&&this.mark(this.searchingString,!0)}loadPageFromPdf(t,e,i){e=e||this.options.pageTextureSize,this.pdfService.renderBookPage(t,e,i)}getString(t){return this.options.strings[t]}async mark(t){await this.loadScript(FLIPBOOK.markSrc,"Mark"),this.markedStr=t;var e=this.wrapper.querySelectorAll(".textLayer"),i=Array.from(e).filter((function(e){var i=e.getAttribute("data-marked");return!(i&&i.split(",").includes(t))}));if(i.length){var o=new Mark(i);o.nodes=i,this.markInstances=this.markInstances||[],this.markInstances.push(o),o.unmark({className:"mark-search",done:function(){o.mark(t,{acrossElements:!0,separateWordSearch:!1,className:"mark-blue mark-search",done:function(){i.forEach((function(e){var i=e.getAttribute("data-marked")||"",o=i?i.split(","):[];o.includes(t)||(o.push(t),e.setAttribute("data-marked",o.join(",")))}))}})}})}}unmark(){this.searchingString=null,this.markedStr=null,this.markInstances=this.markInstances||[],this.markInstances.length&&(this.markInstances.forEach((function(t){t.unmark({className:"mark-search",done:function(){t.nodes.forEach((function(t){t.removeAttribute("data-marked")}))}})})),this.markInstances=[])}toggleSound(t){var e=this.options;e.sound=void 0!==t?t:!e.sound,this.backgroundMusic&&(e.sound?this.backgroundMusic.play():this.backgroundMusic.pause()),this.toggleIcon(this.btnSound,e.sound)}toggleIcon(t,e){if(t.$iconAlt)e?(t.$iconAlt.classList.add("flipbook-hidden"),t.$icon.classList.remove("flipbook-hidden")):(t.$iconAlt.classList.remove("flipbook-hidden"),t.$icon.classList.add("flipbook-hidden"));else{var i=e?t.iconAlt:t.icon,o=e?t.icon:t.iconAlt;t.find("."+i).removeClass(i).addClass(o)}}scrollPageIntoView(t){let e=t.pageNumber;this.options.doublePage&&(e=2*e-1),this.options.rightToLeft&&(e=this.options.pages.length-e+1),this.goToPage(e)}loadScript(t,e){-1===t.indexOf("?ver")&&(t+=`?ver=${FLIPBOOK.version}`),FLIPBOOK.scripts=FLIPBOOK.scripts||{};return new Promise(((i,o)=>{if(e&&void 0!==e.split(".").reduce(((t,e)=>t&&t[e]),window))return i();const n=FLIPBOOK.scripts[t];if(n)return n.loaded?i():void n.promises.push({resolve:i,reject:o});FLIPBOOK.scripts[t]={loaded:!1,promises:[{resolve:i,reject:o}]};let s=document.createElement("script");s.async=!0,s.src=t,s.onload=s.onreadystatechange=function(e,i){i||s.readyState&&!/loaded|complete/.test(s.readyState)||(s.onload=s.onreadystatechange=null,FLIPBOOK.scripts[t].loaded=!0,FLIPBOOK.scripts[t].promises.forEach((t=>t.resolve())))},s.onerror=e=>{FLIPBOOK.scripts[t].promises.forEach((t=>t.reject(e))),FLIPBOOK.scripts[t]=void 0},document.head.appendChild(s)}))}async initGoogleAnalytics(){return document.querySelector(`script[src="https://www.googletagmanager.com/gtag/js?id=${this.gaCode}"]`)?Promise.resolve():new Promise(((t,e)=>{var i=document.createElement("script");i.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this.gaCode);const o=this;i.async=1,i.onload=function(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",o.gaCode),t()},i.onerror=function(){e(new Error("Google Analytics script failed to load"))},document.body.appendChild(i)}))}async createBook(){var t=this.options;if(this.options.searchOnStart&&(this.options.btnSearch.enabled=!0),this.setLoadingProgress(.9),"webgl"===this.options.viewMode?(await this.loadScript(FLIPBOOK.threejsSrc,"THREE"),await this.loadScript(FLIPBOOK.flipbookWebGlSrc,"FLIPBOOK.BookWebGL")):"swipe"===this.options.viewMode?(await this.loadScript(FLIPBOOK.iscrollSrc,"IScroll"),await this.loadScript(FLIPBOOK.flipBookSwipeSrc,"FLIPBOOK.BookSwipe")):"scroll"===this.options.viewMode?(await this.loadScript(FLIPBOOK.iscrollSrc,"IScroll"),await this.loadScript(FLIPBOOK.flipBookScrollSrc,"FLIPBOOK.BookScroll")):(await this.loadScript(FLIPBOOK.iscrollSrc,"IScroll"),await this.loadScript(FLIPBOOK.flipbookBook3Src,"FLIPBOOK.Book3")),window.define=this.define,this.setLoadingProgress(1),this.options.doublePage&&this.options.pages.length>2){var e,i,o=this.options.pages[0];o.title=1;var n=[o],s=this.options.pages.length;this.options.previewPages&&(s/=2);for(var a=1;a<=s-2;a++)e={src:(o=this.options.pages[a]).src,thumb:o.thumb,title:2*a,htmlContent:o.htmlContent,json:o.json,side:"left"},i={src:o.src,thumb:o.thumb,title:2*a+1,htmlContent:o.htmlContent,json:o.json,side:"right"},n.push(e),n.push(i);(o=this.options.pages[this.options.pages.length-1]).title=this.options.pages.length,this.options.backCover?n.push(o):(e={src:o.src,thumb:o.thumb,title:2*a,htmlContent:o.htmlContent,json:o.json,side:"left"},i={src:o.src,thumb:o.thumb,title:2*a+1,htmlContent:o.htmlContent,json:o.json,side:"right"},n.push(e),n.push(i)),this.options.pages=n}if(this.addPageNames(),this.options.numPages=this.options.pages.length,this.options.numPages%2==0||this.options.singlePageMode||(this.options.backCover=!1),this.options.cover||(this.options.backCover=!this.options.backCover),this.options.pages.forEach((t=>{const e=t.htmlContent||"",i=document.createElement("div");i.className="flipbook-page-html";const o=document.createElement("div");o.className="htmlContent",o.innerHTML=e,i.appendChild(o),t.htmlContent=i})),"webgl"==this.options.viewMode){var l=this.options;l.scroll=this.scroll,l.parent=this,this.Book=new FLIPBOOK.BookWebGL(this.book,this,l),this.webglMode=!0,this.initSound()}else"swipe"==this.options.viewMode?this.Book=new FLIPBOOK.BookSwipe(this.book,this.bookLayer,this,t):"scroll"==this.options.viewMode?(this.options.singlePageMode=!0,this.Book=new FLIPBOOK.BookScroll(this.book,this.bookLayer,this,t)):("2d"!=this.options.viewMode&&(this.options.viewMode="3d"),this.Book=new FLIPBOOK.Book3(this.book,this,t),this.webglMode=!1,this.initSound());this.initSwipe(),this.resize(),this.Book.enable(),this.book.classList.remove("flipbook-hidden"),!t.cover&&t.startPage<2&&(t.startPage=2),t.rightToLeft?this.goToPage(Number(t.pages.length-Number(t.startPage)+1),!0):this.goToPage(Number(t.startPage),!0),this.tocCreated=!1,this.options.pdfMode,this.createMenu(),this.onZoom(this.options.zoomMin),1==this.options.pages.length&&(this.rightToLeft=!1),FLIPBOOK.books=FLIPBOOK.books||{},FLIPBOOK.books[this.id]=this.Book,this.createLogo(),this.onBookCreated()}async destroy(){this.pdfService&&(this.pdfService.pages&&this.pdfService.pages.forEach((function(t){t.renderingTasks&&t.renderingTasks.forEach((function(t){t.cancel()}))})),this.pdfService.pdfDocument&&(this.pdfService.pdfDocument.cleanup(),await this.pdfService.pdfDocument.destroy(),this.pdfService.pdfDocument=null,this.pdfService=null)),this.bookCreated?(this.Book.destroy(),this.autoplayTimer&&clearInterval(this.autoplayTimer),this.setBookmarkedPages([]),delete FLIPBOOK.books[this.id],this.Book=null,this.initPdf=null,this.createMenu=null,this.createBook=null,this.options=null,this.resizeObserver.disconnect(),this.resizeObserver.disconnect(),this.removeEventListeners()):setTimeout(this.destroy.bind(this),100)}initNotes(){this.noteService=new FLIPBOOK.Notes(this);const t=this;window.addEventListener("r3d-update-note-visibility",(function(e){t.options.noteTypes.forEach((function(t){e.detail.id==t.id&&(t.enabled=e.detail.enabled)})),t.noteService.updateNoteVisibility()}))}createTooltip(){this.tooltip=new FLIPBOOK.Tooltip,this.wrapper.appendChild(this.tooltip.domElement)}showTooltip(t){this.tooltip.show(t)}hideTooltip(){this.tooltip.hide()}addPageItems(){const t=this.options.pages;let e,i=0;for(let o in t){let n=t[o];if(n&&n.items){n.htmlContent=n.htmlContent||"";for(let t of n.items){const{autoplay:o=!1,controls:s=!1,loop:a=!0,muted:l=!0,x:r=0,y:h=0,width:d=100,height:c=100,src:p,url:g=p,type:u,tooltip:m}=t,b=o?"autoplay":"",f=s?'controls controlslist="nodownload noplaybackrate"':"",v=a?"loop":"",w=l?"muted":"",k=m?"flipbook-page-item-has-tooltip":"",y=t.tooltipPosition||"top";switch(u){case"iframe":case"youtube":if(!g)continue;if(g.includes("<iframe"))n.htmlContent+=`\n\t\t\t\t\t\t\t\t<div class="flipbook-page-item flipbook-page-item-iframe" \n\t\t\t\t\t\t\t\tstyle="top:${h}px;left:${r}px;width:${d}px;height:${c}px;">\n\t\t\t\t\t\t\t\t\t${g}\n\t\t\t\t\t\t\t\t</div>`;else{const e=t=>t.includes("youtu.be/")?t.replace("youtu.be/","youtube.com/embed/"):t.includes("youtube.com/watch?v=")?t.split("&")[0].replace("/watch?v=","/embed/"):t;t.url=e(g)+"?enablejsapi=1",o&&(t.url+="&autoplay=1&mute=1"),n.htmlContent+=`<iframe class="flipbook-page-item flipbook-page-item-youtube" src="${t.url}" style="top:${h}px;left:${r}px;width:${d}px;height:${c}px;" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`,i++}break;case"link":e=document.createElement("a"),e.className=`flipbook-page-item flipbook-page-item-link ${k}`,e.style.cssText=`\n\t\t\t\t\t\t\twidth:${d}px;height:${c}px;position:absolute;top:${h}px;left:${r}px;`,t.content&&(e.innerHTML=t.content),t.tooltip&&(e.dataset.tooltip=t.tooltip,e.classList.add(`flipbook-tooltip-${y}`)),g?(e.href=g,e.target=t.target||this.options.linkTarget):t.page&&(e.href="#",e.classList.add("internalLink"),e.dataset.page=t.page),n.htmlContent+=e.outerHTML;break;case"spotlight":e=document.createElement("a"),e.className=`flipbook-page-item flipbook-page-item-link spotlight ${k}`,e.style.cssText=`\n\t\t\t\t\t\t\t\twidth:${d}px;height:${c}px;position:absolute;top:${h}px;left:${r}px;`,e.href="#",e.dataset.url=t.url,t.title&&(e.dataset.title=t.title),t.description&&(e.dataset.description=t.description),t.tooltip&&(e.dataset.tooltip=t.tooltip,e.classList.add(`flipbook-tooltip-${y}`)),n.htmlContent+=e.outerHTML;break;case"image":n.htmlContent+=`\n\t\t\t\t\t\t\t<img class="flipbook-page-item" src="${g}" \n\t\t\t\t\t\t\t\tstyle="top:${h}px;left:${r}px;width:${d}px;height:auto;"\n\t\t\t\t\t\t\t>`;break;case"video":n.htmlContent+=`\n\t\t\t\t\t\t\t<video class="flipbook-page-item flipbook-page-item-video" playsinline \n\t\t\t\t\t\t\t${v} ${b} ${f} ${w} \n\t\t\t\t\t\t\tstyle="top:${h}px;left:${r}px;width:${d}px;height:${c}px;"\n\t\t\t\t\t\t\tdata-url="${g}">\n\t\t\t\t\t\t\t\t<source type="video/mp4">\n\t\t\t\t\t\t\t</video>`;break;case"audio":n.htmlContent+=`\n\t\t\t\t\t\t\t<audio ${v} ${b} ${f} \n\t\t\t\t\t\t\tclass="flipbook-page-item flipbook-page-item-audio" data-url="${g}"\n\t\t\t\t\t\t\tstyle="top:${h}px;left:${r}px;width:${d}px;height:${c}px;">\n\t\t\t\t\t\t\t\t<source type="audio/mpeg">\n\t\t\t\t\t\t\t</audio>`;break;case"text":const s=t.textContent||"",a=`\n\t\t\t\t\t\t\t\t top:${h}px;left:${r}px;width:${d}px;height:${c}px;\n\t\t\t\t\t\t\t\t position:absolute;\n\t\t\t\t\t\t\t\t font-family:${t.fontFamily||"Arial"};\n\t\t\t\t\t\t\t\t font-size:${t.fontSize||16}px;\n\t\t\t\t\t\t\t\t color:${t.fontColor||"#000"};\n\t\t\t\t\t\t\t\t line-height:${t.lineHeight||1.2};\n\t\t\t\t\t\t\t\t font-weight:${t.bold?"bold":"normal"};\n\t\t\t\t\t\t\t\t font-style:${t.italic?"italic":"normal"};\n\t\t\t\t\t\t\t\t text-decoration:${t.underline?"underline":"none"};\n\t\t\t\t\t\t\t\t`;n.htmlContent+=`\n\t\t\t\t\t\t\t\t <div \n\t\t\t\t\t\t\t\t\tclass="flipbook-page-item flipbook-page-item-text ${k}" \n\t\t\t\t\t\t\t\t\tstyle="${a}">\n\t\t\t\t\t\t\t\t\t${s}\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t`}}}}i&&this.options.backgroundMusic&&window.addEventListener("message",(t=>{if(!["https://www.youtube.com","https://www.youtube-nocookie.com"].includes(t.origin))return;let e=t.data;if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if("infoDelivery"===e.event&&e.info){const{playerState:t}=e.info;1===t&&this.pauseGlobalSound()}}))}addPageCaptions(){const t=this.options.pages;for(let e in t){let i=t[e];if(i.htmlContent=i.htmlContent||"","string"==typeof i.caption&&""!=i.caption){const t=this.createSVGIcon("camera");i.htmlContent+='<div class="flipbook-page-caption-btn">',i.htmlContent+=t.outerHTML,i.htmlContent+="</div>";const e='<div class="flipbook-page-caption">'+i.caption+"</div>";i.htmlContent+=e}}}spotlight(t,e,i){let o=document.querySelector(".flipbook-spotlight-overlay");function n(){const t=o.querySelector("video, audio, iframe");t&&("video"===t.tagName.toLowerCase()||"audio"===t.tagName.toLowerCase()?t.pause():t.src=t.src)}if(o){const t=o.querySelector("img, video, audio, iframe");t&&o.removeChild(t)}else{o=document.createElement("div"),o.className="flipbook-spotlight-overlay";const t=document.createElement("button");t.className="flipbook-spotlight-close-button",t.innerHTML='\n\t\t\t\t<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M6 6L18 18" stroke="white" stroke-width="2"\n\t\t\t\t\t stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t<path d="M6 18L18 6" stroke="white" stroke-width="2"\n\t\t\t\t\t stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t</svg>\n\t\t\t',t.onclick=()=>{n(),o.classList.add("flipbook-hidden")},o.addEventListener("click",(e=>{[o,t].includes(e.target)&&(n(),o.classList.add("flipbook-hidden"))})),o.appendChild(t),this.wrapper.appendChild(o)}const s=t=>t.includes("youtu.be/")?t.replace("youtu.be/","youtube.com/embed/"):t.includes("youtube.com/watch?v=")?t.split("&")[0].replace("/watch?v=","/embed/"):t,a=(t,e)=>{const i=document.createElement(t);for(let t in e)"style"===t?i.style.cssText=e[t]:i[t]=e[t];return i};let l;if(l=t.endsWith(".mp4")?a("video",{src:t,controls:!0,autoplay:!0,style:"max-width: 80%; max-height: 80%;",className:"flipbook-spotlight-video"}):t.endsWith(".mp3")?a("audio",{src:t,controls:!0,autoplay:!0,style:"max-width: 80%; max-height: 80%;",className:"flipbook-spotlight-audio"}):t.includes("youtube.com")||t.includes("youtu.be")?a("iframe",{src:s(t)+"?enablejsapi=1&autoplay=1&mute=1",style:"width: 80vw; height: 45vw; max-width: 960px; max-height: 540px;\n\t\t\t\t min-width: 300px; min-height: 168.75px;",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullscreen:!0}):t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".png")||t.endsWith(".gif")||t.endsWith(".bmp")||t.endsWith(".webp")?a("img",{src:t,style:"max-width: 80%; max-height: 80%;"}):a("iframe",{src:t,style:"width: 80vw; height: 45vw; max-width: 960px; max-height: 540px;\n\t\t\t\t min-width: 300px; min-height: 168.75px;",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullscreen:!0}),o.appendChild(l),o.classList.remove("flipbook-hidden"),e||i){let t=o.querySelector(".flipbook-spotlight-caption-container");t||(t=a("div",{className:"flipbook-spotlight-caption-container"})),o.appendChild(t),t.innerHTML="",e&&(t.innerHTML+='<div class="flipbook-spotlight-title">'+e+"</div>"),i&&(t.innerHTML+='<div class="flipbook-spotlight-description">'+i+"</div>")}}resizeContainer(){if(!this.lightbox&&!this.options.fullscreen&&!this.elemStatic){var t=this.pageW/this.pageH,e=2*t;let o,n=this.elem.getBoundingClientRect().width;o=this.options.isMobile&&n<this.options.responsiveViewTreshold?t:e;var i=n/(this.options.containerRatio||o);i+=this.wrapper.clientHeight-this.bookLayer.clientHeight,this.elem.style.height=i+"px"}this.resize()}addEventListeners(){this.handleResize=()=>this.resizeContainer(),this.handleKeydown=t=>{if(this.Book.enabled&&(this.options.lightBox||!document.body.classList.contains("flipbook-overflow-hidden"))&&(this.fullscreenActive||!document.body.classList.contains("flipbook-fullscreen"))&&(this.options.arrowsAlwaysEnabledForNavigation&&(37==t.keyCode||39==t.keyCode)||!this.options.lightBox&&!this.fullscreenActive&&(this.options.arrowsDisabledNotFullscreen||this.bodyHasVerticalScrollbar()))){switch(t.keyCode){case 37:this.zoom>1?this.moveBook("left"):this.prevPage();break;case 38:this.zoom>1?this.moveBook("up"):this.nextPage();break;case 39:this.zoom>1?this.moveBook("right"):this.nextPage();break;case 33:this.prevPage();break;case 34:this.nextPage();break;case 36:this.firstPage();break;case 35:this.lastPage();break;case 40:this.zoom>1?this.moveBook("down"):this.prevPage()}return!1}},this.handleFs=()=>this.handleFsChange(),window.addEventListener("resize",this.handleResize),document.addEventListener("keydown",this.handleKeydown),document.addEventListener("MSFullscreenChange",this.handleFs),document.addEventListener("mozfullscreenchange",this.handleFs),document.addEventListener("webkitfullscreenchange",this.handleFs),document.addEventListener("fullscreenchange",this.handleFs)}removeEventListeners(){window.removeEventListener("resize",this.handleResize),document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("MSFullscreenChange",this.handleFs),document.removeEventListener("mozfullscreenchange",this.handleFs),document.removeEventListener("webkitfullscreenchange",this.handleFs),document.removeEventListener("fullscreenchange",this.handleFs)}onBookCreated(){var t=this.options,e=this,i=document.documentElement;if(i.style.setProperty("--flipbook-link-color",this.options.linkColor),i.style.setProperty("--flipbook-link-color-hover",this.options.linkColorHover),i.style.setProperty("--flipbook-link-opacity",this.options.linkOpacity),this.elemStatic="static"==getComputedStyle(this.elem).position,this.resizeContainer(),this.addEventListeners(),this.resizeObserver=new ResizeObserver((t=>{e.resizeContainer()})),this.resizeObserver.observe(this.elem),this.resizeObserver2=new ResizeObserver((()=>{e.resize()})),this.resizeObserver2.observe(this.bookLayer),this.playBgMusic(),t.lightboxCloseOnBack&&(window.onpopstate=function(){e.Book.enabled&&FLIPBOOK.lightboxOpened&&(window.location.hash||e.lightbox.closeLightbox(!0))}),"scroll"!=this.options.viewMode&&this.bookLayer.addEventListener("wheel",function(t){if(!this.Book.enabled)return;if(!this.options.lightBox&&!this.fullscreenActive&&(this.options.wheelDisabledNotFullscreen||this.bodyHasVerticalScrollbar()||this.isIframe()))return;const e=t.deltaX||-t.wheelDeltaX||-t.detail,i=t.deltaY||-t.wheelDeltaY||-t.detail;return Math.abs(i)>0&&Math.abs(i)>Math.abs(e)?(i>0?this.zoomOut(t):this.zoomIn(t),!1):void 0}.bind(this)),e.options.contentOnStart)this.toggleToc(!0);else if(e.options.thumbnailsOnStart)this.options.thumbsStyle="side",this.toggleThumbs(!0);else if(e.options.searchOnStart&&(this.toggleSearch(!0),"string"==typeof this.options.searchOnStart)){const t=this.thumbs.findInput;t.value=this.options.searchOnStart;const e=new KeyboardEvent("keyup",{bubbles:!0});t.dispatchEvent(e)}t.autoplayOnStart&&this.toggleAutoplay(!0),this.resize(),this.Book.updateVisiblePages(),this.Book.zoomTo(t.zoomMin),this.updateCurrentPage(),t.onbookcreated&&t.onbookcreated.call(this),this.bookCreated=!0}initSound(){if(this.options.flipSound){this.flipSound=document.createElement("audio"),this.flipSound.preload="auto";var t=document.createElement("source");t.src=this.options.assets.flipMp3,t.type="audio/mpeg",this.flipSound.appendChild(t)}if(this.options.backgroundMusic){let t=null;if("string"==typeof this.options.backgroundMusic?t=this.options.backgroundMusic:this.options.assets&&this.options.assets.backgroundMp3&&(t=this.options.assets.backgroundMp3),t){this.backgroundMusic=document.createElement("audio"),this.backgroundMusic.preload="auto",this.backgroundMusic.autoplay=!0,this.backgroundMusic.loop=!0;var e=document.createElement("source");e.src=t,e.type="audio/mpeg",this.backgroundMusic.appendChild(e),document.body.appendChild(this.backgroundMusic)}}}touchSwipe(t,e){let i,o,n,s,a,l,r=!1,h=!1,d=0,c=!1;function p(t){if(t.length<2)return 0;let e=t[0].clientX-t[1].clientX,i=t[0].clientY-t[1].clientY;return Math.sqrt(e*e+i*i)}function g(t,e){return{distanceX:t-i,distanceY:e-o}}function u(t){return t.type.includes("mouse")?t:t.touches[0]}var m=this;function b(n){if("touchstart"===n.type)c=!0;else{if("mousedown"===n.type&&c)return;if("A"===n.target.tagName||"SPAN"===n.target.tagName||"MARK"===n.target.tagName)return void m.trigger("disableIScroll")}m.trigger("enableIScroll");let a=u(n);i=a.clientX,o=a.clientY,s=(new Date).getTime(),r=!0,d=n.touches?n.touches.length:1,e(n,"start",null,0,0,d),t.addEventListener("mousemove",f),t.addEventListener("touchmove",f,{passive:!1})}function f(t){let i=u(t),{distanceX:o,distanceY:s}=g(i.clientX,i.clientY);if(a=i.clientX,l=i.clientY,r&&"mousemove"===t.type)t.preventDefault(),e(t,"move",o,s,0,1);else if(t.touches&&2===t.touches.length){let i;if(t.preventDefault(),"number"==typeof t.scale)i=t.scale;else{let e=p(t.touches);h?i=e/n:(h=!0,n=e,i=1)}h?e(t,"pinch",i,null,0,2):(h=!0,n=p(t.touches),e(t,"pinchstart",i,null,0,2))}else t.touches&&1===t.touches.length&&(m.zoom>1&&t.preventDefault(),e(t,"move",o,s,0,1))}function v(t){m.trigger("enableIScroll"),"touchend"!==t.type&&"mouseup"!==t.type||setTimeout((function(){c=!1}),300);let i=t.changedTouches?t.changedTouches[0]:t,{distanceX:o,distanceY:n}=g(i.clientX,i.clientY),a=(new Date).getTime()-s;r&&(r=!1,e(t,"end",o,n,a,t.changedTouches?t.changedTouches.length:1)),h&&(h=!1,e(t,"pinchend",null,0,0,2)),k()}function w(t){setTimeout((function(){c=!1}),300);let i=(new Date).getTime()-s,{distanceX:o,distanceY:n}=g(a,l);r&&(r=!1,e(t,"cancel",o,n,i,1)),h&&(h=!1,e(t,"pinchcancel",o,n,i,2)),k()}function k(){t.removeEventListener("mousemove",f),t.removeEventListener("touchmove",f)}t.addEventListener("mousedown",b),t.addEventListener("touchstart",b),t.addEventListener("mouseup",v),t.addEventListener("touchend",v),t.addEventListener("mouseleave",w),t.addEventListener("touchcancel",w)}initSwipe(){var t=this;let e=!1,i=!1,o=!1;this.touchSwipe(this.book,(function(n,s,a,l,r,h){if(o="toolSelect"==t.tool||t.options.pageDragDisabled,"start"==s){t.zoomStart=t.zoom;try{t.currentPageInput.dispatchEvent(new Event("blur",{bubbles:!0,cancelable:!0}))}catch(n){}}if(h>1&&"pinch"==s){let e=a;n.scale&&(e=n.scale),t.zoomTo(t.zoomStart*e,0,n),i=!0}if("end"==s){if(!t.options.doubleClickZoomDisabled)if(t.clickTimer){clearTimeout(t.clickTimer),delete t.clickTimer;if(null!==n.target.closest(".flipbook-page-html")){var d=t.options.zoomTime;t.zoom>=t.options.zoomMax?t.zoomTo(t.options.zoomMin,d,n):t.zoomTo(t.options.zoomMax,d,n)}}else t.clickTimer=setTimeout((function(){delete t.clickTimer}),300);Math.abs(a)<5&&r<200&&(e=!0)}e||i||o||t.Book.onSwipe(n,s,a,l,r,h),e=!1,"pinchend"==s&&(i=!1)})),this.swipeEnabled=!0}createSVGIcon(t,e){var i=document.createElement("div");i.innerHTML={plus:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"/></svg>',minus:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><path d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/></svg>',expand:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"/></svg>',compress:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"/></svg>',thumbs:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M448 96V224H288V96H448zm0 192V416H288V288H448zM224 224H64V96H224V224zM64 288H224V416H64V288zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>',print:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>',sound:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 640 512"><path d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>',mute:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512"><path d="M301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"/></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"/></svg>',facebook:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><path d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"/></svg>',twitter:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>',list:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M24 56c0-13.3 10.7-24 24-24H80c13.3 0 24 10.7 24 24V176h16c13.3 0 24 10.7 24 24s-10.7 24-24 24H40c-13.3 0-24-10.7-24-24s10.7-24 24-24H56V80H48C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432H120c13.3 0 24 10.7 24 24s-10.7 24-24 24H32c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>',pdf:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"/></svg>',tools:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 128 512"><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><path d="M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512"><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"/></svg>',bookmark:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512"><path d="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"/></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>',last:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/></svg>',double:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M384 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l320 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"/></svg>',single:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512"><path d="M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5l0-377.4c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8L0 454.1c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5zm76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5l0-370.3c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11L304 456c0 11.4 11.7 19.3 22.4 15.5z"/></svg>',camera:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>',linkedin:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"/></svg>',whatsapp:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>',pinterest:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512"><path d="M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"/></svg>',email:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"/></svg>',digg:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M81.7 172.3H0v174.4h132.7V96h-51v76.3zm0 133.4H50.9v-92.3h30.8v92.3zm297.2-133.4v174.4h81.8v28.5h-81.8V416H512V172.3H378.9zm81.8 133.4h-30.8v-92.3h30.8v92.3zm-235.6 41h82.1v28.5h-82.1V416h133.3V172.3H225.1v174.4zm51.2-133.3h30.8v92.3h-30.8v-92.3zM153.3 96h51.3v51h-51.3V96zm0 76.3h51.3v174.4h-51.3V172.3z"/></svg>',reddit:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"/></svg>',copyLink:'<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 640 512"><path d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"/></svg>'}[t];var o=i.firstChild;return o.setAttribute("aria-hidden","true"),o.classList.add("flipbook-icon"),e&&o.classList.add("flipbook-icon-reverse"),o}createButton(t){var e=this.options,i=t.toolsMenu&&e.btnTools.enabled,o=!i&&("top"===t.vAlign&&e.menu2Transparent||"top"!==t.vAlign&&e.menuTransparent),n=t.background||(o?e.floatingBtnBackground:e.btnBackground),s=t.backgroundHover||(o?e.floatingBtnBackgroundHover:e.btnBackgroundHover),a=t.color||(o?e.floatingBtnColor:e.btnColor),l=t.colorHover||(o?e.floatingBtnColorHover:e.btnColorHover),r=o?e.floatingBtnTextShadow:e.btnTextShadow,h=t.radius||(o?e.floatingBtnRadius:e.btnRadius),d=t.border||(o?e.floatingBtnBorder:e.btnBorder),c=o?e.floatingBtnMargin:e.btnMargin,p=e.btnPaddingV+4,g=e.btnPaddingH+4,u=document.createElement("span"),m=t.size||e.btnSize;i&&(n="none",s="none");const b=t.svg||t.name.replace("btn","").toLowerCase();var f;if(u.$icon=this.createSVGIcon(b,t.iconReverse),u.appendChild(u.$icon),t.svgAlt&&(u.$iconAlt=this.createSVGIcon(t.svgAlt,t.iconReverse),u.appendChild(u.$iconAlt),u.$iconAlt.classList.add("flipbook-hidden")),function(t){t.style.margin=`${c}px`,t.style.padding=`${p}px ${g}px`,t.style.borderRadius=`${h}px`,t.style.boxShadow=e.btnShadow,t.style.border=d,t.style.color=a,t.$icon.style.fill=a,t.$iconAlt&&(t.$iconAlt.style.fill=a),t.style.background=n,t.style.textShadow=r,t.style.width=`${m}px`,t.style.height=`${m}px`,a&&t.classList.remove("skin-color"),n&&t.classList.remove("skin-color-bg")}(u),t.onclick&&u.addEventListener("click",(function(){t.onclick()})),(l||s)&&(u.addEventListener("mouseenter",(function(){this.classList.contains("disabled")||(u.$icon.style.fill=l,u.$icon.style.background=s,u.$iconAlt&&(u.$iconAlt.style.fill=l,u.$iconAlt.style.background=s))})),u.addEventListener("mouseleave",(function(){u.$icon.style.fill=a,u.$icon.style.background=n,u.$iconAlt&&(u.$iconAlt.style.fill=a,u.$iconAlt.style.background=n)}))),i){f=this.toolsMenu;var v=document.createElement("span");v.textContent=t.title,v.classList.add("skin-color"),u.appendChild(v)}else f="top"===t.vAlign?e.menu2Floating?this.menuTC:"left"===t.hAlign?this.menuTL:"right"===t.hAlign?this.menuTR:this.menuTC:e.menuFloating?this.menuBC:"left"===t.hAlign?this.menuBL:"right"===t.hAlign?this.menuBR:this.menuBC;return u.setAttribute("data-name",t.name),u.classList.add("flipbook-menu-btn-wrapper","flipbook-menu-btn","skin-color"),u.style.order=t.order,f.appendChild(u),i||(u.setAttribute("data-tooltip",t.title),u.classList.add("flipbook-has-tooltip")),u}createMenu(){if(!this.menuBottom){var t=this.options,e=t.menuFloating?"flipbook-menu-floating":"flipbook-menu-fixed",i=t.menu2Floating?"flipbook-menu-floating":"flipbook-menu-fixed",o=this;this.menuBottom=document.createElement("div"),this.menuBottom.classList.add("flipbook-menuBottom",e),t.menuTransparent||"gradient"===t.skin||this.menuBottom.classList.add("flipbook-border"),this.menuBottom.style.background=t.menuBackground,this.menuBottom.style.boxShadow=t.menuShadow,this.menuBottom.style.margin=t.menuMargin+"px",this.menuBottom.style.padding=t.menuPadding+"px",this.wrapper.appendChild(this.menuBottom),t.menuTransparent||t.menuBackground||this.menuBottom.classList.add("skin-color-bg"),t.hideMenu&&this.menuBottom.classList.add("flipbook-hidden"),this.menuTop=document.createElement("div"),this.menuTop.classList.add("flipbook-menuTop",i),t.menu2Transparent||"gradient"===t.skin||this.menuTop.classList.add("flipbook-border"),this.menuTop.style.background=t.menu2Background,this.menuTop.style.boxShadow=t.menu2Shadow,this.menuTop.style.margin=t.menu2Margin+"px",this.menuTop.style.padding=t.menu2Padding+"px",this.wrapper.appendChild(this.menuTop),t.menu2Transparent||t.menu2Background||this.menuTop.classList.add("skin-color-bg"),"swipe"===t.viewMode&&(t.btnSound.enabled=!1),t.progressBar.enabled&&t.progressBar.vAlign,this.menuBL=r("flipbook-menu flipbook-menu-left",this.menuBottom),this.menuBC=r("flipbook-menu flipbook-menu-center",this.menuBottom),this.menuBR=r("flipbook-menu flipbook-menu-right",this.menuBottom),this.menuTL=r("flipbook-menu flipbook-menu-left",this.menuTop),this.menuTC=r("flipbook-menu flipbook-menu-center",this.menuTop),this.menuTR=r("flipbook-menu flipbook-menu-right",this.menuTop),this.options.btnTools.enabled&&(this.toolsMenu=document.createElement("div"),this.toolsMenu.className="flipbook-tools flipbook-submenu skin-color skin-color-bg flipbook-font flipbook-border"),this.options.btnShare.enabled&&(this.shareMenu=document.createElement("div"),this.shareMenu.className="flipbook-share flipbook-submenu skin-color skin-color-bg flipbook-font flipbook-border"),t.sideNavigationButtons&&(this.$arrowWrapper=document.createElement("div"),this.$arrowWrapper.className="flipbook-nav",this.bookLayer.appendChild(this.$arrowWrapper),this.btnNext=this.createSVGIcon("next"),this.$arrowWrapper.appendChild(this.btnNext),this.btnNext.style.height=t.arrowSize+"px",this.btnNext.style.fontSize=t.arrowSize+"px",this.btnNext.style.marginTop=String(-t.arrowSize/2)+"px",this.btnNext.style.marginRight=t.arrowMargin+"px",this.btnNext.classList.add("flipbook-right-arrow"),h(this.btnNext,this.nextPage.bind(this)),this.btnPrev=this.createSVGIcon("next",!0),this.$arrowWrapper.appendChild(this.btnPrev),this.btnPrev.style.height=t.arrowSize+"px",this.btnPrev.style.fontSize=t.arrowSize+"px",this.btnPrev.style.marginTop=String(-t.arrowSize/2)+"px",this.btnPrev.style.marginLeft=t.arrowMargin+"px",this.btnPrev.classList.add("flipbook-left-arrow"),h(this.btnPrev,this.prevPage.bind(this)),t.btnFirst.enabled&&(this.btnFirst=this.createSVGIcon("last",!0),this.$arrowWrapper.appendChild(this.btnFirst),this.btnFirst.style.height=.5*t.arrowSize+"px",this.btnFirst.style.fontSize=.5*t.arrowSize+"px",this.btnFirst.style.marginTop=String(t.arrowSize/2+t.arrowMargin+2*t.arrowPadding)+"px",this.btnFirst.style.marginLeft=t.arrowMargin+"px",this.btnFirst.classList.add("flipbook-first-arrow"),h(this.btnFirst,this.firstPage.bind(this))),t.btnLast.enabled&&(this.btnLast=this.createSVGIcon("last"),this.$arrowWrapper.appendChild(this.btnLast),this.btnLast.style.height=.5*t.arrowSize+"px",this.btnLast.style.fontSize=.5*t.arrowSize+"px",this.btnLast.style.marginTop=String(t.arrowSize/2+t.arrowMargin+2*t.arrowPadding)+"px",this.btnLast.style.marginRight=t.arrowMargin+"px",this.btnLast.classList.add("flipbook-last-arrow"),h(this.btnLast,this.lastPage.bind(this))),t.menuNavigationButtons||(t.btnOrder.indexOf("btnFirst")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnFirst"),1),t.btnOrder.indexOf("btnPrev")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnPrev"),1),t.btnOrder.indexOf("btnNext")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnNext"),1),t.btnOrder.indexOf("btnLast")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnLast"),1))),t.pdfMode&&!t.btnDownloadPdf.url&&(t.btnDownloadPdf.url=t.pdfUrl),t.btnDownloadPdf.url||(t.btnDownloadPdf.enabled=!1),!t.pdfTextLayer&&t.btnSearch&&(t.btnSearch.enabled=!1);for(var n=[],s=0;s<t.btnOrder.length;s++){var a=t.btnOrder[s],l=t[a];t.isMobile&&l.hideOnMobile&&(l.enabled=!1),l.toolsMenu&&l.enabled&&n.push(l)}n.length<=1&&(t.btnTools.enabled=!1);for(s=0;s<t.btnOrder.length;s++){a=t.btnOrder[s];if((l=t[a]).enabled)if(l.name=a,"currentPage"===l.name)this.createCurrentPage();else if("progressBar"===l.name);else if("search"===l.name){this.$search=document.createElement("div"),this.$search.className="flipbook-findbar",this.$search.innerHTML='<div><input class="toolbarField skin-color skin-color-bg" title="Find" autocapitalize="none" placeholder="'+t.strings.findInDocument+'..."></div><div class="flipbook-find-info skin-color"></div>',this.menuTL.appendChild(this.$search),this.$search.querySelector("input").addEventListener("change",(function(){o.toggleSearch(!0),o.thumbs.$findInput.value=this.value;var t=new Event("keyup");o.thumbs.$findInput.dispatchEvent(t),this.value=""})),this.menuTL.style.flexDirection="column",this.menuTL.style.alignItems="flex-start"}else this[a]=this.createButton(l),this[a].addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),o.onButtonClick(this,t)}))}t.buttons&&t.buttons.forEach((t=>{o.createButton(t).index(1)})),this.btnSingle&&this.toggleIcon(this.btnSingle,this.options.singlePageMode)}function r(t,e){const i=document.createElement("div");return i.className=t,e.appendChild(i),i}function h(e,i){e.addEventListener("click",(function(t){if(e.disabled)return!1;e.disabled=!0,setTimeout((function(){e.disabled=!1}),300),t.stopPropagation(),t.preventDefault(),i()})),Object.assign(e.style,{width:`${t.arrowSize}px`,borderRadius:`${t.arrowRadius}px`,padding:`${t.arrowPadding}px`,filter:`drop-shadow(${t.arrowTextShadow})`,border:t.arrowBorder,color:t.arrowColor,fill:t.arrowColor,background:t.arrowBackground,boxSizing:"initial"}),t.arrowBackgroundHover&&(e.addEventListener("mouseenter",(function(){this.classList.contains("disabled")||(e.style.background=t.arrowBackgroundHover)})),e.addEventListener("mouseleave",(function(){e.style.background=t.arrowBackground}))),t.arrowColor&&e.classList.remove("skin-color"),t.arrowBackground&&e.classList.remove("skin-color-bg")}}onButtonClick(t,e){var i=t.dataset.name,o=this.options;switch(i){case"btnFirst":this.firstPage();break;case"btnPrev":this.prevPage();break;case"btnNext":this.nextPage();break;case"btnLast":this.lastPage();break;case"btnZoomIn":this.zoomIn();break;case"btnZoomOut":this.zoomOut();break;case"btnAutoplay":this.autoplay||this.nextPage(),this.toggleAutoplay();break;case"btnSearch":this.toggleSearch();break;case"btnBookmark":this.toggleBookmark();break;case"btnRotateLeft":this.Book.rotateLeft&&this.Book.rotateLeft();break;case"btnRotateRight":this.Book.rotateRight&&this.Book.rotateRight();break;case"btnToc":this.toggleToc();break;case"btnThumbs":this.toggleThumbs();break;case"btnShare":this.toggleShareMenu();break;case"btnTools":this.toggleToolsMenu();break;case"btnNotes":this.toggleNotesMenu();break;case"btnDownloadPages":if(o.downloadMenu)this.toggleDownloadMenu();else{var n=document.createElement("a");n.href=o.pdfUrl||o.btnDownloadPages.url,n.dispatchEvent(new MouseEvent("click"))}break;case"btnPrint":o.printMenu?this.togglePrintMenu():this.togglePrintWindow();break;case"btnDownloadPdf":if(o.btnDownloadPdf.forceDownload){var s=o.btnDownloadPdf.url,a=document.createElement("a");a.href=s;var l=a.href.split("/").pop().split("#")[0].split("?")[0];a.download=l,document.body.appendChild(a),a.click(),document.body.removeChild(a)}else{var r=o.btnDownloadPdf.openInNewWindow||(o.btnDownloadPdf.openInNewWindow,1)?"_blank":"_self";window.open(o.btnDownloadPdf.url,r)}this.sendGAEvent({event:"flipbook_pdf_download",book_name:this.options.name,url:o.btnDownloadPdf.url||o.pdfUrl,nonInteraction:!0});break;case"btnSound":this.toggleSound();break;case"btnExpand":this.toggleExpand();break;case"btnSingle":this.toggleSinglePage();break;case"btnClose":this.lightbox.closeLightbox()}}handleFsChange(){this.Book&&this.Book.enabled&&((document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)===this.fullscreenElement||this.isFullscreen?(this.fullscreenActive=!0,this.options.onfullscreenenter&&this.options.onfullscreenenter.call(this),document.body.classList.add("flipbook-fullscreen")):(this.fullscreenActive=!1,this.options.onfullscreenexit&&this.options.onfullscreenexit.call(this),document.body.classList.remove("flipbook-fullscreen")),this.toggleIcon(this.btnExpand,!this.fullscreenActive))}createLogo(){const{options:t,wrapper:e}=this,{logoImg:i,logoCSS:o,logoAlignH:n,logoAlignV:s,logoUrl:a,logoUrlTarget:l,isMobile:r,logoHideOnMobile:h}=t;if(!i||r&&h)return;const d=`${o}`+["position:absolute","right"===n?"right:0":"left"===n?"left:0":"","bottom"===s?"bottom:0":"top"===s?"top:0":""].filter(Boolean).join(";")+";",c=(({zIndex:t="",opacity:e=""}={})=>{const o=document.createElement("img");return o.src=i,o.style.cssText=d+(t?`z-index:${t};`:"")+(e?`opacity:${e};`:""),a&&(o.style.cursor="pointer",o.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),window.open(a,l||"_blank")}))),o})();e.appendChild(c)}setLoadingProgress(t){this.disposed||(this.$fillPreloader?this.setFillPreloaderProgress(t):t>0&&t<1?this.preloader.classList.remove("flipbook-hidden"):this.preloader.classList.add("flipbook-hidden"))}setFillPreloaderProgress(t){if(this.$fillPreloader)if(t>0&&t<1){if(this.fillPreloaderProgress=this.fillPreloaderProgress||0,t<this.fillPreloaderProgress)return;this.fillPreloaderProgress=t;var e=this.$fillPreloaderImg[0];e.style.clip="rect(0px,"+e.width*t+"px,"+e.height+"px,0px)",this.$fillPreloader.show()}else this.$fillPreloader.hide()}playFlipSound(){if(this.options.sound&&this.Book.enabled&&void 0!==this.flipSound.play){this.flipSound.currentTime=0;var t=this;setTimeout((function(){t.flipSound.play().then((function(){}),(function(){}))}),70)}}playBgMusic(t=!0){if(!this.options.sound||!this.backgroundMusic)return;const e=()=>{const i=this.backgroundMusic.play();i&&"function"==typeof i.catch&&i.catch((i=>{t&&i&&("NotAllowedError"===i.name||i.message?.includes("user"))&&setTimeout(e,200)}))};e()}onMouseWheel(t){if("wheelDeltaX"in t)wheelDeltaX=t.wheelDeltaX/12,wheelDeltaY=t.wheelDeltaY/12;else if("wheelDelta"in t)wheelDeltaX=wheelDeltaY=t.wheelDelta/12;else{if(!("detail"in t))return;wheelDeltaX=wheelDeltaY=3*-t.detail}wheelDeltaX>0?this.zoomIn(t):this.zoomOut(t)}zoomTo(t,e,i){var o,n;if(this.zoom=t,void 0===i)o=this.wrapperW/2,n=this.wrapperH/2;else{i.touches&&i.touches[0]?(o=i.touches[0].pageX,n=i.touches[0].pageY):i.changedTouches&&i.changedTouches[0]?(o=i.changedTouches[0].pageX,n=i.changedTouches[0].pageY):(o=i.pageX,n=i.pageY);let t=this.wrapper.getBoundingClientRect();o=o-t.left-window.scrollX,n=n-t.top-window.scrollY}const s=this.getZoomMin();this.zoom<s&&(this.zoom=s),this.zoom>this.options.zoomMax&&(this.zoom=this.options.zoomMax),this.options.zoomMax2&&this.zoom>this.options.zoomMax2&&(this.zoom=this.options.zoomMax2),this.Book.zoomTo(this.zoom,e,o,n),this.onZoom(this.zoom)}zoomOut(t){var e=this.zoom/this.options.zoomStep;const i=this.getZoomMin();e=e<i?i:e,this.zoom!=e&&(this.zoom=e,this.zoomTo(this.zoom,this.options.zoomTime,t))}zoomIn(t){var e=this.zoom*this.options.zoomStep;e>this.options.zoomMax&&(e=this.options.zoomMax),this.zoom!=e&&(this.zoom=e,this.zoomTo(this.zoom,this.options.zoomTime,t))}getZoomMin(){return"scroll"==this.options.viewMode?this.options.zoomMin2:this.options.zoomMin}nextPage(){this.Book&&(this.flippingPage=!0,this.Book.canFlipNext()&&(this.Book.nextPage(),window.getSelection().removeAllRanges()))}prevPage(){this.Book&&(this.flippingPage=!0,this.Book.canFlipPrev()&&(this.Book.prevPage(),window.getSelection().removeAllRanges()))}firstPage(){this.goToPage(1)}lastPage(){this.goToPage(this.options.pages.length)}goToPage(t,e){this.Book&&(e||(this.flippingPage=!0),this.options.cover||t++,t<1?t=1:t>this.options.numPages&&!this.options.rightToLeft&&(t=this.options.numPages),this.Book.goToPage(t,e),window.getSelection().removeAllRanges())}moveBook(t){this.Book&&this.Book.move&&this.Book.move(t)}onZoom(t){this.zoom=t;const e=this.getZoomMin();this.enableButton(this.btnZoomIn,t<this.options.zoomMax),this.enableButton(this.btnZoomOut,t>e),this.enableSwipe(t<=1),this.sendGAEvent({event:"flipbook_zoom",book_name:this.options.name,page_number:this.currentPageValue,zoom:t,nonInteraction:!0})}enableSwipe(t){this.swipeEnabled=t}createCurrentPage(){var t,e=this,i=this.options,o="flipbook-currentPageHolder ";t="top"==i.currentPage.vAlign?"left"==i.currentPage.hAlign?this.menuTL:"right"==i.currentPage.hAlign?this.menuTR:this.menuTC:"left"==i.currentPage.hAlign?this.menuBL:"right"==i.currentPage.hAlign?this.menuBR:this.menuBC;var n="top"==i.currentPage.vAlign&&i.menu2Transparent||"top"!=i.currentPage.vAlign&&i.menuTransparent,s=n?i.floatingBtnBackground:"",a=n?i.floatingBtnColor:i.btnColor,l=n?i.floatingBtnTextShadow:"",r=n?i.floatingBtnRadius:i.btnRadius,h=document.createElement("div");t.appendChild(h),h.style.margin=i.currentPage.marginV+"px "+i.currentPage.marginH+"px",h.style.height=i.btnSize+"px",h.style.padding=i.btnPaddingV+"px",n||(o+=" skin-color"),h.className=o,h.style.color=a,h.style.background=s,h.style.textShadow=l,h.style.borderRadius=r+"px",i.currentPage.order&&(h.style.order=i.currentPage.order),this.currentPageHolder=h;var d=document.createElement("form");h.appendChild(d),d.addEventListener("submit",(function(t){t.preventDefault();var o=parseInt(e.currentPageInput.value,10);return e.options.rightToLeft?(o=i.pages.length-o+1,o-=e.options.pageNumberOffset):(o=Math.min(o,i.pages.length),o+=e.options.pageNumberOffset),e.goToPage(o),!1})),this.currentPageInput=document.createElement("input"),this.currentPageInput.type="text",this.currentPageInput.className="flipbook-currentPageInput",this.currentPageInput.style.margin=i.currentPage.marginV+"px "+i.currentPage.marginH+"px",this.currentPageInput.style.color=a,this.currentPageInput.addEventListener("focus",(function(){e.currentPageInput.value=""})),this.currentPageInput.addEventListener("blur",(function(){e.currentPageInput.value=e.currentPageString})),d.appendChild(this.currentPageInput);var c=String(i.numPages).length;this.currentPageInput.classList.add("digits-"+c),this.currentPageInput.setAttribute("maxlength",c),this.currentPage=document.createElement("div"),this.currentPage.className="flipbook-currentPageNumber",h.appendChild(this.currentPage),n||this.currentPageInput.classList.add("skin-color")}createMenuHeader(t,e,i){var o=document.createElement("div");o.className="flipbook-menu-header skin-clor flipbook-font",t.appendChild(o);var n=document.createElement("span");n.textContent=e,n.className="flipbook-menu-title skin-color",o.appendChild(n);var s=document.createElement("span");s.className="flipbook-btn-close skin-color",o.appendChild(s),s.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.closeMenus()}));var a=this.createSVGIcon("close");s.appendChild(a)}createToc(){var t=this.options.tableOfContent;this.tocHolder=document.createElement("div"),this.tocHolder.className="flipbook-tocHolder flipbook-side-menu skin-color-bg flipbook-border",this.wrapper.appendChild(this.tocHolder),this.tocHolder.style[this.options.sideMenuPosition]="0",this.tocHolder.classList.add("flipbook-hidden"),this.createMenuHeader(this.tocHolder,this.strings.tableOfContent,this.toggleToc),this.toc=document.createElement("div"),this.toc.className="flipbook-toc",this.tocHolder.appendChild(this.toc);var e=this.options.pages;if(!t||!t.length){t=[];for(var i=0;i<e.length;i++)e[i].title&&t.push({title:e[i].title,page:String(i+1),pageNumberDisplay:e[i].name})}for(i=0;i<t.length;i++)e[i]&&e[i].name&&t[i].page&&(t[i].pageNumberDisplay=e[t[i].page-1].name);this.createSVGIcon("next");this.tocScroller=this.buildTOC(t),this.tocScroller.className="flipbook-toc-scroller",this.toc.appendChild(this.tocScroller),this.tocCreated=!0,this.toggleToc()}buildTOC(t){const e=this,i=document.createElement("ul"),o=this.createSVGIcon("next");return t.forEach((t=>{const n=document.createElement("li"),s=document.createElement("div");s.classList.add("toc-item","skin-color");const a=document.createElement("div");if(a.classList.add("title-container"),t.items&&t.items.length>0){const t=document.createElement("span");t.classList.add("expand-icon"),t.innerHTML=o.outerHTML,t.addEventListener("click",(function(e){e.stopPropagation();const i=n.querySelector("ul");"none"===i.style.display?(i.style.display="block",t.classList.add("expanded")):(i.style.display="none",t.classList.remove("expanded"))})),a.appendChild(t)}else{const t=document.createElement("span");t.classList.add("spacer"),t.innerHTML=" ",a.appendChild(t)}const l=document.createElement("span");l.textContent=t.title,l.classList.add("title"),a.appendChild(l),s.appendChild(a);const r=document.createElement("span");if(r.textContent=t.pageNumberDisplay||t.page,r.classList.add("page-number"),s.appendChild(r),s.addEventListener("click",(function(i){if(i.stopPropagation(),i.preventDefault(),e.options.tableOfContentCloseOnClick&&e.toggleToc(!1),!t.page&&t.dest)"string"==typeof t.dest?e.pdfService.pdfDocument.getDestination(t.dest).then((function(t){e.goToDest(t)})):e.goToDest(t.dest);else{var o=Number(t.page);o=e.options.rightToLeft?e.options.pages.length-o+1:o,setTimeout((function(){e.goToPage(o)}),200)}})),n.appendChild(s),t.items&&t.items.length>0){const e=this.buildTOC(t.items);e.style.display="none",n.appendChild(e)}i.appendChild(n)})),i}goToDest(t){var e=this;e.pdfService.pdfDocument.getPageIndex(t[0]).then((function(t){var i=t+1;e.options.doublePage&&(i=2*i-1),i=e.options.rightToLeft?e.options.pages.length-i+1:i,setTimeout((function(){e.goToPage(i)}),200)}))}enablePrev(t){this.prevEnabled!=t&&this.btnPrev&&(this.enableButton(this.btnPrev,t),this.enableButton(this.btnFirst,t),this.prevEnabled=t,this.Book.enablePrev(t))}enableNext(t){this.nextEnabled!=t&&this.btnNext&&(this.enableButton(this.btnNext,t),this.enableButton(this.btnLast,t),this.nextEnabled=t,this.Book.enableNext(t))}enableButton(t,e){void 0!==t&&(e?t.classList.remove("disabled"):t.classList.add("disabled"),t.enabled=e)}resize(t){var e=this.options;if(this.updateWrapperDimensions(),this.Book&&this.Book.enabled){if(this.menuShowing&&(this.bookLayer.style.bottom=!e.menuOverBook&&this.menuBottom?this.menuBottom.offsetHeight+"px":"0px",this.bookLayer.style.top=!e.menu2OverBook&&this.menuTop?this.menuTop.offsetHeight+"px":"0px"),this.tocShowing||this.thumbsShowing||this.searchShowing||this.bookmarkShowing){var i=this.tocShowing?this.tocHolder.getBoundingClientRect().width:this.thumbsShowing&&"overlay"===this.options.thumbsStyle?0:this.thumbs.thumbHolder.getBoundingClientRect().width;this.bookLayer.style[this.options.sideMenuPosition]=`${i}px`;let t={bottom:"0px",top:"0px"};e.sideMenuOverMenu||(t.bottom=this.menuBottom.offsetHeight+"px"),e.sideMenuOverMenu2||(t.top=this.menuTop.offsetHeight+"px"),this.wrapper.querySelectorAll(".flipbook-side-menu").forEach((function(e){for(var i in t)t.hasOwnProperty(i)&&(e.style[i]=t[i])}))}else this.bookLayer.style[this.options.sideMenuPosition]="0px";this.adjustZoomLimits(),this.Book.onResize(t),this.Book.zoomTo(e.zoomMin)}}updateWrapperDimensions(){let t=this.bookLayer.getBoundingClientRect();this.wrapperW=t.width,this.wrapperH=t.height}adjustZoomLimits(){var t=this.options,e=this.wrapperW/this.wrapperH,i=this.pageW/this.pageH,o=2*i,n=this.menuTop.offsetHeight,s=this.menuBottom.offsetHeight,a=Math.max(n,s),l=t.bookMargin||20;t.menuOverBook&&t.menu2OverBook?t.zoomMin=(this.wrapperH-2*a-l)/this.wrapperH:t.zoomMin=(this.wrapperH-l)/this.wrapperH,"scroll"==t.viewMode?t.zoomMax=t.zoomSize*t.pageWidth/t.pageHeight*2/this.wrapperW:t.responsiveView&&this.wrapperW<=t.responsiveViewTreshold&&e<o&&e<t.responsiveViewRatio?t.zoomMax=t.zoomSize/this.wrapperH*(e>i?1:i/e):t.zoomMax=t.zoomSize/this.wrapperH*(e>o?1:o/e),t.zoomMax=Math.max(t.zoomMax,t.zoomMin)}pdfResize(){this.Book.onZoom()}createThumbs(){this.thumbs=new FLIPBOOK.Thumbnails(this)}toggleThumbs(t){this.thumbs||this.createThumbs(),void 0!==t&&(this.thumbsShowing=!t),this.thumbsShowing?(this.thumbs.hide(),this.thumbsShowing=!1):(this.closeMenus(),this.thumbs.show(),this.thumbsShowing=!0),this.resize()}toggleToc(t){this.tocCreated?(!this.tocShowing||t?(this.closeMenus(),this.tocShowing=!0,this.tocHolder.classList.remove("flipbook-hidden")):(this.tocHolder.classList.add("flipbook-hidden"),this.tocShowing=!1),this.resize()):this.createToc()}toggleSearch(t){this.thumbs||this.createThumbs(),void 0!==t&&(this.searchShowing=!t),this.searchShowing?(this.thumbs.hide(),this.searchShowing=!1,this.unmark()):(this.closeMenus(),this.thumbs.show(),this.thumbs.showSearch(),this.searchShowing=!0),this.resize()}toggleBookmark(t){this.thumbs||this.createThumbs(),void 0!==t&&(this.bookmarkShowing=!t),this.bookmarkShowing?(this.thumbs.hide(),this.bookmarkShowing=!1):(this.closeMenus(),this.thumbs.show(),this.thumbs.showBookmarks(),this.bookmarkShowing=!0),this.resize()}closeMenus(){this.thumbsShowing&&this.toggleThumbs(),this.tocShowing&&this.toggleToc(),this.searchShowing&&this.toggleSearch(),this.bookmarkShowing&&this.toggleBookmark(),this.printMenuShowing&&this.togglePrintMenu(),this.dlMenuShowing&&this.toggleDownloadMenu(),this.shareMenuShowing&&this.toggleShareMenu(),this.toolsMenuShowing&&this.toggleToolsMenu(),this.notesMenuShowing&&this.toggleNotesMenu(),this.passwordMenuShowing&&this.togglePasswordMenu(),this.tooltip2.hideTooltip()}toggleToolsMenu(){var t=this;this.toolsMenu.parentNode||(this.btnTools.appendChild(this.toolsMenu),this.toolsMenu.addEventListener("click",(function(t){t.stopPropagation()})),document.addEventListener("click",(function(e){t.toolsMenuShowing&&t.toggleToolsMenu(),t.shareMenuShowing&&t.toggleShareMenu()}))),this.toolsMenuShowing?(this.toolsMenu.classList.add("flipbook-hidden"),this.toolsMenuShowing=!1,this.btnTools.classList.remove("flipbook-btn-active"),this.btnTools.classList.add("flipbook-has-tooltip")):(this.closeMenus(),this.toolsMenu.classList.remove("flipbook-hidden"),this.toolsMenuShowing=!0,this.btnTools.classList.add("flipbook-btn-active"),this.btnTools.classList.remove("flipbook-has-tooltip"))}togglePrintMenu(){var t=this;if(this.printMenu)this.printMenuShowing?(this.printMenu.style.display="none",this.printMenuShowing=!1):(this.closeMenus(),this.printMenu.style.display="block",this.printMenuShowing=!0,this.updateCurrentPage());else{this.printMenu=document.createElement("div"),this.printMenu.className="flipbook-sub-menu flipbook-font flipbook-border",this.wrapper.appendChild(this.printMenu);var e=document.createElement("div");e.className="flipbook-sub-menu-center",this.printMenu.appendChild(e);var i=document.createElement("div");i.className="flipbook-sub-menu-content skin-color-bg",e.appendChild(i),this.createMenuHeader(i,this.strings.print,this.togglePrintMenu.bind(this));var o=document.createElement("a");o.innerHTML='<div class="c-p skin-color flipbook-btn">'+this.strings.printCurrentPage+"</div>",i.appendChild(o),o.addEventListener("click",(function(){t.printPage(t.cPage[0],this)}));var n=document.createElement("a");n.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+this.strings.printLeftPage+"</div>",i.appendChild(n),n.addEventListener("click",(function(){t.printPage(t.cPage[0],this)}));var s=document.createElement("a");s.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+this.strings.printRightPage+"</div>",i.appendChild(s),s.addEventListener("click",(function(){t.printPage(t.cPage[1],this)}));var a=document.createElement("a");a.innerHTML='<div class="skin-color flipbook-btn">'+this.strings.printAllPages+"</div>",i.appendChild(a),a.addEventListener("click",(function(){t.togglePrintWindow()})),this.closeMenus(),this.printMenuShowing=!0,this.updateCurrentPage()}}toggleDownloadMenu(){var t=this;if(this.dlMenu)this.dlMenuShowing?(this.dlMenu.style.display="none",this.dlMenuShowing=!1):(this.closeMenus(),this.dlMenu.style.display="block",this.dlMenuShowing=!0,this.updateCurrentPage());else{this.dlMenu=document.createElement("div"),this.dlMenu.className="flipbook-sub-menu flipbook-font flipbook-border",this.wrapper.appendChild(this.dlMenu);var e=document.createElement("div");e.className="flipbook-sub-menu-center",this.dlMenu.appendChild(e);var i=document.createElement("div");i.className="flipbook-sub-menu-content skin-color-bg",e.appendChild(i),this.createMenuHeader(i,this.strings.download,this.toggleDownloadMenu.bind(this));var o=document.createElement("a");o.innerHTML='<div class="c-p skin-color flipbook-btn">'+this.strings.downloadCurrentPage+"</div>",i.appendChild(o),o.addEventListener("click",(function(){t.downloadPage(t.cPage[0],this),t.toggleDownloadMenu()}));var n=document.createElement("a");n.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+this.strings.downloadLeftPage+"</div>",i.appendChild(n),n.addEventListener("click",(function(){t.downloadPage(t.cPage[0],this),t.toggleDownloadMenu()}));var s=document.createElement("a");s.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+this.strings.downloadRightPage+"</div>",i.appendChild(s),s.addEventListener("click",(function(){t.downloadPage(t.cPage[1],this),t.toggleDownloadMenu()}));var a=document.createElement("a");a.innerHTML='<div class="skin-color flipbook-btn">'+this.strings.downloadAllPages+"</div>",i.appendChild(a),a.addEventListener("click",(function(){var e=document.createElement("a");e.href=t.options.pdfUrl||t.options.btnDownloadPages.url;var i=e.href.split("/").pop().split("#")[0].split("?")[0];e.download=i,e.dispatchEvent(new MouseEvent("click")),t.toggleDownloadMenu()})),this.closeMenus(),this.dlMenuShowing=!0,this.updateCurrentPage()}}toggleShareMenu(){var t=this;if(!this.shareMenu.parentNode){this.btnShare.appendChild(this.shareMenu),this.shareMenu.addEventListener("click",(function(t){t.stopPropagation()})),document.addEventListener("click",(function(e){t.toolsMenuShowing&&t.toggleToolsMenu(),t.shareMenuShowing&&t.toggleShareMenu()}));var e=this.options,i=window.screen.width/2-300,o=window.screen.height/2-300;["facebook","twitter","pinterest","linkedin","whatsapp","digg","reddit","email","copyLink"].forEach((function(n){if(e[n].enabled){var s=document.createElement("span");s.className="flipbook-menu-btn-wrapper flipbook-has-tooltip",s.setAttribute("data-network",n),s.setAttribute("data-tooltip",e[n].title||e.strings[n]),s.style.width=`${e.btnSize}px`,s.style.height=`${e.btnSize}px`;let a=t.createSVGIcon(n);s.appendChild(a),t.shareMenu.appendChild(s),s.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var a=this.dataset.network;if("copyLink"==a){const c=window.location.href;function p(t){const i=document.createElement("textarea");i.value=t,i.style.position="fixed",document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy"),s.setAttribute("data-tooltip",e.strings.copied),setTimeout((()=>{s.setAttribute("data-tooltip",e.strings.copyLink)}),2e3)}catch(t){console.error("Fallback: Unable to copy text",t)}document.body.removeChild(i)}navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(c).then((()=>{s.setAttribute("data-tooltip",e.strings.copied),setTimeout((()=>{s.setAttribute("data-tooltip",e.strings.copyLink)}),2e3)})).catch((t=>{console.error("Failed to copy the link: ",t)})):p(c),t.sendGAEvent({event:"flipbook_share",book_name:t.options.name,url:c,nonInteraction:!0})}else{var l,r=encodeURIComponent(e.shareTitle||e[a].description||"Check out this flipbook"),h=encodeURIComponent(e.shareUrl||window.location.href),d=encodeURIComponent(e.shareImage||"");switch(a){case"facebook":l="https://www.facebook.com/sharer.php?u="+h+"&t="+r;break;case"twitter":l="https://twitter.com/intent/tweet?text="+r+"&url="+h;break;case"linkedin":l="https://www.linkedin.com/shareArticle?mini=true&url="+h+"&title="+r;break;case"pinterest":l="https://www.pinterest.com/pin/create/button/?url="+h+"&media="+d+"&description="+r;break;case"email":l="mailto:?subject="+r+"&body="+h;break;case"digg":l="http://digg.com/submit?url="+h+"&title="+r;break;case"reddit":l="http://reddit.com/submit?url="+h+"&title="+r;break;case"whatsapp":l=e.isMobile?"whatsapp://send?text="+r+"%20"+h:"https://wa.me?text="+r+"%20"+h}window.open(l,"Share","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=600, top="+o+", left="+i),t.sendGAEvent({event:"flipbook_share",book_name:t.options.name,url:l,nonInteraction:!0})}}))}}))}this.shareMenuShowing?(this.shareMenu.classList.add("flipbook-hidden"),this.shareMenuShowing=!1,this.btnShare.classList.remove("flipbook-btn-active"),this.btnShare.classList.add("flipbook-has-tooltip")):(this.closeMenus(),this.shareMenu.classList.remove("flipbook-hidden"),this.shareMenuShowing=!0,this.btnShare.classList.add("flipbook-btn-active"),this.btnShare.classList.remove("flipbook-has-tooltip"),setTimeout((function(){t.shareMenu.style.right="0";const e=t.wrapper.getBoundingClientRect(),i=t.shareMenu.getBoundingClientRect();i.left<e.left&&(t.shareMenu.style.right=i.left-e.left-(e.width-i.width)/2+"px")}),0))}toggleNotesMenu(){if(this.notesMenu)this.notesMenuShowing?(this.notesMenu.hide(),this.notesMenuShowing=!1):(this.notesMenu.show(),this.closeMenus(),this.notesMenuShowing=!0);else{this.notesMenu=jQuery(document.createElement("div")).appendTo(this.wrapper).addClass("flipbook-sub-menu flipbook-font");var t=jQuery('<div class="flipbook-sub-menu-center">').appendTo(this.notesMenu),e=jQuery('<div class="flipbook-sub-menu-content skin-color-bg">').appendTo(t);this.createMenuHeader(e,this.options.strings.notes,this.toggleNotesMenu),this.closeMenus(),this.notesMenuShowing=!0;const i=this;this.options.noteTypes.forEach((function(t){const o=document.createElement("div");o.innerHTML="<span>"+t.title+'</span><span aria-hidden="true" class="flipbook-icon-comment flipbook-icon flipbook-menu-btn" style="font-size: 14px; margin: 2px; padding: 12px; opacity: var(--flipbook-link-opacity);color:'+t.color+'"></span>';const n=document.createElement("input");n.type="checkbox",n.dataset.id=t.id,n.checked=t.enabled,n.onchange=function(){t.enabled=this.checked,i.updateNoteSettings(t)},o.appendChild(n),e[0].appendChild(o)}))}}updateNoteSettings(t){this.options.noteTypes.forEach((function(e){e.id==t.id&&(e.enabled=t.enabled)})),this.noteService.updateNoteVisibility()}bookmarkPage(t){var e=this.getBookmarkedPages();e.indexOf(String(t))<0&&e.push(t),this.setBookmarkedPages(e),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()}removeBookmark(t){var e=this.getBookmarkedPages();e.indexOf(String(t))>-1&&e.splice(e.indexOf(String(t)),1),this.setBookmarkedPages(e),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()}isBookmarked(t){return this.getBookmarkedPages().indexOf(String(t))>0}getBookmarkedPages(){var t=localStorage.getItem(this.options.name+"_flipbook_bookmarks");return t?t.split(";"):[]}setBookmarkedPages(t){localStorage.setItem(this.options.name+"_flipbook_bookmarks",t.join(";"))}printPage(t,e){var i,o=this.options.pages[t],n=this.options.pageTextureSize,s=this;if(o)if(o.print)i=o.print;else if(o.images&&o.images[n]){const t=document.createElement("canvas"),e=t.getContext("2d"),s=o.images[n];t.width=s.width,t.height=s.height,e.drawImage(s,0,0,s.width,s.height),i=t.toDataURL(),t.width=t.height=1,e.clearRect(0,0,1,1)}else o.src&&(i=o.src);if(i)this.togglePrintWindow(i);else{const e=this.options.cover?t:t+1;this.loadPage(e,n,(function(){s.printPage(t)}))}}downloadPage(t){var e,i=this.options.pages[t],o=this.options.pageTextureSize;if(i&&i.download)e=i.download;else if(i&&i.src)e=i.src;else if(i&&i.images&&i.images[o]){const t=document.createElement("canvas"),n=t.getContext("2d"),s=i.images[o];t.width=s.width,t.height=s.height,n.drawImage(s,0,0,s.width,s.height),e=t.toDataURL(),t.width=t.height=1,n.clearRect(0,0,1,1)}if(e){var n=document.createElement("a");n.href=e,n.download="page"+String(t+1)+".jpg",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else{var s=this;const e=this.options.cover?t:t+1;this.loadPage(e,this.options.pageTextureSize,(function(){s.downloadPage(t)}))}}printFile(t){var e=document.createElement("iframe");e.classList.add("flipbook-hidden"),e.src=t,document.body.appendChild(e),e.contentWindow.onload=function(){var t=this;setTimeout((function(){t.print()}),100)}}togglePrintWindow(t){var e=this,i="";if(t)i=t;else{if(e.options.printPdfUrl)return void e.printFile(e.options.printPdfUrl);if(e.options.pdfUrl)return void e.printFile(e.options.pdfUrl)}!function(){var o=window.open("about:blank","_new");if(o.document.open(),t)i='<img src="'+t+'"/>\n';else for(var n=0;n<e.options.pages.length;n++)e.options.pages[n].src&&(i+='<img src="'+e.options.pages[n].src.toString()+'"/>\n');var s=function(t){return"<html>\n<head>\n<title>Temporary Printing Window</title>\n<script>\nfunction step1() {\n setTimeout('step2()', 10);\n}\nfunction step2() {\n window.addEventListener('afterprint', function(){\n debugger;\n window.close();\n });\n window.print();\n}\n<\/script>\n<style>img {display:block;max-width:100%;page-break-after: always;}@media print header{display: none;}</style>\n</head>\n<body onLoad='step1()'>\n"+t+"</body>\n</html>\n"}(i);o.document.write(s),o.document.close()}()}thumbsVertical(){this.thumbsCreated}isIOS(){return/iP(ad|hone|od)/.test(navigator.userAgent)}fakeScrollToHideToolbar(){if(!this.isIOS())return;const t=window.scrollX||window.pageXOffset,e=window.scrollY||window.pageYOffset;window.scrollTo(t,e+1),setTimeout((()=>{window.scrollTo(t,e)}),10)}fakeScrollToShowToolbar(){if(!this.isIOS())return;const t=window.scrollX||window.pageXOffset,e=window.scrollY||window.pageYOffset;window.scrollTo(t,e-1),setTimeout((()=>{window.scrollTo(t,e)}),10)}requestFullscreen(t){const e=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];for(const i of e)if(t[i])try{return void t[i]()}catch(t){return void this.handleFullscreenError(t)}this.handleFullscreenError(new Error("Fullscreen API is not supported on this element."))}exitFullscreen(){const t=["exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen"];for(const e of t)if(document[e])try{return void document[e]()}catch(t){return void this.handleFullscreenError(t)}this.handleFullscreenError(new Error("Exiting fullscreen API is not supported in this document."))}toggleExpand(){const t=this.fullscreenElement;try{document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?this.exitFullscreen():this.requestFullscreen(t)}catch(t){this.handleFullscreenError(t)}this.toolsMenuShowing&&this.toggleToolsMenu()}handleFullscreenError(t){const e=this.fullscreenElement;this.fullscreenActive=!this.fullscreenActive,this.fullscreenActive?e!==document.body&&(this.saveScrollPosition(),document.body.classList.add("flipbook-overflow-hidden"),e.classList.add("flipbook-browser-fullscreen"),this.elemParent=e.parentNode,document.body.appendChild(e)):this.elemParent&&(this.elemParent.appendChild(e),this.elemParent=null,document.body.classList.remove("flipbook-overflow-hidden"),e.classList.remove("flipbook-browser-fullscreen"),this.restoreScrollPosition()),this.toggleIcon(this.btnExpand,!this.fullscreenActive)}saveScrollPosition(){document.body.dataset.flipbookScrollX=window.scrollX||window.pageXOffset,document.body.dataset.flipbookScrollY=window.scrollY||window.pageYOffset}restoreScrollPosition(){const t=parseInt(document.body.dataset.flipbookScrollX||0,10),e=parseInt(document.body.dataset.flipbookScrollY||0,10);isNaN(t)||isNaN(e)||(window.scrollTo(t,e),delete document.body.dataset.flipbookScrollX,delete document.body.dataset.flipbookScrollY)}expand(){}toggleSinglePage(){this.options.singlePageMode?this.options.singlePageMode=!1:this.options.singlePageMode=!0,this.Book.updateSinglePage(this.options.singlePageMode),this.toggleIcon(this.btnSingle,this.options.singlePageMode),this.closeMenus()}toggleAutoplay(t){var e=this;this.autoplay=t||!this.autoplay,this.autoplay?this.autoplayTimer=setInterval((function(){if(e.autoplay){var t=e.options.autoplayStartPage||1;e.options.rightToLeft?e.Book.prevEnabled?e.prevPage():e.options.autoplayLoop?e.goToPage(e.options.pages.length-t+1):e.toggleAutoplay(!1):e.Book.nextEnabled?e.nextPage():e.options.autoplayLoop?e.goToPage(t):e.toggleAutoplay(!1)}}),e.options.autoplayInterval):clearInterval(e.autoplayTimer),this.toggleIcon(this.btnAutoplay,!this.autoplay)}},FLIPBOOK.Book=class{constructor(t,e){this.rightIndex=0,this.options=e,this.main=t,this.pageWidth=e.pageWidth,this.pageHeight=e.pageHeight,this.singlePage=e.singlePageMode,this.numSheets=Math.ceil(e.pages.length/2),e.cover||e.pages.length%2!=0||this.numSheets++}goToPage(){}getRightIndex(){}canFlipNext(){return this.flippedright>0&&((!this.singlePage||1!=this.flippedright)&&(!(1!=this.view||!this.isFocusedLeft||!this.isFocusedLeft())||!(1==this.flippedright&&!this.options.rightToLeft&&!this.options.backCover)&&!(1==this.flippedright&&this.options.rightToLeft&&!this.options.cover)))}canFlipPrev(){const t=this.options.cover?0:1;return this.flippedleft>t&&(!(1!=this.view||!this.isFocusedRight||!this.isFocusedRight())||!(1==this.flippedleft&&this.options.rightToLeft&&!this.options.backCover))}getCurrentPageNumber(){var t=this.rightIndex%2==1?this.rightIndex+1:this.rightIndex;return this.options.rightToLeft?(t=this.options.pages.length-t,this.isFocusedRight()?t:t+1):this.isFocusedLeft()?t:t+1}startPageItems(t){t&&!t.dataset.pageItemsStarted&&t.querySelectorAll(".flipbook-page-item").forEach((function(e){if("VIDEO"==e.nodeName||"AUDIO"==e.nodeName){const t=e.getAttribute("data-url");e.querySelector("source").setAttribute("src",t),e.load(),e.style.visibility="hidden",(e.autoplay||e.controls)&&(e.readyState<4?e.oncanplay=function(){this.currentTime==this.duration&&this.load(),this.autoplay&&this.play(),this.style.visibility="visible"}:(e.currentTime==e.duration&&e.load(),e.autoplay&&e.play(),e.style.visibility="visible"))}t.dataset.pageItemsStarted=!0}))}loadPageAsync(t,e){return t?(t._sidePromises||(t._sidePromises={}),t._sidePromises[e]||(t._sidePromises[e]=new Promise(((i,o)=>{e?t.load(e,(()=>{i()})):i()}))),t._sidePromises[e]):Promise.resolve()}loadHTMLAsync(t,e){return t?(t._sideHTMLPromises||(t._sideHTMLPromises={}),t._sideHTMLPromises[e]||(t._sideHTMLPromises[e]=new Promise((i=>{e?t.loadHTML(e,(()=>{i()})):i()}))),t._sideHTMLPromises[e]):Promise.resolve()}destroy(){}},FLIPBOOK.Notes=class{constructor(t){const e=this;this.main=t,this.notes=Object.values(t.options.notes||[]),this.textSelectionRect=document.createElement("span"),this.textSelectionRect.className="flipbook-add-note-rect hover";const i=document.createElement("span");i.className="add-note-btn",i.innerText=t.options.strings.addNote,i.onclick=function(){e.hideButton(),e.createNote()},i.onmousedown=function(){},this.noteButton=i,this.textSelectionRect.appendChild(i),this.hideButton(),this.notePopup=document.createElement("div"),this.notePopup.className="flipbook-note-display",this.notePopup.innerHTML='<div class="note-content"><textarea role="textbox" maxlength="500" placeholder="'+t.options.strings.typeInYourNote+'" tabindex="0" class="note-article"></textarea></div> <div aria-hidden="true" class="note-footer"> <span title="Delete Note" class="icon icon-trash-can note-button note-delete-button"><svg version="1.1" viewBox="0 0 24 24" class="svg-icon svg-fill" focusable="false"><path pid="0" d="M15.976 17.862c0 .607-.414 1.138-.885 1.138H8.893c-.47 0-.869-.513-.869-1.12L8.002 8H16l-.023 9.862zM20 6h-5V4.466C15 3.66 14.853 3 14.013 3h-3.858C9.315 3 9 3.659 9 4.466V6H4v2h2v10c0 1.843 1.153 3 2.893 3h6.198C16.84 21 18 19.852 18 18V8h2V6z"></path><path pid="1" d="M13 18h1V9h-1zM10 18h1V9h-1z"></path></svg></span></div>',this.notePopup.onmouseup=function(t){t.stopPropagation()},this.noteDelete=this.notePopup.getElementsByClassName("note-delete-button")[0],this.noteDelete.onclick=function(){e.deleteNote()},this.noteInput=this.notePopup.querySelectorAll("textarea")[0],this.noteInput.onchange=function(){const t=this.dataset.note,i=this.value;e.getNoteById(t).text=i,e.main.trigger("r3d-update-note",{note:e.getNoteById(t)})},this.updateNoteVisibility()}initPageNotes(t){const e=this;this.notes.forEach((function(i){i.page==t.index+1&&e.addPageNote(i,t)})),this.addPageNoteListeners(t)}getNodeColor(t){let e="green";return this.main.options.noteTypes.forEach((function(i){i.id==t.type&&(e=i.color)})),e}updateNoteVisibility(){let t=document.documentElement;this.main.options.noteTypes.forEach((function(e){t.style.setProperty(`--note-${e.id}-opacity`,e.enabled?"1":"0"),t.style.setProperty(`--note-${e.id}-pointer-events`,e.enabled?"auto":"none")}))}addPageNote(t){const e=t.page,i=this.main.options.pages[e-1],o=this.getNodeColor(t)||"yellow";if(t.selectedText&&i.htmlContentInitialized){t.id||(t.id=Date.now()+Math.floor(1e3*Math.random()));const n=jQuery(i.htmlContent).find(".textLayer"),s=`flipbook-page-note \n\t\t\t\t\t\t\t\t\t\t\t note-id-${t.id} \n\t\t\t\t\t\t\t\t\t\t\t note-page-${e} \n\t\t\t\t\t\t\t\t\t\t\t note-type-${t.type} \n\t\t\t\t\t\t\t\t\t\t\t mark-${o} \n\t\t\t\t\t\t\t\t\t\t\t flipbook-note-${t.id}`;n.mark(t.selectedText,{acrossElements:!0,separateWordSearch:!1,className:"mark-note "+s});const a=this;n.find(`.note-id-${t.id}`).each((function(e,o){o.dataset.note=t.id,o.onclick=function(){a.showNote(this,i,this.dataset.note),a.hideButton()},o.style.opacity="var(--note-"+t.type+"-opacity)",o.style.pointerEvents="var(--note-"+t.type+"-pointer-events)"}))}}showButton(){this.noteButton.classList.remove("flipbook-hidden")}hideButton(){this.noteButton.classList.add("flipbook-hidden")}showNote(t,e,i){const o=e.htmlContent.getBoundingClientRect(),n=t.getBoundingClientRect(),s=this.getNoteById(i);jQuery(e.htmlContent)[0].appendChild(this.notePopup);const a=this.main,l=a.Book.sc*a.wrapperH/1e3,r=(n.y/a.zoom-o.y/a.zoom)/l;this.notePopup.style.top=r<150?r+40+"px":r-140+"px",this.notePopup.style.left=(n.x/a.zoom+.5*n.width/a.zoom-o.x/a.zoom)/l+"px",this.noteInput.value=s.text||"",this.noteInput.dataset.note=s.id,this.activeNote=s,s.readonly?this.disableNoteEdit():this.enableNoteEdit()}enableNoteEdit(){this.noteDelete.classList.remove("flipbook-hidden"),this.noteInput.readOnly=!1}disableNoteEdit(){this.noteDelete.classList.add("flipbook-hidden"),this.noteInput.readOnly=!0}hideNote(){this.notePopup.parentNode&&this.notePopup.parentNode.removeChild(this.notePopup),this.activeNote=null}createNote(){this.textSelectionRect.appendChild(this.notePopup),this.notePopup.style.left="50%",this.textSelectionRect.offsetTop<150?this.notePopup.style.top="40px":this.notePopup.style.top="-140px",this.noteInput.value="",this.noteInput.focus();const t={selectedText:this.selectedTextString,page:this.selectedTextPageNumber,type:1};this.notes.push(t),this.addPageNote(t),this.noteInput.dataset.note=t.id,this.addPageNoteListeners(this.main.options.pages[t.page-1]),this.activeNote=t,this.enableNoteEdit(),this.main.trigger("r3d-update-note",{note:t})}deleteNote(){const t=this.main.options.pages[this.activeNote.page-1];jQuery(t.htmlContent).find(".textLayer").unmark({className:`flipbook-note-${this.activeNote.id}`});const e=this.notes.indexOf(this.activeNote);e>-1&&this.notes.splice(e,1),this.hideNote(),this.main.trigger("r3d-delete-note",{note:this.activeNote})}getNoteById(t){let e=null;return this.notes.forEach((function(i){Number(i.id)==Number(t)&&(e=i)})),e}removeTextRect(){this.textSelectionRect.parentNode&&this.textSelectionRect.parentNode.removeChild(this.textSelectionRect)}addPageNoteListeners(t){const e=this;t.textLayerDiv&&!t.notesInitialized&&(t.textLayerDiv.addEventListener("mouseup",(function(t){if(!t.target.classList.contains("add-note-btn"))if(e.hideNote(),e.showButton(),e.selectedText=window.getSelection(),e.selectedText.toString()){e.selectedTextString=e.selectedText.toString(),e.selectedTextPageNumber=Number(this.dataset.pageNumber),e.selectedTextRange=e.selectedText.getRangeAt(0);const t=e.selectedTextRange.getBoundingClientRect(),i=this.getBoundingClientRect(),o=e.main;let n=o.Book.sc*o.wrapperH/1e3;e.textSelectionRect.style.top=(t.y/o.zoom-i.y/o.zoom)/n+"px",e.textSelectionRect.style.left=(t.x/o.zoom-i.x/o.zoom)/n+"px",e.textSelectionRect.style.width=t.width/o.zoom/n+"px",e.textSelectionRect.style.height=t.height/o.zoom/n+"px",this.appendChild(e.textSelectionRect)}else e.removeTextRect()})),t.textLayerDiv.addEventListener("mousemove",(function(t){if(e.selectedTextRange&&e.selectedText.toString()){const i=e.textSelectionRect.getBoundingClientRect(),o=e.textSelectionRect.firstChild.getBoundingClientRect();t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=o.top&&t.clientY<=i.bottom?e.showButton():e.hideButton()}})),t.notesInitialized=!0)}},FLIPBOOK.Tooltip=class{constructor(){this.domElement=document.createElement("div"),this.domElement.className="flipbook-tooltip flipbook-noselect",this.domElement.classList.add("flipbook-hidden");const t=this;this.currentPosition={x:0,y:0},document.addEventListener("scroll",(function(){t.position()}))}show(t){this.showing||(this.domElement.classList.remove("flipbook-hidden"),this.showing=!0,t.text&&(this.domElement.innerText=t.text),t.parent&&t.parent.appendChild(this.domElement),t.onClick?(this.domElement.style.cursor="pointer",this.domElement.onclick=t.onClick):(this.domElement.style.cursor="auto",this.domElement.removeAttribute("onclick")),this.currentPosition=t.position,this.position())}hide(){this.showing&&(this.domElement.classList.add("flipbook-hidden"),this.showing=!1)}position(){const t=this.domElement.parentNode.getBoundingClientRect();this.domElement.style.top=this.currentPosition.y-t.top-scrollY+"px",this.domElement.style.left=this.currentPosition.x-t.left-scrollX+"px"}},FLIPBOOK.ProgressBar=class{constructor(t={}){this.value=t.value||0,this.min=t.min||0,this.max=t.max||100,this.onChange=t.onChange||function(t){},this.colors=t.colors||{},this.wrapper=t.wrapper||document.body,this.el=null,this._dragging=!1,this._render(),this.setValue(this.value),this._bindEvents()}_render(){const t=document.createElement("div");t.className="flipbook-progress-bar",t.tabIndex=0,this.colors.bg&&t.style.setProperty("--progress-bg",this.colors.bg),this.colors.fill&&t.style.setProperty("--progress-fill",this.colors.fill),this.colors.thumb&&t.style.setProperty("--progress-thumb",this.colors.thumb),this.colors.thumbBorder&&t.style.setProperty("--progress-thumb-border",this.colors.thumbBorder),t.innerHTML=`\n <div class="progress-track"></div>\n <div class="progress-filled"></div>\n <div class="progress-thumb" tabindex="0" role="slider" aria-valuenow="0" aria-valuemin="${this.min}" aria-valuemax="${this.max}"></div>\n `,this.wrapper.appendChild(t),this.el=t,this.track=t.querySelector(".progress-track"),this.filled=t.querySelector(".progress-filled"),this.thumb=t.querySelector(".progress-thumb")}_bindEvents(){this.thumb.addEventListener("mousedown",this._startDrag.bind(this)),this.el.addEventListener("mousedown",this._startDrag.bind(this)),window.addEventListener("mousemove",this._onDrag.bind(this)),window.addEventListener("mouseup",this._endDrag.bind(this)),this.thumb.addEventListener("touchstart",this._startDrag.bind(this),{passive:!1}),this.el.addEventListener("touchstart",this._startDrag.bind(this),{passive:!1}),window.addEventListener("touchmove",this._onDrag.bind(this),{passive:!1}),window.addEventListener("touchend",this._endDrag.bind(this)),this.thumb.addEventListener("keydown",(t=>{let e=(this.max-this.min)/100||1;"ArrowRight"!==t.key&&"ArrowUp"!==t.key||(this.setValue(this.value+e),t.preventDefault()),"ArrowLeft"!==t.key&&"ArrowDown"!==t.key||(this.setValue(this.value-e),t.preventDefault())}))}_startDrag(t){"mousedown"===t.type&&0!==t.button||(this._dragging=!0,document.body.style.userSelect="none",this._onDrag(t))}_onDrag(t){if(!this._dragging)return;let e;e=t.touches?t.touches[0].clientX:t.clientX;const i=this.el.getBoundingClientRect();let o=(e-i.left)/i.width*100,n=this.min+(this.max-this.min)*(o/100);this.setValue(n)}_endDrag(){this._dragging&&(this._dragging=!1,document.body.style.userSelect="")}setValue(t){t=Math.max(this.min,Math.min(this.max,t)),this.value=t;let e=(t-this.min)/(this.max-this.min)*100;this.filled.style.width=e+"%",this.thumb.style.left=e+"%",this.thumb.setAttribute("aria-valuenow",Math.round(t)),this.onChange(t)}getValue(){return this.value}},FLIPBOOK.Thumbnails=class{constructor(t){var e=this,i=t.options,o=t.wrapper;this.main=t,this.options=i,this.wrapper=o,this.active=null,this.thumbHolder=document.createElement("div"),this.thumbHolder.className="flipbook-thumbHolder flipbook-side-menu skin-color-bg flipbook-border",o.appendChild(this.thumbHolder),this.thumbHolder.style[i.sideMenuPosition]="0",this.thumbHolder.classList.add("flipbook-hidden"),t.createMenuHeader(this.thumbHolder,t.strings.thumbnails,t.toggleThumbs),this.bookmark=document.createElement("div"),this.bookmark.className="flipbook-font",this.thumbHolder.appendChild(this.bookmark),this.bookmark.classList.add("flipbook-hidden");var n=document.createElement("a");n.innerHTML='<div class="c-p skin-color flipbook-btn">'+i.strings.bookmarkCurrentPage+"</div>",this.bookmark.appendChild(n),n.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[0],this),e.preventDefault(),e.stopPropagation()}));var s=document.createElement("a");s.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+i.strings.bookmarkLeftPage+"</div>",this.bookmark.appendChild(s),s.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[0],this),e.preventDefault(),e.stopPropagation()}));var a=document.createElement("a");a.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+i.strings.bookmarkRightPage+"</div>",this.bookmark.appendChild(a),a.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[1],this),e.preventDefault(),e.stopPropagation()})),this.search=document.createElement("div"),this.search.className="flipbook-search",this.thumbHolder.appendChild(this.search),this.search.classList.add("flipbook-hidden"),this.searchBar=document.createElement("div"),this.searchBar.className="flipbook-findbar",this.search.appendChild(this.searchBar),this.findInputCotainer=document.createElement("div"),this.findInputCotainer.id="findbarInputContainer",this.searchBar.appendChild(this.findInputCotainer),this.findInput=document.createElement("input"),this.findInput.className="toolbarField skin-color skin-color-bg",this.findInput.title="Find",this.findInput.autocapitalize="none",this.findInput.placeholder=`${i.strings.findInDocument}...`,this.findInputCotainer.appendChild(this.findInput),this.clearInput=document.createElement("span"),this.clearInput.className="flipbook-search-clear flipbook-hidden skin-color skin-color-bg";var l=t.createSVGIcon("close");this.clearInput.appendChild(l),this.clearInput.addEventListener("click",(function(){e.findInput.value="",e.hideAllThumbs(),e.clearSearchResults(),t.unmark(),t.searchingString="",e.clearInput.classList.add("flipbook-hidden"),e.findInput.focus()})),this.findInputCotainer.appendChild(this.clearInput),this.thumbsWrapper=document.createElement("div"),this.thumbsWrapper.className="flipbook-thumbsWrapper",this.thumbHolder.appendChild(this.thumbsWrapper),this.closeGrid=document.createElement("div"),this.closeGrid.className="flipbook-thumbs-grid-close skin-color flipbook-menu-btn",this.thumbsWrapper.appendChild(this.closeGrid),this.closeGrid.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),e.main.closeMenus()}));l=this.main.createSVGIcon("close");this.closeGrid.appendChild(l),this.thumbsScroller=document.createElement("div"),this.thumbsScroller.className="flipbook-thumbsScroller skin-color",this.thumbsWrapper.appendChild(this.thumbsScroller);var r=0;this.findInput.addEventListener("keyup",(function(){var t=this.value;t?e.clearInput.classList.remove("flipbook-hidden"):e.clearInput.classList.add("flipbook-hidden"),clearTimeout(r),r=setTimeout((function(){var i=e.main,o=i.pdfService;if(""!==t){var n=i.options;if(e.hideAllThumbs(),e.clearSearchResults(),e.pagesFound=0,i.unmark(),i.searchingString=t,o)for(var s=0;s<o.info.numPages;s++)o.findInPage(t,s,(function(o,s,a,l){o.length>0&&(e.pagesFound++,o.length,i.mark(t),n.searchResultsThumbs?e.showThumb(a):e.showSearchResults(o,a,l))}));else n.pagesOriginal.forEach(((o,s)=>{n.cover||s++;var a=s;n.doublePage&&(a*=2),n.doublePage&&a===2*n.pagesOriginal.length-2&&a--,i.loadPageHTML(a,(function(o,s){o.innerText.toUpperCase().search(i.searchingString.toUpperCase())>-1&&(n.doublePage&&(s/=2),e.showThumb(s),e.pagesFound++,i.mark(t))}))}))}else e.hideAllThumbs(),e.clearSearchResults(),i.unmark(),i.searchingString=t,e.clearInput.classList.add("flipbook-hidden")}),700)})),this.thumbs=[];var h=i.pages,d=[];if(i.doublePage)for(var c=0;c<h.length;c++)0!==c&&c%2==0||d.push(h[c]);else d=h;i.pdfMode&&this.loadThumbsFromPdf(d);var p=i.thumbSize,g=i.thumbSize*i.pageWidth/i.pageHeight;d.forEach(((o,n)=>{if(!o.empty){var s=document.createElement("div");s.className="flipbook-thumb",s.setAttribute("data-thumb-index",n),s.style.width=g+"px",s.style.height=p+"px",e.thumbsScroller.appendChild(s);var a=document.createElement("span");a.className="thumb-btn-close skin-color skin-color-bg",s.appendChild(a),a.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault(),t.removeBookmark(s.getAttribute("data-thumb-index"))}));var l,r=t.createSVGIcon("close");if(a.appendChild(r),this.thumbs.push(s),o.thumbCanvas)l=o.thumbCanvas;else{if(!o.thumb)return;(l=document.createElement("img")).src=o.thumb}s.appendChild(l),l.style.height=p+"px";var h=i.doublePage&&i.pages.length%2==0&&n===d.length-1,c=i.doublePage&&0===n,u=i.doublePage&&!c&&!h;if(h)l.setAttribute("page-title",2*n),(m=document.createElement("span")).textContent=String(2*n),m.className="skin-color flipbook-thumb-num",s.appendChild(m);else if(u){s.style.width=2*g+"px",l.setAttribute("page-title",2*n+1),(m=document.createElement("span")).textContent=String(2*n)+"-"+String(2*n+1),m.className="skin-color flipbook-thumb-num",s.appendChild(m)}else{l.setAttribute("page-title",n+1);var m,b=String(n+1);this.options.pages[n]&&this.options.pages[n].name&&(b=this.options.pages[n].name),(m=document.createElement("span")).textContent=b,m.className="skin-color flipbook-thumb-num",s.appendChild(m)}"overlay"===i.thumbsStyle&&(i.thumbsCloseOnClick=!0),l.addEventListener("click",(function(o){o.stopPropagation(),o.preventDefault();var n=Number(l.getAttribute("page-title"));i.rightToLeft&&(n=i.pages.length-n+1),t.goToPage(n),"search"!==e.active&&i.thumbsCloseOnClick&&t.toggleThumbs(!1)}))}}))}loadThumbsFromPdf(t){for(var e=this.main.pdfService.info.numPages,i=0;i<e;i++){var o=document.createElement("canvas");t[i]&&(t[i].thumbCanvas=o)}this.loadThumbFromPdf(0,t)}loadVisibleThumbs(){}loadThumbFromPdf(t,e){var i=this;this.main.pdfService.pdfDocument.getPage(t+1).then((function(t){var o=t.getViewport({scale:1}),n=i.options.thumbSize/o.height,s=t.getViewport({scale:n}),a=e[t._pageIndex].thumbCanvas,l=a.getContext("2d");a.height=s.height,a.width=s.width;var r={canvasContext:l,viewport:s};t.cleanupAfterRender=!0,t.render(r).promise.then((function(){t.cleanup(),t._pageIndex+1<i.main.pdfService.info.numPages&&i.loadThumbFromPdf(t._pageIndex+1,e)}))}))}showAllThumbs(){document.querySelectorAll(".flipbook-thumb").forEach((t=>t.classList.remove("flipbook-hidden"))),this.clearSearchResults()}hideAllThumbs(){document.querySelectorAll(".flipbook-thumb").forEach((t=>t.classList.add("flipbook-hidden")))}clearSearchResults(){document.querySelectorAll(".flipbook-search-match").forEach((t=>t.remove()))}showSearchResults(t,e,i){var o=this,n=this.main.options,s=t.length,a=Number(e+1),l=document.createElement("div");l.className="flipbook-search-match",l.setAttribute("data-page",a),l.style.order=e,l.innerHTML=`\n <div class="flipbook-search-match-title">\n <span style="float:left;"><strong>${n.strings.page} ${a}</strong></span>\n <span style="float:right;">${s} ${n.strings.matches}</span>\n </div>\n <div class="flipbook-search-match-text">${i}</div>\n `,o.thumbsScroller.appendChild(l),l.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault();var e=Number(this.dataset.page);e=n.rightToLeft&&n.pages&&n.pages.length?n.pages.length-e+1:e,o.main.goToPage(e)}))}showThumb(t){this.thumbs[t]&&this.thumbs[t].classList.remove("flipbook-hidden")}hideThumb(t){this.thumbs[t].classList.add("flipbook-hidden")}showBookmarks(){document.querySelectorAll(".thumb-btn-close").forEach((t=>t.classList.remove("flipbook-hidden"))),this.showBookmarkedThumbs(),this.clearSearchResults(),this.bookmark.classList.remove("flipbook-hidden"),this.setTitle(this.options.strings.bookmarks),this.main.updateCurrentPage(),this.active="bookmarks",this.thumbHolder.classList.remove("flipbook-thumbs-grid")}showSearch(){this.clearSearchResults(),this.hideAllThumbs(),this.search.classList.remove("flipbook-hidden"),document.querySelectorAll(".thumb-btn-close").forEach((t=>t.classList.add("flipbook-hidden"))),this.setTitle(this.options.strings.search),this.findInput.value="",this.clearInput.classList.add("flipbook-hidden"),this.findInput.focus(),this.active="search",this.thumbHolder.classList.remove("flipbook-thumbs-grid")}showBookmarkedThumbs(){var t=this.main.getBookmarkedPages();this.hideAllThumbs();for(var e=0;e<t.length;e++){var i=t[e];i&&this.showThumb(i)}}show(){this.setTitle(this.options.strings.thumbnails),this.bookmark.classList.add("flipbook-hidden"),this.search.classList.add("flipbook-hidden"),this.thumbHolder.classList.remove("flipbook-hidden"),this.main.thumbsVertical(),this.showAllThumbs(),document.querySelectorAll(".thumb-btn-close").forEach((t=>t.classList.add("flipbook-hidden"))),this.loadVisibleThumbs(),this.main.resize(),this.active="thumbs","overlay"===this.main.options.thumbsStyle&&this.thumbHolder.classList.add("flipbook-thumbs-grid")}hide(){this.thumbHolder.classList.add("flipbook-hidden"),this.main.resize(),this.active=null}setTitle(t){this.thumbHolder.querySelector(".flipbook-menu-title").textContent=t}},FLIPBOOK.Lightbox=class{constructor(t,e,i){var o=this;this.context=t,this.options=i,this.$document=document,this.$body=document.body,this.$html=document.documentElement,this.$window=window,o.overlay=document.createElement("div"),o.overlay.className="flipbook-overlay",o.overlay.classList.add("flipbook-hidden"),o.overlay.style.top=o.options.lightboxMarginV,o.overlay.style.bottom=o.options.lightboxMarginV,o.overlay.style.left=o.options.lightboxMarginH,o.overlay.style.right=o.options.lightboxMarginH,Object.assign(o.overlay.style,i.lightboxCSS),document.body.appendChild(o.overlay),i.lightboxBackground&&(o.overlay.style.background=i.lightboxBackground),i.lightboxBackgroundColor&&(o.overlay.style.background=i.lightboxBackgroundColor),i.lightboxBackgroundPattern&&(o.overlay.style.background="url("+i.lightboxBackgroundPattern+") repeat"),i.lightboxBackgroundImage&&(o.overlay.style.background="url("+i.lightboxBackgroundImage+") no-repeat",o.overlay.style.backgroundSize="cover",o.overlay.style.backgroundPosition="center center"),document.addEventListener("keydown",(function(t){"Escape"===t.key&&o.closeLightbox()})),o.wrapper=document.createElement("div"),o.wrapper.style.height="auto",o.wrapper.className="flipbook-wrapper-transparent",o.wrapper.style.margin="0px auto",o.wrapper.style.padding="0px",o.wrapper.style.height="100%",o.wrapper.style.width="100%",o.overlay.appendChild(o.wrapper),o.wrapper.appendChild(e);var n=document.createElement("div");n.className="flipbook-lightbox-toolbar",o.wrapper.appendChild(n)}openLightbox(){if(FLIPBOOK.lightboxOpened)return;FLIPBOOK.lightboxOpened=!0,this.showOverlay();const t=new Event("r3d-lightboxopen");window.dispatchEvent(t),this.options.deeplinkingEnabled||(window.history.pushState(null,"",window.location.href),this.context.historyStateChange()),this.context.options.password&&!this.context.pdfinitStarted&&this.context.initialized&&this.context.initPdf()}showOverlay(){if(!this.overlay||!this.$html)return;const t=this.overlay;t.classList.remove("flipbook-hidden"),t.classList.add("flipbook-overlay-visible"),this.context.saveScrollPosition(),document.body.classList.add("flipbook-overflow-hidden"),this.$html.classList.add("flipbook-overflow-hidden")}hideOverlay(){if(!this.overlay||!this.$html)return;const t=this.overlay;t.classList.remove("flipbook-overlay-visible"),t.addEventListener("transitionend",(()=>{t.classList.add("flipbook-hidden")}),{once:!0}),document.body.classList.remove("flipbook-overflow-hidden"),this.$html.classList.remove("flipbook-overflow-hidden"),this.context.restoreScrollPosition()}closeLightbox(t){if(!FLIPBOOK.lightboxOpened)return;FLIPBOOK.lightboxOpened=!1,this.hideOverlay();const e=new Event("r3d-lightboxclose");window.dispatchEvent(e),this.context.trigger("lightboxclose"),this.context.fullscreenElement.classList.remove("flipbook-browser-fullscreen"),this.context.lightboxEnd(),t||this.options.deeplinkingEnabled||history.back()}disposeLightbox(){FLIPBOOK.lightboxOpened=!1,this.hideOverlay();const t=new Event("r3d-lightboxclose");window.dispatchEvent(t),this.context.trigger("lightboxclose"),this.context.fullscreenElement.classList.remove("flipbook-browser-fullscreen"),this.context.lightboxEnd(),this.context.disposed=!0}},FLIPBOOK.onPageLinkClick=function(t){var e=t.dataset.bookid,i=t.dataset.page;i&&FLIPBOOK.books[e].goToPage(Number(i));var o=t.dataset.url;o&&window.open(o,"_blank")},FLIPBOOK.easings={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},easeInSine:function(t){return 1-Math.cos(t*Math.PI/2)},easeOutSine:function(t){return Math.sin(t*Math.PI/2)},easeInOutSine:function(t){return.5*(1-Math.cos(Math.PI*t))}},FLIPBOOK.animate=function(t){let e=performance.now(),i=t.from,o=t.to,n=t.duration,s=o-i,a=FLIPBOOK.easings[t.easing]||FLIPBOOK.easings.linear,l=null,r=null,h=t.repeat||1,d=t.yoyo||!1,c=0,p=!1,g=t.delay||0;function u(){let m=performance.now(),b=null!==r?r-e:m-e;if(b<g)return void(l=requestAnimationFrame(u));b-=g;let f,v=Math.min(b/n,1);f=p?i+s*a(1-v):i+s*a(v),t.step&&t.step(f),v<1?l=requestAnimationFrame(u):(c++,c<h?(d&&(p=!p),e=performance.now(),l=requestAnimationFrame(u)):(t.step&&t.step(o),t.complete&&t.complete()))}return g>0?setTimeout((()=>{e=performance.now(),l=requestAnimationFrame(u)}),g):l=requestAnimationFrame(u),{pause:function(){l&&(cancelAnimationFrame(l),r=performance.now())},resume:function(){r&&(e+=performance.now()-r,r=null,l=requestAnimationFrame(u))},stop:function(){l&&cancelAnimationFrame(l)}}},FLIPBOOK.Linkify=function(t,e="_blank"){const i=/\b(?:https?:\/\/|ftp:\/\/|www\.|[A-Za-z0-9.-]+\.[A-Za-z]{2,6})(?:\/[^\s<>"']*)?/gi,o=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b/gi,n=new Set(["a","script","style","textarea","code"]),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(t){const e=t.parentNode.tagName?.toLowerCase();return n.has(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;s.nextNode();)a.push(s.currentNode);a.forEach((t=>{const n=document.createDocumentFragment(),s=t.nodeValue;let a=0;const l=new RegExp(`${i.source}|${o.source}`,"ig");let r;for(;r=l.exec(s);){r.index>a&&n.appendChild(document.createTextNode(s.slice(a,r.index)));const t=r[0];let i;i=o.test(t)?`mailto:${t}`:/^(?:https?:\/\/|ftp:\/\/)/i.test(t)?t:(t.startsWith("www."),`http://${t}`);const h=document.createElement("a");h.href=i,h.target=e,h.className="flipbook-page-auto-link",h.textContent=t,n.appendChild(h),a=l.lastIndex}a<s.length&&n.appendChild(document.createTextNode(s.slice(a))),t.parentNode.replaceChild(n,t)}))},FLIPBOOK.extend=function(){function t(t){return"[object Object]"===Object.prototype.toString.call(t)}var e,i,o,n,s,a,l=arguments[0]||{},r=1,h=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},r=2),"object"!=typeof l&&"function"!=typeof l&&(l={}),h===r&&(l=this,--r);r<h;r++)if(null!=(e=arguments[r]))for(i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(o=l[i],l===(n=e[i]))continue;d&&n&&(t(n)||(s=Array.isArray(n)))?(s?(s=!1,a=o&&Array.isArray(o)?o:[]):a=o&&t(o)?o:{},l[i]=FLIPBOOK.extend(d,a,n)):void 0!==n&&(l[i]=n)}return l},FLIPBOOK.Tooltip2=class{constructor(t){this.wrapper=t,this.tooltipEl=null,this.init()}init(){this.tooltipEl=document.createElement("span"),this.tooltipEl.className="flipbook-tooltip-element skin-color skin-color-bg",this.tooltipEl.setAttribute("role","tooltip"),this.tooltipEl.id="flipbook-tooltip",this.wrapper.appendChild(this.tooltipEl),this.wrapper.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.wrapper.addEventListener("mouseout",this.handleMouseOut.bind(this)),this.wrapper.addEventListener("focusin",this.handleFocusIn.bind(this)),this.wrapper.addEventListener("focusout",this.handleMouseOut.bind(this)),this.wrapper.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0})}handleMouseOver(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&this.showTooltip(e)}handleFocusIn(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&(e.setAttribute("aria-describedby","flipbook-tooltip"),this.showTooltip(e))}handleTouchStart(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&(this.showTooltip(e),setTimeout((()=>{this.hideTooltip()}),2e3))}handleMouseOut(){this.hideTooltip()}showTooltip(t){this.tooltipEl.innerText=t.dataset.tooltip,this.tooltipEl.style.opacity=0,this.tooltipEl.style.display="block";const e=t.getBoundingClientRect(),i=this.tooltipEl.getBoundingClientRect(),o=this.wrapper.getBoundingClientRect();let n=e.top-o.top-i.height-10,s=e.left-o.left+(e.width-i.width)/2,a=!1,l=e.left-o.left+e.width/2-s;l=Math.max(6,Math.min(i.width-6,l)),n<0&&(n=e.bottom-o.top+10,a=!0),n+i.height>o.height&&(n=o.height-i.height-5),s<0&&(s=5,l=e.left-o.left+e.width/2-s,l=Math.max(6,Math.min(i.width-6,l))),s+i.width>o.width&&(s=o.width-i.width-5,l=e.left-o.left+e.width/2-s,l=Math.max(6,Math.min(i.width-6,l))),n+=this.wrapper.scrollTop,s+=this.wrapper.scrollLeft,this.tooltipEl.style.top=`${n}px`,this.tooltipEl.style.left=`${s}px`,this.tooltipEl.style.setProperty("--arrow-left",`${l}px`),this.tooltipEl.style.opacity=1,this.tooltipEl.classList.toggle("below",a)}hideTooltip(){this.tooltipEl.style.opacity=0,this.tooltipEl.style.display="none",this.tooltipEl.removeAttribute("aria-describedby")}};