!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Paddle=t():e.Paddle=t()}(self,(function(){return function(){"use strict";var e=function(e,t,a){function o(e,t){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"log",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];window.console=console||{log:function(){},error:function(){},warn:function(){}},window.console.debug=window.console.debug||window.console.log||function(){};var o="[Paddle Debug] "+e;s.debug&&("log"===t?console.debug(o):"warning"===t&&console.warn(o)),a&&console.warn(e)}}])&&n(t.prototype,a),o&&n(t,o),e}());function r(e){return(r="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})(e)}function l(e,t){for(var a=0;a-1||o.indexOf(a[i])>-1)return t;return e}function S(e){var t={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(e,a,o){t[a]=o})),t[e]?t[e].split("#")[0]:""}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o="";t.apple_pay_enabled=le()?"true":"false",t["paddlejs-version"]=i.libraryVersion,"popup"===a?(t.popup="true",t.paddle_js="true",t.is_popup="true",t.parentURL=window.location.href,t.parent_url=window.location.href):(delete t.popup,"fallback"===a&&(t.popup="true",t.paddle_js="true",t.popup_window="true",t.is_popup="true",s.sdk&&(t.display_mode="sdk"),t.parentURL=window.location.href,t.parent_url=window.location.href));var n=A();if(n&&(t.coupon=n),"true"===t.internal){var r=t.plan,l=t.vendor;delete t.internal,delete t.plan,delete t.vendor,o=Qe.defaults().internalCheckoutBase+r+"/"+l+"/?"+C(t)}else if(!N()||void 0!==t.override&&0!==t.override.length)if(void 0!==t.override&&""!==t.override&&null!=t.override){var c="";c=t.override.indexOf("?")<=-1?"/?":"&",o=t.override+c+C(t)}else o=Qe.defaults().checkoutBase+e+"/?"+C(t);else o="https://a.paddle.com/checkout/"+B()+"/?type=product&product_id="+e+"&"+C(t),void 0!==t.success&&""!==t.success&&(t.affiliate_success=_(t.success));return d.log("Built checkout URL: "+o),o}function E(e,t,a){var o;if(-1===a)o="expires=Thu, 01 Jan 1970 00:00:01 GMT";else{var i=new Date;i.setTime(i.getTime()+24*a*60*60*1e3),o="expires="+i.toUTCString()}return document.cookie=null!=a?e+"="+t+"; path=/; SameSite=Lax; "+o:e+"="+t+"; path=/; SameSite=Lax;",!0}function T(e){for(var t=e+"=",a=document.cookie.split(";"),o=0;o4&&void 0!==arguments[4]?arguments[4]:"Buy Now!",n=arguments.length>5?arguments[5]:void 0,d=arguments.length>6?arguments[6]:void 0,r=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",l=arguments.length>8?arguments[8]:void 0;window.UpsellPosition=-350;var c,p=document.getElementsByTagName("body")[0],u=document.createElement("div");u.setAttribute("id","paddle_upsell_"+e),u.setAttribute("class","paddle_upsell"),u.setAttribute("style",ue()),window.paddleSuccessCallback=window._activeCheckout.successCallback||null,window.paddleCloseCallback=window._activeCheckout.closeCallback||null,s.upsellCheckbox?(window.upsellType="Checkbox",c='
'):(window.upsellType="Button",c='"),u.innerHTML='
').concat(a,'
').concat(o,"
").concat(c,"
"),p.appendChild(u);var m=document.createElement("div");m.setAttribute("id","paddle_upsell_original"),m.setAttribute("class","paddle_upsell_original"),m.setAttribute("style","display:none;"),m.innerHTML='‹ Back to Original Checkout',m.onclick=function(){Q({}),n()},p.appendChild(m),z()}(e.upsell,a,o,i,n,(function(){te(e.product,e,!1)}),d,r,l)})),"sdk"===t?(e.display_mode="sdk",te(e.product,e,!1)):"overlay"===t?(e.display_mode="overlay",te(e.product,e,!1)):"inline"===t?(e.display_mode="inline",te(e.product,e,!0)):(e.display_mode="popup",o=e.product,n=e,void 0===window.PaddleWindow||window.PaddleWindow.closed||Q({}),delete window.PaddleWindow,window.PaddleWindow=window.open("","PaddlePopupWindow","width="+c.popupWindow.width+",height="+c.popupWindow.height+",location="+c.popupWindow.location+",menubar="+c.popupWindow.menubar+",resizable="+c.popupWindow.resizable+",scrollbars="+c.popupWindow.scrollbars+",status="+c.popupWindow.status+",toolbar="+c.popupWindow.toolbar+",top="+ee("top",c.popupWindow.width,c.popupWindow.height)+",left="+ee("left",c.popupWindow.width,c.popupWindow.height),!1),void 0!==window.PaddleWindow?(window.PaddleWindow.document.write("Loading Checkout..."+$(!0)),window.PaddleWindow.location.href=x(P(o,n,"fallback")),window.PaddleWindow.focus(),oe("PaddleWindow",!0),d.log("Successfully opened Paddle Checkout as a popup window.")):(d.log("Unable to load Paddle Checkout as a popup window (typically due to popup blocker), falling back to opening in the current page. Callbacks will not be called upon close and success.","warning"),window.location.href=x(P(o,n,"normal")))),m("Checkout.Open")}}])&&O(t.prototype,a),o&&O(t,o),e}());function M(e){H(e,"paddle-hidden"),q(e,"paddle-visible")}function I(e){H(e,"paddle-visible"),q(e,"paddle-hidden")}function j(e,t){for(var a=document.getElementsByClassName(e),o=0;o\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(t||void 0===t?"
":"
")+"$2")}function F(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function q(e,t){e.classList?e.classList.add(t):F(e,t)||(e.className+=" "+t)}function H(e,t){if(e.classList)e.classList.remove(t);else if(F(e,t)){var a=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(a," ")}}function U(e,t,a,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=""!==a.getAttribute(o)&&null!=a.getAttribute(o)?a.getAttribute(o):i;return n&&(e[t]=n),e}function V(e){var t={};if(t=U(t,"theme",e,"data-theme","green"),t=U(t,"product",e,"data-product"),t=U(t,"successCallback",e,"data-success-callback",null),t=U(t,"loadCallback",e,"data-load-callback",null),t=U(t,"closeCallback",e,"data-close-callback",null),t=U(t,"success",e,"data-success"),t=U(t,"price",e,"data-price",""),t=U(t,"auth",e,"data-auth",""),t=U(t,"trial_days",e,"data-trial-days",""),t=U(t,"trial_days_auth",e,"data-trial-days-auth",""),t=U(t,"checkout_version",e,"data-checkout-version",""),t=U(t,"display_mode_theme",e,"data-display-mode-theme",""),e.hasAttribute("data-marketing-consent")){var a="true"===e.getAttribute("data-marketing-consent")||"1"===e.getAttribute("data-marketing-consent");t.marketing_consent=a?"1":"0"}return t=U(t,"guest_email",e,"data-email",""),t=U(t,"guest_country",e,"data-country",""),t=U(t,"guest_postcode",e,"data-postcode",""),(t=U(t,"passthrough",e,"data-passthrough","")).passthrough&&(t.passthrough=decodeURIComponent(t.passthrough)),(t=U(t,"upsellPassthrough",e,"data-upsell-passthrough",!1)).upsellPassthrough&&(t.upsellPassthrough=decodeURIComponent(t.upsellPassthrough)),t=U(t,"coupon",e,"data-coupon",""),t=U(t,"locale",e,"data-locale",""),t=U(t,"quantity",e,"data-quantity",""),t=U(t,"custom_message",e,"data-message",""),t=U(t,"referring_domain",e,"data-referrer",""),t=U(t,"title",e,"data-title",""),t=U(t,"disable_logout",e,"data-disable-logout",""),t=U(t,"upsell",e,"data-upsell",""),t=U(t,"upsellText",e,"data-upsell-text",!1),t=U(t,"upsellTitle",e,"data-upsell-title",!1),t=U(t,"upsellAction",e,"data-upsell-action",!1),t=U(t,"upsellCoupon",e,"data-upsell-coupon",""),t=U(t,"isUpsell",e,"data-upsell-button",!1),"undefined"!==e.getAttribute("data-allow-quantity")&&null!==e.getAttribute("data-allow-quantity")&&(""===e.getAttribute("data-allow-quantity")||"false"!==e.getAttribute("data-allow-quantity")&&!1!==e.getAttribute("data-allow-quantity")&&"0"!==e.getAttribute("data-allow-quantity")?t.quantity_variable="1":t.quantity_variable="0"),t=U(t,"override",e,"data-override",""),t=U(t,"internal",e,"data-internal",""),t=U(t,"vendor",e,"data-vendor",""),t=U(t,"plan",e,"data-plan","")}function z(){X((function(){var e=0;j("paddle_button",(function(t){if("true"===t.getAttribute("data-init")){var a=t.cloneNode(!0);t.parentNode.replaceChild(a,t),t=a}var o=V(t);"none"!==o.theme&&function(e,t){"none"!==t&&(q(e,"paddle_styled_button"),"green"===t?q(e,"green"):"light"===t?q(e,"light"):"dark"===t&&q(e,"dark"))}(t,o.theme),t.setAttribute("data-init","true"),t.addEventListener("click",(function(e){e.preventDefault();var a=V(t);L.open(a)})),e++,o.override?d.log("Loaded and initiated checkout button for override URL: "+o.override+" (Paddle Button #"+e+")"):o.product?d.log("Loaded and initiated checkout button for product: "+o.product+" (Paddle Button #"+e+")"):d.log("Initiated a checkout button without an override URL or Product. (Paddle Button #"+e+")","warning")})),j("paddle-gross",(function(e){var t=e.getAttribute("data-product")||!1,a=e.getAttribute("data-quantity")||1;t||(t=e.parentNode.getAttribute("data-product")||!1),t&&me("gross",t,a,(function(t){e.innerHTML=t}))})),j("paddle-tax",(function(e){var t=e.getAttribute("data-product")||!1,a=e.getAttribute("data-quantity")||1;t||(t=e.parentNode.getAttribute("data-product")||!1),t&&me("tax",t,a,(function(t){e.innerHTML=t}))})),j("paddle-net",(function(e){var t=e.getAttribute("data-product")||!1,a=e.getAttribute("data-quantity")||1;t||(t=e.parentNode.getAttribute("data-product")||!1),t&&me("net",t,a,(function(t){e.innerHTML=t}))}))}))}function K(e){var t=arguments.length>2?arguments[2]:void 0;ge(t,"Download","download")}function Y(e){return void 0!==e&&""!==e&&"https://vendors.paddle.com/download/product/"+e}function G(e){void 0!==e&&""!==e?(d.log("Download started."),m("Download"),window.location=x(e)):d.log("Unable to start download, no URL specified.","warning")}var X=function(){var e,t,a={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},o={isReady:!1,readyWait:1,holdReady:function(e){e?o.readyWait++:o.ready(!0)},ready:function(t){if(!0===t&&!--o.readyWait||!0!==t&&!o.isReady){if(!document.body)return setTimeout(o.ready,1);if(o.isReady=!0,!0!==t&&--o.readyWait>0)return;e.resolveWith(document,[o])}},bindReady:function(){if(!e){if(e=o._Deferred(),"complete"===document.readyState)return setTimeout(o.ready,1);if(document.addEventListener)document.addEventListener("DOMContentLoaded",t,!1),window.addEventListener("load",o.ready,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",t),window.attachEvent("onload",o.ready);var a=!1;try{a=null==window.frameElement}catch(e){}document.documentElement.doScroll&&a&&i()}}},_Deferred:function(){var e,t,a,i=[],n={done:function(){if(!a){var t,d,r,l,s,c=arguments;for(e&&(s=e,e=0),t=0,d=c.length;t0&&void 0!==arguments[0]&&arguments[0];Z();var t=document.createElement("style");t.type="text/css",t.innerHTML="\t\t\t\t@-webkit-keyframes rotate {\t\t\t\t\t0% {\t\t\t\t\t\t-webkit-transform: rotate(45deg);\t\t\t\t\t}\t\t\t\t\t100% {\t\t\t\t\t\t-webkit-transform: rotate(405deg);\t\t\t\t\t}\t\t\t\t}\t\t\t\t@keyframes rotate {\t\t\t\t\tfrom {\t\t\t\t\t\ttransform: rotate(45deg);\t\t\t\t\t}\t\t\t\t\tto {\t\t\t\t\t\ttransform: rotate(405deg);\t\t\t\t\t}\t\t\t\t}",document.getElementsByTagName("head")[0].appendChild(t);var a=document.createElement("div");a.setAttribute("style","z-index:99998; display: block; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; right: 0px; bottom: 0px; margin: 0px; padding: 0px; background: rgba(0,0,0,0.38);"),a.setAttribute("class","paddle-loader");var o=document.createElement("main"),i="align-items: center;display: flex;flex-direction: column;justify-content: center;left: 50%;margin: 0.5rem 0;position: absolute;text-align: center;top: 50%;transform: translate(-50%, -50%);width: 90%;";o.setAttribute("style",i);var n=document.createElement("div"),d="border: 4px solid #f3f3f3;border-radius: 50%;border-top: 4px solid #ccc;width: 34px;height: 34px;-webkit-animation: rotate 1s ease-in-out infinite forwards;animation: rotate 1s ease-in-out infinite forwards;";if(n.setAttribute("style",d),o.appendChild(n),a.appendChild(o),e)return J(a);document.getElementsByTagName("body")[0].appendChild(a)}function Z(){j("paddle-loader",(function(e){e.parentNode.removeChild(e)}))}function ee(e,t,a){var o=void 0!==window.screenLeft?window.screenLeft:window.screen.left,i=void 0!==window.screenTop?window.screenTop:window.screen.top,n=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,d=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height;return"left"===e?n/2-t/2+o:"top"===e&&d/2-a/2+i}function te(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=s.sdk?P(e,t,"fallback"):P(e,t,"popup");if(a||$(),window.PaddleFrame=document.createElement("iframe"),window.PaddleFrame.id="pf_"+e,window.PaddleFrame.className="paddle-frame",window.PaddleFrame.frameborder="0",window.PaddleFrame.allowtransparency="true",a){window.PaddleFrame.classList.add("paddle-frame-inline");var i=document.createElement("style");i.type="text/css",i.innerHTML=".paddle-frame-inline::-webkit-scrollbar { display: none !important; }",document.getElementsByTagName("head")[0].appendChild(i)}else window.PaddleFrame.classList.add("paddle-frame-overlay");void 0!==t.frameStyle&&""!==t.frameStyle?window.PaddleFrame.setAttribute("style",t.frameStyle):b()?window.PaddleFrame.setAttribute("style","z-index: 99999; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: scroll; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"):window.PaddleFrame.setAttribute("style","z-index: 99999; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%;"),void 0!==t.frameInitialHeight&&window.PaddleFrame.setAttribute("height",t.frameInitialHeight),window.PaddleFrame.src=o,void 0!==t.frameTarget&&""!==t.frameTarget?document.getElementsByClassName(t.frameTarget)[0].appendChild(window.PaddleFrame):document.getElementsByTagName("body")[0].appendChild(window.PaddleFrame),Z()}function ae(){void 0!==window.PaddleCheckWindowClosure&&window.clearInterval(window.PaddleCheckWindowClosure)}function oe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&(window.clearInterval(window.PaddleCheckWindowClosure),delete window.PaddleCheckWindowClosure),void 0!==window[e]&&window[e].closed?(ae(),Q({})):void 0!==window[e]&&void 0===window.PaddleCheckWindowClosure&&(window.PaddleCheckWindowClosure=window.setInterval((function(){oe(e)}),500))}function ie(e,t,a){var o="_jsonp_"+Math.ceil(1e7*Math.random());e.match(/\?/)?e+="&callback="+o:e+="?callback="+o;var i=document.createElement("script");i.type="text/javascript",i.src=e,window[o]=function(n){d.log("Paddle API call finished ("+e+"), response: "+JSON.stringify(n)),t.call(a||window,n),document.getElementsByTagName("head")[0].removeChild(i),i=null,delete window[o]},document.getElementsByTagName("head")[0].appendChild(i)}function ne(e,t,a,o){if(!window.XMLHttpRequest)return!1;t=t||"GET",a=a||{},o=o||function(){};var i=new XMLHttpRequest;i.open(t,e,!0),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(e){if(i.readyState===XMLHttpRequest.DONE&&200===i.status)try{o(i.responseText)}catch(e){d.log("There was an error while executing a callback after an AJAX request","warning")}},i.send(JSON.stringify(a))}var de={};function re(e,t,a){void 0===de[e]||de[e].quantity!==t?ie(Qe.defaults().pricesApi+"?product_id="+e+"&quantity="+t,(function(t){de[e]={},de[e]=t,"function"==typeof a&&a(de[e])})):"function"==typeof a&&a(de[e])}function le(){var e,t=window.ApplePaySession;try{e=t&&t.canMakePayments()}catch(t){e=!1}return!!e}function se(e){return(se="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})(e)}function ce(){window.addEventListener("message",(function(e){var t,a,o;if((t=e.origin,/^https:\/\/[a-zA-Z0-9-_]+\.paddle\.(?:com|dev|local)$/g.test(t))&&"object"==se(e.data)){var i,n;if(i=void 0===e.data.callback_data?{}:e.data.callback_data,"close"===e.data.action?Q(i):"complete"===e.data.action&&function(e){var t=e;N()&&(m("Conversion",t.checkout.id),u()),"function"==typeof window[window._activeCheckout.successCallback]?(Q({},!1),t.checkoutCompleted&&delete t.checkoutCompleted,window[window._activeCheckout.successCallback](t)):"function"==typeof window._activeCheckout.successCallback?(Q({},!1),t.checkoutCompleted&&delete t.checkoutCompleted,window._activeCheckout.successCallback(t)):window._activeCheckout.success&&""!==window._activeCheckout.success?(Q({},!1),$(),setTimeout((function(){window.top.location.href=x(window._activeCheckout.success)}),2100)):e&&void 0!==e.checkout&&"undefined"!==e.checkout.redirect_url&&null!=e.checkout.redirect_url?(Q({}),$(),setTimeout((function(){window.top.location.href=x(e.checkout.redirect_url)}),2100)):s.completeDetails&&(Q({}),ye(t.checkout.id,'
Success! Your transaction has been completed!
Your order is now being processed and this page will update when processing is complete, an order confirmation email and receipt will be sent to the email address used during purchase.
You can close this page at any time, processing will continue in the background and your order confirmation will be emailed to you.
'))}(i),"event"===e.data.action||"close"===e.data.action||"complete"===e.data.action)if("event"===e.data.action){if("Checkout.Ping.Size"!==e.data.event_name)pe({event:e.data.event_name,eventData:i,checkoutData:window._activeCheckout,campaignData:w()})}else"close"===e.data.action?n="Checkout.Close":"complete"===e.data.action&&(n="Checkout.Complete"),pe({event:n,eventData:i,checkoutData:window._activeCheckout,campaignData:w()});if("event"===e.data.action&&e&&e.data&&e.data.event_name)if(d.log("Checkout fired message: "+e.data.event_name),"Checkout.Loaded"===e.data.event_name)void 0!==window._activeCheckout&&"inline"!==window._activeCheckout.method&&(b()&&function(e){var t,a,o=Array.prototype.slice.call(arguments,1);"string"==typeof o[0]&&(t=o[0],o.splice(0,1));"function"==typeof o[0]&&(a=o[0]);Me=qe(),Le=Ve(),t&&(Ke(t),He({x:0,y:0}));1===e&&(e=1.002);var i=document.getElementById(Ie);i||((i=document.createElement("meta")).id=Ie,i.name="viewport",document.head.appendChild(i));var n="Android"===ze()&&y();i.setAttribute("content",["user-scalable=yes","initial-scale="+e,"minimum-scale="+e,"maximum-scale="+(e+.004),n?"width=device-width":null].filter(Boolean).join(",")),a&&setTimeout(a,Re)}(1,"pf_"+window._activeCheckout.product),Z(),(void 0!==window._activeCheckout&&void 0===window._activeCheckout.isUpsell||"true"!==window._activeCheckout.isUpsell)&&window._activeCheckout.upsell&&(a=window._activeCheckout.upsell,(o=document.getElementById("paddle_upsell_"+a))&&o.setAttribute("style",ue("calc(50% + 245px)")))),"undefined"!==window._activeCheckout&&("function"==typeof window._activeCheckout.loadCallback?window._activeCheckout.loadCallback():"function"==typeof window[window._activeCheckout.loadCallback]&&window[window._activeCheckout.loadCallback]());else if("Checkout.Ping.Size"===e.data.event_name&&e.data.callback_data&&""!==e.data.callback_data.height&&void 0!==window._activeCheckout.frameTarget){var r=document.getElementsByClassName(window._activeCheckout.frameTarget)[0].getElementsByTagName("iframe");if(r.length>0){var l=parseInt(e.data.callback_data.height)+45;r[0].setAttribute("height",l)}}}}),!1)}function pe(e){"function"==typeof s.eventCallback&&s.eventCallback(e)}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"-300px";return"position: fixed; z-index: 999999; top: 140px; left: "+e+"; background: #FFFFFF; padding: 17px; border-radius: 3px; width: 265px; box-shadow: 0px 1px 4px 1px rgba(0,0,0,0.13); box-sizing: content-box;"}function me(e,t,a,o){var i=a;(void 0===a||a<=0)&&(i=1),re(t,i,(function(t){void 0!==o&&(void 0!==t.price?o("gross"===e?t.price.gross||!1:"tax"===e?t.price.tax||!1:"net"===e?t.price.net||!1:"tax_included"===e&&t.price.tax_included||!1):o(!1))}))}function fe(e,t,a){var o=a,i=t;"function"==typeof t&&(o=t,i=1),re(e,i,(function(e){void 0!==o&&"function"==typeof o&&o(e)}))}function ge(e,t,a){if(a=a||"popup","Manual"===(t=t||"Manual")||"Download"===t||"Order"===t||De()){d.log("Popup triggered. (Method: "+t+" | Type: "+a+")");var o=document.getElementsByClassName("paddle-popup-instance_"+e)[0]||!1;o?("Manual"!==t&&"Download"!==t&&"Order"!==t&&Te(),M(o)):d.log("Popup trigger ignored, user has seen a popup recently.","warning")}}function he(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"popup",a=document.getElementsByClassName("paddle-popup-instance_"+e)[0]||!1,o=document.getElementsByClassName("paddle-popup-instance_"+e)[0].getElementsByClassName("paddle-popup")[0]||!1;a&&o&&(d.log("Popup dismissed. (Type: "+t+")"),q(o,"paddle-fadeOutUpBig"),q(a,"paddle-fadeOut"),setTimeout((function(){H(a,"paddle-fadeOut"),H(o,"paddle-fadeOutUpBig"),I(a)}),600))}var ve=[],we=[];function ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Fetching Order Details...",a="_"+Math.ceil(1e7*Math.random()),o='
';o+='
',o+='',o+="
",o+='
',o+='
',o+='
',o+='
'+t+"
",o+="
",o+='
',o+="Your receipt and purchase information have been sent to the email address used during purchase.",o+="
",o+='
',o+="Order orderDetails go here...",o+="
",o+="
",o+="
",X((function(){var t=document.getElementsByTagName("body")[0],i=document.createElement("div");i.setAttribute("class","paddle-reset paddle-popup-container paddle-popup-instance_"+a+" paddle-animated paddle-fadeIn paddle-hidden"),i.innerHTML=o,t.appendChild(i),document.getElementsByClassName("paddle-popup-instance_"+a)[0].getElementsByClassName("paddle-popup-close-image")[0].onclick=function(e){e.preventDefault(),he(a,"order")},ge(a,"Order","order"),be(e,(function(t){if(t)if("processed"===t.state){var o='
';o+='
',o+='
',o+='',o+="
",o+='
',o+=t.checkout.title,o+="
",o+='
',o+="
",o+='
',o+='
',o+="Order #"+t.order.order_id,o+="
",o+='
',o+=t.order.formatted_total,o+="
",o+='
',o+='View Receipt',o+="
",o+='
',o+="
",t.order.has_locker?(o+='
',t.lockers.length>1?(o+='
',o+="Thanks for your purchase!

",o+="We've emailed your receipt and orderDetails of how to access your products to "+t.order.customer.email+".",o+="
"):t.lockers.forEach((function(e){o+='
',void 0!==e.download&&""!==e.download&&(o+='
',o+='Download',o+="
"),void 0!==e.license_code&&""!==e.license_code&&(o+='
',o+='
',o+='
License Code
',o+='
',o+="
",o+='
',o+='
'+e.license_code+"
",o+="
",o+="
"),void 0!==e.instructions&&""!==e.instructions&&(e.instructions=e.instructions.replace(/\\"/g,'"').trim(),o+='
',o+='
',o+='
Instructions & Information
',o+='
',o+="
",o+='
',o+=R(e.instructions),o+="
",o+="
"),o+="
"})),o+="
"):(o+='
',o+="We've emailed orderDetails of how to access your purchases, as well as the information above to "+t.order.customer.email+".",o+="
"),o+='
',o+='Something wrong? Contact Support',o+='
We\'ve also emailed the above information to: '+t.order.customer.email+"
",o+="
";var i=document.getElementsByClassName("paddle-popup-order_"+a)[0];i.innerHTML=o,I(document.getElementsByClassName("paddle-popup-order-loading_"+a)[0]),M(i)}else I(document.getElementsByClassName("paddle-popup-order-loading_"+a)[0]),M(document.getElementsByClassName("paddle-popup-order-error_"+a)[0]);else I(document.getElementsByClassName("paddle-popup-order-loading_"+a)[0]),M(document.getElementsByClassName("paddle-popup-order-error_"+a)[0])}),!1)}))}function be(e,t){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];we[e]=void 0!==we[e]&&we[e],we[e]?d.log("Call to Order.details() rejected as a call is already in progress.","error",!0):(a&&$(),ke(e,(function(e){a&&Z(),"function"==typeof t?(d.log("Order orderDetails API response successfully passed to callback: "+t),t(e)):d.log("No callback specified for Order Data success.","warning",!0)})))}function ke(e,t){we[e]=!0,ie(Qe.defaults().orderApi+"?checkout_id="+e,(function(a){void 0===a.success||a.success?"processed"!==a.state?(ve[e]=void 0!==ve[e]?ve[e]:0,ve[e]<=10?(ve[e]++,setTimeout((function(){ke(e,t)}),600)):(we[e]=!1,Z(),d.log("Order stopped polling as maximum attempts of 10 reached.","error",!0),"function"==typeof t?t(!1):alert("Your order has been completed, please check your email for further information."))):(we[e]=!1,d.log("Order orderDetails retrieved successfully from Paddle API."),"function"==typeof t?t(a):d.log("Callback passed to orderDetails() is not a function.","warning")):(we[e]=!1,Z(),d.log(a.error.message,"error",!0),"function"==typeof t?t(!1):alert("Sorry, there was an error retrieving the requested order orderDetails."))}))}var _e="",Ce=!1,Ae="";function xe(e){return Se(Ae,e)}function Se(e,t){return e.replace(//,t)}function Pe(){var e=document.querySelectorAll(".paddle-popup");if(e.length>0)for(var t=e.length-1;t>=0;t--){var a=e[t];a.removeAttribute("aria-busy");var o=a.querySelector(".paddle-popup-checkbox");if(o){var i=o.querySelector(".paddle-popup-checkbox-label"),n=i.getAttribute("data-vendor-name");o.removeAttribute("style"),i.innerHTML=xe(n)}}}var Ee=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;function Te(){E(c.popupCookie,"1",6)}function De(){var e=T(c.popupCookie);return!(e&&"1"===e)}function Ne(e){var t=(e=e||{}).vendorName||"",a=!!e.vendorName,o="_"+Math.ceil(1e7*Math.random()),n={vendorName:t,isGdprEnabled:a,marketingConsentMessage:"",triggers:{exitIntent:void 0===(e.triggers||{}).exitIntent||e.triggers.exitIntent,scrollDepth:void 0!==(e.triggers||{}).scrollDepth&&e.triggers.scrollDepth,timed:void 0!==(e.triggers||{}).timed&&e.triggers.timed},allowDismiss:void 0===e.allowDismiss||e.allowDismiss,dismissColor:void 0!==e.dismissColor?e.dismissColor:"dark",strings:{heading:void 0!==(e.strings||{}).heading?e.strings.heading:"Subscribe for updates!",subHeading:void 0!==(e.strings||{}).subHeading?e.strings.subHeading:"Subscribe to our email newsletter, and stay updated with our latest products, developments and offers.",emailPlaceholder:void 0!==(e.strings||{}).emailPlaceholder?e.strings.emailPlaceholder:"Email Address...",cta:void 0!==(e.strings||{}).cta?e.strings.cta:"Subscribe!",successMessage:void 0!==(e.strings||{}).successMessage?e.strings.successMessage:"Success! You are now subscribed!"},view:{animations:{show:void 0!==((e.view||{}).animations||{}).show?e.view.animations.show:"bounceIn",hide:void 0!==((e.view||{}).animations||{}).hide?e.view.animations.hide:"fadeOutUpBig"},styles:{heading:{textColor:void 0!==(((e.view||{}).styles||{}).heading||{}).textColor?e.view.styles.heading.textColor:"#000000"},subHeading:{textColor:void 0!==(((e.view||{}).styles||{}).subHeading||{}).textColor?e.view.styles.subHeading.textColor:"#666666"},popup:{backgroundColor:void 0!==(((e.view||{}).styles||{}).popup||{}).backgroundColor?e.view.styles.popup.backgroundColor:"#FFFFFF",backgroundImage:void 0!==(((e.view||{}).styles||{}).popup||{}).backgroundImage&&e.view.styles.popup.backgroundImage,backgroundSize:void 0!==(((e.view||{}).styles||{}).popup||{}).backgroundSize&&e.view.styles.popup.backgroundSize,backgroundPosition:void 0!==(((e.view||{}).styles||{}).popup||{}).backgroundPosition&&e.view.styles.popup.backgroundPosition,backgroundRepeat:void 0!==(((e.view||{}).styles||{}).popup||{}).backgroundRepeat&&e.view.styles.popup.backgroundRepeat},cta:{backgroundColor:void 0!==(((e.view||{}).styles||{}).cta||{}).backgroundColor?e.view.styles.cta.backgroundColor:"#4CAF50",textColor:void 0!==(((e.view||{}).styles||{}).cta||{}).textColor?e.view.styles.cta.textColor:"#FFFFFF"}}},callback:void 0!==e.callback&&e.callback};return X((function(){var e=document.getElementsByTagName("body")[0],t=document.createElement("div");t.setAttribute("class","paddle-reset paddle-popup-container paddle-popup-instance_"+o+" paddle-animated paddle-fadeIn paddle-hidden"),t.innerHTML=function(e,t){var a='
';t.allowDismiss&&(a+='
',a+='',a+="
");var o="";return t.view.styles.popup.backgroundImage&&(o+="background-image: url('"+t.view.styles.popup.backgroundImage+"');",t.view.styles.popup.backgroundSize&&(o+="background-size: "+t.view.styles.popup.backgroundSize+";"),t.view.styles.popup.backgroundPosition&&(o+="background-position: "+t.view.styles.popup.backgroundPosition+";"),t.view.styles.popup.backgroundRepeat&&(o+="background-repeat: "+t.view.styles.popup.backgroundRepeat+";")),a+='
',t.strings.heading&&(a+='
'+t.strings.heading+"
"),t.strings.subHeading&&(a+='
'+t.strings.subHeading+"
"),a+='
',a+='',t.isGdprEnabled&&(a+='"),a+='',a+="
",a+="
",a+"
"}(o,n),e.appendChild(t),Ce||Ae||(Ce=!0,ne(Qe.defaults().consentMessageTranslationAPI,"GET",{},(function(e){try{var t=JSON.parse(e).data||{};Ae=t.message||"",_e=t.base||"",Ce=!1,Pe()}catch(e){d.log("There has been an error when fetching the translated consent message: "+e.message)}})));var a=document.getElementsByClassName("paddle-popup-instance_"+o)[0],r=a.getElementsByClassName("paddle-popup-checkbox-input")[0],l=a.getElementsByClassName("paddle-popup-checkbox-label")[0];if(n.isGdprEnabled&&(r.onchange=function(){r.checked&&(l.style.color="#666666")}),Pe(),a.getElementsByClassName("paddle-popup-close-image")[0].onclick=function(e){e.preventDefault(),he(o,"audience")},a.getElementsByClassName("paddle-popup-form")[0].onsubmit=function(e){e.preventDefault(),!n.isGdprEnabled||r.checked?function(e,t){d.log("Audience popup submitted.");var a=function(e){var t=document.getElementsByClassName("paddle-popup-instance_"+e)[0].getElementsByClassName("paddle-popup-email")[0]||!1;return!!t&&t.value}(e),o=t.callback||function(){},i="";try{i=t.strings.successMessage}catch(e){d.log("The success message attribute is not valid")}var n={marketing_consent:0,email:a,consent_collected_by:"vendor"};t.isGdprEnabled&&t.vendorName&&(n.marketing_consent=1,n.consent_collected_by="paddle",n.marketing_consent_message_base=function(e){return Se(_e,e)}(t.vendorName),n.marketing_consent_message_localised=xe(t.vendorName));"string"==typeof a&&a.match(Ee)?($(),Be(n,(function(t){Z(),t.success?("function"==typeof o&&o(t),i&&alert(i),he(e,"audience")):("function"==typeof o&&o(t),alert("Error: "+t.error))}))):alert("Please enter a valid email address.")}(o,n):l.style.color="red"},n.triggers.exitIntent){var s=0,c=document;y()&&(s=30,c=e);d.log("Exit-intent audience popup enabled, will pop upon users moust entering browser address bar/tabs."),c.addEventListener("mouseleave",(function(e){e.clientY<=s&&ge(o,"ExitIntent","audience")}))}!1!==n.triggers.scrollDepth&&(!0===n.triggers.scrollDepth?d.log("Scroll-depth audience popup enabled, will pop with any scroll activity."):d.log("Scroll-depth audience popup enabled, will pop after scrolling "+n.triggers.scrollDepth+"px."),i.AudienceHasPopped=!1,i.AudienceLoadScrollDepth=window.scrollY,i.AudienceLoadScrollDepth<=100&&(window.onscroll=function(e){clearTimeout(i.AudienceCheckScrollDepth),window.checkScrollDepth=setTimeout((function(){window.scrollY>=n.triggers.scrollDepth&&(i.AudienceHasPopped||(i.AudienceHasPopped=!0,ge(o,"ScrollDepth","audience")))}),300)})),n.triggers.timed&&(d.log("Timed audience popup enabled, popping in "+n.triggers.timed+" seconds."),setTimeout((function(){ge(o,"Timed","audience")}),1e3*n.triggers.timed))})),o}function Be(e,t){d.log("Audience subscription API triggered.");var a=Qe.defaults().audienceApi.replace("{vendor_id}",s.vendor);if(!e.email)return!1;e.source="Import",e.medium="Paddle.js",ne(a,"POST",e,(function(a){if(void 0!==(a=JSON.parse(a)).success&&!1===a.success){var o={success:!1,error:a.error.message};"function"==typeof t?t(o):"function"==typeof window[t]?window[t](o):alert(a.error.message)}else if(a.user_id){m("Audience.Subscribe");var i={success:!0,email:e.email,user_id:a.user_id};"function"==typeof t?t(i):"function"==typeof window[t]?window[t](i):alert("You've been subscribed successfully!")}}))}function We(e,t,a){void 0===a&&"function"==typeof t&&(a=t,t=!0),Be({marketing_consent:t?1:0,email:e},a)}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2?arguments[2]:void 0;if(""!==e){var o="";t&&(o="&product_id="+t),ie(Qe.defaults().userHistoryApi+"?email="+encodeURIComponent(e)+"&vendor_id="+s.vendor+o,(function(e){"function"==typeof a?a(e):alert(e.message)}))}else"function"==typeof a?a({success:!1,error:{code:107,message:"A valid email address is required, please try again"}}):alert("You must enter a valid email address.")}var Le,Me,Ie="__mobileViewportControl_hook__",je="__mobileViewPortControl_style__",Re=200,Fe=["mvc__a","mvc__lot","mvc__of","mvc__classes","mvc__to","mvc__increase","mvc__the","mvc__odds","mvc__of","mvc__winning","mvc__specificity"];function qe(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}}function He(e){window.scrollTo?window.scrollTo(e.left,e.top):(document.documentElement.scrollTop=e.top,document.documentElement.scrollLeft=e.left,document.body.scrollTop=e.top,document.body.scrollLeft=e.left)}function Ue(){var e,t,a,o=(e=window.orientation,t=document.documentElement.clientWidth,a=document.documentElement.clientHeight,void 0===e?t>a?"landscape":"portrait":e%180==0?"portrait":"landscape"),i=window.screen.width,n=window.screen.height;return"portrait"===o?Math.min(i,n):Math.max(i,n)}function Ve(){var e=window.innerWidth;return Ue()/e}function ze(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPad/i)||e.match(/iPhone/i)||e.match(/iPod/i)?"iOS":e.match(/Android/i)?"Android":void 0}function Ke(e){var t=Fe.join(" ");document.documentElement.className+=" "+t;var a=document.createElement("style");a.id=je,a.type="text/css",a.appendChild(document.createTextNode(function(e){var t=Fe.join(".");return["html."+t+",","html."+t+" > body {"," background: #fff;"," width: auto;"," min-width: inherit;"," max-width: inherit;"," height: auto;"," min-height: 100%;"," max-height: inherit;"," margin: 0;"," padding: 0;"," border: 0;","}","html."+t+" > body > * {"," display: none !important;","}","html."+t+" > body > #"+e+" {"," display: block !important;","}"].join("\n")}(e))),document.head.appendChild(a)}function Ye(e,t,a){e.setAttribute("content",["initial-scale="+Le,"minimum-scale="+Le,"maximum-scale="+Le].join(",")),e.setAttribute("content",["user-scalable="+t["user-scalable"],"minimum-scale="+t["minimum-scale"],"maximum-scale="+t["maximum-scale"],t.width?"width="+t.width:null].filter(Boolean).join(",")),document.head.removeChild(e),He(Me),setTimeout((function(){a&&a()}),Re)}function Ge(e,t,a){e.setAttribute("content",["initial-scale="+Le,"minimum-scale="+Le,"maximum-scale="+Le].join(",")),He(Me),setTimeout((function(){e.setAttribute("content",["user-scalable="+t["user-scalable"],"minimum-scale="+t["minimum-scale"],"maximum-scale="+t["maximum-scale"],t.width?"width="+t.width:null].filter(Boolean).join(",")),He(Me),document.head.removeChild(e),a&&a()}),Re)}function Xe(e,t,a){e.setAttribute("content",["user-scalable="+t["user-scalable"],"initial-scale="+t["initial-scale"],"minimum-scale="+t["minimum-scale"],"maximum-scale="+t["maximum-scale"],t.width?"width="+t.width:null].filter(Boolean).join(",")),He(Me),setTimeout((function(){document.head.removeChild(e),a&&a()}),Re)}function Je(e,t){for(var a=0;a>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(a=t),o=0;o