PageSourceSearch

https://www.bellunoinbici.it/vis_pdf_img-min.js

js bellunoinbici.it collected 2026-10-02 14:04:58 UTC 5,768 bytes, 1 lines download raw bytes

1if(!document.getElementById("img-cursor-styles")){const e=document.createElement("style");e.id="img-cursor-styles",e.innerHTML="\n        #image-wrapper {\n            cursor: default;\n        }\n        #image-wrapper.is-draggable {\n            cursor: grab;\n        }\n        #image-wrapper.is-dragging {\n            cursor: grabbing;\n        }\n    ",document.head.appendChild(e)}const container=document.getElementById("image-wrapper"),objImg=document.getElementById("cImg"),message=document.getElementById("overlay-message"),objFSC=document.querySelector(".fullscreen-container");let myTimeOut1,myTimeOut2,wIW=window.innerWidth;function getFileExtension(e){return e.split(".").pop().toLowerCase()}function selectDIV(e){document.querySelectorAll("div.glow-highlight").forEach((e=>{e.classList.remove("glow-highlight")})),e.classList.add("glow-highlight")}function openIMG(e,t,n){history.pushState(null,null,location.href),window.onpopstate=function(){alert("Premi Ok per chiudere l'immagine.\nLa prossima volta tocca (o clicca)\nl'immagine per chiuderla direttamente."),history.replaceState(null,null,location.href),closeIMG()},document.getElementById(n)&&(document.querySelectorAll("div.glow-highlight").forEach((e=>{e.classList.remove("glow-highlight")})),document.getElementById(n).classList.add("glow-highlight")),null!==e.src&&(document.body.style.overflowY="hidden",objImg.classList.remove("fade-in"),objFSC.style.display="flex",objImg.src="string"==typeof e?e:e.src,objImg.onload=()=>{if(messaggio(),myTimeOut1=setTimeout((()=>{message.style.opacity="0"}),3e3),myTimeOut2=setTimeout((()=>{message.style.display="none"}),4e3),t){wIW=window.innerWidth;let e=t;e>=wIW&&(e=wIW),objImg.style.width=e+"px"}else{if(wIW=window.innerWidth,wIW<768)objImg.style.maxWidth="100%";else{let e=objImg.naturalWidth;objImg.style.width=e<wIW?e+"px":wIW+"px"}objImg.style.height="auto"}objImg.style.position="absolute",objImg.style.top="50%",objImg.style.left="50%",objImg.style.transformOrigin="center",objImg.style.userSelect="none",objImg.style.pointerEvents="none",objImg.style.willChange="transform",objImg.classList.add("fade-in"),container.style.cursor="default";let e,n,o=1,i=0,l=0,s=0,c=0,a=!1,r=!1,g=null;function u(){const e=container.getBoundingClientRect(),t=objImg.naturalWidth*o,n=objImg.naturalHeight*o;return t>e.width||n>e.height}function d(){u()&&(container.classList.remove("is-draggable","is-dragging"),a?(container.classList.add("is-dragging"),container.style.cursor="grabbing"):u()?(container.classList.add("is-draggable"),container.style.cursor="grab"):container.style.cursor="default")}function m(e){const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function h(e,t,n){return Math.min(Math.max(e,t),n)}function y(){objImg.style.transform=`translate(-50%, -50%) translate(${i}px, ${l}px) scale(${o})`,d()}function p(){const e=container.getBoundingClientRect(),t=objImg.naturalWidth*o,n=objImg.naturalHeight*o,s=t>e.width,c=n>e.height;if(s){const n=t/2-e.width/2;i=h(i,-n,n)}else i=0;if(c){const t=n/2-e.height/2;l=h(l,-t,t)}else l=0}container.addEventListener("wheel",(e=>{container.style.cursor="default",e.preventDefault();const t=container.getBoundingClientRect(),n=e.clientX-t.width/2,s=e.clientY-t.height/2,c=o;o+=e.deltaY<0?.1:-.1,o=h(o,.8,3);const a=o/c;i-=n*(a-1),l-=s*(a-1),p(),y()})),container.addEventListener("mousedown",(t=>{a=!0,r=!1,e=t.clientX,n=t.clientY,s=c=0,d()})),window.addEventListener("mousemove",(t=>{if(!a)return;const o=t.clientX-e,g=t.clientY-n;(Math.abs(o)>2||Math.abs(g)>2)&&(r=!0),i+=o,l+=g,s=o,c=g,e=t.clientX,n=t.clientY,p(),y()})),window.addEventListener("mouseup",(()=>{a=!1,d()})),function e(){a||(i+=s,l+=c,s*=.95,c*=.95,Math.abs(s)<.1&&(s=0),Math.abs(c)<.1&&(c=0),p(),y()),requestAnimationFrame(e)}(),container.addEventListener("touchstart",(t=>{1===t.touches.length?(a=!0,e=t.touches[0].clientX,n=t.touches[0].clientY):2===t.touches.length&&(g=m(t.touches)),d()})),container.addEventListener("touchmove",(t=>{if(t.preventDefault(),1===t.touches.length&&a){const o=t.touches[0].clientX-e,s=t.touches[0].clientY-n;i+=o,l+=s,e=t.touches[0].clientX,n=t.touches[0].clientY}else if(2===t.touches.length){const e=m(t.touches);const n=o;o+=.005*(e-g),o=h(o,.8,3);const s=container.getBoundingClientRect(),c=(t.touches[0].clientX+t.touches[1].clientX)/2-s.width/2,a=(t.touches[0].clientY+t.touches[1].clientY)/2-s.height/2,r=o/n;i-=c*(r-1),l-=a*(r-1),g=e}p(),y()})),container.addEventListener("touchend",(()=>{a=!1,g=null,d()})),container.addEventListener("click",(()=>{r||closeIMG()})),i=0,l=0,o=1,y()})}function closeIMG(){window.onpopstate=function(){history.pushState(null,null,location.href)},document.body.style.overflowY="auto",clearTimeout(myTimeOut1),clearTimeout(myTimeOut2),objImg.src="",message.style.opacity="1",objFSC.style.display="none"}function openPDF(e,t){const n=getFileExtension(e);"png"===n||"jpg"===n||"jpeg"===n?openIMG(e):(document.getElementById("frPDF").src=e,document.querySelector(".fullscreen-container-pdf").style.display="flex",t&&(document.getElementById("toclip").style.display="block"))}function closePDF(){document.getElementById("frPDF").src="",document.querySelector(".fullscreen-container-pdf").style.display="none"}function messaggio(){"true"!==localStorage.getItem("hideOverlayMessage")?(message.style.height="120px",message.style.display="block",message.innerHTML='<b>CLICK / TAP sull\'immagine per chiuderla</b><hr style="margin:8px 4px 4px 4px;"><label for="hideOverlay"><input type="checkbox" id="hideOverlay">&nbsp;non visualizzare più questo messaggio</label>',document.getElementById("hideOverlay").addEventListener("change",(e=>{e.target.checked&&localStorage.setItem("hideOverlayMessage","true")}))):message.style.display="none"}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.