File: /var/www/html/wptoho/wp-content/themes/themify-ultra/themify/js/admin/modules/license.js
let TF_License;((t,i,e)=>{"use strict";TF_License={el:null,init(){if(this.el||(this.el=e.tfId("license-modal")),!this.el){this.el=e.createElement("div");const t=themify_js_vars.license,i=e.createElement("h2"),s=e.createElement("p"),n=e.createElement("p"),a=e.createElement("p"),o=e.createElement("p"),h=e.createElement("span"),c=e.createElement("span"),r=e.createElement("input"),f=e.createElement("input"),_=e.createElement("a"),m=e.createElement("a"),u=e.createElement("i"),l=e.tfId("themify")||e.body;this.el.className="themify-modal tf_opacity tf_hide",this.el.id="license-modal",i.innerHTML=t.title,s.innerHTML=t.link,h.textContent=t.labels.name,c.textContent=t.labels.key,_.textContent=t.labels.update,f.value=t.key||"",r.value=t.username||"",r.name="themify_username",f.name="updater_licence",r.type=f.type="text",r.autocomplete=f.autocomplete="off",c.className=h.className="label",m.href=_.href="#",_.className="update-license button big-button themify_button",m.className="close",u.className="tf_close",n.append(h,r),a.append(c,f),o.appendChild(_),m.appendChild(u),this.el.append(i,s,n,a,o,m),m.tfOn("click",(t=>{t.preventDefault(),t.stopPropagation(),this.close()})),l.appendChild(this.el)}return this.show()},show(){return new Promise((t=>{this.el.classList.contains("tf_opacity")?(this.el.classList.remove("tf_hide"),requestAnimationFrame((()=>{this.el.tfOn("transitionend",t,{passive:!0,once:!0}).classList.remove("tf_opacity")}))):t()}))},close(){return new Promise((t=>{this.el.tfOn("transitionend",(i=>{this.el.classList.add("tf_hide"),t()}),{passive:!0,once:!0}).classList.add("tf_opacity")}))},async update(){await t.loadJs(t.url+"js/admin/notification",!!i.TF_Notification);try{const i=this.el.querySelector('[name="themify_username"]').value,e=this.el.querySelector('[name="updater_licence"]').value,s={action:"themify_update_license",nonce:themify_js_vars.nonce,themify_username:i,updater_licence:e};if(""===i||""===e)throw Error(themify_js_vars.empty_li);const n=await t.fetch(s);if(!n.success)throw Error(n.data);await this.close()}catch(t){throw TF_Notification.showHide("error",t,3e3),t}}}})(Themify,window,document);