1jQuery(function($){$('.modulo-iscrizione .clausola-label').on('click',function(){$(this).next('.clausola-text').slideToggle(200)});var $popup=$('.modulo-iscrizione #popup-modulo-palestra');$(document).on('click','.modulo-iscrizione #popup-modulo-palestra-close',function(){$popup.fadeOut(200)});$(document).on('click','.modulo-iscrizione #popup-modulo-palestra',function(e){if($(e.target).is('.modulo-iscrizione #popup-modulo-palestra')){$popup.fadeOut(200)}});window.openModuloPalestraPopup=function(contentHtml){if(contentHtml){$('.modulo-iscrizione #popup-modulo-palestra-content').html(contentHtml)} 2$popup.fadeIn(200)};window.mostraPopupIscrizioneForm=function(messaggio,focusSelector,isSuccess){var $popup=$('#popup-modulo-palestra');var $content=$('#popup-modulo-palestra-content');if(isSuccess){$content.html('<div style="font-size:25px;font-weight:700;margin-bottom:32px; text-align:center;">'+messaggio+'</div>'+'<button type="button" class="button" id="popup-success-newmodule">Clicca per aggiungere un nuovo modulo</button>')}else{$content.html('<div>'+messaggio+'</div>')} 3$popup.show();$popup.find('#popup-modulo-palestra-close').off('click').on('click',function(){$popup.hide();if(focusSelector){setTimeout(function(){var $el=$(focusSelector);if($el.length)$el.focus()},100)}});$popup.find('#popup-success-newmodule').off('click').on('click',function(){location.reload()});$popup.off('click.bg').on('click.bg',function(e){if(e.target===this&&!isSuccess){$popup.hide();if(focusSelector){setTimeout(function(){var $el=$(focusSelector);if($el.length)$el.focus()},100)}}})}});document.addEventListener('DOMContentLoaded',function(){resizeAllFirmeCanvas();document.querySelectorAll('.firma-canvas').forEach(function(canvas){const match=canvas.id&&canvas.id.match(/^firma-canvas-(.+)$/);if(!match)return;const suffix=match[1];const suffixUnderscore=suffix.replace(/-/g,'_');const firmaClear=document.getElementById('firma-clear-'+suffix);const firmaBase64=document.getElementById('firma_base64_'+suffixUnderscore);const firmaAlert=document.getElementById('firma-alert-'+suffix);const ctx=canvas.getContext('2d');let drawing=!1;let empty=!0;let lastX=0;let lastY=0;function getOffset(e){const rect=canvas.getBoundingClientRect();if(e.touches&&e.touches.length===1){return{x:e.touches[0].clientX-rect.left,y:e.touches[0].clientY-rect.top}} 4return{x:e.clientX-rect.left,y:e.clientY-rect.top}} 5function startDraw(e){e.preventDefault();drawing=!0;const pos=getOffset(e);lastX=pos.x;lastY=pos.y} 6function draw(e){if(!drawing)return;e.preventDefault();const pos=getOffset(e);ctx.beginPath();ctx.moveTo(lastX,lastY);ctx.lineTo(pos.x,pos.y);ctx.strokeStyle='#222';ctx.lineWidth=2;ctx.lineCap='round';ctx.stroke();lastX=pos.x;lastY=pos.y;empty=!1} 7function endDraw(){if(!drawing)return;drawing=!1;if(!empty&&firmaBase64){firmaBase64.value=canvas.toDataURL('image/png');if(firmaAlert)firmaAlert.style.display='none'}} 8canvas.addEventListener('mousedown',startDraw);canvas.addEventListener('mousemove',draw);canvas.addEventListener('mouseup',endDraw);canvas.addEventListener('mouseleave',endDraw);canvas.addEventListener('touchstart',startDraw);canvas.addEventListener('touchmove',draw);canvas.addEventListener('touchend',endDraw);canvas.addEventListener('touchcancel',endDraw);if(firmaClear){firmaClear.addEventListener('click',function(){ctx.clearRect(0,0,canvas.width,canvas.height);if(firmaBase64)firmaBase64.value='';empty=!0;if(firmaAlert)firmaAlert.style.display='none'})} 9canvas.addEventListener('mousedown',function(){if(firmaAlert)firmaAlert.style.display='none'});canvas.addEventListener('touchstart',function(){if(firmaAlert)firmaAlert.style.display='none'})})});function resizeFirmaCanvas(canvas){if(!canvas)return;const parent=canvas.parentElement;if(!parent)return;const oldData=canvas.toDataURL();const width=parent.offsetWidth;canvas.width=width;canvas.height=150;canvas.style.width='100%';canvas.style.height='150px';if(oldData&&oldData!=='data:,'){const img=new Image();img.onload=function(){const ctx=canvas.getContext('2d');ctx.drawImage(img,0,0)};img.src=oldData}} 10function resizeAllFirmeCanvas(){document.querySelectorAll('.firma-canvas').forEach(function(canvas){resizeFirmaCanvas(canvas)})} 11resizeAllFirmeCanvas();window.addEventListener('resize',resizeAllFirmeCanvas)
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.