function t396_scaleBlock(e){var t=t396_detectResolution(e),l=document.getElementById("rec"+e);if(l){var a;"function"==typeof window.t396__getCurrentScaleFactor?a=t396__getCurrentScaleFactor(e):(a=window.tn&&window.tn["ab"+e]&&window.tn["ab"+e].scaleFactor)||(a=window.tn_scale_factor);var o=l.querySelector(".t396__artboard"),n=t396_scale__collectScaleData(o,a);if(o){var r=t396_ab__getFieldValue(o,"height"),i=Math.floor(r*a),c,_;if(t396_ab__getFieldValue(o,"height_vh")){var s=t396_ab__getFieldValue(o,"height"),d=t396_ab__getHeight(o),u=s*a;i=u>=d?u:d}if(t396_scale__updateArtboardState(o,i),0!==n.length)if(t396_isOnlyScalableBrowser())t396_scale__scaleIsOnlyScalableBlock(n);else{var m=n.filter((function(e){var t=e.elemType;return"text"===t||"button"===t})),h=n.filter((function(e){var t;return"shape"===e.elemType})),p=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),f;p&&t396_scale__schedule__scaleTextElements(m),t396_scale__schedule__scaleShapeElements(h),n.forEach((function(e){var l=e.element,o=e.elementCore,n=e.elemType,r="gallery"===n;"yes"===l.getAttribute("data-scale-off")||r||(l.style.zoom=a),r&&(l.style.zoom=null),"text"===n&&t<1200&&o&&!p&&(o.style.webkitTextSizeAdjust="auto"),o&&(o.style.transformOrigin="center")})),Array.from(o.querySelectorAll(":scope > .t396__elem, :scope > .t396__group")).forEach((function(e){var t;("left"!==t396_core__getFieldValue(e,"axisx")||"top"!==t396_core__getFieldValue(e,"axisy"))&&(t396_elem__renderViewOneField(e,"left"),t396_elem__renderViewOneField(e,"top"))}))}}}}function t396_scale__schedule__scaleTextElements(e){window.tn||(window.tn={}),window.tn.scheduledTextElementsForScale||(window.tn.scheduledTextElementsForScale=[]),window.tn.scheduledTextElementsForScale=window.tn.scheduledTextElementsForScale.concat(e),clearTimeout(window.tn.textElementsScaleTimer),window.tn.textElementsScaleTimer=setTimeout((function(){t396_scale__scaleTextElements(window.tn.scheduledTextElementsForScale),window.tn.scheduledTextElementsForScale=[]}),1)}function t396_scale__scaleTextElements(e){var t=t396__initFastDOM();t.write((function(){e.forEach((function(e){e.element.style.zoom=""}))})),t.read((function(){e.forEach((function(e){e.cachedFontSize=parseFloat(getComputedStyle(e.elementCore).fontSize),e.cachedTextSizeAdjust=e.elementCore.style.webkitTextSizeAdjust}))})),t.write((function(){e.forEach((function(e){e.elementCore.style.webkitTextSizeAdjust="none",e.element.style.zoom=e.scaleFactor}))})),t.read((function(){e.forEach((function(e){e.currentFontSize=parseFloat(getComputedStyle(e.elementCore).fontSize)}))})),t.write((function(){e.forEach((function(e){var t=Math.abs(e.cachedFontSize-e.currentFontSize);e.elementCore.style.webkitTextSizeAdjust=t>=1?"none":e.cachedTextSizeAdjust,t>=1&&(e.elementCore.style.fontSize=Math.round(e.cachedFontSize*e.scaleFactor)+"px")}))}))}function t396_scale__schedule__scaleShapeElements(e){window.tn||(window.tn={}),window.tn.scheduledShapeElementsForScale||(window.tn.scheduledShapeElementsForScale=[]),window.tn.scheduledShapeElementsForScale=window.tn.scheduledShapeElementsForScale.concat(e),clearTimeout(window.tn.shapeElementsScaleTimer),window.tn.shapeElementsScaleTimer=setTimeout((function(){t396_scale__scaleShapeElements(window.tn.scheduledShapeElementsForScale),window.tn.scheduledShapeElementsForScale=[]}),1)}function t396_scale__scaleShapeElements(e){var t=t396__initFastDOM();t.read((function(){e.forEach((function(e){var t=t396_elem__getFieldValue(e.element,"height");t=t396_elem__getHeight(e.element,t),t=t396_elem__convertPosition__Local__toAbsolute(e.element,"height",t);var l=t396_elem__getFieldValue(e.element,"width");l=t396_elem__getWidth(e.element,l),l=t396_elem__convertPosition__Local__toAbsolute(e.element,"width",l);var a=parseFloat(t396_elem__getFieldValue(e.element,"top"));a=t396_elem__convertPosition__Local__toAbsolute(e.element,"top",a);var o=parseFloat(t396_elem__getFieldValue(e.element,"left"));o=t396_elem__convertPosition__Local__toAbsolute(e.element,"left",o),e.shapeSize={top:a,left:o,width:l,height:t}}))}));var l=e.filter((function(e){return e.shapeSize.width<=2||e.shapeSize.height<=2}));t.read((function(){l.forEach((function(e){var t=window.getComputedStyle(e.elementCore);e.borderWidth=t.borderWidth,e.isImage="none"!==t.backgroundImage,e.isAnimated=e.element.getAttribute("data-animate-sbs-event")}))})),t.write((function(){l.forEach((function(e){if("0px"===e.borderWidth&&!e.isImage&&!e.isAnimated){e.element.style.removeProperty("zoom");var t=e.shapeSize.width*e.scaleFactor,l=e.shapeSize.height*e.scaleFactor,a=e.shapeSize.top*e.scaleFactor,o=e.shapeSize.left*e.scaleFactor;e.element.style.width=parseFloat(t)+"px",e.element.style.height=parseFloat(l)+"px",e.element.style.top=Math.round(a)+"px",e.element.style.left=Math.round(o)+"px",e.element.setAttribute("data-scale-off","yes")}}))}))}function t396_scale__collectScaleData(e,t){var l;return t396_scale__getElementsToScale(e).map((function(e){var l=e.querySelector(".tn-molecule, .tn-atom"),a=t396_scale__getElementType(e),o=t396_elem__getFieldValue(e,"container");if(o||"group"!==a||(o="grid"),l&&"grid"===o)return{element:e,elementCore:l,elemType:a,scaleFactor:t}})).filter(Boolean)}function t396_scale__scaleIsOnlyScalableBlock(e){e.forEach((function(e){var t=e.element,l=e.elementCore,a=e.elemType,o=l.closest(".tn-atom__scale-wrapper");o||(t396_scale__wrapElement(l,currentScaleFactor,"tn-atom__scale-wrapper"),o=l.closest(".tn-atom__scale-wrapper")),t.style.zoom="",t396_scale__processBackdropFilter(t,l,o),t396_scale__processBackgroundForShape(t,l,a,currentScaleFactor)}))}function t396_scale__getElementsToScale(e){return e?Array.prototype.slice.call(e.children).filter((function(e){return e&&(e.classList.contains("t396__elem")||e.classList.contains("t396__group"))})):[]}function t396_scale__updateArtboardState(e,t){e.classList.add("t396__artboard_scale");var l=e.getAttribute("data-artboard-recid"),a;if(!("hug"===e.getAttribute("data-artboard-heightmode"))){var o='";e.insertAdjacentHTML("beforeend",o)}}function t396_scale__wrapElement(e,t,l){if(e){var a=e.parentNode;if(a){var o=document.createElement("div");o.classList.add(l),o.style.transform="scale("+t+")",o.appendChild(e),a.appendChild(o)}}}function t396_scale__processBackdropFilter(e,t,l){"none"===e.style.backdropFilter&&(e.style.backdropFilter="");var a=getComputedStyle(e).backdropFilter;if(a){e.style.backdropFilter="none",l.style.backdropFilter=a;var o=getComputedStyle(t).borderRadius;"0px"!==o&&(l.style.borderRadius=o)}}function t396_scale__processBackgroundForShape(e,t,l,a){if("shape"===l){var o=t&&getComputedStyle(t),n;if(o)if((o&&o.backgroundImage||t.getAttribute("data-original"))&&"fixed"===o.backgroundAttachment){e.removeChild(t.parentNode),e.appendChild(t);var r=t396_elem__getFieldValue(e,"height");r=t396_elem__getHeight(e,r),r=t396_elem__convertPosition__Local__toAbsolute(e,"height",r);var i=t396_elem__getFieldValue(e,"width");i=t396_elem__getWidth(e,i),i=t396_elem__convertPosition__Local__toAbsolute(e,"width",i);var c=parseFloat(t396_elem__getFieldValue(e,"top")),_=parseFloat(t396_elem__getFieldValue(e,"left"));e.style.top=c*a+"px",e.style.left=_*a+"px",e.style.height=r*a+"px",e.style.width=i*a+"px",e.setAttribute("data-scale-off","yes")}}}function t396_scale__getElementType(e){var t=e.getAttribute("data-elem-type");return!t&&e.classList.contains("tn-group")&&(t="group"),t}window.t396_initialScale||(window.t396_initialScale=function(){});