(()=>{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))})();