!function(){vare,t={373:function(e,t,n){"use strict";functionr(e){returnr="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},r(e)}functions(e,t,n){return(t=function(e){vart=function(e,t){if("object"!==r(e)||null===e)returne;varn=e[Symbol.toPrimitive];if(void0!==n){vars=n.call(e,"string");if("object"!==r(s))returns;thrownewTypeError("@@toPrimitive must return a primitive value.")}returnString(e)}(e);return"symbol"===r(t)?t:String(t)}(t))ine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functiona(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}functiono(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){varn=null==e?null:"undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){varr,s,a,o,i=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}elsefor(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,s=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throws}}returni}}(e,t)||function(e,t){if(e){if("string"==typeofe)returna(e,t);varn=Object.prototype.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)?a(e,t):void0}}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}vari=window.React,c=window.wp.i18n,l=window.wp.components,m=window.wp.element,d=window.wp.apiFetch,p=n.n(d),u=n(162),g=n.n(u);function_(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functionf(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}varh=function(){vare=o((0,m.useState)(!1),2),t=e[0],n=e[1],a=o((0,m.useState)(""),2),d=a[0],u=a[1],_=o((0,m.useState)(""),2),h=_[0],b=_[1],v=o((0,m.useState)(!1),2),y=v[0],E=v[1],w=o((0,m.useState)(!1),2),S=w[0],O=w[1],L=o((0,m.useState)(generateProDashboard.modules),2),x=L[0],C=L[1];if((0,m.useEffect)((function(){t||n(!0)})),!t)return(0,i.createElement)(l.Placeholder,{className:"generatepress-dashboard__placeholder"},(0,i.createElement)(l.Spinner,null));varN=function(e,t,n){u(t);varr=e.target.previousElementSibling.previousElementSibling;p()({path:"/generatepress-pro/v1/modules",method:"POST",data:{key:x[t].key,action:n}}).then((function(e){u(""),r.classList.add("generatepress-dashboard__section-item-message__show"),r.textContent=e.response,e.success&&e.response?(C((function(e){returnf(f({},e),{},s({},t,f(f({},e[t]),{},{isActive:"activate"===n})))})),setTimeout((function(){r.classList.remove("generatepress-dashboard__section-item-message__show")}),3e3)):r.classList.add("generatepress-dashboard__section-item-message__error")}))};return(0,i.createElement)(i.Fragment,null,!!x&&(0,i.createElement)("div",{className:"generatepress-dashboard__section"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-title"},(0,i.createElement)("h2",null,(0,c.__)("Modules","gp-premium"))),Object.keys(x).filter((function(e){return!(!x[e].isActive&&x[e].deprecated)})).map((function(e){return(0,i.createElement)("div",{className:"generatepress-dashboard__section-item",key:e,style:{boxShadow:x[e].isActive?"-5px 0 0 var(--wp-admin-theme-color)":"-5px 0 0 #ddd",pointerEvents:"WooCommerce"!==e||generateProDashboard.hasWooCommerce?