05-tilda-export-backup/Tilda_ Рождение писателя во мраке_files/td-other.min.js

2 lines
18 KiB
JavaScript
Raw Permalink Normal View History

2025-10-29 16:50:39 +00:00
function td__drawPreload(e){td__drawBody(e),td__drawMenu()}function td__drawGlobal(e){document.querySelector(".td-maincontainer")&&(document.body.innerHTML=""),window.csrf&&document.getElementById("csrf").setAttribute("content",window.csrf),window.lang&&document.body.setAttribute("data-lang",window.lang),td__drawBody(e),td__drawMenu(),"object"==typeof e&&!0===e.nofooter||td__drawFooter(),"function"==typeof td__help__showBubble&&td__help__showBubble()}function td__drawBody(e){var t='<div id="loadicon" class="spinner" style="display:none;"></div><div class="td-menucontainer"></div><div class="td-maincontainer" style="'+("object"==typeof e&&"string"==typeof e.mcbgcolor?"background-color:"+e.mcbgcolor+";":"background-color:#fff;")+'min-height:calc(100vh - 60px);"></div><div class="td-footercontainer"></div>';document.body.insertAdjacentHTML("beforeend",t)}function td__drawBreadcrumbs(e){if("object"==typeof e){var t="https://tilda."+window.location.hostname.split(".").pop(),o="";o+='<div class="td-breadcrumbs">',o+='<div class="td-breadcrumbs__list">';for(var r=0;r<e.length;r++){var n=e[r],i,a="";void 0!==n.def?"myprojects"==n.def?(i=t+"/projects/",a="{{dashboard}}"):"project"==n.def?(i=t+"/projects/?projectid="+n.prid,(a=n.prt)||(a="{{my_project}}")):"ss"==n.def?(i=t+"/projects/settings/?projectid="+n.prid+(void 0!==n.tab?"#tab="+n.tab:""),a="{{site_settings}}"):"identity"==n.def?(i=t+"/identity/",a="{{profile}}"):"plans"==n.def?(i=t+"/identity/plan/",a="{{plans_and_billing}}"):"domains"==n.def&&(i=t+"/domains/",a="{{domains}}"):(i=n.l,a=n.t),o+='<div class="td-breadcrumbs__item'+(r===e.length-1?" td-breadcrumbs__item_last":"")+(a.length>=20?" td-breadcrumbs__item_long":"")+'">',o+=""===i?'<span class="td-breadcrumbs__link" style="opacity:0.7;">'+a+"</span>":'<a class="td-breadcrumbs__link" href="'+i+'">'+a+"</a>",o+="</div>",r!==e.length-1&&(o+='<div class="td-breadcrumbs__item td-breadcrumbs__item_arrow">→</div>')}o+="</div>",o=td__other__translate(o+="</div>"),document.querySelector(".td-maincontainer").insertAdjacentHTML("afterbegin",o)}}function td__load(e,t,o,r){"object"!=typeof o&&(o={}),"noloader"!==o.loadicon&&("corner"===o.loadicon?showLoadIcon():showCentralLoadIcon());var n=Date.now();void 0!==window.xhr_get&&window.xhr_get.abort();var i="/page/publish/"===e?35:20;function onSuccess(o){if("function"==typeof check_logout&&check_logout(o),""==o)"function"==typeof tc__showDialog?tc__showDialog({msg:"Error. Empty response from server"},"alert"):alert("Error. Empty response from server");else{if("bsf"==o.substring(0,3))try{o=bsfdunicode(o.substring(3))}catch(e){console.log("error bsf")}if("{"===o.substring(0,1)||"["===o.substring(0,1)){var n=td__parseJson(o);"object"==typeof n?(null===n&&(n={}),r(n)):(console.log("Error response. Can not parse response from server: "+o),document.body.innerHTML=o)}else console.log("Error response from server: "+o),"Sorry, you do not have rights to this action"!=o&&"Извините, у вас нет прав на это действие"!=o||(o='<div style="font-size:20px; padding:40px; line-height:1.5;">'+o+"</div>",o+='<div style="font-size:12px; padding:40px; padding-top:0;">',"/projects/get/getsitesettings/"==e&&void 0!==t.projectid&&(o+=td__other__translate("{{owner_restricted_access|projectid}}",{projectid:t.projectid})),o+='<br><br><a href="javascript:window.history.back();">{{go_back}}</a>',o+="</div>"),"Project does not exist!"==o&&(o='<div style="font-size:20px; padding:40px; line-height:1.5;">'+o+"</div>"),o=td__other__translate(o),document.body.innerHTML=o;-1===o.indexOf("Sorry, you don't have permission to perform this action")&&-1===o.indexOf("Извините, у вас нет прав на это действие")||!document.body.classList.contains("td-body_popup-opened")||document.body.classList.remove("td-body_popup-opened")}}function onError(r,i){var a=Date.now()-n;if(console.log(r.status),console.log(i),"abort"===i){var s=document.getElementById("noactionlayer");s&&(s.style.display="none")}else r.status>=400?(td__drawpageerror(r.status,"(Action: Get "+o.ctext.rep