Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/admin/modules/skin.min.js
Назад
let TF_Skin;((g,p,y,f)=>{"use strict";const w=new Map;TF_Skin={el:null,skinId:null,importModule(){return g.loadJs(g.url+"js/admin/import/import",!!p.TF_Import)},notificationModule(){return g.loadJs(g.url+"js/admin/notification",!!p.TF_Notification)},getIcon(e){const t="http://www.w3.org/2000/svg",a=f.createElementNS(t,"use"),i=f.createElementNS(t,"svg");return e="tf-"+e.trim().replace(" ","-"),i.setAttribute("class","tf_fa "+e),a.setAttributeNS(null,"href","#"+e),i.appendChild(a),i},getForm(e){const l=e.labels,o=e.plugins,t=f.createElement("div"),a=f.createElement("div"),i=f.createElement("a"),s=f.createElement("div"),n=f.createElement("p"),r=f.createElement("a"),c=f.createElement("i"),d=f.createDocumentFragment(),m=f.createDocumentFragment(),p=["builder_img"];if(t.className="required-addons themify-modal tf_scrollbar tf_opacity tf_hide",i.className="proceed-import button big-button themify_button",i.textContent=l.proceed_import,i.prepend(this.getIcon("fas-cog")),a.className="tf_import_wrap",s.className="tf_erase",n.className="note",n.textContent=l.note,r.className="close",r.href="#",c.className="tf_close",r.appendChild(c),0<Object.keys(o).length){let s=!0,n=f.createDocumentFragment();for(let i in o){let e=f.createElement("li"),t=f.createElement("a"),a;if(o[i].page?(t.target="_blank",t.rel="noopener",t.href=o[i].page):t=f.createElement("span"),t.textContent=o[i].name,o[i].error||o[i].active&&1===o[i].active)if(o[i].error){a=f.createElement("div"),e.className="tf_plugin_has_error",a.className="tf_plugin_error",a.innerHTML=o[i].error;let t=a.tfTag("a");for(let e=t.length-1;-1<e;--e)t[e].target="_blank",t[e].rel="noopener";s=!1}else(a=f.createElement("span")).className="ti-check";else{(a=f.createElement("a")).href="#",a.className="tf_install_plugin",a.dataset.type=o[i].install?"install":"activate",s=!1;let e=l.activate;o[i].install&&("buy"===o[i].install?(e=l.buy,a.href=o[i].page,a.target="_blank",a.rel="noopener",a.className="",a.dataset.type="buy"):e=l.install),a.innerHTML=e,a.dataset.plugin=i,a.dataset.name=o[i].name}e.appendChild(t),o[i].error||e.appendChild(f.createTextNode("( ")),e.appendChild(a),o[i].error||e.appendChild(f.createTextNode(" )")),n.appendChild(e)}if(!1===s){const h=f.createElement("p"),_=f.createElement("p"),u=f.createElement("ul");_.textContent=l.head,h.className="themify-import-warning",h.textContent=l.import_warning,u.appendChild(n),d.append(_,u,h)}}e.has_demo&&(p.push("modify"),p.push("erase"));for(let i=p.length-1;-1<i;--i){let e=f.createElement("label"),t=f.createElement("input"),a=f.createElement("span");t.type="checkbox",t.id=e.htmlFor="tf_"+p[i]+"_demo","builder_img"!==p[i]&&(t.checked=!0),a.textContent=l[p[i]],e.appendChild(a),m.append(t,e)}return s.appendChild(m),a.append(i,s),d.append(a,n,r),t.appendChild(d),t},init(s){return new Promise(async(e,t)=>{try{const a=f.querySelector(".required-addons.themify-modal");if(s=s||{},this.skinId=s.skin||"default",!a||a.dataset.skin!==s.skin){a&&a.remove(),this.el&&this.el.remove(),s.action="themify_required_plugins_modal",s.nonce=themify_js_vars.nonce;const i=await g.fetch(s);if(!i.success)throw i.data;this.el=this.getForm(i.data),themify_js_vars.labels=i.data.labels;let d=[],m=!1;this.el.tfOn("click",async e=>{const t=e.target?e.target.closest(".proceed-import,.close,.tf_install_plugin"):null;if(t&&"_blank"!==t.target){e.preventDefault();const a=t.classList;if(!a.contains("disabled"))if(a.contains("proceed-import")){a.add("disabled");const i=!!this.el.querySelector("#tf_erase_demo:checked"),s=!!this.el.querySelector("#tf_modify_demo:checked"),n=!!this.el.querySelector("#tf_builder_img_demo:checked"),l=this.el.tfClass("tf_install_plugin");for(let e=l.length-1;-1<e;--e)l[e].classList.add("disabled");try{await this.import(i,s,n),await this.close(),p.location.reload()}catch(e){for(let e=l.length-1;-1<e;--e)l[e].classList.remove("disabled");a.remove("disabled")}}else if(a.contains("tf_install_plugin")){a.add("disabled");const o=f.createElement("span"),r=this.el.tfClass("proceed-import")[0].classList,c=async t=>{try{await this.installPlugins(t),t.tfClass("tf_loader")[0].className="ti-check"}catch(e){t.innerHTML=themify_js_vars.labels[t.dataset.type],t.classList.remove("disabled")}};if(r.add("disabled"),o.className="tf_loader",t.innerHTML="",t.appendChild(o),!0===m)d.push(t);else{m=!0,await c(t);for(let e=0,t=d.length;e<t;++e)await c(d[e]);d=[],m=!1,r.remove("disabled")}}else this.close()}}),f.tfId("themify").appendChild(this.el)}this.show(),e(a?"open":"ajax")}catch(e){t(e)}})},show(){return new Promise(e=>{this.el.classList.remove("tf_hide"),setTimeout(()=>{this.el.tfOn("transitionend",e,{passive:!0,once:!0}).classList.remove("tf_opacity")},100)})},close(){return new Promise(t=>{this.el.tfOn("transitionend",e=>{this.el.classList.add("tf_hide"),this.el.remove(),t()},{passive:!0,once:!0}).classList.add("tf_opacity")})},installPlugins(r){return new Promise(async(t,a)=>{await this.notificationModule();const i=themify_js_vars,s=r.dataset.type,n=r.dataset.name,l=async()=>{const t=await g.fetch({action:"themify_activate_plugin",plugin:r.dataset.plugin,nonce:i.nonce});if(!t.success){let e=t.data;if(e.check_license||e.buy){e.check_license&&(await g.loadJs(g.url+"js/admin/modules/license",!!p.TF_License),await TF_License.init());const a=Error(e.errorMessage);a.code=e.buy?"buy":"check_license",e.buy&&(r.dataset.type="buy",r.target="_blank",r.rel="noopener",r.href=e.url),e=a}else e.errorMessage&&(e=e.errorMessage+":"+e.errorCode);throw e}t.data&&t.data.install_plugin_url&&await g.fetch(null,"text",{method:"GET"},t.data.install_plugin_url),await TF_Notification.showHide("done",i.labels.plugins[s+"_done"].replaceAll("%plugin%",n),1500),"install"===s&&(r.dataset.type="activate",await this.installPlugins(r))};await TF_Notification.show("info",i.labels.plugins[s].replaceAll("%plugin%",n));try{try{await l()}catch(e){if(e){if("check_license"===e.code||"buy"===e.code)throw e.message;if(e.install_updater){await(async()=>{await g.loadJs(g.url+"js/admin/modules/install-updater",!!p.TF_Install_Updater),await TF_Install_Updater(i.nonce)})();try{return await l(),void t()}catch(e){if("check_license"===e.code||"buy"===e.code)throw e.message}}}await new Promise((e,t)=>{setTimeout(()=>{l().then(e).catch(t)},1e3)})}t()}catch(e){const o="string"==typeof e?e:"";await TF_Notification.showHide("error",i.labels.plugins[s+"_fail"].replaceAll("%plugin%",n).replaceAll("%error%",o),4e3),a(e)}})},import(_,u,f){return new Promise(async(a,t)=>{const i=themify_js_vars;let s="https://themify.org/public-api/samples/"+i.theme+"/",e=this.skinId,n=i.theme+"-"+e;e&&(s+=e+"/"),s+="data.json";try{let e=w.get(s),t=[];t.push(e||g.fetch("",null,{credentials:"omit",method:"GET",mode:"cors"},s)),t.push(this.notificationModule()),t.push(this.importModule()),_&&t.push(g.trigger("themify_erase_content",u));const l=await Promise.all(t),o=l[0],r=i.import,c=parseInt(r.memory)||64,d={data:{},id:n,nonce:i.nonce,action:"themify_import_theme_data"},m=["themify_settings","widgets","homepage"],p=async t=>{try{const e=await g.fetch(t);if(!e.success)throw"error"}catch(e){try{t.data=new Blob([JSON.stringify(t.data)],{type:"application/json"});const a=await g.fetch(t);if(!a.success)throw"error"}catch(e){throw e}}};w.set(s,o),r.images_chunk=255<=c?6:120<=c?5:60<c?3:2,TF_Import.importImages(),(o.menu_locations||o.theme_mods||o.product_attribute)&&(await TF_Notification.show("info",r.menu),o.menu&&(d.data.menu=o.menu),o.menu_locations&&(d.data.menu_locations=o.menu_locations),o.theme_mods&&(d.data.theme_mods=o.theme_mods),o.product_filter&&(d.data.product_filter=o.product_filter),o.product_attribute&&(d.data.product_attribute=o.product_attribute),await p(d),delete d.data.menu,delete d.data.product_filter,delete d.data.menu_locations,delete d.data.product_attribute,delete d.data.theme_mods),f||(r.skip_builder=!0),o.terms&&(r.loading=r.terms,o.terms=TF_Import.sort(o.terms,"parent"),await TF_Import.init(o.terms,"themify_import_terms",i.nonce,r,n)),o.posts&&(r.loading=r.posts,o.posts=TF_Import.sort(o.posts,"post_parent"),await TF_Import.init(o.posts,"themify_import_posts",i.nonce,r,n)),o.menu_items&&(r.loading=r.menu_items,o.menu_items=TF_Import.sort(o.menu_items,"meta_input","_menu_item_menu_item_parent"),await TF_Import.init(o.menu_items,"themify_import_posts",i.nonce,r,n));for(let e=m.length-1;-1<e;--e)o[m[e]]!==y&&(d.data[m[e]]=o[m[e]]);0<Object.keys(d.data).length&&(await TF_Notification.show("info",r.theme),await p(d)),await TF_Notification.showHide("done",r.done,2e3),a()}catch(e){await this.notificationModule();const h="string"==typeof e?e:"";await TF_Notification.showHide("error",h,2e3),t(e)}})}}})(Themify,window,void 0,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка