wp-productzilla/wp-content/plugins/blocksy-companion/static/bundle/dashboard.js
rizal.productzilla e38e8b231d templating
2024-04-01 16:08:46 +07:00

11 lines
118 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(){var e={184:function(e,t){var n;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===a)for(var i in n)r.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},162:function(e,t,n){var r,o,a;o=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,i=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=c.URL||c.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):o(l.href)?r(e,t,n):a(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,c),n);else if(o(e))r(e,n,c);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,o):r)||(e.exports=a)},172:function(e,t,n){var r,o,a=n(760),c=n(529),i=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=c({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(u.active)return;w(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return p(),m},deactivate:f,pause:function(){if(u.paused||!u.active)return;u.paused=!0,d()},unpause:function(){if(!u.paused||!u.active)return;u.paused=!1,w(),p()}};return m;function f(e){if(u.active){clearTimeout(r),d(),u.active=!1,u.paused=!1,i.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;E((e=u.nodeFocusedBeforeActivation,b("setReturnFocus")||e))})),m}}function p(){if(u.active)return i.activateTrap(m),r=l((function(){E(y())})),n.addEventListener("focusin",g,!0),n.addEventListener("mousedown",h,{capture:!0,passive:!1}),n.addEventListener("touchstart",h,{capture:!0,passive:!1}),n.addEventListener("click",_,{capture:!0,passive:!1}),n.addEventListener("keydown",v,{capture:!0,passive:!1}),m}function d(){if(u.active)return n.removeEventListener("focusin",g,!0),n.removeEventListener("mousedown",h,!0),n.removeEventListener("touchstart",h,!0),n.removeEventListener("click",_,!0),n.removeEventListener("keydown",v,!0),m}function b(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function y(){var e;if(!(e=null!==b("initialFocus")?b("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||b("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function h(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!a.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function g(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||y()))}function v(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(w(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void E(u.lastTabbableNode);if(!e.shiftKey&&e.target===u.lastTabbableNode)e.preventDefault(),E(u.firstTabbableNode)}(e)}function _(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function w(){var e=a(o);u.firstTabbableNode=e[0]||y(),u.lastTabbableNode=e[e.length-1]||y()}function E(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):E(y()))}}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var o,c,i,u=[],m=[],f=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(f=Array.prototype.slice.apply(f)).unshift(e),o=0;o<f.length;o++)a(c=f[o])&&(0===(i=l(c))?u.push(c):m.push({documentOrder:o,tabIndex:i,node:c}));return m.sort(s).map((function(e){return e.node})).concat(u)}function a(e){return!(!c(e)||function(e){return function(e){return u(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'),n=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(t);return!n||n===e}(e)}(e)||l(e)<0)}function c(e){return!(e.disabled||function(e){return u(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,i)&&c(e)};var i=t.concat("iframe").join(",");function l(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function u(e){return"INPUT"===e.tagName}e.exports=o},529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e};var t=Object.prototype.hasOwnProperty},137:function(e,t){var n;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=c(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=c(t,n));return t}function c(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.ctEvents,r=n.n(t),o=window.wp.i18n,a=window.blocksyOptions;function c(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var i=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_flush_permalinks&nonce=").concat(ctDashboardLocalizations.dashboard_actions_nonce),{method:"POST"});case 2:if(200===(t=e.sent).status){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t.json();case 7:if(e.sent.success){e.next=11;break}return e.abrupt("return");case 11:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){c(a,r,o,i,l,"next",e)}function l(e){c(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(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){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=null,b=function(){var t=f((0,e.useState)(!d),2),n=t[0],o=t[1],a=f((0,e.useState)(d||[]),2),c=a[0],l=a[1],u=f((0,e.useState)({controller:null}),2),p=u[0].controller,b=u[1],y=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,a,c,u,m,f,y=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s({verbose:!1,extension:null,extAction:null},y.length>0&&void 0!==y[0]?y[0]:{}),n=t.verbose,r=t.extension,a=t.extAction,n&&o(!0),p&&p.abort(),"AbortController"in window&&(p=new AbortController,b({controller:p})),e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status&nonce=").concat(ctDashboardLocalizations.dashboard_actions_nonce),s({method:"POST",signal:p.signal},r&&a?{body:JSON.stringify({extension:r,extAction:a})}:{}));case 7:if(200===(c=e.sent).status){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,c.json();case 12:if(u=e.sent,m=u.success,f=u.data,m){e.next=17;break}return e.abrupt("return");case 17:if(null!=a&&a.require_refresh&&i(),o(!1),l(f),d=f,!r){e.next=23;break}return e.abrupt("return",f[r]);case 23:return e.abrupt("return",f);case 24:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){m(a,r,o,c,i,"next",e)}function i(e){m(a,r,o,c,i,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.useEffect)((function(){d||y({verbose:!0});var e=function(){y()};return r().on("blocksy_exts_sync_exts",e),function(){r().off("blocksy_exts_sync_exts",e)}}),[]),{syncExts:y,isLoading:n,exts_status:c,setExtsStatus:function(e){var t=e(c);d=t,l(e)}}},y=function(t){var n=t.navigate,r=b().exts_status;return(0,e.useEffect)((function(){Object.keys(r).length>0&&n("/extensions/".concat(Object.keys(r)[0]))}),[r]),(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(a.Transition,{items:!0,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(a.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,e.createElement)("g",{transform:"translate(50,50)"},(0,e.createElement)("g",{transform:"scale(1)"},(0,e.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,e.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,e.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,o.__)("Loading Extensions Status...","blocksy-companion"))}:null})))},h=n(184),g=n.n(h);function v(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(t){var n=t.navigate,r=t.currentExtension,a=t.exts_status,c=(0,e.useMemo)((function(){return Object.values(a).map((function(e,t){return E(E({},e),{},{name:Object.keys(a)[t]})})).find((function(e){return e.config.pro}))}),[a]),i=(0,e.useMemo)((function(){return Object.values(a).map((function(e,t){return E(E({},e),{},{name:Object.keys(a)[t]})})).filter((function(e){return!e.config.pro}))}),[a]),l=(0,e.useMemo)((function(){return Object.values(a).map((function(e,t){return E(E({},e),{},{name:Object.keys(a)[t]})})).filter((function(e){return e.config.pro})).filter((function(e){return"white-label"!==e.name||!e.data||!e.data.locked}))}),[a]);return(0,e.createElement)("div",{className:"ct-extensions-menu"},[{label:(0,o.__)("Free Extensions","blocksy-companion"),exts:i,order:[]}].concat(v(c?[{label:(0,o.__)("Pro Extensions","blocksy-companion"),exts:l,order:["woocommerce-extra","post-types-extra","local-google-fonts","custom-fonts","adobe-typekit"]}]:[])).map((function(t){var a=t.label,c=t.exts,i=t.order,l=[].concat(v(i.map((function(e){return c.find((function(t){return t.name===e}))}))),v(c.filter((function(e){var t=e.name;return!i.includes(t)})).sort((function(e,t){return e.config.name.localeCompare(t.config.name)})))).filter((function(e){return!!e}));return(0,e.createElement)(e.Fragment,{key:a},(0,e.createElement)("h4",null,a),(0,e.createElement)("ul",null,l.map((function(t){var a=t.name,c=t.config,i=(t.status,t.__object);return(0,e.createElement)("li",{key:a,className:g()({selected:r&&r.name===a,active:!!i}),onClick:function(){n("/extensions/".concat(a),{state:{hasNoChange:!0}})}},c.name,(0,e.createElement)("span",{"data-tooltip":"top"},(0,e.createElement)("i",{className:"ct-tooltip"},(0,o.__)("Active","blocksy-companion"))))}))))})))},x=(window.ctDashboardLocalizations||{}).DashboardContext,S=((x||{}).Provider,(x||{}).Consumer,x),j=window.React,C=n.n(j);n(697);function P(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var A=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},D=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=r=P(this,e.call.apply(e,[this].concat(a))),M.call(r),P(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:A(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:A(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:A(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:A(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:A(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(C().Component);D.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var M=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},z=D,N=function(t){var n=t.children,r=t.container,o=void 0===r?document.body:r,a=t.type,c=void 0===a?"reach-portal":a;return(0,e.createElement)(z,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(c),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(t){var r=t.refs.node;return r?(0,e.createPortal)(n,r):null}})};var L=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},T=n(172),B=n.n(T);function I(){return I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var R=function(){},V=function(){},H=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=B()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},U=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},G=React.createContext(),q=React.forwardRef((function(t,n){var r=t.container,o=t.isOpen,a=void 0===o||o,c=t.onDismiss,i=void 0===c?R:c,l=t.initialFocusRef,s=t.onClick,u=t.onKeyDown,m=F(t,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return(0,e.createElement)(z,{didMount:V},a?(0,e.createElement)(N,{container:r,"data-reach-dialog-wrapper":!0},(0,e.createElement)(z,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;H(t,l)},willUnmount:U},(function(t){var r=t.refs;return(0,e.createElement)(G.Provider,{value:function(e){return r.contentNode=e}},(0,e.createElement)("div",I({"data-reach-dialog-overlay":!0,onClick:L(s,(function(e){e.stopPropagation(),i()})),onKeyDown:L(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){r.overlayNode=e,n&&n(e)}},m)))}))):null)}));q.propTypes={initialFocusRef:function(){}};var W=function(e){return e.stopPropagation()},Z=React.forwardRef((function(t,n){var r=t.onClick,o=(t.onKeyDown,F(t,["onClick","onKeyDown"]));return(0,e.createElement)(G.Consumer,null,(function(t){return(0,e.createElement)("div",I({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:L(r,W),ref:function(e){t(e),n&&n(e)}},o))}))})),$=function(e){return!!e},K=function(t){var n=t.items,r=t.isVisible,o=void 0===r?$:r,c=t.render,i=t.className,l=t.onDismiss;return(0,e.createElement)(a.Transition,{items:n,onStart:function(){return document.body.classList[o(n)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(t){return o(t)&&function(n){return(0,e.createElement)(q,{style:{opacity:n.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return l()}},(0,e.createElement)(Z,{className:g()("ct-admin-modal",i),style:{transform:"translate3d(0px, ".concat(n.y,"px, 0px)")}},(0,e.createElement)("button",{className:"close-button",onClick:function(){return l()}},"×"),c(t,n)))}}))};function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(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 Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(0,o.__)("Free","blocksy-companion"),(0,o.__)("Personal","blocksy-companion"),(0,o.__)("Professional","blocksy-companion"),(0,o.__)("Agency","blocksy-companion"),(0,o.__)("Personal","blocksy-companion"),(0,o.__)("Professional","blocksy-companion"),(0,o.__)("Agency","blocksy-companion");var X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(t.currentPlan,t.requiredPlan),r=void 0===n?"personal":n,a=t.personal,c=void 0===a?{title:(0,o.__)("This is a Pro feature","blocksy-companion"),description:(0,o.__)("Upgrade to any pro plan and get instant access to this and many other feature.","blocksy-companion")}:a,i=t.professional,l=void 0===i?{description:(0,o.__)("Upgrade to the professional or agency plan and get instant access to this and many other features.","blocksy-companion")}:i,s=t.agency,u=void 0===s?{description:(0,o.__)("Upgrade to the agency plan and get instant access to this and many other features.","blocksy-companion")}:s,m=J((0,e.useState)(!1),2),f=m[0],p=m[1];return{showNotice:function(e){p(e||!0)},content:(0,e.createElement)(K,{items:f,className:"ct-onboarding-modal",onDismiss:function(){return p(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,e.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,e.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),(0,e.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),(0,e.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),"personal"===r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"ct-modal-title"},c.title),(0,e.createElement)("p",null,c.description)),"professional"===r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Required plan"),(0,e.createElement)("h2",{className:"ct-modal-title"},(0,o.__)("Professional or Agency","blocksy-companion")),(0,e.createElement)("p",null,l.description)),"agency"===r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Required plan"),(0,e.createElement)("h2",{className:"ct-modal-title"},(0,o.__)("Agency","blocksy-companion")),(0,e.createElement)("p",null,u.description)),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/#comparison-free-vs-pro",target:"_blank",className:"button"},(0,o.__)("Compare Plans","blocksy-companion")),(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,o.__)("Upgrade Now","blocksy-companion"))))}})}};function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}(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 ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=ne({strategy:"pro-ext",modalTitle:(0,o.__)("This is a Pro extension","blocksy-companion")},n);var r=Q((0,e.useState)(!1),2),a=(r[0],r[1],ctDashboardLocalizations.plugin_data.is_pro),c=((0,e.useContext)(S).history,!a&&t.config.pro),i=ctDashboardLocalizations.plugin_data.current_plan,l="personal";t.config.plans&&(t.config.plans.includes("agency_v2")&&(l="agency"),t.config.plans.includes("professional_v2")&&(l="professional"));var s=X(ne({currentPlan:i,requiredPlan:l},n)),u=s.content,m=s.showNotice;return{isPro:a,isProInFree:!a&&t.config.pro||t.config.plans&&t.config.plans.length&&!t.config.plans.includes(i),showNotice:m,content:"pro-ext"===n.strategy&&c||"pro"===n.strategy&&!a||t.config.plans&&t.config.plans.length&&!t.config.plans.includes(i)?u:null}};function ae(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(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 ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var le=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=ce((0,e.useState)(!1),2),o=r[0],a=r[1],c=oe(t),l=c.isProInFree,s=c.showNotice,u=c.content,m=function(){var e,r=(e=regeneratorRuntime.mark((function e(){var r,o,c,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>0&&void 0!==u[0]?u[0]:function(){},o=!(u.length>1&&void 0!==u[1])||u[1],!l){e.next=8;break}if(!o||!t.config.features){e.next=6;break}return r(),e.abrupt("return");case 6:return s(),e.abrupt("return");case 8:if(r(),!o){e.next=25;break}return(c=new FormData).append("ext",t.name),c.append("action",t.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),c.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),a(!0),e.prev=15,e.next=18,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:c});case 18:t.config.require_refresh&&i(),n(),e.next=24;break;case 22:e.prev=22,e.t0=e.catch(15);case 24:a(!1);case 25:case"end":return e.stop()}}),e,null,[[15,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){ae(a,r,o,c,i,"next",e)}function i(e){ae(a,r,o,c,i,"throw",e)}c(void 0)}))});return function(){return r.apply(this,arguments)}}();return[o,m,u]},se=window.wp.hooks;function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||be(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 de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||be(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 be(e,t){if(e){if("string"==typeof e)return ye(e,t);var n=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)?ye(e,t):void 0}}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var he=function(t){var n=t.navigate,r=t.currentExtension,a=t.onExtsSync,c=t.setExtsStatus,i=de((0,e.useState)(!1),2),l=i[0],s=i[1],u=de(le(r),3),m=(u[0],u[1]),f=u[2],p={content:null,showExtension:!0,activationStrategy:"default"},d=r?(0,se.applyFilters)("blocksy.extensions.current_extension_content",p,{extension:r,onExtsSync:a,setExtsStatus:c,navigate:n}):p,b=!!r&&r.__object;"from-custom-content"===d.activationStrategy&&(b=l);var y=[].concat(pe(r&&r.config.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section?[(0,e.createElement)("a",{target:"_blank",href:r.config.documentation},(0,e.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M22.9,1.1h-6.5C14.6,1.1,13,2,12,3.3C11,2,9.4,1.1,7.6,1.1H1.1C0.5,1.1,0,1.6,0,2.2v16.4c0,0.6,0.5,1.1,1.1,1.1h7.6c1.2,0,2.2,1,2.2,2.2c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1c0-1.2,1-2.2,2.2-2.2h7.6c0.6,0,1.1-0.5,1.1-1.1V2.2C24,1.6,23.5,1.1,22.9,1.1z M10.9,18c-0.6-0.4-1.4-0.6-2.2-0.6H2.2V3.3h5.5c1.8,0,3.3,1.5,3.3,3.3V18z M21.8,17.5h-6.5c-0.8,0-1.5,0.2-2.2,0.6V6.5c0-1.8,1.5-3.3,3.3-3.3h5.5V17.5z"})),(0,o.__)("Documentation","blocksy-companion"))]:[]),pe(r&&r.config.video&&!ctDashboardLocalizations.plugin_data.hide_video_section?[(0,e.createElement)("a",{target:"_blank",href:r.config.video},(0,e.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M12,0C5.4,0,0,5.4,0,12s5.4,12,12,12s12-5.4,12-12S18.6,0,12,0z M12,21.8c-5.4,0-9.8-4.4-9.8-9.8c0-5.4,4.4-9.8,9.8-9.8c5.4,0,9.8,4.4,9.8,9.8C21.8,17.4,17.4,21.8,12,21.8z M16.1,11.3c0.2,0.2,0.4,0.4,0.4,0.7c0,0.3-0.1,0.6-0.4,0.7L11,16.1c-0.1,0.1-0.3,0.1-0.5,0.1c-0.1,0-0.3,0-0.4-0.1c-0.3-0.1-0.5-0.4-0.5-0.8V8.6c0-0.3,0.2-0.6,0.5-0.8c0.3-0.1,0.6-0.1,0.9,0L16.1,11.3z"})),(0,o.__)("Video Tutorial","blocksy-companion"))]:[]),pe(r&&r.config.customize&&b?[(0,e.createElement)("a",{href:r.config.customize,target:"_blank",className:"ct-button"},(0,e.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M4 11c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v7c0 .6.4 1 1 1zM12 11c-.6 0-1 .4-1 1v9c0 .6.4 1 1 1s1-.4 1-1v-9c0-.6-.4-1-1-1zM20 13c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v9c0 .6.4 1 1 1zM7 13H1c-.6 0-1 .4-1 1s.4 1 1 1h2v6c0 .6.4 1 1 1s1-.4 1-1v-6h2c.6 0 1-.4 1-1s-.4-1-1-1zM15 7h-2V3c0-.6-.4-1-1-1s-1 .4-1 1v4H9c-.6 0-1 .4-1 1s.4 1 1 1h6c.6 0 1-.4 1-1s-.4-1-1-1zM23 15h-6c-.6 0-1 .4-1 1s.4 1 1 1h2v4c0 .6.4 1 1 1s1-.4 1-1v-4h2c.6 0 1-.4 1-1s-.4-1-1-1z"})),(0,o.__)("Customize","blocksy-companion"))]:[]));return(0,e.useEffect)((function(){r&&d.showExtension||n("/extensions")}),[]),r?(0,e.createElement)("div",{className:"ct-extension-container"},(0,e.createElement)("div",{className:"ct-extension-info"},(0,e.createElement)("h4",null,(0,e.createElement)("span",{className:"ct-extension-icon",dangerouslySetInnerHTML:{__html:r&&r.config.icon||'<svg width="16" height="16" viewBox="0 0 24 24">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\tfillRule="evenodd"\n\t\t\t\t\t\t\t\td="M22.3,10.7H24V7.6l-1.5-6.2h-21L0,7.6v3.1h1.7v11.7h20.7V10.7z M20.3,10.7H3.7v9.7h5.7v-7h5.3v7h5.7V10.7zM13,3.4h2.8l0.6,4.3l0,1H13V3.4z M8.2,3.4H11v5.3H7.6l0-1L8.2,3.4z M18.4,7.5l-0.6-4.1h3.1L22,7.8v0.9h-3.6L18.4,7.5z M6.2,3.4H3.1L2,7.8v0.9h3.6l0-1.2L6.2,3.4z"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>'}}),r&&r.config.name,r&&(!r.config.requirement||r.config.requirement&&r.config.requirement.check)&&(0,e.createElement)("div",{className:g()("ct-option-switch",{"ct-active":b}),onClick:function(){"from-custom-content"!==d.activationStrategy?m((function(){c((function(e){return me(me({},e),{},fe({},r.name,me(me({},e[r.name]),{},{__object:e[r.name].__object?null:{}})))}))})):s(!l)}},(0,e.createElement)("span",null))),r&&r.config.description&&(0,e.createElement)("p",null,r.config.description),y.length>0&&(0,e.createElement)("div",{className:"ct-extension-actions"},y.map((function(t,n){return(0,e.createElement)(e.Fragment,{key:n},t)})))),b&&r.config.features&&(!r.config.requirement||r.config.requirement&&r.config.requirement.check)&&(0,e.createElement)("div",{className:"ct-extension-modules"},r.config.features.map((function(t){return(0,e.createElement)("div",{className:"ct-extension-module",key:t.id},(0,e.createElement)("h5",null,t.title,(0,e.createElement)("div",{className:g()("ct-option-switch",{"ct-active":r.data&&r.data.settings.features[t.id]}),onClick:function(){m((function(){a({extAction:{type:"update-features",require_refresh:!(null==t||!t.require_refresh),settings:{features:me(me({},r.data.settings.features),{},fe({},t.id,!r.data.settings.features[t.id]))}}}),c((function(e){return me(me({},e),{},fe({},r.name,me(me({},e[r.name]),{},{data:me(me({},e[r.name].data),{},{settings:me(me({},e[r.name].data.settings),{},{features:me(me({},e[r.name].data.settings.features),{},fe({},t.id,!e[r.name].data.settings.features[t.id]))})})})))}))}),!1)}},(0,e.createElement)("span",null))),(0,e.createElement)("p",null,t.description),t.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section||(t.customize||t.manage)&&r.data&&r.data.settings.features[t.id]?(0,e.createElement)("div",{className:"ct-extension-module-actions"},t.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section&&(0,e.createElement)("a",{href:t.documentation,target:"_blank"},(0,e.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M23 2.1h-6.6c-1.8 0-3.4.9-4.4 2.3C11 3 9.4 2.1 7.6 2.1H1c-.6 0-1 .4-1 1v16.5c0 .6.4 1 1 1h7.7c1.3 0 2.3 1 2.3 2.3 0 .6.4 1 1 1s1-.4 1-1c0-1.3 1-2.3 2.3-2.3H23c.6 0 1-.4 1-1V3.1c0-.6-.4-1-1-1zM11 19.3c-.7-.4-1.5-.7-2.3-.7H2V4.1h5.6c1.9 0 3.4 1.5 3.4 3.4v11.8zm11-.7h-6.7c-.8 0-1.6.2-2.3.7V7.5c0-1.9 1.5-3.4 3.4-3.4H22v14.5z"})),(0,o.__)("Documentation","blocksy-companion")),(t.customize||t.manage)&&r.data&&r.data.settings.features[t.id]&&(0,e.createElement)("a",{href:t.customize||t.manage,target:"_blank"},(0,e.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M4 11c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v7c0 .6.4 1 1 1zM12 11c-.6 0-1 .4-1 1v9c0 .6.4 1 1 1s1-.4 1-1v-9c0-.6-.4-1-1-1zM20 13c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v9c0 .6.4 1 1 1zM7 13H1c-.6 0-1 .4-1 1s.4 1 1 1h2v6c0 .6.4 1 1 1s1-.4 1-1v-6h2c.6 0 1-.4 1-1s-.4-1-1-1zM15 7h-2V3c0-.6-.4-1-1-1s-1 .4-1 1v4H9c-.6 0-1 .4-1 1s.4 1 1 1h6c.6 0 1-.4 1-1s-.4-1-1-1zM23 15h-6c-.6 0-1 .4-1 1s.4 1 1 1h2v4c0 .6.4 1 1 1s1-.4 1-1v-4h2c.6 0 1-.4 1-1s-.4-1-1-1z"})),t.customize?(0,o.__)("Customize","blocksy-companion"):(0,o.__)("Manage","blocksy-companion"))):null)}))),r&&r.config.requirement&&!r.config.requirement.check&&r.config.requirement.message&&(0,e.createElement)("div",{className:"ct-extension-options ct-newsletter-subscribe-options"},(0,e.createElement)("div",{className:"ct-extension-requirement"},(0,e.createElement)("span",null,(0,e.createElement)("svg",{width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12,23.6c-1.4,0-2.6-1-2.8-2.3L8.9,20h6.2l-0.3,1.3C14.6,22.6,13.4,23.6,12,23.6z M24,17.8H0l3.1-2c0.5-0.3,0.9-0.7,1.1-1.3c0.5-1,0.5-2.2,0.5-3.2V7.6c0-4.1,3.2-7.3,7.3-7.3s7.3,3.2,7.3,7.3v3.6c0,1.1,0.1,2.3,0.5,3.2c0.3,0.5,0.6,1,1.1,1.3L24,17.8zM6.1,15.6h11.8c0,0-0.1-0.1-0.1-0.2c-0.7-1.3-0.7-2.9-0.7-4.2V7.6c0-2.8-2.2-5.1-5.1-5.1c-2.8,0-5.1,2.2-5.1,5.1v3.6c0,1.3-0.1,2.9-0.7,4.2C6.1,15.5,6.1,15.6,6.1,15.6z"}))),r.config.requirement.message)),b&&d.content,f):null},ge=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:(0,e.createElement)("div",{className:"ct-support-container"},(0,e.createElement)("h2",null,(0,o.__)("Need help or advice?","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-support-buttons"},(0,e.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Submit a Support Ticket","blocksy-companion")),(0,e.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},(0,o.__)("Join Facebook Community","blocksy-companion"))))};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ee=function(t){(0,e.useContext)(S).history;var n=t.navigate,r=b(),c=r.exts_status,i=r.syncExts,l=r.isLoading,s=r.setExtsStatus,u=null;return c[t.extension]&&(u=_e(_e({},c[t.extension]),{},{name:t.extension})),(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(a.Transition,{items:l,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(a.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,e.createElement)("g",{transform:"translate(50,50)"},(0,e.createElement)("g",{transform:"scale(1)"},(0,e.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,e.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,e.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,o.__)("Loading Extensions Status...","blocksy-companion"))}:function(t){return(0,e.createElement)(a.animated.div,{style:t},(0,e.createElement)("section",{className:"ct-extensions-list"},(0,e.createElement)(O,{currentExtension:u,exts_status:c,navigate:n}),(0,e.createElement)(he,{navigate:n,currentExtension:u,setExtsStatus:s,onExtsSync:function(){return i(_e(_e({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{extension:u.name}))}})),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ge,null)))}})))};function ke(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(e,t)}(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 Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xe=function(t){var n=t.children,r=t.activated,o=t.checked,a=t.onChange,c=t.className,i=t.position,l=void 0===i?"end":i,s=[].concat(ke("start"===l?[n]:[]),[(0,e.createElement)("span",{className:g()("ct-checkbox",{active:o}),key:"icon"},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "})))],ke("end"===l?[n]:[]));return(0,e.createElement)("div",{onClick:function(){return a()},className:g()("ct-checkbox-container",c,{activated:r})},s)};function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ae(e,t)}(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 Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var De=function(e){return({gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},Me=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=t.style,c=(0,e.useContext)(en),i=c.currentDemo,l=c.demos_list,s=c.pluginsStatus,u=(c.setCurrentDemo,Pe((i||"").split(":"),2)),m=u[0];u[1],l.filter((function(e){return e.name===m||""}));return(0,e.createElement)("div",{style:a},(0,e.createElement)("div",{className:"ct-demo-plugins"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),(0,e.createElement)("h2",null,(0,o.__)("Install & Activate Plugins","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},n.plugins.map((function(t){var o=t.plugin,a=t.enabled;return(0,e.createElement)(e.Fragment,{key:o},!s[o]&&(0,e.createElement)(xe,{key:o,checked:a,onChange:function(){return r(je(je({},n),{},{plugins:n.plugins.map((function(e){return e.plugin===o?je(je({},e),{},{enabled:!a}):e}))}))}},De(o)),s[o]&&(0,e.createElement)(xe,{activated:!0,checked:!0,onChange:function(){}},De(o)))})))))};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"conjunction";return new Intl.ListFormat("en-GB",{style:"long",type:t}).format(e)},Be=function(t){var n=t.demo,r=(0,e.useContext)(en),a=r.currentlyInstalledDemo,c=r.demos_list,i=r.setCurrentDemo,l=r.demo_error,s=r.setInstallerBlockingReleased,u=oe({config:Ne({pro:!!n.is_pro},n.plans?{plans:n.plans}:{})},{strategy:"pro",personal:{title:(0,o.__)("This is a Pro starter site","blocksy-companion"),description:(0,o.__)("Upgrade to any pro plan and get instant access to this starter site and many other features.","blocksy-companion")},professional:{description:(0,o.__)("Upgrade to the professional or agency plan and get instant access to this starter site and many other features.","blocksy-companion")},agency:{description:(0,o.__)("Upgrade to the agency plan and get instant access to this starter site and many other features.","blocksy-companion")}}),m=u.isProInFree,f=u.showNotice,p=u.content;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("li",{className:g()("ct-single-demo",{"ct-is-pro":n.is_pro})},(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:n.screenshot}),(0,e.createElement)("section",null,n.is_pro&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,o.__)("Required plan","blocksy-companion")),(0,e.createElement)("span",{className:"ct-required-plans"},Te((n.plans?n.plans:["personal_v2","professional_v2","agency_v2"]).filter((function(e){return e.indexOf("v2")>-1})).map((function(e){return{personal_v2:(0,o.__)("Personal","blocksy-companion"),professional_v2:(0,o.__)("Professional","blocksy-companion"),agency_v2:(0,o.__)("Agency","blocksy-companion")}[e]})),"disjunction"))),(0,e.createElement)("h3",null,(0,o.__)("Available for","blocksy-companion")),(0,e.createElement)("span",{className:"ct-available-builders"},Te(c.filter((function(e){return e.name===n.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return De(t)||"Gutenberg"}))))),n.is_pro&&(0,e.createElement)("span",{className:"ct-pro-badge"},"PRO")),(0,e.createElement)("div",{className:"ct-demo-actions"},(0,e.createElement)("h4",null,n.name),(0,e.createElement)("div",null,(0,e.createElement)("a",{className:"ct-button",target:"_blank",href:n.url},(0,o.__)("Preview","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(){m?f():(s(!1),i(n.name))},disabled:!!l},a&&a.demo.indexOf(n.name)>-1?(0,o.__)("Modify","blocksy-companion"):(0,o.__)("Import","blocksy-companion"))))),p)},Ie=function(){var t=(0,e.useContext)(en).demos_list;return(0,e.createElement)("ul",null,t.filter((function(e,n){return t.map((function(e){return e.name})).indexOf(e.name)===n})).map((function(t){return(0,e.createElement)(Be,{key:t.name,demo:t})})))};function Fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Re(e,t)}(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 Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ve=function(t){var n=t.style,r=t.nextStep,a=((0,e.useContext)(S).is_child_theme,(0,e.useContext)(en)),c=a.setCurrentlyInstalledDemo,i=a.setCurrentDemo,l=a.currentDemo,s=a.demos_list,u=Fe((0,e.useState)(0),2),m=u[0],f=u[1],p=Fe((0,e.useState)("idle"),2),d=p[0],b=p[1],y=Fe((l||"").split(":"),2),h=y[0],g=(y[1],s.filter((function(e){return e.name===h}))),v={erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:(0,o.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(g[0].plugins.join(":"))},deregister_current_demo:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},_=["erase_content","deactivate_demo_plugins","deregister_current_demo"],w=_[m],E=function(){var e=v[w],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string,"&nonce=").concat(ctDashboardLocalizations.dashboard_actions_nonce));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===_.length-1)return void b("done");f(Math.min(_.length-1,m+1))}}};return(0,e.useEffect)((function(){0!==m&&"done"!==d&&E()}),[w]),(0,e.createElement)("div",{className:"ct-modify-demo",style:n},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),(0,e.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===d&&(0,e.createElement)("h2",null,(0,o.__)("This starter site is already installed","blocksy-companion")),"loading"===d&&(0,e.createElement)("h2",null,"Removing starter site..."),"done"===d&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",null,(0,o.__)("Starter Site Removed","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(h,":hide"))}},(0,o.__)("Dismiss","blocksy-companion")))),"idle"===d&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,o.__)("What steps do you want to perform next?","blocksy-companion")),(0,e.createElement)("div",{className:"ct-modify-actions"},(0,e.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){b("loading"),e.preventDefault(),E(),c()}},(0,o.__)("Remove","blocksy-companion")),(0,e.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),r()}},(0,o.__)("Reinstall","blocksy-companion")))))};function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){Ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=t.style,c=(0,e.useContext)(S),i=c.is_child_theme,l=c.child_theme_exists;return(0,e.createElement)("div",{className:"ct-demo-child",style:a},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),(0,e.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),(0,e.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),(0,e.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?(0,e.createElement)("h2",null,(0,o.__)("Activate Child Theme","blocksy-companion")):(0,e.createElement)("h2",null,(0,o.__)("Install Child Theme","blocksy-companion")),!i&&(0,e.createElement)(e.Fragment,null,l?(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):(0,e.createElement)("p",null,(0,o.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-checkboxes-container","data-type":"bordered:reversed"},(0,e.createElement)(xe,{checked:n.child_theme,position:"end",onChange:function(){return r(Ue(Ue({},n),{},{child_theme:!n.child_theme}))}},l?(0,o.__)("Activate Child Theme","blocksy-companion"):(0,o.__)("Install Child Theme","blocksy-companion")))),i&&(0,o.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),(0,e.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},(0,o.__)("Learn more about child themes","blocksy-companion")))};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Je(e,t)}(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 Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ye=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=t.style,c=(0,e.useContext)(en),i=c.currentDemo,l=c.demos_list,s=(c.pluginsStatus,c.setCurrentDemo,Ke((i||"").split(":"),2)),u=s[0],m=(s[1],l.filter((function(e){return e.name===u||""})));return(0,e.createElement)("div",{style:a},m.length>1&&(0,e.createElement)("div",{className:"ct-demo-builder"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,e.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),(0,e.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,e.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),(0,e.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),(0,e.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),(0,e.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),(0,e.createElement)("h2",null,(0,o.__)("Choose Page Builder","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This starter site can be imported and used with one of these page builders. Please select one in order to continue.","blocksy-companion")),(0,e.createElement)("ul",{"data-count":m.length},m.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(t){var o=t.builder,a=t.plugins;return(0,e.createElement)("li",{className:g()({active:o===(null===n.builder?m[0].builder:n.builder)}),onClick:function(){r(Ze(Ze({},n),{},{builder:o,plugins:a.map((function(e){return{plugin:e,enabled:!0}}))}))}},(0,e.createElement)("figure",null,(0,e.createElement)("span",{className:g()("ct-checkbox",{active:o===(null===n.builder?m[0].builder:n.builder)})},(0,e.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,e.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===o&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===o&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),(0,e.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===o&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,e.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,e.createElement)("div",{className:"builder-name"},De(o)||"Gutenberg"))})))))};function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tt=function(t){var n=t.demoConfiguration,r=t.setDemoConfiguration,a=(t.currentDemo,t.style);return(0,e.createElement)("div",{style:a},(0,e.createElement)("div",{className:"ct-demo-content"},(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,e.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),(0,e.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),(0,e.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),(0,e.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),(0,e.createElement)("h2",null,(0,o.__)("Import Content","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},["options","widgets","content"].map((function(t){return(0,e.createElement)(xe,{checked:n.content[t],onChange:function(){return r(Qe(Qe({},n),{},{content:Qe(Qe({},n.content),{},et({},t,!n.content[t]))}))},key:t},t.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),(0,e.createElement)(xe,{checked:n.content.erase_content,className:"ct-demo-erase",onChange:function(){return r(Qe(Qe({},n),{},{content:Qe(Qe({},n.content),{},{erase_content:!n.content.erase_content})}))}},(0,e.createElement)("div",null,(0,o.__)("Clean Install","blocksy-companion"),(0,e.createElement)("i",null,(0,o.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion")))))))},nt=function(){var t=(0,e.useContext)(S),n=t.home_url,r=t.customizer_url;return(0,e.createElement)("div",{className:"ct-install-success"},(0,e.createElement)("h2",null,(0,o.__)("Starter Site Imported Successfully","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,e.createElement)("div",null,(0,e.createElement)("a",{href:r,className:"ct-button"},(0,o.__)("Customize","blocksy-companion")),(0,e.createElement)("a",{href:n,target:"_blank",className:"ct-button-primary"},(0,o.__)("View site","blocksy-companion"))))};function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){at(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(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 it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lt=function(e){e.preventDefault(),e.returnValue=""},st=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,a=[];return void 0!==o&&o&&a.push("register_current_demo"),t.child_theme&&(r||a.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&a.push("plugins"),t.content.erase_content&&a.push("erase_content"),t.content.options&&a.push("options"),t.content.widgets&&a.push("widgets"),t.content.content&&a.push("content"),a.push("install_finish"),a},ut=function(t){var n=(0,e.useContext)(en),r=n.demos_list,a=n.currentDemo,c=(n.setCurrentDemo,n.setInstallerBlockingReleased),i=n.setCurrentlyInstalledDemo,l=n.pluginsStatus,s=(0,e.useContext)(S),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,ct((0,e.useState)(!1),2)),f=m[0],p=m[1],d=ct((0,e.useState)(!1),2),b=d[0],y=d[1],h=ct((0,e.useState)(0),2),g=h[0],v=h[1],_=ct((a||"").split(":"),2),w=_[0],E=(_[1],r.filter((function(e){return e.name===w})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),k=t.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),O=ct((0,e.useState)({register_current_demo:{title:(0,o.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?E[0].builder:t.builder),expected_signals:1},child_theme:{title:(0,o.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:(0,o.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(k.join(":")),expected_signals:2*k.length+1},erase_content:{title:(0,o.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:(0,o.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:(0,o.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?E[0].builder:t.builder),expected_signals:5},widgets:{title:(0,o.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?E[0].builder:t.builder),expected_signals:3},content:{title:(0,o.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(a,":").concat(null===t.builder?E[0].builder:t.builder),expected_signals:50}}),2),x=O[0],j=O[1],C=st({demoConfiguration:t,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),P=C[g],A=ct((0,e.useState)(0),2),D=A[0],M=A[1],z=ct((0,e.useState)(null),2),N=z[0],L=z[1],T=(0,e.useRef)(D),B=(0,e.useRef)(x);(0,e.useEffect)((function(){T.current=D,B.current=x}));var I=function(e){return"content"===e?1===C.length?100:50:C.indexOf("content")>-1?50/(C.length-1):100/C.length},F=C.reduce((function(e,t,n){return n>=g?e:e+I(t)}),0)+100*D/x[P].expected_signals*(I(P)/100);return(0,e.useEffect)((function(){var e,t;f||(L(null),M(0),e=x[P],(t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string,"&nonce=").concat(ctDashboardLocalizations.dashboard_actions_nonce))).onerror=function(e){y(!0)},t.onmessage=function(e){var n=JSON.parse(e.data);if(M(T.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(L(n),j(ot(ot({},B.current),{},{content:ot(ot({},B.current.content),{},at({},"".concat(r,"_count"),B.current.content["".concat(r,"_count")]+1))})))}else L(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,ot(ot({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));j(ot(ot({},B.current),{},{content:ot(ot({},B.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),g===C.length-1)return p(!0),c(!0),void window.removeEventListener("beforeunload",lt);L(null),M(0),v(Math.min(C.length-1,g+1))}})}),[P]),(0,e.useEffect)((function(){return window.addEventListener("beforeunload",lt),i({demo:"".concat(a,":").concat(t.builder)}),function(){window.removeEventListener("beforeunload",lt)}}),[]),{isCompleted:f,isError:b,stepName:P,stepsDescriptors:x,lastMessage:N,progress:F}},mt=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return(0,o.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return(0,o.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return(0,o.sprintf)((0,o.__)("installing plugin %s","blocksy-companion"),De(e.name)||e.name);if("activate_plugin"===n)return(0,o.sprintf)((0,o.__)("activating plugin %s","blocksy-companion"),De(e.name)||e.name);if("download_demo_widgets"===n)return(0,o.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return(0,o.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return(0,o.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return(0,o.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return(0,o.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return(0,o.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return(0,o.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return(0,o.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return(0,o.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return(0,o.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return(0,o.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],a=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(a,r)," of ").concat(r," ").concat({users:(0,o.__)("users","blocksy-companion"),term:(0,o.__)("terms","blocksy-companion"),media:(0,o.__)("images","blocksy-companion"),post:(0,o.__)("posts","blocksy-companion"),comment:(0,o.__)("comments","blocksy-companion")}[e.kind])}return""},ft=function(t){var n=t.stepName,r=t.stepsDescriptors,a=t.lastMessage,c=t.progress;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,e.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),(0,e.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),(0,e.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),(0,e.createElement)("h2",null,(0,o.__)("Installing","blocksy-companion"),"..."),(0,e.createElement)("p",null,(0,o.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),(0,e.createElement)("div",{className:"ct-progress-info"},r[n].title,a&&mt(a,r)?": ".concat(mt(a,r)):"",(0,e.createElement)("span",null,Math.round(c),"%")),(0,e.createElement)("div",{style:{"--progress":"".concat(c,"%")},className:"ct-installer-progress"},(0,e.createElement)("div",null)))},pt=function(){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("i",{className:"ct-demo-icon"},(0,e.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 40 40"},(0,e.createElement)("path",{fill:"#BDC8D7",d:"M30.7,25.4L14.6,9.3c0.7-2.5,0-5.2-1.9-7.2c-2.4-2.3-6-2.7-8.8-1.3l4.5,4.5L7.9,7.9L5.3,8.4L0.8,3.9c-1.5,2.8-1,6.4,1.3,8.7c2,2,4.7,2.6,7.2,1.9l16.1,16.1c-0.7,2.5,0,5.2,1.9,7.2c2.3,2.3,5.9,2.8,8.7,1.3l-4.5-4.5L32,32l2.6-0.5l4.5,4.5c1.5-2.8,1-6.4-1.3-8.7C35.9,25.4,33.1,24.7,30.7,25.4z"}),(0,e.createElement)("polygon",{fill:"#44ACDF",points:"34.6,11.3 39.8,3.7 36.3,0.2 28.7,5.4 28.7,7.8 11.8,24.7 15.3,28.2 32.2,11.3 "}),(0,e.createElement)("path",{fill:"#0C7AB3",d:"M18.4,27.5l-5.9-5.9c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l0,0L0.7,33.5c-0.7,0.7-0.7,1.7,0,2.3l3.5,3.5c0.7,0.7,1.7,0.7,2.3,0L17,28.9l0,0c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3C18.8,28.5,18.8,27.9,18.4,27.5z"}))),(0,e.createElement)("h2",null,(0,o.__)("Can't Import Starter Site","blocksy-companion")),(0,e.createElement)("p",null,(0,o.__)("Unfortunately, your hosting configuration doesn't meet the minimum requirements for importing a starter site.","blocksy-companion")),(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-import-stuck-at-xx/",className:"ct-demo-btn",target:"_blank"},"More Information"))},dt=function(t){var n=t.demoConfiguration,r=t.style,o=ut(n),c=o.isCompleted,i=o.isError,l=o.stepName,s=o.stepsDescriptors,u=o.lastMessage,m=o.progress,f=c?"complete":i?"error":"progress";return(0,e.createElement)("div",{className:"ct-demo-install",style:r},(0,e.createElement)(a.Transition,{initial:!0,items:f,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return function(n){return(0,e.createElement)("div",{style:n},"complete"===t&&(0,e.createElement)(nt,null),"error"===t&&(0,e.createElement)(pt,null),"progress"===t&&(0,e.createElement)(ft,{stepName:l,stepsDescriptors:s,lastMessage:u,progress:m}))}})))};function bt(e){return function(e){if(Array.isArray(e))return gt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ht(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 yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||ht(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 ht(e,t){if(e){if("string"==typeof e)return gt(e,t);var n=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)?gt(e,t):void 0}}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vt=function(t){t.location,t.navigate;var n=yt((0,e.useState)(!0),2),r=(n[0],n[1],(0,e.useContext)(en)),c=r.installerBlockingReleased,i=r.demos_list,l=r.currentDemo,s=r.pluginsStatus,u=r.currentlyInstalledDemo,m=r.setCurrentDemo,f=(0,e.useContext)(S).is_child_theme,p=yt((0,e.useState)(u),2),d=p[0],b=p[1],y=yt((0,e.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),h=y[0],v=y[1],_=yt((0,e.useState)(0),2),w=_[0],E=_[1],k=yt((l||"").split(":"),2),O=k[0],x=(k[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!l)return!1;if("modify_demo"===e){if(!d)return!1;if(-1===d.demo.indexOf(O))return!1}if("child_theme"===e&&f)return!1;var t=i.filter((function(e){return e.name===O})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(bt(e),bt(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),j=x[w];return(0,e.useEffect)((function(){if(O&&!(l.indexOf(":hide")>-1)){var e=i.filter((function(e){return e.name===O})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));E(0),b(u),v({builder:1===e.length?e[0].builder:null,child_theme:!1,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[l]),(0,e.createElement)(K,{items:l,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:g()("ct-demo-modal",{"ct-demo-installer":"installer"===j||"modify_demo"===j}),onDismiss:function(){("installer"!==j||c)&&m("".concat(O,":hide"))},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,e.createElement)("div",{className:"ct-current-step"},(0,e.createElement)(a.Transition,{items:j,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(t){return function(n){return(0,e.createElement)(e.Fragment,null,"modify_demo"===t&&(0,e.createElement)(Ve,{demoConfiguration:h,nextStep:function(){E(Math.min(w+1,x.length-1))},style:n}),"child_theme"===t&&(0,e.createElement)(qe,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"plugins"===t&&(0,e.createElement)(Me,{demoConfiguration:h,style:n,setDemoConfiguration:v}),"builder"===t&&(0,e.createElement)(Ye,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"content"===t&&(0,e.createElement)(tt,{style:n,demoConfiguration:h,setDemoConfiguration:v}),"installer"===t&&(0,e.createElement)(dt,{style:n,demoConfiguration:h}))}}))),"installer"!==j&&"modify_demo"!==j&&(0,e.createElement)("div",{className:"ct-demo-step-controls"},w>0&&(0,e.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){E(Math.max(w-1,0))}},(0,o.__)("Back","blocksy-companion")),x.length>2&&(0,e.createElement)("ul",{className:"ct-steps-pills"},x.map((function(t,n){return n===x.length-1?null:(0,e.createElement)("li",{className:g()({active:t===j}),key:t},n+1)}))),(0,e.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===j&&0===st({demoConfiguration:h,pluginsStatus:s,is_child_theme:f}).length,onClick:function(){E(Math.min(w+1,x.length-1))}},"content"===j?(0,o.__)("Install","blocksy-companion"):(0,o.__)("Next","blocksy-companion"))))}})},_t=window.wp.components,wt=n(137),Et=n.n(wt);const kt=(0,e.forwardRef)((({className:t,isPressed:n,...r},o)=>{const a={...r,className:Et()(t,{"is-pressed":n})||void 0,"aria-hidden":!0,focusable:!1};return(0,e.createElement)("svg",{...a,ref:o})}));kt.displayName="SVG";var Ot=(0,e.createElement)(kt,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)((t=>(0,e.createElement)("path",t)),{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),xt=n(162),St=n.n(xt);function jt(e){return function(e){if(Array.isArray(e))return Lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Nt(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 Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Mt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){Dt(a,r,o,c,i,"next",e)}function i(e){Dt(a,r,o,c,i,"throw",e)}c(void 0)}))}}function zt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||Nt(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 Nt(e,t){if(e){if("string"==typeof e)return Lt(e,t);var n=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)?Lt(e,t):void 0}}function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tt=function(t){t.allPlans,t.allCategories;var n=zt((0,e.useState)(!1),2),r=n[0],a=n[1],c=zt((0,e.useState)(!1),2),i=c[0],l=c[1],s=zt((0,e.useState)([]),2),u=s[0],m=s[1],f=zt((0,e.useState)(null),2),p=f[0],d=f[1],b=zt((0,e.useState)(""),2),y=b[0],h=b[1],g=zt((0,e.useState)([]),2),v=g[0],_=g[1];(0,e.useEffect)((function(){var e=function(){var e=Mt(regeneratorRuntime.mark((function e(){var t,n,r,o,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_demo_get_export_data"),t.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),e.prev=3,e.next=6,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 6:if(200!==(n=e.sent).status){e.next=14;break}return e.next=10,n.json();case 10:r=e.sent,o=r.success,a=r.data,o&&((c=a.data)&&c.builder&&h(c.builder),c&&c.plugins&&_(c.plugins),c&&c.demoId&&d(parseFloat(c.demoId)));case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(3);case 18:case"end":return e.stop()}}),e,null,[[3,16]])})));return function(){return e.apply(this,arguments)}}(),t=function(){var e=Mt(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("https://creativethemes.com/blocksy/wp-json/ct/v1/starter-sites",{method:"GET"});case 3:if(200!==(t=e.sent).status){e.next=9;break}return e.next=7,t.json();case 7:n=e.sent,m(n);case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();e(),t()}),[]);var w=function(){var e=Mt(regeneratorRuntime.mark((function e(){var t,n,r,o,c,i,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),t.append("demoId",p),t.append("builder",y),t.append("plugins",v.join(",")),t.append("wp_customize","on"),e.prev=8,e.next=11,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 11:if(200!==(n=e.sent).status){e.next=19;break}return e.next=15,n.json();case 15:r=e.sent,o=r.success,c=r.data,o&&(i=u.find((function(e){return e.id===p})),l=Pt(Pt({name:i.title,url:i.demo_live_link,is_pro:"Pro"===i.is_pro,categories:i.categories,keywords:i.keywords},"Pro"===i.is_pro&&i.plans?{plans:["personal","professional","agency"].concat(jt(i.plans.map((function(e){return"".concat(e,"_v2")}))))}:{}),c.demo),console.log("Blocksy:Dashboard:DemoInstall:exported",{remoteDemo:i,finalDemo:l}),s=new Blob([JSON.stringify(l)],{type:"text/plain;charset=utf-8"}),St().saveAs(s,"".concat(i.title,".json")));case 19:e.next=23;break;case 21:e.prev=21,e.t0=e.catch(8);case 23:a(!1);case 24:case"end":return e.stop()}}),e,null,[[8,21]])})));return function(){return e.apply(this,arguments)}}();return(0,e.createElement)("div",{className:"ct-filter-trigger-export"},(0,e.createElement)("button",{type:"button",className:"components-button has-icon has-text",onClick:function(e){l(!0)}},(0,e.createElement)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24","fill-rule":"evenodd",fill:"currentColor"},(0,e.createElement)("path",{d:"M20 15v5H4v-5h1.5v3.5h6V6.8l-4 4-1-1.1L12.2 4l6.3 5.7-1 1.1L13 6.7v11.8h5.5V15H20z"})),(0,o.__)("Export Site")),(0,e.createElement)(K,{items:i,className:"ct-site-export-modal",onDismiss:function(){return l(!1)},render:function(){return(0,e.createElement)("div",{className:"ct-modal-content"},(0,e.createElement)("h2",null,"Export Settings"),(0,e.createElement)("div",{className:"ct-site-export-settings ct-modal-scroll"},(0,e.createElement)("section",{className:"general-section has-divider"},(0,e.createElement)("label",null,(0,e.createElement)("span",{className:"ct-label"},(0,o.__)("Starter site","blocksy-companion")),(0,e.createElement)("select",{value:p,onChange:function(e){var t=e.target.value;return d(parseFloat(t))}},(0,e.createElement)("option",{value:""},(0,o.__)("Select a starter site","blocksy-companion")),u.sort((function(e,t){var n=e.title.toLowerCase(),r=t.title.toLowerCase();return n<r?-1:n>r?1:0})).map((function(t){return(0,e.createElement)("option",{value:t.id,key:t.id},t.title)})))),(0,e.createElement)("label",null,(0,e.createElement)("span",{className:"ct-label"},(0,o.__)("Builder","blocksy-companion")),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Builder","blocksy-companion"),value:y,onChange:function(e){var t=e.target.value;return h(t)}}))),(0,e.createElement)("section",{className:"plugins-section"},(0,e.createElement)("h4",null,"Required plugins"),(0,e.createElement)("div",{className:"ct-bundled-plugins-list grid-labels"},Object.keys({gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}).filter((function(e){return"gutenberg"!==e})).map((function(t){return(0,e.createElement)("label",{tabindex:"0",onClick:function(e){e.preventDefault(),_((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(jt(e),[t])}))}},(0,e.createElement)("input",{type:"checkbox",checked:v.indexOf(t)>-1,onChange:function(e){e.target.checked}}),(0,e.createElement)("span",null,{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}[t]))}))))),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button button-primary",disabled:r,onClick:function(){return w()}},r?(0,o.__)("Loading...","blocksy-companion"):(0,o.__)("Export site","blocksy-companion"))))}}))};function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e){return function(e){if(Array.isArray(e))return Vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vt(e,t)}(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 Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ht={all:(0,o.__)("All Plans","blocksy-companion"),free:(0,o.__)("Free","blocksy-companion"),pro:(0,o.__)("Pro","blocksy-companion")},Ut=function(){var t=(0,e.useContext)(en),n=t.unfiltered_demos_list,r=t.filters,a=t.setFilters,c=t.allPlans,i=t.allCategories,l=n.reduce((function(e,t){var n="gutenberg";return t.builder&&(n=t.builder),e.includes(n)||e.push(n),e}),[]);return(0,e.createElement)("div",{className:"ct-demo-filters"},(0,e.createElement)(_t.DropdownMenu,{className:"ct-filter-trigger-categories",menuProps:{className:"ct-filter-dropdown-categories"},icon:(0,e.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24","fill-rule":"evenodd",fill:"currentColor"},(0,e.createElement)("path",{d:"M18 5.5h-3c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5V6c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6zM9 14.5H6c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3zm4-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5zm3-1.5c1.1 0 2 .9 2 2v3c0 1.1-.9 2-2 2h-3c-1.1 0-2-.9-2-2v-3c0-1.1.9-2 2-2h3zM9 5.5H6c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5V6c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6z"})),label:"all"===r.category?(0,o.__)("All Categories","blocksy-companion"):r.category,text:"all"===r.category?(0,o.__)("All Categories","blocksy-companion"):r.category},(function(){return["all"].concat(Rt(i)).map((function(t){var n=r.category===t;return(0,e.createElement)(_t.MenuItem,{key:t,icon:n?(0,e.cloneElement)(Ot,{width:24,height:24}):null,isSelected:n,onClick:function(){a(It(It({},r),{},{category:t}))}},"all"===t?(0,o.__)("All Categories","blocksy-companion"):t)}))})),(0,e.createElement)(_t.DropdownMenu,{className:"ct-filter-trigger-plans",menuProps:{className:"ct-filter-dropdown-plans"},icon:(0,e.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24","fill-rule":"evenodd",fill:"currentColor"},(0,e.createElement)("path",{d:"m17.3 19.8-5.2-2.7h-.2l-5.2 2.7 1-5.8c0-.1 0-.2-.1-.2l-4.2-4L9.2 9c.1 0 .2-.1.2-.1L12 3.6l2.6 5.2c0 .1.1.1.2.1l5.8.8-4.2 4.1c-.1.1-.1.1-.1.2l1 5.8zM12 15.6c.3 0 .6.1.8.2l2.5 1.3-.5-2.8c-.1-.6.1-1.1.5-1.5l2-2-2.8-.4c-.6-.1-1.1-.4-1.3-1L12 6.9l-1.2 2.5c-.3.5-.7.9-1.3 1l-2.8.4 2 2c.4.4.6 1 .5 1.5l-.5 2.8 2.5-1.3c.2-.1.5-.2.8-.2z"})),label:Ht[r.plan],text:Ht[r.plan]},(function(){return["all","free","pro"].map((function(t){var n=r.plan===t;return(0,e.createElement)(_t.MenuItem,{key:t,icon:n?(0,e.cloneElement)(Ot,{width:24,height:24}):null,isSelected:n,onClick:function(){a(It(It({},r),{},{plan:t}))}},Ht[t])}))})),(0,e.createElement)(_t.DropdownMenu,{className:"ct-filter-trigger-builders",menuProps:{className:"ct-filter-dropdown-builders"},icon:(0,e.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24","fill-rule":"evenodd",fill:"currentColor"},(0,e.createElement)("path",{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM6 5.5h12c.3 0 .5.2.5.5v3h-13V6c0-.3.2-.5.5-.5zM5.5 18v-7.5h3v8H6c-.3 0-.5-.2-.5-.5zm12.5.5h-8v-8h8.5V18c0 .3-.2.5-.5.5z"})),label:"all"===r.builder?(0,o.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}[r.builder],text:"all"===r.builder?(0,o.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}[r.builder]},(function(){return["all"].concat(Rt(l)).map((function(t){var n=r.builder===t;return(0,e.createElement)(_t.MenuItem,{key:t,icon:n?(0,e.cloneElement)(Ot,{width:24,height:24}):null,isSelected:n,onClick:function(){a(It(It({},r),{},{builder:t}))}},"all"===t?(0,o.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress"}[t])}))})),ct_localizations.is_dev_mode&&(0,e.createElement)(Tt,{allPlans:c,allCategories:i}),(0,e.createElement)("div",{className:"ct-filter-search"},(0,e.createElement)("svg",{"aria-hidden":"true",width:"13",height:"13",viewBox:"0 0 15 15",fill:"currentColor"},(0,e.createElement)("path",{d:"M14.8,13.7L12,11c0.9-1.2,1.5-2.6,1.5-4.2c0-3.7-3-6.8-6.8-6.8S0,3,0,6.8s3,6.8,6.8,6.8c1.6,0,3.1-0.6,4.2-1.5l2.8,2.8c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2C15.1,14.5,15.1,14,14.8,13.7z M1.5,6.8c0-2.9,2.4-5.2,5.2-5.2S12,3.9,12,6.8S9.6,12,6.8,12S1.5,9.6,1.5,6.8z"})),(0,e.createElement)("input",{type:"text",placeholder:(0,o.__)("Search for a starter site...","blocksy-companion"),value:r.search,onChange:function(e){a(It(It({},r),{},{search:e.target.value}))}})))};function Gt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(e,t)}(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 qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wt=[{id:"personal",title:"Personal"},{id:"professional",title:"Professional"},{id:"agency",title:"Agency"},{id:"personal_v2",title:"Personal v2"},{id:"professional_v2",title:"Professional v2"},{id:"agency_v2",title:"Agency v2"}],Zt=["Blog","Business","Ecommerce","News","Nonprofit","Personal","Portfolio","Travel"];function $t(e,t){var n=t.length,r=e.length;if(r>n)return!1;if(r===n)return e===t;e:for(var o=0,a=0;o<r;o++){for(var c=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===c)continue e;return!1}return!0}var Kt=function(e,t){var n=e;return"all"!==t.plan&&(n=n.filter((function(e){return!("free"===t.plan&&e.is_pro||"pro"===t.plan&&!e.is_pro)}))),"all"!==t.category&&(n=n.filter((function(e){return!!e.categories&&e.categories.includes(t.category)}))),t.search&&(n=n.filter((function(e){return!(!e.keywords||!e.keywords.split(",").some((function(e){return $t(t.search.toLowerCase(),e.trim().toLowerCase())})))||$t(t.search.toLowerCase(),e.name.toLowerCase())}))),"all"!==t.builder&&(n=n.filter((function(n){return!!e.find((function(e){return e.name===n.name&&(e.builder||"gutenberg")===t.builder}))}))),n},Jt=function(t){var n=t.demos_list,r=Gt((0,e.useState)({search:"",category:"all",builder:"all",plan:"all"}),2),o=r[0];return{filters:o,setFilters:r[1],unfiltered_demos_list:n,demos_list:Kt(n.filter((function(e){return!e.dev_v2||ct_localizations.is_dev_mode})),o),allPlans:Wt,allCategories:Zt,display:function(){return(0,e.createElement)(Ut,null)}}};function Yt(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qt(e,t)}(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 Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var en=(0,e.createContext)({demos:[]}),tn=null,nn=null,rn=function(t){t.children,t.path,t.location;var n=Xt((0,e.useState)(!tn),2),r=n[0],c=n[1],i=Xt((0,e.useState)(tn||[]),2),l=i[0],s=i[1],u=Xt((0,e.useState)(nn||{}),2),m=u[0],f=u[1],p=Xt((0,e.useState)(null),2),d=p[0],b=p[1],y=Xt((0,e.useState)(null),2),h=y[0],g=y[1],v=Jt({demos_list:l}),_=Xt((0,e.useState)(!1),2),w=_[0],E=_[1],k=Xt((0,e.useState)({builder:""}),2),O=(k[0],k[1],Xt((0,e.useState)(!1),2)),x=O[0],S=O[1],j=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&c(!0),(t=new FormData).append("action","blocksy_demo_list"),t.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),e.prev=5,e.next=8,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 8:if(200!==(n=e.sent).status){e.next=17;break}return e.next=12,n.json();case 12:r=e.sent,o=r.success,a=r.data,o&&(s(a.demos),f(a.active_plugins),g(a.current_installed_demo),E(a.demo_error),nn=a.active_plugins,tn=a.demos,a.demo_error),o||console.error("Blocksy:Dashboard:DemoInstall:demos_list",a);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(5);case 21:c(!1);case 22:case"end":return e.stop()}}),e,null,[[5,19]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){Yt(a,r,o,c,i,"next",e)}function i(e){Yt(a,r,o,c,i,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,e.useEffect)((function(){j(!tn)}),[]),(0,e.createElement)("div",{className:"ct-demos-list-container"},w&&(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:w}}),(0,e.createElement)(a.Transition,{items:r,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(t){return t?function(t){return(0,e.createElement)(a.animated.p,{style:t,className:"ct-loading-text"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,e.createElement)("g",{transform:"translate(50,50)"},(0,e.createElement)("g",{transform:"scale(1)"},(0,e.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,e.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,e.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,o.__)("Loading Starter Sites...","blocksy-companion"))}:0===l.length?function(t){return(0,e.createElement)(a.animated.div,{style:t},(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:(0,o.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),(0,e.createElement)(ge,null))}:function(t){return(0,e.createElement)(a.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,(0,e.createElement)(en.Provider,{value:{demo_error:w,currentDemo:d,pluginsStatus:m,installerBlockingReleased:x,setInstallerBlockingReleased:S,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:g,unfiltered_demos_list:v.unfiltered_demos_list,demos_list:v.demos_list,filters:v.filters,setFilters:v.setFilters,allPlans:v.allPlans,allCategories:v.allCategories}},v.display(),(0,e.createElement)(Ie,null),(0,e.createElement)(vt,null)),(0,e.createElement)(ge,null)))}})))};function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}r().on("ct:dashboard:routes",(function(t){t.push({Component:function(t){return(0,e.createElement)(y,t)},path:"/extensions"}),t.push({Component:function(t){return(0,e.createElement)(Ee,t)},path:"/extensions/:extension"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&t.push({Component:function(t){return(0,e.createElement)(rn,t)},path:"/demos"})})),r().on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,o.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:(0,o.__)("Extensions","blocksy-companion"),path:"/extensions",onClick:function(e){location.hash.indexOf("extensions")>-1&&e.preventDefault()},getProps:function(e){var t=e.isPartiallyCurrent,n=e.isCurrent;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){an(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t||n?{"aria-current":"page"}:{})}})})),r().on("ct:dashboard:heading:after",(function(t){ctDashboardLocalizations.plugin_data.is_pro&&(t.content=(0,e.createElement)("span",null,"PRO"))}))}()}();