{var component={name:"pdf_viewer",version:[1,0,0],ccm:{url:"https://akless.github.io/ccm/version/ccm-11.5.0.min.js",integrity:"sha384-7lrORUPPd2raLsrPJYo0Arz8csPcGzgyNbKOr9Rx3k0ECU0T8BP+B1ejo8+wmUzh",crossorigin:"anonymous"},config:{html:{id:"pdf-viewer",class:"container-fluid",inner:[{id:"pdf-elem",inner:{id:"pdf-view",inner:{id:"canvas",tag:"canvas"}}},{class:"navigation text-center",inner:[{class:"btn-group",inner:[{tag:"a",typ:"button",class:"active btn btn-prev btn-info info",onclick:"%prev%",inner:"Previous"},{tag:"a",typ:"button",id:"page-num",class:"active btn btn-success info"},{tag:"a",typ:"button",class:"btn btn-next btn-warning info",onclick:"%next%",inner:"Next"}]}]}]},path_to_pdf:"//cdn.mozilla.net/pdfjs/tracemonkey.pdf",scale:"1.5",pdfJS:["ccm.load","//mozilla.github.io/pdf.js/build/pdf.js"],css:["ccm.load","https://tkless.github.io/ccm-components/lib/bootstrap/css/bootstrap.css",{context:"head",url:"https://tkless.github.io/ccm-components/lib/bootstrap/css/font-face.css"},"https://tkless.github.io/ccm-components/pdf-viewer/resources/default.css"]},Instance:function(){const self=this;let my;let $;let pdfDoc,pageNum,pageRendering,pageNumPending,scale=.8,ctx;this.init=(callback=>{if(self.responsive)ccm.load({context:this.element.parentNode,url:self.responsive});pdfDoc=null;pageNum=1;pageRendering=false;pageNumPending=null;scale=.8;callback()});this.ready=(callback=>{$=self.ccm.helper;my=$.privatize(self);PDFJS.workerSrc="//mozilla.github.io/pdf.js/build/pdf.worker.js";PDFJS.getDocument(my.path_to_pdf).then(function(pdf){pdfDoc=pdf;callback()})});this.start=(callback=>{$.setContent(self.element,$.html(my.html,{prev:function(){self.element.querySelector(".btn-next").classList.remove("active");self.element.querySelector(".btn-prev").classList.add("active");onPrevPage()},next:function(){self.element.querySelector(".btn-prev").classList.remove("active");self.element.querySelector(".btn-next").classList.add("active");onNextPage()}}));canvas=self.element.querySelector("canvas");canvas.addEventListener("contextmenu",function(e){e.preventDefault()});ctx=canvas.getContext("2d");renderPage(pageNum);function renderPage(num){pageRendering=true;pdfDoc.getPage(num).then(function(page){let viewport=page.getViewport(my.scale);canvas.height=viewport.height;canvas.width=viewport.width;let renderContext={canvasContext:ctx,viewport:viewport};let renderTask=page.render(renderContext);renderTask.promise.then(function(){pageRendering=false;if(pageNumPending!==null){renderPage(pageNumPending);pageNumPending=null}})});self.element.querySelector("#page-num").innerHTML=num+" / "+pdfDoc.numPages}function queueRenderPage(num){if(pageRendering){pageNumPending=num}else{renderPage(num)}}function onPrevPage(){if(pageNum<=1){return}pageNum--;queueRenderPage(pageNum)}function onNextPage(){if(pageNum>=pdfDoc.numPages){return}pageNum++;queueRenderPage(pageNum)}if(callback)callback()})}};function p(){window.ccm[v].component(component)}const f="ccm."+component.name+(component.version?"-"+component.version.join("."):"")+".js";if(window.ccm&&null===window.ccm.files[f])window.ccm.files[f]=component;else{const n=window.ccm&&window.ccm.components[component.name];n&&n.ccm&&(component.ccm=n.ccm),"string"==typeof component.ccm&&(component.ccm={url:component.ccm});var v=component.ccm.url.split("/").pop().split("-");if(v.length>1?(v=v[1].split("."),v.pop(),"min"===v[v.length-1]&&v.pop(),v=v.join(".")):v="latest",window.ccm&&window.ccm[v])p();else{const e=document.createElement("script");document.head.appendChild(e),component.ccm.integrity&&e.setAttribute("integrity",component.ccm.integrity),component.ccm.crossorigin&&e.setAttribute("crossorigin",component.ccm.crossorigin),e.onload=function(){p(),document.head.removeChild(e)},e.src=component.ccm.url}}}
@@ -1434,16 +1434,59 @@
 e(self);
+if(self.logger)self.logger.log(%22ready%22,my);
 PDFJS.wo
@@ -1694,32 +1694,81 @@
 prev:function()%7B
+if(self.logger)self.logger.log(%22prev%22,pageNum-1);
 self.element.que
@@ -1912,16 +1912,65 @@
 ction()%7B
+if(self.logger)self.logger.log(%22next%22,pageNum+1);
 self.ele

add v1 of pdf-viewer