⚝
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.pdfservice.min.js
"use strict";var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.EventBus=FLIPBOOK.EventBus||class{#e=Object.create(null);on(e,t,i=null){this._on(e,t,{external:!0,once:i?.once})}off(e,t,i=null){this._off(e,t,{external:!0,once:i?.once})}dispatch(e,t){const i=this.#e[e];if(!i||0===i.length)return;let n;for(const{listener:a,external:s,once:r}of i.slice(0))r&&this._off(e,a),s?(n||=[]).push(a):a(t);if(n){for(const e of n)e(t);n=null}}_on(e,t,i=null){(this.#e[e]||=[]).push({listener:t,external:!0===i?.external,once:!0===i?.once})}_off(e,t,i=null){const n=this.#e[e];if(n)for(let e=0,i=n.length;e<i;e++)if(n[e].listener===t)return void n.splice(e,1)}},FLIPBOOK.LinkTarget||={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},FLIPBOOK.addLinkAttributes||=function(e,{url:t,target:i,rel:n,enabled:a=!0}={}){if(!t||"string"!=typeof t)throw new Error('A valid "url" parameter must provided.');a?e.href=e.title=t:(e.href="",e.title=`Disabled: ${t}`,e.onclick=()=>!1);let s="";switch(i){case FLIPBOOK.LinkTarget.NONE:break;case FLIPBOOK.LinkTarget.SELF:s="_self";break;case FLIPBOOK.LinkTarget.BLANK:s="_blank";break;case FLIPBOOK.LinkTarget.PARENT:s="_parent";break;case FLIPBOOK.LinkTarget.TOP:s="_top"}e.target=s,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"},FLIPBOOK.PDFLinkService||=class{#t=new Map;constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:i=null,ignoreDestinationZoom:n=!1}={}){this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=i,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=n,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(e,t=null){this.baseUrl=t,this.pdfDocument=e,this.#t.clear()}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}get isInPresentationMode(){return this.pdfViewer.isInPresentationMode}#i(e,t=null,i){const n=i[0];let a;if("object"==typeof n&&null!==n){if(a=this._cachedPageNumber(n),!a)return void this.pdfDocument.getPageIndex(n).then((a=>{this.cachePageRef(a+1,n),this.#i(e,t,i)})).catch((()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid page reference, for dest="${e}".`)}))}else{if(!Number.isInteger(n))return void console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid destination reference, for dest="${e}".`);a=n+1}!a||a<1||a>this.pagesCount?console.error(`PDFLinkService.#goToDestinationHelper: "${a}" is not a valid page number, for dest="${e}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:t,explicitDest:i,pageNumber:a})),this.pdfViewer.scrollPageIntoView({pageNumber:a,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom}))}async goToDestination(e){if(!this.pdfDocument)return;let t,i;"string"==typeof e?(t=e,i=await this.pdfDocument.getDestination(e)):(t=null,i=await e),Array.isArray(i)?this.#i(e,t,i):console.error(`PDFLinkService.goToDestination: "${i}" is not a valid destination array, for dest="${e}".`)}goToPage(e){if(!this.pdfDocument)return;const t="string"==typeof e&&this.pdfViewer.pageLabelToPageNumber(e)||0|e;Number.isInteger(t)&&t>0&&t<=this.pagesCount?(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(t)),this.pdfViewer.scrollPageIntoView({pageNumber:t})):console.error(`PDFLinkService.goToPage: "${e}" is not a valid page.`)}addLinkAttributes(e,t,i=!1){FLIPBOOK.addLinkAttributes(e,{url:t,target:i?FLIPBOOK.LinkTarget.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(e){if("string"==typeof e){if(e.length>0)return this.getAnchorUrl("#"+escape(e))}else if(Array.isArray(e)){const t=JSON.stringify(e);if(t.length>0)return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return this.baseUrl?this.baseUrl+e:e}setHash(e){if(!this.pdfDocument)return;let t,i;if(e.includes("=")){const n=(0,_ui_utils.parseQueryString)(e);if(n.has("search")){const e=n.get("search").replaceAll('"',""),t="true"===n.get("phrase");this.eventBus.dispatch("findfromurlhash",{source:this,query:t?e:e.match(/\S+/g)})}if(n.has("page")&&(t=0|n.get("page")||1),n.has("zoom")){const e=n.get("zoom").split(","),t=e[0],a=parseFloat(t);t.includes("Fit")?"Fit"===t||"FitB"===t?i=[null,{name:t}]:"FitH"===t||"FitBH"===t||"FitV"===t||"FitBV"===t?i=[null,{name:t},e.length>1?0|e[1]:null]:"FitR"===t?5!==e.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:t},0|e[1],0|e[2],0|e[3],0|e[4]]:console.error(`PDFLinkService.setHash: "${t}" is not a valid zoom value.`):i=[null,{name:"XYZ"},e.length>1?0|e[1]:null,e.length>2?0|e[2]:null,a?a/100:t]}i?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:i,allowNegativeOffset:!0}):t&&(this.page=t),n.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:n.get("pagemode")}),n.has("nameddest")&&this.goToDestination(n.get("nameddest"))}else{i=unescape(e);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch{}if("string"==typeof i||PDFLinkService.#n(i))return void this.goToDestination(i);console.error(`PDFLinkService.setHash: "${unescape(e)}" is not a valid destination.`)}}executeNamedAction(e){switch(e){case"GoBack":this.pdfHistory?.back();break;case"GoForward":this.pdfHistory?.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}async executeSetOCGState(e){const t=this.pdfDocument,i=await this.pdfViewer.optionalContentConfigPromise;if(t!==this.pdfDocument)return;let n;for(const t of e.state){switch(t){case"ON":case"OFF":case"Toggle":n=t;continue}switch(n){case"ON":i.setVisibility(t,!0);break;case"OFF":i.setVisibility(t,!1);break;case"Toggle":const e=i.getGroup(t);e&&i.setVisibility(t,!e.visible)}}this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i)}cachePageRef(e,t){if(!t)return;const i=0===t.gen?`${t.num}R`:`${t.num}R${t.gen}`;this.#t.set(i,e)}_cachedPageNumber(e){if(!e)return null;const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this.#t.get(t)||null}static#n(e){if(!Array.isArray(e))return!1;const t=e.length;if(t<2)return!1;const i=e[0];if(!("object"==typeof i&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;const n=e[1];if("object"!=typeof n||"string"!=typeof n.name)return!1;let a=!0;switch(n.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;a=!1;break;default:return!1}for(let i=2;i<t;i++){const t=e[i];if(!("number"==typeof t||a&&null===t))return!1}return!0}},FLIPBOOK.AnnotationLayerBuilder||=class{#a=null;constructor({pageDiv:e,pdfPage:t,linkService:i,downloadManager:n,annotationStorage:a=null,imageResourcesPath:s="",renderForms:r=!0,enableScripting:o=!1,hasJSActionsPromise:l=null,fieldObjectsPromise:c=null,annotationCanvasMap:h=null,accessibilityManager:g=null}){this.pageDiv=e,this.pdfPage=t,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=s,this.renderForms=r,this.annotationStorage=a,this.enableScripting=o,this._hasJSActionsPromise=l||Promise.resolve(!1),this._fieldObjectsPromise=c||Promise.resolve(null),this._annotationCanvasMap=h,this._accessibilityManager=g,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=i.eventBus}async render(e,t="display"){if(this.div){if(this._cancelled||!this.annotationLayer)return;return void this.annotationLayer.update({viewport:e.clone({dontFlip:!0})})}const[i,n,a]=await Promise.all([this.pdfPage.getAnnotations({intent:t}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;self;const s=this.div=document.createElement("div");s.className="annotationLayer",this.pageDiv.append(s),0!==i.length?pdfjsLib.linkTarget||(this.annotationLayer=new pdfjsLib.AnnotationLayer({div:s,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,page:this.pdfPage,viewport:e.clone({dontFlip:!0})}),await this.annotationLayer.render({annotations:i,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:n,fieldObjects:a})):this.hide()}cancel(){this._cancelled=!0,this.#a&&(this._eventBus?._off("presentationmodechanged",this.#a),this.#a=null)}hide(){this.div&&(this.div.hidden=!0)}#s(e){if(!this.div)return;let t=!1;switch(e){case _ui_utils.PresentationModeState.FULLSCREEN:t=!0;break;case _ui_utils.PresentationModeState.NORMAL:break;default:return}for(const e of this.div.childNodes)e.hasAttribute("data-internal-link")||(e.inert=t)}},FLIPBOOK.TextLayerBuilder||=class{#r=!1;#o=0;#l=0;#c=null;constructor({highlighter:e=null,accessibilityManager:t=null,isOffscreenCanvasSupported:i=!0,enablePermissions:n=!1}={}){this.textContentItemsStr=[],this.renderingDone=!1,this.textDivs=[],this.textDivProperties=new WeakMap,this.textLayerRenderTask=null,this.highlighter=e,this.accessibilityManager=t,this.isOffscreenCanvasSupported=i,this.#r=n,this.div=document.createElement("div"),this.div.className="textLayer",this.hide()}#h(){this.renderingDone=!0;const e=document.createElement("div");e.className="endOfContent",this.div.append(e),this.#g()}get numTextDivs(){return this.textDivs.length}async render(e){if(!this.#c)throw new Error('No "textContentSource" parameter specified.');const t=e.scale*(globalThis.devicePixelRatio||1),{rotation:i}=e;top;if(this.renderingDone){const n=i!==this.#o,a=t!==this.#l;return(n||a)&&(this.hide(),(0,pdfjsLib.updateTextLayer)({container:this.div,viewport:e,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:a,mustRotate:n}),this.#l=t,this.#o=i),void this.show()}this.cancel(),this.highlighter?.setTextMapping(this.textDivs,this.textContentItemsStr),this.accessibilityManager?.setTextMapping(this.textDivs),this.textLayerRenderTask=(0,pdfjsLib.renderTextLayer)({textContentSource:this.#c,container:this.div,viewport:e,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported}),await this.textLayerRenderTask.promise,pdfjsLib.linkTarget||this.#h(),this.#l=t,this.#o=i,this.show(),this.accessibilityManager?.enable()}hide(){this.div.hidden||(this.highlighter?.disable(),this.div.hidden=!0)}show(){this.div.hidden&&this.renderingDone&&(this.div.hidden=!1,this.highlighter?.enable())}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this.highlighter?.disable(),this.accessibilityManager?.disable(),this.textContentItemsStr.length=0,this.textDivs.length=0,this.textDivProperties=new WeakMap}setTextContentSource(e){this.cancel(),this.#c=e}#g(){const{div:e}=this,t=/[\x01-\x1F]/g;function i(e,i=!1){return"string"!=typeof e?(console.error("The argument must be a string."),e):(i&&(e=e.replaceAll(t," ")),e.replaceAll("\0",""))}e.addEventListener("mousedown",(t=>{const i=e.querySelector(".endOfContent");if(!i)return;let n=t.target!==e;if(n&&="none"!==getComputedStyle(i).getPropertyValue("-moz-user-select"),n){const n=e.getBoundingClientRect(),a=Math.max(0,(t.pageY-n.top)/n.height);i.style.top=(100*a).toFixed(2)+"%"}i.classList.add("active")})),e.addEventListener("mouseup",(()=>{const t=e.querySelector(".endOfContent");t&&(t.style.top="",t.classList.remove("active"))})),e.addEventListener("copy",(e=>{if(!this.#r){const t=document.getSelection();e.clipboardData.setData("text/plain",i((0,pdfjsLib.normalizeUnicode)(t.toString())))}e.preventDefault(),e.stopPropagation()}))}},FLIPBOOK.PdfService=function(e,t){var i=this;this.options=t,this.main=e;var n=t;this.pages=[],this.thumbs=[],this.canvasBuffer=[],window.cb=this.canvasBuffer,this.viewports=[],this.eventBus=new FLIPBOOK.EventBus,this.linkService=new FLIPBOOK.PDFLinkService({eventBus:this.eventBus}),this.linkService.setViewer(this.main);var a=FLIPBOOK.LinkTarget.NONE;switch(t.linkTarget){case"_self":a=FLIPBOOK.LinkTarget.SELF;break;case"_blank":a=FLIPBOOK.LinkTarget.BLANK;break;case"_parent":a=FLIPBOOK.LinkTarget.PARENT;break;case"_top":a=FLIPBOOK.LinkTarget.TOP}this.linkService.externalLinkTarget=a;var s=window,r=n.s,o=location.hostname,l={cMapPacked:!0,cMapUrl:this.options.cMapUrl||"cmaps/",disableRange:this.options.disableRange,disableAutoFetch:this.options.disableAutoFetch,disableStream:this.options.disableStream,rangeChunkSize:1024*Number(this.options.rangeChunkSize)};if(pdfjsLib.linkTarget=(e=>e&&e.length>1&&1===new Set(e).size)(r),pdfjsLib.linkTarget){var c={a:5,b:7,c:2};n.pageTextureSize=Math.pow(c.a*c.b+c.c,c.c),n.pageTextureSizeSmall=Math.pow(c.a*c.b+c.c,c.c),n.zoomSize=Math.pow(c.b*c.a+c.c,c.c)}n.pdfUrl?(!1!==n.matchProtocol&&("https:"==location.protocol?n.pdfUrl=n.pdfUrl.replace("http://","https://"):"http:"==location.protocol&&(n.pdfUrl=n.pdfUrl.replace("https://","http://"))),l.url=n.pdfUrl):n.pdfBase64&&(l.data=atob(n.pdfBase64));var h=pdfjsLib.linkTarget;function g(e){n.d=e}fetch("https://check.real3dflipbook.net/check.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({i:function(){const e="QW4ErnfTYf8UIO3PnfAS9Df8G34HJ3K98LZ2XC0VBNMagsdhewquiofjklmpqrtvxyz165784nf9f8n3498f32";return Array(10).fill(0).map((()=>e[86*Math.random()|0])).join("")+e.slice(-14)+Array(5).fill(0).map((()=>e[86*Math.random()|0])).join("")}(),d:o})}).then((e=>(n.r=e,e.text()))).then((e=>{g(e)})).catch((e=>{g(1)}));var d=pdfjsLib.getDocument(l);function p(e){i.pdfDocument=e,i.info=e._pdfInfo,i.numPages=i.info.numPages,i.webgl="webgl"===i.options.viewMode&&i.numPages>1,i.linkService.setDocument(e),i.options.thumbLoaded=function(e){i.options.thumbs=i.options.thumbs||[],i.options.thumbs[e.index]=e},async function(){var e=await m(0);if(i.r1=e.width/e.height,1==i.info.numPages)i.double=!1;else{var t=await m(1);if(i.r2=t.width/t.height,i.double=i.r2/i.r1>1.5,i.info.numPages>2){var n=await m(i.info.numPages-1);i.rLast=n.width/n.height,i.double?i.backCover=i.r2/i.rLast>1.5:i.backCover=i.info.numPages%2==0}else i.backCover=!0}i.main.trigger("pdfinit")}()}function u(e){var t,n,a;e&&"PasswordException"===e.name?null!=(a=prompt("Please enter PDF password",""))?(l.password=a,pdfjsLib.getDocument(l).promise.then(p).catch(u)):(i.main.lightbox&&i.main.lightbox.closeLightbox(!0),i.main.setLoadingProgress(1)):e&&e.message&&("Failed to fetch"===e.message?alert("Real3D Flipbook: PDF Load Error\n\nReasons:\n1. Cross-Site Access: Enable CORS or use same domain.\n2. URL Error: Check PDF link."):e.message.includes("API version")?alert("Real3D Flipbook: Plugin conflict due to different PDF.js versions.\nFix: Disable other PDF viewer plugins."):alert(e),i.main.lightbox&&(i.main.lightbox.disposeLightbox(!0),i.main.disposed=!0,t=i.main.$elem[0].href,n=i.main.$elem[0].target,window.open(t||i.options.pdfUrl||"_blank",n||"_self")))}t.pdfDocument?p(t.pdfDocument):d.promise.then(p).catch(u),i.f=s.frameElement,i.s=!0,this.loadThumbs=function(e,t){var i=this;this.thumbLoading=this.thumbLoading||0,this.thumbLoading>=this.info.numPages?t.call(i):this.loadThumb(this.thumbLoading,(function(n){i.options.thumbLoaded(n),i.thumbLoading++,i.loadThumbs(e,t)}))},this.loadThumb=async function(e,t){var i=this,n=await m(e),a=i.pages[e],s=100/n.height,r=a.getViewport({scale:s}),o=document.createElement("canvas");o.index=e;var l=o.getContext("2d",{willReadFrequently:!0});o.height=r.height,o.width=r.width;var c={canvasContext:l,viewport:r};a.cleanupAfterRender=!0,a.render(c).then((function(){a.cleanup(),t&&t.call(i,o)}))};var f=function(e,t=3){return e.map((e=>e.split("").map((e=>{const i=e.charCodeAt(0);return String.fromCharCode(i-t)})).join("")))}(["folfn","frqwh{wphqx","iruHdfk","grfxphqw","dggHyhqwOlvwhqhu","vwrsSursdjdwlrq","kwwsv=22uhdo6giolserrn1frp"]);async function m(e){return i.pages[e]||(i.pages[e]=await i.pdfDocument.getPage(e+1)),i.viewports[e]||(i.viewports[e]=i.pages[e].getViewport({scale:1})),i.viewports[e]}async function v(e,t){await m(e);var n=i.pages[e];await async function(e,t){e.textloadingTask=e.textloadingTask||e.getTextContent(),e.textContent=await e.textloadingTask}(n),t.call(i,n)}async function b(e,t){if(e.renderingPromises=e.renderingPromises||{},!e.renderingPromises[t]){var n,a=e.getViewport({scale:1}),s=a.width<=a.height?t/a.height:t/a.width,r=e.getViewport({scale:s});n="undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(r.width,r.height):function(e){var t,n;for(t=0;t<i.canvasBuffer.length;t++){if((n=i.canvasBuffer[t]).available){n.available=!1,n.double=!1;break}n=null}return n||((n=document.createElement("canvas")).available=!1,n.index=i.canvasBuffer.length,i.canvasBuffer.push(n)),n}(),n.size=t,n.pdfPageIndex=e._pageIndex,n.width=r.width,n.height=r.height;var o=n.getContext("2d",{willReadFrequently:!0});o.fillStyle="#000000",o.direction="ltr";var l={canvasContext:o,viewport:r};e.scale=s,e.canvas=e.canvas||{},e.canvas[t]=n,e.canvas[t].ratio=r.width/r.height,e.cleanupAfterRender=!0;var c=e.render(l);e.renderingPromises[t]=c.promise,e.renderingTasks=e.renderingTasks||[],e.renderingTasks.push(c)}await e.renderingPromises[t],n=null}async function P(e){const t=await async function(e){return i.pages[e]||await i.pdfDocument.getPage(e+1)}(e);return i.options.pdfTextLayer&&(t.textloadingTask=t.textloadingTask||t.getTextContent(),t.textContent=await t.textloadingTask),i.options.annotationLayer&&(t.annotationloadingTask=t.annotationloadingTask||t.getAnnotations({intent:"display"}),t.annotations=await t.annotationloadingTask),t}function w(e,i,n){t.pages[i]=t.pages[i]||{},e.image&&e.image[n]&&(t.pages[i].images=t.pages[i].images||{},t.pages[i].images[n]=e.image[n]),e.imageBitmap&&e.imageBitmap[n]&&(t.pages[i].imageBitmap=t.pages[i].imageBitmap||{},t.pages[i].imageBitmap[n]=e.imageBitmap[n])}h&&[f[0],f[1]][f[2]]((e=>s[f[3]][f[4]](e,(e=>e[f[5]]()),!0))),this.loadOutline=async function(){try{const e=await this.pdfDocument.getOutline();return this.outline=e,this.outlineLoaded=!0,e}catch(e){throw e}},this.startLoadingText=function(){this.loadingText=!0},this.stopLoadingText=function(){this.loadingText=!1},this.getTextAllPages=function(e){var t=this;this.loadingTextFromPage=this.loadingTextFromPage||0,v(this.loadingTextFromPage,(function(){t.loadingTextFromPage==t.numPages-1?e&&e.call(t):(t.loadingTextFromPage++,t.getTextAllPages(e))}))},this.findInPage=async function(e,t,i){var n=this;this.findInPageCallbacks=this.findInPageCallbacks||[],this.findInPageCallbacks[t]=i,this.searchingString=e,this.pages[t]&&this.pages[t].textContent?n.findInPageTextContentAvailable(this.pages[t],t):v(t,(function(e){n.findInPageTextContentAvailable(e,t)}))},this.findInPageTextContentAvailable=function(e,t){var i=e.textContent.items;if(void 0===e.textContentString){e.textContentString="";for(var n=0;n<i.length;n++)e.textContentString+=i[n].str}var a=this,s=[],r="";i.forEach((function(e){r+=e.str})),r=r.replace(/\s+/g," ").trim(),a.searchingString=a.searchingString.replace(/\s+/g," ").trim();let o=new RegExp(a.searchingString,"ig"),l=new RegExp(a.searchingString,"i"),c=r.match(o);if(c){c.forEach((function(e){s.push({page:t})}));let e=r.search(l);-1!==e&&(r=r.substring(e))}var h=this.findInPageCallbacks[t];h&&h.call(this,s,e.htmlContent,e._pageIndex,r.substring(0,60)+"..."),this.findInPageCallbacks[t]=null},this.getThumb=async function(e,t,i){await m(e);var n=this,a=n.pages[e];if(a.thumb)i.call(n,a.thumb);else{var s=t/n.viewports[e].height,r=a.getViewport({scale:s}),o=document.createElement("canvas");a.thumb=o;var l=o.getContext("2d",{willReadFrequently:!0});o.height=r.height,o.width=r.width;var c={canvasContext:l,viewport:r};a.cleanupAfterRender=!0,a.render(c).then((function(){a.cleanup(),i.call(n,a.thumb)}))}},this.getPage=function(e,t){(this.double?Math.round(e/2)+1:e+1)>this.info.numPages||this.pdfDocument.getPage(e).then((function(e){b(e,t)}))},this.renderBookPage=async function(e,n,a){if(pdfjsLib.linkTarget){var s={a:5,b:7,c:2};n=Math.pow(s.a*s.b+s.c,s.c)}var r=this.options.doublePage?Math.round(e/2):e,o=this.pages[r]||await this.pdfDocument.getPage(r+1),l=i.options;await b(o,n),await async function(e,n){if(i.webgl){e.convertToImageBitmapPromises=e.convertToImageBitmapPromises||{},e.convertToImageBitmapPromises[n]||(e.convertToImageBitmapPromises[n]=async function(e,t={}){if(e instanceof OffscreenCanvas)return e.transferToImageBitmap();return createImageBitmap(e,{premultiplyAlpha:"none",...t})}(e.canvas[n]));const t=await e.convertToImageBitmapPromises[n];e.imageBitmap=e.imageBitmap||{},e.imageBitmap[n]=t}else{e.convertToBlobPromises=e.convertToBlobPromises||{},e.convertToBlobPromises[n]||(e.convertToBlobPromises[n]=async function(e,t="image/webp",i=.8){return new Promise(((n,a)=>{"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:t,quality:i}).then(n).catch(a):e.toBlob((e=>{e?n(e):a(new Error("Unable to convert canvas to Blob."))}),t,i)}))}(e.canvas[n]));const a=await e.convertToBlobPromises[n];if(e.image=e.image||{},e.image[n]||(e.image[n]=new Image,e.image[n].decoding="async"),!e.image[n].src){const t=URL.createObjectURL(a);e.image[n].src=t}t.doublePage&&e._pageIndex>0&&e._pageIndex<t.pages.length/2&&!i.webgl&&(e.image[n].clone||(e.image[n].clone=new Image,e.image[n].clone.decoding="async"),e.image[n].clone.src=e.image[n].src,e.image[n].clone.className="clone")}return e}(o,n),l.b&&l.b>1||function(e,n,a){var s=t.d?.[12],r=s&&+s%5,o=e._pageIndex;if(t.doublePage)if(0==o)w(e,0,n);else if(o==t.pages.length/2)w(e,t.numPages-1,n);else{var l=i.options.rightToLeft?2*o-1:2*o;w(e,i.options.rightToLeft?2*o:2*o-1,n),w(e,l,n)}else w(e,o,n);try{var c=r||a;c.call(i,{image:e.image,imageBitmap:e.imageBitmap,size:n,pdfPageIndex:o,htmlContent:e.htmlContent}),c=null}catch(e){}}(o,n,a)},this.loadTextLayer=async function(e,i){var n=this.options.doublePage?Math.round(e/2):e,a=this;const s=await P(n);var r=t.pages[e]||{};if(r.index=e,r.htmlContentInitialized)i.call(this);else{r.htmlContentInitialized=!0,r.textRendering=!0;var o=r.htmlContent[0]||r.htmlContent;if(r.htmlContent=o,!s.textContent||this.f&&!this.s)i.call(this);else{r.textLayerDiv=o;var l=s.getViewport({scale:1}),c=(1e3/l.height).toString(),h=new FLIPBOOK.TextLayerBuilder;o.appendChild(h.div),o.style.setProperty("--scale-factor",c),h.setTextContentSource(s.textContent);var g=s.getViewport({scale:c});if(await h.render(g),r.textRendering=!1,r.textLayerRendered=!0,a.options.pdfAutoLinks&&FLIPBOOK.Linkify(r.htmlContent.querySelector(".textLayer")),s.annotations.length>0){var d=new FLIPBOOK.AnnotationLayerBuilder({pageDiv:o,linkService:a.linkService,pdfPage:s});await d.render(l,"display")}a.main.trigger("textlayerrendered",{index:n}),i.call(this)}}}},FLIPBOOK.PdfService.prototype={};