(()=>{var t={46161(t){class e{static getAvatarUrl(t,a=96,r=404){return`https://secure.gravatar.com/avatar/${e.md5(t.toLowerCase().trim())}?size=${a}&default=${encodeURIComponent(r)}`}static md5(t){const e="0123456789abcdef";function a(t){let a="";for(let r=0;r<=3;r++)a+=e.charAt(t>>8*r+4&15)+e.charAt(t>>8*r&15);return a}function r(t,e){const a=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(a>>16)<<16|65535&a}function n(t,e,a,n,i,o){return r((s=r(r(e,t),r(n,o)))<<(l=i)|s>>>32-l,a);var s,l}function i(t,e,a,r,i,o,s){return n(e&a|~e&r,t,e,i,o,s)}function o(t,e,a,r,i,o,s){return n(e&r|a&~r,t,e,i,o,s)}function s(t,e,a,r,i,o,s){return n(e^a^r,t,e,i,o,s)}function l(t,e,a,r,i,o,s){return n(a^(e|~r),t,e,i,o,s)}const c=function(t){let e;const a=1+(t.length+8>>6),r=Array.from(16*a);for(e=0;e<16*a;e++)r[e]=0;for(e=0;e<t.length;e++)r[e>>2]|=t.charCodeAt(e)<<e%4*8;return r[e>>2]|=128<<e%4*8,r[16*a-2]=8*t.length,r}(t);let d,h,m,u,g,v=1732584193,p=-271733879,f=-1732584194,w=271733878;for(d=0;d<c.length;d+=16)h=v,m=p,u=f,g=w,v=i(v,p,f,w,c[d+0],7,-680876936),w=i(w,v,p,f,c[d+1],12,-389564586),f=i(f,w,v,p,c[d+2],17,606105819),p=i(p,f,w,v,c[d+3],22,-1044525330),v=i(v,p,f,w,c[d+4],7,-176418897),w=i(w,v,p,f,c[d+5],12,1200080426),f=i(f,w,v,p,c[d+6],17,-1473231341),p=i(p,f,w,v,c[d+7],22,-45705983),v=i(v,p,f,w,c[d+8],7,1770035416),w=i(w,v,p,f,c[d+9],12,-1958414417),f=i(f,w,v,p,c[d+10],17,-42063),p=i(p,f,w,v,c[d+11],22,-1990404162),v=i(v,p,f,w,c[d+12],7,1804603682),w=i(w,v,p,f,c[d+13],12,-40341101),f=i(f,w,v,p,c[d+14],17,-1502002290),p=i(p,f,w,v,c[d+15],22,1236535329),v=o(v,p,f,w,c[d+1],5,-165796510),w=o(w,v,p,f,c[d+6],9,-1069501632),f=o(f,w,v,p,c[d+11],14,643717713),p=o(p,f,w,v,c[d+0],20,-373897302),v=o(v,p,f,w,c[d+5],5,-701558691),w=o(w,v,p,f,c[d+10],9,38016083),f=o(f,w,v,p,c[d+15],14,-660478335),p=o(p,f,w,v,c[d+4],20,-405537848),v=o(v,p,f,w,c[d+9],5,568446438),w=o(w,v,p,f,c[d+14],9,-1019803690),f=o(f,w,v,p,c[d+3],14,-187363961),p=o(p,f,w,v,c[d+8],20,1163531501),v=o(v,p,f,w,c[d+13],5,-1444681467),w=o(w,v,p,f,c[d+2],9,-51403784),f=o(f,w,v,p,c[d+7],14,1735328473),p=o(p,f,w,v,c[d+12],20,-1926607734),v=s(v,p,f,w,c[d+5],4,-378558),w=s(w,v,p,f,c[d+8],11,-2022574463),f=s(f,w,v,p,c[d+11],16,1839030562),p=s(p,f,w,v,c[d+14],23,-35309556),v=s(v,p,f,w,c[d+1],4,-1530992060),w=s(w,v,p,f,c[d+4],11,1272893353),f=s(f,w,v,p,c[d+7],16,-155497632),p=s(p,f,w,v,c[d+10],23,-1094730640),v=s(v,p,f,w,c[d+13],4,681279174),w=s(w,v,p,f,c[d+0],11,-358537222),f=s(f,w,v,p,c[d+3],16,-722521979),p=s(p,f,w,v,c[d+6],23,76029189),v=s(v,p,f,w,c[d+9],4,-640364487),w=s(w,v,p,f,c[d+12],11,-421815835),f=s(f,w,v,p,c[d+15],16,530742520),p=s(p,f,w,v,c[d+2],23,-995338651),v=l(v,p,f,w,c[d+0],6,-198630844),w=l(w,v,p,f,c[d+7],10,1126891415),f=l(f,w,v,p,c[d+14],15,-1416354905),p=l(p,f,w,v,c[d+5],21,-57434055),v=l(v,p,f,w,c[d+12],6,1700485571),w=l(w,v,p,f,c[d+3],10,-1894986606),f=l(f,w,v,p,c[d+10],15,-1051523),p=l(p,f,w,v,c[d+1],21,-2054922799),v=l(v,p,f,w,c[d+8],6,1873313359),w=l(w,v,p,f,c[d+15],10,-30611744),f=l(f,w,v,p,c[d+6],15,-1560198380),p=l(p,f,w,v,c[d+13],21,1309151649),v=l(v,p,f,w,c[d+4],6,-145523070),w=l(w,v,p,f,c[d+11],10,-1120210379),f=l(f,w,v,p,c[d+2],15,718787259),p=l(p,f,w,v,c[d+9],21,-343485551),v=r(v,h),p=r(p,m),f=r(f,u),w=r(w,g);return a(v)+a(p)+a(f)+a(w)}}t.exports=e},66640(t){(e=>{class a{static isEditorPage(){return tve_frontend_options.is_editor_page}static isExternal(t){return a.getDomain(location.href)!==a.getDomain(t)}static getDomain(t){return t.replace("http://","").replace("https://","").split("/")[0]}static restAjax({type:t="POST",route:a="",data:r}){return e.ajax({headers:{"X-WP-Nonce":tve_frontend_options.nonce},url:a,type:t,data:r})}static handleContent(t,a=!0){e(window).trigger(a?"tcb_on_content_show":"tcb_on_content_hide"),e(window).trigger("tve_after_content_toggle",[t,a])}static jsonParse(t,e,a=null,r={}){if(null==a){let a;try{a=JSON.parse(t.attr(e)||JSON.stringify(r))}catch(e){console.warn("Could not get json data for element:",t),a=r}return a}return t.attr(e,JSON.stringify(a))}static toast(t,e,a){"string"!=typeof t&&(t=t.message||t.error||t.success),e||(e=!1),TCB_Front.notificationElement.toggle(t,e?"error":"success",a)}static windowWidth(){let t,e;try{e=window.parent&&window.parent.TVE&&window.parent.TVE.main,t=e&&window.parent.TVE.main.$frame.width()||TCB_Front.$window[0].innerWidth}catch(a){t=TCB_Front.$window[0].innerWidth,e=!1}let a=window.screen.width;return window.matchMedia("(orientation:landscape)").matches&&window.screen.height>a&&(a=window.screen.height),e||t>a+20&&t>window.outerWidth+20&&(t=a),t}static getBrowserScrollSize(){const t={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},a=e("<div>").css(e.extend({},t)),r=e("<div>").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},t)).append(a).appendTo("body").scrollLeft(1e3).scrollTop(1e3),n={height:r.offset().top-a.offset().top||0,width:r.offset().left-a.offset().left||0};return r.remove(),n}static hasAdminBar(){return e("#wpadminbar").length>0}static appendFormParamsToURL(t,r){return!Array.isArray(r)&&r.jquery&&(r=a.buildFormParams(r)),t+(t.split("?")[1]?"&":"?")+e.param(r)}static buildFormParams(t){let e=[];return t.find(".tve_lg_input_container input:not([name=user_consent]), .tve_lg_input_container textarea").not("input[type=hidden]").not("input[type=password]").each((t,a)=>{const r=ThriveGlobal.$j(a).serializeArray();if(r[0]){a.dataset.name&&(r[0].name=a.dataset.name.replace(/\s/g,"_")),TCB_Front.reservedTerms.includes(r[0].name.toLowerCase())&&(r[0].name="tve_"+r[0].name);const t=e.findIndex(t=>t.name===r[0].name);t>=0?e[t].value=e[t].value+", "+r[0].value:e=e.concat(r)}}),e}static appendRandomParamToURL(t){return t+(t.split("?")[1]?"&":"?")+"_="+Math.floor(1e3*Math.random())}static isEmail(t){return/^(([^<>()\[\]\\.,;:\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,}))$/.test(String(t).toLowerCase())}static addHttp(t){return!(t=t.trim())||0===t.indexOf("#")||/^mailto/.test(t)||/^tel/.test(t)||/^(?:f|ht)tps?\:\/\//.test(t)||(t="https://"+t),t}static unserialize(t){const e="undefined"!=typeof window?window:globalThis,a=function(t){let e=t.length;for(let a=t.length-1;a>=0;a--){const r=t.charCodeAt(a);r>127&&r<=2047?e++:r>2047&&r<=65535&&(e+=2),r>=56320&&r<=57343&&a--}return e-1},r=function(t,a,r,n){throw new e[t](a,r,n)},n=function(t,e,a){const n=[];let i=2,o=t.slice(e,e+1);for(;o!==a;)i+e>t.length&&r("Error","Invalid"),n.push(o),o=t.slice(e+(i-1),e+i),i+=1;return[n.length,n.join("")]};return function t(e,i){let o,s,l,c,d,h,m,u,g,v,p,f,w,C,_,b,$,k=0,y=function(t){return t};const A=e.slice(i,i+1).toLowerCase();switch(i||(i=0),o=i+2,A){case"i":y=function(t){return parseInt(t,10)},u=n(e,o,";"),k=u[0],m=u[1],o+=k+1;break;case"b":y=function(t){return 0!==parseInt(t,10)},u=n(e,o,";"),k=u[0],m=u[1],o+=k+1;break;case"d":y=function(t){return parseFloat(t)},u=n(e,o,";"),k=u[0],m=u[1],o+=k+1;break;case"n":m=null;break;case"s":g=n(e,o,":"),k=g[0],v=g[1],o+=k+2,u=function(t,e,r){const n=[];let i,o;for(i=0;i<r;i++)o=t.slice(e+(i-1),e+i),n.push(o),r-=a(o);return[n.length,n.join("")]}(e,o+1,parseInt(v,10)),k=u[0],m=u[1],o+=k+2,k!==parseInt(v,10)&&k!==m.length&&r("SyntaxError","String length mismatch");break;case"a":for(m={},s=n(e,o,":"),k=s[0],l=s[1],o+=k+2,d=parseInt(l,10),c=!0,p=0;p<d;p++)w=t(e,o),C=w[1],f=w[2],o+=C,_=t(e,o),b=_[1],$=_[2],o+=b,f!==p&&(c=!1),m[f]=$;if(c){for(h=new Array(d),p=0;p<d;p++)h[p]=m[p];m=h}o+=1;break;default:r("SyntaxError","Unknown / Unhandled data type(s): "+A)}return[A,o-i,y(m)]}(t+"",0)[2]}static validateImageUrl(t){return!!t.match(/.*\.(gif|jpe?g|bmp|png)$/gim)}static getQueryStrings(){return window.location.search.replace("?","").split("&").reduce((t,e)=>{const a=e.split("=");return t[a[0]]=a[1],t},{})}static parseJwt(t){const[,e=""]=t.split("."),a=e.replace(/-/g,"+").replace(/_/g,"/");let r;try{r=JSON.parse(decodeURIComponent(window.atob(a).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(t){r={}}return r}static insertHeadScripts(t,e,a){const r=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,"function"==typeof a&&(n.onload=n.onreadystatechange=a),void 0!==e&&(n.id=e),n.src=t,r.insertBefore(n,r.firstChild)}static insertStylesheet(t,e){const a=document.getElementsByTagName("head")[0],r=document.createElement("link");r.rel="stylesheet",r.id=e,r.type="text/css",r.href=t,a.insertBefore(r,a.firstChild)}static hasResource(t,e){return null!==document.getElementById(t)||null!==document.querySelector(`[src="${e}"],[href="${e}"]`)}static getAttr(t){const a={};return e.each(t[0].attributes,function(t,e){a[e.name]=e.value}),a}}a.checkCustomHtmlPreview=function(){ThriveGlobal.$j(".thrv_custom_html_shortcode").each(function(){const t=ThriveGlobal.$j(this),e=t.find(".tve_shortcode_overlay");if(!a.isEditorPage||!a.isEditorPage())return void(e.length&&e.remove());e.length&&e.remove();const r=t.clone();r.find("script, style, .tve_shortcode_overlay, code.tve_js_placeholder, code.tve_css_placeholder").remove();const n=r.text().trim(),i=t.find("img").filter(function(){return 0===ThriveGlobal.$j(this).closest("code.tve_noscript").length}).length>0;n.length>0||i||t.append('<div class="tve_shortcode_overlay" data-tcb-preview-overlay="1"><span>No preview available.</span></div>')})},function(){if("undefined"==typeof window)return;const t=a.isEditorPage&&a.isEditorPage(),e=ThriveGlobal.$j(document);e.ready(function(){a.checkCustomHtmlPreview()}),t&&(e.on("tcb:template:loaded tcb:content:changed",function(){setTimeout(a.checkCustomHtmlPreview,50)}),ThriveGlobal.$j(window).on("load",function(){setTimeout(a.checkCustomHtmlPreview,100)}))}(),t.exports=a,window.TCB_Front.toast=a.toast,window.tve_is_email=a.isEmail,window.TCB_Front.checkCustomHtmlPreview=a.checkCustomHtmlPreview})(ThriveGlobal.$j)}},e={};function a(r){var n=e[r];if(void 0!==n)return n.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,a),i.exports}void 0===TCB_Front.js_modules["avatar-picker"]&&TCB_Front.setModuleLoadedStatus("avatar-picker",!1),(t=>{if(TCB_Front.isModuleLoaded("avatar-picker"))return;const e=a(66640);TCB_Front.Hooks.addAction("tcb-modal.loaded",(e,a,n)=>{"avatar-picker"!==e||TCB_Front.Utils.isEditorPage()||r.instance(a,t(n.closest(".tve-avatar-picker-element"))).init()}),TCB_Front.setModuleLoadedStatus("avatar-picker",!0);class r{tempEmail="";constructor(t,e){this.modalInstance=t,this.$modal=this.modalInstance.$element,this.$element=e,this.$avatarElement=this.$element.find(".tve-avatar-picker-image"),this.defaultAvatar=this.$element.attr("data-default-avatar"),this.avatar=null,this.$avatarPreview=this.$modal.find(".tve-avatar-image-preview"),this.registerCallbacks()}static get avatarSize(){return 1024}static get connections(){return["google","facebook","gravatar","custom"]}static instance(t,e){return new r(t,e)}registerCallbacks(){this.modalInstance.registerCallback("save",()=>{this.avatar&&(this.$avatarElement.css("background-image",`url(${this.avatar})`),this.$avatarElement.find("input").val(this.avatar),this.$avatarElement.data("has-temp-image",!1)),this.modalInstance.constructor.close()}),this.modalInstance.registerCallback("before-open",()=>{this.$avatarPreview.css("background-image",this.$avatarElement.css("background-image")),this.$modal.find(".tve-avatar-extra-options input").val(""),this.$modal.find('[data-selected="true"]').removeAttr("data-selected")}),this.modalInstance.registerCallback("after-open",()=>{setTimeout(()=>{this.hasConnection("google")&&this.$modal.css("--tve-connection-type-width",this.$modal.find(".tve-google-sign-in iframe").outerWidth()-20+"px")},420)}),this.modalInstance.registerCallback("optionSelected",(t,e)=>{this.closeExtraOptions(),e.dataset.selected=!0})}hasConnection(t){let e="1"===this.$element.attr(`data-${t}`);if(e)switch(t){case"google":e=TCB_Front.googleApi.isConnected();break;case"facebook":e=TCB_Front.facebookApi.isConnected()}return e}closeExtraOptions(){this.$modal.find('[data-selected="true"]').removeAttr("data-selected")}init(){if(r.connections.every(t=>!this.hasConnection(t))&&this.$element.attr("data-gravatar","1"),this.modalInstance.registerCallback("resetImage",()=>{this.setAvatar(this.defaultAvatar)}),this.hasConnection("gravatar")){const t=this.$element.closest("form").find('input[type="email"]');this.modalInstance.registerCallback("applyGravatar",()=>{this.tempEmail=this.$modal.find(".tve-avatar-gravatar-email").val();const t=a(46161).getAvatarUrl(this.tempEmail,r.avatarSize);this.setAvatarFromUrl(t)}),this.modalInstance.registerCallback("after-open",()=>{const e=this.tempEmail||t.val();this.$modal.find(".tve-avatar-gravatar-email").val(e)}),t.on("change",t=>{if(this.$avatarElement.css("background-image").includes(this.defaultAvatar)||this.$avatarElement.data("has-temp-image")){const e=a(46161).getAvatarUrl(t.target.value,r.avatarSize);fetch(e).then(t=>t.blob()).then(t=>{"text/html"!==t.type&&(this.setAvatarFromUrl(e,this.$avatarElement),this.$avatarElement.find("input").val(e),this.$avatarElement.data("has-temp-image",!0))}).catch(()=>{})}})}this.hasConnection("custom")&&this.modalInstance.registerCallback("applyCustomUrl",()=>{const t=this.$modal.find(".tve-avatar-custom-url-input").val();e.validateImageUrl(t)?this.setAvatarFromUrl(t):this.onError("Invalid image url.")}),this.hasConnection("google")&&(TCB_Front.googleApi.init(),TCB_Front.googleApi.initButton(this.$modal.find(".tve-google-sign-in")[0]),TCB_Front.googleApi.registerCallback("auth",()=>{this.modalInstance.isOpen()&&this.setAvatarFromUrl(TCB_Front.googleApi.getAvatar(r.avatarSize))})),this.hasConnection("facebook")&&(this.modalInstance.registerCallback("onFacebookLoginClick",()=>TCB_Front.facebookApi.login()),TCB_Front.facebookApi.registerCallback("auth",()=>{TCB_Front.facebookApi.getProfilePicture(r.avatarSize).then(t=>this.setAvatar(t))})),r.connections.forEach(t=>{this.$modal.find(`[data-connection="${t}"]`).toggle(this.hasConnection(t))}),this.$avatarElement.find("input").val(this.defaultAvatar)}setAvatarFromUrl(t,e=this.$avatarPreview){t.trim()?(this.toggleLoading(),fetch(t).then(a=>{a.ok&&a.headers.get("content-type").includes("image")||(t=this.defaultAvatar),this.setAvatar(t,e),this.closeExtraOptions()},()=>{this.onError("Unfortunately we could not fetch that image, please use another.")})):this.onError("Invalid image url.")}setAvatar(e=null,a=this.$avatarPreview){this.toggleLoading(),e||(e=this.defaultAvatar),t(`<img referrerpolicy="no-referrer" src="${e}">`).on("load",()=>{this.toggleLoading(!1)}),a.css("background-image",`url(${e})`),this.avatar=e}toggleLoading(t=!0){this.$avatarPreview.toggleClass("tve-loader-square",t)}onError(t){this.setAvatar(),this.closeExtraOptions(),e.toast(t,!0)}}})(ThriveGlobal.$j)})();
void 0===TCB_Front.js_modules["fill-counter"]&&TCB_Front.setModuleLoadedStatus("fill-counter",!1),(t=>{if(TCB_Front.isModuleLoaded("fill-counter"))return;t(window).on("tcb_after_dom_ready",()=>{t(".thrv_fill_counter").each((o,i)=>e.init(t(i)))});const e={init(e){e.one("tve.start-animation",function(){const o=e.find(".tve_fill_counter").attr("data-fill"),i=2*o,l=["-webkit-transform","-ms-transform","transform"];for(const e in l)t(".tve_fill_c_in, .tve_fill_circle.tve_fill_circle1",this).css(l[e],"rotate("+o+"deg)"),t(".tve_fill_c_in-d",this).css(l[e],"rotate("+i+"deg)")})}};TCB_Front.setModuleLoadedStatus("fill-counter",!0)})(ThriveGlobal.$j);
(()=>{var t={87344(t){class e{static defaultOptions={from:100,to:15e3,speed:2500,"refresh-interval":10,"decimal-character":".","thousand-divider":",",decimals:0};constructor(t,e=window){this.$element=t,this.$number=this.$element.find(".tve-number"),this.window=e,this.window.TCB_Front.Utils.isEditorPage()||this.$element.attr("data-init",1)}init(){this.currentValue=Number(this.getData("from")),this.started=!1,this.finished=!1,this.type=this.getData("anim");const t=this.getData("speed")+7;return this.loops=Math.ceil(t/100),this.increment=(this.getData("to")-this.getData("from"))/this.loops,this}getData(t=""){let i=this.$element.attr(`data-${t}`);return void 0===i&&(i=e.defaultOptions[t]),i}start(){"function"==typeof this[`${this.type}Animation`]&&(this.started=!0,this[`${this.type}Animation`]())}tickerAnimation(){this.loopCount=0,this.interval&&clearInterval(this.interval),this.interval=setInterval(this.updateValue.bind(this),this.getData("refresh-interval"))}slideAnimation(){this.recalculateDigitWidth();let t=this.getData("formatted-from"),e=this.getData("final-number");[t,e]=this.compareNumberRange(t,e),this.$number.empty(),e.split("").forEach((e,i)=>{const r=this.window.ThriveGlobal.$j(`<div class="tcb-digit">${e}</div>`).appendTo(this.$number);if([",","."," ","-"].includes(e))r.addClass("tcb-character-digit");else{r.empty(),e=parseInt(e);const n=this.getSize(),s=this.window.Scroller.getNewInstance({width:n,amount:n||25,direction:this.window.Scroller.DIRECTION.DOWN,interval:this.getData("speed"),separatorType:this.window.Scroller.SEPARATOR.THOUSAND});s.appendTo(r[0]);const a=t[i];[",","."," ","-"].includes(a)||s.scrollFromTo(a,e)}})}recalculateDigitWidth(){const t=this.$number.clone();t.addClass("tve-number-counter-temporary-clone").insertAfter(this.$number);let e=t.text("1").width();"italic"===t.css("font-style")&&(e+=e/10),this.window.TCB_Front.inlineCssVariable(this.$element,"--tve-number-counter-digit-width",`${e}px`),t.remove()}compareNumberRange(t,e){const i=e.length-t.length;return i>0?t="0".repeat(Math.abs(i))+t:i<0&&(e="0".repeat(Math.abs(i))+e),[t,e]}getDividerSize(){const t=this.getSize();return t<=50?10:t/5}getSize(){return parseFloat(this.$element.css("font-size"))}updateValue(){this.currentValue+=this.increment,this.loopCount++,this.render(),this.loopCount>=this.loops&&(clearInterval(this.interval),this.onFinish())}onFinish(){this.finished=!0;const t=this.getData("final-number");this.$element.find(".tve-number").html(t)}render(t){void 0===t&&(t=this.currentValue);let e=t.toFixed(this.getData("decimals"));e=e.replace(/\B(?=(?:\d{3})+(?!\d))/g,this.getData("thousand-divider"));const i=`.(?=${new Array(parseInt(this.getData("decimals"))).fill(".").join("")}$)`;0!==parseInt(this.getData("decimals"))&&(e=e.replace(new RegExp(i),this.getData("decimal-character"))),this.$number.html(e)}}t.exports=e}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,i),s.exports}void 0===TCB_Front.js_modules["number-counter"]&&TCB_Front.setModuleLoadedStatus("number-counter",!1),((t,e)=>{if(TCB_Front.isModuleLoaded("number-counter"))return;const r=i(87344),n=[];t(window).on("tcb_after_dom_ready",()=>{let i=!1;t('.tve-number-counter .tve-number-wrapper:not([data-init="1"])').each((e,s)=>{const a=new r(t(s));a.$number.html(a.getData("final-number")),a.init().render(),n.push(a),i=!0}),i&&e.$window.trigger("scroll")}),e.add_scroll_callback(()=>{n.forEach(t=>{!t.started&&e.isInViewport(t.$element)&&t.start()})},e),window.TCB_Front.NumberCounter=r,e.setModuleLoadedStatus("number-counter",!0)})(ThriveGlobal.$j,TCB_Front)})();
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){var r=function(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};r.prototype.getSuffix=function(t,i){var e,s;for(e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},r.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},r.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},r.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)){if(0===this.settings.sizeRangeSuffixes[i].length)continue;if(this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i]}return""},r.prototype.newSrc=function(t,i,e,s){var n;if(this.settings.thumbnailPath)n=this.settings.thumbnailPath(t,i,e,s);else{var r=t.match(this.settings.extension),o=null!==r?r[0]:"";n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+o}return n},r.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},r.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},r.prototype.imgFromEntry=function(t){var i=t.find(this.settings.imgSelector);return 0===i.length?null:i},r.prototype.captionFromEntry=function(t){var i=t.find("> .jg-caption");return 0===i.length?null:i},r.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o=this.imgFromEntry(t);if(null!==o){o.css("width",s),o.css("height",n),o.css("margin-left",-s/2),o.css("margin-top",-n/2);var a=o.data("jg.src");if(a){a=this.newSrc(a,s,n,o[0]),o.one("error",function(){this.resetImgSrc(o)});var h=function(){o.attr("src",a)};"skipped"===t.data("jg.loaded")&&a?this.onImageEvent(a,function(){this.showImg(t,h),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,h)}}else this.showImg(t);this.displayEntryCaption(t)},r.prototype.displayEntryCaption=function(t){var i=this.imgFromEntry(t);if(null!==i&&this.settings.captions){var e=this.captionFromEntry(t);if(null===e){var s=i.attr("alt");this.isValidCaption(s)||(s=t.attr("title")),this.isValidCaption(s)&&(e=l('<div class="jg-caption">'+s+"</div>"),t.append(e),t.data("jg.createdCaption",!0))}null!==e&&(this.settings.cssAnimation||e.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},r.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},r.prototype.onEntryMouseEnterForCaption=function(t){var i=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?i.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},r.prototype.onEntryMouseLeaveForCaption=function(t){var i=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?i.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},r.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},r.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},r.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},r.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o,a=!0,h=0,g=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,l=g/this.buildingRow.aspectRatio,u=this.settings.rowHeight,d=this.buildingRow.width/g>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!d){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!d&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(a=!1,0<this.rows&&(a=(u=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/g>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)n=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),o=a?(r=e===this.buildingRow.entriesBuff.length-1?g:l*n,l):(r=u*n,u),g-=Math.round(r),s.data("jg.jwidth",Math.round(r)),s.data("jg.jheight",Math.ceil(o)),(0===e||o<h)&&(h=o);return this.buildingRow.height=h,a},r.prototype.flushRow=function(t,i){var e,s,n,r=this.settings,o=this.border;if(s=this.prepareBuildingRow(t,i),i||t&&"hide"===r.lastRow&&-1===s)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===r.lastRow||"right"===r.lastRow)){var a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*r.margins;for(n=0;n<this.buildingRow.entriesBuff.length;n++)a-=(e=this.buildingRow.entriesBuff[n]).data("jg.jwidth");"center"===r.lastRow?o+=Math.round(a/2):"right"===r.lastRow&&(o+=a)}var h=this.buildingRow.entriesBuff.length-1;for(n=0;n<=h;n++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-n:n],this.displayEntry(e,o,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),o+=e.data("jg.jwidth")+r.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=r.rowHeight&&s)&&(this.offY+=this.buildingRow.height+r.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;r.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},r.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},r.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},r.prototype.checkWidth=function(){clearInterval(this.checkWidthIntervalId);this.checkWidthIntervalId=setInterval(l.proxy(function(){if(this.$gallery.is(":visible")){var t=parseFloat(this.$gallery.width());Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0))}},this),this.settings.refreshTime)},r.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},r.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},r.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},r.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},r.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},r.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},r.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},r.prototype.updateEntries=function(t){var i;if(t&&null!=this.lastFetchedEntry){var e=this.getSelectorWithoutSpinner();i=l(this.lastFetchedEntry).nextAll(e).toArray()}else this.entries=[],i=this.getAllEntries();return 0<i.length&&(l.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},r.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},r.prototype.shuffleArray=function(t){var i,e,s;for(i=t.length-1;0<i;i--)e=Math.floor(Math.random()*(i+1)),s=t[i],t[i]=t[e],t[e]=s;return this.insertToGallery(t),t},r.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},r.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},r.prototype.filterArray=function(t){var e=this.settings;if("string"===l.type(e.filter))return t.filter(function(t){var i=l(t);return i.is(e.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(e.filter)){for(var i=t.filter(e.filter),s=0;s<t.length;s++)-1===i.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return i}},r.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},r.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),l.each(this.getAllEntries(),l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");var s=this.imgFromEntry(e);s&&(s.css("width",""),s.css("height",""),s.css("margin-left",""),s.css("margin-top",""),this.resetImgSrc(s),s.data("jg.originalSrc",void 0),s.data("jg.originalSrcLoc",void 0),s.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);var n=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==n&&n.remove()):null!==n&&n.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},r.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},r.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},r.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},r.prototype.onImageEvent=function(t,i,e){if(i||e){var s=new Image,n=l(s);i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t}},r.prototype.init=function(){var a=!1,h=!1,g=this;l.each(this.entries,function(t,i){var e=l(i),s=g.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==g.settings.rel&&e.attr("rel",g.settings.rel),null!==g.settings.target&&e.attr("target",g.settings.target),null!==s){var n=g.extractImgSrcFromImage(s);if(!1===g.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),o=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),o=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(o))return e.data("jg.width",r),e.data("jg.height",o),e.data("jg.loaded","skipped"),h=!0,g.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),a=!0,g.isSpinnerActive()||g.startLoadingSpinnerAnimation(),g.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),g.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),g.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),a||h||this.startImgAnalyzer(!1),this.checkWidth()},r.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},r.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(i);for(var e={0:""},s=0;s<t.length;s++)if("string"===l.type(t[s]))try{e[parseInt(t[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[t[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[t[s]]=this.settings.sizeRangeSuffixes[t[s]];this.settings.sizeRangeSuffixes=e},r.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},r.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},r.prototype.retrieveSuffixRanges=function(){var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(parseInt(i,10));return t.sort(function(t,i){return i<t?1:t<i?-1:0}),t},r.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},r.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(n){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");var s=e.data("jg.controller");if(void 0===s){if(null!=n&&"object"!==l.type(n)){if("destroy"===n)return;throw"The argument must be an object"}s=new r(e,l.extend({},r.prototype.defaults,n)),e.data("jg.controller",s)}else if("norewind"===n);else{if("destroy"===n)return void s.destroy();s.updateSettings(n),s.rewind()}s.updateEntries("norewind"===n)&&s.init()})}});
!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null!==options.pinchThreshold?pinchDistance>=options.pinchThreshold:!0}function validateSwipeTime(){var result;return result=options.maxTimeThreshold?!(duration>=options.maxTimeThreshold):!0}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&DOUBLE_TAP_THRESHOLD>distance}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){return maximumsMap[direction]?maximumsMap[direction].distance:void 0}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return 1>pinchZoom?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return 0>angle&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return 45>=angle&&angle>=0?LEFT:360>=angle&&angle>=315?LEFT:angle>=135&&225>=angle?RIGHT:angle>45&&135>angle?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.17",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});
(()=>{var t={99440(t){var e,a;e=ThriveGlobal.$j,a=TCB_Front,t.exports=class{constructor(t){this.gallery=t,this.$gallery=t.$element,this.imageCount=this.$gallery.find(".tve_image_caption").length,this.animating=!1,this.isOpen=!1,this.render()}render(){this.$overlay=e(`\n\t\t\t\t<div class="tcb-gallery-overlay">\n\t\t\t\t\t<div class="tcb-gallery-wrapper"></div>\n\t\t\t\t\t<div class="tcb-g-count tcb-gl-ctrl-mob">\n\t\t\t\t\t\t<div class="tcb-gl-ctrl-wrp">\n\t\t\t\t\t\t\t<span class="tcb-mob-text"></span>\n\t\t\t\t\t\t\t<span class="tcb-img-count"></span>\n\t\t\t\t\t\t\t<span class="tcb-cap-txt"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button class="tcb-nav-prev tcb-gl-ctrl">${a.icons.get("arrow-left")}</button>\n\t\t\t\t\t<button class="tcb-nav-next tcb-gl-ctrl">${a.icons.get("arrow-right")}</button>\n\t\t\t\t\t<button class="tcb-nav-close tcb-gl-ctrl-mob">${a.icons.get("cross")}</button>\n\t\t\t\t</div>\n\t\t\t`).appendTo(e("body")),this.$wrapper=this.$overlay.find(".tcb-gallery-wrapper"),this.$wrapper.css({width:"100%"})}fetchCaptionsFromMedia(){const t=window.location.origin;this.$gallery.find("[data-id]").each((e,a)=>{const i=a.attributes["data-id"].value,s=parseInt(i,10);!s||s<1||fetch(`${t}/wp-json/wp/v2/media/${s}`).then(t=>{if(!t.ok)throw new Error(`Failed to fetch media ${s}: ${t.status}`);return t.json()}).then(t=>{var e;const i=(null==t||null===(e=t.caption)||void 0===e?void 0:e.rendered)||"",s=document.createElement("div");s.innerHTML=i;const n=(s.textContent||s.innerText||"").trim();if(n){const t=this.$wrapper.find(`img[data-index="${a.getAttribute("data-index")}"]`);t.length&&t.attr("data-caption",n),parseInt(a.getAttribute("data-index"))===this.currentImageIndex&&(this.$overlay.find(".tcb-caption").text(n),this.$overlay.find(".tcb-mob-text").text(n))}}).catch(t=>console.error("Error fetching caption:",t))})}init(){this.currentImageIndex=0,this.$gallery.find(".tve_image_caption").each((t,a)=>{const i=e(a).find(".tve_image_frame");e(a).find("a").removeClass("tve-jump-scroll"),i&&i.off("click.lightbox").on("click.lightbox",t=>{this.shouldClick()&&(this.isOpen=!0,this.$overlay.show(0).addClass("g-v"),this.showImage(parseInt(a.dataset.index),!1),t.preventDefault())}),this.createGalleryItem(a)}),this.fetchCaptionsFromMedia(),this.$overlay.find(".tcb-nav-prev").on("click",this.showPrev.bind(this)),this.$overlay.find(".tcb-nav-next").on("click",this.showNext.bind(this)),this.$overlay.find(".tcb-nav-close").on("click",this.close.bind(this)),this.$wrapper.on("click",t=>{"IMG"!==t.target.tagName&&this.close()}),this.$wrapper.length&&this.$wrapper.on("swipe",{swipeLeft:this.showNext.bind(this),swipeRight:this.showPrev.bind(this),swipeUp:()=>{this.isOpen=!1,this.$overlay.removeClass("g-v").hide()},swipeDown:()=>!1}),e("html").off("keydown.gallery").on("keydown.gallery",t=>{if(this.isOpen)switch(t.keyCode){case 37:this.showPrev();break;case 39:this.showNext();break;case 27:this.close()}})}shouldClick(){let t=!0;if("carousel"===this.$gallery.attr("data-type")){const e=this.$gallery.find(".tcb-image-gallery-container")[0].slick;t=!e||!1===e.dragging&&!1!==e.shouldClick}return t}close(){this.isOpen=!1,this.$gallery.addClass(this.getAnimationsClasses()),this.$overlay.removeClass("g-v").hide()}createGalleryItem(t){if(!t.classList.contains("gallery-clicker")){const i=t.querySelector("img");e(`<div class="tve-g-image-wrapper">\n\t\t\t\t\t\t<div class="tcb-caption-wrapper tcb-loading">\n\t\t\t\t\t\t\t<button class="tcb-nav-close">${a.icons.get("cross")}</button>\n\t\t\t\t\t\t\t<img \n\t\t\t\t\t\t\t\t\tloading="lazy"\n\t\t\t\t\t\t\t\t\tdata-pos="${t.getAttribute("data-position")}" \n\t\t\t\t\t\t\t\t\tdata-caption="${t.getAttribute("data-caption")}" \n\t\t\t\t\t\t\t\t\tdata-index="${t.getAttribute("data-index")}" \n\t\t\t\t\t\t\t\t\tdata-src="${i.dataset.src}" alt=""/>\n\t\t\t\t\t\t\t<div class="tcb-caption"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="tcb-image-loader">${TCB_Front.icons.get("spinner9")}</div>\n\t\t\t\t\t</div>`).appendTo(this.$wrapper)}}showImage(t,e){this.$gallery.removeClass(this.getAnimationsClasses()),this.$wrapper.toggleClass("g-n-a",!e);const a=this.$wrapper.find(`img[data-index=${t}]`),i="true"===this.$gallery.attr("data-caption-lightbox"),s=a.attr("data-caption")||"",n=a.attr("data-pos"),r=TCB_Front.isRTL?this.imageCount-1-t:t;a.parent().hasClass("tcb-loading")&&a.on("load",()=>{a.parent().removeClass("tcb-loading")}),a.attr("src",a.attr("data-src")),this.$wrapper.css({transform:`translate(-${100*r}%, 0)`}),this.currentImageIndex=t,this.$overlay.find(".tcb-img-count").text(n),this.$overlay.find(".tcb-caption").text(i&&s.length?s:""),this.$overlay.find(".tcb-mob-text").text(s)}showNext(){this.animating||(this.currentImageIndex<this.imageCount-1?this.showImage(this.currentImageIndex+1,!0):(this.$wrapper.addClass("g-n-a").css({transform:"translate(100%, 0)"}),this.animating=!0,setTimeout(()=>{this.showImage(0,!0),this.animating=!1},20)))}showPrev(){this.animating||(this.currentImageIndex>0?this.showImage(this.currentImageIndex-1,!0):(this.$wrapper.addClass("g-n-a").css({transform:`translate(-100 * ${this.imageCount}%, 0)`}),this.animating=!0,setTimeout(()=>{this.showImage(this.imageCount-1,!0),this.animating=!1},20)))}getAnimationsClasses(){const t=[];if(this.$gallery.hasClass("tve_evt_manager_listen")){t.push("tve_evt_manager_listen","tve_ea_thrive_animation");const e=this.$gallery[0].className.match(/tve_et_\S*|tve_ea_\S*|tve_anim_\S*/g);null!==e&&(t.push(...e),t.includes("tve_ea_thrive_tooltip")&&t.splice(t.indexOf("tve_ea_thrive_animation"),1))}return[...new Set(t)].join(" ")}}}},e={};function a(i){var s=e[i];if(void 0!==s)return s.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,a),n.exports}void 0===TCB_Front.js_modules["image-gallery"]&&TCB_Front.setModuleLoadedStatus("image-gallery",!1),function(t,e){if(TCB_Front.isModuleLoaded("image-gallery"))return;const i=a(99440),s=(e=TCB_Front.$body)=>{e.find(".tcb-image-gallery:visible").each((e,a)=>new n(t(a),!!tve_frontend_options.is_editor_page))};t(window).on("tve_after_content_toggle",(t,e)=>{s(e)}),t(window).on("tcb_after_dom_ready",()=>{s()});class n{constructor(a=t(),i=!0){if(this.$element=a,this.isEditor=i,i||(this.isHorizontalMasonry()&&this.initHorizontalMasonry(),this.hasLightbox()&&this.initLightbox(),this.isVerticalMasonry()&&this.initVerticalMasonry(),this.fetchCaptionsFromMedia()),this.isCarousel()){this.carousel=new TCB_Front.Carousel(this),this.carousel.initCarousel();const t=this.onResize.bind(this);e.addResizeCallback(t)}}fetchCaptionsFromMedia(){const t=window.location.origin;this.$element.find("[data-id]").each((e,a)=>{if(!a.querySelector(".wp-caption-text"))return;const i=a.attributes["data-id"].value,s=parseInt(i,10);!s||s<1||fetch(`${t}/wp-json/wp/v2/media/${s}`).then(t=>{if(!t.ok)throw new Error(`Failed to fetch media ${s}: ${t.status}`);return t.json()}).then(t=>{var e;const i=(null==t||null===(e=t.caption)||void 0===e?void 0:e.rendered)||"",s=document.createElement("div"),n=a.querySelector(".wp-caption-text").innerText||"";s.innerHTML=i,a.querySelector(".wp-caption-text").textContent=s.textContent||s.innerText||n||""}).catch(t=>console.error("Error:",t))})}static imageSelector(){return".thrv_wrapper.tve_image_caption"}static captionSelector(){return".wp-caption-text.thrv-inline-text"}onResize(){const t=this.$element.find(".tcb-image-gallery-container"),a=e.Utils.jsonParse(t,"data-carousel-settings").tcbDots;setTimeout(()=>{TCB_Front.Carousel.setDots(this.$element.find("ul.tcb-carousel-dots"),a)},500)}setImages(t){return this.images=t,this}getImages(){return this.images}readImagesFromElement(e=!0){const a=[],i=this.isCarousel()?".tcb-image-gallery-container .tve_image_caption.slick-slide:not(.slick-cloned) img":".tcb-image-gallery-container img";return this.$element.find(i).each((e,i)=>{const s=t(i),n=s.parents(".tve_image_caption");a.push({id:n.attr("data-id"),caption:n.attr("data-caption"),title:s.attr("title"),alt:s.attr("alt"),width:s.attr("width"),height:s.attr("height"),url:s.attr("src"),sizes:s.tcbJsonData("sizes"),styleClass:n[0].className.match(/(^|\s)img_style_\S+/g)||["no_style"].join(" ")})}),e&&(this.images=a),a}isHorizontalMasonry(){return"horizontalMasonry"===this.$element.attr("data-type")}initHorizontalMasonry(){this.$element.find(".tcb-image-gallery-container").justifiedGallery({selector:".tve_image_caption.thrv_wrapper",rowHeight:parseInt(e.inlineCssVariable(this.$element,"--tve-gallery-column-height")),lastRow:"nojustify",margins:parseInt(e.inlineCssVariable(this.$element,"--tve-gallery-gutter"))})}isVerticalMasonry(){return"verticalMasonry"===this.$element.attr("data-type")}initVerticalMasonry(){this.$element.find(".tcb-image-gallery-container").data("masonry",!1).masonry({itemSelector:".thrv_wrapper.tve_image_caption",gutter:0,transitionDuration:0})}render(t=!0){if(this.isEditor){this.$element=TVE.ActiveElement;const e=this.$element.find(TVE.identifier("image")),a=this.$element.find(TVE.identifier("image_caption")),i=e.find(".tve-image-overlay").first(),s={},n={},r={};let l,o,c,h,d,g,m;if(e.length&&(t&&this.readImagesFromElement(),l=this.getAnimationsClasses(e),o=this.getAnimationsClasses(e.find("img")),c=e.find("img").attr("data-tcb-events"),h=this.getAnimationsClasses(a),d=a.attr("data-tcb-events"),g=(e.find(".tve_image_frame")[0].className.match(/(^|\s)img_style_\S+/g)||["no_style"]).join(" "),m=TVE.Editor_Page.getResponsiveClasses(a)),this.oldImageSize=this.getImageSize(),a.each((t,e)=>{const a=TVE.inner_$(e),i=a.find("a"),s=a.parents(".tve_image_caption"),r=s.attr("data-id");n[r]={text:s.attr("data-caption")||"",hasLink:i.length>0,href:i.attr("href"),target:i.attr("target"),rel:i.attr("rel")}}),e.each((t,e)=>{const a=TVE.inner_$(e),i=a.find(".tve_image_frame a"),s=a.attr("data-id");r[s]={hasLink:i.length>0,href:i.attr("href"),target:i.attr("target"),rel:i.attr("rel"),linkClass:i.attr("tve-dynamic-link"),shortcodeId:i.attr("data-shortcode-id"),dynamicLink:i.attr("data-dynamic-link")}}),this.$element.hasClass("tcb-elem-placeholder"))this.$element.html('<div class="tcb-image-gallery-container tve-prevent-content-edit"></div>').removeClass("tcb-elem-placeholder tcb-gallery-placeholder");else{const t=this.$element.find(".tcb-image-gallery-container");this.isCarousel()&&void 0!==t[0].slick&&t.slick("unslick"),t.html("")}a.length&&a.attr("data-position")&&(s.position={attr:`data-position=${a.attr("data-position")}`,classes:`tve-image-caption-${a.attr("data-position")}`},"inside"===a.attr("data-position")&&a.attr("data-alignment")&&(s.alignment={attr:`data-alignment=${a.attr("data-alignment")}`,classes:`tve-image-caption-inside tcb-caption-${a.attr("data-alignment")}`})),this.$element.attr("data-css",TVE.CSS_Rule_Cache.uniq_id(this.$element)),this.getImages().forEach((t,e)=>this.renderOneImage(t,e,s,n,r));const p=this.$element.find(TVE.identifier("image")),u=this.$element.find(".wp-caption-text");i.length&&i.insertAfter(p.find("img")),l&&(p.addClass(l),this.$element.find("img").addClass(o).attr("data-tcb-events",c)),h&&u.addClass(h).attr("data-tcb-events",d),g&&p.find(".tve_image_frame").addClass(g),u.each((t,e)=>{const a=e.innerText;a&&!a.trim().length&&e.classList.add("tcb-permanently-hidden")}),m&&u.addClass(m),this.updateDataSelectors()}}renderOneImage(t,a,i,s,n){this.$element.find(".tcb-image-gallery-container").append(TVE.tpl("elements/gallery-image")({image:t,index:a,imageObj:this,captionSettings:i,tcb:e,captionLinks:s,imageLinks:n})),this.$element.find(".tcb-image-gallery-container img:last").tcbJsonData("sizes",t.sizes)}updateDataSelectors(){const t=this.$element.attr("data-css");this.$element.find(n.imageSelector()).each((e,a)=>{a.setAttribute("data-selector",`[data-css="${t}"] ${n.imageSelector()}`)}),this.$element.find(n.captionSelector()).each((e,a)=>{a.setAttribute("data-selector",`[data-css="${t}"] ${n.captionSelector()}`)})}hasCaptions(){return"true"===this.$element.attr("data-caption")}getImageSize(){let t=this.$element.attr("data-thumbnail-size")||"auto";return"auto"===t&&(t=this.getBestImageSize()),t}getFullwidthSize(){return this.$element.attr("data-fullscreen-size")||"large"}hasLightbox(){let t="fullscreen"===this.$element.attr("data-click-behavior");return!this.$element.hasClass("tcb-update-fullscreen")&&this.isCarousel()&&(t=!1),t}getImagePosition(t){const e=this.getImages();return e.findIndex(e=>e.id===t.id)+1+"/"+e.length}initLightbox(){this.$element.data("lightbox-loaded")||(this.lightbox=new i(this),this.lightbox.init(),this.$element.data("lightbox-loaded",!0))}getBestImageSize(){const t=this.getNumberOfColumns(),a=parseInt(e.inlineCssVariable(this.$element,"--tve-gallery-horizontal-space")),i=t||Math.min(this.images.length,4),s=(TVE.ActiveElement.outerWidth()-(i-1)*a)/i;let n="large";if(s<=300){const t=TVE.ActiveElement.find("img");t.length&&s<t.width()||(n="medium")}return n}getNumberOfColumns(){let t;if(this.isCarousel())try{t=e.Utils.jsonParse(this.$element.find(".tcb-image-gallery-container"),"data-carousel-settings").slidesToShow}catch(e){t=3}else t=e.inlineCssVariable(this.$element,"--tve-gallery-columns");return t}getAnimationsClasses(t){const e=[],a=t.length?t[0].className.match(/tve_et_\S*|tve_ea_\S*|tve_anim_\S*|tve_evt_\S*/g):null;return null!==a&&(e.push(...a),e.includes("tve_ea_thrive_tooltip")&&e.splice(e.indexOf("tve_ea_thrive_animation"),1)),[...new Set(e)].join(" ")}isCarousel(){return"carousel"===this.$element.attr("data-type")}}window.TCB_Front.ImageGallery=n,TCB_Front.setModuleLoadedStatus("image-gallery",!0)}(ThriveGlobal.$j,TCB_Front)})();
void 0===TCB_Front.js_modules["lead-generation"]&&TCB_Front.setModuleLoadedStatus("lead-generation",!1),((t,e)=>{if(e.isModuleLoaded("lead-generation"))return;t(window).on("tcb_after_dom_ready",()=>{const r=t(e.Utils.isEditorPage()?"#tve_editor":"body");a.initRadioInputs(r),a.initCheckboxInputs(r),e.Utils.isEditorPage()||(t(".thrv_lead_generation").tve_front_lead_generation(),a.initRecaptcha(),a.initTurnstile(),a.initCustomSpamPreventor())});const a={initRadioInputs(e){t('[data-default="1"]').closest(".tve_lg_radio_wrapper").addClass("tve-state-expanded"),e.off("change.inputradio").on("change.inputradio",".tve_lg_radio_wrapper input",function(){const e=t(this).closest(".tve_lg_radio_wrapper");e.siblings(".tve-state-expanded").removeClass("tve-state-expanded"),e.addClass("tve-state-expanded")})},initCheckboxInputs(e){e.off("change.inputcheckbox").on("change.inputcheckbox",".tve_lg_checkbox_wrapper input",function(){const e=t(this);e.closest(".tve_lg_checkbox_wrapper").toggleClass("tve-state-expanded",e.prop("checked"))})},initCustomSpamPreventor(){const e=t(".tve-thrive-sp-container");let a=500;e.filter(":not(.tve-sp-rendered)").each(function(){document.getElementById(this.id)&&(this.id=this.id+"-"+ ++a,t(this).addClass("tve-sp-rendered"))})},initTurnstile(){const e=t(".tve-turnstile-container");if(e.length&&0!==tve_dash_front.turnstile.length){let a=!1;window.tve_turnstile_api_loaded||(t.ajax({url:"https://challenges.cloudflare.com/turnstile/v0/api.js",dataType:"script",cache:!0}),a=!0,window.tve_turnstile_api_loaded=!0),a||function a(){"undefined"!=typeof turnstile&&turnstile.render?function(){let a=100;e.filter(":not(.tve-turnstile-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-turnstile-rendered");const n=this.id;e.data("turnstile-rendered")||tve_dash_front.turnstile.connection||(e.data("turnstile-rendered",!0),turnstile.render("#"+n,{sitekey:tve_dash_front.turnstile.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),appearance:"execute",size:r}))}})}():setTimeout(a,50)}()}},initRecaptcha(){const e=t(".tve-captcha-container");if(e.length&&0!==tve_dash_front.recaptcha.length){function a(){"undefined"!=typeof grecaptcha&&grecaptcha.render?function(){let a=100;e.filter(":not(.tve-recapcha-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-recaptcha-rendered"),e.data("grecaptcha-render")||tve_dash_front.recaptcha.connection&&(!tve_dash_front.recaptcha.connection||"v3"===tve_dash_front.recaptcha.connection.version)||(e.data("grecaptcha-render",!0),grecaptcha.render(this.id,{sitekey:tve_dash_front.recaptcha.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),size:r}))}})}():setTimeout(a,50)}let r=!1;const n=tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version&&!tve_dash_front.recaptcha.connection.browsing_history?tve_dash_front.recaptcha.site_key:"explicit";window.tve_gapi_loaded||(t.getScript("https://www.google.com/recaptcha/api.js?render="+n,a),r=!0,window.tve_gapi_loaded=!0),r||a()}},hasFileUpload:()=>e.isModuleLoaded("file-upload")};t.fn.tve_front_lead_generation=function(r={}){return window.TCB_PAGE_INDEX=window.TCB_PAGE_INDEX||1,this.each((n,i)=>{const o=t(i);let s=o.find("form");const d=s.find(".tve-f-a-hidden").val();if(0===s.length&&(o.find(".thrv_lead_generation_container").wrapInner('<form method="post"></form>'),s=o.find("form")),s.find(".tve_lg_textarea.tve-lg-show-counter textarea").off("input.textarea").on("input.textarea",function(){const e=t(this),a=e.val().length,r=Number(e.attr("maxlength")),n=Number(e.attr("data-min")),i=e.next().find(".tve-fill-text-dynamic");i.text(r?`${a} of ${r}`:a),i.toggleClass("tve-counter-error",!!(a&&n&&a<n))}),s.find('input[type="checkbox"],input[type="radio"]').each(function(){if(!this.id)return!0;t("#"+this.id).not(this).length&&(this.id=this.id+"-"+window.TCB_PAGE_INDEX++,t(this).next("label").attr("for",this.id))}),void 0!==d&&"#"===s.attr("action")&&s.attr("action",d),o.data("tve_lg_done"))return this;if(o.data("tve_lg_done",!0),void 0!==window.SegMet&&SegMet&&-1!==s[0].action.indexOf("infusionsoft")&&!s.data("tve-segmet-submit")){s.data("tve-segmet-submit",1);const t=s[0].submit;s[0].submit=function(){return s.data("tve-segmet-submitted")?t.call(s[0]):(s.data("tve-segmet-submitted",1),s.submit())}}const l={errClass:"tve-lg-error",errClassMultiple:"tve-lg-error-multiple",init(){this.container=s.closest(".thrv_lead_generation").find("#tve-lg-error-container"),this.container.length||(this.container=t('<div id="tve-lg-error-container"></div>').prependTo(s.parent()),this.container.on("click",".tve-lg-err-close",t.proxy(this.close,this))),this.container.empty().hide(),this.clear()},close(){this.container.fadeOut(200);let t=s.find("."+this.errClass);return t.length||(t=s.find("input,select,textarea")),t.first().trigger("focus"),!1},clear(){s.find("input,select,textarea").removeClass(this.errClass),s.find('[class^="tve_lg_"]').removeClass(this.errClassMultiple+" "+this.errClass),"function"==typeof r.clearErrors&&r.clearErrors.apply(this,arguments)},markApiError(e,a=t(),n=""){return"function"==typeof r.renderError?r.renderError(a,e,n):this.container.append('<div class="tve-lg-err-item tve-lg-ext-err">'+e+"</div>"),this},_markError(t,e,a){if("function"==typeof r.renderError)return r.renderError.call(this,t,e,a);if(t){const e=t.parent();e.removeClass("tcb-permanently-hidden"),e.closest("form").find(`[data-label-for="${e.attr("data-label")}"]`).removeClass("tcb-permanently-hidden"),t.addClass(this.errClass);let r=t.attr("data-field")?t.attr("data-field").replace("mapping_",""):t.attr("type");"gdpr"===r&&(r="checkbox"),["radio","checkbox"].includes(r)?t.closest(".tve_lg_"+r).addClass(this.errClassMultiple):"select"===r?t.closest(".tve_lg_dropdown").addClass(this.errClass):"country"===r?"no-country"===a&&t.closest(".tve_lg_country").addClass(this.errClass):"state"===r&&"no-state"===a&&t.closest(".tve_lg_state").addClass(this.errClass)}"required"===a&&this.container.find(".tve-lg-required").length||this.container.append('<div class="tve-lg-err-item tve-lg-'+a+'">'+e+"</div>")},show(){if("function"==typeof r.renderError)return;this.container.append('<a href="javascript:void(0)" class="tve-lg-err-close" title="Close"><span class="thrv-icon thrv-svg-icon">'+e.icons.get("cross")+"</span></a>");const t=this;setTimeout(function(){const e=s.offset(),a=parseInt(s.css("margin-top"));let r=-10-t.container.outerHeight(!0)-(isNaN(a)?0:a);s.parents(".thrv-ribbon").length?"bottom"===s.parents(".tve-leads-ribbon").attr("data-position")?r+=7:r=e.top+s.outerHeight():t.container.outerHeight(!0)>e.top&&(r=e.top+s.outerHeight()),t.container.css({top:r+"px",width:s.outerWidth()}).fadeIn(200)},50)},required(e,a){let r,n="required";const i=e.attr("type");if("hidden"===i)r=!0;else if("radio"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if("checkbox"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if(e.is("textarea[data-min]")){const i=t.trim(e.val()).length;r=i>=e.attr("data-min"),!r&&i&&(n="min-chars",a=tve_frontend_options.translations.min_chars.replace("%s",e.attr("data-min")))}else{const a=e.attr("value")?e.attr("value"):e.val();r=t.trim(a).length>0}return r||this._markError(e,a,n),r},validNumber(t){const e=parseFloat(t.attr("max")),a=parseFloat(t.attr("min")),r=parseFloat(t.val()),n=this.getErrors(o);let i=!0,s=n.min_value,d=n.max_value;if(void 0===s&&(s="The number field should be at least {min_value}"),void 0===d&&(d="The number field should be at most {max_value}"),!isNaN(a)&&!isNaN(r)&&r<a){i=!1;const e=s.replace(/{min_value}/g,a);this._markError(t,e,"min_value")}if(!isNaN(e)&&!isNaN(r)&&r>e){i=!1;const a=d.replace(/{max_value}/g,e);this._markError(t,a,"max_value")}return i},validCountry(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="Country field is required!",n="no-country",this._markError(e,r,n)),a},validState(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="State field is required!",n="no-state",this._markError(e,r,n)),a},password(t,e){let a=!0;return t.val()||1!==t.data("required")||(a=!1),!!a||(this._markError(t,e,"password"),!1)},mismatch(t,e){let a=!0;return t.password&&t.password.val()!==t.confirm_password.val()&&(a=!1),!!a||(this._markError(t.confirm_password,e,"passwordmismatch"),!1)},email(t,e){return!(t.val()&&!/^(([^<>()\[\]\\.,;:\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,}))$/.test(t.val())&&(this._markError(t,e,"email"),1))},getErrors(t){try{return JSON.parse(t.find(".tve-lg-err-msg").val())}catch(t){return{file_extension:"Sorry, {fileextension} files are not allowed",file_size:"{file} exceeds the maximum file size of {filelimit}",required:"Please fill in all of the required fields",phone:"The phone number is not valid",email:"The email address is not valid",max_value:"The number field should be at most {max_value}",min_value:"The number field should be at least {min_value}"}}}};let c;a.hasFileUpload()&&(c=new e.FileUpload(o));const u=function(a,r){const n=t.extend({success:"Sign up successful",error:"Error!"},r),i=s.find("#_form_type").val(),o=s.find("input[name=name]").val()?s.find("input[name=name]").val():"",d=s.find("input[name=email]").val();if(a){s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click");const a=t.Event("leads_messages.tcb");s.trigger(a),"lead_generation"===i&&(s.find("input").val(""),s.parents(".tve_p_lb_content").find(".tve_p_lb_close").trigger("click")),n.success=n.success.replace("[lead_email]",d),n.success=n.success.replace("[lead_name]",o),e.notificationElement.toggle(n.success,"success","")}else{const t=s.parent(),a=t.parent(),r=a.find(".tve-error-wrapper"),i=s.find("#_error_message_option").val();if(1===parseInt(i))t.hide(),0===r.length?(a.append('<div class="tve-error-wrapper"><div class="tve-error-content"></div><button class="tve-close-error-message">Retry</button></div>'),n.error=n.error.replace("[lead_email]",d),n.error=n.error.replace("[lead_name]",o),a.find(".tve-error-content").append(n.error)):a.find(".tve-error-wrapper").show();else{if(_())return;e.notificationElement.toggle(n.success,"success",""),h(),p()}}s.tve_form_loading(!0)},f=function(t){return t&&t.length>0?t+",":""};function p(){s.find(".tve-state-expanded").removeClass("tve-state-expanded"),s.find(".tve_lg_dropdown:not(.tve_lg_country):not(.tve_lg_state)").each(function(){const e=t(this),a=e.attr("data-show-placeholder"),r=e.find('[data-default="1"]'),n=r.length?r:e.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").first(),i=e.find("input");a?(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(i.attr("data-placeholder")),i.removeAttr("value")):(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(n.text()),i.attr("value",n.attr("data-value")))}),s.find(".tve_lg_country").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger"),i="include"===e.attr("data-display-type"),o=1===JSON.parse(e.attr("data-display-list")).length;if(n.find(".tve-disabled-text-inner").text("Select Country"),a[0].setAttribute("value",""),r)a[0].setAttribute("value",r),n.find(".tve-disabled-text-inner").text(r);else if(i&&o){const t=JSON.parse(e.attr("data-display-list"))[0];a[0].setAttribute("value",null==t?void 0:t.name),n.find(".tve-disabled-text-inner").text(null==t?void 0:t.name)}window.setTimeout(function(){a.trigger("input.tve")},0)}),s.find(".tve_lg_state").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger");n.find(".tve-disabled-text-inner").text(a.attr("data-placeholder")),""!==r?(a.val(r),n.find(".tve-disabled-text-inner").text(r)):a.attr("value","")}),s.find(".tve_lg_date").each(function(){const e=t(this),a=e.find(".lg-date-picker");try{const t=e.data("date-configs"),r=Number(a.attr("data-is-limit-days")),n=Number(a.attr("data-is-limit-hours"));if(r){const e=JSON.parse(a.attr("data-limit-days")),{disable:r,locale:n}={disable:[function(t){return!e.includes(t.getDay())}],locale:{firstDayOfWeek:1}};t.disable=r,t.locale=n}if(n){const e=a.attr("data-start-hour"),r=a.attr("data-start-minute"),n=a.attr("data-start-meridiem");e&&(t.defaultHour="PM"===n?Number(e)+12:e),r&&(t.defaultMinute=r)}a.flatpickr(t)}catch(t){}}),s[0].reset(),s.find("textarea").trigger("input"),s.find('input[type="radio"][data-default="1"], input[type="checkbox"][data-default="1"] ').attr("checked","checked").closest(".tve_lg_radio_wrapper, .tve_lg_checkbox_wrapper").addClass("tve-state-expanded"),e.smartComplete.handleSmartComplete(s)}function _(a=!1,r="",n="",i=null){const o=s.find("#_error_message_option").val(),d=s.find("#_autofill").val(),l=s.find("#_submit_option").val(),c=d?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"",u=s.find("#_back_url_target").val();let f=!1;if(!l||"reload"===l&&(a||1!==o))f=!0,location.reload();else if("redirect"===l){let t=s.find("#_back_url").val();t=e.Utils.addHttp(t),d&&c&&!e.Utils.isExternal(t)&&e.setCookie("account_create_fields",JSON.stringify(c),{path:"/"}),"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const r="_blank"===u;if(!t||!e.isValidUrl(t)||!a&&1===o)return i&&!i.closed&&i.close(),f;if(r)return f=!0,f;i&&!i.closed&&i.close(),location.href=t,f=!0}else if("state"===l&&a){const e=TL_Front.parent_state,a=s.find(".tve-switch-state-trigger"),r=-1!==a.attr("data-tcb-events").indexOf("tl_state_lightbox"),n=s.parents(".tve_post_lightbox").length>0;if(a.trigger("click"),s.tve_form_loading(!0),r)if(n)e&&(TL_Front.close_form(e),delete TL_Front.parent_state);else{const e=t.Event("leads_messages.tcb");e.lightbox_state=!0,s.trigger(e)}TL_Front.parent_state&&(s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click"),delete TL_Front.parent_state),f=!0}else"klicktipp-redirect"===l&&a?r&&e.isValidUrl(r)&&(location.href=r,f=!0):"page"===l&&a&&n&&e.isValidUrl(n)&&(location.href=n,f=!0);return f}function h(){t(".tve_p_lb_background.tve_lb_open .tve_p_lb_close").trigger("click")}!function(){const t=s.find("#_submit_option").val(),e=s.find("#_back_url_target").val();if("redirect"===t&&"_blank"===e)return;const a=o.data("form-target");a&&a.length&&o.find("form").attr("target",a)}(),function(){const a=e.queryString.get("affiliate");if(a){const e=t("<input/>");e.attr("type","hidden").attr("name","tve_affiliate").val(a),s.append(e)}}(),o.find(".tve-lg-err-msg").length&&function(){s.find(".tve_submit_container .thrv_icon").on("click",function(){s.submit()}),s.find(".tve-form-button .tve-form-button-submit").on("click",e=>(e.preventDefault(),e.stopPropagation(),s.submit(),0===s.find(".tve-lg-error").length&&s.find(".tve_lg_date").each(function(){t(this).find(".lg-date-picker").flatpickr().clear()}),!1));const n=l.getErrors(o),i=function(i,d,v){if(s.data("tve-force-submit"))return!0;const g=s.find(".consent-config");g.length&&!g.attr("value")&&"none"!==s.find(".tcb-lg-consent").css("display")&&s.find('[name="user_consent"]').attr("data-required",1);let m=!0;const b=t(d),y={};l.init(),b.find("input, select, textarea").each(function(){const e=t(this),a=e.data("validation"),r=parseInt(this.dataset.required);"password"===e.attr("type")&&(y[e.attr("name")]=e),"number"===e.attr("type")&&(l.validNumber(e)||(m=!1)),"country"===e.attr("data-field")&&(l.validCountry(e)||(m=!1)),"state"===e.attr("data-field")&&(l.validState(e)||(m=!1)),1===r&&(l.required(e,n.required)||(m=!1)),void 0!==a&&"none"!==a&&l[a]&&(l[a](e,n[a])||(m=!1))});const w=b.find('textarea[name="g-recaptcha-response"]');if(w.length>0&&(w.first().val()||(l.markApiError("Please validate captcha form",b.find(".tve-captcha-container"),"captcha"),setTimeout(function(){t("#tve-lg-error-container").fadeOut("slow")},5e3),m=!1)),2===Object.keys(y).length&&(l.mismatch(y,n.passwordmismatch)||(m=!1)),a.hasFileUpload()&&c){const t=c.isValid();!0!==t&&(m=!1,l.markApiError(t,c.$el,"upload"))}if(!m)return l.show(),s.find("."+l.errClass).first().trigger("focus"),!1;let x=null;const k=s.find("#_submit_option").val(),C=s.find("#_back_url_target").val(),E=s.find("#_back_url").val();if("redirect"===k&&"_blank"===C&&E){s.attr("target")&&s.removeAttr("target");let t=e.Utils.addHttp(E);"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const a=e.Utils.isExternal(t)?"noopener,noreferrer":"noopener";x=window.open(t,"_blank",a)}"function"==typeof r.showFormLoader?r.showFormLoader():s.tve_form_loading();const T=s.parents(".thrv_lead_generation").attr("data-connection");if(["api","webhook"].includes(T)||s.parents(".tcb-registration-form").length){const d=s.find("#_autofill").val()?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"";if(o.attr("data-settings-id")||function(){const t=function(){let t="";return"true"===s.find(".tve_lg_radio").attr("data-answer-tag")?s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{a.checked&&a.attributes["data-custom-tag"]&&(t=a.attributes["data-custom-tag"].value)}),t}(),e=function(){let t="";return"true"===s.find(".tve_lg_checkbox:not(.tcb-lg-consent)").attr("data-answer-tag")?s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked&&a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}}),t}(),a=function(){let t="";const e=s.find(".tve_lg_dropdown"),a=e.find(".tve-lg-dropdown-option.tve-state-active");return t="true"===e.attr("data-answer-tag")?a.attr("data-custom-tag")?a.length>0?a.attr("data-custom-tag"):"":a.length>0?a.attr("data-value"):"":a.length>0?a.attr("data-custom-tag"):"",t}(),r=f(t)+f(e)+f(a);var n;r.length&&(n=r,tve_frontend_options.lead_generation_custom_tag_apis.forEach(t=>{const e=s.find(`input[type=hidden]#${t}_tags`);let a=e.length>0?e.attr("value"):"";e.length&&(0===a.length&&","===n.slice(-1)&&(n=n.slice(0,-1)),a=n.replace(/['"`\\]/g,"")+a,e.attr("value",a))}))}(),"function"==typeof r.submitHandler){const t={autofillValues:d,token:v};return a.hasFileUpload()&&c&&(t.uploader=c),r.submitHandler.call(null,i,t)}const g={};t.each(s.serializeArray(),function(t,e){g[e.name]=e.value});let m=s.serialize()+"&action=tve_api_form_submit&url="+encodeURIComponent(location.href);const b=s.find("#_submit_option").val();m+="&_tcb_id="+(o.attr("data-settings-id")||"")+"&tcb_token="+(10*Date.now()).toString(32),s.find(".tve_lg_radio_wrapper input,.tve_lg_checkbox_wrapper input").each((t,e)=>{!e.name||g[e.name]||m.includes(e.name)||(g[e.name]="",m+=`&${e.name}=`)});const y=t.Event("form_conversion.tcb");s.trigger(y),y.post_data&&(m+="&"+t.param(y.post_data));const w=s.closest(".tar-main-content[data-post-id]"),k=w.length?w.attr("data-post-id"):tve_frontend_options.post_id,C=s.closest(".thrive-quiz-builder-shortcode").length>0;return k&&(m+=`&post_id=${k}`),m+=`&frontend_post_id=${tve_frontend_options.post_id}`,v&&(m+="&g-recaptcha-response="+v),a.hasFileUpload()&&c&&(m=c.appendExtraData(m)),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,dataType:"json",data:m}).fail(function(){l.markApiError("An error occurred while submitting your data. Please try again").show(),s.tve_form_loading(!0)}).done(function(r){a.hasFileUpload()&&c&&c.clear(),s.find('input[type="password"]').trigger("keyup");let d="";try{var f=r.form_messages||{},v="";if(r.redirect&&(v=r.redirect,delete r.redirect),delete r.form_messages,r.variation&&delete r.variation,r.back_url){var m=r.back_url;delete r.back_url}var y=Object.keys(r).length>0&&!r.error;if("object"==typeof r.error_message&&r.error_message.length){const t=r.error_message;let a="";t.forEach(t=>{"string"==typeof t&&t.length&&(t=t.trim(),l.markApiError(t).show(),a+=t+"\n")}),s.tve_form_loading(!0),a.length&&(d=a,e.toast(a,!0))}if(r.error){if(r.error_code){const e=r.error_code,a=t.Event("lead_conversion_error_code.tcb",{form_data:g,$form:s,$leadGeneration:o,errorCode:e});if(s.trigger(a),"no_connection"===e&&C){const e=t.Event("skip_next_step.tcb",{$form:s,$leadGeneration:o});return s.trigger(e),i.preventDefault(),!1}}if("captcha"===r.field){const t=n.recaptcha||r.error;l.markApiError(t).show(),s.tve_form_loading(!0)}else u(y,f);return i.preventDefault(),!1}if(d.length)return s.tve_form_loading(!0),i.preventDefault(),!1}catch(t){console.log(t)}const w=t.Event("lead_conversion_success.tcb",{form_data:g,$form:s,$leadGeneration:o});return s.trigger(w),w.content_unlocked&&"message"!==b&&"state"!==b?(i.preventDefault(),!1):(h(),_(y,v,void 0!==m?m:"",x)?(s.tve_form_loading(!0),void p()):(p(),0===d.length&&u(y,f),!0))}).always(()=>{"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&(!tve_dash_front.recaptcha.connection||tve_dash_front.recaptcha.connection&&"v3"!==tve_dash_front.recaptcha.connection.version)&&grecaptcha.reset(),"undefined"!=typeof turnstile&&"function"==typeof turnstile.reset&&turnstile.reset()}),i.stopPropagation(),!1}const N=t.Event("should_submit_form.tcb");if(s.trigger(N),"1"!==s.find("input#_asset_option").val()&&!N.flag_need_data)return!0;let F=s.serialize()+"&action=tve_custom_form_submit&email="+function(t){if(t.find('[data-validation="email"]').length)return t.find('[data-validation="email"]').val();let e="";return t.find("input").each(function(){if(this.name&&this.name.match(/email/i))return e=this.value,!1}),e}(s)+"&name="+function(e){let a=!1;return e.find("input").each(function(){const e=t(this),r=e.attr("placeholder"),n=e.attr("name");if(r&&-1!==r.toLowerCase().indexOf("name")||n&&-1!==n.toLowerCase().indexOf("name"))return a=e,!1}),!1!==a?a.val():""}(s);const A=t.Event("form_conversion.tcb");return s.trigger(A),A.post_data&&(F+="&"+t.param(A.post_data)),tve_frontend_options.post_id&&(F+="&post_id="+tve_frontend_options.post_id),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:F}).always(function(){s.find("input,select,textarea").removeAttr("disabled"),s.find(".tve-form-button").removeClass("tar-disabled"),s.data("tve-force-submit",!0).submit()}),!1};s.on("submit",function(e){const a=this;return t(this).find(".tve-captcha-container").length&&tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version?(grecaptcha.ready(function(){grecaptcha.execute(tve_dash_front.recaptcha.site_key,{action:"submit"}).then(function(t){i(e,a,t)})}),!1):i(e,a)})}()})},e.setModuleLoadedStatus("lead-generation",!0)})(ThriveGlobal.$j,TCB_Front);
(()=>{function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,s)}return r}function e(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?t(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}void 0===TCB_Front.js_modules.login&&TCB_Front.setModuleLoadedStatus("login",!1),(t=>{if(TCB_Front.isModuleLoaded("login"))return;t(window).on("tcb_after_dom_ready",()=>{TCB_Front.Utils.isEditorPage()||t(".thrv-login-element").tve_login_element()}),TCB_Front.loginCallbacks={redirect(t,e){if(e.success&&!0===e.success&&t.redirect_url.length){let e=TCB_Front.Utils.addHttp(t.redirect_url);t.urlParams&&t.urlParams.length&&(e=TCB_Front.Utils.appendFormParamsToURL(e,t.urlParams)),e=TCB_Front.Utils.appendRandomParamToURL(e),(t["login.show_success"]||t.show_success)&&window.location.hostname===function(t){try{return new URL(t).hostname}catch(t){return""}}(e)&&sessionStorage.setItem("tcb_toast_message",t.success_message),TCB_Front.loginKeepLoader=!0,document.location.href=TCB_Front.Utils.addHttp(e)}},refresh(t,e){TCB_Front.loginKeepLoader=!0,e.success&&!0===e.success&&t["login.show_success"]&&sessionStorage.setItem("tcb_toast_message",t.success_message),location.reload()},noRedirect(t,e){e.success&&!0===e.success&&t["login.show_success"]&&TCB_Front.Utils.toast(t.success_message,!1)},showMessage(t,e){e.success&&!0===e.success&&TCB_Front.Utils.toast(t.success_message,!1)}};class r{constructor(e){this.$wrapper=e,this.data={action:"tve_login_submit"},this._config=TCB_Front.Utils.unserialize(TCB_Front.Base64.decode(this.$wrapper.find('input[name="config"]').val())),this._config.form_type=e.attr("data-type")||"login",this.initStates(),this.switchState(tve_frontend_options.current_user.user_email?"logged_in":this.determineDefaultState()),this.$wrapper.find("[data-state]").on("tcb.change_state",(t,e)=>{this.switchState(e.state)}),this.$wrapper.fadeIn("slow"),t(window).on("hashchange",()=>{const t=this.getStateFromHash();t&&this.switchState(t)});const r=new URL(location.href).searchParams.get("ret");r&&(this._config.submit_action=this._config.post_register_action="redirect",this._config.redirect_url=this._config["post_register_action.redirect_url"]=r)}hasState(t){return"both"===this._config.form_type||this._config.form_type===t}getStateFromHash(){if(window.location.hash){const t=window.location.hash.replace("#tcb-","");if(["login","register"].includes(t)&&this.hasState(t))return t}return null}determineDefaultState(){const t=this.$wrapper.attr("data-default-state")||"login";return this.getStateFromHash()||t}initStates(){this.states={},this.$wrapper.find("[data-state]").each((t,e)=>this.states[e.dataset.state]=this.stateFactory(e.dataset.state))}stateFactory(t){const e={form:this.$wrapper.find(`[data-state="${t}"]`),config:this._config};let r;switch(t){case"login":r=new i(e);break;case"forgot_password":r=new o(e);break;case"register":r=new n(e);break;default:r=new s(e)}return r}getAjaxData(){const e=this.activeState.getAjaxData();return"string"==typeof e?t.param(this.data)+"&"+e:t.extend({},this.data,e)}switchState(t){this.activeState&&this.activeState.resetErrors().clearForm(),this.$wrapper.find(".tcb-login-form-wrapper").removeClass("tve-active-state").addClass("tcb-permanently-hidden"),this.$wrapper.find('[data-state="'+t+'"]').removeClass("tcb-permanently-hidden").addClass("tve-active-state"),this.activeState=this.states[t],requestAnimationFrame(this.activeState.focusFirstInput.bind(this.activeState))}bindEvents(){return this.$wrapper.find(".tar-login-submit").off("click").on("click",()=>(this.activeState.getForm().trigger("submit"),!1)),this.$wrapper.find(".tve-dynamic-link:not(.tar-login-submit *)").off("click").on("click",t=>{if(this._onSwitchState(t),"logout"!==t.currentTarget.dataset.shortcodeId)return!1}),this.$wrapper.find("form").off("submit.tar_login_element thrive_submit user_loggedin").on("submit.tar_login_element thrive_submit",t=>{this._onSubmit(t)}).on("user_loggedin",()=>{TCB_Front.$body.addClass("logged-in").find(".tcb-hide-logged-in").remove()}),t.each(this.states,(t,e)=>e.afterInit()),this}_getStateToSwitch(t){let e=null;switch(t){case"bk_to_login":case"login":e="login";break;case"forgot_password":e="forgot_password";break;case"register":e="register"}return e}_onSwitchState(t){const e=this.$wrapper.find(t.currentTarget);if("thrive_login_form_shortcode"!==e.data("dynamic-link"))return;const r=this._getStateToSwitch(e.data("shortcode-id"));r&&(t.preventDefault(),this.switchState(r))}_onSubmit(t){if(t.preventDefault(),t.stopPropagation(),!0!==this.validate())return this.error();this.send()}validate(){return this.activeState.validate()}error(){return this.activeState.showErrors()}send(){const e=this.activeState;e.beforeSend(),delete TCB_Front.loginKeepLoader,t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:this.getAjaxData()}).fail(t=>e.onFail(t)).done(t=>e.onSuccess(t)).always(()=>{TCB_Front.loginKeepLoader||e.removeLoader()})}}class s{constructor(t){this.$form=t.form,this.config=t.config,this.attributes={},this.action="",this.errors=[],this.init(),this._dataBind()}getForm(){return this.$form.find("form").first()}init(){}afterInit(){}_dataBind(){Object.keys(this.attributes).forEach(t=>{const e=this.$form.find('input[name="'+t+'"]');"checkbox"===e.attr("type")?e.on("change",()=>{this.attributes[t]=e.prop("checked")?1:0}):e.on("input",()=>{this.attributes[t]=e.val()}),setTimeout(()=>{e.trigger("input")},240)})}getAjaxData(){return t.extend({after_submit:this.config.submit_action},this.attributes,{custom_action:this.action})}removeLoader(){this.loader(!0),this.$form.find("button[type=submit]").hide()}onSuccess(){}onFail(){}beforeSend(){this.loader()}loader(e=!1){return!0===e?(this.$form.find(".tcb-form-loader").remove(),this):(t('<div class="tcb-form-loader"><span class="tcb-form-loader-icon thrv-icon-spinner9"></span></div>').appendTo(this.$form).show(),this.$form.find("input,a,button").blur(),this)}clearForm(){return Object.keys(this.attributes).forEach(t=>{this.attributes[t]="",this.$form.find('input[name="'+t+'"]').val("")}),this}resetErrors(){return this.errors=[],this.$form.find(".tcb-form-error").remove(),this.$form.find(".tcb-form-input-error").removeClass("tcb-form-input-error"),this}validate(){return this.resetErrors(),!0}showErrors(){this.$form.find(".tcb-form-error").remove(),Object.keys(this.attributes).forEach(t=>{const e="empty_"+t;this.errors.includes(e)&&"string"==typeof tve_frontend_options.translations[e]&&this.showError(this.$form.find('input[name="'+t+'"]'),tve_frontend_options.translations[e])})}showError(t,e){t.is(":radio,:checkbox")&&(t=t.parents(".tve_lg_input_container").first()),t.hasClass("tcb-form-input-error")||(t.addClass("tcb-form-input-error").parent().addClass("tcb-form-input-error").after(`<span class="tcb-form-error">${e}</span>`),setTimeout(()=>{this.resetErrors()},5e3))}focusFirstInput(){TCB_Front.isInViewport(this.$form)&&this.$form.find("input:visible").first().trigger("focus")}}class i extends s{init(){super.init(),this.attributes={username:"",password:"",remember_me:""},this.action="login",this.$form.find(".tcb-remember-me-item").off("click").on("click",t=>{"checkbox"!==t.target.type&&this.$form.find('input[name="remember_me"]:not(.checkbox-update)').trigger("click")})}onSuccess(t){super.onSuccess(t);const r=t.errors&&t.errors.length;if(r){let e="";t.errors.forEach(t=>{e+=t+"<br />"}),TCB_Front.Utils.toast(e,!0)}else"function"==typeof TCB_Front.loginCallbacks[this.config.submit_action]?TCB_Front.loginCallbacks[this.config.submit_action](this.config,t):t.external_redirect_url&&TCB_Front.loginCallbacks.redirect(e(e({},this.config),{},{redirect_url:t.external_redirect_url}),t);r||"noRedirect"!==this.config.submit_action&&"showMessage"!==this.config.submit_action||(this.$form.trigger("tcb.change_state",{state:"logged_in"}),this.getForm().trigger("user_loggedin")),TCB_Front.loginKeepLoader||this.clearForm()}validate(){return this.resetErrors(),this.attributes.username.length||this.errors.push("empty_username"),this.attributes.password.length||this.errors.push("empty_password"),0===this.errors.length}}class o extends s{init(){super.init(),this.attributes={login:""},this.action="recover_password"}onSuccess(t){super.onSuccess(t);let e="";t.errors&&(Array.isArray(t.errors)?e=t.errors.join("<br>"):Object.keys(t.errors).forEach(r=>{e+=(e?"<br>":"")+t.errors[r]})),e?TCB_Front.Utils.toast(e,!0):(this.clearForm(),this.$form.trigger("tcb.change_state",{state:"reset_confirmation"}))}validate(){return this.resetErrors(),this.attributes.login.length||this.errors.push("empty_login"),0===this.errors.length}}class n extends s{init(){super.init(),this.attributes={},this.action="register",this.config.error_messages=tve_frontend_options.translations.registration_err;try{this.config.error_messages=e(e({},this.config.error_messages),JSON.parse(this.$form.find(".tve-lg-err-msg").val()))}catch(t){}}hasLoginState(){return"register"!==this.config.form_type}getAjaxData(){let t=this.getForm().serialize()+`&post_id=${tve_frontend_options.post_id}&custom_action=${this.action}&_tcb_id=${this.$form.find(".tcb-registration-form").attr("data-settings-id")||""}&tcb_token=${(10*Date.now()).toString(32)}`;return TCB_Front.isModuleLoaded("file-upload")&&this.uploader&&(t=this.uploader.appendExtraData(t)),t+="&after_submit="+this.config.post_register_action,t}afterInit(){const t=this;this.getForm().off("submit.tar_login_element").attr("action","#");const e=this.$form.find(".tcb-registration-form").tve_front_lead_generation({renderError(e,r,s){let i,o;switch(e.length||(e=t.$form.find(".tar-login-submit")),s){case"captcha":o=r,e=e.children().first();break;case"upload":e=e.children().first(),o=r;break;case"email":i="invalid_email";break;case"passwordmismatch":i="passwordmismatch";break;default:i=s+"_"+e.attr("name")}o||(o=t.config.error_messages[i]||t.config.error_messages.required_field||"Please check this field"),t.showError(e,o)},clearErrors(){t.resetErrors()},showFormLoader(){t.loader()},submitHandler(e,r){e.preventDefault();const s=t.getForm();return r.token&&s.find(".tve-recaptcha-response").remove().end().append(`<input type="hidden" name="g-recaptcha-response" value="${r.token}" class="tve-recaptcha-response">`),s.trigger("thrive_submit"),!1}});TCB_Front.isModuleLoaded("file-upload")&&(this.uploader=e.data("tcb-file-upload"))}onFail(t){if(t.responseJSON&&t.responseJSON.error){let e;if(t.responseJSON.field&&(e=this.getForm().find(`[name="${t.responseJSON.field}"]`),"email"===t.responseJSON.field&&this.getForm().find('[name*="password"]').val("").trigger("keyup")),e&&e.length||(e=this.getForm().find(".tar-login-submit .tcb-button-link").first()),this.showError(e,t.responseJSON.error),"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&(!tve_dash_front.recaptcha.connection||tve_dash_front.recaptcha.connection&&"v3"!==tve_dash_front.recaptcha.connection.version))try{grecaptcha.reset()}catch(t){}if("undefined"!=typeof turnstile&&"function"==typeof turnstile.reset)try{turnstile.reset()}catch(t){}}}onSuccess(t){switch(TCB_Front.isModuleLoaded("file-upload")&&this.uploader&&this.uploader.clear(),this.config.post_register_action){case"refresh":TCB_Front.loginKeepLoader=!0,t.success&&!0===t.success&&this.config["post_register_action.show_success"]&&sessionStorage.setItem("tcb_toast_message",this.config["post_register_action.success_message"]),location.reload();break;case"showMessage":TCB_Front.Utils.toast(this.config["post_register_action.success_message"]);let r="login";t.logged_in&&(TCB_Front.$body.addClass("logged-in"),r="logged_in"),"login"!==r||this.hasLoginState()?this.$form.trigger("tcb.change_state",{state:r}):this.$form.closest(".thrv-login-element").hide();break;default:const s=TCB_Front.loginCallbacks[this.config.post_register_action],i=1===parseInt(this.config["register.send_form_values"])?TCB_Front.Utils.buildFormParams(this.getForm()):[];"function"==typeof s?s.call(TCB_Front.loginCallbacks,{redirect_url:this.config["post_register_action.redirect_url"],submit_action:this.config.post_register_action,success_message:this.config["post_register_action.success_message"],show_success:this.config["post_register_action.show_success"],urlParams:i},t):t.external_redirect_url&&TCB_Front.loginCallbacks.redirect(e(e({},this.config),{},{redirect_url:t.external_redirect_url,success_message:this.config["post_register_action.success_message"],show_success:this.config["post_register_action.show_success"],urlParams:i}),t)}TCB_Front.loginKeepLoader||(this.getForm()[0].reset(),"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&(!tve_dash_front.recaptcha.connection||tve_dash_front.recaptcha.connection&&"v3"!==tve_dash_front.recaptcha.connection.version)&&grecaptcha.reset(),"undefined"!=typeof turnstile&&"function"==typeof turnstile.reset&&turnstile.reset(),this.$form.find('input[type="password"]').trigger("keyup"))}}const a=!tve_frontend_options.is_editor_page&&tve_frontend_options.current_user&&tve_frontend_options.current_user.id;t.fn.tve_login_element=function(){return this.hasClass("thrv-login-element")?this.each((e,s)=>{const i=t(s);a&&i.hasClass("tcb-hide-logged-in")?i.remove():i.data("tcbLoginForm")||i.data("tcbLoginForm",new r(i).bindEvents())}):this},TCB_Front.setModuleLoadedStatus("login",!0)})(ThriveGlobal.$j)})();
(()=>{var t={74208(t){void 0===TCB_Front.js_modules.menu&&TCB_Front.setModuleLoadedStatus("menu",!1),function(e,n){if(TCB_Front.isModuleLoaded("menu"))return;const i=t=>["auto","scroll","hidden"].includes(t.css("overflow"));let o;function s(t){return e(t).closest(".thrv_widget_menu")}const a={init(){tve_frontend_options.is_editor_page||a.frontendInit(),a.customMenuSwitchIcon(),o||(o=a.customMenuSwitchIcon.bind(this,!1),n.addResizeCallback(o)),a.zIndexOrder(),e(".thrv_widget_menu").each((t,e)=>{a.addMutationListener(e)}),a.handleHiddenItems()},handleHiddenItems(){e(".thrv_widget_menu ul").each((t,n)=>{const i=e(n),o=i.closest("li").find("> a .tve-item-dropdown-trigger"),s=this.hasVisibleItems(i);s||n.style.setProperty("display","none","important"),o.toggle(s)})},hasVisibleItems(t){let e=!1;return t.find("> li").each((t,n)=>{getComputedStyle(n).getPropertyValue("display").includes("none")||(e=!0)}),e},zIndexOrder(){const t=e("ul.tve_w_menu");n.highestZIndex=t.length+6;let i=n.highestZIndex;t.each(function(){this.style.zIndex=i+5;const t=e(this),n=t.closest("#content");t.find("ul").css("z-index",i+6).parent().addClass("menu-item-has-children"),t.parentsUntil("body,#wrapper,#tve_editor").each(function(){const t=e(this);let n=parseInt(t.css("z-index"));isNaN(n)&&(n=0),n=800===n?i+7:Math.max(n,i+7),"static"!==t.css("position")&&(this.style.setProperty("z-index",n,"important"),this.classList.add("tcb-mp"))}),n.length&&"static"!==n.css("position")&&n.css("z-index",i+7).addClass("tcb-mp"),i--})},frontendInit(t){const o=this;function s(t,i){const o=t.attr("href"),s=t[0]?t[0].hash:"",a=t.attr("target");if(s){let i;try{i=e(s)}catch(t){}i&&i.length&&n.jumpScrollTo(i,t[0])}a||i.ctrlKey||i.metaKey?window.open(o,a||"_blank"):location.href=o}(t=t||n.$document).off("click.menu-disable-links").on("click.menu-disable-links",".tve-active-disabled .tve_w_menu .tve-state-active",function(t){const n=e(this).closest("li");if(!a.isHamburger(this)||!n.hasClass("menu-item-has-children"))return t.tvePreventNavigation=!0,!1}),t.off("menu_item_anchor_clicked").on("menu_item_anchor_clicked",".tve_w_menu li",function(){const t=e(this);a.isHamburger(t)&&requestAnimationFrame(()=>{a.toggleState(t,!1)})}),t.off("click.menu_item_click").on("click.menu_item_click",".tve_w_menu li:not(.tve-regular .tcb-mega-drop li)",function(t){if(t.tvePreventNavigation)return!0;if(t.stopPropagation(),e(t.target).closest(".tve-regular .tcb-mega-drop").length)return!0;const n=e(this),l=n.children("a").first(),r=l[0],d=!!n.find("ul").length,c=e(t.target).closest(".tve-item-dropdown-trigger").length||e(t.clickedTarget).closest(".tve-item-dropdown-trigger").length,u=n.closest(".thrv_widget_menu").attr("class").includes("tve-custom-menu-switch-icon-"),h=n.closest(".tve_w_menu").hasClass("tve_vertical");if((u||h)&&d){if(!c&&n.hasClass("expand-children")&&function(t){const e=t.attr("href");return e&&"#"!==e&&0!==e.indexOf("javascript:")}(l))return l.hasClass("tve-jump-scroll")?l.trigger("click"):s(l,t),!1;n.toggleClass("expand-children");const e=n.find("ul").first(),a=n.hasClass("expand-children");o.hasVisibleItems(e)&&e[a?"slideDown":"slideUp"](100);const r=e.closest(".section-content,.tve-cb");if(i(r)){let t={top:"",left:"",width:""};if(a){const{top:n,left:i,width:o}=e[0].getBoundingClientRect();t={top:n,left:i,width:o},e.data("fixed-position",{top:n,scrollTop:r.scrollTop()})}e.toggleClass("fixed-menu-item",a).css(t)}return!1}if(d&&c)return!1;const m=n.children(".tve_et_click");return m.length>0?(m.trigger("click"),!0):!!l.attr("href")&&(l.hasClass("tve-jump-scroll")?(l.trigger("click"),!0):(s(l,t),void(a.isHamburger(n)&&r.pathname===window.location.pathname&&r.host===window.location.host&&r.protocol===window.location.protocol&&requestAnimationFrame(()=>{a.toggleState(n,!1)}))))}),t.off("click.prevent_navigation").on("click.prevent_navigation",".tve_w_menu li a:not(.thrv_text_element a):not(.tve-regular .tcb-mega-drop a)",function(t){t.preventDefault()}),t.off("click.custom_menu").on("click.custom_menu",".tve-m-trigger",function(){return a.toggleState(this),!1}),t.off("mousedown.close_menu").on("mousedown.close_menu",t=>{e(t.target).closest(".thrv_widget_menu").length||a.closeAll()}),n.addResizeCallback(a.customMenuResponsive),n.addResizeCallback(a.mobileResponsiveToggle),a.customMenuResponsive(),a.refreshActiveStates(t),TCB_Front.$window.off("hashchange.tcb").on("hashchange.tcb",a.refreshActiveStates.bind(a,TCB_Front.$body)),a.positionLogo(t),a.mobileResponsiveToggle(),t.find(".section-content,.tve-cb").each((t,n)=>{const o=e(n);i(o)&&o.off("scroll.menu").on("scroll.menu",t=>{o.find(".fixed-menu-item").each((n,i)=>{const o=e(i),s=o.data("fixed-position"),a=parseInt(s.top)+(s.scrollTop-t.currentTarget.scrollTop);o.css("top",`${a}px`)})})})},mobileResponsiveToggle(){"mobile"===n.getDisplayType()?(n.$body.find(".vmd-right").attr("data-toggle-dir","vmd-right").removeClass("vmd-right").addClass("vmd-toggle"),n.$body.find(".vmd-left").attr("data-toggle-dir","vmd-left").removeClass("vmd-left").addClass("vmd-toggle")):n.$body.find(".vmd-toggle").each((t,e)=>{const n=e.getAttribute("data-toggle-dir");n&&(e.classList.remove("vmd-toggle"),e.classList.add(n))})},refreshActiveStates(t=TCB_Front.$body){t.find(".tve-custom-menu-type li > a").each(function(){if(!this.getAttribute("href")||"#"===this.getAttribute("href")||0===this.getAttribute("href").indexOf("javascript"))return;const t=e(this),n=location.protocol===this.protocol&&location.hostname===this.hostname&&location.pathname===this.pathname&&location.hash===this.hash;t.toggleClass("tve-state-active",n),t.parent().toggleClass("tve-state-active",n)})},customMenuResponsive(){e(".tve-m-trigger:visible").length?e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("ul a").attr("data-tve-custom-colour")){const n=t.find("ul a").attr("data-tve-custom-colour");t.find("> li > a").each(function(){const t=e(this);t.attr("data-tve-custom-colour")&&(t.attr("data-o-color",t.attr("data-tve-custom-colour")),t.attr("data-tve-custom-colour",n))})}t.data("tve-colors-added",!0)}):(e(".tve-m-expanded").removeClass("tve-m-expanded"),e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("> li > a").attr("data-o-color")){const e=t.find("> li > a"),n=e.attr("data-o-color");e.attr("data-tve-custom-colour",n).removeAttr("data-o-color")}t.data("tve-colors-added",!1)}))},customMenuSwitchIcon(t=!0){const i=n.getDisplayType();e(".thrv_widget_menu").each(function(){const n=e(this),o=n.attr("data-tve-allhoriz");let s=n.attr("data-tve-switch-icon"),l=!1;const r=n.data("tve-frontend-init");n.data("tve-frontend-init",!0),s||o||(s="tablet,mobile");const d=s.split(","),c=n.hasClass("tve-regular")||!r&&!n.find(".tve-m-trigger").is(":visible");if(n.removeClass("tve-custom-menu-switch-icon-desktop tve-custom-menu-switch-icon-tablet tve-custom-menu-switch-icon-mobile"),t&&n.find("ul:not(.tcb-masonry.masonry)").removeAttr("style"),d.includes(i)?n.addClass(`tve-custom-menu-switch-icon-${i}`):l=!0,n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l),n.find("li.menu-item").toggleClass("tcb-menu-img-hamburger",!l),r&&l&&c)return void a.ensureOnScreenDropdown(n);n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l);const u=n.find(":not(.tve-ham-wrap) > ul.tve_w_menu, .tve-ham-wrap");if(l)a.ensureRegularLogoSplit(n),n.find("ul").removeAttr("style"),n.find("li").removeClass("expand-children"),n.find(".tve-m-expanded").removeClass("tve-m-expanded"),u.removeAttr("style"),setTimeout(()=>n.find(".tcb-masonry").masonry(),1e3);else{if(a.ensureHamburgerLogoSplit(n),n.find(".tcb-masonry").each(function(){const t=e(this);t.data("masonry")&&t.masonry("destroy")}),!n.data("calc-dimensions")){n.find(".sub-menu").slideDown(0).slideUp(0).removeAttr("style"),n.data("calc-dimensions",!0);const t=u.attr("style","height: auto !important;max-height:none !important").outerHeight();u.removeAttr("style"),n.data("calc-height",t)}t?a.toggleState(n,!1):a.reposition(n)}a.ensureOnScreenDropdown(n)})},isHamburger(t){const e=s(t);return e.length>0&&e.attr("class").includes("tve-custom-menu-switch-icon-")},isVertical(t){const e=s(t);return e.length>0&&e.find(".tve_vertical").length>0},toggleState(t,e,i=100){const o=s(t),l=o.find("ul").first();let r=o.find(".tve-ham-wrap");0===r.length&&(r=l);const d=r.hasClass("tve-m-expanded");let c=!d;if(!this.hasVisibleItems(l))return o;if(void 0!==e&&(c=e),c===d)return o;if(o.hasClass("tve-mobile-side-fullscreen")&&n.$body.toggleClass("tve-fullscreen-menu",c),o.find(".tve-m-trigger").toggleClass("tve-triggered-icon",e),c?o.parents(".tcb-mp").addBack().css("z-index",800):setTimeout(()=>{a.zIndexOrder()},100),!o.hasClass("tve-mobile-dropdown")){if(c&&tve_frontend_options.is_editor_page){const t=o.find(".tve-m-trigger");t.hasClass("close-offscreen-icon-available")||t.append(t.find(".tcb-icon-close").clone().removeClass("tcb-icon-close").addClass("tcb-icon-close-offscreen")).addClass("close-offscreen-icon-available ")}return r.toggleClass("tve-m-expanded",e).removeAttr("style"),o}if(c){r.css("display","flex");const t=this.getMenuPositionalParent(o),e=parseInt(o.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(o,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),d=this.getMenuDropdownPosition(o,r,l);r.attr("style",`visibility: visible;display: flex;margin-left: 0 !important;${d}width:${l}px !important;max-height:${e}px`),r.addClass("tve-m-expanded");const c=o.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=r.outerWidth(),e=this.calculateViewportBasedPosition(a,t,l,o);r.css("left",`${e}px`)}),setTimeout(()=>{r.css("max-height","none")},i)}else o.data("calc-height",r.outerHeight()),r.stop().slideUp(i,()=>{r.removeClass("tve-m-expanded").removeAttr("style"),r.css("visibility","hidden")});return o},calculateViewportBasedPosition(t,e,n,i){const o=i.offset(),s=window.innerWidth||document.documentElement.clientWidth;let a;if("left"===t)a=-o.left;else if("right"===t)a=s-o.left-e;else if("full"===t&&e>=n)a=-o.left;else{const t=e/2;a=s/2-o.left-t}return a},getEffectiveMenuWidth(t,e){let n=e;const i=t.find(".tve_w_menu").first(),o=i.length>0?i:t;let s=o.css("max-width");if((!s||"none"===s)&&window.getComputedStyle&&o[0]){const t=window.getComputedStyle(o[0]).getPropertyValue("--tve-set-max-width");t&&(s=t.trim())}if(s&&"none"!==s){const t=parseFloat(s);!isNaN(t)&&t<e&&(n=t)}return n},getMenuDropdownPosition(t,e,i){const o=n.getDisplayType();let s=n.getMediaAttr(t,"data-dropdown-position",o);const a=t.find(".tve-m-trigger .tcb-icon-close"),l=a.offset(),r=t.offset();let d="";const c=t.hasClass("tve-mobile-dropdown");switch(e.is("ul")&&(e=this.getMenuPositionalParent(t),s="full"),"mobile"===o&&(s="full"),s){case"left":d="tablet"===o&&c?`left:${-r.left}px;right:unset;`:`right: ${parseInt(r.left+t.outerWidth()-l.left-a.outerWidth())}px;left: unset;`;break;case"right":if("tablet"===o&&c){const t=i;d=`left:${(window.innerWidth||document.documentElement.clientWidth)-r.left-t}px;right:unset;`}else d=`left: ${parseInt(l.left-r.left)}px;right:unset;`;break;case"full":if("tablet"===o&&c){const t=window.innerWidth||document.documentElement.clientWidth,n=this.getEffectiveMenuWidth(e,i);if(n>=i)d=`left:${-r.left}px;`;else{const e=n/2;d=`left:${t/2-r.left-e}px;`}}else d=`left:${this.getMenuPositionalParent(t).offset().left-r.left}px;`;break;default:if("tablet"===o&&c){const t=(window.innerWidth||document.documentElement.clientWidth)/2,n=this.getEffectiveMenuWidth(e,i)/2;d=`left:${t-r.left-n}px;`}else{if(void 0!==s&&1===parseInt(t.attr("data-offscreen-width-setup"))){let t=e.css("max-width");(t.includes("%")||"none"===t)&&(t=e.outerWidth()),i=Math.min(i,parseInt(t))}d=`left: ${parseInt(l.left-r.left-i/2+a.outerWidth()/2)}px;right:unset;`}}return d},getMenuPositionalParent:t=>t.closest(".tve-page-section-in, #tve_editor, #wrapper, .section-content"),reposition(t){const e=s(t),i=e.find(".tve-m-expanded").first(),o=i.length>0;if(e.find(".tve-m-trigger").toggleClass("tve-triggered-icon",o&&e.attr("class").includes("tve-mobile-")),o&&e.hasClass("tve-mobile-dropdown")){const t=this.getMenuPositionalParent(e),o=parseInt(e.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(e,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),r=this.getMenuDropdownPosition(e,i,l);let d=i.css("display");"none"===d&&(d="flex"),i.attr("style",`visibility: visible;margin-left: 0 !important;${r}width:${l}px !important;max-height:${o}px;display:${d}`);const c=e.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=i.outerWidth(),n=this.calculateViewportBasedPosition(a,t,l,e);i.css("left",`${n}px`)}),setTimeout(()=>{i.css("max-height","none")},100)}return e},closeAll(){e(".thrv_widget_menu").each((t,e)=>{a.toggleState(e,!1)})},positionLogo(t){(t||n.$body).find(".tcb-menu-logo-wrap").each((t,n)=>{const i=e(n),o=i.siblings(),s=Math.floor(o.length/2);o.eq(s).before(i)})},ensureLogoSplit(t){const e=s(t);e.hasClass("tcb-logo-split")&&(a.isHamburger(e)?a.ensureHamburgerLogoSplit(t):a.ensureRegularLogoSplit(t))},ensureHamburgerLogoSplit(t,n=s(t).find("li.tcb-menu-logo-wrap")){const i=s(t);if(n.children().length){i.find(".tcb-hamburger-logo").remove();const t=e('<div class="tcb-hamburger-logo"></div>');t.append(n.children()),i.find(".thrive-shortcode-html").prepend(t)}},ensureRegularLogoSplit(t){const e=s(t),n=e.find(".tcb-hamburger-logo .tcb-logo"),i=e.find("li.tcb-menu-logo-wrap");n.length&&i.length&&i.empty().append(n),a.handleLogoOverflow(e)},handleLogoOverflow(t){const e=t.find("li.tcb-menu-logo-wrap");if(e.length)if(a.menuOverflows(t)){const t=e.outerHeight(!0),n=e.outerWidth();e.closest(".thrive-shortcode-html").css("padding-top",t+"px"),e.css({top:`-${t}px`,left:`calc(50% - ${Math.round(n/2)}px)`,position:"absolute"})}else e.removeAttr("style"),e.closest(".thrive-shortcode-html").css("padding-top","");else t.find(".thrive-shortcode-html").css("padding-top","")},menuOverflows(t){let n=0;return t.find(".tve_w_menu > li").each(function(){n+=e(this).outerWidth(!0)}),n>t.parent().width()-5},addMutationListener(t){const e=s(t);let i;const o=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(a.handleLogoOverflow.bind(this,e))};if(window.ResizeObserver){const t=e.find("ul.tve_w_menu")[0];if(!t)return;const i=new ResizeObserver(o);if(!e.data("resize-observer")){i.observe(t),e.data("resize-observer",i);const n=new MutationObserver(t=>{Array.from(t).forEach(t=>{t.target.classList.contains("tcb-menu-logo-wrap")||"UL"===t.target.tagName&&"childList"===t.type&&t.addedNodes.length&&Array.from(t.addedNodes).forEach(t=>n.observe(t,{attributes:!0}))}),e.hasClass("tve-regular")&&o()});e.find(".tve_w_menu > li:not(.tcb-menu-logo-wrap)").each((t,e)=>{n.observe(e,{attributes:!0})})}const s=e.find("li.tcb-menu-logo-wrap");if(s.length&&!s.data("resize-observer")&&(s.data("resize-observer",i),i.observe(s[0])),e.hasClass("tcb-mega-std")&&!e.data("mega-resize-observer")){let t;const i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(a.handleMegaMenuPosition.bind(this,e))});e.find(".tcb-mega-drop").each((t,e)=>{n.inlineCssVariable(e,"top","var(--mega-menu-top,100%)")}),i.observe(e[0]),e.data("mega-resize-observer",i)}}},handleMegaMenuPosition(t){const e=t.find(".tve_w_menu");if(e.length){const i=t[0].getBoundingClientRect().bottom,o=getComputedStyle(e[0]),s=parseInt(o.getPropertyValue("border-bottom-width"));t.find(".menu-item.menu-item-has-children.lvl-0").each((t,e)=>{const o=e.getBoundingClientRect().bottom,a=i-o-s;a>0?n.inlineCssVariable(e,"--mega-menu-top",`calc(100% - ${a}px)`):n.inlineCssVariable(e,"--mega-menu-top","")})}},ensureOnScreenDropdown(t){const i=s(t),o=i.hasClass("tve-regular"),a=i.hasClass("tve-vertical-menu"),l=i.offset().left+i.outerWidth();i.find("li:last-child > ul").each((t,n)=>{const i=e(n),s=i.offset().left+i.outerWidth();Math.ceil(s-l)>=0&&o&&s<i.outerWidth()?i.css({left:"auto",right:"0px"}):i.css({left:"",right:""})}),o||a?i.find(".tve_w_menu > li li").each((t,e)=>{let i;a&&(i=e.parentNode.closest("li"),i&&i.classList.add("expand-children"));const s=e.getBoundingClientRect();let l=parseFloat(e.getAttribute("data-init-width"));if(l||(l=s.width,e.setAttribute("data-init-width",l)),l+s.left>document.body.offsetWidth){const t=document.body.offsetWidth-s.left,i=l-t;o&&l>t&&n.inlineCssVariable(e.parentNode,{left:`calc(100% - ${i}px)`})}else n.inlineCssVariable(e,{"max-width":"","min-width":""});i&&i.classList.remove("expand-children")}):i.find(".tve_w_menu > li li").each((t,e)=>{n.inlineCssVariable(e,{"max-width":"","min-width":""})})}};e(window).on("tcb_after_dom_ready",()=>a.init()),window.addEventListener("load",()=>a.init()),window.TCB_Front.menu=a,t.exports=a,TCB_Front.setModuleLoadedStatus("menu",!0)}(ThriveGlobal.$j,TCB_Front)}},e={};!function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}(74208)})();
void 0===TCB_Front.js_modules["number-counter-compat"]&&TCB_Front.setModuleLoadedStatus("number-counter-compat",!1),(t=>{if(TCB_Front.isModuleLoaded("number-counter-compat"))return;t(window).on("tcb_after_dom_ready",()=>{t(".thrv_number_counter").each((o,n)=>e.init(t(n)))});const e={init(e){e.on("tve.start-animation",function(){const e=t(".tve_numberc_text",this),o=e.attr("data-counter"),n=e.attr("data-counter-start")?e.attr("data-counter-start"):0,r=parseInt(n);let a=null,u=Math.ceil((o>r?o:r)/100);u=u||1,r<o?function t(o,n){o<=n?(e.text(o),(o+=u)+u>n&&(e.text(n),clearTimeout(a)),a=setTimeout(function(){t(o,n)},50)):clearTimeout(a)}(r,o):function t(o,n){o>=n?(e.text(o),(o-=u)-u<n&&(e.text(n),clearTimeout(a)),a=setTimeout(function(){t(o,n)},50)):clearTimeout(a)}(r,o)})}};TCB_Front.setModuleLoadedStatus("number-counter-compat",!0)})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules["post-grid-compat"]&&TCB_Front.setModuleLoadedStatus("post-grid-compat",!1),(t=>{if(TCB_Front.isModuleLoaded("post-grid-compat"))return;window.addEventListener("load",function(){o.postGridLayout()});const o={postGridLayout(){try{t(".tve_post_grid_masonry,.tcb-post-list.masonry").each(function(){const o=this.dataset.masonry?JSON.parse(this.dataset.masonry):{},s=TCB_Front.getDisplayType()[0];void 0!==o[`gutter-${s}`]&&(o.gutter=parseInt(o[`gutter-${s}`])),t(this).masonry(o).css("opacity",1)})}catch(t){console.log(t)}const o=t(".tve_post_grid_grid");o.length<=0||o.find(".tve_pg_row").each(function(){let o=0;const s=t(this).css("height","");s.find(".tve_post").each(function(){const s=t(this),e=s.outerHeight();e>o&&(o=e),s.css("height","100%")}),s.css("height",o-1+"px")})}};t(window).on("tcb_after_dom_ready",()=>{o.postGridLayout(),TCB_Front.Utils.isEditorPage()||TCB_Front.addResizeCallback(o.postGridLayout)}).on("tcb_toggle_open",()=>o.postGridLayout()).on("tl_form_opened",()=>o.postGridLayout()).on("tcb_on_content_show",()=>o.postGridLayout()).on("tcb_before_lightbox_reposition",()=>o.postGridLayout()).on("tcb_post_list_after_item_insert",()=>o.postGridLayout()).on("tcb_off_screen_sidebar_toggle",()=>o.postGridLayout()),window.TCB_Front.postGridLayout=o.postGridLayout,TCB_Front.setModuleLoadedStatus("post-grid-compat",!0)})(ThriveGlobal.$j);
(()=>{function t(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),s.push.apply(s,a)}return s}function e(e){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?t(Object(i),!0).forEach(function(t){s(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(t,e,s){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}void 0===TCB_Front.js_modules.pagination&&TCB_Front.setModuleLoadedStatus("pagination",!1),function(t){if(TCB_Front.isModuleLoaded("pagination"))return;const s="tcb-pagination-number",a="tcb-pagination-current",i="tcb-pagination-dots",r="tcb-pagination-link",n="tcb-pagination-button",o="tcb-permanently-hidden";class l{constructor(e,s){this.type=e,this.list=s,this.$element=t(`.tcb-pagination[data-list="${this.list.identifier}"]`)}static factory(t,s){let a,i={load_more:g,numeric:c};const r=ThriveGlobal.$j.Event("tcb_pagination_extra_classes.tcb");return s.$element.trigger(r),r.paginationClasses&&(i=e(e({},i),r.paginationClasses)),void 0===i[t]?console.warn("A pagination class for this type does not exist!"):a=i[t],new a(t,s)}addLoadListeners(){console.warn("Overwrite this function!")}load(){console.warn("Overwrite this function!")}render(){console.warn("Overwrite this function!")}isLoading(){return this.list.isLoading()}enableLoading(t=""){this.list.enableLoading(t)}disableLoading(){this.list.disableLoading()}getTotalPostCount(){let t=0;return t+=Number(this.list.listArgs.attr.total_post_count)||0,t+=Number(this.list.listArgs.attr.total_sticky_count)||0,t}}class c extends l{constructor(t,e){super(t,e);const s=this.list.listArgs;this.firstPage=1,this.postsPerPage=Math.max(parseInt(s.query?s.query.posts_per_page:s.attr.posts_per_page),1),this.lastPage=Math.ceil(this.getTotalPostCount()/this.postsPerPage),this.currentPage=parseInt(s.query?s.query.paged:s.attr.paged),this.pagesAroundCurrent=parseInt(s.attr.pages_near_current),this.totalPages=this.lastPage,this.buttons={},this.$element.attr("data-ct")||this.$element.attr({"data-ct":"pagination-123","data-ct-name":"Default"}),["first","last","prev","next"].forEach(t=>{const e=this.$element.find(`.${n}.tcb-pagination-${t}`);switch(t){case"first":case"last":e.attr("data-page",this[`${t}Page`])}e.find('a[href="#"]').each((t,e)=>e.setAttribute("href","javascript:void(0)")),this.buttons["$"+t]=e}),this.$pageNumberContainer=this.$element.find(".tcb-pagination-numbers-wrapper"),this.$label=this.$element.find(".tcb-pagination-label")}static renderPageNumber(e,n=""){const o=[s,"thrv_wrapper"];let l,c={};switch(n){case"current":o.push(a),l=`.${a}`;break;case"dots":o.push(i),l=`.${i}`,e="...";break;case"link":o.push(r),l=`.${r}`,c={"data-page":e},e=`<a href="javascript:void(0)">${e}</a>`}return c["data-selector"]=l,t(`<p>${e}</p>`).addClass(o.join(" ")).attr(c)}addLoadListeners(){this.$element.on("click",`.${n}`,e=>{const s=t(e.target).closest(`.${n}`);this.load(s.attr("data-page"))}),this.$element.on("click",`.${s}:not(.${a}, .${i})`,t=>this.load(t.currentTarget.dataset.page)),t("body").off("tcb_post_list_filter_change").on("tcb_post_list_filter_change",()=>{this.$element.trigger("tcb_after_numeric_pagination_render",this)})}load(t){if(t&&!this.isLoading()){this.enableLoading(),this.currentPage=parseInt(t);const e=this.list.listArgs;void 0===e.query?e.attr.paged=this.currentPage:e.query.paged=this.currentPage,this.list.getItems(t=>{this.list.insertItems(t,!0),this.render(),this.disableLoading()},e)}}render(){this.lastPage=Math.ceil(this.getTotalPostCount()/this.postsPerPage),this.renderButtons(),this.renderLabel(),this.renderPageNumbers(),this.$element.trigger("tcb_after_numeric_pagination_render",this),this.$element.removeClass(o)}renderButtons(){this.buttons.$prev.attr("data-page",this.currentPage-1),this.buttons.$next.attr("data-page",this.currentPage+1);const t=1===parseInt(tve_frontend_options.is_editor_page);[this.buttons.$first,this.buttons.$prev].forEach(e=>{e.hasClass(o)||e.toggleClass("tcb-disabled-pagination-button",!t&&this.currentPage<=this.firstPage)}),[this.buttons.$last,this.buttons.$next].forEach(e=>{e.hasClass(o)||e.toggleClass("tcb-disabled-pagination-button",!t&&this.currentPage>=this.lastPage)})}renderLabel(){this.$label.find(".thrive-shortcode-content").each((t,e)=>{const s=e.dataset.shortcode;e.innerText=` ${this.getLabelValue(s)} `})}getLabelValue(t){let e;switch(t){case"tcb_pagination_current_page":e=this.currentPage;break;case"tcb_pagination_total_pages":e=this.lastPage;break;case"tcb_pagination_current_posts":e=(this.currentPage-1)*this.postsPerPage+1+"-"+this.currentPage*this.postsPerPage;break;case"tcb_pagination_total_posts":e=this.totalPages*this.postsPerPage;break;default:e=""}return e}renderPageNumbers(){this.$pageNumberContainer.empty();let t=!0;for(let e=1;e<=this.lastPage;e++){let s;if(e===this.currentPage)s="current";else if(1===e||e>=this.currentPage-this.pagesAroundCurrent&&e<=this.currentPage+this.pagesAroundCurrent||e===this.totalPages)s="link",t=!0;else{if(s="dots",!t)continue;t=!1}this.$pageNumberContainer.append(c.renderPageNumber(e,s))}}}class g extends l{constructor(t,e){super(t,e),this.$button=this.$element.find(".tcb-pagination-load-more-button")}addLoadListeners(){this.$button.on("click",this.load.bind(this))}load(){if(!this.isLoading()){this.enableLoading("load-bot");const t=this.list.listArgs;if(void 0===t.query?t.attr.paged+=1:t.query.paged+=1,t.query&&"rand"===t.query.orderby){const e=[];this.list.$element.find("article").each((t,s)=>{e.push(parseInt(s.getAttribute("data-id")))}),t.query.post__not_in=e,t.query.paged=1}this.list.getItems(t=>{this.list.insertItems(t),this.render(),this.disableLoading()},t)}}render(){const t=this.list.listArgs,e=1===parseInt(tve_frontend_options.is_editor_page);let s;s=t.query?t.query.paged*t.query.posts_per_page:t.attr.paged*t.attr.posts_per_page,this.$element.toggle(e||s<this.getTotalPostCount()),this.$element.find(".tcb-pagination-load-more-link").attr("href","javascript:void(0)"),this.$element.removeClass(o)}}window.TCB_Front.Pagination=l,TCB_Front.setModuleLoadedStatus("pagination",!0)}(ThriveGlobal.$j)})();
void 0===TCB_Front.js_modules["post-list"]&&TCB_Front.setModuleLoadedStatus("post-list",!1),(t=>{if(!TCB_Front.isModuleLoaded("post-list")){t(window).on("tcb_after_dom_ready",()=>{t(".tcb-post-list").each((i,s)=>{new e(t(s)).renderPagination()})});class e{constructor(e){this.$element=e,this.content="",this.listArgs={};let i=this.getAttr("data-css");const s=t.Event("tcb_post_list_identifier.tcb");if(this.$element.trigger(s),s.identifier&&(i=s.identifier),this.identifier=i,this.listIdentifier="article",tve_frontend_options.is_editor_page?this.editorInit():this.frontendInit(),this.isCarousel()){this.isEditor=tve_frontend_options.is_editor_page;const t=this.$element.find(".tcb-carousel-container");t.attr("data-carousel-settings",decodeURI(t.attr("data-carousel-settings"))),this.carousel=new TCB_Front.Carousel(this),this.carousel.initCarousel()}}getPaginationInstance(){if(this.listArgs&&this.listArgs.attr){const t=this.listArgs.attr["pagination-type"];if(t.length&&"none"!==t&&void 0!==TCB_Front.Pagination)return TCB_Front.Pagination.factory(t,this)}}renderPagination(){this.pagination=this.getPaginationInstance(),this.pagination&&(tve_frontend_options.is_editor_page||this.pagination.addLoadListeners(),this.pagination.render())}editorInit(){this.listArgs={attr:{"pagination-type":this.getAttr("data-pagination-type"),total_post_count:this.getAttr("data-total_post_count")?this.getAttr("data-total_post_count"):100,pages_near_current:this.getAttr("data-pages_near_current")?this.getAttr("data-pages_near_current"):2},query:{posts_per_page:this.getAttr("data-posts_per_page")?this.getAttr("data-posts_per_page"):6,paged:1}}}frontendInit(){"undefined"==typeof tcb_post_lists?console.warn("Error initializing the post list parameters"):(this.listArgs=tcb_post_lists.find(t=>this.$element.is(t.identifier)),this.listArgs&&(this.listArgs.query&&void 0!==this.listArgs.query.offset&&delete this.listArgs.query.offset,this.listArgs.attr.queried_object=0,this.listArgs.query.queried_object=tve_frontend_options.queried_object,this.content=t('.tcb-post-list-template[data-identifier="'+this.listArgs.template+'"]').html()))}getAttr(t){return this.$element.attr(t)}getItems(t,e=this.listArgs){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.posts+"/html",data:{content:this.content,args:e}}).done(e=>{"function"==typeof t&&t(e),this.initItems(),TCB_Front.event_triggers(this.$element)}).fail(()=>{console.warn("There was an error and the content could not be loaded.")})}insertItems(e,i=!1){if(e.count&&e.posts){const s=this.$element.clone().empty();for(const t in e.posts)e.posts.hasOwnProperty(t)&&s.append(e.posts[t]);i?(this.$element.replaceWith(s),this.identifier.includes("tve-u-")?this.$element=t(`.tcb-post-list[data-css=${this.identifier}]`):this.$element=t(this.identifier),t(window).trigger("tcb_post_list_after_item_insert")):this.isCarousel()&&this.carousel?(this.$element.find(".slick-track").append(s.html()),this.carousel.initCarousel(!0)):(this.$element.append(s.html()),this.masonryRedo()),e.total_post_count&&(this.listArgs.attr.total_post_count=e.total_post_count)}}isLoading(){return this.$element.data("loading")}enableLoading(t=""){this.$element.addClass("tve-loading"+(t.length?" "+t:"")),this.$element.data("loading",!0)}disableLoading(){setTimeout(()=>this.$element.removeClass("tve-loading load-bot"),100),this.$element.data("loading",!1)}masonryRedo(t=this.$element){if(t.length&&t.data("masonry")){const e=t.find(`${this.listIdentifier}:not(.masonry-brick)`);t.masonry("appended",e),t.masonry("layout")}}initItems(){(this.$element.find(".tcb-custom-field-source.thrv-rating").length||this.$element.find("[data-shortcode-id*='acf_']").length)&&TCB_Front.dynamicElements.init()}isCarousel(){return"carousel"===this.$element.attr("data-type")}}window.TCB_Front.PostList=e,TCB_Front.setModuleLoadedStatus("post-list",!0)}})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules["post-list-filter"]&&TCB_Front.setModuleLoadedStatus("post-list-filter",!1),(t=>{if(!TCB_Front.isModuleLoaded("post-list-filter")){t(window).on("tcb_after_dom_ready",()=>{"undefined"!=typeof tcb_post_lists&&tcb_post_lists.length&&t(".tcb-post-list-filter").each((i,s)=>{new e(t(s))})});class e{constructor(e){this.$filterElement=e;const i=t(".tcb-post-list:not(.tcb-featured-list)[data-dynamic_filter]").filter((t,e)=>e.getAttribute("data-dynamic_filter").replaceAll("'",'"').includes(this.getAttr("url-query-key")));i.length&&(this.postListInstance=new TCB_Front.PostList(i)),this.selectedFilters=[],tve_frontend_options.is_editor_page||this.frontendInit()}static get optionIdentifier(){return".tcb-filter-option"}static getActiveClass(t){return"button"===t||"list"===t?"tve-state-active":"tve-state-expanded"}shouldFilter(t){let e=!1;return t&&t.$element.length&&JSON.parse(t.$element.attr("data-dynamic_filter").replaceAll("'",'"'))[this.getAttr("url-query-key")]&&(e=!0),e}frontendInit(){this.markDefaultAsSelected(),this.markQueryStringsAsSelected(),this.bindEvents()}bindEvents(){const e=`.tcb-post-list-filter[data-css=${this.getAttr("css")}] .tcb-filter-option`;t("body").off("mousedown",e).on("mousedown",e,this.clickOption.bind(this)),t(window).on("tcb_search_overlay_show",(t,e)=>{this.$filterElement.find(e).length&&this.addSearchEvents(e.data("$$clone"))}),this.addSearchEvents()}clickOption(i){const s="true"===this.getAttr("multiple-selection"),r=this.getAttr("filter-type"),l=t(i.currentTarget);s||(this.$filterElement.find(e.optionIdentifier).removeClass(e.getActiveClass(r)),this.selectedFilters[this.getAttr("filter-option")]=[]),"all"!==l.attr("data-id")?this.$filterElement.find('[data-id="all"]').removeClass(e.getActiveClass(r)):(this.$filterElement.find(`.${e.getActiveClass(r)}:not([data-id="all"])`).removeClass(e.getActiveClass(r)),this.selectedFilters=[]),l.hasClass(e.getActiveClass(r))?(l.removeClass(e.getActiveClass(r)),void 0===this.selectedFilters[this.getAttr("filter-option")]&&(this.selectedFilters[this.getAttr("filter-option")]=[]),this.selectedFilters[this.getAttr("filter-option")]=this.selectedFilters[this.getAttr("filter-option")].filter(function(t){return t!==l.attr("data-id")})):(l.addClass(e.getActiveClass(r)),this.selectedFilters[this.getAttr("filter-option")]?this.selectedFilters[this.getAttr("filter-option")].push(l.attr("data-id")):this.selectedFilters[this.getAttr("filter-option")]=[l.attr("data-id")]);const n=[...new Set([...this.selectedFilters[this.getAttr("filter-option")],...this.getQueryStringFilters(!0)])],a=[];n.forEach(t=>{if(t&&"all"!==t){const i=this.$filterElement.find(`${e.optionIdentifier}[data-id=${t}]`).attr("data-name");if(!i)return;a.push({filter:this.getAttr("filter-option"),name:i,origin:this.getAttr("url-query-key")})}}),this.setQueryStringUrl(this.getOptionNames(n).join(",")),void 0!==this.postListInstance&&this.postListInstance.$element.each((t,e)=>{this.filter(a,e)}),t("body").trigger("tcb_post_list_filter_change")}getOtherSelectedFilters(i){const s=[],r=JSON.parse(i.$element.attr("data-dynamic_filter").replaceAll("'",'"'));return Object.keys(r).forEach(i=>{if(i&&i!==this.getAttr("url-query-key")){const r=t(`.tcb-post-list-filter[data-url-query-key=${i}]`),l=[];if(r.find(`.${e.getActiveClass(r.attr("data-filter-type"))}:not([data-id=all])`).each((t,e)=>{e&&l.push(e.getAttribute("data-id"))}),"search"===r.attr("data-filter-type")){const t=r.find('input[type="search"]').val();t&&s.push({filter:"search",name:t,origin:i})}l.forEach(t=>{if(t&&"all"!==t){const l=r.find(`${e.optionIdentifier}[data-id=${t}]`).attr("data-name");if(!l)return;s.push({filter:r.attr("data-filter-option"),name:l,origin:i})}})}}),s}filter(e,i){const s=i.getAttribute("data-css");if(!s)return;const r=t(`[data-css="${s}"]`);if(0===r.length)return;const l=new TCB_Front.PostList(r);if(this.shouldFilter(l)){l.listArgs&&(l.listArgs.query&&(l.listArgs.query.paged=1,l.listArgs.query.offset&&delete l.listArgs.query.offset),l.listArgs.attr&&(l.listArgs.attr.paged=1),l.listArgs.filters=[]);const t=[...new Set(this.selectedFilters[this.getAttr("filter-option")])],i=this.getOtherSelectedFilters(l);("search"===this.getAttr("filter-option")||i.length||t.length&&(!t.includes("all")||t.length>1))&&(l.listArgs.filters=[...e,...i]),l.enableLoading(),TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.posts+"/html",data:{content:l.content,args:l.listArgs}}).done(t=>{this.restorePostListInstance(),0===t.count?l.$element.addClass("empty-list"):(l.$element.removeClass("empty-list"),l.$element.find("article").remove(),l.insertItems(t),l.initItems()),TCB_Front.event_triggers(l.$element),l.disableLoading(),l.listArgs.attr.total_post_count=t.total_post_count,l.renderPagination()}).fail(()=>{console.warn("There was an error and the post list could not be filtered.")})}}getAttr(t){return this.$filterElement.attr(`data-${t}`)}getSelectedElements(){const t=[];return this.$filterElement.find(e.getActiveClass(this.getAttr("filter-option"))).each((e,i)=>{t.push(i.getAttribute("data-id"))}),t}setQueryStringUrl(t){const e=this.getAttr("url-query-key"),i=TCB_Front.queryString.setUrlParam(window.location.href,e,t).replace(/%2C/g,",");window.history.pushState("","",i)}getQueryStringFilters(t=!1){const i=(TCB_Front.queryString.get(this.getAttr("url-query-key"))||"").split(","),s=[];return i.forEach(i=>{let r=`[data-name="${i}"]`;t&&(r=`.${e.getActiveClass(this.getAttr("filter-type"))}`+r);const l=this.$filterElement.find(r).attr("data-id");i&&l&&s.push(l)}),s}markDefaultAsSelected(){if(0===this.getQueryStringFilters().length){const t=this.getAttr("default-value"),i=this.getAttr("filter-option"),s=this.$filterElement.find(`${e.optionIdentifier}[data-id=${t}]`),r=[{id:t,filter:i,origin:this.getAttr("url-query-key")}];s.addClass(e.getActiveClass(this.getAttr("filter-type"))),["all","none"].includes(t)||(this.selectedFilters[i]=[t],this.postListInstance.$element.each((t,e)=>{this.filter(r,e)}))}}markQueryStringsAsSelected(){const t=this.getAttr("url-query-key"),i=TCB_Front.queryString.get(t);i&&i.split(",").forEach(t=>{this.$filterElement.find(`[data-name="${t}"]`).addClass(e.getActiveClass(this.getAttr("filter-type")))})}getOptionNames(t){const i=[];return t.forEach(t=>{t&&"all"!==t&&i.push(this.$filterElement.find(`${e.optionIdentifier}[data-id=${t}]`).attr("data-name"))}),i}addSearchEvents(t=this.$filterElement){const e=t.find("form");e.submit(t=>{t.preventDefault();const i=e.find('input[type="search"]').val(),s=[{filter:"search",name:i}];this.setQueryStringUrl(i),this.postListInstance.$element.each((t,e)=>{this.filter(s,e)})})}restorePostListInstance(){const e=[];this.postListInstance.$element.each((t,i)=>{if(i){const t=i.getAttribute("data-css");t&&e.push(`[data-css="${t}"]`)}}),e.length&&(this.postListInstance.$element=t(e.join(",")))}}window.TCB_Front.PostListFilter=e,TCB_Front.setModuleLoadedStatus("post-list-filter",!0)}})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules["pricing-table"]&&TCB_Front.setModuleLoadedStatus("pricing-table",!1),(t=>{if(TCB_Front.isModuleLoaded("pricing-table"))return;t(window).on("tcb_after_dom_ready",()=>{TCB_Front.Utils.isEditorPage()||t(".thrv-pricing-table").each((i,n)=>e.init(t(n)))});const e={init(t){e.bindEvents(t.find(".thrv-button-group")),t.find('.thrv-button-group-item[data-default="true"]').trigger("click")},bindEvents(t){t.off("click.thrv-button-group-item").on("click.thrv-button-group-item",".thrv-button-group-item",e.showPriceBox)},showPriceBox(e){e.stopPropagation(),e.preventDefault();const i=t(this),n=i.closest(".thrv-pricing-table");n.find(".tcb-active-state").removeClass("tcb-active-state"),n.find(".tcb-pricing-table-box-container").addClass("tcb-permanently-hidden"),i.addClass("tcb-active-state");const o=n.find(`.tcb-pricing-table-box-container[data-instance="${i.attr("data-instance")}"]`).removeClass("tcb-permanently-hidden");TCB_Front.$window.trigger("tve_after_content_toggle",[o])}};TCB_Front.setModuleLoadedStatus("pricing-table",!0)})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules["progress-bar"]&&TCB_Front.setModuleLoadedStatus("progress-bar",!1),function(e,t){if(TCB_Front.isModuleLoaded("progress-bar"))return;e(window).on("tcb_after_dom_ready",()=>s.init(e("body")));const s={},a=e=>{if(!e)return 0;let t=e.offsetWidth;const s=getComputedStyle(e);return t+=parseInt(s.marginLeft)+parseInt(s.marginRight),t},r=(e,s=!1)=>{const a=t.inlineCssVariable(e,"--nodes-completed"+(s?"-dual":"")),r=parseInt(a),l=a-r,o=e.querySelectorAll(".tve-progress-line--fill"+(s?"-dual":""));Array.prototype.forEach.call(o,e=>{t.inlineCssVariable(e,{["--progress"+(s?"-dual":"")]:"0%"})});for(let e=0;e<r;e++)o[e]&&t.inlineCssVariable(o[e],{["--progress"+(s?"-dual":"")]:"100%"});if(l&&o[r]&&t.inlineCssVariable(o[r],{["--progress"+(s?"-dual":"")]:"50%"}),tve_frontend_options.is_editor_page&&e.classList.contains("thrv_data_element_start")&&(e.classList.remove("thrv_data_element_start"),setTimeout(()=>{e.classList.add("thrv_data_element_start")},100)),!s){const t=e.querySelectorAll(".tve-progress-node"),s=e.querySelectorAll(".tve-progress-icon"),a=e.querySelectorAll(".tve-progress-label-wrapper--nodes .tve-progress-label");for(let e=0;e<=t.length;e++)t[e]&&(t[e].classList.remove("tve-state-expanded"),s[e].classList.remove("tve-state-expanded"),a[e].classList.remove("tve-state-expanded"));if(r)for(let e=0;e<=r;e++)t[e]&&(t[e].classList.add("tve-state-expanded"),s[e].classList.add("tve-state-expanded"),a[e].classList.add("tve-state-expanded"));l&&t[r]&&(t[r].classList.add("tve-state-expanded"),s[r].classList.add("tve-state-expanded"),a[r].classList.add("tve-state-expanded"))}},l=(e,s=!1,a=!1)=>{if(s&&["apprentice"].includes(e.dataset.field))return;const r=e.getAttribute(`data${s?"-dual":""}-field`),l=e.getAttribute(`data${s?"-dual":""}-fd`),o=e.getAttribute(`data${s?"-dual":""}-value`),d=e.getAttribute(`data${s?"-dual":""}-dv`),i=e.getAttribute(`data${s?"-dual":""}-value-shortcode`),n=e.querySelectorAll(".tve-progress-label-wrapper--nodes .tve-progress-label").length;let p;if("request_data"===r){switch(l){case"query":p=t.queryString.get(o);break;case"post":p=tve_frontend_options.post_request_data?tve_frontend_options.post_request_data[o]:0;break;case"cookie":p=t.getCookie(o)}p=p||d}else if("apprentice"===r){try{let s={total:a?n:4,completed:a?n/2:2};try{s=JSON.parse(i)}catch(e){}const r=Number(s.is_current_completed)?s.completed:s.completed+1;if(a)p=s.completed,t.inlineCssVariable(e,{"--nodes-completed-dual":Math.min(r,n)});else{if(!s.total)return void e.remove();p=s.completed/s.total*100,t.inlineCssVariable(e,{"--progress-dual":`${Math.min(r/s.total*100,100)}%`})}}catch(e){}p=p||d}else p=i;p=Number(p),p=isNaN(p)?0:Math.min(p,a?n:100),t.inlineCssVariable(e,{[a?"--nodes-completed"+(s?"-dual":""):"--progress"+(s?"-dual":"")]:`${p}${a?"":"%"}`})},o=(e=t.$body)=>e.find(".tve-progress-bar-wrapper").addBack(".tve-progress-bar-wrapper");s.handleLabelPosition=(e=t.$body)=>{o(e).each((e,t)=>{if("nodes"===t.dataset.type){const e=t.querySelectorAll(".tve-progress-label-wrapper--nodes .tve-progress-label"),s=t.querySelectorAll(".tve-progress-node");for(let t=0;t<s.length;t++)e[t].style.setProperty("left",s[t].offsetLeft+Math.ceil(s[t].offsetWidth/2)-a(e[t])/2+"px"),tve_frontend_options.is_editor_page||e[t].style.setProperty("visibility","visible")}})},s.fillNodes=e=>{e.each((e,t)=>{r(t),t.classList.contains("with-dual-progress")&&r(t,!0)}),s.toggleLabels(e)},s.handleDynamicValues=e=>{e.hasClass("tve-progress-bar-wrapper")||(e=e.find(".tve-progress-bar-wrapper")),e.filter("[data-field],[data-dual-field]").each((e,s)=>{const a=s.classList.contains("with-dual-progress"),o="nodes"===s.dataset.type;l(s,!1,o),a&&l(s,!0,o),o&&(r(s),a&&r(s,!0)),s.dataset.field&&!tve_frontend_options.is_editor_page&&((e,s)=>{let a="block",r=parseFloat(t.inlineCssVariable(e,s?"--nodes-completed":"--progress"));s&&e.querySelectorAll(".tve-progress-node").length===r&&(r=100),(0===r&&parseInt(e.dataset.hideEmpty)||100===r&&parseInt(e.dataset.hideFull))&&(a="none"),e.style.setProperty("display",a,"important")})(s,o)})},s.toggleLabels=(s=t.$body)=>{o(s).each((s,a)=>{const r=e(a),l=r.find(".tve-progress-label-wrapper--nodes .tve-progress-label");if("current"===TCB_Front.getMediaAttr(r,"data-label-display")){const e=parseInt(t.inlineCssVariable(r,"--nodes-completed"));l.css("visibility","hidden"),l.eq(e).css("visibility","visible")}else l.css("visibility","visible")})},s.init=e=>{const a=(e=t.$body)=>{s.handleLabelPosition(e),s.toggleLabels()};s.handleDynamicValues(o(e)),a(),t.addResizeCallback(()=>{a()}),t.$document.on("switchstate",function(e,t){a(t)})},window.TCB_Front.progressBar=s,TCB_Front.setModuleLoadedStatus("progress-bar",!0)}(ThriveGlobal.$j,TCB_Front);
(()=>{var t={72484(t,e,o){((e,n)=>{const s=o(21715),a=o(44281),i={init:()=>{TCB_Front.Utils.isEditorPage()||(e(".thrv_social.thrv_social_custom").each((t,o)=>i.initUI(e(o))),i.initButtons(),e("body").on("click",".thrv_social_custom:not(.thrv_social_follow):not(.thrv_author_follow) .tve_s_item",function(){const t=e(this),o=t.attr("data-s");a[o]&&a[o](t)}),e(".thrv_social_follow").each((t,o)=>{let n=!0;e(o).find(".tve_s_item").each((t,o)=>{const s=e(o);s.find("a").attr("href")?n=!1:s.hide()}),n&&o.style.setProperty("display","none","important")})),s.initShareCounts()},initUI:t=>{const e=n.Utils.jsonParse(t,"data-device-config"),o=n.getDisplayType();if(e[o]){const n=e[o],s=n.button_type||"tve_social_itb",a=1===parseInt(n.isFullWidth),i=n.showCount,r=1===parseInt(n.isVertical),c=t.find(".tve_social_items").attr("class").replace(/(tve_social_items|tve_social_custom)/g,"").match(/(\s+)?tve_social_([a-z]{2,3})/),d=c?"tve_social_"+c[2]:"tve_social_itb";d!==s&&t.find(".tve_social_items").removeClass(d).addClass(s),a&&t.toggleClass("tcb-social-full-width",a),0===parseInt(i)&&t.find(".tve_s_share_count").remove(),n.isVertical&&t.toggleClass("tcb-social-vertical",r)}},initButtons:()=>{window.FB&&setTimeout(function(){e(".thrv_social_default .tve_s_fb_share, .thrv_social_default .tve_s_fb_like").each(function(){FB.XFBML.parse(this)})},200)}};window.TCB_Front.onSocialCustomClick=a,t.exports=i})(ThriveGlobal.$j,TCB_Front)},44281(t){const e={wnd(t,e,o){const n=void 0!==window.screenLeft?window.screenLeft:screen.left,s=void 0!==window.screenTop?window.screenTop:screen.top;let a,i;a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,i=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;const r=a/2-e/2+n,c=i/2-o/2+s,d=window.open(t,"Thrive Share","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,width="+e+", height="+o+", top="+c+", left="+r);return window.focus&&d.focus(),d},fb_share(t){const o=t.data();if(o.href||(o.href=location.href),o.type&&"feed"!==o.type)e.wnd("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(o.href),650,500);else{let t="";o.name&&(t+="&title="+encodeURIComponent(o.name)),o.description&&(t+="&description="+encodeURIComponent(o.description)),o.href&&(t+="&u="+encodeURIComponent(o.href)),o.caption&&(t+="&caption="+encodeURIComponent(o.caption)),o.image&&(t+="&picture="+encodeURIComponent(o.image)),t="?"+t.substr(1),e.wnd("https://www.facebook.com/sharer.php"+t,650,500)}return!1},t_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://twitter.com/intent/tweet?url="+encodeURIComponent(o.href)+(o.tweet?"&text="+encodeURIComponent(o.tweet):"")+(o.via?"&via="+o.via:""),550,450)},x_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://x.com/intent/tweet?url="+encodeURIComponent(o.href)+(o.post?"&text="+encodeURIComponent(o.post):"")+(o.via?"&via="+o.via:""),550,450)},in_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(o.href),550,400)},pin_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(o.href)+(o.media?"&media="+encodeURIComponent(o.media):"")+(o.description?"&description="+encodeURIComponent(o.description):""),600,600)},xing_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://www.xing.com/spi/shares/new?url="+encodeURIComponent(o.href),600,500)},bluesky_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://bsky.app/intent/compose?text="+(o.post?encodeURIComponent(o.post)+" ":"")+encodeURIComponent(o.href)+(o.via?"&via="+o.via:""),550,450)}};t.exports=e},21715(t){(e=>{const o={initShareCounts:()=>{!window.TVE_Dash||TVE_Dash.ajax_sent?o.getShareCounts():TCB_Front.$document.on("tve-dash.load",function(){const t=o.getShareCounts(e("body"),{},!0);t&&TVE_Dash.add_load_item("tcb_social",t[0],t[1])})},getShareCounts:(t,o,n)=>{const s=(t=t||e("body")).find(".tve_social_items.tve_social_custom");if(!s.length)return;const a={action:"tve_social_count",for:[]};if(void 0!==o?e.each(o,function(t,e){a[t]=e}):"undefined"!=typeof tve_path_params&&tve_path_params.post_id&&(a.post_id=tve_path_params.post_id),s.each(function(t){const o=e(this),n={};if(o.data("tve-social-counts")||!o.hasClass("tve_social_cb")&&"1"!==o.parent().attr("data-counts"))return void o.data("tve-social-counts",1);o.data("tve-social-counts",1);const s=o.prev(".tve_s_share_count"),i=o.children(".tve_s_item").each(function(){const t=e(this).addClass("tve_count_loading");n[t.attr("data-s")]=t.attr("data-href")});if(n.hasOwnProperty("x_share")&&1===i.length)return i.removeClass("tve_count_loading"),s.remove(),void o.parent().removeAttr("data-counts");a.for[t]=n}),!a.for.length)return null;TCB_Front.total_share_counts={};const i=function(t){t&&t.counts&&t.totals&&s.each(function(o){const n=e(this),s=n.prev(".tve_s_share_count"),a=n.children(".tve_s_item");e.each(t.counts[o],function(t,e){a.filter(".tve_s_"+t).find(".tve_s_count").html(e.formatted)}),a.removeClass("tve_count_loading");let i=s.length?window.getComputedStyle(s[0]).display:"flex";if(t.totals&&t.totals[o]&&"1"===n.parent().attr("data-counts")){let e=parseInt(n.parent().attr("data-minShares"));e=isNaN(e)?0:e,s.find(".tve_s_cnt").html(t.totals[o].formatted),parseInt(tve_frontend_options.is_editor_page)||(i=e<t.totals[o].value?"flex"===i?"flex":"inline-block":"none",s.css("cssText",`display: ${i} !important;`))}t.totals&&t.totals[o]&&(TCB_Front.total_share_counts[a.attr("data-href")]=t.totals[o])})};if(void 0!==n&&n)return[a,i];e.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:a,dataType:"json"}).done(i)}};window.TCB_Front.getShareCounts=o.getShareCounts,t.exports=o})(ThriveGlobal.$j)}},e={};function o(n){var s=e[n];if(void 0!==s)return s.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,o),a.exports}void 0===TCB_Front.js_modules["social-share"]&&TCB_Front.setModuleLoadedStatus("social-share",!1),(t=>{if(TCB_Front.isModuleLoaded("social-share"))return;const e=o(72484);t(window).on("tcb_after_dom_ready",()=>e.init()),TCB_Front.setModuleLoadedStatus("social-share",!0)})(ThriveGlobal.$j)})();
void 0===TCB_Front.js_modules.table&&TCB_Front.setModuleLoadedStatus("table",!1),(t=>{if(TCB_Front.isModuleLoaded("table"))return;const e=".tve_make_sortable",o=/[$£€]/;t(window).on("tcb_after_dom_ready",()=>r.tableSort(t(`${e} tr th`)));const r={tableSort(n){n.find(".tva-t-sort").remove(),n.append('<span class="tva-t-sort thrv-svg-icon">'+TCB_Front.icons.get("sort")+TCB_Front.icons.get("sort-desc")+TCB_Front.icons.get("sort-asc")),n.off("click.table_sort").on("click.table_sort",function(){const a=t(this),s=a.index(),d=a.parents(e),c=d.find("tbody"),i=[],l=[],x="down"===a.attr("data-direction")?"up":"down";a.attr("data-direction",x),t(d).find("tbody tr").each((e,r)=>{const n=t(r),a=n.find("> td").eq(s).text().trim().replace(/\u200B/g,"").toLowerCase(),d=o.test(a);let c=d?a:parseFloat(a);isNaN(c)&&!d?i.push({tr:n,text:a,oText:a}):(d&&(c=parseFloat(c.replace(o,""))),l.push({tr:n,text:c,oText:a}))}),i.sort("down"===x?r.sortArrayAscending:r.sortArrayDescending),l.sort("down"===x?r.sortArrayAscending:r.sortArrayDescending);const T="down"===x?l.concat(i):i.concat(l);t.each(T,function(t,e){c.append(e.tr)}),n.attr("data-direction",""),a.attr("data-direction",x)})},sortArrayAscending(t,e){let o;return o=t.text===e.text?t.oText>e.oText?1:t.oText<e.oText?-1:0:t.text>e.text?1:-1,o},sortArrayDescending(t,e){let o;return o=t.text===e.text?t.oText>e.oText?-1:t.oText<e.oText?1:0:t.text>e.text?-1:1,o}};window.TCB_Front.tableSort=r.tableSort,TCB_Front.setModuleLoadedStatus("table",!0)})(ThriveGlobal.$j);
(()=>{var t={3750(t,e,i){const a=i(77129);var o,s;o=ThriveGlobal.$j,s=TCB_Front,o.fn.tcbTabsToggle=function(t=!1){const e=this.parents(".thrv-tabbed-content").first(),i="1"===e.attr("data-progress-style");if(this.is(".tve_tS.tve-state-expanded")&&!i)return void this.siblings().removeClass("tve_tS tve-state-expanded");const o=this,n=o.closest(".tve_scT"),r=o.hasClass("tve_tabs_toogle_view_section_tag"),c=r?n.find("> .tve_tabs_toogle_view_section_tag").index(o):o.index(),d=r?n.find("> .tve_tabs_toogle_view_section_tag"):n.find("> ul li"),l=n.find('> .tve_scTC[style*="block"]'),h=l.data("contentHeight")||l.height(),v=n.find("> .tve_scTC").eq(c),u=r?n.find("> .tve_tS"):n.find("> ul .tve_tS"),_=u.attr("data-tve-custom-colour"),g=o.attr("data-tve-custom-colour"),b=u.index();let f=e.attr("data-animation");f&&b>=0&&"carousel"===f&&(f=b<c?"slide-left":"slide-right");const p=a.getAnimationFunctions(f,h);o.attr("data-tve-custom-colour",void 0!==_&&!1!==_?_:""),u.attr("data-tve-custom-colour",void 0!==g&&!1!==g?g:""),l.is(":animated")&&setTimeout(()=>{l.finish().hide()}),d.removeClass("tve_tS tve-state-expanded"),o.siblings().removeClass("tve_tS tve-state-expanded"),o.addClass("tve_tS tve-state-expanded"),t||(l.removeClass("tve-tc-visible"),TCB_Front.Utils.handleContent(l,!1),v.addClass("tve-tc-visible"),s.$window.trigger("tve-tab-hide",l),r&&window.setTimeout(()=>{o[0].scrollIntoView({behavior:"instant"})},0),p.hide(l,"medium").promise().done(()=>{s.$window.trigger("tve-tab-show",v),p.show(v,"medium"),TCB_Front.Utils.handleContent(v),s.$window.trigger("resize")})),i&&d.filter(t=>t<c).addClass("tve-state-expanded"),n.hasClass("tve_tabs_has_toggle_view")&&(r?n.find("ul > li").eq(c):n.find("> .tve_tabs_toogle_view_section_tag").eq(c)).tcbTabsToggle(!0)}},77129(t){ThriveGlobal.$j,TCB_Front,t.exports=class{static getAnimationFunctions(t,e){let i,a;switch(t){case"appear":i=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},a=function(t){return t.hide()};break;case"fade":i=function(t,e){return t.removeAttr("style").fadeIn(e)},a=function(t,e){return t.fadeOut(e)};break;case"slide-up":i=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},a=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":i=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},a=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":i=function(t,e){return t.removeAttr("style").slideDown(e)},a=function(t,e){return t.slideUp(e)};break;case"slide-right":i=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},a=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":i=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},a=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":i=function(t){const i=t.children(),a=t.data("contentHeight")||t.height();return i.css({height:e}).animate({height:a},500).promise().done(()=>{i.css("height","100%")}),t.show()},a=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":i=function(t){return t.css({transform:"rotateX(-20deg)",opacity:0}).animate({transform:"rotateX(0)",opacity:1},300).promise().done(()=>{t.css({transform:"rotateX(0)",opacity:1})}),t.show()},a=function(t){return t.hide()};break;case"slide-fade":i=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},a=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:i=function(t){return t.show()},a=function(t){return t.hide()}}return{show:i,hide:a}}}}},e={};function i(a){var o=e[a];if(void 0!==o)return o.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,i),s.exports}void 0===TCB_Front.js_modules.tabs&&TCB_Front.setModuleLoadedStatus("tabs",!1),(t=>{if(TCB_Front.isModuleLoaded("tabs"))return;i(3750),t(window).on("tcb_after_dom_ready",()=>{t(".tve_scT").each((i,a)=>e.init(t(a))),t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body").on("click",".tve_scT > ul li, .tve_tabs_toogle_view_section_tag",function(){const e=t(this);e.hasClass("tve_tab_title_item")&&TCB_Front.Utils.isEditorPage()&&!e.closest(".tve-prevent-content-edit").length||e.tcbTabsToggle()})});const e={init(t){let e=0;if("static"===t.attr("data-tab-type"))e=parseInt(t.attr("data-selected"));else{const i=t.attr("data-dynamic-type"),a=t.attr("data-tab-variable"),o=t.attr("data-fallback-tab");"url-query-string"===i?e=TCB_Front.queryString.get(a):"cookie"===i?e=TCB_Front.getCookie(a):a&&(e=tve_frontend_options.post_request_data[a]),e=parseInt(e),this.isValidTab(t,e)||(e=o)}if(!t.data("initDone")){t.data("initDone",!0);let i=t.find("> ul li").eq(isNaN(e)?0:e);i.length||(i=t.find("> ul li").first()),i.tcbTabsToggle()}a.observe(t[0])},isValidTab(t,e){const i=t.find(" > ul > .tve_tab_title_item");return e>=0&&e<i.length}},a=new ResizeObserver(t=>{for(const e of t){const t=e.contentRect;e.target.classList.contains("tve_tabs_has_toggle_view")&&t.width<e.target.dataset.tveTabsWrapToggleViewBreakpointWidth?e.target.classList.add("tve_tabs_show_toggle_view"):e.target.classList.remove("tve_tabs_show_toggle_view")}});TCB_Front.setModuleLoadedStatus("tabs",!0)})(ThriveGlobal.$j)})();
({62694(){void 0===TCB_Front.js_modules.timer&&TCB_Front.setModuleLoadedStatus("timer",!1),(t=>{if(TCB_Front.isModuleLoaded("timer"))return;const e=[".thrv-countdown_timer_evergreen",".tve_countdown_timer_evergreen",".thrv-countdown_timer_plain",".thrv_countdown_timer:not(.tve_countdown_timer_evergreen)"].join(", ");t(window).on("tcb_after_dom_ready",()=>{TCB_Front.Utils.isEditorPage()||t(e).each((e,a)=>n(t(a)))});const n=e=>{let n,a=new Date,o=new Date(e.attr("data-date")+"T"+e.attr("data-hour")+":"+e.attr("data-min")+":"+(e.attr("data-sec")||"00")+e.attr("data-timezone")),r=0,i=0,d=0,s=0,_=2;if(e.data("tcb_timer_done"))return this;const l=e.attr("data-text"),f=e.hasClass("thrv-countdown_timer_evergreen")||e.hasClass("tve_countdown_timer_evergreen"),c=e.attr("data-norestart"),p=parseInt(e.attr("data-day")),u=parseInt(e.attr("data-hour")),m=parseInt(e.attr("data-min")),v=parseInt(e.attr("data-sec"));if(e.data("tcb_timer_done",!0),f){o=new Date;let t=TCB_Front.getCookie(e.attr("data-id"));if(t){t=t.split("-");const e=new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5]);o.setTime(e)}else{o.setTime(a.getTime()+24*p*3600*1e3+3600*u*1e3+60*m*1e3+1e3*v);const t=o.getFullYear()+"-"+(o.getMonth()+1)+"-"+o.getDate()+"-"+o.getHours()+"-"+o.getMinutes()+"-"+o.getSeconds();let n=new Date("2034-01-01");if(!parseInt(c)){const t=new Date(o.getTime());n=t.setDate(o.getDate()+parseInt(e.attr("data-expday"))),n=t.setHours(o.getHours()+parseInt(e.attr("data-exphour"))),n=new Date(n)}TCB_Front.setCookie(e.attr("data-id"),t,{expires:n})}}function g(){setTimeout(function(){e.find(".tve_t_day .t-digits").css("min-width",e.find(".tve_t_sec .t-digits > span").outerWidth()*_+"px")},10)}e.parents(".thrv_content_reveal").on("tve-content-revealed",g),e.parents(".tve_p_lb_content").on("tve.before-lightbox-open",g);const h=function(t,e){if(t.html()===e)return t;t.removeClass("next");const n=t.clone().removeClass("go-down").addClass("next").html(e);return t.before(n).next(".go-down").remove(),t.addClass("go-down"),setTimeout(function(){n.addClass("go-down")},20),t},w=function(t,e,n){void 0===n&&(n=!1);let a=0;if(e<=99)h(t.find(".part-1").first(),e%10),h(t.find(".part-2").first(),Math.floor(e/10)),a=2;else for(;e;)a++,h(t.find(".part-"+a).first(),e%10),e=Math.floor(e/10);if(!1!==n&&a<n)for(let e=a+1;e<=n;e++)h(t.find(".part-"+e).first(),0)},C=function(){e.addClass("tve_cd_expired"),e.find(".t-digits span").html("0"),l&&(e.find(".tve_t_part").addClass("ct_finished"),e.find(".tve_t_text").html(l).fadeIn(200));const n=t.Event("tve.countdown-finished");e.trigger(n),setTimeout(function(){e.find(".t-digits span:not(.ct-d-placeholder)").hide()},100)},T=function(){a=new Date,s=Math.floor((o.getTime()-a.getTime())/1e3),d=Math.floor(s/60),s%=60,i=Math.floor(d/60),d%=60,r=Math.floor(i/24),i%=24,r>99&&(_=r.toString().length)};!f&&a>=o?C():(T(),function(){const n=function(e,n){return t('<span class="part-p ct-d-placeholder">&nbsp;</span><span class="part-'+e+'">'+n+"</span>")};e.find(".tve_t_sec .t-digits").empty().append(n(2,Math.floor(s/10))).append(n(1,s%10)),e.find(".tve_t_min .t-digits").empty().append(n(2,Math.floor(d/10))).append(n(1,d%10)),e.find(".tve_t_hour .t-digits").empty().append(n(2,Math.floor(i/10))).append(n(1,i%10));const a=e.find(".tve_t_day .t-digits").empty();let o=r;for(let t=1;t<=_;t++)a.append(n(t,o%10)),o=Math.floor(o/10);a.css("min-width","")}(),e.addClass("init_done"),n=setInterval(function(){T(),w(e.find(".tve_t_sec .t-digits"),s),w(e.find(".tve_t_min .t-digits"),d),w(e.find(".tve_t_hour .t-digits"),i),w(e.find(".tve_t_day .t-digits"),r,_),r<=0&&i<=0&&d<=0&&s<=0&&(r=i=d=s=0,clearInterval(n),C())},1e3)),f&&a>=o&&(clearInterval(n),C())};TCB_Front.setModuleLoadedStatus("timer",!0)})(ThriveGlobal.$j)}})[62694].call({});
(()=>{var t={33614(t,e,n){(t=>{const e=n(77129);t.fn.tocToggle=function(n="show"){const o=t(this),i=o.closest(".tve-toc"),a=o.siblings(".tve-toc-content"),s=i.attr("data-animation-speed"),r=i.attr("data-animation"),c=e.getAnimationFunctions(r);o.toggleClass("tve-state-expanded","show"!==n),c[n](a,s),i.toggleClass("tve-toc-collapsed","show"!==n)}})(ThriveGlobal.$j)},77129(t){ThriveGlobal.$j,TCB_Front,t.exports=class{static getAnimationFunctions(t,e){let n,o;switch(t){case"appear":n=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},o=function(t){return t.hide()};break;case"fade":n=function(t,e){return t.removeAttr("style").fadeIn(e)},o=function(t,e){return t.fadeOut(e)};break;case"slide-up":n=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":n=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":n=function(t,e){return t.removeAttr("style").slideDown(e)},o=function(t,e){return t.slideUp(e)};break;case"slide-right":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":n=function(t){const n=t.children(),o=t.data("contentHeight")||t.height();return n.css({height:e}).animate({height:o},500).promise().done(()=>{n.css("height","100%")}),t.show()},o=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":n=function(t){return t.css({transform:"rotateX(-20deg)",opacity:0}).animate({transform:"rotateX(0)",opacity:1},300).promise().done(()=>{t.css({transform:"rotateX(0)",opacity:1})}),t.show()},o=function(t){return t.hide()};break;case"slide-fade":n=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},o=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:n=function(t){return t.show()},o=function(t){return t.hide()}}return{show:n,hide:o}}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}void 0===TCB_Front.js_modules.toc&&TCB_Front.setModuleLoadedStatus("toc",!1),function(t,e){if(TCB_Front.isModuleLoaded("toc"))return;n(33614),window.addEventListener("load",()=>{o.initToc(e.$body,!!tve_frontend_options.is_editor_page)}),t(window).on("tcb_after_dom_ready",()=>{o.initToc(e.$body,!!tve_frontend_options.is_editor_page),t(".tve-toc-expandable").each((n,o)=>{const i=t(o),a=e.getMediaAttr(i,"data-state-default");i.data("tcbTocDone")||(i.find(".tve-toc-title").tocToggle("expanded"===a?"show":"hide"),i.data("tcbTocDone",!0))}),function(){const n=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");n.off("click.tvetoc").on("click.tvetoc",".tve-toc-expandable .tve-toc-title, .tve-toc-expandable .tve-toc-title *",function(n){const o=t(this).closest(".tve-toc-title");TCB_Front.Utils.isEditorPage()&&!o.hasClass("tve-prevent-content-edit")||(o.tocToggle(o.hasClass("tve-state-expanded")?"show":"hide"),n.preventDefault(),n.stopPropagation(),l(e.$body))}),n.on("click",".thrv_contents_table a, .tve-toc-content a",function(n){try{const o=this.getAttribute("href")||this.getAttribute("data-target"),i=t(o);if(i.length){if(n.preventDefault(),history&&history.pushState&&o&&"#"===o.charAt(0)){let t=location.href;t.indexOf("#")>-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+o)}return e.jumpScrollTo(i,this),!1}}catch(t){console.warn("ToC exception",t)}})}()});const o={};let a=!1,s=t(),r=!1,c=(new Date).getTime();function l(e){const n=t(".thrv_header.tve-scroll-sticky").outerHeight()||0,o=t("#wpadminbar").outerHeight()||0;e.find(".tve-toc.tve-elem-scroll").each((e,i)=>{const a=t(i),r={};a.is(".tve-toc-dynamic:not(.tve-rendered)")||(a.find(".tve-toc-heading .tve-jump-scroll").each((e,i)=>{const a=i.getAttribute("href")||i.getAttribute("data-target"),s=t(`${a}`);if(!s.length)return;const c=Math.max(0,s.offset().top-o-n);t(i).attr("data-targetOffset",c),r[c]?r[c].push(`[href="${a}"]`):r[c]=[`[href="${a}"]`]}),a.data("headers",r),s=s.add(a))})}function d(e){const n=t("#wpadminbar").outerHeight()||0;s.each((o,i)=>{const a=t(i),s=i.dataset.highlight,r=a.data("headers");Object.keys(r).sort((t,e)=>t-e).forEach(t=>{const o=a.find(r[t].join(",")).parent();"heading"===s?e+n>=t?(a.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),o.addClass("tve-state-expanded")):o.removeClass("tve-state-expanded"):"section"===s?e+n>=t?(a.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),o.is(".tve-toc-heading-level0")||(o.prevUntil(".tve-toc-heading-level0").addClass("tve-state-expanded"),o.prevAll(".tve-toc-heading-level0").first().addClass("tve-state-expanded")),o.addClass("tve-state-expanded")):o.removeClass("tve-state-expanded"):o.toggleClass("tve-state-expanded",e+n>=t)})})}t.fn.tableOfContents=function(n={}){const o={target:"#tve_editor.tar-main-content",columns:1,headers:"h1,h2,h3",distribute:"",itemCallback:jQuery.noop,hideEmpty:!0,numbering:"none",emptyText:window.tve_frontend_options&&tve_frontend_options.translations?tve_frontend_options.translations.no_headings:"No headings found",itemsFilter:t=>t};let s=!1,r=!1,l={level0:0,level1:0,level2:0};return this.each(function(){const d=t(this);if(!d.is(".thrv_contents_table,.tve-toc"))return;const h=d.closest(".thrv_gutenberg_block,.thrv_symbol");if(r=d.hasClass("thrv_contents_table"),s=d.hasClass("tve-disable-scroll-animation"),a&&!d.attr("data-id")){const t=TVE.CSS_Rule_Cache.generate_id("",36);d.attr("data-id",t),d.find(".toc-icons symbol").each(function(){this.setAttribute("id",`${this.getAttribute("id").match(/toc-bullet-\d+/)[0]}-${t}`)})}r||(l={level0:0,level1:0,level2:0},["headingStyle","bulletStyle","numberStyle","numberSuffix"].forEach(t=>{n[t]={};try{n[t]=JSON.parse(this.dataset[t])}catch(t){}}));const v=d.find(".tve_ct_content").empty(),u=i(i(i({},o),this.dataset),n);u.distribute=1===parseInt(u.distribute)||"true"===u.distribute||!0===u.distribute,u.columns=Number(e.getMediaAttr(d,"data-columns")||1);let f,p=t(u.target);if(p.length||(p=h.length?h.parent():t("#tve_editor")),f=p.find(u.headers),f=u.itemsFilter(f),a&&d.hasClass("tve-dynamic-toc")||(f=f.filter(":visible")),f=f.filter(':not([data-hide="true"], .tve-toc *, .thrv-login-element *)'),!f.length)return void(u.hideEmpty&&!e.queryString.get("tve_block_preview")?d.hide():v.html(`<div class="tve-empty-toc">${u.emptyText}</div>`));const m=u.headers.split(",").map(t=>t.toUpperCase());let b=m.shift();for(;b&&m.length&&0===f.filter(b).length;)b=m.shift();let g=f.length/u.columns;u.distribute||(g=f.filter(b).length/u.columns);const y=new Array(u.columns).fill("",0,u.columns);let _=0,$=-1;f.each(function(){const e=t(this),n=e.attr("data-alt-text")||e.text();(u.distribute||this.tagName===b)&&$++,$>=(1+_)*g&&_++;const o=this.id&&p.find(`[id="${this.id}"]`).length>1,i=e.closest(".tve-content-list,.tvo-testimonials-display ").length>0,h=o||i&&!a&&!this.classList.contains("tve-id-regenerated"),v=this.id&&!h?this.id:this.id="t-"+c++,f=u.headers.split(",").indexOf(this.tagName.toLowerCase()),m=((t,e,n,o,i,a)=>{let c;if(r)c=`<div class="tve_ct_level${n}"><a href="#${e}" rel="nofollow">${o}</a></div>`;else{let r="",d="",h="";const v=t.numbering.includes("bullet"),u=t.numbering.includes("advance");if("none"!==t.numbering){if(v)(0===n||u)&&(h=`toc-bullet-${n}`);else if(0===n||u){l[`level${n}`]+=1,l[`level${n+1}`]=0;for(let t=0;t<n+1;t++)r+=`${l[`level${t}`]}${t===n?"":"."}`}if(v&&h){const o=a.attr("data-id");o&&(h+=`-${o}`),d=`<div class="thrv_wrapper tve-toc-bullet tve-toc-bullet${n} tve_no_icons ${s?"":"tve-jump-scroll"}" data-target="#${e}" ${s?"":'jump-animation="smooth"'} data-icon-target="${h}" data-element-name="Icon Level ${n+1}" data-css="${t.bulletStyle[n]||""}"><svg class="tcb-icon"><use href="#${h}"/></svg></div>`}else r&&(d=`<div class="thrv_wrapper tve-toc-number tve-toc-number${n} tve_no_icons ${s?"":"tve-jump-scroll"}" data-target="#${e}" ${s?"":'jump-animation="smooth"'} data-element-name="Number Level ${n+1}" data-level="${n}" data-css="${t.numberStyle[n]||""}"><span class="tve-toc-disabled">${r}${t.numberSuffix[n]||""}</span></div>`)}c=`<div class="thrv_wrapper tve-toc-heading tve-toc-heading-level${n} tve_no_icons" data-tag="${i}" data-css="${t.headingStyle[n]||""}" data-element-name="Heading Level ${n+1}">${d}<a href="#${e}" class="tve-toc-anchor ${s?"":"tve-jump-scroll"}" ${s?"":'jump-animation="smooth"'}>${o}</a></div>`}return c})(u,v,f,n,this.tagName,d);h&&i&&!a&&this.classList.add("tve-id-regenerated"),u.itemCallback(e,f,u),y[_]+=m});let w="";if(!r){const t=d.children(".tve-toc-divider");w=t.length?t.html():'<div class="thrv_wrapper thrv-divider tve-vert-divider" data-style="tve_sep-1" data-color-d="rgb(217, 217, 217)" data-thickness-d="1"><hr class="tve_sep tve_sep-1" style=""></div>'}v.html(y.map(t=>`<div class="ct_column">${t}</div>${w}`).join("")),!a&&d.hasClass("tve-dynamic-toc")&&d.addClass("tve-rendered")})},o.initToc=(n=e.$body,o=!1)=>{a=o,a||(n.length||(n=t("body")),r||(function(t){parseInt(tve_frontend_options.is_single)&&t.find(".tve-toc:not(.tve-dynamic-toc), .thrv_symbol .tve-toc.tve-dynamic-toc").tableOfContents()}(n),setTimeout(function(){l(n)},50),r=!0),e.add_scroll_callback(d),e.$body.off(".tcb-jumplink-done").on("tcb-jumplink-done",(e,n,o)=>{(o.classList.contains("tve-toc-anchor")||o.classList.contains("tve-toc-number")||o.classList.contains("tve-toc-bullet"))&&setTimeout(()=>{d(t(o).data("targetOffset"))},500)}))},window.TCB_Front.toc=o,TCB_Front.setModuleLoadedStatus("toc",!0)}(ThriveGlobal.$j,TCB_Front)})();
(()=>{var t={65910(t,e,o){const i=o(77129);var n,r;n=ThriveGlobal.$j,r=TCB_Front,n.fn.tcbToggle=function(t){return this.each(function(){const e=n(this),o=e.closest(".thrv_toggle_title"),s=e.closest(".thrv_toggle"),a=o.next(),c=s.attr("data-animation-speed"),l=s.attr("data-animation"),g=e.hasClass("tve-state-expanded");void 0===t&&(t=g?"hide":"show");const d=i.getAnimationFunctions(l),h=s.data("tcbToggleInit");e.toggleClass("tve-state-expanded","show"===t),r.$window.trigger(`tve-toggle-${t}`,a),d[t](a,c).promise().done(()=>{h&&e.hasClass("tve-state-expanded")&&!TCB_Front.isInViewport(e)&&n("html, body").scrollTop(e.offset().top),TCB_Front.Utils.handleContent(a,"show"===t),r.$window.trigger("resize")})})}},77129(t){ThriveGlobal.$j,TCB_Front,t.exports=class{static getAnimationFunctions(t,e){let o,i;switch(t){case"appear":o=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},i=function(t){return t.hide()};break;case"fade":o=function(t,e){return t.removeAttr("style").fadeIn(e)},i=function(t,e){return t.fadeOut(e)};break;case"slide-up":o=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":o=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":o=function(t,e){return t.removeAttr("style").slideDown(e)},i=function(t,e){return t.slideUp(e)};break;case"slide-right":o=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":o=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":o=function(t){const o=t.children(),i=t.data("contentHeight")||t.height();return o.css({height:e}).animate({height:i},500).promise().done(()=>{o.css("height","100%")}),t.show()},i=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":o=function(t){return t.css({transform:"rotateX(-20deg)",opacity:0}).animate({transform:"rotateX(0)",opacity:1},300).promise().done(()=>{t.css({transform:"rotateX(0)",opacity:1})}),t.show()},i=function(t){return t.hide()};break;case"slide-fade":o=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},i=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:o=function(t){return t.show()},i=function(t){return t.hide()}}return{show:o,hide:i}}}}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,o),r.exports}void 0===TCB_Front.js_modules.toggle&&TCB_Front.setModuleLoadedStatus("toggle",!1),(t=>{if(TCB_Front.isModuleLoaded("toggle"))return;o(65910);const e={init(){const o=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");if(e.initOnClick(o),e.initToggleCompat(o),t(".thrv_toggle_shortcode").each((e,o)=>{TCB_Front.$window.trigger("tve_after_content_toggle",[t(o)])}),t(".thrv_toggle").each((e,o)=>{const i=t(o);if(!i.data("tcbToggleInit")){let t=i.find(".thrv_toggle_item.tve-default-state-expanded");i.hasClass("tve-toggle-auto-collapse")&&(t=t.first()),t.find("> .tve_faqI > .thrv_toggle_title").tcbToggle("show"),i.data("tcbToggleInit",1)}}),!TCB_Front.Utils.isEditorPage()&&location.hash)try{const e=t(location.hash);e.closest(".thrv_toggle").length&&!e.hasClass("tve-state-expanded")&&e.trigger("click")}catch(t){}},initOnClick(e){e.off("click.tvetoggleelemold").on("click.tvetoggleelemold",".thrv_toggle_shortcode .tve_faqB",function(){const e=t(this).closest(".tve_faq"),o=t(this),i=t(o).siblings(".tve_faqC");i.is(":visible")?(TCB_Front.$window.trigger("tve_after_content_toggle",[i,!1]),t(window).trigger("tcb_toggle_close",i),i.slideUp("fast",function(){i.trigger("lbresize")}),e.removeClass("tve_oFaq"),e.find(".tve_toggle").first().removeClass("tve_toggle_open"),e.find("h4").first().removeClass("tve_toggle_open_text")):(i.slideDown("fast",function(){i.trigger("lbresize")}),t(window).trigger("tcb_toggle_open",i),TCB_Front.$window.trigger("tve_after_content_toggle",[i]),e.addClass("tve_oFaq"),e.find(".tve_toggle").first().addClass("tve_toggle_open"),e.find("h4").first().addClass("tve_toggle_open_text"))})},initToggleCompat(e){e.off("click.tvetoggleelem").on("click.tvetoggleelem",".thrv_toggle:not(.toggle-edit-mode) .thrv_toggle_title",function(){const e=t(this),o=e.closest(".thrv_toggle");!e.hasClass("tve-state-expanded")&&o.hasClass("tve-toggle-auto-collapse")&&o.find(".thrv_toggle_title").tcbToggle("hide"),e.tcbToggle()})}};t(window).on("tcb_after_dom_ready",()=>e.init()),TCB_Front.setModuleLoadedStatus("toggle",!0)})(ThriveGlobal.$j)})();
void 0===TCB_Front.js_modules.twitter&&TCB_Front.setModuleLoadedStatus("twitter",!1),(t=>{if(TCB_Front.isModuleLoaded("twitter"))return;t(window).on("tcb_after_dom_ready",()=>{tve_frontend_options.is_editor_page||t(".thrv_tw_qs").each((e,n)=>{const a=t(n);a.data("tve_front_tw_qs_done")||(o.init(a),a.data("tve_front_tw_qs_done",!0))})});const o={init(t){t.on("click",function(){window.open(o.getUrl(t),"_blank")})},getUrl(t){const o=t.attr("data-use_custom_url")&&t.attr("data-custom_url")?t.attr("data-custom_url"):window.location.href;let e=t.data("url")+"?text="+encodeURIComponent(t.find("p").text())+"&url="+encodeURIComponent(o);return t.data("via").length>0&&(e+="&via="+t.data("via")),e}};TCB_Front.setModuleLoadedStatus("twitter",!0)})(ThriveGlobal.$j);
(()=>{var s={80928(s){void 0===TCB_Front.js_modules["user-profile"]&&TCB_Front.setModuleLoadedStatus("user-profile",!1),function(r,t){if(TCB_Front.isModuleLoaded("user-profile"))return;const e=["nickname","username","first_name","last_name"];class i{usedDisplayNames=[];$errorContainer=r();inputErrorClass="tve-up-error";isValid=!0;constructor(s){s.hasClass("tve-user-profile")||(s=s.find(".tve-user-profile")),s.length&&!s.data("tcb.userprofile")&&(this.$el=s,this.$form=this.$el.find("form"),this.readFormData(),this.bindEvents(),this.autofillData(),s.data("tcb.userprofile",this),t.$window.on("tve_after_content_toggle",(s,r)=>{1===this.$form.closest(r).length&&(this.readFormData(),this.autofillData())}))}readFormData(){this.getInputs().each((s,t)=>{const e=t.getAttribute("name");e&&(this[`$${e}`]=r(t),"display_name"===e&&(this.$dropdown=this.$form.find(".tve-lg-dropdown-list"),this.$option=this.$dropdown.children().first(),this.$dropdown.empty()))});let s={success_message:"Success",error_message:{email:"Email address invalid",required:"Required field missing",passwordmismatch:"Password mismatch"}};try{s=JSON.parse(this.$el.find(".tve-up-messages").val())}catch(s){}Object.assign(this,s)}bindEvents(){this.$form.on("submit",s=>(this.submitForm(s),s.preventDefault(),s.stopPropagation(),!1)),this.$form.find(".tve-form-button .tve-form-button-submit").on("click",s=>(s.preventDefault(),s.stopPropagation(),this.$form.submit(),!1)),this.$display_name&&e.forEach(s=>{this[`$${s}`]&&this[`$${s}`].on("blur",()=>{this.buildDisplayNameOptions()})})}validateForm(){this.fieldErrors=[],this.isValid=!0,this.getInputs().each((s,r)=>{let t=!0;const e=r.getAttribute("name"),i=r.value.trim();"1"!==r.dataset.required||i.length||(t=!1,this.fieldErrors.includes(this.error_message.required)||this.fieldErrors.push(this.error_message.required)),"user_email"===e&&(t=TCB_Front.Utils.isEmail(i),t||this.fieldErrors.push(this.error_message.email)),t||(r.classList.add(this.inputErrorClass),this.isValid=!1)}),this.$pass1&&(this.$pass1.siblings(".tve-password-strength-wrapper").attr("data-score")<=30&&(this.fieldErrors.push(this.error_message.password_score||"Please choose a stronger password. Try including numbers, symbols, and a mix of upper and lowercase letters and remove common words."),this.isValid=!1),this.$pass2&&this.$pass1.val()!==this.$pass2.val()&&(this.$pass1.addClass(this.inputErrorClass),this.$pass2.addClass(this.inputErrorClass),this.fieldErrors.push(this.error_message.passwordmismatch),this.isValid=!1))}submitForm(){if(this.clearErrors(),this.validateForm(),this.isValid){let s=`${this.$form.serialize()}&form-nonce=${tve_frontend_options.user_profile_nonce}&action=tve_user_profile_update&url=${encodeURIComponent(location.href)}`;s+=`&form_id=${this.$el.attr("id")}`,this.$form.tve_form_loading(),tve_frontend_options.post_id&&(s+=`&post_id=${tve_frontend_options.post_id}`),ThriveGlobal.$j.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,dataType:"json",data:s}).fail(()=>{TCB_Front.Utils.toast("An error occurred while submitting your data. Please try again",!0)}).done(s=>{if(s.success)TCB_Front.Utils.toast(this.success_message);else if(this.fieldErrors=[],"string"==typeof s.errors)TCB_Front.Utils.toast(s.errors,!0);else{const r=s.errors.errors;Object.keys(r).forEach(s=>{this.error_message[s]?this.fieldErrors.push(this.error_message[s]):r[s].forEach(s=>this.fieldErrors.push(s))}),this.fieldErrors.length&&this.displayFormError()}}).always(()=>{this.$form.tve_form_loading(!0)})}else this.displayFormError()}autofillData(){r.isEmptyObject(tve_frontend_options.current_user)||Object.keys(tve_frontend_options.current_user).forEach(s=>{this[`$${s}`]&&this[`$${s}`].val(tve_frontend_options.current_user[s])}),this.$display_name&&(this.buildDisplayNameOptions(),this.$dropdown.find(`li[data-value="${tve_frontend_options.current_user.display_name.replace(/"/g,'\\"')}"]`).trigger("mousedown"))}buildDisplayNameOptions(){const s={oldSavedValue:tve_frontend_options.current_user.display_name};e.forEach(r=>{this[`$${r}`]&&(s[`${r}`]=this[`$${r}`].val())}),s.first_name&&s.last_name&&(s.first_last=`${s.first_name} ${s.last_name}`,s.last_first=`${s.last_name} ${s.first_name}`),Object.keys(s).forEach(r=>{if(s[r].trim()&&!this.usedDisplayNames.includes(s[r])){const e=this.$option.clone();e.attr("data-value",s[r]).css("display","").find("span").text(s[r]),this.$dropdown.append(e),this.usedDisplayNames.push(s[r]),t.inlineCssVariable(this.$dropdown,{"--rows":this.$dropdown.children().length})}})}displayFormError(){this.$errorContainer.length||(this.$errorContainer=r('<div id="tve-up-error-container"></div>').prependTo(this.$form.parent()),this.$errorContainer.append(`<a href="javascript:void(0)" class="tve-up-err-close" title="Close"><span class="thrv-icon thrv-svg-icon">${TCB_Front.icons.get("cross")}</span></a>`),this.$errorContainer.on("click",".tve-up-err-close",this.closeErrors.bind(this))),this.fieldErrors.forEach(s=>{r(`<div class="tve-up-error-message">${s}</div>`).prependTo(this.$errorContainer)}),setTimeout(()=>{const s=parseInt(this.$form.css("margin-top"));let r=-10-this.$errorContainer.outerHeight(!0)-(isNaN(s)?0:s);this.$el.offset().top+r<0&&(r=0),this.$errorContainer.css({top:`${r}px`,width:this.$form.outerWidth()}).fadeIn(200)},50)}closeErrors(){let s=this.$form.find(`.${this.inputErrorClass}`).first();s.length||(s=this.getInputs().first()),s.trigger("focus"),this.clearErrors(!1)}clearErrors(s=!0){this.$errorContainer.find(".tve-up-error-message").remove(),this.$errorContainer.fadeOut(200),s&&this.$form.find(`.${this.inputErrorClass}`).removeClass(this.inputErrorClass)}getInputs(){return this.$form.find("input,textarea,select").filter(':not([type="hidden"]):visible')}}t.$window.on("tcb_after_dom_ready",()=>{TCB_Front.Utils.isEditorPage()||r(".tve-user-profile").each((s,t)=>new i(r(t)))}),window.TCB_Front.UserProfile=i,s.exports=i,TCB_Front.setModuleLoadedStatus("user-profile",!0)}(ThriveGlobal.$j,TCB_Front)}},r={};!function t(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return s[e](o,o.exports,t),o.exports}(80928)})();
(()=>{var t={65017(t){!function(e){const i={};let a,o=!1;function n(t,e){const i=e?t.parents(".safari-ios-decoration-fix"):t.parents(".safari-ios-decoration-fix-none");t.toggleClass("tcb-no-perspective",e),i.toggleClass("safari-ios-decoration-fix",!e).toggleClass("safari-ios-decoration-fix-none",e)}function r(t,e){const i=t.parents(".tve_ea_thrive_animation");i.length&&i.toggleClass("tcb-no-transform",e)}i.init=function(){a=i.videoScrolled.bind(this),document.addEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.addEventListener("click",i.closeFloatVideo.bind(this,e),!1)})},i.destroyFloating=function(){document.removeEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.removeEventListener("click",i.closeFloatVideo.bind(this,e))})},i.closeFloatVideo=function(t){e(t).parent(".tcb-video-float-container").addClass("tcb-float-closed"),i.videoScrolled()},i.videoScrolled=function(){e('.thrv_responsive_video[data-float="true"] .tcb-video-float-container iframe, .thrv_responsive_video[data-float="true"] .tcb-video-float-container video, .thrv_responsive_video[data-float="true"] .tcb-video-float-container .tve_responsive_video-no_video').each((t,i)=>{const a=e(i),s=a.parents(".tcb-video-float-container"),c=a.parents(".thrv_responsive_video"),d=c.attr("data-float-position"),l=c.find(".video_overlay_image").attr("style")||"";let u=TCB_Front.getDisplayType()[0],p=parseInt(e("#wpadminbar").height());if(s.hasClass("tcb-float-closed")||!function(t){if(t.parents(".tcb-post-list").length)return!1;const e="true"===t.attr("data-float"),i=t.attr("data-float-visibility");if(e&&!i)return!0;const a=TCB_Front.getDisplayType();return-1===i.indexOf(a)}(c)||TCB_Front.isInViewport(a.parents(".thrv_responsive_video"),parseInt(a.width))){if(s.removeClass(d).css({width:"",height:"","margin-top":""}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",""),c.find(".video_overlay_image").removeClass(d).css({cssText:l,height:"",width:""}),!o){const t=c.position().left,e={left:t,right:t+c.width()};d.includes("top")||d.includes("keep")?(e.top=-parseInt(c.attr(`data-float-width-${u}`)),s.css(e)):d.includes("bottom")&&(e.bottom=parseInt(TCB_Front.Utils.windowWidth()),s.css(e)),c.find(".video_overlay_image").css({top:"",left:"",bottom:"",right:"","margin-top":""}),o=!0}n(c,!1),r(c,!1)}else{void 0===c.attr(`data-float-width-${u}`)&&("m"===u&&(c.attr("data-float-width-m",TCB_Front.$window.width()+"px;"),c.attr("data-float-padding1-m",0),c.attr("data-float-padding2-m",0),p=0),"t"===u&&(u="d"));const t="height: "+function(t){const e=parseFloat(t.height()/t.width()).toFixed(2),i=TCB_Front.getDisplayType()[0],a=t.attr(`data-float-width-${i}`)||t.attr("data-float-width-d"),o=parseInt(a)*e;return a.includes("px")?o+"px":o*TCB_Front.$body.width()/100+"px"}(c)+" !important;",e="width: "+c.attr(`data-float-width-${u}`)+" !important;";let i="";if(d.includes("keep-original")){const t=c.attr(`data-float-padding1-${u}`);TCB_Front.Utils.hasAdminBar()&&p&&(i+=`margin-top: ${p}px;`),i+=`top: ${t} !important; `}else d.split("-").forEach((t,e)=>{const a=c.attr(`data-float-padding${e+1}-${u}`);TCB_Front.Utils.hasAdminBar()&&t.includes("top")&&p&&(i+=`margin-top: ${p}px;`),i+=`${t}: ${a} !important; `});d&&(s.addClass(d).css({cssText:e+t+i}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",(TCB_Front.highestZIndex||0)+10),a.css("height",""),c.find("video").length&&function(t){t.find("video").css({"object-fit":"cover",height:"100%"})}(c),c.find(".video_overlay_image").addClass(d).css({cssText:l+e+t+"z-index:100000 !important; top:inherit; left:inherit; bottom:inherit; right: inherit; margin-top: inherit;"}),n(c,!0),r(s,!0),o=!1)}})},i.restoreFloatingVideos=function(){e(".thrv_responsive_video").each((t,i)=>{const a=e(i),o=a.find(".tcb-video-float-container"),n=a.attr("data-float-position"),r=a.find(".video_overlay_image").attr("style")||"";o.removeClass(n).css({width:"",height:""}),a.find(".video_overlay_image").removeClass(n).css({cssText:r,height:"",width:"",top:"",left:"",bottom:"",right:"","margin-top":""})})},t.exports=i}(ThriveGlobal.$j)},93890(t,e,i){t.exports=(t,e)=>{const a='.tcb-video-cover:not([data-preload="1"]) .tcb-video-cover-image',o=i(82368)(t,e),n=i(23814),r=[];class s{static initVideoLazyLoad(e){const i=e.find(".thrv_responsive_video.tcb-lazy-load");0!==i.length&&(TCB_Front.add_scroll_callback(e=>{e>0&&i.each((e,i)=>{const o=t(i);if(s.hasVideoCover(o)){const t=o.find(a);t.length>0&&s.lazyLoadThumbnail(t)}else s.lazyLoadVideo(o,"external"===i.dataset.type)})}),i.each((e,i)=>{const a=t(i);a.off("click").on("pointerover",()=>s.preconnectAssets(a)).on("click",()=>s.lazyLoadVideo(a,"external"===i.dataset.type,!0))}))}static preventIframeLoad(e,i,a){const o=t(i).closest(".thrv_responsive_video");return a&&!TCB_Front.Utils.isEditorPage()&&s.shouldLazyLoad(o)&&(e=!0),e}static shouldLazyLoad(t){return t.hasClass("tcb-lazy-load")&&(s.hasVideoCover(t)||!TCB_Front.isInViewport(t,-150)||s.isInsideScreenFiller(t))}static isInsideScreenFiller(t){return"hidden"===t.closest(".tve-leads-screen-filler").css("visibility")}static hasVideoCover(t){return t.find(".video_overlay_image, .tcb-video-cover").length>0}static lazyLoadVideo(e,i=!1,a=!1){const o=e.find(i?"source":"iframe"),n=o.attr("src");if(o.hasClass("tcb-video-lazy-loaded")||n&&n.length>0||!e.is(":visible")||s.isInsideScreenFiller(o)||!TCB_Front.isInViewport(e,-150)&&!a)return;o.hasClass("vooplayer")&&!TCB_Front.vooplayerScriptsLoaded&&(t.getScript("https://s3.spotlightr.com/assets/vooplayer.js"),TCB_Front.vooplayerScriptsLoaded=1);let r=o.attr("data-src");r&&"null"!==r&&(r=TCB_Front.Hooks.applyFilters("tcb.video.lazy_load.src",r,e),o.attr("src",r),i&&o.closest("video")[0].load()),o.removeAttr("data-src").addClass("tcb-dr-done tcb-video-lazy-loaded"),a&&TCB_Front.onVideoClick(e)}static lazyLoadThumbnails(e){e.find(a).each((e,i)=>{const a=t(i);a.closest(".tcb-lazy-load").length>0&&s.lazyLoadThumbnail(a)})}static lazyLoadThumbnail(t){if(!TCB_Front.Utils.isEditorPage()&&(t.hasClass("tcb-src-loaded")||!t.is(":visible")||!TCB_Front.isInViewport(t.closest(".thrv_responsive_video"),-250)))return;const e=t.attr("data-src");e&&"null"!==e&&t.attr("src",e),t.removeAttr("data-src"),TCB_Front.Utils.isEditorPage()||t.addClass("tcb-src-loaded")}static preconnectAssets(t){const e=t.attr("data-type");if(r.includes(e))return;let i=[];switch(e){case"youtube":i=o.getAssetsToPreconnect();break;case"vimeo":i=s.getVimeoAssetsToPreconnect();break;case"wistia":i=s.getWistiaAssetsToPreconnect();break;case"external":const e=t.find("source").attr("data-src");void 0!==e&&(i=[new URL(e).origin]);break;case"vooplayer":i=n.getAssetsToPreconnect()}i.forEach(t=>s.addPreconnectLink(t)),r.push(e)}static addPreconnectLink(t){const e=document.createElement("link");e.rel="preconnect",e.href=t,document.head.append(e)}static getVimeoAssetsToPreconnect(){return["https://f.vimeocdn.com","https://player.vimeo.com","https://i.vimeocdn.com"]}static getWistiaAssetsToPreconnect(){return["https://fast.wistia.net"]}}return s}},49814(t,e,i){t.exports=(t,e)=>{const a=i(42166),o=i(82368)(t,e),n=i(23814),r=i(70025)(t,e),s=i(93890)(t,e);class c{static get identifier(){return".thrv_responsive_video"}static init(){c.initHooks()}static initHooks(){t(e).on("tcb_after_dom_ready",()=>c.onDomReady()).on("tcb_after_lightbox_open",(e,i)=>{t(i).find(`${c.identifier}:not([data-type="dynamic"])`).each((e,i)=>c.autoplayVideo(t(i)))}).on("tcb_before_lightbox_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_hide",(e,i)=>c.pauseVideos(t(i))).on("tve-content-revealed",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_open",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_show",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tve_after_content_toggle",(t,e,i)=>{i&&s.lazyLoadThumbnails(e)}),TCB_Front.Hooks.addFilter("tcb.is_iframe_load_prevented",s.preventIframeLoad)}static onDomReady(){const e=t("body");c.pauseVideos(t(".tve_p_lb_content")),c.pauseVideos(t(`${c.identifier}:hidden`)),o.onDomReady(),TCB_Front.Utils.isEditorPage()||(r.init(),c.maybeAutoplayVideo(e),c.initOnClickEvent(),s.initVideoLazyLoad(e)),n.onDOMReady(),t(".tcb-video-background-el").each((t,e)=>e.parentNode.classList.add("tcb-video-background-parent"))}static initOnClickEvent(){t(c.identifier).off("click.thumbnail").on("click.thumbnail",e=>c.onClick(t(e.currentTarget),e)),TCB_Front.$document.off("click.tcb-video-delegate").on("click.tcb-video-delegate",`${c.identifier}, ${c.identifier} *`,e=>{if(e.tcbVideoHandled)return;const i=t(e.target).closest(c.identifier);i.length&&(e.tcbVideoHandled=!0,c.onClick(i,e))})}static onClick(t,e){const i=t.find(c.overlaySelector),n=t.find(".tcb-video-float-container.tcb-float-closed").length>0,r=i.length>0&&i.is(":visible");let s=c.detectProvider(t);if(TCB_Front.Hooks.doAction("tcb.video.before_autoplay",t,s),a.isCustomProvider(s)){if(!r)return;if(n)return void(i.length>0&&i.fadeOut());switch(s){case"youtube":o.play(t);break;case"vimeo":a.playIframeVideo(t,i,c.vimeoAutoplayString);break;case"wistia":t.find("iframe").length>0?a.playIframeVideo(t,i,c.wistiaAutoplayString):c.playWistiaScriptEmbed(t);break;case"bunnynet":a.playIframeVideo(t,i,`${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`)}const e=t.find('[data-reporting-enabled="1"]');e.length>0&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e)}else a.isSelfHosted(s)&&c.toggleHtmlVideoPlay(t,e);i.length>0&&i.fadeOut()}static toggleHtmlVideoPlay(e,i){if((e.find(".tcb-video-cover:visible").length>0||!TCB_Front.browser.safari)&&(void 0===i||0===t(i.target).closest(".tcb-float-close-button").length)){const a=e.find("video").get(0);function o(t){setTimeout(function(){a[t]()})}o(a.paused?"play":"pause")}}static maybeAutoplayVideo(e){let i;i=void 0===e?t(`${c.identifier}:not([data-type="dynamic"])`):e.find(`${c.identifier}:not([data-type="dynamic"])`),i.each((e,i)=>{const a=t(i);0===a.parents(".tve_p_lb_content").length&&c.autoplayVideo(a)})}static autoplayVideo(t){if(1!==parseInt(t.attr("data-autoplay")))return;const e=t.attr("data-type");let i="";switch(e){case"youtube":i=`&${o.autoplayString}&${o.mutedString}`;break;case"vimeo":i=`&${c.vimeoAutoplayString}&${c.vimeoMutedString}`;break;case"wistia":i=`&${c.wistiaAutoplayString}&${c.wistiaMutedString}`;break;case"bunnynet":i=`&${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`}if(a.isCustomProvider(e)){const e=t.find("iframe");let a=e.attr("src")||e.attr("data-src");a&&0!==a.length&&-1===a.indexOf(i)&&(a.includes("?")?"?"===a.slice(-1)&&(i=i.substring(1)):i=`?${i.substring(1)}`,a+=i,e.attr({src:a,"data-src":a}))}else if(a.isSelfHosted(e)){const e=t.find("video").get(0);e&&(e.muted=!0,e.paused&&e.play())}}static pauseVideos(t){t.find("video").each((t,e)=>e.pause()),c.pauseProviderIframes(t)}static pauseProviderIframes(t){t.find("iframe").each((t,e)=>{try{const t=(e.getAttribute("src")||"").toLowerCase();(t.includes("youtube.com/embed")||t.includes("youtu.be"))&&e.contentWindow&&e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*")}catch(t){}}),t.find("iframe").each((t,e)=>{try{(e.getAttribute("src")||"").toLowerCase().includes("vimeo.com")&&e.contentWindow&&e.contentWindow.postMessage('{"method":"pause"}',"*")}catch(t){}}),t.find('.wistia_embed,[class*="wistia_async_"]').each((t,i)=>{try{const t=i.getAttribute("class")||"";let a=null;const o=t.match(/wistia_async_([a-zA-Z0-9]+)/);if(o&&(a=o[1]),!a){const t=(i.getAttribute("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);t&&(a=t[1])}if(!a)return;if(e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(a)}catch(t){}if(!t){const a=i.getAttribute("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t&&"function"==typeof t.pause){try{t.pause()}catch(t){}return}}e._wq=e._wq||[],e._wq.push({id:a,onReady:function(t){try{t.pause()}catch(t){}}})}catch(t){}});try{t.find(".wistia_embed video").each((t,e)=>{try{e.pause()}catch(t){}})}catch(t){}}static get vimeoAutoplayString(){return"autoplay=1"}static get vimeoMutedString(){return"muted=1"}static get wistiaAutoplayString(){return"autoPlay=true"}static get wistiaMutedString(){return"muted=true"}static get bunnynetAutoplayString(){return"autoplay=true"}static get bunnynetMutedString(){return"muted=false"}static get overlaySelector(){return".video_overlay_image, .tcb-video-cover"}static detectProvider(t){let e=t.find(".tcb-responsive-video").attr("data-provider")||t.attr("data-type");if(e&&"dynamic"!==e)return e;const i=(t.find("iframe").attr("src")||t.find("source").attr("src")||"").toLowerCase();return i.includes("youtube")||i.includes("youtu.be")?"youtube":i.includes("vimeo")?"vimeo":i.includes("wistia")?"wistia":i.includes("bunnycdn")||i.includes("mediadelivery")?"bunnynet":t.find('.wistia_embed,[class*="wistia_async_"]').length>0?"wistia":e}static playWistiaScriptEmbed(t){const i=t.find('.wistia_embed,[class*="wistia_async_"]').first();if(0!==i.length){e._wq=e._wq||[];try{const a=i.attr("class")||"";let o=null;const n=a.match(/wistia_async_([a-zA-Z0-9]+)/);if(n&&(o=n[1]),!o){const e=(i.attr("data-url")||t.attr("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);e&&(o=e[1])}if(o&&e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(o)}catch(t){}if(!t){const a=i.attr("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}return}}o&&e._wq.push({id:o,onReady:function(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}}})}catch(t){}}}}return window.TCB_Front.playBackgroundYoutube=o.playBackgroundVideos,window.TCB_Front.refreshBackgroundYoutube=o.refreshBackgroundVideos,window.TCB_Front.onVideoClick=c.onClick,window.TCB_Front.changeAutoplayVideo=c.maybeAutoplayVideo,window.TCB_Front.makeAutoplayVideo=c.autoplayVideo,window.TCB_Front.Video=c,window.TCB_Front.floating=i(65017),c}},70025(t,e,i){t.exports=(t,e)=>{const a=i(82368)(t,e);let o=null;class n{static init(){t('div[data-reporting-enabled="1"], iframe[data-reporting-enabled="1"]').each((e,i)=>n.initVideo(t(i))),TCB_Front.Hooks.addAction("tcb.video.init_reporting",t=>n.initVideo(t))}static initVideo(t){if(t.data("tcb-video-initialized"))return;t.data("tcb-video-initialized",1);const e=t.attr("data-type");let i,r=0,s=0,c=["custom","external"].includes(e)?t.find("source").attr("src"):t.attr("data-url"),d=null;c=c.replace("#t=0.1","");const l=()=>{const t="function"==typeof d?d():r+5,e=t=>{const e=Math.max(Number(t)||0,r);n.saveRange(r,e,c),r=e};t&&"function"==typeof t.then?t.then(e).catch(()=>{const t=r+5;n.saveRange(r,t,c),r=t}):e(t)},u={setCurrentTimeGetter:t=>{d=t},onPlay:t=>{s||(s=1,n.triggerVideoStart(c)),r=t,clearInterval(i),i=setInterval(l,5e3)},onPause:t=>{clearInterval(i),t>r&&n.saveRange(r,t,c)},onEnd:t=>{n.saveRange(r,t,c),clearInterval(i),TCB_Front.Hooks.doAction("tcb.video.on_end",o)},onBuffer:t=>{r=t,clearInterval(i),i=setInterval(l,5e3)}};switch(e){case"youtube":a.initReportingEvents(t,u);break;case"vimeo":n.initVimeoEvents(t,u);break;case"wistia":n.initWistiaEvents(t,u);break;case"custom":case"external":n.initHtmlEvents(t,u)}}static initVimeoEvents(i,a){if(void 0===e.Vimeo)return void t.getScript("https://player.vimeo.com/api/player.js",()=>n.initVimeoEvents(i,a));const o=0===i.find("iframe").length?i:i.find("iframe"),r=new e.Vimeo.Player(o);a.setCurrentTimeGetter(()=>r.getCurrentTime()),r.on("play",()=>r.getCurrentTime().then(a.onPlay)),r.on("pause",()=>r.getCurrentTime().then(a.onPause)),r.on("ended",()=>r.getCurrentTime().then(a.onEnd)),r.on("seeking",()=>r.getCurrentTime().then(a.onBuffer))}static initWistiaEvents(i,a){const o=i.find("iframe");let r=o.attr("data-code");if(0!==o.length)o.addClass("wistia_embed");else{const t=i.attr("data-url");r=t.substring(t.lastIndexOf("/")+1)}void 0!==e._wq?e._wq.push({id:r,onReady(t){a.setCurrentTimeGetter(()=>t.time()),t.bind("play",()=>a.onPlay(t.time())).bind("pause",()=>a.onPause(t.time())).bind("end",()=>a.onEnd(t.time())).bind("seek",()=>a.onBuffer(t.time()))}}):t.getScript("//fast.wistia.com/assets/external/E-v1.js",()=>n.initWistiaEvents(i,a))}static initHtmlEvents(t,e){const i=t.find("video"),a=()=>i[0].currentTime;e.setCurrentTimeGetter(a),i.on("play",()=>e.onPlay(a())).on("pause",()=>e.onPause(a())).on("ended",()=>e.onEnd(a()))}static triggerVideoStart(t){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/video_started",data:{video_url:t,user_id:tve_frontend_options.current_user.id,post_id:tve_frontend_options.post_id}})}static saveRange(t,e,i){var a;TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/save_range",data:{video_url:i,user_id:null!==(a=tve_frontend_options.current_user.id)&&void 0!==a?a:0,post_id:tve_frontend_options.post_id,range_start:Math.round(t),range_end:Math.round(e)}}).done(t=>{o=t,TCB_Front.Hooks.doAction("tcb.video.after_save_range",t)})}}return n}},42166(t){const e=["youtube","vimeo","wistia","bunnynet"],i=["self","external","custom"];t.exports=class{static isCustomProvider(t){return e.includes(t)}static isSelfHosted(t){return i.includes(t)}static playIframeVideo(t,e,i){const a=t.find("iframe"),o=a.parent(),n=document.createElement("iframe"),r=TCB_Front.Utils.getAttr(a);a.remove(),r.allow?r.allow.toLowerCase().includes("autoplay")||(r.allow=`${r.allow}; autoplay`):r.allow="autoplay";let s=r.src||r["data-src"]||"";const c=i.split("=")[0];if(s){const t=new RegExp(`([?&])${c}=([^&#]*)`,"i");s=s.replace(t,(t,e)=>"?"===e&&s.substring(s.indexOf(t)+t.length).startsWith("&")?"?":""),s=s.replace(/\?&/,"?").replace(/[?&]$/,"")}const d=s.includes("?")?"&":"?",l=`${s}${s?d:""}${i}`;r.src=l,r["data-src"]=l;for(const t in r)try{n.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}let u=!1;if(o.length)try{o.append(n),u=!0}catch(t){}if(!u)try{e.replaceWith(n),u=!0}catch(t){}if(u||t.find(".tve_responsive_video_container,.tcb-video-float-container").first().append(n),e.length)try{e.remove()}catch(t){}n.focus()}}},23814(t){(e=>{class i{static onDOMReady(){document.addEventListener("vooPlayerReady",i.playBackgroundVoo,!1),document.addEventListener("vooPlayerReady",i.changeVooOnPlay,!1),TCB_Front.Utils.isEditorPage()?e(".tcb-video-background-el iframe.tcb-voo-bg").each(function(){const t=TVE.inner_$(this),e=t.attr("src");t.attr("src",e)}):(e('.thrv_responsive_video[data-type="vooplayer"]').each((t,i)=>{const a=e(i),o=a.outerHeight(),n=a.find(".tcb-video-cover,.video_overlay_image"),r=a.find("iframe");n.length>0&&r.length>0&&(a.find(".video-skin-player").css("z-index","-1"),r.before(n.css({height:r.height(),"max-height":o})),r.css("max-height",o))}),TCB_Front.floating.init()),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(t,e)=>{"vooplayer"===e&&t.find(".video-skin-player").css("z-index","")})}static playBackgroundVoo(){e("iframe.tcb-voo-bg").each((t,e)=>{const i=()=>{vooAPI(e.dataset.playerid,"onEnded",null,i),vooAPI(e.dataset.playerid,"play"),vooAPI(e.dataset.playerid,"volume",[0])};i()})}static changeVooOnPlay(t=TCB_Front.$body){t&&t.jquery||(t=TCB_Front.$body),t.find("iframe.video-player-container").each((t,i)=>{const a=()=>{e(i).css("pointer-events",""),e(i).parent().find("#theImg").remove()};i.src?a():vooAPI(i.dataset.playerid,"onPlay",null,()=>{a()})})}static getAssetsToPreconnect(){return["https://s3.spotlightr.com"]}}t.exports=i,window.TCB_Front.changeVooOnPlay=i.changeVooOnPlay})(ThriveGlobal.$j)},65465(t){t.exports=(t,e)=>{class i{static initialize(t){e.onYouTubeIframeAPIReady=()=>{TCB_Front.youtubeApiFetched=1,t()},i.fetchIframeApi()}static isApiInitialized(){return 1===TCB_Front.youtubeApiFetched||void 0!==e.YT&&void 0!==e.YT.Player}static fetchIframeApi(){t.ajax({url:"https://www.youtube.com/iframe_api",type:"get",crossDomain:!0,cache:!0,dataType:"script"})}static getDefaultPlayerParameters(t,e=!1){const i={autoplay:1,cc_load_policy:0,controls:0,disablekb:1,fs:0,iv_load_policy:0,modestbranding:1,playsinline:1,rel:0,showinfo:0,playlist:t};return e&&(i.loop=1,i.listType="playlist"),i}static isPlaylist(t){return t&&34===t.length}static getAssetsToPreconnect(){return["https://www.youtube.com","https://www.google.com","https://googleads.g.doubleclick.net","https://static.doubleclick.net","https://www.gstatic.com"]}}return i}},69997(t,e,i){t.exports=(t,e)=>{const a=i(65465)(t,e),o=".tcb-yt-bg";class n{static resetVideo(t){const e=t.find(o);if(e.length>0){const t=e.closest(".tcb-video-background-el"),i=TVE.Components.background.controls.video.video_settings.get_embed_code("background");t.html(i),n.play(t.find(o))}}static play(e=t(`div${o}:visible`)){e.length&&(a.isApiInitialized()?e.each((e,i)=>{const o=i.getAttribute("data-yt-id");let n;n=a.isPlaylist(o)?new YT.Player(i.id,{playerVars:a.getDefaultPlayerParameters(o,!0),events:{onReady:t=>t.target.mute(),onStateChange:t=>t.target.mute()}}):new YT.Player(i.id,{videoId:o,playerVars:a.getDefaultPlayerParameters(o),events:{onReady:t=>{t.target.mute(),t.target.playVideo()},onStateChange:t=>{t.target&&t.target.mute&&t.target.mute(),t.data===(YT.PlayerState.ENDED||0)&&t.target.playVideo()}}}),TCB_Front.latestYoutubeBackgroundPlayerInstance=n,t(n.getIframe()).data("tcb-yt-player",n)}):a.initialize(()=>n.play(e)))}static refreshVideos(){e.YT&&e.YT.Player&&t(`iframe${o}`).each((e,i)=>{const a=t(i);a.data("tcb-yt-player")||n.play(a)})}}return n}},82368(t,e,i){t.exports=(t,e)=>{const a=i(69997)(t,e),o=i(65465)(t,e);class n{static onDomReady(){n.initHooks(),n.playBackgroundVideos()}static initHooks(){TCB_Front.Utils.isEditorPage()?(TVE.add_action("tcb.element.duplicate",(t,e)=>a.resetVideo(e)),["sync","activate","create_display"].forEach(t=>TVE.add_action(`tve.conditional_display.${t}`,t=>a.resetVideo(t)))):(TCB_Front.Hooks.addFilter("tcb.video.lazy_load.src",(t,e)=>(t.includes("&enablejsapi=1")||"youtube"!==e.attr("data-type")||(t+="&enablejsapi=1"),t)),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(e,i)=>{if("youtube"!==i)return;const a=e.find("iframe")[0];t.each(a.attributes,(t,e)=>{let i=!1;e&&e.name.includes("data-gtm-yt-inspected")&&(a.removeAttribute(e.name),i=!0),i&&a.removeAttribute("id")})}))}static play(e){if(!o.isApiInitialized())return void o.initialize(()=>n.play(e));const i=e.find("iframe"),a=t("<div>"),r=TCB_Front.Utils.getAttr(i),s=new URL(TCB_Front.Utils.addHttp(i.attr("src"))),c=i.attr("data-code")?i.attr("data-code"):s.pathname.replace("/embed/",""),d=Object.fromEntries(s.searchParams.entries());d.autoplay=1,i.remove(),e.find(".video_overlay_image, .tcb-video-cover").replaceWith(a),1===parseInt(e.attr("data-reporting-enabled"))&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e),TCB_Front.latestYoutubePlayerInstance=n.initYoutubePlayer(a,c,d),delete r.src;const l=e.find("iframe")[0];for(const t in r)try{l.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}}static initYoutubePlayer(t,e,i){return new YT.Player(t[0],{videoId:e,playerVars:i,width:"100%",events:{onReady:t=>t.target.playVideo(),onError:t=>console.warn(t)}})}static initReportingEvents(t,e){if(!o.isApiInitialized())return void o.initialize(()=>n.initReportingEvents(t,e));let i=t.find("iframe")[0];if(0===t.find("iframe").length){const e=t.attr("src")+"&enablejsapi=1";t.attr("src",e),i=t[0]}new YT.Player(i,{events:{onStateChange:t=>{var i,a;const o=t.data,n=(null==t||null===(i=t.target)||void 0===i||null===(a=i.playerInfo)||void 0===a?void 0:a.currentTime)||0;switch(e&&"function"==typeof e.setCurrentTimeGetter&&t&&t.target&&"function"==typeof t.target.getCurrentTime&&e.setCurrentTimeGetter(()=>t.target.getCurrentTime()),o){case YT.PlayerState.PLAYING:e.onPlay(n);break;case YT.PlayerState.PAUSED:e.onPause(n);break;case YT.PlayerState.ENDED:e.onEnd(n);break;case YT.PlayerState.BUFFERING:e.onBuffer(n)}}}})}static playBackgroundVideos(t){a.play(t)}static refreshBackgroundVideos(){a.refreshVideos()}static getAssetsToPreconnect(){return o.getAssetsToPreconnect()}static get autoplayString(){return"autoplay=1"}static get mutedString(){return"mute=1"}}return window.TCB_Front.Youtube=n,n}}},e={};function i(a){var o=e[a];if(void 0!==o)return o.exports;var n=e[a]={exports:{}};return t[a](n,n.exports,i),n.exports}void 0===TCB_Front.js_modules.video&&TCB_Front.setModuleLoadedStatus("video",!1),(t=>{if(TCB_Front.isModuleLoaded("video"))return;const e=i(49814)(t,window);e.init(),window.TCB_Front.video=e,TCB_Front.setModuleLoadedStatus("video",!0)})(ThriveGlobal.$j)})();
(()=>{var t={14442(t,e,n){const o=n(66640);t.exports=new class{constructor(t){this.googleClientId=t,this.libraryLoaded=!1,this.initDone=!1,this.buttonsToInit=[],this.callbacks={}}isConnected(){return!!this.googleClientId}registerCallback(t,e){this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e)}trigger(t,...e){Array.isArray(this.callbacks[t])&&this.callbacks[t].forEach(t=>{t(...e)})}initButton(t,{size:e="large",text:n="continue_with",shape:o="rectangular"}={}){t&&(this.libraryLoaded?window.google.accounts.id.renderButton(t,{size:e,text:n,shape:o}):this.buttonsToInit.push(t))}init(){var t,e;this.googleClientId&&!1===this.initDone&&(window.onGoogleLibraryLoad=()=>{this.libraryLoaded||(window.google.accounts.id.initialize({client_id:this.googleClientId,cancel_on_tap_outside:!1,context:"use",shape:"circle",type:"icon",auto_prompt:!1,callback:({credential:t=""})=>{this.loggedInUser=o.parseJwt(t),this.trigger("auth",this.loggedInUser)}}),this.libraryLoaded=!0,this.buttonsToInit.forEach(t=>this.initButton(t)))},null!==(t=window)&&void 0!==t&&null!==(e=t.google)&&void 0!==e&&e.accounts&&window.onGoogleLibraryLoad(),this.initDone=!0)}getAvatar(t=420){var e;let n="";return null!==(e=this.loggedInUser)&&void 0!==e&&e.picture&&(n=this.loggedInUser.picture.replace(/=s\d*/g,`=s${t}`)),n}}(tve_frontend_options.google_client_id)},66640(t){(e=>{class n{static isEditorPage(){return tve_frontend_options.is_editor_page}static isExternal(t){return n.getDomain(location.href)!==n.getDomain(t)}static getDomain(t){return t.replace("http://","").replace("https://","").split("/")[0]}static restAjax({type:t="POST",route:n="",data:o}){return e.ajax({headers:{"X-WP-Nonce":tve_frontend_options.nonce},url:n,type:t,data:o})}static handleContent(t,n=!0){e(window).trigger(n?"tcb_on_content_show":"tcb_on_content_hide"),e(window).trigger("tve_after_content_toggle",[t,n])}static jsonParse(t,e,n=null,o={}){if(null==n){let n;try{n=JSON.parse(t.attr(e)||JSON.stringify(o))}catch(e){console.warn("Could not get json data for element:",t),n=o}return n}return t.attr(e,JSON.stringify(n))}static toast(t,e,n){"string"!=typeof t&&(t=t.message||t.error||t.success),e||(e=!1),TCB_Front.notificationElement.toggle(t,e?"error":"success",n)}static windowWidth(){let t,e;try{e=window.parent&&window.parent.TVE&&window.parent.TVE.main,t=e&&window.parent.TVE.main.$frame.width()||TCB_Front.$window[0].innerWidth}catch(n){t=TCB_Front.$window[0].innerWidth,e=!1}let n=window.screen.width;return window.matchMedia("(orientation:landscape)").matches&&window.screen.height>n&&(n=window.screen.height),e||t>n+20&&t>window.outerWidth+20&&(t=n),t}static getBrowserScrollSize(){const t={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},n=e("<div>").css(e.extend({},t)),o=e("<div>").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},t)).append(n).appendTo("body").scrollLeft(1e3).scrollTop(1e3),r={height:o.offset().top-n.offset().top||0,width:o.offset().left-n.offset().left||0};return o.remove(),r}static hasAdminBar(){return e("#wpadminbar").length>0}static appendFormParamsToURL(t,o){return!Array.isArray(o)&&o.jquery&&(o=n.buildFormParams(o)),t+(t.split("?")[1]?"&":"?")+e.param(o)}static buildFormParams(t){let e=[];return t.find(".tve_lg_input_container input:not([name=user_consent]), .tve_lg_input_container textarea").not("input[type=hidden]").not("input[type=password]").each((t,n)=>{const o=ThriveGlobal.$j(n).serializeArray();if(o[0]){n.dataset.name&&(o[0].name=n.dataset.name.replace(/\s/g,"_")),TCB_Front.reservedTerms.includes(o[0].name.toLowerCase())&&(o[0].name="tve_"+o[0].name);const t=e.findIndex(t=>t.name===o[0].name);t>=0?e[t].value=e[t].value+", "+o[0].value:e=e.concat(o)}}),e}static appendRandomParamToURL(t){return t+(t.split("?")[1]?"&":"?")+"_="+Math.floor(1e3*Math.random())}static isEmail(t){return/^(([^<>()\[\]\\.,;:\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,}))$/.test(String(t).toLowerCase())}static addHttp(t){return!(t=t.trim())||0===t.indexOf("#")||/^mailto/.test(t)||/^tel/.test(t)||/^(?:f|ht)tps?\:\/\//.test(t)||(t="https://"+t),t}static unserialize(t){const e="undefined"!=typeof window?window:globalThis,n=function(t){let e=t.length;for(let n=t.length-1;n>=0;n--){const o=t.charCodeAt(n);o>127&&o<=2047?e++:o>2047&&o<=65535&&(e+=2),o>=56320&&o<=57343&&n--}return e-1},o=function(t,n,o,r){throw new e[t](n,o,r)},r=function(t,e,n){const r=[];let i=2,a=t.slice(e,e+1);for(;a!==n;)i+e>t.length&&o("Error","Invalid"),r.push(a),a=t.slice(e+(i-1),e+i),i+=1;return[r.length,r.join("")]};return function t(e,i){let a,s,c,l,d,u,h,p,g,m,w,f,v,_,b,y,T,C=0,x=function(t){return t};const k=e.slice(i,i+1).toLowerCase();switch(i||(i=0),a=i+2,k){case"i":x=function(t){return parseInt(t,10)},p=r(e,a,";"),C=p[0],h=p[1],a+=C+1;break;case"b":x=function(t){return 0!==parseInt(t,10)},p=r(e,a,";"),C=p[0],h=p[1],a+=C+1;break;case"d":x=function(t){return parseFloat(t)},p=r(e,a,";"),C=p[0],h=p[1],a+=C+1;break;case"n":h=null;break;case"s":g=r(e,a,":"),C=g[0],m=g[1],a+=C+2,p=function(t,e,o){const r=[];let i,a;for(i=0;i<o;i++)a=t.slice(e+(i-1),e+i),r.push(a),o-=n(a);return[r.length,r.join("")]}(e,a+1,parseInt(m,10)),C=p[0],h=p[1],a+=C+2,C!==parseInt(m,10)&&C!==h.length&&o("SyntaxError","String length mismatch");break;case"a":for(h={},s=r(e,a,":"),C=s[0],c=s[1],a+=C+2,d=parseInt(c,10),l=!0,w=0;w<d;w++)v=t(e,a),_=v[1],f=v[2],a+=_,b=t(e,a),y=b[1],T=b[2],a+=y,f!==w&&(l=!1),h[f]=T;if(l){for(u=new Array(d),w=0;w<d;w++)u[w]=h[w];h=u}a+=1;break;default:o("SyntaxError","Unknown / Unhandled data type(s): "+k)}return[k,a-i,x(h)]}(t+"",0)[2]}static validateImageUrl(t){return!!t.match(/.*\.(gif|jpe?g|bmp|png)$/gim)}static getQueryStrings(){return window.location.search.replace("?","").split("&").reduce((t,e)=>{const n=e.split("=");return t[n[0]]=n[1],t},{})}static parseJwt(t){const[,e=""]=t.split("."),n=e.replace(/-/g,"+").replace(/_/g,"/");let o;try{o=JSON.parse(decodeURIComponent(window.atob(n).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(t){o={}}return o}static insertHeadScripts(t,e,n){const o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.async=!0,"function"==typeof n&&(r.onload=r.onreadystatechange=n),void 0!==e&&(r.id=e),r.src=t,o.insertBefore(r,o.firstChild)}static insertStylesheet(t,e){const n=document.getElementsByTagName("head")[0],o=document.createElement("link");o.rel="stylesheet",o.id=e,o.type="text/css",o.href=t,n.insertBefore(o,n.firstChild)}static hasResource(t,e){return null!==document.getElementById(t)||null!==document.querySelector(`[src="${e}"],[href="${e}"]`)}static getAttr(t){const n={};return e.each(t[0].attributes,function(t,e){n[e.name]=e.value}),n}}n.checkCustomHtmlPreview=function(){ThriveGlobal.$j(".thrv_custom_html_shortcode").each(function(){const t=ThriveGlobal.$j(this),e=t.find(".tve_shortcode_overlay");if(!n.isEditorPage||!n.isEditorPage())return void(e.length&&e.remove());e.length&&e.remove();const o=t.clone();o.find("script, style, .tve_shortcode_overlay, code.tve_js_placeholder, code.tve_css_placeholder").remove();const r=o.text().trim(),i=t.find("img").filter(function(){return 0===ThriveGlobal.$j(this).closest("code.tve_noscript").length}).length>0;r.length>0||i||t.append('<div class="tve_shortcode_overlay" data-tcb-preview-overlay="1"><span>No preview available.</span></div>')})},function(){if("undefined"==typeof window)return;const t=n.isEditorPage&&n.isEditorPage(),e=ThriveGlobal.$j(document);e.ready(function(){n.checkCustomHtmlPreview()}),t&&(e.on("tcb:template:loaded tcb:content:changed",function(){setTimeout(n.checkCustomHtmlPreview,50)}),ThriveGlobal.$j(window).on("load",function(){setTimeout(n.checkCustomHtmlPreview,100)}))}(),t.exports=n,window.TCB_Front.toast=n.toast,window.tve_is_email=n.isEmail,window.TCB_Front.checkCustomHtmlPreview=n.checkCustomHtmlPreview})(ThriveGlobal.$j)}},e={};void 0===TCB_Front.js_modules["google-api"]&&TCB_Front.setModuleLoadedStatus("google-api",!1),TCB_Front.isModuleLoaded("google-api")||(TCB_Front.googleApi=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}(14442),TCB_Front.setModuleLoadedStatus("google-api",!0))})();
(()=>{var t,e={88669(t){class e{constructor(t,e="v15.0"){this.appId=t,this.apiVersion=e,this.userId=null,this.callbacks={}}static get fb(){return window.FB}static isLoaded(){return void 0!==e.fb}static loadSdk(){const t=document.createElement("script");t.id="facebook-jssdk",t.setAttribute("src","https://connect.facebook.net/en_US/sdk.js"),document.head.appendChild(t)}static addButton(t,e="medium"){t.html(`<div class="fb-login-button" \n\t\t\t\t\t\t\t\tdata-width=""\n\t\t\t\t\t\t\t\tdata-size="${e}" \n\t\t\t\t\t\t\t\tdata-onlogin="tve_on_facebook_login_click" \n\t\t\t\t\t\t\t\tdata-button-type="continue_with" \n\t\t\t\t\t\t\t\tdata-layout="default" \n\t\t\t\t\t\t\t\tdata-auto-logout-link="false" \n\t\t\t\t\t\t\t\tdata-use-continue-as="true">\n\t\t\t\t\t\t</div>`)}isConnected(){return!!this.appId}registerCallback(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}trigger(t,...e){this.callbacks[t]&&this.callbacks[t].forEach(t=>t(...e))}init(){window.fbAsyncInit=()=>{e.fb.init({appId:this.appId,cookie:!1,xfbml:!0,version:this.apiVersion}),this.trigger("init")},e.isLoaded()||e.loadSdk()}handleAuth(t,e=!0){"connected"===t.status?(this.userId=t.authResponse.userID,this.trigger("auth",t)):e&&this.login()}login(){e.fb.login(t=>{this.handleAuth(t,!1)})}getProfilePicture(t=420){return new Promise((o,i)=>{e.fb.api(`/${this.userId}/picture?redirect=false`,"GET",{width:t},t=>{t&&!t.error?o(t.data.url):i(t.error)})})}}t.exports=t=>{const o=new e(tve_frontend_options.facebook_app_id);return t.tve_on_facebook_login_click=t=>o.handleAuth(t),o}}},o={};void 0===TCB_Front.js_modules["facebook-api"]&&TCB_Front.setModuleLoadedStatus("facebook-api",!1),t=ThriveGlobal.$j,TCB_Front.isModuleLoaded("facebook-api")||(TCB_Front.facebookApi=function t(i){var a=o[i];if(void 0!==a)return a.exports;var n=o[i]={exports:{}};return e[i](n,n.exports,t),n.exports}(88669)(window),t(window).on("tcb_after_dom_ready",()=>{TCB_Front.facebookApi.init()}),TCB_Front.setModuleLoadedStatus("facebook-api",!0))})();
void 0===TCB_Front.js_modules.modal&&TCB_Front.setModuleLoadedStatus("modal",!1),(t=>{if(!TCB_Front.isModuleLoaded("modal")){TCB_Front.Utils.isEditorPage()||t(window).on("tcb_after_dom_ready",()=>{const t=Array.from(TCB_Front.$body.find('[data-action="open-modal"]')),a=t.map(t=>t.getAttribute("data-modal-type"));TVE_Dash.add_load_item("tcb-modals",a,a=>{t.forEach(t=>{const o=t.getAttribute("data-modal-type");if(a[o]){const r=e.instance(a[o],o,{size:t.getAttribute("data-modal-size")||"medium"});t.addEventListener("click",()=>r.open()),TCB_Front.Hooks.doAction("tcb-modal.loaded",o,r,t)}})})});class e{constructor(e,a,o={}){this.$element=t("<div></div>").html(e),this.type=a,this.options=o,this.callbacks={}}static get $wrapper(){return e.$_wrapper||(e.$_wrapper=t('<div class="tve-modal-wrapper"><div class="tve-modal-inner"></div></div>').appendTo(t("body")),e.$_wrapper.on("mousedown",t=>{t.target===e.$_wrapper[0]&&e.close()}),document.addEventListener("keyup",t=>{"Escape"===t.key&&e.isOpen()&&e.close()})),e.$_wrapper}static get $inner(){return e.$_inner||(e.$_inner=e.$wrapper.find(".tve-modal-inner"),e.$_inner.on("click",'[data-dismiss="true"]',()=>e.close()),e.$_inner.on("click change input keyup","[data-trigger]",t=>{const a=t.currentTarget,o=a.getAttribute("data-trigger"),r=a.getAttribute("data-fn");(o===t.type||"onEnter"===o&&"keyup"===t.type&&"Enter"===t.key)&&r&&e.getCurrentOpenModal().executeCallback(r,t,a)})),e.$_inner}static get closeButton(){return'<button class="tve-modal-x" data-dismiss="true"></button>'}static isOpen(){return e.$wrapper.hasClass("tve-modal-open")}static close(){if(e.isOpen()){const t=e.$wrapper.data("modal");t&&t.executeCallback("before-close")}e.$wrapper.removeClass("tve-modal-open").removeData("modal"),e.$inner.empty(),TCB_Front.Hooks.doAction("tcb-modal.close")}static getCurrentOpenModal(){return e.$wrapper.data("modal")}static instance(t,a,o){return new e(t,a,o)}registerCallback(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}executeCallback(t,...e){this.callbacks[t]&&this.callbacks[t].forEach(t=>t(...e)),TCB_Front.Hooks.doAction(`tcb-modal.${t}`,this.type,this)}open(){this.executeCallback("before-open"),e.$wrapper.addClass("tve-modal-open").attr("data-modal-type",this.type).data("modal",this),e.$inner.empty().append(e.closeButton).append(this.$element).attr("data-size",this.options.size),this.executeCallback("after-open")}isOpen(){return e.isOpen()&&this===e.$wrapper.data("modal")}}TCB_Front.modal=e,TCB_Front.setModuleLoadedStatus("modal",!0)}})(ThriveGlobal.$j);
(()=>{window.TL_Front=window.TL_Front||{},window.ThriveGlobal=window.ThriveGlobal||{$j:jQuery.noConflict()};var e=".thrv_responsive_video iframe, .thrv_custom_html_shortcode iframe",t=".thrv_responsive_video video source",o=!1,r="undefined"!=typeof TL_Const&&TL_Const.trigger_based_form_types?TL_Const.trigger_based_form_types:["lightbox","screen_filler","slide_in","ribbon"],n=["shortcode_"];TL_Front.add_page_css=function(e){ThriveGlobal.$j.each(e,(function(e,t){if(e+="-css",-1!==(t=t.replace(/^http(s)?:\/\//,"//")).indexOf("thrive_flat")){var o=document.createElement("div");if(o.classList.add("tve-cb"),document.body.append(o),"both"===getComputedStyle(o).clear)return void o.remove();o.remove()}ThriveGlobal.$j("#"+e).length||ThriveGlobal.$j('link[href="http:'+t+'"]').length||ThriveGlobal.$j('link[href="https:'+t+'"]').length||ThriveGlobal.$j('<link rel="stylesheet" id="'+e+'" type="text/css" href="'+t+'"/>').prependTo("head")}))},TL_Front.lightspeed_assets=function(e){var t=function(){return ThriveGlobal.$j('link[href*="thrive_flat.css"]').length>0},r=[];if(e.css){if(e.css.files)for(var n in e.css.files){var i="flat"===n;(!t()&&i||!i)&&ThriveGlobal.$j('<link rel="stylesheet" href="'+e.css.files[n]+'"/>').prependTo("head")}e.css.inline&&e.css.inline.length&&e.css.inline.forEach((function(e){t()||ThriveGlobal.$j(e).prependTo("head")}))}if(e.js)for(var s in e.js)TCB_Front&&!TCB_Front.isModuleLoaded(s)&&r.push(s);!function t(){if(r.length){var n=r.shift();TL_Front.add_head_script(e.js[n],"tl-lightspeed-"+n,t)}else o=!0}()},TL_Front.conditional_display=function(e){void 0!==e&&e.lazy_load_conditional_preview&&tcb_condition_sets&&e.lazy_load_conditional_preview.forEach((function(e){-1===tcb_condition_sets.findIndex((function(t){return t.key===e.key}))&&tcb_condition_sets.push(e)}))},TL_Front.$document=ThriveGlobal.$j(document),TL_Front.extendConst=function(e){TL_Const.current_screen&&delete e.current_screen,ThriveGlobal.$j.extend(!0,TL_Const,e)},TL_Front.document_write=function(e){ThriveGlobal.$j("body").append(e)},TL_Front.add_head_script=function(e,t,o){var r=document.createElement("script"),n=ThriveGlobal.$j("head")[0];r.async=!0,"function"==typeof o&&(r.onload=r.onreadystatechange=o),void 0!==t&&(r.id=t),r.src=e,n.insertBefore(r,n.firstChild)},TL_Front.add_page_js=function(e,t){"function"!=typeof t&&(t=function(){});var o=0;ThriveGlobal.$j.each(e,(function(e,t){if("tve_frontend"===e&&"undefined"!=typeof TCB_Front)return!0;if(e+="-js",t&&!ThriveGlobal.$j("#"+e).length&&!ThriveGlobal.$j('script[src="'+t+'"]').length){if(o++,-1!==t.indexOf("connect.facebook.net"))return TL_Front.add_head_script(t,e,(function(){o--})),!0;ThriveGlobal.$j.getScript(t,(function(){o--}))}})),function e(){0!==o?setTimeout(e,50):t()}()},TL_Front.send_impression=function(e,t){if(e){t=t||{};var o={security:TL_Const.security,action:TL_Const.action_impression,tl_data:e,current_screen:TL_Const.current_screen};ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){o[e]=t})),t.useBatching&&window.TVE_Dash&&!TVE_Dash.ajax_sent?TVE_Dash.add_load_item("tl_impression",o):ThriveGlobal.$j.post(TL_Const.ajax_url,o)}},TL_Front.isViewportBasedForm=function(e){return n.some((function(t){return 0===e.indexOf(t)}))},TL_Front.setupViewportImpressions=function(e){e&&0!==Object.keys(e).length&&(TL_Front.deferred_impressions=TL_Front.deferred_impressions||{},TL_Front.viewport_impressions=TL_Front.viewport_impressions||{},Object.keys(e).forEach((function(t){TL_Front.isViewportBasedForm(t)?TL_Front.viewport_impressions[t]=e[t]:-1!==r.indexOf(t)&&(TL_Front.deferred_impressions[t]=e[t])})))},TL_Front.do_impression=function(){if(TL_Front.impressions_data){var e={},t={};Object.keys(TL_Front.impressions_data).forEach((function(o){-1!==r.indexOf(o)||TL_Front.isViewportBasedForm(o)?t[o]=TL_Front.impressions_data[o]:e[o]=TL_Front.impressions_data[o]})),Object.keys(t).length>0&&(TL_Front.setupViewportImpressions(t),TL_Front.initViewportObservers()),Object.keys(e).length>0&&TL_Front.send_impression(e,{useBatching:!0})}},TL_Front.initViewportObservers=function(){TL_Front.viewport_impressions&&0!==Object.keys(TL_Front.viewport_impressions).length&&("IntersectionObserver"in window?(TL_Front.viewportObserver||(TL_Front.viewportObserverInitialCallbacks=TL_Front.viewportObserverInitialCallbacks||new WeakMap,TL_Front.viewportObservedElements=TL_Front.viewportObservedElements||new WeakSet,TL_Front.viewportObserver=new IntersectionObserver((function(e){e.forEach((function(e){var t=e.target;if(TL_Front.viewportObserverInitialCallbacks.has(t)){if(e.isIntersecting){var o=ThriveGlobal.$j(t),r=o.attr("data-tl-type")||o.closest(".tve-leads-conversion-object").attr("data-tl-type");r&&TL_Front.viewport_impressions[r]&&(TL_Front.trackViewportImpression(r),TL_Front.viewportObserver.unobserve(t),TL_Front.viewportObservedElements.delete(t))}}else TL_Front.viewportObserverInitialCallbacks.set(t,!0)}))}),{threshold:.5})),Object.keys(TL_Front.viewport_impressions).forEach((function(e){if(!TL_Front.viewport_impressions[e]._tracked){var t=ThriveGlobal.$j('.tve-leads-conversion-object[data-tl-type="'+e+'"]');if(t.length){var o=t[0];TL_Front.viewportObservedElements.has(o)||(TL_Front.viewportObservedElements.add(o),TL_Front.viewportObserver.observe(o))}}}))):Object.keys(TL_Front.viewport_impressions).forEach((function(e){TL_Front.trackViewportImpression(e)})))},TL_Front.trackViewportImpression=function(e){if(e&&TL_Front.viewport_impressions&&TL_Front.viewport_impressions[e]&&!TL_Front.viewport_impressions[e]._tracked){TL_Front.viewport_impressions[e]._tracked=!0;var t={};t[e]=TL_Front.viewport_impressions[e],TL_Front.send_impression(t)}},TL_Front.do_trigger_based_impression=function(e){if(e&&TL_Front.deferred_impressions&&TL_Front.deferred_impressions[e]&&!TL_Front.deferred_impressions[e]._tracked){TL_Front.deferred_impressions[e]._tracked=!0;var t={};t[e]=TL_Front.deferred_impressions[e],TL_Front.send_impression(t)}},TL_Front.do_two_step_impression=function(e){if(TL_Const&&TL_Const.forms&&TL_Const.forms[e]){var t=TL_Const.forms[e],o={};o[e]={group_id:t.main_group_id,form_type_id:t.form_type_id,variation_key:t._key,active_test_id:t.active_test_id||null},TL_Front.send_impression(o)}},TL_Front.maybe_track_two_step_impression=function(e){if(e&&-1!==e.indexOf("2step-")&&TL_Const&&TL_Const.forms){var t=e.replace("tve-leads-track-2step-",""),o=Object.keys(TL_Const.forms).find((function(e){return 0===e.indexOf("two_step_")&&TL_Const.forms[e]._key===t}));o&&TL_Front.do_two_step_impression(o)}},ThriveGlobal.$j((function(){if("undefined"!=typeof TL_Const){if(ThriveGlobal.$j(".tve-leads-screen-filler iframe, .tve-leads-ribbon iframe").not(".thrv_social_default iframe").not(".tcb-dr-done").each((function(){var e=ThriveGlobal.$j(this).addClass("tcb-dr-done");e.attr("src")&&e.attr("data-src",e.attr("src")),e.attr("src","")})),"undefined"!=typeof TCB_Front&&ThriveGlobal.$j(TCB_Front).on("content_loaded.thrive",(function(e,t){t.find(".tve-tl-anim").each((function(){var e=ThriveGlobal.$j(this);ThriveGlobal.$j(TL_Front).trigger("showform.thriveleads",{$target:e})}))})),ThriveGlobal.$j(window).on("tcb_after_dom_ready",(function(){if(!tve_frontend_options.is_editor_page){var e=TCB_Front.queryString.get("post_type");e&&"tve_lead_2s_lightbox"===e&&setTimeout((function(){TCB_Front.handleIframes(ThriveGlobal.$j(".tve_p_lb_content"))}),100)}})),ThriveGlobal.$j(TL_Front).on("showform.thriveleads",(function(o,n){var i,s=n.$target?n.$target:ThriveGlobal.$j("."+n.form_id);s.length&&(n.TargetEvent&&"exit"===n.TargetEvent.tve_trigger&&s.data("shown-on-exit")||(n.first&&(s=s.first()),s.attr("data-s-state")&&(s=s.closest(".tl-states-root").find('[data-state="'+s.attr("data-s-state")+'"] .tl-lb-target')),n&&n.$parentStateEl&&s.closest(".tl-style").first().data("parentStateEl",n.$parentStateEl),i=s.hasClass("tve-tl-anim")?s:s.find(".tve-tl-anim"),s.css("display",""),setTimeout((function(){i.addClass("tve-leads-triggered"),TL_Front.handle_typefocus(i,"start"),ThriveGlobal.$j(".tve_post_grid_masonry").length&&TCB_Front.postGridLayout()}),0),TL_Front.maybe_track_two_step_impression(n.form_id),n.form_type&&-1!==r.indexOf(n.form_type)&&TL_Front.do_trigger_based_impression(n.form_type),"function"==typeof TL_Front["open_"+n.form_type]?TL_Front["open_"+n.form_type](s,n.TargetEvent):s.show(),TCB_Front.resizePageSection(),s.on("switchstate",(function(e,t){t.offset().top-ThriveGlobal.$j(window).scrollTop()+t.outerHeight()<0&&ThriveGlobal.$j("html, body").animate({scrollTop:t.offset().top+"px"},50),TCB_Front.resizePageSection()})),setTimeout((function(){s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))}))}),200)))})),ThriveGlobal.$j("body").on("click",".tve-ribbon-close",(function(){var o=ThriveGlobal.$j(this).closest(".tve-leads-ribbon"),r=o.data("position");o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),o.removeClass("tve-leads-triggered"),"top"===r?ThriveGlobal.$j("body").animate({marginTop:0},200,(function(){document.body.style.removeProperty("margin-top"),TCB_Front&&TCB_Front.$window&&TCB_Front.$window.trigger("scroll")})):"bottom"===r&&ThriveGlobal.$j("body").animate({marginBottom:"0px"},200,(function(){document.body.style.removeProperty("margin-bottom")})),TL_Front.handle_typefocus(o,"pause"),setTimeout((function(){o.css(r,"")}),400),ThriveGlobal.$j("#tve-lg-error-container").hide()})),ThriveGlobal.$j(window).on("conditional_display_loaded",(function(){var e=Object.keys(TL_Front.contentHtml||{});e.length&&e.forEach((function(e){var t=ThriveGlobal.$j(".tl-placeholder-f-type-".concat(e));if(t.length){var o=ThriveGlobal.$j(TL_Front.contentHtml[e]);t.replaceWith(o),setTimeout((function(){ThriveGlobal.$j(TL_Front).trigger("showform.thriveleads",{$target:o})}))}}))})),ThriveGlobal.$j(TCB_Front).on("tl-ajax-loaded",(function(){TL_Front.viewport_impressions&&Object.keys(TL_Front.viewport_impressions).length>0&&(window.requestAnimationFrame?requestAnimationFrame((function(){TL_Front.initViewportObservers()})):TL_Front.initViewportObservers())})),TL_Const.ajax_load||TL_Front.do_impression(),TL_Front.ajax_load_callback=function(e,t){if(t&&TL_Front.conditional_display(t),e&&e.res&&e.js&&e.html){var r,i;if(TL_Front.lightspeed_assets(e.lightspeed||{}),TL_Front.add_page_css(e.res.css),TL_Front.add_page_css(e.res.fonts),e.html&&(e.html.widget||ThriveGlobal.$j(".tl-widget-container").remove(),ThriveGlobal.$j.each(e.html,(function(t,o){if(!o)return!0;if(TL_Front.contentHtml=TL_Front.contentHtml||{},TL_Front.contentHtml[t]=o,"in_content"===t){var r=parseInt(e.in_content_pos),n="after",i=ThriveGlobal.$j(".tve-tl-cnt-wrap");i.length||(i=ThriveGlobal.$j("#tve_editor.tar-main-content")),i.length||(i=ThriveGlobal.$j("#post_content"));var s=i.find("p").filter(":visible").not(".thrv_table p, form p, .tcb-post-list p, .thrv_text_element div p, p.wp-caption-text, .thrv_responsive_video p, .thrv_header p");0===s.length&&0===r?i.prepend(o):(0===r&&(r=1,n="before"),s.eq(r-1)[n](o))}else{var a=ThriveGlobal.$j(".tl-placeholder-f-type-"+t);if(e.js[t]&&e.js[t].content_locking){var l=a.parents(".tve_content_lock").first();if(e.js[t].has_conversion)return a.remove(),l.removeClass("tve_lock_hide"),!0;"tve_lock_blur"===e.js[t].lock&&l.removeClass("tve_lock_hide").addClass(e.js[t].lock)}"widget"===t?a.hasClass("tl-preload-form")?a.first().replaceWith(ThriveGlobal.$j(o).addClass("tve-leads-triggered")):(a.replaceWith(o),ThriveGlobal.$j(".tl-widget-container").children().unwrap()):a.replaceWith(o),0===t.indexOf("two_step")&&(c=t,ThriveGlobal.$j(".tl-2step-trigger-".concat(c.replace("two_step_",""))).show())}var c})),i=-1,"Microsoft Internet Explorer"==navigator.appName?(r=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(i=parseFloat(RegExp.$1))):"Netscape"==navigator.appName&&(r=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(i=parseFloat(RegExp.$1))),i>0&&setTimeout((function(){var e="";ThriveGlobal.$j("body style.tve_custom_style").each((function(){e=this.innerText,this.innerText=e}))}))),e.body_end){var a=ThriveGlobal.$j(e.body_end);a.find(".tve_wistia_popover").each((function(){ThriveGlobal.$j("#"+this.id).length&&this.parentNode.removeChild(this)})),a.filter("link[href]").each((function(){ThriveGlobal.$j('link[href="'+this.getAttribute("href")+'"]').length&&(a=a.not(this))})),a.filter("script[src]").each((function(){ThriveGlobal.$j('script[src="'+this.getAttribute("src")+'"]').length&&(a=a.not(this))}));try{ThriveGlobal.$j("body").append(a)}catch(e){console.log("Body append: "+e)}}void 0!==e.js.TVO_Form&&(TVO_Form=e.js.TVO_Form),TL_Front.add_page_js(e.res.js,(function(){n=!0})),setTimeout((function e(){n&&o?(TCB_Front.event_triggers(ThriveGlobal.$j("body")),TCB_Front.onDOMReady(),s(),ThriveGlobal.$j(TCB_Front).trigger("tl-ajax-loaded"),TCB_Front.add_scroll_callback((function(){var e=ThriveGlobal.$j('.tve-leads-ribbon[data-position="top"]'),t=e.find(".tve_shortcode_editor"),o=e.is(":visible")&&Number(e.css("opacity"))?Math.max(e.outerHeight(),t.outerHeight()):0,r=ThriveGlobal.$j('[data-elementor-type="header"] .elementor-top-section.elementor-sticky.elementor-sticky--active');r.length||(r=ThriveGlobal.$j(".she-header")),r.length&&r[0].style.setProperty("margin-top",o+"px","important")}))):setTimeout(e,50)}),50),TL_Const.forms=e.js,e.deferred_impressions&&TL_Front.setupViewportImpressions(e.deferred_impressions),setTimeout((function(){ThriveGlobal.$j(".tl-preload-form").remove()}),1e3)}},TL_Const.ajax_load){var n=!1,i=(ThriveGlobal.$j(".tve-leads-two-step-trigger").hide(),{tcb_js:"undefined"!=typeof TCB_Front?1:0,main_group_id:TL_Const.main_group_id,shortcode_ids:TL_Const.shortcode_ids,two_step_ids:TL_Const.two_step_ids,action:"tve_leads_ajax_load_forms",security:TL_Const.security,display_options:TL_Const.display_options,current_screen:TL_Const.current_screen});return ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){i[e]=t})),void(window.TVE_Dash&&!TVE_Dash.ajax_sent?ThriveGlobal.$j(document).on("tve-dash.load",(function(e){TVE_Dash.add_load_item("tl_lazy_load",i,TL_Front.ajax_load_callback)})):ThriveGlobal.$j.ajax({url:TL_Const.ajax_url,type:"post",dataType:"json",data:i,xhrFields:{withCredentials:!0}}).done(TL_Front.ajax_load_callback))}s()}function s(){if(!TL_Const.forms)return!1;function e(e){if(e.find('[data-validation="email"]').length)return e.find('[data-validation="email"]').val();var t="";return e.find("input").each((function(){if(this.name&&this.name.match(/email/i))return t=this.value,!1})),t}ThriveGlobal.$j("body").on("submit",".tve-leads-conversion-object form",(function(t){var o=ThriveGlobal.$j(this),r=o.parents(".tve-leads-conversion-object").first().attr("data-tl-type"),n={};if(o.data("tve-force-submit")||o.closest(".thrv_custom_html_shortcode").length||o.data("tl-do-submit")||!r||!TL_Const.forms[r]||function(e){var t=e.attr("id"),o=window.fluentFormVars,r=!1;return o&&o.forms&&(r=o.forms.some((function(e){return e.form_id_selector===t}))),r}(o)||function(e){var t=e.attr("id");return t&&t.includes("happyforms")&&window.HappyForms}(o))return!0;o.tve_form_loading(),o.find("input").each((function(){var e=ThriveGlobal.$j(this),t=e.attr("name");void 0!==t&&-1===TL_Const.ignored_fields.indexOf(t)&&(n[e.attr("name")]=e.val())}));var i={security:TL_Const.security,action:TL_Const.action_conversion,type:r,tl_data:TL_Const.forms[r],custom_fields:n,email:e(o),current_screen:TL_Const.current_screen};return ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){i[e]=t})),ThriveGlobal.$j.ajax({url:TL_Const.ajax_url,data:i,type:"post",xhrFields:{withCredentials:!0}}).always((function(){void 0===o.attr("action")?location.reload():o.data("tve-force-submit",!0).submit()})),!1})),ThriveGlobal.$j("body").on("form_conversion.tcb",".tve-leads-conversion-object form",(function(e){var t=ThriveGlobal.$j(this).parents(".tve-leads-conversion-object").first().attr("data-tl-type");if(!t||!TL_Const.hasOwnProperty("forms")||!TL_Const.forms[t])return!0;var o={type:t,tl_data:TL_Const.forms[t],current_screen:TL_Const.current_screen};ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){o[e]=t})),e.post_data=e.post_data||{},e.post_data.thrive_leads=o})).on("lead_conversion_success.tcb",".tve_lead_lock_shortcode form, .tve_post_lightbox form",(function(e){var t=ThriveGlobal.$j(this),o=t.parents(".tve_content_lock");if(t.closest(".tve_post_lightbox").length){var r=t.closest(".tve-leads-conversion-object").attr("data-tl-type");TL_Front.parent_state&&TL_Front.parent_state.parent().hasClass("tve-leads-track-"+r)&&(o=TL_Front.parent_state.closest(".tve_content_lock"))}o.length&&o.hasClass("tve_content_lock")&&(o.removeClass("tve_lead_lock").find(".tve_lead_lock_shortcode").remove(),o.find(".tve_lead_locked_overlay").remove(),e.content_unlocked=!0)})).on("leads_states.tcb",".tve-leads-conversion-object form",(function(e,t){var o=ThriveGlobal.$j(this);switch(o.find("#_form_type").val()){case"ribbon":var r=o.parents(".tve-leads-ribbon");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_ribbon(r);break;case"lightbox":case"tve_lead_2s_lightbox":o.parents(".tve_p_lb_control").empty().html(t);break;case"widget":case"in-content":case"post-footer":case"php-insert":o.parents(".tve_shortcode_editor").empty().html(t);break;case"slide-in":var n=o.parents(".tve-leads-slide-in");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_slide_in(n);break;case"screen-filler-lightbox":var i=o.parents(".tve-leads-screen-filler");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_screen_filler(i);break;case"scroll-mat":r=o.parents(".tve-leads-greedy_ribbon"),o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_ribbon(r);break;case"tve_lead_shortcode":o.parents(".tve-leads-shortcode").empty().html(t);break;default:e.change_states=!1}e.change_states=!0})).on("leads_messages.tcb",".tve-leads-conversion-object form",(function(e){var t=ThriveGlobal.$j(this);switch(t.find("#_form_type").val()){case"tve_lead_shortcode":e.lightbox_state&&t.parents(".tve-leads-shortcode").hide();break;case"ribbon":t.parents(".thrv-ribbon").find(".tve-ribbon-close").click();break;case"lightbox":case"tve_lead_2s_lightbox":t.parents(".tve_p_lb_content").find(".tve_p_lb_close").click(),t.parents(".tve-leads-screen-filler").find(".tve-screen-filler-close").click();break;case"slide-in":t.parents(".thrv-leads-slide-in").find(".tve-leads-close").click();break;case"screen-filler-lightbox":t.parents(".tve-leads-screen-filler").find(".tve-screen-filler-close").click();break;case"scroll-mat":t.parents(".thrv-greedy-ribbon").find(".tve_et_click").click();break;default:t.find('input:not(:hidden):not([type="checkbox"]):not([type="radio"])').val("")}t.parents(".tve-leads-conversion-object").find(".tve_ea_thrive_leads_form_close").click(),TL_Front.parent_state&&TL_Front.close_form(TL_Front.parent_state)})),TL_Front.$document.on("switchstate",(function(e,t){t.find("script.tcb-lazyload-template").each((function(){ThriveGlobal.$j(this).replaceWith(this.innerHTML)}))}))}})),TL_Front.switch_lightbox_state=function(e,t){return e.find(".tve_p_lb_overlay").css("opacity","0.8"),e.find(".tve_p_lb_content").css("top",t.find(".tve_p_lb_content").css("top")).addClass("tve-leads-triggered"),window.tve_lb_switch_state=!0,TL_Front.open_lightbox(e.find(".tl-lb-target"))},TL_Front.close_lightbox=function(){var o=ThriveGlobal.$j("body"),r=ThriveGlobal.$j("html"),n="tve-o-hidden tve-l-open tve-hide-overflow",i=arguments[0]||o.data("tl-open-lightbox");i&&i.length&&(i.find(".tve-tl-anim").removeClass("tve-leads-triggered"),window.tve_lb_switch_state||(1===ThriveGlobal.$j(".tve_lb_open").length&&(o.removeClass(n).css("padding-right",""),r.removeClass(n),i.data("doc-scroll-top")?(document.documentElement.scrollTop=i.data("doc-scroll-top"),i.data("doc-scroll-top","")):i.data("bdy-scroll-top")&&(document.body.scrollTop=i.data("bdy-scroll-top"),i.data("bdy-scroll-top",""))),r.removeClass(r.data("tl-anim-class"))),window.tve_lb_switch_state=!1,setTimeout((function(){i.addClass("tve_lb_closing"),i.removeClass("tve_lb_open tve_lb_opening tve_lb_closing tve_p_lb_background").css("display","none").find("tve_p_lb_content").trigger("tve.lightbox-close")}),200),i.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);"SOURCE"===this.tagName&&e.parent("video").trigger("pause"),e.attr("data-src",e.attr("src")),e.attr("src","")})),TL_Front.handle_typefocus(i,"pause"),ThriveGlobal.$j("#tve-lg-error-container").hide())},TL_Front.open_lightbox=function(o,r){if(!o.hasClass("tve_lb_open")&&!o.hasClass("tve_lb_opening")){var n=window.tve_lb_switch_state;ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),TL_Front.close_lightbox(ThriveGlobal.$j(".tve_p_lb_background.tve_lb_open")),o.css({visibility:"",position:"",left:"",display:""}).parents(".tl-style").css({visibility:"",position:"",left:"",display:""});var i,s,a,l,c,d=ThriveGlobal.$j("body"),_=ThriveGlobal.$j("html"),v="tve-o-hidden tve-l-open tve-hide-overflow",p=(i=ThriveGlobal.$j,s={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},a=i("<div>").css(i.extend({},s)),l=i("<div>").css(i.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},s)).append(a).appendTo("body").scrollLeft(1e3).scrollTop(1e3),c={height:l.offset().top-a.offset().top||0,width:l.offset().left-a.offset().left||0},l.remove(),c).width,h=parseInt(d.css("paddingRight")),f=ThriveGlobal.$j(".tve_p_lb_background.tve_lb_open").length;isNaN(h)&&(h=0),o.find(".tve_p_lb_close").off().on("click",(function(){return TL_Front.close_lightbox(),!1})),d.off("keyup.tve_lb_close").on("keyup.tve_lb_close",(function(e){if(27==e.which)return TL_Front.close_lightbox(),!1})),o.find(".tve_p_lb_overlay").off("click.tve_lb_close").on("click.tve_lb_close",(function(){return TL_Front.close_lightbox(),!1})),d.data("tl-open-lightbox",o),o.addClass("tve_p_lb_background"),o.data("doc-scroll-top",document.documentElement.scrollTop),o.data("bdy-scroll-top",document.body.scrollTop),d.addClass(v),_.addClass(v);var b=window.innerHeight<ThriveGlobal.$j(document).height();!n&&b&&d.css("padding-right",h+p+"px"),o.find(e+", "+t).each((function(){var e=jQuery(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))})),o.find(".thrv_responsive_video").each((function(){var e=ThriveGlobal.$j(this);TCB_Front.makeAutoplayVideo(e)}));var T="";ThriveGlobal.$j.each(o.parents(".tl-states-root").attr("class").split(" "),(function(e,t){if(0===t.indexOf("tl-anim"))return T=t,!1})),_.addClass(T).data("tl-anim-class",T),setTimeout((function(){function e(){var e=o.find(".tve_p_lb_content").outerHeight(!0)+2*parseInt(o.css("padding-top")),t=o.find(".tve_p_lb_content"),r=window.innerHeight,n=(r-e)/2;o.find(".tve_p_lb_overlay").css({height:e+80+"px","min-height":r+"px"}),f?t.animate({top:n<40?40:n},100):t.css("top",(n<40?40:n)+"px"),e+40>r&&o.addClass("tve-scroll")}setTimeout((function(){o.addClass("tve_lb_opening")}),0),o.find("iframe").not(".thrv_social_default iframe").each((function(){var e=ThriveGlobal.$j(this);!e.data("tve_ifr_loaded")&&e.attr("data-src")&&e.data("tve_ifr_loaded",1).attr("src",e.attr("data-src"))})),TCB_Front.resizePageSection(),e(),ThriveGlobal.$j(window).on("resize",e)}),20),setTimeout((function(){o.removeClass("tve_lb_opening").addClass("tve_lb_open").find(".tve_p_lb_content").trigger("tve.lightbox-open"),o.find("form").each((function(){ThriveGlobal.$j(this).find('input[required], textarea[required], select[required], input[data-required="true"], textarea[data-required="true"], select[data-required="true"]').each((function(){var e=ThriveGlobal.$j(this);"none"===e.css("display")&&e.show(),"hidden"===e.css("visibility")&&e.css("visibility","visible"),e.parentsUntil(".tve_p_lb_content").filter((function(){return"none"===ThriveGlobal.$j(this).css("display")||"hidden"===ThriveGlobal.$j(this).css("visibility")})).show().css("visibility","visible");var t=e.attr("tabindex");t&&parseInt(t)<0&&e.removeAttr("tabindex")}))})),ThriveGlobal.$j(window).trigger("scroll")}),300),r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation()),o.parents(".tl-states-root").off("switchstate").on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_lightbox_state.apply(TL_Front,o)})),r&&"exit"===r.tve_trigger&&o.data("shown-on-exit",!0),TCB_Front.$window.trigger("tl_after_lightbox_open",o),setTimeout((function(){TCB_Front.$window.trigger("tve_after_content_toggle",[o])}),500)}},TL_Front.open_two_step_lightbox=TL_Front.open_lightbox,TL_Front.open_ribbon=function(e){function t(){e.addClass("tve-leads-triggered");var t=e.find(".tve_shortcode_editor"),o=t.length?t.outerHeight():0,r=e.attr("data-position")||"top";switch(r){case"above":e.css("bottom","auto");case"top":e.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px");break;case"bottom":e.css("bottom","0px"),e.css("top","auto")}var n=0,i=Math.max(e.outerHeight(),o),s=setInterval((function(){n++;var t=Math.max(e.outerHeight(),o);t==i&&10!=n||clearInterval(s),"top"===r?(ThriveGlobal.$j("body").animate({"margin-top":t+"px"},200,(function(){document.body.style.setProperty("margin-top",t+"px","important")})),TCB_Front&&TCB_Front.$window&&TCB_Front.$window.trigger("scroll")):"bottom"===r&&ThriveGlobal.$j("body").animate({"margin-bottom":t+"px"},200)}),100),a=ThriveGlobal.$j("body").find(".thrv_header.tve-scroll-sticky");if(a.length&&"top"===r){var l=parseFloat(TCB_Front.inlineCssVariable(a,"--tcb-header-extra-offset"))||0;TCB_Front.inlineCssVariable(a,"--tcb-header-extra-offset",l+i+"px")}e.off("switchstate").on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_ribbon_state.apply(TL_Front,o)}))}TL_Const.forms.greedy_ribbon?(TL_Const.close_callbacks=TL_Const.close_callbacks||{},TL_Const.close_callbacks.greedy_ribbon=[t]):t()},TL_Front.switch_ribbon_state=function(e){var t=e.outerHeight(!0),o={};o["top"===e.parent().attr("data-position")?"margin-top":"margin-bottom"]=t+"px",e.find(".tve-tl-anim").removeClass((function(e,t){return(t.match(/(^|\s)tl-anim-\S+/g)||[]).join(" ")})).removeClass("tve-tl-anim"),ThriveGlobal.$j("body").animate(o,200)},TL_Front.open_greedy_ribbon=function(o){var r=ThriveGlobal.$j("body"),n=ThriveGlobal.$j(window),i=r.css("position");n.scrollTop(0),r.css("position","static"),r.addClass("tve-tl-gr-anim"),TCB_Front.$window.trigger("scroll"),o.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px");var s=o.outerHeight();r[0].style.setProperty("margin-top",s+"px","important");var a=1;setTimeout((function(){ThriveGlobal.$j('.tve-leads-ribbon[data-position="top"]').removeClass("tve-leads-triggered")}),50),n.scroll((function(){var l=r.hasClass("tve-tl-gr-anim");if(a&&l){var c=n.scrollTop();if(c>s){(o.find(".tve_ea_thrive_wistia").length||o.find(".tve_with_wistia_popover"))&&ThriveGlobal.$j(".wistia_placebo_close_button").trigger("click"),r.removeClass("tve-tl-gr-anim"),o.addClass("tve-no-animation");var d=c-s;o.removeClass("tve-leads-triggered"),o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),r.css("margin-top",""),r.css("position",i),n.scrollTop(d),o.removeClass("tve-no-animation"),a=0,TL_Front.form_closed("greedy_ribbon"),TL_Const.forms.greedy_ribbon.allow_callbacks=!1}}})),o.off("switchstate").on("switchstate",(function(e,t){}))},TL_Front.open_screen_filler=function(o,r){var n="tve-so-hidden tve-sl-open tve-s-hide-overflow",i=ThriveGlobal.$j("html,body"),s=ThriveGlobal.$j("html");if(ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),o.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px").css("visibility",""),!0===o.hasClass("stl-anim-slip_from_top")){var a=ThriveGlobal.$j(window).scrollTop();o.css("top",a).css("visibility","")}o.find(".tve-screen-filler-close").on("click",(function(){c(o)})),o.data("doc-scroll-top",document.documentElement.scrollTop),o.data("bdy-scroll-top",document.body.scrollTop),"none"!==o.find(".thrv-leads-screen-filler.thrv_wrapper ").css("display")&&i.addClass(n);var l="";function c(o){o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),o.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(o,"pause"),ThriveGlobal.$j(document).off("keyup.close-screenfiller"),0==ThriveGlobal.$j.find(".tve-leads-ribbon").length&&ThriveGlobal.$j("body").animate({"margin-top":"0px"},200),i.removeClass(n),s.removeClass(s.data("tl-s-anim-class")),setTimeout((function(){o.css("top","").hide(),"none"===o.css("display")&&(i.removeClass(n),o.removeClass("tve-leads-triggered"))}),400),o.data("doc-scroll-top")?(document.documentElement.scrollTop=o.data("doc-scroll-top"),o.data("doc-scroll-top","")):o.data("bdy-scroll-top")&&(document.body.scrollTop=o.data("bdy-scroll-top"),o.data("bdy-scroll-top","")),ThriveGlobal.$j("#tve-lg-error-container").hide()}ThriveGlobal.$j.each(o.attr("class").split(" "),(function(e,t){if(0===t.indexOf("stl-anim"))return l=t,!1})),s.addClass(l).data("tl-s-anim-class",l);var d=o.find("> .tl-style").hide(),_=o.find('> .tl-style[data-form-state="already_subscribed"]');_.length?_.show():d.first().show(),TL_Front.close_screen_filler=c,r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation()),ThriveGlobal.$j(document).off("keyup.close-screenfiller").on("keyup.close-screenfiller",(function(e){27==e.which&&c(o)})),o.find(e+", "+t).each((function(){var e=jQuery(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))})),setTimeout((function(){TCB_Front.resizePageSection()}),500)},TL_Front.switch_slide_in_state=function(e){e.find(".tve-tl-anim").removeClass((function(e,t){return(t.match(/(^|\s)tl-anim-\S+/g)||[]).join(" ")})).removeClass("tve-tl-anim"),TL_Front.slide_in_position(e.find(".thrv-leads-slide-in"))},TL_Front.slide_in_position=function(e){var t=ThriveGlobal.$j(window),o=e.outerHeight();if(t.width()<=782||t.height()<o){e.parents(".tve-leads-slide-in").addClass("tve-lb");var r=t.height();setTimeout((function(){var t;t=e.parents(".tve-leads-slide-in").is('[class*="bot"]')?r-o:0,e.closest(".tve-leads-slide-in").data("doc-scroll-top",document.documentElement.scrollTop).data("bdy-scroll-top",document.body.scrollTop),e.parents(".tve-leads-conversion-object").first().css({height:o+80+"px","min-height":r+"px"}),e.css("top",(t<40?40:t)+"px"),o+40>r&&e.parents(".tve-leads-slide-in").css("overflow-y","scroll")}),0)}},TL_Front.open_slide_in=function(o,r){var n="tve-o-hidden tve-l-open tve-hide-overflow",i=ThriveGlobal.$j("body"),s=ThriveGlobal.$j("html");function a(r){r.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(r,"pause"),ThriveGlobal.$j(document).off("keyup.close-slidein"),ThriveGlobal.$j(".tve_lb_open").length||(i.removeClass(n),s.removeClass(n)),r.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),ThriveGlobal.$j("#tve-lg-error-container").hide(),o.data("doc-scroll-top")?(document.documentElement.scrollTop=o.data("doc-scroll-top"),o.data("doc-scroll-top","")):o.data("bdy-scroll-top")&&(document.body.scrollTop=o.data("bdy-scroll-top"),o.data("bdy-scroll-top",""))}ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),TL_Front.slide_in_position(o.find(".thrv-leads-slide-in").filter(":visible")),o.off().on("click",".tve-leads-close",(function(){a(o)})),o.find(".tve_ea_thrive_leads_form_close").on("click",(function(){a(o)})),o.on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_slide_in_state.apply(TL_Front,o)})),ThriveGlobal.$j(document).off("keyup.close-slidein").on("keyup.close-slidein",(function(e){27==e.which&&a(o)})),r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation())},TL_Front.close_form=function(o,r,n,i){var s=ThriveGlobal.$j(o).parents(".tve-leads-triggered"),a=s.attr("data-tl-type");if(void 0===a&&s.hasClass("tve-leads-widget"))a="widget";else if(void 0===a&&s.hasClass("tve-leads-post-footer"))a="post-footer";else if(void 0===a&&s.hasClass("tve-leads-slide-in"))a="slide-in";else if(void 0===a&&s.hasClass("tve-leads-in-content"))a="in-content";else if(void 0===a&&s.hasClass("tve-leads-shortcode"))a="shortcode";else if(void 0===a&&s.hasClass("tve-leads-greedy_ribbon"))a="greedy_ribbon";else{if(void 0===a&&s.hasClass("tve_p_lb_content"))return TL_Front.close_lightbox(),!1;if(void 0===a&&s.hasClass("tve-leads-screen-filler"))return TL_Front.close_screen_filler(s),!1}switch(s.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(s,"pause"),a){case"ribbon":var l=s.find(".tve-ribbon-close");l.length||(l=jQuery('<span class="tve-ribbon-close" style="display: none"></span>').appendTo(s)),l.trigger("click");var c=ThriveGlobal.$j("body").find(".thrv_header.tve-scroll-sticky");if(c.length&&"top"===s.attr("data-position")){var d=parseFloat(TCB_Front.inlineCssVariable(c,"--tcb-header-extra-offset"))-s.outerHeight(!0)+"px";TCB_Front.inlineCssVariable(c,"--tcb-header-extra-offset",d)}break;case"slide-in":s.find(".tve_ea_thrive_leads_form_close").trigger("click"),s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")}));break;case"post-footer":case"in-content":case"shortcode":s.fadeOut(200,(function(){TL_Front.form_closed(a)}));break;case"widget":s.parent().slideUp(200);break;case"greedy_ribbon":var _=ThriveGlobal.$j("body"),v=ThriveGlobal.$j(window),p=_.css("margin-top");_[0].style.removeProperty("margin-top"),s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),_.css("margin-top",p),v.scrollTop(0),_.animate({"margin-top":"0px"},300,"linear",(function(){TL_Front.form_closed(a)})).removeClass("tve-tl-gr-anim")}},TL_Front.form_closed=function(e){TL_Const.close_callbacks&&TL_Const.close_callbacks[e]&&ThriveGlobal.$j.each(TL_Const.close_callbacks[e],(function(e,t){ThriveGlobal.$j.isFunction(t)&&t()}))},TL_Front.handle_typefocus=function(e,t){e.find(".tve_typefocus").each((function(){jQuery(this).attr("data-typefocus",t)}))}})();
if(void 0===ThriveApp)var ThriveApp={};var _isAdmin=0,_is_blankPage=0;ThriveApp.is_theme_layout=!1,ThriveApp.bind_comments=!1,ThriveApp.winWidth=jQuery(window).width(),ThriveApp.viewportHeight=jQuery(window).height(),jQuery(window).on("load",function(){ThriveApp.resize_blank_page()}),jQuery(function(){_isAdmin=jQuery("#wpadminbar").length,_is_blankPage=jQuery(".bp-t").length,_is_blankPage||(ThriveApp.menuPositionTop=jQuery("nav.right").length?jQuery("nav.right").position().top:0),ThriveApp.is_theme_layout=!!(jQuery(".bSe .awr").length+jQuery(".bp-t .wrp").length),ThriveApp.menuResponsive(),ThriveApp.shortcodeTabsResize(),ThriveApp.setPageSectionHeight(),ThriveApp.bind_comments_handlers(),ThriveApp.check_comments_hash(),ThriveApp.videoShorcode(),ThriveApp.blog_gallery(),ThriveApp.image_post_resize(),jQuery(".cdt").thrive_timer(),ThriveApp.grid_layout(".gin",".gdl"),ThriveApp.grid_layout(".scbg",".scc"),jQuery(".showTags").each(function(){jQuery(this).mouseover(function(){jQuery(".tagsList",this).show()}),jQuery(this).mouseout(function(){jQuery(".tagsList",this).hide()}),jQuery(this).click(function(a){jQuery(".tagsList",this).toggle(),a.preventDefault()})}),jQuery(".sm_icons, .scfm .ss").each(function(){jQuery(this).mouseover(function(){jQuery(".bubb",this).css("left",function(){return(jQuery(this).parent().width()-jQuery(this).width())/2}).show(0)}),jQuery(this).mouseout(function(){jQuery(".bubb",this).hide()})}),jQuery(".faqI h4").click(function(){return jQuery(this).toggleClass("oFaq"),jQuery(this).parents(".faqI").find(".faqC").slideToggle("fast"),!1}),jQuery(".tmw").hover(function(){jQuery(this).find(".tmm").slideDown()},function(){jQuery(this).find(".tmm").slideUp()}),jQuery(".accss .acc-h").click(function(){var a=jQuery(this),b=jQuery(this).parents(".accs"),c=b.find(".accss");if(a.parent().hasClass("opac"))return!1;a.parents(".accs").find(".opac").find(".accsi").slideUp(function(){c.removeClass("opac")}),a.next(".accsi").slideDown(function(){a.parents(".accss").addClass("opac")})}),jQuery(".thrive-borderless .wp-video-shortcode").length>0&&(jQuery(".thrive-borderless .wp-video-shortcode").css("width","100%"),jQuery(".thrive-borderless div").css("width","100%")),ThriveApp.comments_page=1,1==ThriveApp.lazy_load_comments&&(jQuery(window).scroll(ThriveApp.bind_scroll),ThriveApp.load_comments()),jQuery(window).resize(function(){var a=window.innerWidth,b=jQuery(window).height();ThriveApp.winWidth!==a&&ThriveApp.delay(function(){ThriveApp.menuResponsive()},1),ThriveApp.winWidth=a,ThriveApp.viewportHeight=b,ThriveApp.menuPositionTop=jQuery("nav.right").length?jQuery("nav.right").position().top:0,ThriveApp.shortcodeTabsResize(),ThriveApp.videoShorcode(),ThriveApp.setVideoPosition(),ThriveApp.setPageSectionHeight(),ThriveApp.image_post_resize(),ThriveApp.grid_layout(".gin",".gdl"),ThriveApp.grid_layout(".scbg",".scc")}),jQuery(window).trigger("scroll"),jQuery("body").on("added_to_cart",function(a,b,c,d){var e=jQuery(b[".mini-cart-contents"]).find("a.cart-contents-btn");jQuery(".mobile-mini-cart").html("").append(e)}),window.FB&&window.FB.XFBML&&jQuery(".fb-comments").each(function(){window.FB.XFBML.parse(this.parentNode)})}),ThriveApp.grid_layout=function(a,b){jQuery(a).length>0&&jQuery(a).each(function(){var a=jQuery(b,this),c=a.length,d=function(b){for(var d="",e=0;e<c;e+=b){3==b&&(d=":eq("+e+"),:eq("+(e+1)+"),:eq("+(e+2)+")"),2==b&&(d=":eq("+e+"),:eq("+(e+1)+")");var f=a.filter(d),g=jQuery(f).map(function(){return f.css("height",""),jQuery(this).height()}),h=Math.max.apply(null,g);f.height(h)}};ThriveApp.winWidth>=1080?d(jQuery(".bSe").hasClass("fullWidth")?3:2):1080>ThriveApp.winWidth&&ThriveApp.winWidth>=741&&d(2)})},ThriveApp.number_counter=function(){jQuery(".nbc.nsds").each(function(){function a(c,f){e=Math.ceil(f/100),c<=f?(b.text(c),c+=e,c+e>f&&(b.text(f),clearTimeout(d)),d=setTimeout(function(){a(c,f)},50)):clearTimeout(d)}var b=jQuery(".nbcn",this),c=b.attr("data-counter"),d=null,e=1;"false"==jQuery(this).attr("data-started")&&(a(0,c),jQuery(this).attr("data-started","true"))})},ThriveApp.setPageSectionHeight=function(){var a=jQuery(".wrp .bpd,.wrp .fullWidth"),b=a.length;b&&ThriveApp.winWidth;jQuery(".pddbg, .scvps").css("max-width",ThriveApp.winWidth+"px"),jQuery(".pdfbg").each(function(){var a=jQuery(this).css("box-sizing","border-box"),b=parseInt(a.attr("data-height")),c=parseInt(a.attr("data-width")),d="100%";if(b&&!isNaN(b)&&c&&!isNaN(c)){var e=Math.min(ThriveApp.winWidth,a.parent().width());d=(e<c?e*b/c:b)+"px"}a.css("min-height",d)})},ThriveApp.showMenu=function(){jQuery("header nav ul li").each(function(){jQuery(this).mouseenter(function(){if(jQuery(this).hasClass("has-extended")&&ThriveApp.winWidth>=722){var a=jQuery(this).children(".sub-menu"),b=jQuery(this).offset().left,c=a.width(),d=jQuery(".wrp.cnt"),e=d.width(),f=d.offset().left;(b<f||b+c>f+e)&&(a.addClass("position_menu"),b<f?a.hasClass("position_right")||a.addClass("position_left"):b+c>f+e&&(a.hasClass("position_left")||a.addClass("position_right"))),jQuery(this).children(".sub-menu").stop().fadeIn("fast")}else jQuery(this).children(".sub-menu").show()}),jQuery(this).mouseleave(function(){jQuery(this).children(".sub-menu").stop().fadeOut("fast")})})},ThriveApp.shortcodeTabsResize=function(){jQuery(".scT ul.scT-tab li").on("click",function(a){var b=jQuery(this),c=b.parents(".shortcode_tabs").first(),d=c.find(".scTC").eq(b.index());c.find(".tS").removeClass("tS"),b.addClass("tS"),c.find(".scTC").hide(),d.show(),a.preventDefault()})},ThriveApp.menuResponsive=function(){ThriveApp.winWidth<=774?(jQuery("header nav ul li").each(function(){jQuery(this).unbind("mouseenter"),jQuery(this).unbind("mouseleave")}),jQuery("header #nav_right").hide(0),jQuery("header .sub-menu").show(0),jQuery(".rmn").unbind("click").click(function(){var a=jQuery("#floating_menu").height(),b=jQuery("#wpadminbar").length?46:0,c=a+b,d=ThriveApp.viewportHeight-c;jQuery("header #nav_right").fadeToggle("fast",function(){var a=jQuery("#floating_menu nav").height();ThriveApp.viewportHeight<=a+c&&(jQuery("#nav_right").css({"max-height":d+"px"}),jQuery("html").addClass("html-hidden")),a<=0&&jQuery("html").removeClass("html-hidden")})})):ThriveApp.winWidth>=775&&(jQuery("header .sub-menu").hide(0),jQuery("header #nav_right").show(0),ThriveApp.showMenu())},ThriveApp.delay=function(){var a=0;return function(b,c){clearTimeout(a),a=setTimeout(b,c)}}(),ThriveApp.check_comments_hash=function(){if(location.hash&&-1!==location.hash.indexOf("#comment-")){var a=location.hash.indexOf("#comment-")+9,b=location.hash.substring(a,location.hash.length),c=jQuery("#comment-container-"+b);0!==c.length&&jQuery("html,body").animate({scrollTop:c.offset().top-30},"slow")}},ThriveApp.videoShorcode=function(){jQuery(".scvps .pvb").click(function(){var a=jQuery(this).parents(".scvps").height();if(jQuery(this).parents(".scvps").css("height",a+"px"),jQuery(this).parents(".vdc").find("h2").hide(),jQuery(this).parents(".vdc").find("h3").hide(),jQuery(this).parents(".vdc").find("p").hide(),jQuery(this).hide(),jQuery(this).parents(".scvps").find(".video-container").show(),jQuery(this).parents(".scvps").find("iframe").length>0){var b=jQuery(this).parents(".scvps").find("iframe"),c=jQuery(this).parents(".scvps").outerWidth();c<b.attr("width")&&(b.attr("width",c),b.attr("height",9*c/16))}var d=jQuery(this).parents(".scvps").find(".vwr"),e=jQuery(this).parents(".scvps").outerHeight()/2-d.height()/2;if(d.css({top:e<0?0:e,left:jQuery(this).parents(".scvps").outerWidth()/2-d.width()/2}),jQuery(this).parents(".scvps").find("video").length>0&&jQuery(this).parents(".scvps").find("video")[0].player.play(),jQuery(this).parents(".scvps").find("iframe").length>0){var b=jQuery(this).parents(".scvps").find("iframe"),f=(b.attr("id"),b.attr("src"));f.indexOf("vimeo")>=0?b.attr("src",ThriveApp.updateQueryStringParameter(f,"autoplay","1")):f.indexOf("youtube")>=0&&b.attr("src",ThriveApp.updateQueryStringParameter(f,"autoplay","1")),jQuery(this).parents(".scvps").find("iframe").trigger("click")}})},ThriveApp.bind_scroll=function(){if(jQuery("#comment-bottom").length>0){var a=jQuery("#comment-bottom").offset().top;a>0&&a<jQuery(window).height()+jQuery(document).scrollTop()&&ThriveApp.load_comments()}},ThriveApp.load_comments=function(){if(1!=ThriveApp.comments_loaded){ThriveApp.comments_loaded=1,"undefined"==typeof _thriveCurrentPost&&(_thriveCurrentPost=0),jQuery("#thrive_container_preload_comments").show();var a={action:"thrive_lazy_load_comments",post_id:_thriveCurrentPost,comment_page:ThriveApp.comments_page};window.TVE_Dash&&!TVE_Dash.ajax_sent?jQuery(document).on("tve-dash.load",function(){TVE_Dash.add_load_item("theme_comments",a,ThriveApp.load_comments_handle)}):jQuery.post(ThriveApp.ajax_url,a,ThriveApp.load_comments_handle)}},ThriveApp.load_comments_handle=function(a){ThriveApp.comments_page++,ThriveApp.comments_loaded=""==a?1:0,jQuery("#thrive_container_preload_comments").hide(),jQuery("#thrive_container_list_comments").append(a),jQuery("#thrive_container_form_add_comment").show(),!1===ThriveApp.bind_comments&&ThriveApp.bind_comments_handlers(),ThriveApp.check_comments_hash()},ThriveApp.bind_comments_handlers=function(){ThriveApp.bind_comments=!0,jQuery(document).on("click",".txt_thrive_link_to_comments",function(){var a=jQuery("#commentform");return jQuery("html,body").animate({scrollTop:a.offset().top},"slow"),!1}),jQuery(document).on("click",".reply",function(){var a=jQuery(this).attr("cid");return jQuery("#respond-container-"+a).slideDown(),!1}),jQuery(document).on("click",".cancel_reply",function(){var a=jQuery(this).attr("cid");return jQuery("#respond-container-"+a).slideUp(),!1})},ThriveApp.youtube_play=function(a,b,c){"use strict";jQuery("#videoContainer").html('<iframe width="'+b+'" height="'+c+'" src="https://www.youtube.com/embed/'+a+'?autoplay=1&loop=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen wmode="Opaque"></iframe>')},ThriveApp._get_element_height=function(a){var b,c,d=document.getElementById(a);return document.all?(b=d.currentStyle.height,c=parseInt(d.currentStyle.marginTop,10)+parseInt(d.currentStyle.marginBottom,10)+"px"):(b=document.defaultView.getComputedStyle(d,"").getPropertyValue("height"),c=parseInt(document.defaultView.getComputedStyle(d,"").getPropertyValue("margin-top"))+parseInt(document.defaultView.getComputedStyle(d,"").getPropertyValue("margin-bottom"))+"px"),b+c},ThriveApp.updateQueryStringParameter=function(a,b,c){var d=new RegExp("([?|&])"+b+"=.*?(&|$)","i");return separator=-1!==a.indexOf("?")?"&":"?",a.match(d)?a.replace(d,"$1"+b+"="+c+"$2"):a+separator+b+"="+c},ThriveApp.social_scripts={twitter:{src:"https://platform.twitter.com/widgets.js",loaded:0},google:{src:"https://apis.google.com/js/plusone.js?onload=onLoadCallback",loaded:0},facebook:{src:"://platform.twitter.com/widgets.js",loaded:0},linkedin:{src:"//platform.linkedin.com/in.js",loaded:0},pinterest:{src:"//assets.pinterest.com/js/pinit.js",loaded:0},youtube:{src:"https://apis.google.com/js/platform.js",loaded:0}},ThriveApp.load_script=function(a){if(0===ThriveApp.social_scripts[a].loaded)if("//assets.pinterest.com/js/pinit.js"==ThriveApp.social_scripts[a].src){var b=document.createElement("script");b.type="text/javascript",b.async=!0,b.src="https://assets.pinterest.com/js/pinit.js",b["data-pin-build"]="parsePins";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),ThriveApp.social_scripts[a].loaded=1}else jQuery.getScript(ThriveApp.social_scripts[a].src,function(){ThriveApp.social_scripts[a].loaded=1})},ThriveApp.setVideoPosition=function(){jQuery(".scvps .pvb").each(function(){var a=jQuery(this).parents(".scvps").find(".vwr");a.css({top:jQuery(this).parents(".scvps").outerHeight()/2-a.height()/2,left:jQuery(this).parents(".scvps").outerWidth()/2-a.width()/2})})},ThriveApp.open_share_popup=function(a,b,c){var d,e;return d=window.screen.width/2-(b/2+10),e=window.screen.height/2-(c/2+50),window.open(a,"Window","status=no,height="+c+",width="+b+",resizable=yes,left="+d+",top="+e+",screenX="+d+",screenY="+e+",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no"),!1};var _lastScrollTop=0,_theMenu=jQuery("#floating_menu"),_nextElement=_theMenu.next(),_floatingOption=_theMenu.attr("data-float"),_hasFloatingMenu="float-fixed"==_floatingOption||"float-scroll"==_floatingOption,_defaultPadding=_nextElement.css("padding-top"),_menuHeight=_theMenu.outerHeight(),_textLogoHeight=_theMenu.find("#text_logo").height(),_hasCenterLogo=_theMenu.find(".center_logo").length&&ThriveApp.winWidth>768,_custom_header=_theMenu.children("header"),_custom_header_class=_custom_header.attr("class"),_is_custom_header="hic"==_custom_header_class||"hif"==_custom_header_class,_center_header_height;""===_defaultPadding&&(_defaultPadding="0"),ThriveApp.menu_float={current_scroll_top:0,anim_done:!1,scroll_dir:"down",hasScroll:function(){return _is_custom_header?this.current_scroll_top>_center_header_height:this.current_scroll_top>0},onScroll:function(a){return _is_custom_header&&(_center_header_height="hic"==_custom_header_class?jQuery("header .tt-dmy").height():jQuery("header").height()),this.current_scroll_top<a?this.scroll_dir="down":this.scroll_dir="up",this.current_scroll_top=a,this.hasScroll()?this.handle():(_theMenu.removeClass("mff a60 mfs"),_nextElement.css("padding-top",_defaultPadding),void ThriveApp.menu_float.showLogo())},handle:function(){_nextElement.css("padding-top",_theMenu.outerHeight()+"px"),_theMenu.addClass("mff"),this.current_scroll_top>60?(ThriveApp.menu_float.hideLogo(),_theMenu.addClass("a60")):_theMenu.removeClass("a60"),"float-scroll"==_floatingOption&&("down"==this.scroll_dir?_theMenu.removeClass("mfu mfd").addClass("mfd"):_theMenu.removeClass("mfu mfd").addClass("mfu"))},hideLogo:function(){_hasCenterLogo&&(_theMenu.find("#logo img").hide(),this.anim_done||(_theMenu.find("#text_logo").stop().animate({opacity:0,height:0},50),this.anim_done=!0))},showLogo:function(){_hasCenterLogo&&(_theMenu.find("#logo img").show(),_theMenu.find("#text_logo").animate({height:_textLogoHeight,opacity:1},50),this.anim_done=!1)}},jQuery(window).scroll(function(){var a=jQuery(document).scrollTop(),b=0,c=0,d=jQuery(".entry-title"),e=d.length,f=jQuery(".ssf");if(ThriveApp.is_theme_layout&&(b=_is_blankPage?jQuery(".bp-t .wrp").offset().top:jQuery(".bSe .awr").first().offset().top,c=_is_blankPage?jQuery(".bp-t .wrp").height():jQuery(".bSe .awr").first().height()),ThriveApp.show_shortcodes(a),_hasFloatingMenu&&ThriveApp.menu_float.onScroll(a),f.hasClass("apsf"))return!1;if(1==e?(postTitleTop=d.offset().top,condition=a>postTitleTop):condition=a+40>b,condition)if(f.show(0),a>b+c-f.height()){f.removeClass("fpss").addClass("apss");var g=jQuery(".ssf.apss");jQuery(".bSe").hasClass("right")?g.css({right:"-97px",left:"auto"}):g.css({left:"-97px",right:"auto"}),"float-fixed"!==_theMenu.attr("data-float")&&"float-scroll"!==_theMenu.attr("data-float")||_is_custom_header&&g.css({bottom:"0px",top:"auto"})}else{f.removeClass("apss").addClass("fpss");var g=jQuery(".ssf.fpss");if(g.length>0)if("float-fixed"!==_theMenu.attr("data-float")&&"float-scroll"!==_theMenu.attr("data-float")||(_is_custom_header?g.css({top:"100px",bottom:"auto"}):g.css({top:_menuHeight+40,bottom:"auto"})),jQuery(".bSe").hasClass("right")){var h=parseInt(jQuery(".bSe").offset().left+jQuery(".bSe").outerWidth());g.css("left",h+25+"px")}else{var h=jQuery(".bSe").offset().left;g.css("left",h-g.width()-"25")}}else f.hide(0)}),ThriveApp.show_shortcodes=function(a){jQuery(".nsd").each(function(){var b=jQuery(this);a+ThriveApp.viewportHeight>=b.offset().top+b.outerHeight()&&(b.addClass("nsds"),ThriveApp.number_counter())})},ThriveApp.display_no_shares=function(a){function b(){e.val(d),d>999&&f.addClass("tt-share-long"),f.html(ThriveApp._get_share_count_display_text(d,2)),jQuery("#tt-share-count").show()}function c(a){a&&a.total&&(d=parseInt(a.total),b())}var d=0,e=jQuery("#tt-hidden-share-no"),f=jQuery("#share_no_element"),g=[];if(a.linkedin&&g.push("in_share"),a.facebook&&g.push("fb_share"),a.google&&g.push("g_share"),a.pinterest&&g.push("pin_share"),g.length){var h={action:"thrive_get_share_counts",url:a.url,networks:g};window.TVE_Dash&&!TVE_Dash.ajax_sent?jQuery(document).on("tve-dash.load",function(){TVE_Dash.add_load_item("theme_shares",h,c)}):jQuery.post(ThriveApp.ajax_url,h,c)}};var _overlayElement=jQuery(".galleryOverlay");ThriveApp.blog_gallery=function(a){return function(){function b(b,c){a('<div class="galleryWrapper"><img data-pos="'+b.attr("data-position")+'" data-cap="'+b.attr("data-caption")+'" data-index="'+b.attr("data-index")+'" src="'+b.attr("data-src")+'" alt=""/></div>').appendTo(c)}function c(a,b,c){c?a.removeClass("g-n-a"):a.addClass("g-n-a");var f=a.find("img[data-index="+b+"]"),g=f.attr("data-cap"),h=f.attr("data-pos");b=f.parent().index(),a.css({left:"-"+100*b+"%"}),e=b,ThriveApp.winWidth>650&&d(f),jQuery(".img_count").text(h),jQuery(".cap_txt").text(g),""!=g?jQuery(".mob_text").text(g):jQuery(".mob_text").text(" - Swipe left/right to see more")}function d(a){var b=a.parents(".galleryOverlay").first().find(".nav_close");if(!a.width())return b.css({top:"20px",right:"20px"});var c=a.position().left-a.parent().position().left+a.width(),d=a.position().top;a.width()>=ThriveApp.winWidth&&(c-=16,d+=16),_isAdmin&&a.position().top<=32&&(d+=32),b.css({top:d-16+"px",left:c-16+"px"})}var e=0,f=0;a(".thrive-gallery").each(function(){var d=a(this),g=a(this).find(".galleryOverlay"),h=a(this).find(".galleryStage"),i=d.find(".gallery-item a").length,j=!1,k=!1,l=function(){k||(e<i-1?c(h,e+1,!0):(h.addClass("g-n-a").css("left","100%"),k=!0,setTimeout(function(){c(h,0,!0),k=!1},20)))},m=function(){k||(e>0?c(h,e-1,!0):(h.addClass("g-n-a").css("left",-100*i+"%"),k=!0,setTimeout(function(){c(h,i-1,!0),k=!1},20)))};d.find(".gallery-item a").each(function(d){a(this).click(function(){return!jQuery(this).parents(".gallery ").hasClass("no-gallery")&&(j=!0,g.show(0).addClass("g-v"),c(h,d,!1),!1)}),b(a(this),g.find(".galleryStage"))}),d.find("a.nav_prev").click(function(){return m(),!1}),d.find("a.nav_next").click(function(){return l(),!1}),d.find(".nav_close").click(function(){return j=!1,g.removeClass("g-v").hide(),!1}),"function"==typeof jQuery().touchwipe&&d.find(".galleryWrapper").touchwipe({wipeLeft:function(){l()},wipeRight:function(){m()},wipeUp:function(){j=!1,g.removeClass("g-v").hide()},wipeDown:function(){return!1},min_move_x:20,min_move_y:20,preventDefaultEvents:!0}),ThriveApp.winWidth<=650?h.click(function(b){if(a(b.target).is("img"))return!1;j=!1,g.removeClass("g-v").hide()}):(h.click(function(b){if(a(b.target).is("img"))return!1;j=!1,g.removeClass("g-v").hide()}),d.mousemove(function(b){clearTimeout(f),a(".gl_ctrl, .gl_ctrl_mob").fadeIn(200),ThriveApp.winWidth<=650||a(b.target).is(".gl_ctrl,.gl_ctrl_mob")||(f=setTimeout(function(){jQuery(".gl_ctrl, .gl_ctrl_mob").fadeOut(200)},1e3))})),a("html").unbind("keydown").keydown(function(a){return!j||(37==a.keyCode?(m(),!1):39==a.keyCode?(l(),!1):27==a.keyCode?(g.removeClass("g-v").hide(),!1):void 0)})})}}(jQuery),ThriveApp.image_post_resize=function(){jQuery(".tt-dmy").css({"max-height":ThriveApp.viewportHeight,"max-width":ThriveApp.winWidth})},jQuery.fn.thrive_timer=function(){return this.each(function(){var a,b=jQuery(this),c=b.attr("data-server-now"),d=c?new Date(c):new Date,e=new Date(b.attr("data-date")),f=0,g=0,h=0,i=0,j=2,k=b.attr("data-fade"),l=b.attr("data-message"),m=function(a,b){if(a.html()==b)return a;a.removeClass("next");var c=a.clone().removeClass("go-down").addClass("next").html(b);return a.before(c).next(".go-down").remove(),a.addClass("go-down"),setTimeout(function(){c.addClass("go-down")},20),a},n=function(a,b,c){void 0===c&&(c=!1);var d=0;if(b<=99)m(a.find(".part-1").first(),b%10),m(a.find(".part-2").first(),Math.floor(b/10)),d=2;else for(;b;)d++,m(a.find(".part-"+d).first(),b%10),b=Math.floor(b/10);if(!1!==c&&d<c)for(var e=d+1;e<=c;e++)m(a.find(".part-"+e).first(),0)},o=function(){i--,i<0&&(i=59,h--),h<0&&(h=59,g--),g<0&&(g=23,f--),n(b.find(".second .cdfc"),i),n(b.find(".minute .cdfc"),h),n(b.find(".hour .cdfc"),g),n(b.find(".day .cdfc"),f,j),0==f&&0==g&&0==h&&0==i&&(clearInterval(a),p())},p=function(){"1"==k?b.find(".cdti").addClass("fdtc"):b.find(".cdti").addClass("fv"),"1"==l&&(b.find(".cdti").addClass("fdtc"),setTimeout(function(){b.find(".cdtm").fadeIn(2e3)},500))};d>e?p():(i=Math.floor((e.getTime()-d.getTime())/1e3),h=Math.floor(i/60),i%=60,g=Math.floor(h/60),h%=60,f=Math.floor(g/24),g%=24,f>99&&(j=f.toString().length),function(){var a=function(a,b){return jQuery('<span class="part-'+a+'">'+b+"</span>")};b.find(".second .cdfc").append(a(2,Math.floor(i/10))).append(a(1,i%10)),b.find(".minute .cdfc").append(a(2,Math.floor(h/10))).append(a(1,h%10)),b.find(".hour .cdfc").append(a(2,Math.floor(g/10))).append(a(1,g%10));for(var c=b.find(".day .cdfc"),d=f,e=1;e<=j;e++)c.append(a(e,d%10)),d=Math.floor(d/10);n(c.css("min-width",40*j+"px"),f,j)}(),b.find(".cdti").addClass("init_done"),a=setInterval(o,1e3))})},ThriveApp._get_share_count_display_text=function(a,b){b=Math.pow(10,b);for(var c=["k","m"],d=c.length-1;d>=0;d--){var e=Math.pow(10,3*(d+1));if(e<=a){a=Math.round(a*b/e)/b,1e3==a&&d<c.length-1&&(a=1,d++),a+=c[d];break}}return a},ThriveApp.resize_blank_page=function(){if(_is_blankPage=jQuery("html.bp-th").length){var a=jQuery(".wrp").outerHeight(),b=jQuery("body");ThriveApp.viewportHeight>=a?b.css("height",ThriveApp.viewportHeight):b.css("height",a)}};
(()=>{if(window.TVE_Dash=window.TVE_Dash||{},!e||!e.$j){var a=window.$,e={$j:jQuery.noConflict()};a&&(window.$=a)}!function(a){TVE_Dash.ajax_sent=!1;var t={},s={};TVE_Dash.add_load_item=function(e,n,o){var r;if("function"!=typeof o&&(o=a.noop),TVE_Dash.ajax_sent){var i={},_={};return i[e]=n,_[e]=o,this.send_ajax(i,_),!0}return n?(t[e]&&"function"==typeof(null===(r=console)||void 0===r?void 0:r.warn)&&console.warn(e+" ajax action already defined"),t[e]=n,s[e]=o,!0):(console.error&&console.error("missing ajax data"),!1)},TVE_Dash.ajax_load_css=function(e){a.each(e,function(e,t){a("link#"+(e+="-css")).length||a('<link rel="stylesheet" id="'+e+'" type="text/css" href="'+t+'"/>').appendTo("head")})},TVE_Dash.ajax_load_js=function(e){var t=document.body;a.each(e,function(s,n){if(-1!==s.indexOf("_before"))return!0;var o=document.createElement("script");e[s+"_before"]&&a('<script type="text/javascript">'+e[s+"_before"]+"<\/script>").after(t.lastChild),s&&(o.id=s+"-script"),o.src=n,t.appendChild(o)})},TVE_Dash.send_ajax=function(t,s){a.ajax({url:tve_dash_front.ajaxurl,xhrFields:{withCredentials:!0},data:{post_id:tve_dash_front.post_id,action:"tve_dash_front_ajax",tve_dash_data:t},dataType:"json",type:"post"}).done(function(t){t&&a.isPlainObject(t)&&(t.__resources&&(t.__resources.css&&TVE_Dash.ajax_load_css(t.__resources.css),t.__resources.js&&TVE_Dash.ajax_load_js(t.__resources.js),delete t.__resources),a.each(t,function(a,e){if("function"!=typeof s[a])return!0;s[a].call(null,e,t)}),e.$j(window).trigger("tve_after_ajax_load"))})},TVE_Dash.forceImageLoad=function(a){Array.prototype.forEach.call(a.getElementsByTagName("img"),a=>{a.getAttribute("src").includes("data:image")&&a.setAttribute("src",a.getAttribute("data-opt-src")||a.getAttribute("data-src"))})},a(function(){window.TVE_Dash=window.TVE_Dash||TVE_Dash,setTimeout(function(){var e=new a.Event("tve-dash.load");return a(document).trigger(e),!a.isEmptyObject(t)&&!(!tve_dash_front.force_ajax_send&&tve_dash_front.is_crawler)&&(TVE_Dash.send_ajax(t,s),void(TVE_Dash.ajax_sent=!0))})})}(e.$j)})();