!function(){vare,t={520: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,_x,a,o=[],_n=!0,i=!1;try{if(_x=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;_n=!1}elsefor(;!(_n=(r=_x.call(n)).done)&&(o.push(r.value),o.length!==t);_n=!0);}catch(e){i=!0,s=e}finally{try{if(!_n&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(i)throws}}returno}}(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.wp.element,c=window.wp.i18n,l=window.wp.components,m=window.wp.apiFetch,d=n.n(m),p=n(162),u=n.n(p);functiong(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}function_(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}varf=function(){vare=o((0,i.useState)(!1),2),t=e[0],n=e[1],a=o((0,i.useState)(""),2),m=a[0],p=a[1],g=o((0,i.useState)(""),2),f=g[0],h=g[1],b=o((0,i.useState)(!1),2),v=b[0],y=b[1],E=o((0,i.useState)(!1),2),w=E[0],S=E[1],O=o((0,i.useState)(generateProDashboard.modules),2),L=O[0],x=O[1];if((0,i.useEffect)((function(){t||n(!0)})),!t)return(0,i.createElement)(l.Placeholder,{className:"generatepress-dashboard__placeholder"},(0,i.createElement)(l.Spinner,null));varC=function(e,t,n){p(t);varr=e.target.previousElementSibling.previousElementSibling;d()({path:"/generatepress-pro/v1/modules",method:"POST",data:{key:L[t].key,action:n}}).then((function(e){p(""),r.classList.add("generatepress-dashboard__section-item-message__show"),r.textContent=e.response,e.success&&e.response?(x((function(e){return_(_({},e),{},s({},t,_(_({},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,!!L&&(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(L).filter((function(e){return!(!L[e].isActive&&L[e].deprecated)})).map((function(e){return(0,i.createElement)("div",{className:"generatepress-dashboard__section-item",key:e,style:{boxShadow:L[e].isActive?"-5px 0 0 var(--wp-admin-theme-color)":"-5px 0 0 #ddd",pointerEvents:"WooCommerce"!==e||generateProDashboard.hasWooCommerce?null:"n