((e,t,i,n,o,a)=>{"use strict";n.tfOn("offline",(()=>{setTimeout((()=>{if(!n.navigator.onLine&&!e.Builder.get().isSaved&&e.undoManager.hasUndo()){const l=e.ToolBar.el.tfClass("save_wrap")[0].classList,r=i(),s=t=>{if(t.composedPath()[0].closest("a")){t.preventDefault(),t.stopImmediatePropagation(),t.currentTarget.tfOff(t.type,s,{once:!0});let n=e.Builder.get(),l=n.toJSON(!0),d=n.customCss,f=a.post_title,_=new Date,c=_.getFullYear()+"_"+_.getMonth()+"_"+_.getDate(),p=e.GS.findUsedItems(l),w=(e,t)=>{let n=i("a",{download:t,rel:"noopener",href:URL.createObjectURL(e)});setTimeout((()=>{URL.revokeObjectURL(n.href),n=null}),1e4),n.click(),o.showHide("warning",r,300)};if(l={builder_data:l},d&&(l.custom_css=d.trim()),p){const t={};for(let i=p.length-1;i>-1;--i){let n=e.Helper.cloneObject(e.GS.styles[p[i]]);delete n.id,delete n.url,t[p[i]]=n}l.used_gs=t}l=JSON.stringify(l),w(new Blob([l],{type:"application/json"}),f+"_themify_builder_export_"+c+".txt")}};r.innerHTML=a.i18n.label.offline,o.show("warning",r),l.add("disabled"),n.tfOn("online",(()=>{l.remove("disabled"),o.showHide("warning",r,300),o.el.tfOff(t.click,s,{once:!0})}),{passive:!0,once:!0}),o.el.tfOn(t.click,s,{once:!0})}}),3e3)}),{passive:!0})})(tb_app,Themify,tb_createElement,window,TF_Notification,themifyBuilder);