!function(){var e={151(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,a=0;o>>6-2*a);return n}},e.exports=n},213(e,t){var n,o,a;o=[],void 0===(a="function"==typeof(n=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 n(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){c(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.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 r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof globalThis&&globalThis.global===globalThis?globalThis:void 0,l=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,l){var c=r.URL||r.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?a(s):o(s.href)?n(e,t,l):a(s,s.target="_blank")):(s.href=c.createObjectURL(e),setTimeout(function(){c.revokeObjectURL(s.href)},4e4),setTimeout(function(){a(s)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,l){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,l),r);else if(o(e))n(e,r,l);else{var c=document.createElement("a");c.href=e,c.target="_blank",setTimeout(function(){a(c)})}}:function(e,t,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,o);var c="application/octet-stream"===e.type,s=/constructor/i.test(r.HTMLElement)||r.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||c&&s||l)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var m=r.URL||r.webkitURL,d=m.createObjectURL(e);a?a.location=d:location.href=d,a=null,setTimeout(function(){m.revokeObjectURL(d)},4e4)}});r.saveAs=c.saveAs=c,e.exports=c})?n.apply(t,o):n)||(e.exports=a)},206(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},503(e,t,n){var o,a,r,l,c;o=n(939),a=n(151).utf8,r=n(206),l=n(151).bin,(c=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?l.stringToBytes(e):a.stringToBytes(e):r(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),s=8*e.length,i=1732584193,u=-271733879,m=-1732584194,d=271733878,p=0;p>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[s>>>5]|=128<>>9<<4)]=s;var f=c._ff,h=c._gg,g=c._hh,b=c._ii;for(p=0;p>>0,u=u+_>>>0,m=m+v>>>0,d=d+E>>>0}return o.endian([i,u,m,d])})._ff=function(e,t,n,o,a,r,l){var c=e+(t&n|~t&o)+(a>>>0)+l;return(c<>>32-r)+t},c._gg=function(e,t,n,o,a,r,l){var c=e+(t&o|n&~o)+(a>>>0)+l;return(c<>>32-r)+t},c._hh=function(e,t,n,o,a,r,l){var c=e+(t^n^o)+(a>>>0)+l;return(c<>>32-r)+t},c._ii=function(e,t,n,o,a,r,l){var c=e+(n^(t|~o))+(a>>>0)+l;return(c<>>32-r)+t},c._blocksize=16,c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(c(e,t));return t&&t.asBytes?n:t&&t.asString?l.bytesToString(n):o.bytesToHex(n)}},942(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 o={}.hasOwnProperty;function a(){for(var e="",t=0;t0&&t(`/extensions/${Object.keys(o)[0]}`)},[o,n]),n?(0,e.createElement)(w,null):(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(r.Transition,{items:!0,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},function(t,n){return n?(0,e.createElement)(r.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,a.__)("Loading Extensions Status...","blocksy-companion")):null}))},x=n(942),S=n.n(x);var M=function({navigate:t,currentExtension:n,exts_status:o}){const r=(0,e.useMemo)(function(){return Object.values(o).map(function(e,t){return{...e,name:Object.keys(o)[t]}}).find(function({config:e}){return e.pro})},[o]),l=(0,e.useMemo)(function(){return Object.values(o).map(function(e,t){return{...e,name:Object.keys(o)[t]}}).filter(function({config:e}){return!e.pro})},[o]),c=(0,e.useMemo)(function(){return Object.values(o).map(function(e,t){return{...e,name:Object.keys(o)[t]}}).filter(function({config:e}){return e.pro}).filter(function(e){return"white-label"!==e.name||!e.data||!e.data.locked})},[o]);return(0,e.createElement)("div",{className:"ct-extensions-menu"},[{label:(0,a.__)("Free Extensions","blocksy-companion"),exts:l,order:[]},...r?[{label:(0,a.__)("Pro Extensions","blocksy-companion"),exts:c,order:["woocommerce-extra","post-types-extra","local-google-fonts","custom-fonts","adobe-typekit"]}]:[]].map(function({label:o,exts:r,order:l}){const c=[...l.map(function(e){return r.find(function(t){return t.name===e})}),...r.filter(function({name:e}){return!l.includes(e)}).sort(function(e,t){return e.config.name.localeCompare(t.config.name)})].filter(function(e){return!!e});return(0,e.createElement)(e.Fragment,{key:o},(0,e.createElement)("h4",null,o),(0,e.createElement)("ul",null,c.map(function({name:o,config:r,status:l,__object:c}){let s=!!c;return!1===r?.requirement?.check&&(s=!1),(0,e.createElement)("li",{key:o,className:S()({selected:n&&n.name===o,active:s}),onClick:function(){t(`/extensions/${o}`)}},r.name,(0,e.createElement)("span",{"data-tooltip-reveal":"top"},(0,e.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Active","blocksy-companion"))))})))}))};const z=(window.ctDashboardLocalizations||{}).DashboardContext;(z||{}).Provider,(z||{}).Consumer;var B=z;(0,a.__)("Free","blocksy-companion"),(0,a.__)("Personal","blocksy-companion"),(0,a.__)("Business","blocksy-companion"),(0,a.__)("Agency","blocksy-companion"),(0,a.__)("Personal","blocksy-companion"),(0,a.__)("Business","blocksy-companion"),(0,a.__)("Agency","blocksy-companion");var L=function({currentPlan:t="free",requiredPlan:n="personal",personal:o={title:(0,a.__)("This is a Pro feature","blocksy-companion"),description:(0,a.__)("Upgrade to any pro plan and get instant access to this and many other feature.","blocksy-companion")},professional:l={description:(0,a.__)("Upgrade to the business or agency plan and get instant access to this and many other features.","blocksy-companion")},agency:c={description:(0,a.__)("Upgrade to the agency plan and get instant access to this and many other features.","blocksy-companion")}}={}){const[s,i]=(0,e.useState)(!1);return{showNotice:function(e){i(e||!0)},content:(0,e.createElement)(r.Overlay,{items:s,className:"ct-onboarding-modal",onDismiss:function(){return i(!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"===n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"ct-modal-title"},o.title),(0,e.createElement)("p",null,o.description)),"professional"===n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Required plan"),(0,e.createElement)("h2",{className:"ct-modal-title"},(0,a.__)("Business or Agency","blocksy-companion")),(0,e.createElement)("p",null,l.description)),"agency"===n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Required plan"),(0,e.createElement)("h2",{className:"ct-modal-title"},(0,a.__)("Agency","blocksy-companion")),(0,e.createElement)("p",null,c.description)),(0,e.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,e.createElement)("a",{href:ctDashboardLocalizations.plugin_data?ctDashboardLocalizations.plugin_data.modal_links["compare-plans"]:"https://creativethemes.com/blocksy/pricing/#comparison-free-vs-pro",target:"_blank",className:"button"},(0,a.__)("Compare Plans","blocksy-companion")),(0,e.createElement)("a",{href:ctDashboardLocalizations.plugin_data.modal_links?ctDashboardLocalizations.plugin_data.modal_links.pricing:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,a.__)("Upgrade Now","blocksy-companion"))))}})}};var N=function(t,n={}){n={strategy:"pro-ext",modalTitle:(0,a.__)("This is a Pro extension","blocksy-companion"),...n};const[o,r]=(0,e.useState)(!1),l=ctDashboardLocalizations.plugin_data.is_pro,{history:c}=(0,e.useContext)(B),s=!l&&t.config.pro,i=ctDashboardLocalizations.plugin_data.current_plan;let u="personal";t.config.plans&&(t.config.plans.includes("agency_v2")&&(u="agency"),t.config.plans.includes("professional_v2")&&(u="professional"));const{content:m,showNotice:d}=L({currentPlan:i,requiredPlan:u,...n});return{isPro:l,isProInFree:!l&&t.config.pro||t.config.plans&&t.config.plans.length&&!t.config.plans.includes(i),showNotice:d,content:"pro-ext"===n.strategy&&s||"pro"===n.strategy&&!l||t.config.plans&&t.config.plans.length&&!t.config.plans.includes(i)?m:null}};var F=function(t,n=function(){}){const[o,a]=(0,e.useState)(!1),{isProInFree:r,showNotice:c,content:s}=N(t);return[o,async function(e=function(){},o=!0){if(r)return o&&t.config.features?void e():void c();if(e(),o){const e=new FormData;e.append("ext",t.name),e.append("action",t.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),a(!0);try{await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e}),t.config.require_refresh&&l(),n()}catch(e){}a(!1)}},s]},T=window.wp.hooks;var D=function({navigate:t,currentExtension:n,onExtsSync:o,setExtsStatus:r}){const[l,c]=(0,e.useState)(!1),[s,i,u]=F(n);let m={content:null,showExtension:!0,activationStrategy:"default"};const d=n?(0,T.applyFilters)("blocksy.extensions.current_extension_content",m,{extension:n,onExtsSync:o,setExtsStatus:r,navigate:t}):m;let p=!!n&&n.__object;"from-custom-content"===d.activationStrategy&&(p=l);const f=[...n&&n.config.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section?[(0,e.createElement)("a",{target:"_blank",href:n.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,a.__)("Documentation","blocksy-companion"))]:[],...n&&n.config.video&&!ctDashboardLocalizations.plugin_data.hide_video_section?[(0,e.createElement)("a",{target:"_blank",href:n.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,a.__)("Video Tutorial","blocksy-companion"))]:[],...n&&n.config.customize&&p?[(0,e.createElement)("a",{href:n.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,a.__)("Customize","blocksy-companion"))]:[]];return(0,e.useEffect)(function(){n&&d.showExtension||t("/extensions")},[]),n?(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:n&&n.config.icon||'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t'}}),n&&n.config.name,n&&(!n.config.requirement||n.config.requirement&&n.config.requirement.check)&&(0,e.createElement)("div",{className:S()("ct-option-switch",{"ct-active":p}),onClick:function(){"from-custom-content"!==d.activationStrategy?i(function(){r(function(e){return{...e,[n.name]:{...e[n.name],__object:e[n.name].__object?null:{}}}})}):c(!l)}},(0,e.createElement)("span",null))),n&&n.config.description&&(0,e.createElement)("p",null,n.config.description),f.length>0&&(0,e.createElement)("div",{className:"ct-extension-actions"},f.map(function(t,n){return(0,e.createElement)(e.Fragment,{key:n},t)}))),p&&n.config.features&&(!n.config.requirement||n.config.requirement&&n.config.requirement.check)&&(0,e.createElement)("div",{className:"ct-extension-modules"},n.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:S()("ct-option-switch",{"ct-active":n.data&&n.data.settings.features[t.id]}),onClick:function(){i(function(){o({extAction:{type:"update-features",require_refresh:!!t?.require_refresh,settings:{features:{...n.data.settings.features,[t.id]:!n.data.settings.features[t.id]}}}}),r(function(e){return{...e,[n.name]:{...e[n.name],data:{...e[n.name].data,settings:{...e[n.name].data.settings,features:{...e[n.name].data.settings.features,[t.id]:!e[n.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)&&n.data&&n.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,a.__)("Documentation","blocksy-companion")),(t.customize||t.manage)&&n.data&&n.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,a.__)("Customize","blocksy-companion"):(0,a.__)("Manage","blocksy-companion"))):null)})),n&&n.config.requirement&&!n.config.requirement.check&&n.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"}))),n.config.requirement.message)),p&&d.content,u):null};var P=function(){const t=ctDashboardLocalizations.plugin_data,n=t.facebook||{},o=t.video_tutorials||{},r=t.knowledge_base||{},l=t.support||{},c=[{key:"facebook",hide:t.hide_support_facebook_section,icon:(0,e.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M8.6 6.7c0-1.9 1.5-3.5 3.4-3.5s3.4 1.5 3.4 3.5-1.5 3.5-3.4 3.5-3.4-1.6-3.4-3.5zM22 11.3h-3.9c.5.5.7 1.2.7 2v5.9c0 .6-.2 1.2-.3 1.7H22c1.2-.8 2-2.2 2-3.8v-3.7c0-1.2-.9-2.1-2-2.1zm.8-4.1c0-1.6-1.3-2.9-2.9-2.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9 1.7 0 2.9-1.3 2.9-2.9zM5.2 13c.1-.7.3-1.3.7-1.8H1.8c-1 .1-1.8.9-1.8 2V17c0 1.6.8 2.9 2 3.8h3.5c-.2-.6-.3-1.3-.3-2.1V13zM4 4.4c-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.7-1.3-2.9-2.9-2.9zm11.2 6.9H8.8c-1.1 0-2 .9-2 2v5.5c0 .7.2 1.4.4 2.1h9.5c.3-.6.4-1.3.4-2.1v-5.5c.1-1.1-.8-2-1.9-2z"})),title:n.title||(0,a.__)("Facebook Community","blocksy"),description:n.description||(0,a.__)("Share ideas, help others, ask questions and discuss your next project in our friendly community.","blocksy"),link:n.link||"https://www.facebook.com/groups/blocksy.community",buttonText:n.buttonText||(0,a.__)("Join Our Community","blocksy")},{key:"video_tutorials",hide:t.hide_support_video_section,icon:(0,e.createElement)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M13.3 3.7 8.5.4C7.4-.3 5.9-.1 5.2 1c-.3.4-.5.9-.5 1.4v19.1c0 1.3 1.1 2.4 2.4 2.4.5 0 1-.2 1.4-.4l4.7-3.3 9-6.3c1.1-.8 1.4-2.3.6-3.4l-.6-.6-8.9-6.2z"})),title:o.title||(0,a.__)("Video Tutorials","blocksy"),description:o.description||(0,a.__)("Learn how to do just about anything within Blocksy by following our byte-sized video tutorials.","blocksy"),link:o.link||"https://creativethemes.com/blocksy/video-tutorials/",buttonText:o.buttonText||(0,a.__)("Watch Tutorials","blocksy")},{key:"knowledge_base",hide:t.hide_support_docs_section,icon:(0,e.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M24 4.1v13.8c0 .7-.5 1.2-1.2 1.3-2 .1-6.1.5-8.9 1.9-.4.2-.9-.1-.9-.6V5.7c0-.2.1-.4.3-.5 2.7-1.7 7.2-2.1 9.4-2.3.7-.1 1.3.5 1.3 1.2zM1.4 2.9C.6 2.8 0 3.4 0 4.1v13.8c0 .7.5 1.2 1.2 1.3 2 .1 6.1.5 8.9 1.9.4.2.9-.1.9-.5V5.7c0-.2-.1-.4-.3-.5C8.1 3.5 3.6 3 1.4 2.9z"})),title:r.title||(0,a.__)("Knowledge Base","blocksy"),description:r.description||(0,a.__)("Dive in with our documentation and learn tips and tricks about Blocksy and its components.","blocksy"),link:r.link||"https://creativethemes.com/blocksy/docs/",buttonText:r.buttonText||(0,a.__)("View Documentation","blocksy")},{key:"support",hide:t.hide_support_section,icon:(0,e.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},(0,e.createElement)("path",{d:"M8.3 7.3 4.1 3C6.2 1.1 9 0 12 0s5.8 1.1 7.9 3l-4.3 4.3C14.6 6.5 13.4 6 12 6s-2.6.5-3.7 1.3zM12 18c-1.4 0-2.6-.5-3.7-1.3L4.1 21c2.1 1.9 4.9 3 7.9 3s5.8-1.1 7.9-3l-4.3-4.3c-1 .8-2.2 1.3-3.6 1.3zm9-13.9-4.3 4.3c.8 1 1.3 2.3 1.3 3.7s-.5 2.6-1.3 3.7l4.3 4.3c1.9-2.1 3-4.9 3-7.9s-1.1-6-3-8.1zM6 12c0-1.4.5-2.6 1.3-3.7L3 4.1C1.1 6.2 0 9 0 12s1.1 5.8 3 7.9l4.3-4.3C6.5 14.6 6 13.4 6 12z"})),title:l.title||(0,a.__)("Support","blocksy"),description:l.description||(0,a.__)("If your questions have not been answered by documentation or video tutorials, drop us a line.","blocksy"),link:l.link||ctDashboardLocalizations.support_url,buttonText:l.buttonText||(0,a.__)("Submit a Ticket","blocksy")}].filter(function(e){return!e.hide});return 0===c.length?null:(0,e.createElement)("div",{className:"ct-support-container-wrapper"},(0,e.createElement)("ul",{className:"ct-support-container","data-placement":"bottom"},c.map(function({key:t,icon:n,title:o,description:a,link:r,buttonText:l}){return(0,e.createElement)("li",{key:t},(0,e.createElement)("h4",null,(0,e.createElement)("span",null,n),o),(0,e.createElement)("p",null,a),(0,e.createElement)("a",{href:r,className:"ct-button","data-hover":"blue",target:"_blank"},l))})))};var A=function(t){const{history:n}=(0,e.useContext)(B),{navigate:o}=t,{forceEmptyExts:l,exts_status:c,syncExts:s,isLoading:i,setExtsStatus:u}=k();let m=null;return c[t.extension]&&(m={...c[t.extension],name:t.extension}),l?(0,e.createElement)(w,null):(0,e.createElement)("div",{className:"ct-extensions-container"},(0,e.createElement)(r.Transition,{items:i,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},function(t,n){return n?(0,e.createElement)(r.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,a.__)("Loading Extensions Status...","blocksy-companion")):(0,e.createElement)(r.animated.div,{style:t},(0,e.createElement)("section",{className:"ct-extensions-list"},(0,e.createElement)(M,{currentExtension:m,exts_status:c,navigate:o}),(0,e.createElement)(D,{navigate:o,currentExtension:m,setExtsStatus:u,onExtsSync:function(e={}){return s({...e,extension:m.name})}})),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(P,null)))}))};var V=function({children:t,activated:n,checked:o,onChange:a,className:r,position:l="end"}){const c=[..."start"===l?[t]:[],(0,e.createElement)("span",{className:S()("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 "}))),..."end"===l?[t]:[]];return(0,e.createElement)("div",{onClick:function(){return a()},className:S()("ct-checkbox-container",r,{activated:n})},c)};const O=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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[e]||e).replace(/\b\w/,function(e){return e.toUpperCase()})};var H=function({demoConfiguration:t,setDemoConfiguration:n,style:o}){const{currentDemo:l,demos_list:c,pluginsStatus:s,setCurrentDemo:i}=(0,e.useContext)(ke),[u,m]=(l||"").split(":");c.filter(function({name:e}){return e===u||""});return(0,e.createElement)(r.animated.div,{style:o},(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,a.__)("Install & Activate Plugins","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("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"},t.plugins.map(function({plugin:o,enabled:a}){return(0,e.createElement)(e.Fragment,{key:o},!s[o]&&(0,e.createElement)(V,{key:o,checked:a,onChange:function(){return n({...t,plugins:t.plugins.map(function(e){return e.plugin===o?{...e,enabled:!a}:e})})}},O(o)),s[o]&&(0,e.createElement)(V,{activated:!0,checked:!0,onChange:function(){}},O(o)))}))))};const j=function(e,t="conjunction"){return new Intl.ListFormat("en-GB",{style:"long",type:t}).format(e)};var G=function({demo:t}){const{currentlyInstalledDemo:n,demos_list:o,setCurrentDemo:r,setInstallerBlockingReleased:l}=(0,e.useContext)(ke),{isProInFree:c,showNotice:s,content:i}=N({config:{pro:!!t.is_pro,...t.plans?{plans:t.plans}:{}}},{strategy:"pro",personal:{title:(0,a.__)("This is a Pro starter site","blocksy-companion"),description:(0,a.__)("Upgrade to any pro plan and get instant access to this starter site and many other features.","blocksy-companion")},professional:{description:(0,a.__)("Upgrade to the business or agency plan and get instant access to this starter site and many other features.","blocksy-companion")},agency:{description:(0,a.__)("Upgrade to the agency plan and get instant access to this starter site and many other features.","blocksy-companion")}});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("li",{className:S()("ct-single-demo",{"ct-is-pro":t.is_pro})},(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:t.screenshot}),(0,e.createElement)("section",null,t.is_pro&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,a.__)("Required plan","blocksy-companion")),(0,e.createElement)("span",{className:"ct-required-plans"},j((t.plans?t.plans:["personal_v2","professional_v2","agency_v2"]).filter(function(e){return e.indexOf("v2")>-1}).map(function(e){return{personal_v2:(0,a.__)("Personal","blocksy-companion"),professional_v2:(0,a.__)("Business","blocksy-companion"),agency_v2:(0,a.__)("Agency","blocksy-companion")}[e]}),"disjunction"))),(0,e.createElement)("h3",null,(0,a.__)("Available for","blocksy-companion")),(0,e.createElement)("span",{className:"ct-available-builders"},j(o.filter(function({name:e}){return e===t.name||""}).sort(function(e,t){return e.buildert.builder?1:0}).map(function({builder:e}){return O(e)||"Gutenberg"})))),t.is_pro&&(0,e.createElement)("span",{className:"ct-pro-badge"},"PRO")),(0,e.createElement)("div",{className:"ct-demo-actions"},(0,e.createElement)("h4",null,t.name),(0,e.createElement)("div",null,(0,e.createElement)("a",{className:"ct-button",target:"_blank",href:t.url},(0,a.__)("Preview","blocksy-companion")),(0,e.createElement)("button",{className:"ct-button-primary",onClick:function(){c?s():(l(!1),r(t.name))}},n&&n.demo.indexOf(t.name)>-1?(0,a.__)("Modify","blocksy-companion"):(0,a.__)("Import","blocksy-companion"))))),i)};var $=function(){const{demos_list:t}=(0,e.useContext)(ke);return(0,e.createElement)("ul",{className:"ct-demo-list"},t.filter(function(e,n){return t.map(function({name:e}){return e}).indexOf(e.name)===n}).map(function(t){return(0,e.createElement)(G,{key:t.name,demo:t})}))};const I=(0,a.__)("Unfortunately, your hosting configuration doesn't meet the minimum requirements for importing a starter site.","blocksy-companion"),R=function(e){const t=new URLSearchParams({nonce:ctDashboardLocalizations.dashboard_actions_nonce,wp_customize:"on",...e});return`${ctDashboardLocalizations.ajax_url}?${t.toString()}`},q=async function(e,t,n={},{strategy:o="default",onStatus:a=null}={}){const r=R(e.params),l={"Content-Type":"application/json"};"sse"===o&&(l.Accept="text/event-stream");const c=await fetch(r,{method:"POST",headers:l,body:JSON.stringify({requestsPayload:t,...e.body||{},...n})});if("sse"===o){if(!c.ok)throw new Error(`HTTP ${c.status}`);return W(c,a)}if(!c.ok)throw new Error(`HTTP ${c.status}`);const s=await c.json();if(!s||!s.success)throw new Error(s?.data?.message||"Unknown error");return{success:!0,data:s.data}},W=async function(e,t){const n=e.body.getReader(),o=new TextDecoder;let a="",r=null,l="";const c=function(){if(!r||!l)return null;try{const e=JSON.parse(l);if("status"===r&&t)t(e.message);else{if("complete"===r)return{success:!0,data:e};if("error"===r)throw new Error(e.message)}}catch(e){if(e.message)throw e;console.error("Failed to parse SSE data:",e)}return r=null,l="",null};for(;;){const{done:e,value:t}=await n.read();if(e){if(a){const e=a.split("\n");for(const t of e)t.startsWith("event: ")?r=t.slice(7):t.startsWith("data: ")&&(l=t.slice(6))}const e=c();if(e)return e;break}a+=o.decode(t,{stream:!0});const s=a.split("\n");a=s.pop()||"";for(const e of s)if(e.startsWith("event: "))r=e.slice(7);else if(e.startsWith("data: "))l=e.slice(6);else if(""===e){const e=c();if(e)return e}}throw new Error("SSE stream ended without complete event")},U=async function(e,t,{maxRetries:n=5,strategy:o="default",onStatus:a=null}={}){let r=0;const l=e.title;let c=null,s=null;for(;r0&&e.cleanup){console.log(`[${l}] Running cleanup before attempt ${r+1}`);try{await U({title:`${l} (cleanup)`,params:e.cleanup.params},{},{maxRetries:3}),console.log(`[${l}] Cleanup completed`)}catch(e){console.log(`[${l}] Cleanup failed: ${e.message}, continuing anyway`)}}if(r>=2){const e=1e3*Math.pow(2,r-2);console.log(`[${l}] Waiting ${e}ms before attempt ${r+1}`),await new Promise(function(t){return setTimeout(t,e)})}console.log(`[${l}] Attempt ${r+1}/${n}`);const i=Date.now();let u,m={};"sse"===o&&null!==s&&(m.duration=s,console.log(`[${l}] Using safe duration: ${s}s`));try{u=await q(e,t,m,{strategy:o,onStatus:a})}catch(e){const t=Date.now()-i;console.log(`[${l}] Attempt ${r+1} failed after ${t}ms: ${e.message}`),c=e?.message||c,"sse"===o&&null===s&&(s=Math.max(10,Math.floor(.7*t/1e3)),console.log(`[${l}] Calculated safe duration: ${s}s`)),r++;continue}const d=Date.now()-i;if("sse"===o&&"content_import_timeout_reached"===u.data?.status){null===s&&(s=Math.max(10,Math.floor(.7*d/1e3))),console.log(`[${l}] Timeout reached, continuing with chunked import (safe duration: ${s}s)`);let n={...t,importer_data:u.data.importer_data};for(;;){let t;console.log(`[${l}] Continuing chunked import (processed: ${u.data.total_processed}/${u.data.total_posts})`);try{t=await q(e,n,{duration:s},{strategy:o,onStatus:a})}catch(e){console.log(`[${l}] Chunked import failed: ${e.message}, restarting attempt`),c=e?.message||c;break}if("content_import_timeout_reached"!==t.data?.status)return console.log(`[${l}] Chunked import complete`),{success:!0,data:t.data,requestsPayload:{...n,...t.data}};console.log(`[${l}] Chunk completed, more content remaining (processed: ${t.data.total_processed}/${t.data.total_posts})`),n={...n,importer_data:t.data.importer_data}}r++;continue}console.log(`[${l}] Success on attempt ${r+1} (took ${d}ms)`);let p=t;return u.data&&null!=u.data&&"Object"===u.data.constructor.name&&(p={...t,...u.data}),{success:!0,data:u.data,requestsPayload:p}}throw console.log(`[${l}] All ${n} attempts failed`),new Error(c||I)};var Z=function({style:t,nextStep:n}){const{is_child_theme:o}=(0,e.useContext)(B),{setCurrentlyInstalledDemo:l,setCurrentDemo:c,currentDemo:s,demos_list:i,pluginsStatus:u,setPluginsStatus:m}=(0,e.useContext)(ke),[d,p]=(0,e.useState)("idle"),[f,h]=(s||"").split(":"),g=i.filter(function({name:e}){return e===f});return(0,e.createElement)(r.animated.div,{className:"ct-modify-demo",style:t},"loading"===d&&(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",{className:"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",{className:"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",{className:"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,a.__)("Removing starter site...","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("Please wait and avoid closing this window while the starter site removal process is in progress.","blocksy-companion"))),"done"===d&&(0,e.createElement)(e.Fragment,null,(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"}))),(0,e.createElement)("h2",null,(0,a.__)("Starter Site Removed","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("The starter site has been successfully removed. You may now close this window.","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(),c(`${f}:hide`)}},(0,a.__)("Close Now","blocksy-companion")))),"idle"===d&&(0,e.createElement)(e.Fragment,null,(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"}))),(0,e.createElement)("h2",null,(0,a.__)("This starter site is already installed","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("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){p("loading"),async function(){const e={erase_content:{requests:[{title:(0,a.__)("Erase content","blocksy-companion"),params:{action:"blocksy_demo_erase_content",wp_customize:"on"}}]},deactivate_demo_plugins:{requests:[{title:(0,a.__)("Deactivate demo plugins","blocksy-companion"),params:{action:"blocksy_demo_deactivate_plugins",plugins:g[0].plugins.join(":")}}]},deregister_current_demo:{requests:[{title:(0,a.__)("Erase content","blocksy-companion"),params:{action:"blocksy_demo_deregister_current_demo"}}]}},t=["erase_content","deactivate_demo_plugins","deregister_current_demo"];for(const n of t){const t=e[n];if(t&&0!==t.requests.length)for(const e of t.requests){try{await U(e,{})}catch(t){console.error(`[${e.title}] Failed:`,t.message)}"deactivate_demo_plugins"===n&&m({...u,...g[0].plugins.reduce(function(e,t){return{...e,[t]:!1}},{})})}}p("done")}(),e.preventDefault(),l()}},(0,a.__)("Remove","blocksy-companion")),(0,e.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},(0,a.__)("Reinstall","blocksy-companion")))))};var J=function({demoConfiguration:t,setDemoConfiguration:n,style:o}){const{is_child_theme:l,child_theme_exists:c}=(0,e.useContext)(B);return(0,e.createElement)(r.animated.div,{className:"ct-demo-child",style:o},(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"}))),c?(0,e.createElement)("h2",null,(0,a.__)("Activate Child Theme","blocksy-companion")):(0,e.createElement)("h2",null,(0,a.__)("Install Child Theme","blocksy-companion")),!l&&(0,e.createElement)(e.Fragment,null,c?(0,e.createElement)("p",null,(0,a.__)("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,a.__)("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)(V,{checked:t.child_theme,position:"end",onChange:function(){return n({...t,child_theme:!t.child_theme})}},c?(0,a.__)("Activate Child Theme","blocksy-companion"):(0,a.__)("Install Child Theme","blocksy-companion")))),l&&(0,a.__)("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,a.__)("Learn more about child themes","blocksy-companion")))};var Y=function({demoConfiguration:t,setDemoConfiguration:n,style:o}){const{currentDemo:l,demos_list:c,pluginsStatus:s,setCurrentDemo:i}=(0,e.useContext)(ke),[u,m]=(l||"").split(":"),d=c.filter(function({name:e}){return e===u||""});return(0,e.createElement)(r.animated.div,{style:o},d.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,a.__)("Choose Page Builder","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("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":d.length},d.sort(function(e,t){return e.buildert.builder?1:0}).map(function({builder:o,plugins:a}){return(0,e.createElement)("li",{key:o,className:S()({active:o===(null===t.builder?d[0].builder:t.builder)}),onClick:function(){n({...t,builder:o,plugins:a.map(function(e){return{plugin:e,enabled:!0}})})}},(0,e.createElement)("figure",null,(0,e.createElement)("span",{className:S()("ct-checkbox",{active:o===(null===t.builder?d[0].builder:t.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"},O(o)||"Gutenberg"))}))))};var K=function({demoConfiguration:t,setDemoConfiguration:n,currentDemo:o,style:l}){return(0,e.createElement)(r.animated.div,{style:l},(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,a.__)("Import Content","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("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(o){return(0,e.createElement)(V,{checked:t.content[o],onChange:function(){return n({...t,content:{...t.content,[o]:!t.content[o]}})},key:o},o.split("_").map(function(e){return e.replace(/^\w/,function(e){return e.toUpperCase()})}).join(" "))}),(0,e.createElement)(V,{checked:t.content.erase_content,className:"ct-demo-erase",onChange:function(){return n({...t,content:{...t.content,erase_content:!t.content.erase_content}})}},(0,e.createElement)("div",null,(0,a.__)("Clean Install","blocksy-companion"),(0,e.createElement)("i",null,(0,a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion")))))))};var X=function(){const{home_url:t,customizer_url:n}=(0,e.useContext)(B);return(0,e.createElement)("div",{className:"ct-install-success"},(0,e.createElement)("h2",null,(0,a.__)("Starter Site Imported Successfully","blocksy-companion")),(0,e.createElement)("p",null,(0,a.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,e.createElement)("div",null,(0,e.createElement)("a",{href:n,className:"ct-button"},(0,a.__)("Customize","blocksy-companion")),(0,e.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},(0,a.__)("View site","blocksy-companion"))))};const Q=function(e){e.preventDefault(),e.returnValue=""},ee=function({demoConfiguration:e,pluginsStatus:t,is_child_theme:n,includeMetaSteps:o=!1}){let a=[];return o&&a.push("register_current_demo"),e.child_theme&&(n||a.push("child_theme")),e.plugins.filter(function({enabled:e,plugin:n}){return!!e&&!t[n]}).length>0&&a.push("plugins"),e.content.erase_content&&a.push("erase_content"),e.content.options&&a.push("options"),e.content.widgets&&a.push("widgets"),e.content.content&&a.push("content"),o&&a.push("install_finish"),a},te=function(t){const{demos_list:n,currentDemo:o,setInstallerBlockingReleased:r,setCurrentlyInstalledDemo:l,pluginsStatus:c}=(0,e.useContext)(ke),{is_child_theme:s}=(0,e.useContext)(B),[i,u]=(0,e.useState)(!1),[m,d]=(0,e.useState)(null),[p,f]=(0,e.useState)(!1),[h,g]=(0,e.useState)(0),b=(0,e.useMemo)(function(){const[e,a]=(o||"").split(":"),r=n.filter(function({name:t}){return t===e}).sort(function(e,t){return e.buildert.builder?1:0});return`${o}:${null===t.builder?r[0].builder:t.builder}`},[o,t,n]),y=(0,e.useMemo)(function(){return ee({demoConfiguration:t,pluginsStatus:c,is_child_theme:s,includeMetaSteps:!0})},[t,c,s]),_=(0,e.useCallback)(async function(e){const n=function(e){const{currentDemoWithVariation:t,demoConfiguration:n,pluginsStatus:o,demoContent:r}=e,l=n.plugins.filter(function({enabled:e,plugin:t}){return e&&!o[t]}).map(function({plugin:e}){return e});return{register_current_demo:{requests:[{title:(0,a.__)("Preparing data...","blocksy-companion"),params:{action:"blocksy_demo_register_current_demo",demo_name:t}}]},child_theme:{requests:[{title:(0,a.__)("Child theme","blocksy-companion"),params:{action:"blocksy_demo_install_child_theme"}}]},plugins:{requests:l.map(function(e){return{title:(0,a.sprintf)((0,a.__)("Installing %s","blocksy-companion"),O(e)),params:{action:"blocksy_demo_activate_plugins",plugins:e,plugin_name:{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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[e]||e}}})},erase_content:{requests:[{title:(0,a.__)("Preparing content","blocksy-companion"),params:{action:"blocksy_demo_erase_content"}}]},options:{requests:[{title:(0,a.__)("Import options","blocksy-companion"),params:{action:"blocksy_demo_install_options",demo_name:t}}]},widgets:{requests:[{title:(0,a.__)("Import widgets","blocksy-companion"),params:{action:"blocksy_demo_install_widgets",demo_name:t},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"widgets"}}}]},content:{requests:[{title:(0,a.__)("Import content","blocksy-companion"),params:{action:"blocksy_demo_install_content",demo_name:t},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"content"}}}]},install_finish:{requests:[{title:(0,a.__)("Final touches","blocksy-companion"),params:{action:"blocksy_demo_install_finish"}}]}}}({currentDemoWithVariation:b,demoConfiguration:t,pluginsStatus:c,demoContent:e}),o=y.length;let l=0,s={};const i=function(e,t=null){console.timeEnd("Blocksy:Dashboard:DemoInstall"),e?u(!0):f(t),r(!0),window.removeEventListener("beforeunload",Q)};for(const e of y){const t=n[e];if(t&&0!==t.requests.length){for(const e of t.requests){d(e.title);const t="blocksy_demo_install_content"===e.params.action;try{s=(await U(e,s,t?{strategy:"sse",onStatus:function(e){d(e)}}:{})).requestsPayload}catch(e){return void i(!1,e.message)}}l++,g(l/o*100),o===l&&i(!0)}}},[y,g]),v=(0,e.useCallback)(async function(){window.addEventListener("beforeunload",Q),console.time("Blocksy:Dashboard:DemoInstall"),l({demo:`${o}:${t.builder}`}),d((0,a.__)("Preparing data...","blocksy-companion"));const e=await fetch(R({action:"blocksy_demo_get_content_preliminary_data",demo_name:b}));if(200===e.status){const t=await e.json();if(!t.success)return void f(t.data.message||I);_(t.data)}},[_,b]);return(0,e.useEffect)(function(){v()},[]),{isCompleted:i,isError:p,lastMessage:m,progress:h}};var ne=function({lastMessage:t,progress:n}){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",{className:"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",{className:"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",{className:"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,a.__)("Installing","blocksy-companion"),"..."),(0,e.createElement)("p",null,(0,a.__)("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"},(0,e.createElement)("span",{className:"ct-progress-label"},t),(0,e.createElement)("span",{className:"ct-progress-counter"},Math.round(n),"%")),(0,e.createElement)("div",{style:{"--progress":`${n}%`},className:"ct-installer-progress"},(0,e.createElement)("div",null)))};var oe=function({isError:t}){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,a.__)("Can't Import Starter Site","blocksy-companion")),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:t}}),(0,e.createElement)("a",{href:"https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-import-stuck-at-xx/",className:"ct-demo-btn",target:"_blank"},(0,a.__)("More Information","blocksy-companion")))};var ae=function({demoConfiguration:t,style:n}){const{isCompleted:o,isError:a,lastMessage:l,progress:c}=te(t),s=o?"complete":a?"error":"progress";return(0,e.createElement)(r.animated.div,{className:"ct-demo-install",style:n},(0,e.createElement)(r.Transition,{initial:!0,items:s,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},function(t,n){return(0,e.createElement)(r.animated.div,{style:t},"complete"===n&&(0,e.createElement)(X,null),"error"===n&&(0,e.createElement)(oe,{isError:a}),"progress"===n&&(0,e.createElement)(ne,{lastMessage:l,progress:c}))}))};var re=function({location:t,navigate:n}){const[o,l]=(0,e.useState)(!0),{installerBlockingReleased:c,demos_list:s,currentDemo:i,pluginsStatus:u,currentlyInstalledDemo:m,setCurrentDemo:d,filters:p}=(0,e.useContext)(ke),{is_child_theme:f}=(0,e.useContext)(B),[h,g]=(0,e.useState)(m),[b,y]=(0,e.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),[_,v]=(0,e.useState)(0),[E,k]=(i||"").split(":"),w=["modify_demo","builder","content","plugins","installer"].filter(function(e){if(!i)return!1;if("modify_demo"===e){if(!h)return!1;if(-1===h.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;const t=s.filter(function({name:e}){return e===E}).sort(function(e,t){return e.buildert.builder?1:0});return("plugins"!==e||0!==t.reduce(function(e,t){return[...e,...t.plugins||[]]},[]).filter(function(e){return!u[e]}).length)&&("builder"!==e||t.length>1)}),C=w[_],x=_===w.indexOf("installer")-1;return(0,e.useEffect)(function(){if(!E)return;if(i.indexOf(":hide")>-1)return;const e=s.filter(function({name:e}){return e===E}).sort(function(e,t){return e.buildert.builder?1:0});v(0),g(m);let t=e[0];if("all"!==p.builder){const n=e.find(function({builder:e}){return e===p.builder});n&&(t=n)}y({builder:t.builder,child_theme:!1,plugins:t.plugins.map(function(e){return{plugin:e,enabled:!0}}),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})},[i]),(0,e.createElement)(r.Overlay,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:S()("ct-demo-modal",{"ct-demo-installer":"installer"===C||"modify_demo"===C}),onDismiss:function(){("installer"!==C||c)&&d(`${E}:hide`)},onDismissed:function(){v(0)},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)(r.Transition,{items:C,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,n){return(0,e.createElement)(e.Fragment,null,"modify_demo"===n&&(0,e.createElement)(Z,{demoConfiguration:b,nextStep:function(){v(Math.min(_+1,w.length-1))},style:t}),"child_theme"===n&&(0,e.createElement)(J,{style:t,demoConfiguration:b,setDemoConfiguration:y}),"plugins"===n&&(0,e.createElement)(H,{demoConfiguration:b,style:t,setDemoConfiguration:y}),"builder"===n&&(0,e.createElement)(Y,{style:t,demoConfiguration:b,setDemoConfiguration:y}),"content"===n&&(0,e.createElement)(K,{style:t,demoConfiguration:b,setDemoConfiguration:y}),"installer"===n&&(0,e.createElement)(ae,{style:t,demoConfiguration:b}))})),"installer"!==C&&"modify_demo"!==C&&(0,e.createElement)("div",{className:"ct-demo-step-controls"},_>0&&(0,e.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){v(Math.max(_-1,0))}},(0,a.__)("Back","blocksy-companion")),w.length>2&&(0,e.createElement)("ul",{className:"ct-steps-pills"},w.map(function(t,n){return n===w.length-1?null:(0,e.createElement)("li",{className:S()({active:t===C}),key:t},n+1)})),(0,e.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:x&&0===ee({demoConfiguration:b,pluginsStatus:u,is_child_theme:f}).length,onClick:function(){v(Math.min(_+1,w.length-1))}},x?(0,a.__)("Install","blocksy-companion"):(0,a.__)("Next","blocksy-companion"))))}})},le=window.wp.components,ce=window.React;function se(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t{const r={...o,className:ie(t,{"is-pressed":n})||void 0,"aria-hidden":!0,focusable:!1};return(0,e.createElement)("svg",{...r,ref:a})});ue.displayName="SVG";var me=(0,ce.createElement)(ue,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ce.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"})),de=n(213),pe=n.n(de);var fe=function({allPlans:t,allCategories:n}){const[o,l]=(0,e.useState)(!1),[c,s]=(0,e.useState)(!1),[i,u]=(0,e.useState)([]),[m,d]=(0,e.useState)(null),[p,f]=(0,e.useState)(""),[h,g]=(0,e.useState)([]);(0,e.useEffect)(function(){!async function(){const e=new FormData;e.append("action","blocksy_demo_get_export_data"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce);try{const t=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e});if(200===t.status){const{success:e,data:n}=await t.json();if(e){const e=n.data;e&&e.builder&&f(e.builder),e&&e.plugins&&g(e.plugins),e&&e.demoId&&d(parseFloat(e.demoId))}}}catch(e){}}(),async function(){try{const e=await fetch("https://creativethemes.com/blocksy/wp-json/ct/v1/starter-sites",{method:"GET"});if(200===e.status){const t=await e.json();u(t)}}catch(e){}}()},[]);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){s(!0)}},(0,e.createElement)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fillRule:"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,a.__)("Export Site")),(0,e.createElement)(r.Overlay,{items:c,className:"ct-site-export-modal",onDismiss:function(){return s(!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,a.__)("Starter site","blocksy-companion")),(0,e.createElement)("select",{value:m,onChange:function({target:{value:e}}){return d(parseFloat(e))}},(0,e.createElement)("option",{value:""},(0,a.__)("Select a starter site","blocksy-companion")),i.sort(function(e,t){const n=e.title.toLowerCase(),o=t.title.toLowerCase();return no?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,a.__)("Builder","blocksy-companion")),(0,e.createElement)("input",{type:"text",placeholder:(0,a.__)("Builder","blocksy-companion"),value:p,onChange:function({target:{value:e}}){return f(e)}}))),(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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}).filter(function(e){return"gutenberg"!==e}).map(function(t){return(0,e.createElement)("label",{tabindex:"0",onClick:function(e){e.preventDefault(),g(function(e){return e.includes(t)?e.filter(function(e){return e!==t}):[...e,t]})}},(0,e.createElement)("input",{type:"checkbox",checked:h.indexOf(t)>-1,onChange:function({target:{checked:e}}){}}),(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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[t]))})))),(0,e.createElement)("div",{className:"ct-modal-actions has-divider"},(0,e.createElement)("button",{className:"button button-primary",disabled:o,onClick:function(){return async function(){l(!0);const e=new FormData;e.append("action","blocksy_demo_export"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),e.append("demoId",m),e.append("builder",p),e.append("plugins",h.join(",")),e.append("wp_customize","on");try{const n=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e});if(200===n.status){const{success:e,data:o}=await n.json();if(e){const e=i.find(function(e){return e.id===m}),n={name:e.title,url:e.demo_live_link,is_pro:"Pro"===e.is_pro,categories:e.categories,keywords:e.keywords,..."Pro"===e.is_pro&&e.plans?{plans:["personal","professional","agency",...e.plans.map(function(e){return`${e}_v2`})]}:{},...o.demo};"elementor"===n.builder.toLowerCase()&&(n.elementor_experiment_container=!0),console.log("Blocksy:Dashboard:DemoInstall:exported",{remoteDemo:e,finalDemo:n});var t=new Blob([JSON.stringify(n)],{type:"text/plain;charset=utf-8"});pe().saveAs(t,`${e.title}.json`)}}}catch(e){}l(!1)}()}},o?(0,a.__)("Loading...","blocksy-companion"):(0,a.__)("Export site","blocksy-companion"))))}}))};const he={all:(0,a.__)("All Plans","blocksy-companion"),free:(0,a.__)("Free","blocksy-companion"),pro:(0,a.__)("Pro","blocksy-companion")};var ge=function(){const{unfiltered_demos_list:t,filters:n,setFilters:o,allPlans:r,allCategories:l}=(0,e.useContext)(ke),c=t.reduce(function(e,t){let 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)(le.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",fillRule:"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"===n.category?(0,a.__)("All Categories","blocksy-companion"):n.category,text:"all"===n.category?(0,a.__)("All Categories","blocksy-companion"):n.category},function(){return["all",...l].map(function(t){const r=n.category===t;return(0,e.createElement)(le.MenuItem,{key:t,icon:r?(0,e.cloneElement)(me,{width:24,height:24}):null,isSelected:r,onClick:function(){o({...n,category:t})}},"all"===t?(0,a.__)("All Categories","blocksy-companion"):t)})}),(0,e.createElement)(le.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",fillRule:"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:he[n.plan],text:he[n.plan]},function(){return["all","free","pro"].map(function(t){const a=n.plan===t;return(0,e.createElement)(le.MenuItem,{key:t,icon:a?(0,e.cloneElement)(me,{width:24,height:24}):null,isSelected:a,onClick:function(){o({...n,plan:t})}},he[t])})}),(0,e.createElement)(le.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",fillRule:"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"===n.builder?(0,a.__)("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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[n.builder],text:"all"===n.builder?(0,a.__)("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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[n.builder]},function(){return["all",...c].map(function(t){const r=n.builder===t;return(0,e.createElement)(le.MenuItem,{key:t,icon:r?(0,e.cloneElement)(me,{width:24,height:24}):null,isSelected:r,onClick:function(){o({...n,builder:t})}},"all"===t?(0,a.__)("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","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[t])})}),ct_localizations.is_dev_mode&&(0,e.createElement)(fe,{allPlans:r,allCategories:l}),(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,a.__)("Search for a starter site...","blocksy-companion"),value:n.search,onChange:function(e){o({...n,search:e.target.value})}})))};const be=[{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"}],ye=["Blog","Business","Ecommerce","News","Nonprofit","Personal","Portfolio","Travel"];function _e(e,t){var n=t.length,o=e.length;if(o>n)return!1;if(o===n)return e===t;e:for(var a=0,r=0;a Error code - %s","blocksy-companion"),'',"",v.message)}}),"remote_fetch_failed"===v.reason&&(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:sprintf((0,a.__)("Failed to retrieve starter sites list.
Error code - %s","blocksy-companion"),v.message)}}),"generic"===v.reason&&(0,e.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:v.message}}),(0,e.createElement)(P,null)):(0,e.createElement)(r.animated.div,{style:t},(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ke.Provider,{value:{currentDemo:d,pluginsStatus:u,setPluginsStatus:m,installerBlockingReleased:x,setInstallerBlockingReleased:S,setCurrentDemo:p,currentlyInstalledDemo:f,setCurrentlyInstalledDemo:h,unfiltered_demos_list:g.unfiltered_demos_list,demos_list:g.demos_list,filters:g.filters,setFilters:g.setFilters,allPlans:g.allPlans,allCategories:g.allCategories}},g.display(),(0,e.createElement)($,null),(0,e.createElement)(re,null)),(0,e.createElement)(P,null)))}))};_().then(function(e){511===e.status&&fetch(`${ctDashboardLocalizations.ajax_url}?action=blocksy_dashboard_handle_incorrect_license`,{method:"POST",body:JSON.stringify({}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function({success:e,data:t}){})}).catch(function(e){console.error("Error:",e)}),o().on("ct:dashboard:routes",function(t){t.push({Component:function(t){return(0,e.createElement)(C,t)},path:"/extensions"}),t.push({Component:function(t){return(0,e.createElement)(A,t)},path:"/extensions/:extension"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&t.push({Component:function(t){return(0,e.createElement)(Ce,t)},path:"/demos"})}),o().on("ct:dashboard:navigation-links",function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,a.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function({isPartiallyCurrent:e,isCurrent:t}){return e?{"aria-current":"page"}:{}}}),e.push({text:(0,a.__)("Extensions","blocksy-companion"),path:"/extensions",onClick:function(e){location.hash.indexOf("extensions")>-1&&e.preventDefault()},getProps:function({isPartiallyCurrent:e,isCurrent:t}){return{...e||t?{"aria-current":"page"}:{}}}})}),o().on("ct:dashboard:heading:after",function(t){ctDashboardLocalizations.plugin_data.is_pro&&(t.content=(0,e.createElement)("span",null,"PRO"))})}()}();