Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/kirki/kirki-packages/settings/dist/settings.js.map
Назад
{"mappings":"6DAAO,MAAMA,EAAgBC,IAC5B,KAAOA,EAAGC,YACTD,EAAGE,YAAYF,EAAGC,WAAU,EAIjBE,EAAa,CACzBH,EACAI,EACAC,KAEA,GAAIL,EAAGM,QAAQF,GACd,OAAOJ,EAGR,GAAmB,SAAfA,EAAGO,SAAqC,SAAfP,EAAGO,QAC/B,OAGD,IAAIC,EACJH,EAAQA,GAAgB,GAExB,IAAK,IAAII,EAAI,EAAGA,EAAIJ,EAAOI,IAAK,CAC/B,MAAMC,EAAaV,EAAGU,WAEtB,IACEA,GACsB,SAAvBA,EAAWH,SACY,SAAvBG,EAAWH,QAEX,MAGD,GAAIG,EAAWJ,QAAQF,GACtB,OAAOM,EAGRV,EAAKU,CACN,CAEA,OAAOF,CAAA,EAGKG,EAAgBC,IAC5BA,EAAOC,UAAUC,IAAI,eAGTC,EAAeH,IAC3BA,EAAOC,UAAUG,OAAO,e,MCzCV,SAAAC,IACd,MAAMC,EAAgCC,SAASC,cAC9C,wBAED,IAAKF,EAAW,OAEhB,MAAMG,EAAkCH,EAAUE,cACjD,kCAED,IAAKC,EAAa,OAElB,MAAMC,EAAmCD,EAAYD,cACpD,+BAED,IAAKE,EAAc,OAEnB,IAAIC,GAAY,EAChB,MAAMC,EAAUC,cAAcC,mBAAmBC,IAmHjD,SAASC,EAAYhB,GAChBW,IACJA,GAAY,EACZM,EAAY,gCAAiC,WAE7CC,EAAAC,GAAOC,KAAK,CACXC,OAAO,EACPC,KAAM,MACNC,IAAKX,EAAQY,cACbC,QAAS,WACRC,EACC,sDACA,QAGDT,EAAY,2BAA4B,WACxCU,EAAe3B,EAAQY,EAAQgB,YAChC,EACAC,MAAO,SAAUC,GACZA,EAAMC,WAAaD,EAAME,aAC5BN,EAAuBI,EAAME,aAAc,UAEvCF,EAAMG,cAAgBH,EAAMG,aAAaC,KAC5CR,EA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js","kirki-packages/settings/src/settings.ts","kirki-packages/settings/src/tabs.ts"],"sourcesContent":["export const emptyElement = (el: HTMLElement) => {\n\twhile (el.firstChild) {\n\t\tel.removeChild(el.firstChild);\n\t}\n};\n\nexport const getClosest = (\n\tel: HTMLElement,\n\tselector: string,\n\tdepth?: number\n): HTMLElement | undefined => {\n\tif (el.matches(selector)) {\n\t\treturn el;\n\t}\n\n\tif (el.tagName === \"BODY\" || el.tagName === \"HTML\") {\n\t\treturn undefined;\n\t}\n\n\tlet closest = undefined;\n\tdepth = depth ? depth : 20;\n\n\tfor (let i = 0; i < depth; i++) {\n\t\tconst parentNode = el.parentNode as HTMLElement;\n\n\t\tif (\n\t\t\t!parentNode ||\n\t\t\tparentNode.tagName === \"BODY\" ||\n\t\t\tparentNode.tagName === \"HTML\"\n\t\t) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (parentNode.matches(selector)) {\n\t\t\treturn parentNode;\n\t\t}\n\n\t\tel = parentNode;\n\t}\n\n\treturn closest;\n};\n\nexport const startLoading = (button: HTMLButtonElement | HTMLElement) => {\n\tbutton.classList.add(\"is-loading\");\n};\n\nexport const stopLoading = (button: HTMLButtonElement | HTMLElement) => {\n\tbutton.classList.remove(\"is-loading\");\n};\n","import { emptyElement, getClosest, startLoading, stopLoading } from \"./utils\";\nimport jQuery from \"jquery\";\n\ndeclare var wp: any;\ndeclare var kirkiSettings: any;\ndeclare var ajaxurl: any;\n\nexport default function setupUdb() {\n\tconst adminPage: HTMLElement | null = document.querySelector(\n\t\t\".kirki-settings-page\"\n\t);\n\tif (!adminPage) return;\n\n\tconst progressBox: HTMLElement | null = adminPage.querySelector(\n\t\t\".installation-progress-metabox\"\n\t);\n\tif (!progressBox) return;\n\n\tconst progressList: HTMLElement | null = progressBox.querySelector(\n\t\t\".installation-progress-list\"\n\t);\n\tif (!progressList) return;\n\n\tlet doingAjax = false;\n\tconst udbData = kirkiSettings.recommendedPlugins.udb;\n\n\tdocument.addEventListener(\"click\", handleDocumentClick);\n\n\tfunction handleDocumentClick(e: Event) {\n\t\tconst button = getClosest(e.target as HTMLElement, \".kirki-install-udb\");\n\t\tif (!button) return;\n\n\t\te.preventDefault();\n\t\tprepareUdb(button);\n\t}\n\n\tfunction prepareUdb(button: HTMLElement) {\n\t\tif (!adminPage) return;\n\t\tif (doingAjax) return;\n\t\tstartProcessing(button);\n\t\taddProgress(\"Preparing...\", \"loading\");\n\n\t\tconst nonce = adminPage.dataset.setupUdbNonce\n\t\t\t? adminPage.dataset.setupUdbNonce\n\t\t\t: \"\";\n\n\t\tjQuery\n\t\t\t.ajax({\n\t\t\t\turl: ajaxurl,\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tdata: {\n\t\t\t\t\taction: \"kirki_prepare_install_udb\",\n\t\t\t\t\tnonce: nonce,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.done(function (response) {\n\t\t\t\tif (!response.success) {\n\t\t\t\t\tmodifyPreviousProgress(response.data, \"failed\");\n\t\t\t\t\tstopProcessing(button, \"\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (response.data.finished) {\n\t\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\t\"Ultimate Dashboard has already been installed.\",\n\t\t\t\t\t\t\"done\"\n\t\t\t\t\t);\n\t\t\t\t\taddProgress(response.data.message, \"done\");\n\t\t\t\t\taddProgress(\"All done! Redirecting...\", \"loading\");\n\t\t\t\t\tstopProcessing(button, udbData.redirectUrl);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tmodifyPreviousProgress(response.data.message, \"done\");\n\t\t\t\tdoingAjax = false;\n\t\t\t\tinstallUdb(button);\n\t\t\t})\n\t\t\t.fail(function (jqXHR) {\n\t\t\t\tlet errorMessage: string =\n\t\t\t\t\t\"Something went wrong. Please try again later.\";\n\n\t\t\t\tif (jqXHR.responseJSON && jqXHR.responseJSON.data) {\n\t\t\t\t\terrorMessage = jqXHR.responseJSON.data;\n\t\t\t\t}\n\n\t\t\t\tmodifyPreviousProgress(errorMessage, \"failed\");\n\t\t\t\tstopProcessing(button, \"\");\n\t\t\t});\n\t}\n\n\tfunction installUdb(button: HTMLElement) {\n\t\tif (doingAjax) return;\n\t\tdoingAjax = true;\n\t\taddProgress(\"Installing Ultimate Dashboard\", \"loading\");\n\n\t\twp.updates.installPlugin({\n\t\t\tslug: udbData.slug,\n\t\t\tsuccess: function () {\n\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\"Ultimate Dashboard has been installed successfully\",\n\t\t\t\t\t\"done\"\n\t\t\t\t);\n\t\t\t\tdoingAjax = false;\n\t\t\t\tactivateUdb(button);\n\t\t\t},\n\t\t\terror: function (jqXHR: any) {\n\t\t\t\tlet abort = true;\n\n\t\t\t\tif (jqXHR.errorCode && jqXHR.errorMessage) {\n\t\t\t\t\tif (jqXHR.errorCode === \"folder_exists\") {\n\t\t\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\t\t\"Ultimate Dashboard has already been installed.\",\n\t\t\t\t\t\t\t\"done\"\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tdoingAjax = false;\n\t\t\t\t\t\tabort = false;\n\n\t\t\t\t\t\t// Since the plugin has already installed since before, let's activate it.\n\t\t\t\t\t\tactivateUdb(button);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmodifyPreviousProgress(jqXHR.errorMessage, \"failed\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (jqXHR.responseJSON && jqXHR.responseJSON.data) {\n\t\t\t\t\t\tmodifyPreviousProgress(jqXHR.responseJSON.data, \"failed\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\t\t\"Something went wrong. Please try again later.\",\n\t\t\t\t\t\t\t\"failed\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (abort) stopProcessing(button, \"\");\n\t\t\t},\n\t\t});\n\t}\n\n\tfunction activateUdb(button: HTMLElement) {\n\t\tif (doingAjax) return;\n\t\tdoingAjax = true;\n\t\taddProgress(\"Activating Ultimate Dashboard\", \"loading\");\n\n\t\tjQuery.ajax({\n\t\t\tasync: true,\n\t\t\ttype: \"GET\",\n\t\t\turl: udbData.activationUrl,\n\t\t\tsuccess: function () {\n\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\"Ultimate Dashboard has been activated successfully.\",\n\t\t\t\t\t\"done\"\n\t\t\t\t);\n\n\t\t\t\taddProgress(\"All done! Redirecting...\", \"loading\");\n\t\t\t\tstopProcessing(button, udbData.redirectUrl);\n\t\t\t},\n\t\t\terror: function (jqXHR: any) {\n\t\t\t\tif (jqXHR.errorCode && jqXHR.errorMessage) {\n\t\t\t\t\tmodifyPreviousProgress(jqXHR.errorMessage, \"failed\");\n\t\t\t\t} else {\n\t\t\t\t\tif (jqXHR.responseJSON && jqXHR.responseJSON.data) {\n\t\t\t\t\t\tmodifyPreviousProgress(jqXHR.responseJSON.data, \"failed\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmodifyPreviousProgress(\n\t\t\t\t\t\t\t\"Something went wrong. Please try again later.\",\n\t\t\t\t\t\t\t\"failed\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tstopProcessing(button, \"\");\n\t\t\t},\n\t\t});\n\t}\n\n\tfunction addProgress(text: string, status: string) {\n\t\tif (!progressList) return;\n\t\tconst li = document.createElement(\"li\");\n\t\tli.className = \"installation-progress\";\n\n\t\tif (status === \"done\") {\n\t\t\tli.classList.add(\"is-done\");\n\t\t} else if (status === \"failed\") {\n\t\t\tli.classList.add(\"is-failed\");\n\t\t} else {\n\t\t\tli.classList.add(\"is-loading\");\n\t\t}\n\n\t\tconst iconDiv = document.createElement(\"div\");\n\t\ticonDiv.className = \"progress-icon\";\n\t\tli.appendChild(iconDiv);\n\n\t\tconst textDiv = document.createElement(\"div\");\n\t\ttextDiv.className = \"progress-text\";\n\t\ttextDiv.innerHTML = text;\n\t\tli.appendChild(textDiv);\n\n\t\tprogressList.appendChild(li);\n\t}\n\n\tfunction modifyPreviousProgress(text: string, status: string) {\n\t\tif (!progressList) return;\n\t\tconst li = progressList.querySelector(\".installation-progress:last-child\");\n\t\tif (!li) return;\n\n\t\tif (status === \"done\") {\n\t\t\tli.classList.remove(\"is-loading\");\n\t\t\tli.classList.add(\"is-done\");\n\t\t} else if (status === \"failed\") {\n\t\t\tli.classList.remove(\"is-loading\");\n\t\t\tli.classList.add(\"is-failed\");\n\t\t} else {\n\t\t\tli.classList.remove(\"is-done\");\n\t\t\tli.classList.remove(\"is-failed\");\n\t\t\tli.classList.add(\"is-loading\");\n\t\t}\n\n\t\tif (text) {\n\t\t\tconst textDiv = li.querySelector(\".progress-text\");\n\t\t\tif (!textDiv) return;\n\t\t\ttextDiv.innerHTML = text;\n\t\t}\n\t}\n\n\tfunction disableOrEnableOtherButtons(\n\t\tactionType: string,\n\t\tcurrentButton: HTMLElement | HTMLButtonElement\n\t) {\n\t\tconst buttons = document.querySelectorAll(\".kirki-install-udb\");\n\t\tif (!buttons.length) return;\n\n\t\tbuttons.forEach((button) => {\n\t\t\tif (actionType === \"disable\") {\n\t\t\t\tif (currentButton && button === currentButton) return;\n\t\t\t}\n\n\t\t\tif (button.tagName.toLowerCase() === \"button\") {\n\t\t\t\tif (actionType === \"disable\") {\n\t\t\t\t\t// button.setAttribute(\"disabled\", \"disabled\");\n\t\t\t\t\tbutton.classList.add(\"is-loading\");\n\t\t\t\t} else {\n\t\t\t\t\t// button.removeAttribute(\"disabled\");\n\t\t\t\t\tbutton.classList.remove(\"is-loading\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (actionType === \"disable\") {\n\t\t\t\t\t// button.classList.add(\"is-disabled\");\n\t\t\t\t\tbutton.classList.add(\"is-loading\");\n\t\t\t\t} else {\n\t\t\t\t\t// button.classList.remove(\"is-disabled\");\n\t\t\t\t\tbutton.classList.remove(\"is-loading\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction startProcessing(button: HTMLElement) {\n\t\tif (progressBox && progressList) {\n\t\t\temptyElement(progressList);\n\t\t\tprogressBox.classList.remove(\"is-hidden\");\n\t\t}\n\n\t\tdoingAjax = true;\n\t\tdisableOrEnableOtherButtons(\"disable\", button);\n\t\tstartLoading(button);\n\t}\n\n\tfunction stopProcessing(button: HTMLElement, redirectUrl: string) {\n\t\tif (redirectUrl) {\n\t\t\twindow.setTimeout(() => {\n\t\t\t\twindow.location.replace(redirectUrl);\n\t\t\t}, 1000);\n\t\t}\n\n\t\tstopLoading(button);\n\t\tdoingAjax = false;\n\t\tdisableOrEnableOtherButtons(\"enable\", button);\n\t}\n}\n","module.exports=jQuery;","import \"./settings.scss\";\r\nimport setupUdb from \"./setup-udb\";\r\nimport setupTabsNavigation from \"./tabs\";\r\n\r\ndeclare var ajaxurl: string;\r\n\r\n(function () {\r\n\tsetupTabsNavigation();\r\n\tsetupUdb();\r\n\r\n\tconst metabox = document.querySelector(\".kirki-clear-font-cache-metabox\");\r\n\tif (!metabox) return;\r\n\r\n\tvar notice = metabox.querySelector(\".submission-status\");\r\n\tif (!notice) return;\r\n\r\n\tconst button = metabox.querySelector(\".kirki-clear-font-cache\");\r\n\tif (!button) return;\r\n\r\n\tbutton.addEventListener(\"click\", clearFontCache);\r\n\r\n\tlet doingAjax = false;\r\n\tlet timeoutId: number = 0;\r\n\r\n\tfunction clearFontCache(e: Event) {\r\n\t\tif (doingAjax) return;\r\n\t\tdoingAjax = true;\r\n\r\n\t\tconst button = this as HTMLButtonElement;\r\n\t\tbutton.classList.add(\"is-loading\");\r\n\r\n\t\tif (timeoutId) {\r\n\t\t\twindow.clearTimeout(timeoutId);\r\n\t\t}\r\n\r\n\t\ttimeoutId = 0;\r\n\r\n\t\tvar data = {\r\n\t\t\taction: \"kirki_clear_font_cache\",\r\n\t\t\tnonce: button.dataset.nonce,\r\n\t\t};\r\n\r\n\t\tjQuery\r\n\t\t\t.ajax({\r\n\t\t\t\turl: ajaxurl,\r\n\t\t\t\ttype: \"POST\",\r\n\t\t\t\tdata: data,\r\n\t\t\t})\r\n\t\t\t.done(function (r) {\r\n\t\t\t\tshowNotice(r.success ? \"success\" : \"error\", r.data);\r\n\t\t\t})\r\n\t\t\t.fail(function (r) {\r\n\t\t\t\tshowNotice(\"error\", \"Something went wrong.\");\r\n\t\t\t})\r\n\t\t\t.always(function (r) {\r\n\t\t\t\tdoingAjax = false;\r\n\t\t\t\tbutton.classList.remove(\"is-loading\");\r\n\r\n\t\t\t\ttimeoutId = window.setTimeout(function () {\r\n\t\t\t\t\thideNotice();\r\n\t\t\t\t}, 4000);\r\n\t\t\t});\r\n\t}\r\n\r\n\tfunction showNotice(status: string, textContent: string) {\r\n\t\tif (!notice) return;\r\n\t\tnotice.textContent = textContent;\r\n\t\tnotice.classList.add(status === \"success\" ? \"is-success\" : \"is-error\");\r\n\t\tnotice.classList.remove(\"is-hidden\");\r\n\t}\r\n\r\n\tfunction hideNotice() {\r\n\t\tif (!notice) return;\r\n\t\tnotice.textContent = \"\";\r\n\t\tnotice.classList.remove(\"is-success\");\r\n\t\tnotice.classList.remove(\"is-error\");\r\n\t\tnotice.classList.add(\"is-hidden\");\r\n\t}\r\n})();\r\n","import jQuery from \"jquery\";\n\nexport default function setupTabsNavigation() {\n\tjQuery(\".heatbox-tab-nav-item\").on(\"click\", function () {\n\t\tjQuery(\".heatbox-tab-nav-item\").removeClass(\"active\");\n\t\tjQuery(this).addClass(\"active\");\n\n\t\tconst link = this.querySelector(\"a\");\n\t\tif (!link) return;\n\n\t\tif (link.href.indexOf(\"#\") === -1) return;\n\n\t\tconst hashValue = link.href.substring(link.href.indexOf(\"#\") + 1);\n\n\t\tjQuery(\".heatbox-panel-wrapper .heatbox-admin-panel\").css(\n\t\t\t\"display\",\n\t\t\t\"none\"\n\t\t);\n\n\t\tjQuery(\".heatbox-panel-wrapper .kirki-\" + hashValue + \"-panel\").css(\n\t\t\t\"display\",\n\t\t\t\"block\"\n\t\t);\n\t});\n\n\twindow.addEventListener(\"load\", function () {\n\t\tlet hashValue = window.location.hash.substring(1);\n\t\tlet currentActiveTabMenu: HTMLElement | null = null;\n\n\t\tif (!hashValue) {\n\t\t\tcurrentActiveTabMenu = document.querySelector(\n\t\t\t\t\".heatbox-tab-nav-item.active\"\n\t\t\t);\n\n\t\t\tif (currentActiveTabMenu && currentActiveTabMenu.dataset.tab) {\n\t\t\t\thashValue = currentActiveTabMenu.dataset.tab;\n\t\t\t}\n\n\t\t\thashValue = hashValue ? hashValue : \"settings\";\n\t\t}\n\n\t\tjQuery(\".heatbox-tab-nav-item\").removeClass(\"active\");\n\t\tjQuery(\".heatbox-tab-nav-item.kirki-\" + hashValue + \"-panel\").addClass(\n\t\t\t\"active\"\n\t\t);\n\n\t\tjQuery(\".heatbox-panel-wrapper .heatbox-admin-panel\").css(\n\t\t\t\"display\",\n\t\t\t\"none\"\n\t\t);\n\n\t\tjQuery(\".heatbox-panel-wrapper .kirki-\" + hashValue + \"-panel\").css(\n\t\t\t\"display\",\n\t\t\t\"block\"\n\t\t);\n\t});\n}\n"],"names":["$f448701b1a546a82$export$ae6de35c16b306df","el","firstChild","removeChild","$f448701b1a546a82$export$211731fc355e9121","selector","depth","matches","tagName","closest","i","parentNode","$f448701b1a546a82$export$fea330ef6103f535","button","classList","add","$f448701b1a546a82$export$4dabcd056c1d895c","remove","$4fab253fa82d62c5$export$2e2bcd8739ae039","adminPage","document","querySelector","progressBox","progressList","doingAjax","udbData","kirkiSettings","recommendedPlugins","udb","activateUdb","addProgress","$parcel$interopDefault","$0a2eb9defebd2c69$exports","ajax","async","type","url","activationUrl","success","modifyPreviousProgress","stopProcessing","redirectUrl","error","jqXHR","errorCode","errorMessage","responseJSON","data","text","status","li","createElement","className","iconDiv","appendChild","textDiv","innerHTML","disableOrEnableOtherButtons","actionType","currentButton","buttons","querySelectorAll","length","forEach","toLowerCase","window","setTimeout","location","replace","addEventListener","e","target","preventDefault","startProcessing","nonce","dataset","setupUdbNonce","ajaxurl","method","action","done","response","finished","message","wp","updates","installPlugin","slug","abort","installUdb","fail","prepareUdb","jQuery","on","removeClass","this","addClass","link","href","indexOf","hashValue","substring","css","hash","currentActiveTabMenu","tab","metabox","notice","timeoutId","clearTimeout","r","showNotice","always","textContent","hideNotice"],"version":3,"file":"settings.js.map"}
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка