| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/file-manager-advanced/application/assets/dist/ |
Upload File : |
/*! For license information please see 821.d01e4f3c.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[821],{7821(e,t,n){n.r(t),n.d(t,{default:()=>k});var i=n(6540),o=(n(5486),n(5688)),a=n(7850),r=n(7554),l=n(4848);function s(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function g(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,i,o,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return v(c,"_invoke",function(n,i,o){var a,l,s,c=0,d=o||[],u=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,f.n=n,r}};function p(n,i){for(l=n,s=i,t=0;!u&&c&&!o&&t<d.length;t++){var o,a=d[t],p=f.p,m=a[2];n>3?(o=m===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=i,f.n=a[1]):p<m&&(o=n<3||a[0]>i||i>m)&&(a[4]=n,a[5]=i,f.n=m,l=0))}if(o||n>1)return r;throw u=!0,i}return function(o,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,m),l=d,s=m;(t=l<2?e:s)||!u;){a||(l?l<3?(l>1&&(f.n=-1),p(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(u=f.n<0)?s:n.call(i,f))!==r)break}catch(t){a=e,l=1,s=t}finally{c=1}}return{value:t,done:u}}}(n,o,a),!0),c}var r={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][i]?t(t([][i]())):(v(t={},i,function(){return this}),t),u=c.prototype=l.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,v(u,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(u),v(u,o,"Generator"),v(u,i,function(){return this}),v(u,"toString",function(){return"[object Generator]"}),(g=function(){return{w:a,m:f}})()}function v(e,t,n,i){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,n,i){function a(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},v(e,t,n,i)}function x(e,t,n,i,o,a,r){try{var l=e[a](r),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function r(e){x(a,i,o,r,l,"next",e)}function l(e){x(a,i,o,r,l,"throw",e)}r(void 0)})}}var y=i.lazy(b(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.e(305).then(n.bind(n,3305));case 1:return e.n=2,n.e(708).then(n.t.bind(n,5708,23));case 2:return t=e.v,e.a(2,{default:t.default})}},e)}))),w="AFM File Log Recent Activity",j=function(e){return("string"==typeof e?e.trim():"")||w};function k(){var e,t,n,c,u,p,m,g,v,x,b=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onContentReady,k=(0,o.lA)(),_=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(t=window.afmReact)||void 0===t?void 0:t.nonce)||"",S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t="".concat(k,"file-manager-advanced/v1/notifications");if(!e||"object"!==h(e))return t;var n=new URLSearchParams(e).toString();return n?"".concat(t).concat(t.includes("?")?"&":"?").concat(n):t},A=f((0,i.useState)(null),2),P=A[0],R=A[1],O=f((0,i.useState)(!0),2),T=O[0],C=O[1];(0,i.useEffect)(function(){T||null==b||b()},[T,b]);var I=f((0,i.useState)(!1),2),N=I[0],z=I[1],E=f((0,i.useState)(null),2),F=E[0],W=E[1],B=f((0,i.useState)("email"),2),D=B[0],L=B[1],M=f((0,i.useState)(!1),2),U=M[0],H=M[1],q=f((0,i.useState)(!1),2),G=q[0],X=q[1],J=f((0,i.useState)(""),2),Y=J[0],$=J[1],K=f((0,i.useState)(""),2),Q=K[0],V=K[1],Z=function(e){return e?e.split("\n\n").map(function(e){return"<p>".concat(e.split("\n").join("<br>"),"</p>")}).join(""):""},ee=function(e){return e?e.replace(/<p>/g,"").replace(/<\/p>/g,"\n\n").replace(/<br\s*\/?>/gi,"\n").replace(/ /g," ").trim():""},te=f((0,i.useState)(Z("Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.")),2),ne=te[0],ie=te[1],oe=f((0,i.useState)(Z("Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.")),2),ae=oe[0],re=oe[1],le=f((0,i.useState)(""),2),se=le[0],ce=le[1],de=f((0,i.useState)([]),2),ue=de[0],fe=de[1],pe=f((0,i.useState)([]),2),me=pe[0],he=pe[1],ge=(null===(n=window.afmReact)||void 0===n?void 0:n.hasPro)||!1,ve=!(null===(c=window.afmReact)||void 0===c||!c.hasActiveSmtpPlugin),xe=(null===(u=window.afmReact)||void 0===u?void 0:u.currentPlan)||"free",be=(null===(p=window.afmReact)||void 0===p||p.pricingUrl,"".concat(window.location.origin,"/wp-admin/admin.php?page=file-manager-advanced-recommend-post-smtp")),ye=(0,a.w)("slack_notification",xe,ge),we=!ge,je=we||U,ke=we||G,_e=we||U,Se=(we||G)&&(we||ye);(0,i.useLayoutEffect)(function(){var e=sessionStorage.getItem("afm-notifications-subtab");if("slack"!==e&&"email"!==e){var t=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(t.startsWith("notifications/")){var n=t.split("/");if(n.length>1){var i=n[1].split("?")[0].toLowerCase();if("slack"===i)return sessionStorage.setItem("afm-notifications-subtab","slack"),void L("slack");if("email"===i)return sessionStorage.setItem("afm-notifications-subtab","email"),void L("email")}}if("notifications"===t)return sessionStorage.setItem("afm-notifications-subtab","email"),void L("email");sessionStorage.setItem("afm-notifications-subtab","email"),L("email")}else L(e)},[]),(0,i.useEffect)(function(){D&&sessionStorage.setItem("afm-notifications-subtab",D)},[D]),(0,i.useEffect)(function(){var e=function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("notifications/")){var t=e.split("/");if(t.length>1){var n=t[1].split("?")[0].toLowerCase();if("slack"===n)return sessionStorage.setItem("afm-notifications-subtab","slack"),void L(function(e){return"slack"!==e?"slack":e});if("email"===n)return sessionStorage.setItem("afm-notifications-subtab","email"),void L(function(e){return"email"!==e?"email":e})}}if("notifications"===e){var i=sessionStorage.getItem("afm-notifications-subtab")||"email",o="slack"===i||"email"===i?i:"email",a="#/notifications/".concat(o);if(window.history&&window.history.replaceState){var r=window.location.href.split("#")[0]+a;window.history.replaceState(null,"",r)}else window.location.hash=a;L(function(e){return e!==o?o:e})}};return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}},[]);var Ae=(0,i.useRef)(!0);(0,i.useEffect)(function(){if(Ae.current)Ae.current=!1;else{var e="#/notifications/".concat(D);if(window.history&&window.history.replaceState){var t=window.location.href.split("#")[0]+e;window.history.replaceState(null,"",t)}else window.location.hash=e}},[D]);var Pe=[{value:"rm",label:"Delete File/Folder"},{value:"mkfile",label:"Create File"},{value:"mkdir",label:"Create Folder"}],Re=[{code:"{username}",desc:"This will fetch the user's name who did the action"},{code:"{ip_address}",desc:"This will fetch the user's IP Address"},{code:"{event}",desc:"This will fetch which action the user performed (created/deleted)"},{code:"{item_type}",desc:"This will fetch whether the target is a file or folder"},{code:"{file_name}",desc:"This will fetch the file name on which that action was done"},{code:"{ext}",desc:"This will fetch the extension or mime type for the target item"},{code:"{date_time}",desc:"This will fetch the date the user acted on the file"},{code:"{site_name}",desc:"This will fetch the site name on which the action was performed"}];(0,i.useEffect)(function(){if(k&&_){var e=new URLSearchParams(window.location.search).get("webhook_url"),t=Promise.resolve();e&&(t=fetch(S(),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":_,"Content-Type":"application/json"},body:JSON.stringify({slack:{webhook_url:decodeURIComponent(e),enable:"yes"}})}).then(function(){var e=window.location.href.split("&webhook_url=")[0].split("?webhook_url=")[0];window.history.replaceState({},"",e)}).catch(function(e){console.error("AFM Notifications webhook save error:",e)})),t.then(function(){setTimeout(function(){fetch(S({_t:String(Date.now())}),{credentials:"same-origin",headers:{"X-WP-Nonce":_}}).then(function(e){return e.ok?e.json():Promise.reject("Failed to fetch")}).then(function(t){var n,i,o,a,r,l,s,c,d;R(t),H("yes"===(null==t||null===(n=t.email)||void 0===n?void 0:n.enable)),X("yes"===(null==t||null===(i=t.slack)||void 0===i?void 0:i.enable)),$((null==t||null===(o=t.email)||void 0===o?void 0:o.email)||""),V(j(null==t||null===(a=t.email)||void 0===a?void 0:a.subject)),fe(Array.isArray(null==t||null===(r=t.email)||void 0===r?void 0:r.events)?t.email.events:[]);var u=(null==t||null===(l=t.email)||void 0===l?void 0:l.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";ie(u.includes("<p>")||u.includes("<br>")?u:Z(u)),he(Array.isArray(null==t||null===(s=t.slack)||void 0===s?void 0:s.events)?t.slack.events:[]);var f=(null==t||null===(c=t.slack)||void 0===c?void 0:c.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";re(f.includes("<p>")||f.includes("<br>")?f:Z(f));var p=e?decodeURIComponent(e):"";ce(p||(null==t||null===(d=t.slack)||void 0===d?void 0:d.webhook_url)||""),C(!1)}).catch(function(e){console.error("AFM Notifications fetch error:",e),C(!1)})},500)})}else console.warn("AFM Notifications: Missing API root or nonce")},[k,_]);var Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e&&e.preventDefault&&e.preventDefault(),ge){if(P&&!N){z(!0),W(null);var n={email:d({enable:U?"yes":"no",email:Y||"",events:ue||[],subject:j(Q),message:ee(ne)||""},(null==t?void 0:t.email)||{}),slack:d({enable:G?"yes":"no",webhook_url:se||"",events:me||[],message:ee(ae)||""},(null==t?void 0:t.slack)||{})};fetch(S(),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":_,"Content-Type":"application/json"},body:JSON.stringify(n)}).then(function(e){return e.ok?e.json():Promise.reject(e)}).then(function(e){return W({type:"success",text:e.message||"Notification settings saved successfully."}),z(!1),setTimeout(function(){return W(null)},5e3),fetch(S(),{credentials:"same-origin",headers:{"X-WP-Nonce":_}})}).then(function(e){return e.ok?e.json():Promise.reject(e)}).then(function(e){var t,n,i,o,a,r,l,s,c;R(e),H("yes"===(null==e||null===(t=e.email)||void 0===t?void 0:t.enable)),X("yes"===(null==e||null===(n=e.slack)||void 0===n?void 0:n.enable)),$((null==e||null===(i=e.email)||void 0===i?void 0:i.email)||""),V(j(null==e||null===(o=e.email)||void 0===o?void 0:o.subject)),fe(Array.isArray(null==e||null===(a=e.email)||void 0===a?void 0:a.events)?e.email.events:[]);var d=(null==e||null===(r=e.email)||void 0===r?void 0:r.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";ie(d.includes("<p>")||d.includes("<br>")?d:Z(d)),he(Array.isArray(null==e||null===(l=e.slack)||void 0===l?void 0:l.events)?e.slack.events:[]);var u=(null==e||null===(s=e.slack)||void 0===s?void 0:s.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";re(u.includes("<p>")||u.includes("<br>")?u:Z(u)),ce((null==e||null===(c=e.slack)||void 0===c?void 0:c.webhook_url)||"")}).catch(function(e){console.error("AFM Notifications save error:",e),W({type:"error",text:e.message||"Failed to save notification settings."}),z(!1),setTimeout(function(){return W(null)},5e3)})}}else alert("Pro version is required for notifications.")};if(T)return(0,l.jsxs)("div",{className:"afm-tab-panel",style:{padding:"20px"},children:[(0,l.jsx)("style",{children:"\n @keyframes afm-skeleton-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n .afm-skeleton {\n background-color: #e2e8f0;\n background-image: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);\n background-size: 200% 100%;\n animation: afm-skeleton-shimmer 1.4s linear infinite;\n }\n "}),(0,l.jsxs)("div",{style:{background:"#fff",border:"1px solid #ccc",padding:"20px"},children:[(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"34px",width:"100%",borderRadius:"6px",marginBottom:"18px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"20px",width:"220px",borderRadius:"6px",marginBottom:"16px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"120px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"160px",borderRadius:"6px",marginTop:"10px"}})]})]});null==P||P.email,null==P||P.slack;var Te=ge&&("email"===D&&U||"slack"===D&&G&&ye),Ce=function(e){var t=e.id,n=e.name,i=e.checked,o=e.disabled,a=e.onChange;return(0,l.jsxs)("label",{onClick:function(e){!o&&a&&(e.preventDefault(),e.stopPropagation(),a({target:{checked:!i}}))},style:{display:"inline-block",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,margin:0,padding:0,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",id:t,name:n,value:"yes",checked:i,disabled:o,readOnly:!0,style:{display:"none"}}),(0,l.jsx)("div",{style:{position:"relative",width:"44px",height:"24px",background:i?"#3F6972":"#ccc",borderRadius:"12px",transition:"background 0.3s",pointerEvents:o?"none":"auto"},children:(0,l.jsx)("div",{style:{position:"absolute",top:"2px",left:i?"22px":"2px",width:"20px",height:"20px",background:"#fff",borderRadius:"50%",transition:"left 0.3s",boxShadow:"0 2px 4px rgba(0,0,0,0.2)"}})})]})};return(0,l.jsx)("div",{className:"afm-tab-panel",children:(0,l.jsxs)("div",{className:"wrap",style:{background:"#fff",padding:"20px",border:"1px solid #ccc",position:"relative"},children:[(0,l.jsxs)("h2",{className:"nav-tab-wrapper afm-clean-tabs",style:{marginBottom:"20px",borderBottom:"none"},children:[(0,l.jsxs)("a",{href:"#/notifications/email",onClick:function(e){e.preventDefault(),L("email");var t="#/notifications/email";if(window.history&&window.history.replaceState){var n=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",n)}else window.location.hash=t},className:"nav-tab afm-clean-tab ".concat("email"===D?" nav-tab-active":""),children:["Email Notifications",!ge&&(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#3F6972",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 6px",borderRadius:"10px",textTransform:"uppercase"},children:"PRO"})]}),(0,l.jsxs)("a",{href:"#/notifications/slack",onClick:function(e){e.preventDefault(),L("slack");var t="#/notifications/slack";if(window.history&&window.history.replaceState){var n=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",n)}else window.location.hash=t},className:"nav-tab afm-clean-tab ".concat("slack"===D?" nav-tab-active":""),children:["Slack Notifications",(!ge||ge&&!ye)&&(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#3F6972",color:"#fff",fontSize:"10px",fontWeight:700,padding:"6px",borderRadius:"10px",textTransform:"uppercase"},children:"PRO"})]}),!ve&&(0,l.jsxs)("a",{href:"#/notifications/smtp",onClick:function(e){e.preventDefault(),window.location.href=be},className:"nav-tab afm-clean-tab",children:["SMTP",(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#16a34a",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 6px",borderRadius:"10px",textTransform:"uppercase"},children:"RECOMMENDED"})]})]}),F&&(0,l.jsxs)("div",{className:"afm-snackbar afm-snackbar-".concat("success"===F.type?"success":"error"),onClick:function(){return W(null)},style:{animation:"afm-slideIn 0.3s ease-out"},children:[(0,l.jsx)("span",{style:{fontSize:"14px",lineHeight:"1.5",flex:"1"},children:F.text}),(0,l.jsx)("button",{type:"button",className:"afm-snackbar-close",onClick:function(e){e.preventDefault(),e.stopPropagation(),W(null)},style:{background:"none",border:"none",padding:"0",cursor:"pointer",color:"inherit",fontSize:"18px",lineHeight:"1",marginLeft:"12px",opacity:"0.7",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]}),(0,l.jsxs)("form",{onSubmit:function(e){return Oe(e)},children:["email"===D&&(0,l.jsx)(r.A,{shouldShow:!ge,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:je?"30px":"0",paddingBottom:je?"15px":"0",borderBottom:je?"1px solid #e5e5e5":"none",gap:"80px"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,l.jsx)("img",{src:((null===(m=window.afmReact)||void 0===m?void 0:m.pluginUrl)||(null===(g=window.afm_object)||void 0===g?void 0:g.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/email_notification.svg",alt:"Email Notifications",style:{width:"24px",height:"24px",flexShrink:0}}),(0,l.jsx)("h3",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"#0f172a"},children:"Email Notifications"})]}),(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",margin:0,padding:0},children:(0,l.jsx)(Ce,{id:"email_enable",name:"email_enable",checked:je,disabled:!ge,onChange:function(e){var t=!U;H(t),Oe(null,{email:{enable:t?"yes":"no"}})}})})]}),_e&&(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"30px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails"}),(0,l.jsx)("input",{type:"email",id:"email_address",name:"email_address",value:Y,onChange:function(e){return $(e.target.value)},disabled:!ge,placeholder:"Enter email address",style:{width:"100%",maxWidth:"500px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:0,fontSize:"13px",color:"#666"},children:"Email address to send notification."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Events Notification"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:Pe.map(function(e){return(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:ge?"pointer":"not-allowed",opacity:ge?1:.5,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",name:"email_events[]",value:e.value,checked:ue.includes(e.value),onChange:function(t){t.target.checked?fe([].concat(s(ue),[e.value])):fe(ue.filter(function(t){return t!==e.value}))},disabled:!ge,style:{marginRight:"10px",width:"18px",height:"18px",cursor:ge?"pointer":"not-allowed",accentColor:"#3F6972"}}),(0,l.jsx)("span",{style:{fontSize:"14px",color:"#0f172a"},children:e.label})]},e.value)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails Subject"}),(0,l.jsx)("input",{type:"text",id:"email_subject",name:"email_subject",value:Q,onChange:function(e){return V(e.target.value)},disabled:!ge,placeholder:w,style:{width:"100%",maxWidth:"500px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:0,fontSize:"13px",color:"#666"},children:"Subject of the email notification."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails Message"}),(0,l.jsxs)("div",{style:{maxWidth:"800px"},children:[(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)("div",{style:{padding:"12px",color:"#666"},children:"Loading editor..."}),children:(0,l.jsx)(y,{theme:"snow",value:ne,onChange:ie,readOnly:!ge,modules:{toolbar:[["bold","italic","underline","strike"],[{color:[]},{background:[]},"clean"],[{header:[1,2,3,4,!1]}],[{list:"ordered"},{list:"bullet"}],["link","image"],[{script:"sub"},{script:"super"}],[{align:[]}]]},formats:["bold","italic","underline","strike","color","background","header","list","bullet","link","image","script","align"],style:{backgroundColor:"#fff"}})}),(0,l.jsx)("input",{type:"hidden",name:"email_message",value:ne})]}),(0,l.jsxs)("p",{style:{marginTop:"8px",marginBottom:"12px",fontSize:"13px",color:"#666"},children:["Message body of the email notification. You can use placeholders like ","{file_name}",", ","{action}"," etc."]}),(0,l.jsxs)("div",{style:{background:"#f8f9fa",padding:"15px",borderRadius:"4px",border:"1px solid #e5e5e5",marginTop:"12px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:600,color:"#0f172a"},children:"Available placeholders:"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:Re.map(function(e,t){return(0,l.jsxs)("div",{style:{fontSize:"13px",color:"#495057",lineHeight:"1.5"},children:[(0,l.jsx)("code",{style:{background:"#e9ecef",padding:"2px 6px",borderRadius:"3px",fontFamily:"monospace",fontSize:"12px",color:"#0f172a"},children:e.code}),(0,l.jsxs)("span",{style:{marginLeft:"8px"},children:["- ",e.desc]})]},t)})})]})]})]})]})}),"slack"===D&&(0,l.jsx)(r.A,{shouldShow:!ge||!ye,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:ke?"30px":"0",paddingBottom:ke?"15px":"0",borderBottom:ke?"1px solid #e5e5e5":"none",gap:"80px"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,l.jsx)("img",{src:((null===(v=window.afmReact)||void 0===v?void 0:v.pluginUrl)||(null===(x=window.afm_object)||void 0===x?void 0:x.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/slack_notification.svg",alt:"Slack Notifications",style:{width:"24px",height:"24px",flexShrink:0}}),(0,l.jsx)("h3",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"#0f172a"},children:"Slack Notifications"})]}),(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",margin:0,padding:0},children:(0,l.jsx)(Ce,{id:"slack_enable",name:"slack_enable",checked:ke,disabled:!ge||!ye,onChange:function(e){var t=!G;X(t),Oe(null,{slack:{enable:t?"yes":"no"}})}})})]}),Se&&(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"30px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Slack Webhook URL"}),(0,l.jsx)("input",{type:"url",id:"slack_webhook_url",name:"slack_webhook_url",value:se,onChange:function(e){return ce(e.target.value)},disabled:!ge||!ye,placeholder:"webhook.slack.com",style:{width:"100%",maxWidth:"600px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:"4px",fontSize:"13px",color:"#666"},children:"Enable your Slack Webhook URL to receive notifications."}),(0,l.jsx)("a",{href:"https://slack.advancedfilemanager.com?install_application=true&redirect_to=".concat(encodeURIComponent("".concat(window.location.origin,"/wp-admin/admin.php?page=file_manager_advanced_ui#/notifications/slack"))),target:"_blank",rel:"noopener noreferrer",style:{fontSize:"13px",color:"#3F6972",textDecoration:"underline"},children:"Click here to get your webhook URL"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Events Notification"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:Pe.map(function(e){return(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:ge&&ye?"pointer":"not-allowed",opacity:ge&&ye?1:.5,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",name:"slack_events[]",value:e.value,checked:me.includes(e.value),onChange:function(t){t.target.checked?he([].concat(s(me),[e.value])):he(me.filter(function(t){return t!==e.value}))},disabled:!ge||!ye,style:{marginRight:"10px",width:"18px",height:"18px",cursor:ge?"pointer":"not-allowed",accentColor:"#3F6972"}}),(0,l.jsx)("span",{style:{fontSize:"14px",color:"#0f172a"},children:e.label})]},e.value)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Slack Message"}),(0,l.jsxs)("div",{style:{maxWidth:"800px"},children:[(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)("div",{style:{padding:"12px",color:"#666"},children:"Loading editor..."}),children:(0,l.jsx)(y,{theme:"snow",value:ae,onChange:re,readOnly:!ge||!ye,modules:{toolbar:[["bold","italic","underline","strike"],[{color:[]},{background:[]},"clean"],[{header:[1,2,3,4,!1]}],[{list:"ordered"},{list:"bullet"}],["link","image"],[{script:"sub"},{script:"super"}],[{align:[]}]]},formats:["bold","italic","underline","strike","color","background","header","list","bullet","link","image","script","align"],style:{backgroundColor:"#fff"}})}),(0,l.jsx)("input",{type:"hidden",name:"slack_message",value:ae})]}),(0,l.jsxs)("p",{style:{marginTop:"8px",marginBottom:"12px",fontSize:"13px",color:"#666"},children:["Customize the message to be sent to Slack. You can use placeholders like ","{file_name}",", ","{action}",", etc."]}),(0,l.jsxs)("div",{style:{background:"#f8f9fa",padding:"15px",borderRadius:"4px",border:"1px solid #e5e5e5",marginTop:"12px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:600,color:"#0f172a"},children:"Available placeholders:"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:Re.map(function(e,t){return(0,l.jsxs)("div",{style:{fontSize:"13px",color:"#495057",lineHeight:"1.5"},children:[(0,l.jsx)("code",{style:{background:"#e9ecef",padding:"2px 6px",borderRadius:"3px",fontFamily:"monospace",fontSize:"12px",color:"#0f172a"},children:e.code}),(0,l.jsxs)("span",{style:{marginLeft:"8px"},children:["- ",e.desc]})]},t)})})]})]})]})]})}),Te&&(0,l.jsx)("p",{className:"submit",style:{marginTop:"20px",paddingTop:"0"},children:(0,l.jsx)("input",{type:"submit",name:"submit",id:"submit",className:"button button-primary afm-teal-button",value:N?"Saving...":"Save Changes",disabled:N||!ge})})]})]})})}},5688(e,t,n){function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function a(){var e,t;return function(e){if(!e||"string"!=typeof e)return e;try{var t=new URL(e,window.location.origin);return t.protocol=window.location.protocol,t.host=window.location.host,t.toString()}catch(t){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(t=window.afmReact)||void 0===t?void 0:t.jsonURL)||"/wp-json/")}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a(),o=n.endsWith("/")?n:"".concat(n,"/"),r=String(e||"").replace(/^\//,""),l=Object.entries(t).filter(function(e){var t=i(e,2)[1];return null!=t&&""!==t}).map(function(e){var t=i(e,2),n=t[0],o=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(o)))});if(o.includes("rest_route=")){var s="".concat(o.split("rest_route=")[0],"rest_route="),c="".concat(s,"/").concat(r);return l.length&&(c+="&".concat(l.join("&"))),c}var d="".concat(o).concat(r);return l.length&&(d+="?".concat(l.join("&"))),d}n.d(t,{_H:()=>r,lA:()=>a})},7850(e,t,n){n.d(t,{w:()=>o});var i={basic:{dropbox:!1,googledrive:!1,onedrive:!1,amazons3:!1,github:!1,googlecloud:!1,pcloud:!1,cloudflarer2:!1,wasabi:!1,digitalocean:!1,email_notification:!0,slack_notification:!1,filelogs:!0,adminer:!1,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!1,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!1,gutenberg_blocks:!0,code_editor_themes:!1,ai_integration:!1},professional:{dropbox:!1,googledrive:!1,onedrive:!1,amazons3:!1,github:!1,googlecloud:!1,pcloud:!1,cloudflarer2:!1,wasabi:!1,digitalocean:!1,email_notification:!0,slack_notification:!1,filelogs:!0,adminer:!0,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!1},business:{dropbox:!0,googledrive:!0,onedrive:!0,amazons3:!0,github:!0,googlecloud:!0,pcloud:!0,cloudflarer2:!0,wasabi:!0,digitalocean:!1,email_notification:!0,slack_notification:!0,filelogs:!0,adminer:!0,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!0}};function o(e,t,n){return!!n&&"free"!==t&&!!i[t]&&!0===i[t][e]}}}]);
//# sourceMappingURL=821.d01e4f3c.chunk.js.map