https://ivyforms.com/wp-content/cache/autoptimize/js/autoptimize_251a0848120c98410097aa6a4cf9c7ba.js
1function captureImpactAffiliateParamsFromUrl(){var params=new URL(document.location).searchParams;var irclickid=params.get("irclickid")||params.get("im_ref");var irpid=params.get("irpid");var date=new Date();date.setDate(date.getDate()+90);if(irclickid){document.cookie="irclickid="+ 2irclickid+";expires="+ 3date.toUTCString()+";path=/;";} 4if(irpid){document.cookie="irpid="+irpid+";expires="+date.toUTCString()+";path=/;";}} 5captureImpactAffiliateParamsFromUrl();function bindHoverClass(selector,className,scopeToSelf){document.querySelectorAll(selector).forEach(function(element){element.addEventListener("mouseenter",function(){if(scopeToSelf){element.classList.add(className);return;} 6document.querySelectorAll(selector).forEach(function(target){target.classList.add(className);});});element.addEventListener("mouseleave",function(){if(scopeToSelf){element.classList.remove(className);return;} 7document.querySelectorAll(selector).forEach(function(target){target.classList.remove(className);});});});} 8document.addEventListener("DOMContentLoaded",function(){bindHoverClass(".hero-subscribe .button-holder","hover");bindHoverClass(".featured-post","hovered",true);bindHoverClass(".post-card","hovered",true);window.addEventListener("scroll",function(){document.body.classList.toggle("scrolling",window.scrollY>0);});document.querySelectorAll(".gleap-open-chat").forEach(function(element){element.addEventListener("click",function(event){event.preventDefault();if(typeof Gleap!=="undefined"&&Gleap.startConversation){Gleap.startConversation();}});});});const faqItems=document.querySelectorAll(".faq-item");faqItems.forEach((item)=>{const question=item.querySelector(".faq-question");question.addEventListener("click",()=>{const answer=item.querySelector(".faq-answer");const isOpen=answer.classList.contains("open");document.querySelectorAll(".faq-answer").forEach((answer)=>{answer.classList.remove("open");answer.style.maxHeight=null;});document.querySelectorAll(".faq-question").forEach((question)=>{question.classList.remove("open");});if(!isOpen){answer.classList.add("open");answer.style.maxHeight=answer.scrollHeight+"px";question.classList.add("open");}});});function setupCategoryToggle(){const captionWrapper=document.querySelector(".custom-categories-widget .caption-wrapper");const categoryList=document.querySelector(".custom-categories-widget ul");const icon=document.querySelector(".custom-categories-widget .icon");if(captionWrapper&&categoryList&&icon){captionWrapper.addEventListener("click",function(){if(window.matchMedia("(max-width: 991.98px)").matches){if(categoryList.classList.contains("open")){categoryList.style.height=categoryList.scrollHeight+"px";requestAnimationFrame(()=>{categoryList.style.height="0";});categoryList.classList.remove("open");icon.classList.remove("rotate");}else{categoryList.style.height=categoryList.scrollHeight+"px";categoryList.classList.add("open");icon.classList.add("rotate");categoryList.addEventListener("transitionend",function(){categoryList.style.height="auto";},{once:true});}}});}} 9document.addEventListener("DOMContentLoaded",function(){setupCategoryToggle();function addArrowAndHoverEffect(formId){var intervalId=setInterval(function(){var formContainer=document.getElementById(formId);if(formContainer){var buttonContainer=formContainer.querySelector(".bee-button-container");if(buttonContainer){var arrowHtml=` 10 <div class="arrow"> 11 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="24" viewBox="0 0 23 24" fill="none"> 12 <path fill-rule="evenodd" clip-rule="evenodd" 13 d="M3.83301 12.4212C3.83301 11.892 4.26207 11.4629 4.79134 11.4629H18.208C18.7373 11.4629 19.1663 11.892 19.1663 12.4212C19.1663 12.9505 18.7373 13.3796 18.208 13.3796H4.79134C4.26207 13.3796 3.83301 12.9505 3.83301 12.4212Z" 14 fill="white" /> 15 <path fill-rule="evenodd" clip-rule="evenodd" 16 d="M10.8227 5.03655C11.1969 4.6623 11.8037 4.6623 12.178 5.03655L18.8863 11.7449C19.2606 12.1191 19.2606 12.7259 18.8863 13.1002L12.178 19.8085C11.8037 20.1828 11.1969 20.1828 10.8227 19.8085C10.4484 19.4343 10.4484 18.8275 10.8227 18.4532L16.8534 12.4225L10.8227 6.39184C10.4484 6.01758 10.4484 5.4108 10.8227 5.03655Z" 17 fill="white" /> 18 </svg> 19 </div> 20 `;buttonContainer.insertAdjacentHTML("beforeend",arrowHtml);bindHoverClass(`#${formId} .bee-button-container`,"hover");clearInterval(intervalId);}}},100);} 21if(document.body.classList.contains("home")){addArrowAndHoverEffect("form-acm_32181");addArrowAndHoverEffect("form-acm_51384");addArrowAndHoverEffect("form-acm_59556");} 22if(document.body.classList.contains("page-template-page-all-posts")){addArrowAndHoverEffect("form-acm_51183");} 23if(document.body.classList.contains("single")){addArrowAndHoverEffect("form-acm_51183");} 24if(document.body.classList.contains("category")){addArrowAndHoverEffect("form-acm_51183");} 25const sidebar=document.querySelector(".documentation-sidebar");
25if(sidebar){sidebar.style.opacity='1';sidebar.style.transform='translateY(0)';const subcategories=document.querySelectorAll(".documentation-categories .documentation-categories, .posts");subcategories.forEach((subcategory)=>{subcategory.style.height="0";});const categoryLinks=document.querySelectorAll(".category-link");categoryLinks.forEach((link)=>{link.addEventListener("click",function(e){e.preventDefault();const parentLi=this.parentElement;const subcategories=parentLi.querySelectorAll(":scope > .documentation-categories, :scope > .posts");subcategories.forEach((subcategory)=>{if(subcategory.style.height==="0px"||subcategory.style.height===""){subcategory.style.height=`${subcategory.scrollHeight}px`;subcategory.addEventListener("transitionend",function(){subcategory.style.height="auto";},{once:true});}else{subcategory.style.height=`${subcategory.scrollHeight}px`;subcategory.offsetHeight;subcategory.style.height="0";}});this.classList.toggle("active");});});const expandedItems=document.querySelectorAll('[data-expanded="true"]');setTimeout(function(){expandedItems.forEach(function(item){item.style.height='auto';});},10);}});const mobileMenuIcon=document.querySelector('.mobile-menu-icon-holder');if(mobileMenuIcon){mobileMenuIcon.addEventListener('click',function(){this.classList.toggle('active');const header=document.querySelector('header');if(header){header.classList.toggle('active');document.body.style.overflow=header.classList.contains('active')?'hidden':'';}});} 26function updateCurrentYearElements(){var year=new Date().getFullYear();document.querySelectorAll('.js-current-year').forEach(function(element){element.textContent=year;});} 27updateCurrentYearElements(); 28document.addEventListener('DOMContentLoaded',function(){function addDaysToDateUntilFuture(date){const now=new Date();while(date<=now){date.setDate(date.getDate()+4);} 29return date;} 30function initializeClock(){const elements={clock:document.querySelector('.banner-counter'),days:document.querySelector('.days'),hours:document.querySelector('.hours'),minutes:document.querySelector('.minutes'),seconds:document.querySelector('.seconds'),timeDots:document.querySelectorAll('.time-dots')};if(!elements.clock||!elements.days||!elements.hours||!elements.minutes||!elements.seconds){console.log('Timer elements not found');return;} 31const endTime=addDaysToDateUntilFuture(new Date("Mar 24, 2025 00:00:00")).getTime();const SECOND=1000;const MINUTE=SECOND*60;const HOUR=MINUTE*60;const DAY=HOUR*24;function pad(number){return number<10?`0${number}`:`${number}`;} 32function updateTimerDisplay(){const now=Date.now();const total=endTime-now;if(total<0){clearInterval(timerInterval);if(elements.clock)elements.clock.remove();return;} 33const days=Math.floor(total/DAY);const hours=Math.floor((total%DAY)/HOUR);const minutes=Math.floor((total%HOUR)/MINUTE);const seconds=Math.floor((total%MINUTE)/SECOND);elements.days.textContent=pad(days);elements.hours.textContent=pad(hours);elements.minutes.textContent=pad(minutes);elements.seconds.textContent=pad(seconds);} 34updateTimerDisplay();let dotsVisible=true;const timerInterval=setInterval(function(){updateTimerDisplay();dotsVisible=!dotsVisible;if(elements.timeDots.length){elements.timeDots.forEach(dot=>{dot.style.visibility=dotsVisible?'visible':'hidden';});}},1000);} 35initializeClock();}); 36(function($){var currentCheckoutPlan=null;var paddleBillingInitialized=false;var urlCouponState={code:null,valid:false,discountId:null,type:null,amount:null,restrictTo:null};var billingZeroDecimalCurrencies={JPY:true,KRW:true,CLP:true};function getCookie(cname){var name=cname+'=';var decodedCookie=decodeURIComponent(document.cookie);var decodedArray=decodedCookie.split(name);if(decodedArray.length>1){return decodedArray[1].split(';')[0];} 37return null;} 38function getUrlCouponCode(){var params=new URLSearchParams(window.location.search);var code=params.get('coupon')||params.get('promo')||params.get('discount');return code?code.trim().toUpperCase():null;} 39function getIvyFormsPlans(){if(typeof tmsStoreConfig==='undefined'||!tmsStoreConfig||!tmsStoreConfig.plugins||!tmsStoreConfig.plugins.ivyforms){return[];} 40return tmsStoreConfig.plugins.ivyforms.plans||[];} 41function getPlanByName(planName){return getIvyFormsPlans().find(function(plan){return plan.name===planName;});} 42function getPlanFromElement($target){var planName=$target.attr('data-plan');if(planName){return getPlanByName(planName);} 43planName=$target.closest('.ivy-plan').find('.paddle-buy-now').attr('data-plan');return getPlanByName(planName);} 44function getPlanFromCheckoutTarget(event){return getPlanFromElement($(event.currentTarget));} 45function isPlanEligibleForUrlCoupon(plan){if(!urlCouponState.valid||!urlCouponState.discountId||!plan||!plan.priceId){return false;} 46var restrictTo=urlCouponState.restrictTo;if(!restrictTo||!restrictTo.length){return true;} 47if(restrictTo.indexOf(plan.priceId)!==-1){return true;} 48if(plan.productId&&restrictTo.indexOf(plan.productId)!==-1){return true;} 49return false;} 50function getEffectiveDiscountId(plan){if(isPlanEligibleForUrlCoupon(plan)){return urlCouponState.discountId;} 51return plan&&plan.discountId?plan.discountId:'';} 52function getDiscountIdFromElement($target,plan){var discountId=getEffectiveDiscountId(plan);if(!discountId&&$target&&$target.length){discountId=$target.attr('data-discount-id')||'';if(!discountId){discountId=$target.closest('.ivy-plan').find('.paddle-buy-now').attr('data-discount-id')||'';}} 53return discountId;} 54function resolveUrlCoupon(){var code=getUrlCouponCode();if(!code){return Promise.resolve(null);} 55if(typeof ivyPricingAjax==='undefined'||!ivyPricingAjax||!ivyPricingAjax.ajaxUrl){console.error('ivyPricingAjax is missing; cannot resolve URL coupon');return Promise.resolve(null);} 56var requestUrl=ivyPricingAjax.ajaxUrl 57+'?action='+encodeURIComponent(ivyPricingAjax.action||'ivy_resolve_paddle_discount') 58+'&code='+encodeURIComponent(code) 59+'&nonce='+encodeURIComponent(ivyPricingAjax.nonce||'');return fetch(requestUrl,{method:'GET',credentials:'same-origin',headers:{Accept:'application/json'}}).then(function(response){return response.json().then(function(payload){return{ok:response.ok,payload:payload};});}).then(function(result){var data=result.payload&&result.payload.data?result.payload.data:null;if(!result.ok||!result.payload||result.payload.success!==true||!data||!data.discountId){urlCouponState={code:code,valid:false,discountId:null,type:null,amount:null,restrictTo:null};return null;} 60var restrictTo=null;if(data.restrictTo!==undefined&&data.restrictTo!==null){if(!Array.isArray(data.restrictTo)){urlCouponState={code:code,valid:false,discountId:null,type:null,amount:null,restrictTo:null};return null;} 61restrictTo=data.restrictTo;} 62urlCouponState={code:data.code||code,valid:true,discountId:data.discountId,type:data.type||null,amount:data.amount||null,restrictTo:restrictTo};return urlCouponState;}).catch(function(error){console.error('Failed to resolve URL coupon',error);urlCouponState={code:code,valid:false,discountId:null,type:null,amount:null,restrictTo:null};return null;});} 63function updateDiscountBadgesForUrlCoupon(){if(!urlCouponState.valid){return;}
64getIvyFormsPlans().forEach(function(plan){if(!isPlanEligibleForUrlCoupon(plan)){return;} 65var $plan=$('.ivy-plan[data-plan="'+plan.name+'"]');var $badge=$plan.find('.discount-badge');if(urlCouponState.type!=='percentage'||!urlCouponState.amount){$badge.hide();return;} 66var percent=String(urlCouponState.amount).replace(/\.0+$/,'');var badgeText=percent+'% Off';if(!$badge.length){$badge=$('<span class="discount-badge discount-badge--url-coupon"></span>');$plan.prepend($badge);} 67$badge.addClass('discount-badge--url-coupon').show();var $badgeText=$badge.find('.discount-badge-new');if(!$badgeText.length){$badgeText=$('<span class="discount-badge-new"></span>');$badge.append($badgeText);} 68$badgeText.text(badgeText);});} 69function getPaddleBillingSettings(){return(typeof tmsStoreConfig!=='undefined'&&tmsStoreConfig&&tmsStoreConfig.billing)||{};} 70function getPaddleCheckoutSettings(){var billingSettings=getPaddleBillingSettings();return Object.assign({displayMode:'overlay',variant:'one-page'},billingSettings.checkout||{});} 71function getCheckoutSuccessUrl(){if(typeof tmsStoreConfig==='undefined'||!tmsStoreConfig||!tmsStoreConfig.storeUrl){return'';} 72return tmsStoreConfig.storeUrl+'/success/ivyforms?provider=paddle_billing';} 73function getUtmParams(){if(window.TmsUtmAttribution){return window.TmsUtmAttribution.get();} 74var utm={};var params=new URLSearchParams(window.location.search);['utm_source','utm_medium','utm_campaign','utm_content','utm_term'].forEach(function(key){var value=params.get(key);if(value){utm[key]=value;}});return utm;} 75function buildCheckoutCustomData(plan){return Object.assign({irClickId:getCookie('irclickid'),irpid:getCookie('irpid'),productSlug:'ivyforms',planName:plan.name,billingPriceId:plan.priceId,checkoutProvider:'paddle_billing'},getUtmParams());} 76function convertBillingAmountFromLowestUnit(amount,currencyCode){var numeric=parseFloat(String(amount||'0').replace(/[^\d.-]/g,''));if(isNaN(numeric)){return null;} 77if(billingZeroDecimalCurrencies[currencyCode]){return numeric;} 78return numeric/100;} 79function formatBillingDisplayPrice(amount,currencyCode,formattedFallback){var majorAmount=convertBillingAmountFromLowestUnit(amount,currencyCode);if(majorAmount===null||!currencyCode){return stripBillingPriceDecimals(formattedFallback);} 80if(typeof Intl!=='undefined'&&typeof Intl.NumberFormat==='function'){return new Intl.NumberFormat(navigator.language||'en-US',{style:'currency',currency:currencyCode,minimumFractionDigits:0,maximumFractionDigits:0}).format(Math.ceil(majorAmount));} 81return stripBillingPriceDecimals(formattedFallback);} 82function stripBillingPriceDecimals(formattedPrice){return String(formattedPrice||'').replace(/([.,])(\d{1,2})(?!\d)/,'').trim();} 83function getBillingPriceCurrencyCode(lineItem){var unitPrice=lineItem.price&&(lineItem.price.unitPrice||lineItem.price.unit_price);if(!unitPrice){return'';} 84return unitPrice.currencyCode||unitPrice.currency_code||'';} 85function hasBillingPreviewDiscount(totals,formattedTotals){var discount=totals.discount||formattedTotals.discount||'0';var numericDiscount=parseFloat(String(discount).replace(/[^0-9.-]/g,''));return!isNaN(numericDiscount)&&numericDiscount>0;} 86function getDiscountedBillingSubtotal(subtotal,discount){var numericSubtotal=parseInt(String(subtotal||'0').replace(/[^\d-]/g,''),10);var numericDiscount=parseInt(String(discount||'0').replace(/[^\d-]/g,''),10);if(isNaN(numericSubtotal)){return subtotal;} 87if(isNaN(numericDiscount)||numericDiscount<=0){return subtotal;} 88return String(Math.max(numericSubtotal-numericDiscount,0));} 89function renderBillingPricePreviews(){if(typeof Paddle==='undefined'||typeof Paddle.PricePreview!=='function'){return Promise.resolve();} 90var plans=getIvyFormsPlans();var previewGroups={};plans.forEach(function(plan){if(!plan.priceId){return;} 91var effectiveDiscountId=getEffectiveDiscountId(plan)||null;var groupKey=effectiveDiscountId||'base';if(!previewGroups[groupKey]){previewGroups[groupKey]={discountId:effectiveDiscountId,priceIds:[],priceIdMap:{}};} 92if(!previewGroups[groupKey].priceIdMap[plan.priceId]){previewGroups[groupKey].priceIdMap[plan.priceId]=true;previewGroups[groupKey].priceIds.push(plan.priceId);}});var groupKeys=Object.keys(previewGroups);if(!groupKeys.length){return Promise.resolve();} 93return Promise.all(groupKeys.map(function(groupKey){var group=previewGroups[groupKey];var request={items:group.priceIds.map(function(priceId){return{priceId:priceId,quantity:1};})};if(group.discountId){request.discountId=group.discountId;} 94return Paddle.PricePreview(request).then(function(result){var previewPrices={};var details=result&&result.data?result.data.details:null;var previewCurrencyCode=(result.data&&(result.data.currencyCode||result.data.currency_code))||'';var lineItems=details?(details.lineItems||details.line_items||[]):[];
94lineItems.forEach(function(item){var formattedTotals=item.formattedTotals||item.formatted_totals;var totals=item.totals||{};if(!item.price||!formattedTotals){return;} 95var currencyCode=previewCurrencyCode||getBillingPriceCurrencyCode(item);var originalAmount=totals.subtotal||totals.total;var discountAmount=totals.discount||formattedTotals.discount||'0';var currentAmount=getDiscountedBillingSubtotal(originalAmount,discountAmount);previewPrices[item.price.id]={originalAmount:originalAmount,currentAmount:currentAmount,originalFormatted:formattedTotals.subtotal||formattedTotals.total,currentFormatted:formattedTotals.subtotal||formattedTotals.total,currencyCode:currencyCode,hasDiscount:hasBillingPreviewDiscount(totals,formattedTotals)};});return{discountId:group.discountId,prices:previewPrices};});})).then(function(results){var previewPricesByGroup={};results.forEach(function(result){previewPricesByGroup[result.discountId||'base']=result.prices;});plans.forEach(function(plan){if(!plan.priceId){return;} 96var effectiveDiscountId=getEffectiveDiscountId(plan)||null;var previewPrices=previewPricesByGroup[effectiveDiscountId||'base']||{};var pricePreview=previewPrices[plan.priceId];if(!pricePreview){return;} 97var originalText=formatBillingDisplayPrice(pricePreview.originalAmount,pricePreview.currencyCode,pricePreview.originalFormatted);var currentText=formatBillingDisplayPrice(pricePreview.currentAmount,pricePreview.currencyCode,pricePreview.currentFormatted);var $original=$('.paddle-net[data-plan="'+plan.name+'"]');var $discounted=$('.paddle-discounted[data-plan="'+plan.name+'"]');if($original.length){$original.text(originalText);if(pricePreview.hasDiscount){$original.addClass('original-price').show();}else{$original.removeClass('original-price').hide();}} 98if($discounted.length){$discounted.text(currentText).show();} 99if($('.currency-only').length&&previewPricesByGroup[effectiveDiscountId||'base']){var currencyMatch=originalText.match(/^[^\d]+/)||currentText.match(/^[^\d]+/);if(currencyMatch){$('.currency-only').text(currencyMatch[0]+'0');}}});updateDiscountBadgesForUrlCoupon();});} 100function getBillingCheckoutTransactionId(data){return data.transaction_id||data.transactionId||data.id||(data.transaction&&data.transaction.id)||'';} 101function getBillingCheckoutEmail(data){return(data.customer&&data.customer.email)||data.customer_email||data.customerEmail||'';} 102function getBillingCheckoutCurrencyCode(data){if(!data){return'';} 103if(data.currency_code||data.currencyCode){return data.currency_code||data.currencyCode;} 104var totals=data.totals||{};if(totals.currency_code||totals.currencyCode){return totals.currency_code||totals.currencyCode;} 105var items=data.items||[];if(items.length&&items[0].price){var unitPrice=items[0].price.unitPrice||items[0].price.unit_price;if(unitPrice){return unitPrice.currencyCode||unitPrice.currency_code||'';}} 106return'';} 107function parseStrictFiniteNumber(value){if(value===undefined||value===null||value===''){return null;} 108if(typeof value==='number'){return Number.isFinite(value)?value:null;} 109var text=String(value).trim();if(!/^-?\d+(\.\d+)?$/.test(text)){return null;} 110var numeric=Number(text);return Number.isFinite(numeric)?numeric:null;} 111function getCheckoutAmountMajorUnits(primaryValue,fallbackLowestUnit,currencyCode){var primary=parseStrictFiniteNumber(primaryValue);if(primary!==null){return primary;} 112var fallback=parseStrictFiniteNumber(fallbackLowestUnit);if(fallback===null){return 0;} 113var converted=convertBillingAmountFromLowestUnit(fallback,currencyCode);return Number.isFinite(converted)?converted:0;} 114function getBillingEarningsEstimate(total,tax,currencyCode){var normalizedCurrency=(currencyCode||'USD').toUpperCase();var decimals=billingZeroDecimalCurrencies[normalizedCurrency]?0:2;var net=total-tax;if(!Number.isFinite(net)||net<=0){return(0).toFixed(decimals);} 115var earnings=normalizedCurrency==='USD'?(net*0.96)-0.4:(net*0.96);if(!Number.isFinite(earnings)||earnings<0){return(0).toFixed(decimals);} 116return earnings.toFixed(decimals);} 117async function sha256(email){var encoder=new TextEncoder();var data=encoder.encode(email);var hashBuffer=await crypto.subtle.digest('SHA-256',data);var hashArray=Array.from(new Uint8Array(hashBuffer));return hashArray.map(function(byte){return byte.toString(16).padStart(2,'0');}).join('');} 118async function pushBillingGTMEvent(data,plan){var totals=(data&&data.totals)||{};var currencyCode=(getBillingCheckoutCurrencyCode(data)||'USD').toUpperCase();var total=getCheckoutAmountMajorUnits(totals.total,totals.grand_total,currencyCode);var tax=getCheckoutAmountMajorUnits(totals.tax,totals.grand_total_tax,currencyCode);var earnings=getBillingEarningsEstimate(total,tax,currencyCode);var email=getBillingCheckoutEmail(data);var hashedEmail=email?await sha256(email):'';window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'checkoutSuccessIvyForms',product:{value:earnings,name:plan?plan.name:'IvyForms',url:document.URL}
118,sha256_email_address:hashedEmail});} 119function clearUtmAttribution(){if(window.TmsUtmAttribution){window.TmsUtmAttribution.clear();}} 120async function handlePaddleBillingEvent(event){if(!event||!event.name){return;} 121var data=event.data||{};if(event.name==='checkout.closed'){window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'checkoutCloseIvyForms'});} 122if(event.name==='checkout.completed'){var transactionId=getBillingCheckoutTransactionId(data);var email=getBillingCheckoutEmail(data);var successUrl=getCheckoutSuccessUrl();if(getPaddleBillingSettings().environment==='production'&¤tCheckoutPlan){try{await pushBillingGTMEvent(data,currentCheckoutPlan);}catch(e){}} 123clearUtmAttribution();if(!successUrl){console.error('Checkout success URL is missing');return;} 124window.location.replace(successUrl 125+(email?'&user='+encodeURIComponent(email):'') 126+(transactionId?'&order='+encodeURIComponent(transactionId):''));}} 127function openCheckout(event){event.preventDefault();var plan=getPlanFromCheckoutTarget(event);if(!plan||!plan.priceId){console.error('Paddle Billing price ID is missing for checkout target',event.currentTarget);return;} 128if(!paddleBillingInitialized){console.error('Paddle Billing is not initialized');return;} 129currentCheckoutPlan=plan;var checkoutOptions={items:[{priceId:plan.priceId,quantity:1}],customData:buildCheckoutCustomData(plan),settings:getPaddleCheckoutSettings()};var discountId=getDiscountIdFromElement($(event.currentTarget),plan);if(discountId){checkoutOptions.discountId=discountId;} 130Paddle.Checkout.open(checkoutOptions);} 131function initializePricingToggle(){var btnLifetime=document.getElementById('toggle-lifetime');var btnAnnual=document.getElementById('toggle-annual');var annualPlans=document.querySelector('.annual-plans');var lifetimePlans=document.querySelector('.lifetime-plans');if(!btnLifetime||!btnAnnual||!annualPlans||!lifetimePlans){return;} 132annualPlans.classList.remove('ivy-hidden');lifetimePlans.classList.add('ivy-hidden');btnAnnual.classList.add('active');btnLifetime.classList.remove('active');btnAnnual.addEventListener('click',function(){annualPlans.classList.remove('ivy-hidden');lifetimePlans.classList.add('ivy-hidden');btnAnnual.classList.add('active');btnLifetime.classList.remove('active');});btnLifetime.addEventListener('click',function(){annualPlans.classList.add('ivy-hidden');lifetimePlans.classList.remove('ivy-hidden');btnLifetime.classList.add('active');btnAnnual.classList.remove('active');});} 133function initializeFAQ(){var faqQuestions=document.querySelectorAll('.faq-question');document.querySelectorAll('.faq-answer').forEach(function(answer){answer.style.height='0px';answer.style.overflow='hidden';answer.style.transition='height 0.3s ease';});faqQuestions.forEach(function(question){question.addEventListener('click',function(){var faqItem=question.parentElement;var answer=faqItem.querySelector('.faq-answer');var isOpen=question.getAttribute('aria-expanded')==='true';faqQuestions.forEach(function(q){if(q!==question){var otherItem=q.parentElement;var otherAnswer=otherItem.querySelector('.faq-answer');q.setAttribute('aria-expanded','false');otherItem.classList.remove('active');otherAnswer.style.height='0px';}});question.setAttribute('aria-expanded',!isOpen);faqItem.classList.toggle('active');answer.style.height=!isOpen?answer.scrollHeight+'px':'0px';});});} 134function handleComingSoonToggle(){$('.coming-soon-toggle').each(function(){$(this).on('click',function(){var $button=$(this);var isExpanded=$button.attr('aria-expanded')==='true';var $content=$button.next('.coming-soon-content');if(window.innerWidth<=768){$button.attr('aria-expanded',!isExpanded);$button.toggleClass('active');if(isExpanded){$content.slideUp(300);}else{$content.slideDown(300);}}});});} 135function handleWindowResize(){if(window.innerWidth>768){$('.coming-soon-toggle').each(function(){var $button=$(this);var $content=$button.next('.coming-soon-content');$button.attr('aria-expanded','false');$button.removeClass('active');$content.slideDown(0);});}} 136function initializePaddleBilling(){if(typeof tmsStoreConfig==='undefined'||!tmsStoreConfig){console.error('tmsStoreConfig is missing');return;} 137if(typeof Paddle==='undefined'||typeof Paddle.Initialize!=='function'){console.error('Paddle Billing SDK is not loaded');return;} 138if(getPaddleBillingSettings().environment==='sandbox'){Paddle.Environment.set('sandbox');document.cookie='isSandbox=true';} 139var billingSettings=getPaddleBillingSettings();if(!billingSettings.clientToken){console.error('Paddle Billing client token is missing from tmsStoreConfig.billing.clientToken');return;} 140Paddle.Initialize({token:billingSettings.clientToken,eventCallback:handlePaddleBillingEvent,checkout:{settings:getPaddleCheckoutSettings()}});paddleBillingInitialized=true;} 141function initFeatureTooltips(){var $tooltips=$('.feature-tooltip');function closeAllTooltips(){$tooltips.removeClass('is-open');$tooltips.find('.feature-tooltip-trigger').attr('aria-expanded','false');} 142$tooltips.each(function(){var $tooltip=$(this);var $trigger=$tooltip.find('.feature-tooltip-trigger');$trigger.on('click',function(e){e.preventDefault();var isOpen=$tooltip.hasClass('is-open');closeAllTooltips();if(!isOpen){$tooltip.addClass('is-open');$trigger.attr('aria-expanded','true');}});});$(document).on('keydown',function(e){if(e.key!=='Escape'){return;} 143closeAllTooltips();$('.feature-tooltip-trigger:focus').blur();});} 144function attachCheckoutHandlers(){$('.paddle-buy-now').on('click',openCheckout);$('.pricing-paddle-price').css('cursor','pointer').on('click',openCheckout);} 145$(function(){initializePaddleBilling();initializePricingToggle();initializeFAQ();initFeatureTooltips();
145handleComingSoonToggle();$(window).on('resize',handleWindowResize);setTimeout(function(){resolveUrlCoupon().finally(function(){attachCheckoutHandlers();renderBillingPricePreviews().catch(function(error){console.error('Failed to render Paddle Billing price previews',error);});});},600);});})(jQuery); 146!function(){var e={6879:function(e){!function(t){var i=function(e,t,i){"use strict";var n,r;if(function(){var t,i={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in r=e.lazySizesConfig||e.lazysizesConfig||{},i)t in r||(r[t]=i[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:r,noSupport:!0};var a=t.documentElement,o=e.HTMLPictureElement,s="addEventListener",u="getAttribute",l=e[s].bind(e),c=e.setTimeout,d=e.requestAnimationFrame||c,f=e.requestIdleCallback,v=/^picture$/i,h=["load","error","lazyincluded","_lazyloaded"],y={},m=Array.prototype.forEach,g=function(e,t){return y[t]||(y[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),y[t].test(e[u]("class")||"")&&y[t]},p=function(e,t){g(e,t)||e.setAttribute("class",(e[u]("class")||"").trim()+" "+t)},b=function(e,t){var i;(i=g(e,t))&&e.setAttribute("class",(e[u]("class")||"").replace(i," "))},z=function(e,t,i){var n=i?s:"removeEventListener";i&&z(e,t),h.forEach(function(i){e[n](i,t)})},S=function(e,i,r,a,o){var s=t.createEvent("Event");return r||(r={}),r.instance=n,s.initEvent(i,!a,!o),s.detail=r,e.dispatchEvent(s),s},w=function(t,i){var n;!o&&(n=e.picturefill||r.pf)?(i&&i.src&&!t[u]("srcset")&&t.setAttribute("srcset",i.src),n({reevaluate:!0,elements:[t]})):i&&i.src&&(t.src=i.src)},A=function(e,t){return(getComputedStyle(e,null)||{})[t]},E=function(e,t,i){for(i=i||e.offsetWidth;i<r.minSize&&t&&!e._lazysizesWidth;)i=t.offsetWidth,t=t.parentNode;return i},k=(pe=[],be=[],ze=pe,Se=function(){var e=ze;for(ze=pe.length?be:pe,me=!0,ge=!1;e.length;)e.shift()();me=!1},we=function(e,i){me&&!i?e.apply(this,arguments):(ze.push(e),ge||(ge=!0,(t.hidden?c:d)(Se)))},we._lsFlush=Se,we),C=function(e,t){return t?function(){k(e)}:function(){var t=this,i=arguments;k(function(){e.apply(t,i)})}},R=function(e){var t,n=0,a=r.throttleDelay,o=r.ricTimeout,s=function(){t=!1,n=i.now(),e()},u=f&&o>49?function(){f(s,{timeout:o}),o!==r.ricTimeout&&(o=r.ricTimeout)}:C(function(){c(s)},!0);return function(e){var r;(e=!0===e)&&(o=33),t||(t=!0,(r=a-(i.now()-n))<0&&(r=0),e||r<9?u():c(u,r))}},L=function(e){var t,n,r=99,a=function(){t=null,e()},o=function(){var e=i.now()-n;e<r?c(o,r-e):(f||a)(a)};return function(){n=i.now(),t||(t=c(o,r))}},M=(Q=/^img$/i,J=/^iframe$/i,K="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),X=0,Y=0,Z=0,ee=-1,te=function(e){Z--,(!e||Z<0||!e.target)&&(Z=0)},ie=function(e){return null==H&&(H="hidden"==A(t.body,"visibility")),H||!("hidden"==A(e.parentNode,"visibility")&&"hidden"==A(e,"visibility"))},ne=function(e,i){var n,r=e,o=ie(e);for(U-=i,G+=i,q-=i,$+=i;o&&(r=r.offsetParent)&&r!=t.body&&r!=a;)(o=(A(r,"opacity")||1)>0)&&"visible"!=A(r,"overflow")&&(n=r.getBoundingClientRect(),o=$>n.left&&q<n.right&&G>n.top-1&&U<n.bottom+1);return o},re=function(){var e,i,o,s,l,c,d,f,v,h,y,m,g=n.elements;if((T=r.loadMode)&&Z<8&&(e=g.length)){for(i=0,ee++;i<e;i++)if(g[i]&&!g[i]._lazyRace)if(!K||n.prematureUnveil&&n.prematureUnveil(g[i]))fe(g[i]);else if((f=g[i][u]("data-expand"))&&(c=1*f)||(c=Y),h||(h=!r.expand||r.expand<1?a.clientHeight>500&&a.clientWidth>500?500:370:r.expand,n._defEx=h,y=h*r.expFactor,m=r.hFac,H=null,Y<y&&Z<1&&ee>2&&T>2&&!t.hidden?(Y=y,ee=0):Y=T>1&&ee>1&&Z<6?h:X),v!==c&&(j=innerWidth+c*m,B=innerHeight+c,d=-1*c,v=c),o=g[i].getBoundingClientRect(),(G=o.bottom)>=d&&(U=o.top)<=B&&($=o.right)>=d*m&&(q=o.left)<=j&&(G||$||q||U)&&(r.loadHidden||ie(g[i]))&&(D&&Z<3&&!f&&(T<3||ee<4)||ne(g[i],c))){if(fe(g[i]),l=!0,Z>9)break}else!l&&D&&!s&&Z<4&&ee<4&&T>
1462&&(I[0]||r.preloadAfterLoad)&&(I[0]||!f&&(G||$||q||U||"auto"!=g[i][u](r.sizesAttr)))&&(s=I[0]||g[i]);s&&!l&&fe(s)}},ae=R(re),oe=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(te(e),p(t,r.loadedClass),b(t,r.loadingClass),z(t,ue),S(t,"lazyloaded"))},se=C(oe),ue=function(e){se({target:e.target})},le=function(e,t){var i=e.getAttribute("data-load-mode")||r.iframeLoadMode;0==i?e.contentWindow.location.replace(t):1==i&&(e.src=t)},ce=function(e){var t,i=e[u](r.srcsetAttr);(t=r.customMedia[e[u]("data-media")||e[u]("media")])&&e.setAttribute("media",t),i&&e.setAttribute("srcset",i)},de=C(function(e,t,i,n,a){var o,s,l,d,f,h;(f=S(e,"lazybeforeunveil",t)).defaultPrevented||(n&&(i?p(e,r.autosizesClass):e.setAttribute("sizes",n)),s=e[u](r.srcsetAttr),o=e[u](r.srcAttr),a&&(d=(l=e.parentNode)&&v.test(l.nodeName||"")),h=t.firesLoad||"src"in e&&(s||o||d),f={target:e},p(e,r.loadingClass),h&&(clearTimeout(V),V=c(te,2500),z(e,ue,!0)),d&&m.call(l.getElementsByTagName("source"),ce),s?e.setAttribute("srcset",s):o&&!d&&(J.test(e.nodeName)?le(e,o):e.src=o),a&&(s||d)&&w(e,{src:o})),e._lazyRace&&delete e._lazyRace,b(e,r.lazyClass),k(function(){var t=e.complete&&e.naturalWidth>1;h&&!t||(t&&p(e,r.fastLoadedClass),oe(f),e._lazyCache=!0,c(function(){"_lazyCache"in e&&delete e._lazyCache},9)),"lazy"==e.loading&&Z--},!0)}),fe=function(e){if(!e._lazyRace){var t,i=Q.test(e.nodeName),n=i&&(e[u](r.sizesAttr)||e[u]("sizes")),a="auto"==n;(!a&&D||!i||!e[u]("src")&&!e.srcset||e.complete||g(e,r.errorClass)||!g(e,r.lazyClass))&&(t=S(e,"lazyunveilread").detail,a&&O.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,Z++,de(e,t,a,n,i))}},ve=L(function(){r.loadMode=3,ae()}),he=function(){3==r.loadMode&&(r.loadMode=2),ve()},ye=function(){D||(i.now()-_<999?c(ye,999):(D=!0,r.loadMode=3,ae(),l("scroll",he,!0)))},{_:function(){_=i.now(),n.elements=t.getElementsByClassName(r.lazyClass),I=t.getElementsByClassName(r.lazyClass+" "+r.preloadClass),l("scroll",ae,!0),l("resize",ae,!0),l("pageshow",function(e){if(e.persisted){var i=t.querySelectorAll("."+r.loadingClass);i.length&&i.forEach&&d(function(){i.forEach(function(e){e.complete&&fe(e)})})}}),e.MutationObserver?new MutationObserver(ae).observe(a,{childList:!0,subtree:!0,attributes:!0}):(a[s]("DOMNodeInserted",ae,!0),a[s]("DOMAttrModified",ae,!0),setInterval(ae,999)),l("hashchange",ae,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){t[s](e,ae,!0)}),/d$|^c/.test(t.readyState)?ye():(l("load",ye),t[s]("DOMContentLoaded",ae),c(ye,2e4)),n.elements.length?(re(),k._lsFlush()):ae()},checkElems:ae,unveil:fe,_aLSL:he}),O=(F=C(function(e,t,i,n){var r,a,o;if(e._lazysizesWidth=n,n+="px",e.setAttribute("sizes",n),v.test(t.nodeName||""))for(a=0,o=(r=t.getElementsByTagName("source")).length;a<o;a++)r[a].setAttribute("sizes",n);i.detail.dataAttr||w(e,i.detail)}),x=function(e,t,i){var n,r=e.parentNode;r&&(i=E(e,r,i),(n=S(e,"lazybeforesizes",{width:i,dataAttr:!!t})).defaultPrevented||(i=n.detail.width)&&i!==e._lazysizesWidth&&F(e,r,n,i))},W=L(function(){var e,t=P.length;if(t)for(e=0;e<t;e++)x(P[e])}),{_:function(){P=t.getElementsByClassName(r.autosizesClass),l("resize",W)},checkElems:W,updateElem:x}),N=function(){!N.i&&t.getElementsByClassName&&(N.i=!0,O._(),M._())};var P,F,x,W;var I,D,V,T,_,j,B,U,q,$,G,H,Q,J,K,X,Y,Z,ee,te,ie,ne,re,ae,oe,se,ue,le,ce,de,fe,ve,he,ye;var me,ge,pe,be,ze,Se,we;return c(function(){r.init&&N()}),n={cfg:r,autoSizer:O,loader:M,init:N,uP:w,aC:p,rC:b,hC:g,fire:S,gW:E,rAF:k}}(t,t.document,Date);t.lazySizes=i,e.exports&&(e.exports=i)}("undefined"!=typeof window?window:{})}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.cw=function(e){var t;return function(){if(e){var i=e;e=0,t={exports:{}},i.call(t.exports,t,t.exports)}return t.exports}},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.dn=function(e){var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},function(){"use strict";var e=i.cw(function(e,i){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,a,o,s=[],u=!0,l=!1;try{if(a=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=a.call(i)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}
146finally{try{if(!u&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}t();var u="smushcdn.com",l="data-original-sizes",c="data-srcset",d=["gif","jpg","jpeg","png","webp"],f="w",v=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.precision,n=void 0===i?0:i,r=t.skipAutoWidth,a=void 0!==r&&r,o=t.cdnBaseURL,s=void 0===o?"":o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.precision=parseInt(n,10),this.precision=isNaN(this.precision)?0:this.precision,this.skipAutoWidth=a,this.cdnBaseURL="string"==typeof s?s.trim():"",this.initEventListeners()},i=[{key:"initEventListeners",value:function(){var e=this;document.addEventListener("lazybeforesizes",function(i){var n;(0,t().G)(null===(n=i.detail)||void 0===n?void 0:n.instance)&&e.maybeAutoResize(i)})}},{key:"maybeAutoResize",value:function(e){var t,i,n,r=e.target,a=null===(t=e.detail)||void 0===t?void 0:t.width;if("IMG"===(null==r?void 0:r.nodeName)&&a)if(null===(i=e.detail)||void 0===i?void 0:i.dataAttr){if(this.isElementEligibleForResizing(r))if(this.shouldRevertToOriginalSizes(r,a))this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{var o=this.triggerEvent(r,"smush:beforeSizes",{resizeWidth:a});if(o.defaultPrevented)this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{a=(null===(n=o.detail)||void 0===n?void 0:n.resizeWidth)||a;var s=this.getDataSrc(r);this.isFromSmushCDN(s)&&(this.resizeImageWithCDN(r,a),this.isChildOfPicture(r)&&this.resizeSourceElements(r.parentNode.querySelectorAll("source"),a))}}}else this.getOriginalSizesAttr(r)||e.preventDefault()}},{key:"shouldAutoResize",value:function(e,t){var i=e.parentNode;if(i&&this.isInlineElement(i)){if("PICTURE"===i.nodeName)return!1;var n=i.clientWidth,r=e.offsetWidth;if(t===n&&n===r)return!1}return!0}},{key:"isInlineElement",value:function(e){if(!e||1!==e.nodeType)return!1;var t=window.getComputedStyle(e).display;return"inline"===t||"inline-block"===t}},{key:"isChildOfPicture",value:function(e){var t;return e&&"PICTURE"===(null==e||null===(t=e.parentNode)||void 0===t?void 0:t.nodeName)}},{key:"resizeSourceElements",value:function(e,t){var i=this;e&&null!=e&&e.length&&e.forEach(function(e){return i.resizeSourceElement(e,t)})}},{key:"resizeSourceElement",value:function(e,t){var i=e.getAttribute(c);if(i){var n=this.parseSrcSet(i);if(n&&n.length)if(1===n.length&&""===n[0].unit)this.resizeNonResponsiveSource(e,n[0].src,t);else{var r=this.getBaseSourceSrcForResize(n,t);this.isFromSmushCDN(r)&&this.updateSrcsetForResize(e,i,r,t,n)}}}},{key:"resizeNonResponsiveSource",value:function(e,t,i){if(this.isFromSmushCDN(t)&&this.isSourceActive(e)){var n=this.getResizedCDNURL(t,i),r=this.getPixelRatio();if(r>1){var a=Math.ceil(i*r),o=this.getResizedCDNURL(t,a)+" "+a+f;n+=" ".concat(i).concat(f,", ").concat(o)}this.updateElementSrcset(e,null,n)}}},{key:"isSourceActive",value:function(e){var t,i=e.getAttribute("media");return!(i&&(null===(t=window)||void 0===t||null===(t=t.matchMedia(i))||void 0===t||!t.matches))}},{key:"getBaseSourceSrcForResize",value:function(e,t){var i=e[0];return f!==i.unit?null:!this.isThumbnail(i.src)||i.value>=t?i.src:null}},{key:"isElementEligibleForResizing",value:function(e){var t=this.getOriginalSizesAttr(e),i=this.getDataSrc(e),n=this.getDataSrcSet(e);return Boolean(t&&i&&n)}},{key:"shouldRevertToOriginalSizes",value:function(e,t){if("auto"===this.getElementWidth(e))return this.shouldSkipAutoWidth();var i=this.getOriginalSizesAttr(e),n=this.getMaxWidthFromSizes(i);return!(!(n&&t>
146n)||this.isChildOfPicture(e))||!this.shouldAutoResize(e,t)}},{key:"triggerEvent",value:function(e,t){var i=new CustomEvent(t,{detail:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},bubbles:!(arguments.length>3&&void 0!==arguments[3])||arguments[3],cancelable:!(arguments.length>4&&void 0!==arguments[4])||arguments[4]});return e.dispatchEvent(i),i}},{key:"shouldSkipAutoWidth",value:function(){return this.skipAutoWidth}},{key:"resizeImageWithCDN",value:function(e,t){var i=this.getDataSrcSet(e),n=this.getDataSrc(e);if(i&&n){var r=this.parseSrcSet(i),a=this.getBaseImageSrcForResize(n,r,t);this.updateSrcsetForResize(e,i,a,t,r)}}},{key:"updateSrcsetForResize",value:function(e,t,i,n,r){var a=this.updateSrcsetWithTargetWidth(t,i,n,r);a=this.updateSrcsetWithRetinaWidth(a,i,n,r),this.updateElementSrcset(e,t,a)}},{key:"getBaseImageSrcForResize",value:function(e,t,i){if(!this.isThumbnail(e))return e;var n=t.find(function(e){return e.value>=i});return n?n.src:e}},{key:"isThumbnail",value:function(e){return new RegExp("(-\\d+x\\d+)\\.(".concat(d.join("|"),")(?:\\?.+)?$"),"i").test(e)}},{key:"updateSrcsetWithTargetWidth",value:function(e,t,i,n){return this.findSimilarSource(n,i)?e:e+", "+this.getResizedCDNURL(t,i)+" "+i+f}},{key:"updateSrcsetWithRetinaWidth",value:function(e,t,i,n){var r=this.getPixelRatio();if(r<=1)return e;var a=Math.ceil(i*r);return this.findSimilarSource(n,r,"x")||this.findSimilarSource(n,a,f)?e:e+", "+this.getResizedCDNURL(t,a)+" "+a+f}},{key:"updateElementSrcset",value:function(e,t,i){i!==t&&e.setAttribute("data-srcset",i)}},{key:"getPixelRatio",value:function(){return window.devicePixelRatio||1}},{key:"findSimilarSource",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.precision;return e.find(function(e){return n===e.unit&&e.value>=t&&i.isFuzzyMatch(e.value,t,r)})}},{key:"getResizedCDNURL",value:function(e,t){var i=this.parseURL(e);if(i){var n=new URLSearchParams(i.search);n.set("size","".concat(t,"x0"));var r=i.origin+i.pathname;return"".concat(r,"?").concat(n.toString())}}},{key:"parseURL",value:function(e){try{return new URL(e)}catch(e){return null}}},{key:"parseSrcSet",value:function(e){var t=this.extractSourcesFromSrcSet(e);return this.sortSources(t)}},{key:"extractSourcesFromSrcSet",value:function(e){return e.split(",").map(function(e){var t=r(e.trim().split(/\s+/),2),i=t[0],n=t[1],a=0,o="";return n&&(n.endsWith(f)?(a=parseInt(n,10),o=f):n.endsWith("x")&&(a=parseFloat(n),o="x")),{markup:e,src:i,value:a,unit:o}})}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.value===t.value?0:e.value>t.value?-1:1}),e}},{key:"revertToOriginalSizesIfNeeded",value:function(e){var t=this.getOriginalSizesAttr(e);return!!t&&(e.setAttribute("sizes",t),e.removeAttribute(l),!0)}},{key:"getElementWidth",value:function(e){var t,i=null===(t=e.style)||void 0===t?void 0:t.width;if(i&&"auto"===i.trim())return"auto";var n=window.getComputedStyle(e).width,r=parseInt(n,10);return isNaN(r)?n:r}},{key:"getMaxWidthFromSizes",value:function(e){var t=e.match(/\(max-width:\s*(\d+)px\)\s*100vw,\s*\1px/);return t?parseInt(t[1],10):0}},{key:"getOriginalSizesAttr",value:function(e){return e.getAttribute(l)}},{key:"getDataSrcSet",value:function(e){return e.getAttribute(c)}},{key:"getDataSrc",value:function(e){return e.getAttribute("data-src")}},{key:"isFromSmushCDN",value:function(e){if(!e||!this.cdnBaseURL)return!1;if(e.startsWith(this.cdnBaseURL))return!0;var t=this.parseURL(e);return!(null==t||!t.hostname)&&(t.hostname===u||t.hostname.endsWith(".".concat(u)))}},{key:"isFuzzyMatch",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.abs(e-t)<=i}}],i&&o(e.prototype,i),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,n}();!function(e,t){if(null===(e=window.smushLazyLoadOptions)||void 0===e?void 0:e.autoResizingEnabled){var i=(null===(t=window.smushLazyLoadOptions)||void 0===t?void 0:t.autoResizeOptions)||{};i=Object.assign({precision:5,skipAutoWidth:!0},i),new v(i)}}()}),t=i.cw(function(e,t){i.d(t,{G:function(){return n}}),a();var n=function(e){return e===u()()||JSON.stringify((null==e?void 0:e.cfg)||{})===JSON.stringify((null===u()()||void 0===u()()?void 0:u()().cfg)||{})};t.A=u()()}),n=i.cw(function(e,i){t(),document.addEventListener("lazybeforeunveil",function(e){var i;(0,t().G)(null==e||null===(i=e.detail)||void 0===i?void 0:i.instance)&&function(e){var t=e.getAttribute("data-bg-image")||e.getAttribute("data-bg"),i=e.hasAttribute("data-bg-image")?"background-image":"background";if(t){var n,r=e.getAttribute("style")||"",a="".concat(i,": ").concat(t,";"),o=new RegExp("".concat(i,"\\s*:\\s*[^;]+;?"));n=o.test(r)?r.replace(o,a):r.length>0?r.replace(/;$/g,"")+";"+a:a,e.setAttribute("style",n.trim())}}(e.target)})}),r=i.cw(function(e,i){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}var o,s,u,l,c,d,f;
146t(),s="smush-lazyload-video",u="smush-lazyloaded-video",l="smush-lazyload-autoplay",c="ontouchstart"in window?"touchstart":"pointerdown",d=Number(null===(o=window)||void 0===o?void 0:o.smush_video_render_delay)||0,f=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDelayVideoRenderingForMobile=this.supportsIntersectionObserver(),this.queuedVideoElements=[],this.isMobileOrSafari=null,this.init()},i=[{key:"init",value:function(){var e=this;document.addEventListener("lazybeforeunveil",function(t){return e.handleVideoLazyLoad(t)}),document.addEventListener(c,function(){return e.enableVideoRenderingForMobile()},{once:!0,passive:!0}),document.addEventListener("DOMContentLoaded",function(){d<=0?document.querySelector(".".concat(s,".").concat(l))&&e.enableVideoRenderingForMobile():setTimeout(function(){return e.enableVideoRenderingForMobile()},d)})}},{key:"handleVideoLazyLoad",value:function(e){var i,n=e.target;(0,t().G)(null==e||null===(i=e.detail)||void 0===i?void 0:i.instance)&&n.classList.contains(s)&&(this.handleButtonPlay(n),this.maybePrepareVideoForPlay(n))}},{key:"handleButtonPlay",value:function(e){var t=this,i=e.querySelector(".".concat("smush-play-btn"));if(i){var n=function(){return t.loadIframeVideoWithAutoPlay(e)};i.addEventListener("click",n),i.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n())})}else{var r;this.loadIframeVideo(e),null===(r=window.console)||void 0===r||r.warning("Missing play button [.smush-play-btn] for video element:",e)}}},{key:"maybePrepareVideoForPlay",value:function(e){var t=e.classList.contains(l);this.shouldPrepareIframeForPlay()?this.maybePrepareVideoForMobileAndSafari(e,t):t&&this.loadIframeVideoWithAutoPlay(e)}},{key:"enableVideoRenderingForMobile",value:function(){this.shouldDelayVideoRenderingForMobile&&(this.shouldDelayVideoRenderingForMobile=!1,this.maybeObserveQueuedVideoElements())}},{key:"supportsIntersectionObserver",value:function(){return"IntersectionObserver"in window}},{key:"maybeObserveQueuedVideoElements",value:function(){this.queuedVideoElements.length&&this.observeQueuedVideoElements()}},{key:"observeQueuedVideoElements",value:function(){var e=this,t=new IntersectionObserver(function(i){i.forEach(function(i){if(i.isIntersecting){var n=i.target;e.loadIframeVideo(n),t.unobserve(n)}})},{rootMargin:"0px 0px 200px 0px",threshold:.1});this.queuedVideoElements.forEach(function(e){t.observe(e)})}},{key:"maybePrepareVideoForMobileAndSafari",value:function(e,t){this.shouldDelayVideoRenderingForMobile?this.queuedVideoElements.push(e):this.loadIframeVideo(e,t)}},{key:"shouldPrepareIframeForPlay",value:function(){return null===this.isMobileOrSafari&&(this.isMobileOrSafari=this.checkIfMobileOrSafari()),this.isMobileOrSafari}},{key:"checkIfMobileOrSafari",value:function(){var e=navigator.userAgent;return e.includes("Mobi")||e.includes("Safari")&&!e.includes("Chrome")}},{key:"loadIframeVideo",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.classList.contains(u)){e.classList.add(u,"loading");var n=e.querySelector("iframe");if(n){var r=null===(t=n.dataset)||void 0===t?void 0:t.src;if(r){if(i){var a=new URL(r);a.searchParams.set("autoplay","1"),a.searchParams.set("playsinline","1"),r=a.toString()}var o=n.getAttribute("allow")||"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture";o.includes("autoplay")||(o+="; autoplay"),n.setAttribute("allow",o),n.setAttribute("allowFullscreen","true"),n.setAttribute("src",r),e.classList.remove("loading")}else{var s;null===(s=window.console)||void 0===s||s.error("Missing data-src attribute for iframe:",n)}}else{var l;null===(l=window.console)||void 0===l||l.error("Missing iframe element in video wrapper:",e)}}}},{key:"loadIframeVideoWithAutoPlay",value:function(e){this.loadIframeVideo(e,!0)}}],i&&r(e.prototype,i),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,n}(),new f}),a=function(){return i(6879)},o=window.lazySizesConfig||null;o&&delete window.lazySizesConfig;var s=function(){o?window.lazySizesConfig=o:"lazySizesConfig"in window&&delete window.lazySizesConfig};function u(){return u.c||(u.c=i.n(a()))}
146i.dn(s),t(),n(),r(),e(),t().A.init(),s()}()}(); 147document.addEventListener('DOMContentLoaded',function(){const liteButtons=document.querySelectorAll('.btn-lite');const popup=document.getElementById('lite-popup');const closeBtn=document.querySelector('.lite-popup-close');const overlay=document.querySelector('.lite-popup-overlay');if(liteButtons.length>0&&popup){function closePopup(){popup.style.display='none';document.body.classList.remove('lite-popup-open');} 148function openPopup(e){e.preventDefault();popup.style.display='block';document.body.classList.add('lite-popup-open');} 149liteButtons.forEach(function(btn){btn.addEventListener('click',openPopup);});if(closeBtn){closeBtn.addEventListener('click',closePopup);} 150if(overlay){overlay.addEventListener('click',closePopup);} 151document.addEventListener('keydown',function(e){if(e.keyCode===27&&popup.style.display==='block'){closePopup();}});}});
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.