Version Description
- Add: New Templates and hooks
- Update: API call for template data.
Download this release
Release Info
Developer | britner |
Plugin | Starter Templates by Kadence WP |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.2.0
- assets/css/starter-templates.css +1 -1
- assets/js/starter-templates.asset.php +1 -1
- assets/js/starter-templates.js +1 -1
- class-kadence-starter-templates.php +258 -1687
- inc/class-downloader.php +4 -6
- inc/class-helpers.php +23 -23
- inc/class-import-actions.php +1 -3
- inc/class-importer.php +30 -2
- inc/class-template-database-importer.php +463 -0
- inc/react/src/full-preview-mode.js +52 -30
- inc/react/src/index.js +329 -107
- inc/react/src/single-template-import.js +10 -8
- inc/react/src/starter-templates.scss +98 -0
- kadence-starter-templates.php +2 -2
- readme.txt +5 -1
- vendor/wxr-importer/WXRImporter.php +8 -7
assets/css/starter-templates.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_back{height:100%}.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:70px}.kadence_theme_dash_back .components-button.kt-import-back{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0}.kst-import-options-title{line-height:20px;padding-top:5px;font-size:12px;text-transform:uppercase;text-align:center;margin:0;color:#4a5568}.appearance_page_kadence-starter-templates .expanded .wp-full-overlay-footer{height:70px}.kadence_theme_dash_back .components-button.kt-import-back:hover{border-left:1px solid #cbd5e0;border-right:1px solid #cbd5e0;background:#f6f9fd}.kadence_theme_dash_back .components-button.kt-import-back svg{width:30px;height:30px;margin:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-button svg.kst-chev{width:16px}.components-modal__frame.kst-import-modal{min-width:460px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12),.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11){padding-top:20px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg:before,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg:before{content:"dark";color:#111}.kst-import-selection-options{padding-bottom:90px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg{position:absolute;left:2px;top:-1px;right:2px;display:block;bottom:auto;opacity:.2;height:1px;border-radius:0}.components-modal__frame.kst-import-modal .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.kst-selected-font-pair{display:flex;align-items:center;margin-bottom:20px}.kst-selected-font-pair img{max-width:50px}h3.kst-selected-font-pair-title{margin-bottom:0}.kadence-starter-templates-preview .install-theme-info p.desc-small,.kadence-starter-templates-preview .kadence-starter-required-plugins p.desc-small{color:#4a5568;font-style:italic}.kadence-starter-templates-preview .install-theme-info .theme-screenshot{width:60px;margin:15px 15px 15px 0}.kadence-starter-templates-preview .theme-info-wrap{display:flex;align-items:center}.kadence-starter-templates-preview .install-theme-info{padding-bottom:0}.kst-choose-builder-wrap{min-height:calc( 100vh - 180px );max-width:400px;margin:0 auto;display:flex;align-items:center}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button{box-shadow:none !important}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button.active-item{border:1px solid #a0aec0}.kst-choose-builder-center{width:100%;background:#fff;padding:30px;border-radius:4px;box-shadow:0px 25px 35px -10px rgba(0,0,0,.05);position:relative}.kst-choose-builder-center .kst-overlay-saving{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);border-radius:4px}.kst-choose-builder-inner{display:grid;grid-template-columns:1fr 1fr;grid-gap:30px}.kst-choose-builder-center h2.kst-choose-builder-title{margin-top:0;text-align:center;text-transform:uppercase;font-weight:300;margin-bottom:30px;font-size:20px;color:#718096}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type{font-size:20px;text-align:center;height:auto;padding:20px;display:flex;border:1px solid #cbd5e0;border-radius:4px;flex-direction:column;font-weight:500;text-transform:uppercase;color:#4a5568}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type svg{width:100px;height:100px;margin-bottom:10px;margin-right:0}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type:hover{color:#2d3748;border-color:#007cba}.components-button-group.kst-font-group{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1em}.components-button-group.kst-font-group .components-button.kst-font-btn{display:block;height:auto;padding:5px 5px 0;border:1px solid #eee;border-radius:0;background:#fff;outline:0;box-shadow:none}.components-button-group.kst-font-group .components-button.kst-font-btn img.font-pairing{max-width:100%}.font-title-wrap,.palette-title-wrap{display:flex;align-items:center;justify-content:space-between}.font-title-wrap h2,.palette-title-wrap h2{font-size:16px;font-weight:600;color:#4a5568}.kadence-starter-required-plugins{padding:10px 20px 10px}.font-title-wrap,.kadence-starter-required-plugins{border-top:1px solid #e2e8f0;padding-top:6px;margin-top:18px}.kadence-starter-required-plugins h2.kst-required-title{font-size:16px;font-weight:600;color:#4a5568}.components-button-group.kst-font-group .components-button.kst-font-btn.active{border-color:#333}.components-button-group.kst-font-group .components-button.kst-font-btn:hover{border-color:#999}.kadence_theme_starter_dash_inner{margin:90px 20px 0}.kadence_theme_dash_head .st2{fill:#191717}.install-theme-info .components-button.has-icon .dashicons-image-rotate{width:10px;height:10px;font-size:10px}.kadence_theme_dash_head{background:#fff;padding:0px 20px;height:60px;border-bottom:1px solid #ebebeb;box-shadow:0 0 6px -2px rgba(0,0,0,.1);position:fixed;top:32px;left:160px;z-index:100;right:0}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:flex;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:flex;height:100%;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_starter_builder_type{flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.folded .kadence_theme_dash_head{left:36px}@media only screen and (max-width: 960px){.auto-fold .kadence_theme_dash_head{left:36px}}@media screen and (max-width: 782px){.auto-fold .kadence_theme_dash_head{left:0px}}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar{border-color:#888}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button{padding:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button svg{width:40px;height:40px}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar .components-dropdown__content button.components-button svg{width:24px;height:24px;margin-left:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown__content{text-align:left}.wrap.kadence_theme_starter_dash{margin:0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;overflow:hidden;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.components-modal__frame.kst-import-modal{max-width:600px}.components-modal__frame.kst-import-modal .components-button.is-primary{margin-top:20px}.kadence_starter_templates_notice{background:transparent;margin-bottom:20px;border:1px solid #cbd5e0;padding:10px;color:#4a5568;font-weight:normal}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:20px;color:#c05621;font-weight:bold}.kst-import-selection-title .components-button.kt-import-back{border:1px solid;margin-right:10px}.kst-import-selection-title{display:flex;align-items:center;margin-bottom:10px}.kst-grid-single-item-single-page .kst-template-item{padding-bottom:90%}.kadence_starter_templates_response h2{margin-bottom:10px;margin-top:0}.kst-template-item{position:relative;height:0;box-shadow:0 1px 2px rgba(0,0,0,.15);padding-bottom:65%}.kst-template-item::after{content:"";position:absolute;z-index:-1;width:100%;height:100%;opacity:0;border-radius:5px;box-shadow:0 15px 15px -10px rgba(0,0,0,.1);transition:opacity .3s ease-in-out}.kst-template-item:hover::after{opacity:1}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:flex;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:flex;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:flex;margin-top:0;align-items:center;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px;padding:0}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:inline-flex;align-items:flex-end;justify-content:center;border:1px solid transparent;position:relative;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn .kst-palette-bg{display:none}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #999;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#fff;border:1px solid #333;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:#fff;position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:14px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}@media(max-width: 1860px){.kadence-starter-templates-preview .kadence-swatche-item-wrap{width:22px !important;height:22px !important}h2.palette-title{font-size:15px}}@media(max-width: 1059px){.templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}p.install-third-party-notice{max-width:540px;background:#fffaf0;padding:1em;color:#c05621;border:1px solid #c05621;font-weight:600}.plugin-install-required{display:block;font-style:oblique;font-weight:400;color:#c05621}.kadence-required-wrap{font-weight:bold;list-style:disc;padding-left:1.4em}span.plugin-status{text-transform:uppercase;color:#718096}.kst-palette-btn.kst-selected-color-palette{display:flex;margin-bottom:20px}.finshed-notice-success .button-primary.button.kadence-starter-templates-finish-button{padding:10px 16px;font-size:18px}.kst-grid-single-site{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);grid-gap:4em}.kst-import-selection{height:100%;max-height:calc(100vh - 140px);overflow-y:scroll}.kst-import-grid-title h2{font-size:14px;line-height:20px;margin:10px 0;color:#4a5568}.kst-import-selection-title h2{font-size:16px;line-height:26px;margin:0 0 10px 0;color:#2d3748}.kst-import-single-selection-options-wrap{background:#fff;padding:35px 35px 35px;max-width:700px;width:100%;box-sizing:border-box}.appearance_page_kadence-starter-templates #wpbody-content{padding-bottom:25px}.desc-small.note-about-colors{font-size:14px;color:#718096;margin:1.5em 0}.kst-import-selection-options .kst-template-item{padding-bottom:126%}.kst-import-selection img{max-width:100%}.kst-import-selection-title h2 span{font-weight:bold;color:#000}.appearance_page_kadence-starter-templates .update-nag.notice,.appearance_page_kadence-starter-templates #wpfooter{display:none}.kadence_theme_starter_dashboard>.notice{display:none}.demo-title h4 span{position:absolute;bottom:100%;right:0;padding:5px 15px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;font-weight:400;opacity:0}.kst-import-btn:hover .demo-title h4 span{opacity:1}.kst-import-selection-options .kst-template-item .components-button.kst-import-btn .LazyLoad{overflow-y:hidden;position:absolute;top:0;left:0;right:0;bottom:40px}.kst-import-single-selection-options-wrap .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto;margin-top:20px}.kst-import-selection-footer{position:fixed;padding:10px 20px;bottom:0;background:#fff;right:0;left:0;margin-left:160px;z-index:100;display:flex;justify-content:space-between;align-items:center}button.components-button.kt-import-fullsite.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.folded .kst-import-selection-footer{margin-left:36px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 2360px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}.kst-import-single-selection-options-wrap .components-base-control.components-toggle-control{margin-bottom:15px;border-top:1px solid #e2e8f0;padding-top:15px}.components-modal__frame.ksp-confirm-modal{max-width:500px}.ksp-override-model-buttons{text-align:right}.ksp-override-model-buttons .components-button{margin-left:10px}.main-panel{margin:0 auto;max-width:1260px}.main-panel .kst-grid-single-site{grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);grid-gap:3em}.kst-import-selection-bottom{text-align:center;margin-top:40px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;max-width:1260px}.kst-template-item{padding-bottom:126%}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{display:flex}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button:not(.button-primary){margin-right:10px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}
|
1 |
+
.kb-pro-template{padding:4px 10px;position:absolute;z-index:10000;bottom:10px;right:10px;background:#c53030;background:#4a5568;border-radius:10px;line-height:20px;color:#fff;text-transform:uppercase;font-weight:bold;font-size:11px;text-align:center}.bundle-install-required .plugin-status{color:#c53030}a.components-external-link.kst-upgrade.button-hero.button.button-primary{width:80%;min-height:36px;line-height:2.5;font-size:14px;text-align:center}.kt-upgrade-notice{display:flex;flex-direction:column;justify-content:center;align-items:center;height:70px}.kt-popover-pro-notice{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;opacity:0;z-index:10;text-align:center;background:rgba(255,255,255,.9);transition:opacity .3s ease-in-out}.kt-popover-pro-notice .components-external-link{background:#007cba;padding:10px 10px;color:#fff;border-radius:4px;text-decoration:none}.kt-popover-pro-notice:hover{opacity:1}.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_back{height:100%}.kst-choose-builder-wrap.adjust-to-three-column{max-width:600px}.kst-choose-builder-wrap.adjust-to-three-column .kst-choose-builder-inner{grid-template-columns:1fr 1fr 1fr}.kadence_theme_dash_head .components-menu-items__item-icon.custom-image-icon-src{margin-right:10px}.kst-choose-builder-inner img.custom-image-icon-src{width:100px;max-height:100px;height:auto}.custom-image-icon-src,.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button img{max-width:100%;width:24px;max-height:24px;height:auto}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0;justify-content:center}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon svg{margin:0;width:18px;height:18px}.kadence_theme_dash_reload{height:100%}.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:70px}.kadence_theme_dash_back .components-button.kt-import-back{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0}.kst-import-options-title{line-height:20px;padding-top:5px;font-size:12px;text-transform:uppercase;text-align:center;margin:0;color:#4a5568}.appearance_page_kadence-starter-templates .expanded .wp-full-overlay-footer{height:70px}.kadence_theme_dash_back .components-button.kt-import-back:hover{border-left:1px solid #cbd5e0;border-right:1px solid #cbd5e0;background:#f6f9fd}.kadence_theme_dash_back .components-button.kt-import-back svg{width:30px;height:30px;margin:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-button svg.kst-chev{width:16px}.components-modal__frame.kst-import-modal{min-width:460px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12),.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11){padding-top:20px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg:before,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg:before{content:"dark";color:#111}.kst-import-selection-options{padding-bottom:90px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg{position:absolute;left:2px;top:-1px;right:2px;display:block;bottom:auto;opacity:.2;height:1px;border-radius:0}.components-modal__frame.kst-import-modal .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.kst-selected-font-pair{display:flex;align-items:center;margin-bottom:20px}.kst-selected-font-pair img{max-width:50px}h3.kst-selected-font-pair-title{margin-bottom:0}.kadence-starter-templates-preview .install-theme-info p.desc-small,.kadence-starter-templates-preview .kadence-starter-required-plugins p.desc-small{color:#4a5568;font-style:italic}.kadence-starter-templates-preview .install-theme-info .theme-screenshot{width:60px;margin:15px 15px 15px 0}.kadence-starter-templates-preview .theme-info-wrap{display:flex;align-items:center}.kadence-starter-templates-preview .install-theme-info{padding-bottom:0}.kst-choose-builder-wrap{min-height:calc( 100vh - 180px );max-width:400px;margin:0 auto;display:flex;align-items:center}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button{box-shadow:none !important}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button.active-item{border:1px solid #a0aec0}.kst-choose-builder-center{width:100%;background:#fff;padding:30px;border-radius:4px;box-shadow:0px 25px 35px -10px rgba(0,0,0,.05);position:relative}.kst-choose-builder-center .kst-overlay-saving{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);border-radius:4px}.kst-choose-builder-inner{display:grid;grid-template-columns:1fr 1fr;grid-gap:30px}.kst-choose-builder-center h2.kst-choose-builder-title{margin-top:0;text-align:center;text-transform:uppercase;font-weight:300;margin-bottom:30px;font-size:20px;color:#718096}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type{font-size:20px;text-align:center;height:auto;padding:20px;display:flex;border:1px solid #cbd5e0;border-radius:4px;flex-direction:column;font-weight:500;text-transform:uppercase;color:#4a5568}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type svg{width:100px;height:100px;margin-bottom:10px;margin-right:0}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type:hover{color:#2d3748;border-color:#007cba}.components-button-group.kst-font-group{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1em}.components-button-group.kst-font-group .components-button.kst-font-btn{display:block;height:auto;padding:5px 5px 0;border:1px solid #eee;border-radius:0;background:#fff;outline:0;box-shadow:none}.components-button-group.kst-font-group .components-button.kst-font-btn img.font-pairing{max-width:100%}.font-title-wrap,.palette-title-wrap{display:flex;align-items:center;justify-content:space-between}.font-title-wrap h2,.palette-title-wrap h2{font-size:16px;font-weight:600;color:#4a5568}.kadence-starter-required-plugins{padding:10px 20px 10px}.font-title-wrap,.kadence-starter-required-plugins{border-top:1px solid #e2e8f0;padding-top:6px;margin-top:18px}.kadence-starter-required-plugins h2.kst-required-title{font-size:16px;font-weight:600;color:#4a5568}.components-button-group.kst-font-group .components-button.kst-font-btn.active{border-color:#333}.components-button-group.kst-font-group .components-button.kst-font-btn:hover{border-color:#999}.kadence_theme_starter_dash_inner{margin:90px 20px 0}.kadence_theme_dash_head .st2{fill:#191717}.install-theme-info .components-button.has-icon .dashicons-image-rotate{width:10px;height:10px;font-size:10px}.kadence_theme_dash_head{background:#fff;padding:0px 20px;height:60px;border-bottom:1px solid #ebebeb;box-shadow:0 0 6px -2px rgba(0,0,0,.1);position:fixed;top:32px;left:160px;z-index:100;right:0}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:flex;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:flex;height:100%;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_starter_builder_type{flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.folded .kadence_theme_dash_head{left:36px}@media only screen and (max-width: 960px){.auto-fold .kadence_theme_dash_head{left:36px}}@media screen and (max-width: 782px){.auto-fold .kadence_theme_dash_head{left:0px}}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar{border-color:#888}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button{padding:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button svg{width:40px;height:40px}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar .components-dropdown__content button.components-button svg{width:24px;height:24px;margin-left:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown__content{text-align:left}.wrap.kadence_theme_starter_dash{margin:0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;overflow:hidden;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.components-modal__frame.kst-import-modal{max-width:600px}.components-modal__frame.kst-import-modal .components-button.is-primary{margin-top:20px}.kadence_starter_templates_notice{background:transparent;margin-bottom:20px;border:1px solid #cbd5e0;padding:10px;color:#4a5568;font-weight:normal}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:20px;color:#c05621;font-weight:bold}.kst-import-selection-title .components-button.kt-import-back{border:1px solid;margin-right:10px}.kst-import-selection-title{display:flex;align-items:center;margin-bottom:10px}.kst-grid-single-item-single-page .kst-template-item{padding-bottom:90%}.kadence_starter_templates_response h2{margin-bottom:10px;margin-top:0}.kst-template-item{position:relative;height:0;box-shadow:0 1px 2px rgba(0,0,0,.15);padding-bottom:65%}.kst-template-item::after{content:"";position:absolute;z-index:-1;width:100%;height:100%;opacity:0;border-radius:5px;box-shadow:0 15px 15px -10px rgba(0,0,0,.1);transition:opacity .3s ease-in-out}.kst-template-item:hover::after{opacity:1}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:flex;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:flex;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:flex;margin-top:0;align-items:center;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px;padding:0}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:inline-flex;align-items:flex-end;justify-content:center;border:1px solid transparent;position:relative;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn .kst-palette-bg{display:none}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #999;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#fff;border:1px solid #333;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:#fff;position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:14px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}@media(max-width: 1860px){.kadence-starter-templates-preview .kadence-swatche-item-wrap{width:22px !important;height:22px !important}h2.palette-title{font-size:15px}}@media(max-width: 1059px){.templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}p.install-third-party-notice{max-width:540px;background:#fffaf0;padding:1em;color:#c05621;border:1px solid #c05621;font-weight:600}.plugin-install-required{display:block;font-style:oblique;font-weight:400;color:#c05621}.kadence-required-wrap{font-weight:bold;list-style:disc;padding-left:1.4em}span.plugin-status{text-transform:uppercase;color:#718096}.kst-palette-btn.kst-selected-color-palette{display:flex;margin-bottom:20px}.finshed-notice-success .button-primary.button.kadence-starter-templates-finish-button{padding:10px 16px;font-size:18px}.kst-grid-single-site{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);grid-gap:4em}.kst-import-selection{height:100%;max-height:calc(100vh - 140px);overflow-y:scroll}.kst-import-grid-title h2{font-size:14px;line-height:20px;margin:10px 0;color:#4a5568}.kst-import-selection-title h2{font-size:16px;line-height:26px;margin:0 0 10px 0;color:#2d3748}.kst-import-single-selection-options-wrap{background:#fff;padding:35px 35px 35px;max-width:700px;width:100%;box-sizing:border-box}.appearance_page_kadence-starter-templates #wpbody-content{padding-bottom:25px}.desc-small.note-about-colors{font-size:14px;color:#718096;margin:1.5em 0}.kst-import-selection-options .kst-template-item{padding-bottom:126%}.kst-import-selection img{max-width:100%}.kst-import-selection-title h2 span{font-weight:bold;color:#000}.appearance_page_kadence-starter-templates .update-nag.notice,.appearance_page_kadence-starter-templates #wpfooter{display:none}.kadence_theme_starter_dashboard>.notice{display:none}.demo-title h4 span{position:absolute;bottom:100%;right:0;padding:5px 15px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;font-weight:400;opacity:0}.kst-import-btn:hover .demo-title h4 span{opacity:1}.kst-import-selection-options .kst-template-item .components-button.kst-import-btn .LazyLoad{overflow-y:hidden;position:absolute;top:0;left:0;right:0;bottom:40px}.kst-import-single-selection-options-wrap .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto;margin-top:20px}.kst-import-selection-footer{position:fixed;padding:10px 20px;bottom:0;background:#fff;right:0;left:0;margin-left:160px;z-index:100;display:flex;justify-content:space-between;align-items:center}button.components-button.kt-import-fullsite.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.folded .kst-import-selection-footer{margin-left:36px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 2360px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}.kst-import-single-selection-options-wrap .components-base-control.components-toggle-control{margin-bottom:15px;border-top:1px solid #e2e8f0;padding-top:15px}.components-modal__frame.ksp-confirm-modal{max-width:500px}.ksp-override-model-buttons{text-align:right}.ksp-override-model-buttons .components-button{margin-left:10px}.main-panel{margin:0 auto;max-width:1260px}.main-panel .kst-grid-single-site{grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);grid-gap:3em}.kst-import-selection-bottom{text-align:center;margin-top:40px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;max-width:1260px}.kst-template-item{padding-bottom:126%}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{display:flex}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button:not(.button-primary){margin-right:10px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}
|
assets/js/starter-templates.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill', 'wp-primitives'), 'version' => '942bd15fe885788301502e995e2217cc');
|
assets/js/starter-templates.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=145)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(30),a=n(49),c=n(128),s=n(4);e.exports=function(e,t){return(s(e)?r:c)(e,a(t,3))}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(34),a="object"==typeof self&&self&&self.Object===Object&&self,c=r||a||Function("return this")();e.exports=c},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(62),a=n(67);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){var r=n(12),a=n(63),c=n(64),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?a(e):c(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(52),a=n(53),c=n(54),s=n(55),o=n(56);function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=c,i.prototype.has=s,i.prototype.set=o,e.exports=i},function(e,t,n){var r=n(32);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(3).Symbol;e.exports=r},function(e,t,n){var r=n(5)(Object,"create");e.exports=r},function(e,t,n){var r=n(76);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(29);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(47);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(48),a=n(2);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(134),c=m(a),s=m(n(135)),o=n(138),i=n(139),l=m(n(140)),u=m(n(141)),p=m(n(142)),f=m(n(143));function m(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.lazyLoadHandler=n.lazyLoadHandler.bind(n),e.throttle>0&&(e.debounce?n.lazyLoadHandler=(0,l.default)(n.lazyLoadHandler,e.throttle):n.lazyLoadHandler=(0,u.default)(n.lazyLoadHandler,e.throttle)),n.state={visible:!1},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),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,i.add)(window,"resize",this.lazyLoadHandler),(0,i.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,p.default)((0,o.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,n=e.offsetVertical,r=e.offsetHorizontal,a=e.offsetTop,c=e.offsetBottom,s=e.offsetLeft,o=e.offsetRight,i=e.threshold||t,l=n||i,u=r||i;return{top:a||l,bottom:c||l,left:s||u,right:o||u}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,o.findDOMNode)(this),n=this.getEventNode();if((0,f.default)(t,n,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,i.remove)(window,"resize",this.lazyLoadHandler),(0,i.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.height,s=e.width,o=this.state.visible,i={height:r,width:s},l="LazyLoad"+(o?" is-visible":"")+(n?" "+n:"");return c.default.createElement(this.props.elementType,{className:l,style:i},o&&a.Children.only(t))}}]),t}(a.Component);t.default=d,d.propTypes={children:s.default.node.isRequired,className:s.default.string,debounce:s.default.bool,elementType:s.default.string,height:s.default.oneOfType([s.default.string,s.default.number]),offset:s.default.number,offsetBottom:s.default.number,offsetHorizontal:s.default.number,offsetLeft:s.default.number,offsetRight:s.default.number,offsetTop:s.default.number,offsetVertical:s.default.number,threshold:s.default.number,throttle:s.default.number,width:s.default.oneOfType([s.default.string,s.default.number]),onContentVisible:s.default.func},d.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,n){var r=n(5)(n(3),"Map");e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(68),a=n(75),c=n(77),s=n(78),o=n(79);function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=c,i.prototype.has=s,i.prototype.set=o,e.exports=i},function(e,t,n){var r=n(97),a=n(104),c=n(27);e.exports=function(e){return c(e)?r(e):a(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(33),a=n(26);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},function(e,t,n){var r=n(4),a=n(29),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(s.test(e)||!c.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(8),a=n(9);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}},function(e,t,n){var r=n(10),a=n(57),c=n(58),s=n(59),o=n(60),i=n(61);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=a,l.prototype.delete=c,l.prototype.get=s,l.prototype.has=o,l.prototype.set=i,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(8),a=n(23);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(22))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(80),a=n(9);e.exports=function e(t,n,c,s,o){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!=t&&n!=n:r(t,n,c,s,e,o))}},function(e,t,n){var r=n(81),a=n(84),c=n(85);e.exports=function(e,t,n,s,o,i){var l=1&n,u=e.length,p=t.length;if(u!=p&&!(l&&p>u))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var m=-1,d=!0,v=2&n?new r:void 0;for(i.set(e,t),i.set(t,e);++m<u;){var b=e[m],h=t[m];if(s)var g=l?s(h,b,m,t,e,i):s(b,h,m,e,t,i);if(void 0!==g){if(g)continue;d=!1;break}if(v){if(!a(t,(function(e,t){if(!c(v,t)&&(b===e||o(b,e,n,s,i)))return v.push(t)}))){d=!1;break}}else if(b!==h&&!o(b,h,n,s,i)){d=!1;break}}return i.delete(e),i.delete(t),d}},function(e,t,n){var r=n(99),a=n(9),c=Object.prototype,s=c.hasOwnProperty,o=c.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(e){return a(e)&&s.call(e,"callee")&&!o.call(e,"callee")};e.exports=i},function(e,t,n){(function(e){var r=n(3),a=n(100),c=t&&!t.nodeType&&t,s=c&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===c?r.Buffer:void 0,i=(o?o.isBuffer:void 0)||a;e.exports=i}).call(this,n(40)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(101),a=n(102),c=n(103),s=c&&c.isTypedArray,o=s?a(s):r;e.exports=o},function(e,t,n){var r=n(23);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(46),a=n(15);e.exports=function(e,t){for(var n=0,c=(t=r(t,e)).length;null!=e&&n<c;)e=e[a(t[n++])];return n&&n==c?e:void 0}},function(e,t,n){var r=n(4),a=n(28),c=n(116),s=n(119);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:c(s(e))}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(50),a=n(114),c=n(124),s=n(4),o=n(125);e.exports=function(e){return"function"==typeof e?e:null==e?c:"object"==typeof e?s(e)?a(e[0],e[1]):r(e):o(e)}},function(e,t,n){var r=n(51),a=n(113),c=n(44);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?c(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(31),a=n(36);e.exports=function(e,t,n,c){var s=n.length,o=s,i=!c;if(null==e)return!o;for(e=Object(e);s--;){var l=n[s];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<o;){var u=(l=n[s])[0],p=e[u],f=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var m=new r;if(c)var d=c(p,f,u,e,t,m);if(!(void 0===d?a(f,p,3,c,m):d))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(11),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(11);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(11);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(11);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},function(e,t,n){var r=n(10);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(10),a=n(21),c=n(24);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!a||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new c(s)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(33),a=n(65),c=n(23),s=n(35),o=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,p=l.hasOwnProperty,f=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!c(e)||a(e))&&(r(e)?f:o).test(s(e))}},function(e,t,n){var r=n(12),a=Object.prototype,c=a.hasOwnProperty,s=a.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=c.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch(e){}var a=s.call(e);return r&&(t?e[o]=n:delete e[o]),a}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,a=n(66),c=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!c&&c in e}},function(e,t,n){var r=n(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(69),a=n(10),c=n(21);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(c||a),string:new r}}},function(e,t,n){var r=n(70),a=n(71),c=n(72),s=n(73),o=n(74);function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=c,i.prototype.has=s,i.prototype.set=o,e.exports=i},function(e,t,n){var r=n(13);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(13),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(13),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(14);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(14);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(14);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},function(e,t,n){var r=n(31),a=n(37),c=n(86),s=n(90),o=n(108),i=n(4),l=n(39),u=n(42),p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,d,v){var b=i(e),h=i(t),g=b?"[object Array]":o(e),j=h?"[object Array]":o(t),y=(g="[object Arguments]"==g?p:g)==p,O=(j="[object Arguments]"==j?p:j)==p,k=g==j;if(k&&l(e)){if(!l(t))return!1;b=!0,y=!1}if(k&&!y)return v||(v=new r),b||u(e)?a(e,t,n,m,d,v):c(e,t,g,n,m,d,v);if(!(1&n)){var E=y&&f.call(e,"__wrapped__"),_=O&&f.call(t,"__wrapped__");if(E||_){var P=E?e.value():e,x=_?t.value():t;return v||(v=new r),d(P,x,n,m,v)}}return!!k&&(v||(v=new r),s(e,t,n,m,d,v))}},function(e,t,n){var r=n(24),a=n(82),c=n(83);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=a,s.prototype.has=c,e.exports=s},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(12),a=n(87),c=n(32),s=n(37),o=n(88),i=n(89),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,p,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return c(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var m=o;case"[object Set]":var d=1&r;if(m||(m=i),e.size!=t.size&&!d)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var b=s(m(e),m(t),r,l,p,f);return f.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,n){var r=n(3).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(91),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,c,s,o){var i=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!i)return!1;for(var p=u;p--;){var f=l[p];if(!(i?f in t:a.call(t,f)))return!1}var m=o.get(e);if(m&&o.get(t))return m==t;var d=!0;o.set(e,t),o.set(t,e);for(var v=i;++p<u;){var b=e[f=l[p]],h=t[f];if(c)var g=i?c(h,b,f,t,e,o):c(b,h,f,e,t,o);if(!(void 0===g?b===h||s(b,h,n,c,o):g)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var j=e.constructor,y=t.constructor;j==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(e),o.delete(t),d}},function(e,t,n){var r=n(92),a=n(94),c=n(25);e.exports=function(e){return r(e,c,a)}},function(e,t,n){var r=n(93),a=n(4);e.exports=function(e,t,n){var c=t(e);return a(e)?c:r(c,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}},function(e,t,n){var r=n(95),a=n(96),c=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return c.call(e,t)})))}:a;e.exports=o},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,c=[];++n<r;){var s=e[n];t(s,n,e)&&(c[a++]=s)}return c}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(98),a=n(38),c=n(4),s=n(39),o=n(41),i=n(42),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=c(e),u=!n&&a(e),p=!n&&!u&&s(e),f=!n&&!u&&!p&&i(e),m=n||u||p||f,d=m?r(e.length,String):[],v=d.length;for(var b in e)!t&&!l.call(e,b)||m&&("length"==b||p&&("offset"==b||"parent"==b)||f&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||o(b,v))||d.push(b);return d}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),a=n(9);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),a=n(26),c=n(9),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return c(e)&&a(e.length)&&!!s[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(34),a=t&&!t.nodeType&&t,c=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=c&&c.exports===a&&r.process,o=function(){try{var e=c&&c.require&&c.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=o}).call(this,n(40)(e))},function(e,t,n){var r=n(105),a=n(106),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))c.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(107)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(109),a=n(21),c=n(110),s=n(111),o=n(112),i=n(8),l=n(35),u=l(r),p=l(a),f=l(c),m=l(s),d=l(o),v=i;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||a&&"[object Map]"!=v(new a)||c&&"[object Promise]"!=v(c.resolve())||s&&"[object Set]"!=v(new s)||o&&"[object WeakMap]"!=v(new o))&&(v=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case f:return"[object Promise]";case m:return"[object Set]";case d:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(5)(n(3),"DataView");e.exports=r},function(e,t,n){var r=n(5)(n(3),"Promise");e.exports=r},function(e,t,n){var r=n(5)(n(3),"Set");e.exports=r},function(e,t,n){var r=n(5)(n(3),"WeakMap");e.exports=r},function(e,t,n){var r=n(43),a=n(25);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var c=t[n],s=e[c];t[n]=[c,s,r(s)]}return t}},function(e,t,n){var r=n(36),a=n(115),c=n(121),s=n(28),o=n(43),i=n(44),l=n(15);e.exports=function(e,t){return s(e)&&o(t)?i(l(e),t):function(n){var s=a(n,e);return void 0===s&&s===t?c(n,e):r(t,s,3)}}},function(e,t,n){var r=n(45);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},function(e,t,n){var r=n(117),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(c,"$1"):n||e)})),t}));e.exports=s},function(e,t,n){var r=n(118);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(24);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],c=n.cache;if(c.has(a))return c.get(a);var s=e.apply(this,r);return n.cache=c.set(a,s)||c,s};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},function(e,t,n){var r=n(120);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(12),a=n(30),c=n(4),s=n(29),o=r?r.prototype:void 0,i=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(c(t))return a(t,e)+"";if(s(t))return i?i.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(122),a=n(123);e.exports=function(e,t){return null!=e&&a(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(46),a=n(38),c=n(4),s=n(41),o=n(26),i=n(15);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var f=i(t[l]);if(!(p=null!=e&&n(e,f)))break;e=e[f]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&o(u)&&s(f,u)&&(c(e)||a(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(126),a=n(127),c=n(28),s=n(15);e.exports=function(e){return c(e)?r(s(e)):a(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(45);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(129),a=n(27);e.exports=function(e,t){var n=-1,c=a(e)?Array(e.length):[];return r(e,(function(e,r,a){c[++n]=t(e,r,a)})),c}},function(e,t,n){var r=n(130),a=n(133)(r);e.exports=a},function(e,t,n){var r=n(131),a=n(25);e.exports=function(e,t){return e&&r(e,t,a)}},function(e,t,n){var r=n(132)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var a=-1,c=Object(t),s=r(t),o=s.length;o--;){var i=s[e?o:++a];if(!1===n(c[i],i,c))break}return t}}},function(e,t,n){var r=n(27);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var c=n.length,s=t?c:-1,o=Object(n);(t?s--:++s<c)&&!1!==a(o[s],s,o););return n}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(136)()},function(e,t,n){"use strict";var r=n(137);function a(){}function c(){}c.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,c,s){if(s!==r){var o=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 o.name="Invariant Violation",o}}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:c,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){function e(e,t){return function(n,r,a,c){n[e]?n[e](r,a,c):n[t]&&n[t]("on"+r,a)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,f=Math.min,m=function(){return l.Date.now()};function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(d(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=d(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var o=a.test(e);return o||c.test(e)?s(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,c,s,o,i,l=0,u=!1,b=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,c=a;return r=a=void 0,l=t,s=e.apply(c,n)}function j(e){return l=e,o=setTimeout(O,t),u?g(e):s}function y(e){var n=e-i;return void 0===i||n>=t||n<0||b&&e-l>=c}function O(){var e=m();if(y(e))return k(e);o=setTimeout(O,function(e){var n=t-(e-i);return b?f(n,c-(e-l)):n}(e))}function k(e){return o=void 0,h&&r?g(e):(r=a=void 0,s)}function E(){var e=m(),n=y(e);if(r=arguments,a=this,i=e,n){if(void 0===o)return j(i);if(b)return o=setTimeout(O,t),g(i)}return void 0===o&&(o=setTimeout(O,t)),s}return t=v(t)||0,d(n)&&(u=!!n.leading,c=(b="maxWait"in n)?p(v(n.maxWait)||0,t):c,h="trailing"in n?!!n.trailing:h),E.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=a=o=void 0},E.flush=function(){return void 0===o?s:k(m())},E}}).call(this,n(22))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,f=Math.min,m=function(){return l.Date.now()};function d(e,t,n){var r,a,c,s,o,i,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,c=a;return r=a=void 0,l=t,s=e.apply(c,n)}function j(e){return l=e,o=setTimeout(O,t),u?g(e):s}function y(e){var n=e-i;return void 0===i||n>=t||n<0||d&&e-l>=c}function O(){var e=m();if(y(e))return k(e);o=setTimeout(O,function(e){var n=t-(e-i);return d?f(n,c-(e-l)):n}(e))}function k(e){return o=void 0,h&&r?g(e):(r=a=void 0,s)}function E(){var e=m(),n=y(e);if(r=arguments,a=this,i=e,n){if(void 0===o)return j(i);if(d)return o=setTimeout(O,t),g(i)}return void 0===o&&(o=setTimeout(O,t)),s}return t=b(t)||0,v(n)&&(u=!!n.leading,c=(d="maxWait"in n)?p(b(n.maxWait)||0,t):c,h="trailing"in n?!!n.trailing:h),E.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=a=o=void 0},E.flush=function(){return void 0===o?s:k(m())},E}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var o=a.test(e);return o||c.test(e)?s(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),d(e,t,{leading:r,maxWait:t,trailing:a})}}).call(this,n(22))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},a=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(a(t)))return t;t=t.parentNode}return window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,r){if(function(e){return null===e.offsetParent}(t))return!1;var a=void 0,s=void 0,o=void 0,i=void 0;if(void 0===n||n===window)a=window.pageYOffset,o=window.pageXOffset,s=a+window.innerHeight,i=o+window.innerWidth;else{if(!e(n,window,r))return!1;var l=(0,c.default)(n);a=l.top,o=l.left,s=a+n.offsetHeight,i=o+n.offsetWidth}var u=(0,c.default)(t);return a<=u.top+t.offsetHeight+r.top&&s>=u.top-r.bottom&&o<=u.left+t.offsetWidth+r.left&&i>=u.left-r.right};var r,a=n(144),c=(r=a)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,n){"use strict";n.r(t);var r=n(16),a=n.n(r),c=n(17),s=n.n(c),o=n(2),i=n.n(o),l=n(18),u=n.n(l),p=n(19),f=n.n(p),m=n(6),d=n.n(m),v=n(0),b=n(1),h=n.n(b),g=n(20),j=n.n(g);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return f()(this,n)}}var O=wp.i18n,k=O.__,E=(O.sprintf,wp.element),_=E.Fragment,P=E.Component,x=(E.render,E.PureComponent,wp.components),S=(x.Modal,x.Spinner,x.ButtonGroup),w=(x.Dropdown,x.Button),N=(x.ExternalLink,x.ToolbarGroup,x.MenuItem,x.Tooltip),z=function(e){u()(n,e);var t=y(n);function n(){var e;return a()(this,n),(e=t.apply(this,arguments)).state={colorPalette:e.props.colorPalette?e.props.colorPalette:"",fontPair:e.props.fontPair?e.props.fontPair:"",palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[]},e}return s()(n,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"render",value:function(){var e=this,t=this.props.item[0],n=!0,r=!1;return Object(v.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(v.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(v.createElement)("div",{className:"wp-full-overlay-header"},Object(v.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.props.onChange({activeTemplate:"",colorPalette:"",fontPair:"",focusMode:!1})}})),Object(v.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(v.createElement)("div",{className:"install-theme-info"},Object(v.createElement)("div",{className:"theme-info-wrap"},Object(v.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(v.createElement)("div",{className:"theme-info-title-wrap"},Object(v.createElement)("h3",{className:"theme-name"},t.name),Object(v.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")))),Object(v.createElement)("div",{className:"palette-title-wrap"},Object(v.createElement)("h2",{className:"palette-title"},k("Optional: Change Color Scheme","kadence-starter-templates")),Object(v.createElement)(w,{label:k("clear"),className:"kst-clear-palette",disabled:!this.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({colorPalette:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:""},"*")}})),Object(v.createElement)(S,{className:"kst-palette-group","aria-label":k("Select a Palette","kadence-starter-templates")},h()(this.state.palettes,(function(t){var n=t.palette,r=t.colors;return Object(v.createElement)(w,{className:"kst-palette-btn",isPrimary:n===e.state.colorPalette,"aria-pressed":n===e.state.colorPalette,onClick:function(){document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:n},"*"),e.setState({colorPalette:n})}},Object(v.createElement)("span",{className:"kst-palette-bg",style:{background:r[4]?r[4]:void 0}}),h()(r,(function(e,t){if(4!==t)return Object(v.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(v.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(v.createElement)("p",{className:"desc-small"},k("*You can change this after import.","kadence-starter-templates")),Object(v.createElement)("div",{className:"font-title-wrap"},Object(v.createElement)("h2",{className:"font-title"},k("Optional: Change Font Family","kadence-starter-templates")),Object(v.createElement)(w,{label:k("clear"),className:"kst-clear-font",disabled:!this.state.fontPair,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({fontPair:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:""},"*")}})),Object(v.createElement)(S,{className:"kst-font-group","aria-label":k("Select a Font","kadence-starter-templates")},h()(this.state.fonts,(function(t){var n=t.font,r=t.img,a=t.name;return Object(v.createElement)(N,{text:a},Object(v.createElement)(w,{className:"kst-font-btn".concat(n===e.state.fontPair?" active":""),"aria-pressed":n===e.state.fontPair,onClick:function(){e.setState({fontPair:n}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:n},"*")}},Object(v.createElement)("img",{src:r,className:"font-pairing"})))}))),Object(v.createElement)("p",{className:"desc-small"},k("*You can change this after import.","kadence-starter-templates"))),Object(v.createElement)("div",{className:"kadence-starter-required-plugins"},Object(v.createElement)("h2",{className:"kst-required-title"},k("Required Plugins","kadence-starter-templates")),Object(v.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,a=e.title,c=e.src;return"active"!==t&&(n=!1,"thirdparty"===c&&(r=!0)),Object(v.createElement)("li",{className:"plugin-required"},a," - ",Object(v.createElement)("span",{class:"plugin-status"},"notactive"===t?k("Not Installed","kadence-starter-templates"):t))}))),!n&&Object(v.createElement)(_,null,r&&Object(v.createElement)("p",{className:"desc-small"},k("*Install Missing/Inactive Premium plugins to import.","kadence-starter-templates")),!r&&Object(v.createElement)("p",{className:"desc-small"},k("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates"))))),Object(v.createElement)("div",{class:"wp-full-overlay-footer"},Object(v.createElement)("h2",{className:"kst-import-options-title"},k("Import Options","kadence-starter-templates")),Object(v.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(v.createElement)("button",{className:"kst-import-btn button-hero button",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isSelected:!1,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},k("Single Page","kadence-starter-templates")),Object(v.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isImporting:!0,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},k("Full Site","kadence-starter-templates"))))),Object(v.createElement)("div",{class:"wp-full-overlay-main"},Object(v.createElement)("iframe",{id:"kadence-starter-preview",src:t.url+"?cache=bust"})))}}]),n}(P),M=n(7),C=Object(v.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(M.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),T=Object(v.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(M.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return f()(this,n)}}var I=wp.i18n,A=I.__,L=(I.sprintf,wp.element),H=L.Fragment,R=L.Component,D=L.render,B=(L.PureComponent,wp.components),V=B.Modal,q=B.Spinner,W=(B.ButtonGroup,B.Dropdown),$=B.Icon,G=B.Button,U=B.ExternalLink,Y=(B.ToolbarGroup,B.ToggleControl),J=B.MenuItem,K=B.Tooltip,X=Object(v.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(v.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"url(#_Linear1)"}),Object(v.createElement)("path",{fill:"#fff",d:"M50 50H66.003V130H50z"}),Object(v.createElement)("path",{fill:"#fff",d:"M82 50H130.011V66H82z"}),Object(v.createElement)("path",{fill:"#fff",d:"M82 82H130.011V98H82z"}),Object(v.createElement)("path",{fill:"#fff",d:"M82 114.046H130.011V130.046H82z"}),Object(v.createElement)("defs",null,Object(v.createElement)("linearGradient",{id:"_Linear1",x1:"0",x2:"1",y1:"0",y2:"0",gradientTransform:"rotate(-52.456 186.056 40.829) scale(178.658)",gradientUnits:"userSpaceOnUse"},Object(v.createElement)("stop",{offset:"0",stopColor:"#372b73"}),Object(v.createElement)("stop",{offset:"1",stopColor:"#e9335e"})))),Q=(Object(v.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(v.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"#93003c"}),Object(v.createElement)("path",{fill:"#ff5bd4",d:"M50 50H66.003V130H50z"}),Object(v.createElement)("path",{fill:"#ff5bd4",d:"M82 50H130.011V66H82z"}),Object(v.createElement)("path",{fill:"#ff5bd4",d:"M82 82H130.011V98H82z"}),Object(v.createElement)("path",{fill:"#ff5bd4",d:"M82 114.046H130.011V130.046H82z"})),Object(v.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",enableBackground:"new 0 0 720 864",viewBox:"0 0 720 864",className:"gblogo"},Object(v.createElement)("g",null,Object(v.createElement)("path",{d:"M432.4 415.6c-2.5-1.7-5.9-1-7.6 1.5-9.9 14.9-30.9 15.7-32 15.7h-.5c-25.9 0-35.8 22.1-36.2 23-1.2 2.8.1 6 2.8 7.2.7.3 1.5.5 2.2.5 2.1 0 4.1-1.2 5-3.3.1-.2 6.9-15.4 24.4-16.4v28.3c-.7 6.1-3.6 10.9-8.7 14.5-5.3 3.7-12.4 5.6-21.1 5.6-10.4 0-18.9-3.6-25.2-10.7-6.4-7.1-9.6-17.2-9.6-30.2l.1-31.2c.5-11.5 3.6-20.6 9.5-27.1 6.4-7.1 14.8-10.7 25.2-10.7 8.7 0 15.8 1.9 21.1 5.6 5.3 3.7 8.3 8.8 8.8 15.4v.7c0 3.8 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9v-.7c-1-9.9-5.5-17.7-13.6-23.6-8.1-5.9-18.2-8.8-30.4-8.8-14.5 0-26.2 4.8-35.1 14.3-8.4 8.9-12.8 20.6-13.3 35 0 1-.1 2-.1 3l.1 28.1h-.1c0 15.9 4.5 28.6 13.4 38.1s20.6 14.3 35.1 14.3c12.2 0 22.3-2.9 30.4-8.8 7.4-5.4 11.8-12.5 13.3-21.3l.3-31.4c9.1-2.2 21.5-7.2 29.3-19 2-2.5 1.3-5.9-1.3-7.6zM528.7 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2zM117.8 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.7 6.2 6.2 6.2z",className:"st2"}),Object(v.createElement)("circle",{cx:"609.3",cy:"150.1",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"359.8",cy:"130.6",r:"6.2",className:"st2"}),Object(v.createElement)("path",{d:"M244.8 150.2h.3c23.3 0 33.7-14.6 41.6-28.2 2.6-4.5 12.2-19.5 25.8-23.4 16.8-4.9 34.7 2.9 41.7 18.2 1 2.2 3.2 3.5 5.4 3.6h.7c2.2-.1 4.4-1.4 5.4-3.6 7-15.3 24.9-23.1 41.7-18.2 13.6 4 23.2 18.9 25.8 23.4 7.9 13.7 18.3 28.2 41.9 28.2 14.2 0 31-10.6 35.7-30.9 3.9-16.8-3.3-32-19-39.7-3.1-1.5-6.8-.3-8.3 2.8-1.5 3.1-.3 6.8 2.8 8.3 14.9 7.4 13.6 20.5 12.4 25.8-2.4 10.4-11.6 21.4-23.7 21.4-15.5 0-22.9-7.8-31.2-22.1-4.1-7-15.5-24-33-29.1-19.1-5.6-39.3 1.1-50.9 15.8-11.6-14.7-31.8-21.4-50.9-15.8-17.5 5.1-28.9 22.1-33 29.1-8.3 14.3-15.7 22.1-30.9 22.1h-.2c-13.2-.1-21.6-9.3-24-18.4-1.2-4.3-3.7-19 13.1-29 2.9-1.7 3.9-5.5 2.1-8.5-1.8-2.9-5.5-3.9-8.5-2.1-19.3 11.5-22.3 29.7-18.7 42.9 4.4 16.3 18.9 27.3 35.9 27.4z",className:"st2"}),Object(v.createElement)("path",{d:"M360 734L360.1 734 360.1 734 360 734z",className:"st2"}),Object(v.createElement)("circle",{cx:"108.1",cy:"150.1",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"90.7",cy:"88",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"631.3",cy:"88",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"664.5",cy:"485.3",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"639.6",cy:"627.1",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"599.8",cy:"644.8",r:"6.2",className:"st2"}),Object(v.createElement)("path",{d:"M231.9 111.2c0 9.2 7.5 16.7 16.7 16.7s16.7-7.5 16.7-16.7-7.5-16.7-16.7-16.7c-9.2-.1-16.7 7.4-16.7 16.7zm16.7-4.4c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM473.6 127.9c9.2 0 16.7-7.5 16.7-16.7s-7.5-16.7-16.7-16.7-16.7 7.5-16.7 16.7 7.5 16.7 16.7 16.7zm0-21.1c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM376.7 121.6c-3.2 1.2-4.8 4.7-3.6 7.9 1.2 3.2 4.7 4.8 7.9 3.7 1-.4 25-8.4 43.4 20.2 1.2 1.8 3.2 2.8 5.2 2.8 1.1 0 2.3-.3 3.3-1 2.9-1.8 3.7-5.7 1.9-8.5-19.2-29.7-46.4-29.4-58.1-25.1zM343.3 121.6c-.9-.3-9.1-3.2-20.3-1.5-10.4 1.5-25.3 7.4-37.7 26.7-1.8 2.9-1 6.7 1.9 8.5 1 .7 2.2 1 3.3 1 2 0 4-1 5.2-2.8 18.3-28.6 42.3-20.6 43.4-20.2 3.2 1.2 6.7-.5 7.9-3.7 1.2-3.2-.5-6.8-3.7-8zM627.8 138.5l30.1-34.2v49.3c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V88c0-2.6-1.6-4.9-4-5.8-2.4-.9-5.1-.2-6.8 1.7l-40.9 46.5c-2.3 2.6-2 6.5.6 8.7 2.4 2.3 6.3 2 8.6-.6zM56.8 159.9c3.4 0 6.2-2.8 6.2-6.2v-49.3l30.1 34.2c2.3 2.6 6.2 2.8 8.7.6 2.6-2.3 2.8-6.2.6-8.7L61.5 83.9c-1.7-1.9-4.4-2.6-6.8-1.7-2.4.9-4 3.2-4 5.8v65.7c0 3.4 2.7 6.2 6.1 6.2zM493.4 166c-2.9-.2-5.6 1.8-6.3 4.6-.7 2.9.7 5.9 3.3 7.1 9.8 4.6 18.7 6.4 26.7 6.4 15.3 0 27.5-6.7 36-13.7 13.6-11.2 20.6-25.3 20.9-25.9 1.4-2.9.4-6.4-2.4-8-6.3-3.7-17.2-6-33.8 4.1-8.3 5.1-14.7 11.2-15.8 12.3-15.2 13.4-27.9 13.1-28.6 13.1zm36.9-3.9l.3-.3c4.7-4.7 18-15.6 28.4-16.1-3 4.3-7.5 10.1-13.6 15.2-9 7.4-18.6 11-28.8 10.8 4.2-2.2 8.9-5.4 13.7-9.6zM151.4 136.5c-2.8 1.6-3.8 5.1-2.4 8 .3.6 7.3 14.7 20.9 25.9 8.5 7 20.6 13.7 36 13.7 8.1 0 17-1.8 26.7-6.4 2.7-1.3 4-4.2 3.3-7.1-.7-2.9-3.3-4.8-6.3-4.7-.5 0-13.3.4-28.5-13-1.1-1.1-7.5-7.2-15.8-12.3-16.6-10-27.6-7.7-33.9-4.1zm41.4 25.6c4.7 4.2 9.4 7.3 13.7 9.6-21.6.2-35.9-16.3-42.4-26 10.4.5 23.7 11.4 28.4 16.1l.3.3z",className:"st2"}),Object(v.createElement)("path",{d:"M671.8 664.6c-6.2-5.2-13-8.2-19.3-9.9 2.4-1.8 4.7-3.9 6.7-6.2 15.3-18 15.4-44.5.2-61.7-2.3-2.6-6.2-2.8-8.7-.5-2.6 2.3-2.8 6.2-.5 8.7 11.1 12.6 10.9 32.1-.4 45.5-9.2 10.8-26.7 13.4-31.9 14-15.7 1.7-33.3 5.3-42.8 26.8-1.5 3.3-2.4 7-2.6 11-2.2-.7-4.6-1.1-7-1.1-12.5 0-22.7 10.2-22.7 22.7 0 8.6 4.8 16.1 11.9 19.9-2.1 1.9-4.1 4-5.9 6.4-21-28.3-54.6-46.1-91.6-46.1-5.3 0-10.6.4-15.7 1.1 30.4-9.3 58.7-23.8 84.5-43 33.3-24.9 61-57.4 80-93.9 20-38.4 30.1-79.9 30.1-123.1v-.8-.2-.3c-.2-35.1-8-66.7-19.1-93.9 4.1.8 8 1.1 11.5 1.1 25.9 0 37.3-17.8 38.5-19.9 5.6-9.4 6.5-20.8 3.3-31.1.1-.3.1-.7.1-1.1V176.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2V271c-10.5-9.1-25.7-10.1-32-10.1-12.2.1-19.8-1.8-25.4-11.4-4.7-8.1-2-16.5 2.7-21.3 5.9-6 14.3-6.8 22.5-2.3 3 1.6 6.8.6 8.4-2.4 1.6-3 .6-6.8-2.4-8.4-13-7.2-27.6-5.4-37.3 4.4-9.6 9.8-11.4 24.3-4.6 36.1 8.9 15.3 22.4 17.5 35.7 17.5h.5c4 0 16.9.6 24.3 7.6 9.6 9.1 12.1 23.4 5.8 34 0 0-.1.1-.1.2-.5.9-12.4 21.1-45.6 10.5-10-21.2-21.6-39.2-32.4-53.6l-4.9 3.7 4.9-3.8-2-2.6c-21.3-35.7 3.3-73.7 16.1-89.8l7.2-8.2c2.2-2.6 2-6.5-.6-8.7-2.5-2.1-6.1-2-8.4.3-.2.2-1.3 1.3-3 3.2-11.1 11.3-54.5 51.3-96.6 30.4l-1.2-.8-.6-.4c-37.7-20.3-74.9-32-110.4-35-4.6-10.5-10.7-18.5-18.4-18.5-7.8 0-13.9 8.1-18.6 18.8-49.7 2.2-111.5 34.3-114.1 35.6-42.3 21.3-85.9-18.9-97-30.2-1.7-1.9-2.9-3-3-3.2-2.3-2.3-5.9-2.4-8.4-.3-2.6 2.2-2.8 6.1-.6 8.7l7.7 8.7c4.5 5.6 10.2 13.7 15 23.4 12 24.3 12.2 46.4.7 65.8-14.3 17.8-25.9 36.5-34.8 56.2-33.5 10.9-45.5-9.5-46-10.4 0-.1-.1-.1-.1-.2-6.3-10.6-3.8-24.9 5.8-34 7.4-7 20.3-7.6 24.3-7.6h.1c13.4 0 27.2-2.1 36.1-17.5 6.8-11.8 5-26.4-4.6-36.1-9.7-9.9-24.3-11.6-37.3-4.4-3 1.6-4.1 5.4-2.4 8.4 1.6 3 5.4 4.1 8.4 2.4 8.3-4.5 16.7-3.7 22.5 2.3 4.7 4.8 7.3 13.2 2.7 21.3-5.5 9.5-13 11.4-25 11.4h-.4c-5.5 0-18.3.8-28.5 7.4v-90.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v104c-6.8 12.2-7.2 27.1-.2 39.1.7 1.3 5 8.5 14.6 13.9 5.5 3.1 13.4 6 23.9 6 3.8 0 8-.4 12.5-1.3-10.8 29-16.2 60.2-16.4 94.2v1.1c0 61.4 21.6 121.7 60.8 169.8 34.7 42.6 81.9 74.2 134.2 90.3-5.5-.8-11.1-1.2-16.7-1.2-36.7 0-70 17.5-91 45.4-1.7-2.2-3.6-4.3-5.7-6.1 6.6-4 11.1-11.2 11.1-19.5 0-12.5-10.2-22.7-22.7-22.7-2.3 0-4.5.4-6.6 1-.3-3.9-1.2-7.6-2.6-10.9-9.6-21.5-27.1-25.1-42.8-26.8-5.2-.6-22.7-3.2-31.9-14-11.6-13.1-11.8-32.6-.7-45.2 2.3-2.6 2-6.5-.5-8.7-2.6-2.3-6.5-2-8.7.5-15.1 17.2-15 43.7.2 61.7 2 2.4 4.3 4.4 6.7 6.2-6.3 1.7-13.1 4.8-19.3 9.9-14.7 12.1-22.2 32.3-22.4 59.8-.5 2.5.6 5.1 2.8 6.5 1 .6 2.1.9 3.2.9.4 0 .9-.1 1.3-.2h.1c.2 0 .3-.1.5-.2.3-.1.7-.2 1-.4.1 0 .1-.1.2-.1 1-.6 1.9-1.4 2.5-2.4 2.4-3.1 12.3-7 20.5-8.7 32.1-7 38.8-28.7 37.8-39.1-.3-3.4-3.3-5.9-6.7-5.6-3.4.3-5.9 3.3-5.6 6.7 0 .1.1 1.9-.5 4.6-1.5 6.2-7 16.9-27.6 21.4h-.2c-2.4.5-9.6 2.2-16.3 5.3 1.8-17.8 7.5-30.8 17.2-38.9 14.9-12.4 34.6-8.9 34.8-8.8.7.1 1.3.1 1.9 0 3.3.7 6.1 1.1 8.2 1.3 16.5 1.8 26.6 5.4 32.9 19.5 4.9 11.1-1.4 23.9-9.9 30.3-4.3 3.3-15.8 9.8-28.7-.8-2.6-2.2-6.5-1.8-8.7.8-2.2 2.6-1.8 6.5.8 8.7 5.8 4.8 12.3 7.6 19 8.4-8.6 7-14.4 15.8-17 20.4-8.4 14.5-15.2 22.3-26.5 22.4V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v50.2c0 2.5 1.5 4.6 3.6 5.6 1.1.8 2.4 1.4 3.8 1.4h144c2.2 0 4-1.1 5.2-2.8.8-.8 1.5-1.8 1.8-3 5.7-22.1 25.6-37.5 48.4-37.5 20.4 0 38.5 12.4 46.2 30.9h-13.2c-5.4-13.3-18.4-22.2-33.1-22.2-16.1 0-30.3 10.9-34.6 26.4-.9 3.3 1.1 6.7 4.3 7.6 3.3.9 6.7-1.1 7.6-4.3 2.8-10.2 12.1-17.3 22.6-17.3 7.8 0 14.8 3.8 19.1 9.8h-3.6c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h12.5c.2 0 .5.1.7.1.3 0 .6 0 .8-.1h24.8c3.4 0 6.2-2.8 6.2-6.2 0-.3 0-.6-.1-.9.1-.8.1-1.7-.1-2.6-7.3-27.1-32.1-46-60.2-46-27.2 0-51.1 17.6-59.4 43.3h-32.3c2.6-8.3 6.1-16 10.5-23.2.3-.4.5-.8.8-1.2 18.3-28.7 50.3-47.1 85.8-47.1 21 0 41.2 6.4 58.3 18.4.5.3 1 .6 1.5.7 2.6 3.1 5.2 6.4 7.7 9.8.6.8 1.1 1.6 1.7 2.4-.6 12.7 6.3 26 20.6 39.6.5 1.5 1 2.8 1.3 3.8v1.3c0 3.4 2.8 6.2 6.2 6.2 2.9 0 5.2-1.9 5.9-4.6 0-.1.9-3.1 2.7-8.1 12.9-12.6 19.3-24.9 19.2-36.8.8-1.2 1.7-2.5 2.6-3.7 2.8-3.8 5.7-7.5 8.7-11 17-11.8 36.9-18 57.7-18 44.8 0 84 29.2 97 71.5h-32.3c-8.2-25.7-32.1-43.3-59.4-43.3-28.1 0-52.8 18.9-60.2 46-.3 1-.3 2 0 3v.5c0 3.4 2.8 6.2 6.2 6.2h54.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-19.7c4.3-6 11.3-9.8 19.1-9.8 10.7 0 20 7.2 22.7 17.6.7 2.8 3.2 4.6 6 4.6.5 0 1-.1 1.5-.2 3.3-.8 5.3-4.2 4.5-7.5-4.1-15.8-18.3-26.9-34.7-26.9-14.6 0-27.6 8.9-33.1 22.2h-12.5c7.6-18.5 25.8-30.9 46.2-30.9 22.8 0 42.7 15.4 48.4 37.5.1.5.4 1 .6 1.5.8 2.5 3.1 4.3 5.9 4.3H664c3.4 0 6.2-2.8 6.2-6.2v-.4-1.6c.1-.6.1-1.2.1-1.8 0-.1 0-.2-.1-.3V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v42c-10.4-.8-16.9-8.5-24.9-22.3-2.6-4.4-8-12.7-16-19.5 5.5-1.2 10.8-3.8 15.7-7.9 2.6-2.2 3-6.1.8-8.7-2.2-2.6-6.1-3-8.7-.8-12.8 10.6-24.3 4.1-28.7.8-8.5-6.4-14.8-19.3-9.9-30.3 6.3-14.1 16.4-17.8 32.9-19.5 2.1-.2 4.9-.6 8.2-1.3.6.1 1.3.1 2 0 .2 0 19.7-3.6 34.7 8.8 9.8 8.1 15.6 21.1 17.3 39-6.8-3.2-14.1-4.9-16.4-5.4h-.2c-20.5-4.5-26.1-15.1-27.6-21.3-.6-2.6-.6-4.4-.5-4.6.3-3.4-2.2-6.4-5.6-6.7-3.4-.3-6.4 2.2-6.7 5.6-1 10.5 5.7 32.1 37.9 39.1 8.3 1.8 18.8 5.9 20.7 9 0 0 0 .1.1.1.3.4.6.8.9 1.1.1.1.2.1.3.2.3.2.6.5.9.6.1.1.3.2.4.2.3.2.6.3.9.4.1 0 .3.1.4.1.4.1.9.2 1.4.2.4 0 .7 0 1.1-.1.1 0 .2 0 .3-.1.3-.1.6-.2 1-.3h.1c.3-.1.5-.3.8-.4l.1-.1c.2-.1.4-.3.5-.4.1-.1.3-.2.4-.4l.4-.4c.1-.2.3-.3.4-.5.1-.2.2-.3.3-.5.1-.2.2-.3.3-.5.1-.2.1-.4.2-.6.1-.2.1-.4.2-.6 0-.2.1-.4.1-.5 0-.2.1-.4.1-.7v-.1c-.1-28.3-7.7-48.8-22.6-61.1zM152.9 777.7H87.8c5.5-5.6 9.4-12.3 12.4-17.5 2.6-4.5 12.2-19.5 25.8-23.4 16-4.7 31 .8 38.4 13.5-4.9 8.5-8.8 17.7-11.5 27.4zm1.7-53.7c-5.7 0-10.3-4.6-10.3-10.3 0-5.7 4.6-10.3 10.3-10.3s10.3 4.6 10.3 10.3c0 5.7-4.7 10.3-10.3 10.3zm366.6-78.1l.9 1.1-.9-1.1zm.2-6.2c-58.4-6.8-100.6 18.3-125.8 40.5-10.9 9.6-19.5 19.5-26 27.9-1.2-.8-2.3-1.6-3.3-2.1v-17.6c47.3-47.5 94.3-61.7 125.5-65.2 20.7-2.3 37.4-.4 47.4 1.5-5.7 5.3-11.6 10.3-17.8 15zm73.3-87.2c-6 11.5-12.9 22.5-20.5 33.1-7.9-2.5-17.8-4.8-29.7-5.9 26.5-33.6 43.3-73.7 48.7-116 8.6-1 20.5-4.7 29.6-10.6-2.4 34.7-11.8 68.1-28.1 99.4zm-42.1-111.6l7.2-.3c2.4 10.7 10.5 19.3 21.1 22.2-5.6 42.8-23.4 83.2-51.8 116.2-13.7 0-29.6 1.6-47.6 5.5 42-34.2 69.4-85.7 71.1-143.6zm-117.5 158c-4 1.6-6.8 2.9-8.2 3.5-16.6 6.6-34.4 10.9-53 12.3l165.9-165.9c-5 66.8-46.6 123.4-104.7 150.1zm188.3-164.7c-.2 5.6-15.5 14.7-29 16.9-1.9.3-3.8.5-5.6.5-2.4 0-4.7-.5-6.8-1.4-6.3-2.7-10.7-8.9-10.7-16.1 0-7.2 4.4-13.4 10.7-16.1 2.1-.9 4.4-1.4 6.8-1.4 1.8 0 3.7.2 5.6.5 13.5 2.2 28.7 11.3 29 16.8v.3zM565.5 276l2.6 3.5c22.7 30.3 49.3 77.2 54.4 135.6-9-5.8-20.8-9.5-29.3-10.5-6.4-50.6-28.9-96.3-62.2-131.6 1.4-2.9 2.2-6.2 2.2-9.6 0-4.6-1.4-8.9-3.7-12.4l28.4-32.4c-5.4 20.6-2.8 40.1 7.6 57.4zm-82.9-70.1l1.3.9.7.4c9.9 5 20.5 7.5 31.5 7.5 11.6 0 23.7-2.8 35.9-8.4l-32 36.5c-2.9-1.4-6.1-2.1-9.6-2.1-4.5 0-8.6 1.3-12.1 3.5-31.5-23-68.8-38.3-109.4-43.3-1-7.3-3-17.7-6-27.9 32.1 3.6 65.6 14.6 99.7 32.9zm38.2 57.5c0 4.5-3 8.4-7.1 9.8-1 .3-2.1.5-3.2.5h-1c-4.6-.4-8.3-3.9-9.1-8.3-.1-.6-.2-1.3-.2-1.9 0-.7.1-1.3.2-2 .9-4.5 4.7-8 9.4-8.3H511.1c4.6.3 8.5 3.6 9.5 8 .1.6.2 1.1.2 1.7-.1.1 0 .3 0 .5zm-131.4-49.9c37.2 4.9 71.6 19.1 100.7 40.1-1.5 3-2.3 6.3-2.3 9.9 0 4.5 1.3 8.6 3.6 12.2l-49.8 56.8c-2.3 2.6-2 6.5.6 8.7 1.2 1 2.6 1.5 4.1 1.5 1.7 0 3.4-.7 4.7-2.1l49.7-56.7c3 1.5 6.3 2.3 9.9 2.3 4.6 0 8.8-1.4 12.3-3.7 31 33.2 51.9 75.8 58.1 123-10.7 3-19 11.8-21.2 22.8l-7.1.3c-1.5-45.7-19.2-89.3-50.1-123.2-2.3-2.5-6.2-2.7-8.7-.4-2.5 2.3-2.7 6.2-.4 8.7 27.2 29.8 43.4 67.6 46.5 107.6L473.5 355c-2.4-2.4-6.3-2.4-8.7 0-2.4 2.4-2.4 6.3 0 8.7l71.4 71.4-176 176-176-176 70.8-70.8c2.4-2.4 2.4-6.3 0-8.7-2.4-2.4-6.3-2.4-8.7 0l-65.7 65.7c3.5-45.5 23.9-86.4 55-116.2l31 35.4c1.2 1.4 2.9 2.1 4.7 2.1 1.4 0 2.9-.5 4.1-1.5 2.6-2.3 2.8-6.2.6-8.7l-31.1-35.5c28-23.4 63.1-38.5 101.6-41.4l-52.8 52.3c-2.4 2.4-2.4 6.3 0 8.7 1.2 1.2 2.8 1.8 4.4 1.8 1.6 0 3.1-.6 4.4-1.8l58-57.4 56.3 56.3c2.4 2.4 6.3 2.4 8.7 0 2.4-2.4 2.4-6.3 0-8.7l-51.2-51.2c31.7 2.4 61.9 13 88.2 31.1 2.8 1.9 6.7 1.2 8.6-1.6 1.9-2.8 1.2-6.7-1.6-8.6-30.4-20.9-65.8-32.5-102.8-33.6v-4.4c11.6-2.8 20.9-12.7 22.7-24.9zm-180.7 74.3c3.5 0 6.8-.8 9.7-2.2l8.9 10.2c-35.3 33.7-57.8 80.6-59.6 132.7l-5-.3c-2.4-11.7-11.5-20.9-23.2-23.3 6.1-46.3 26.5-88.1 56.5-120.9 3.7 2.4 8 3.8 12.7 3.8zm-10.3-22.6c0-.5 0-.9.1-1.4 0-.3.1-.5.1-.8.9-4.4 4.7-7.8 9.3-8.1h.7c4.7 0 8.7 3.2 9.9 7.6.2.9.4 1.8.4 2.7 0 .7-.1 1.4-.2 2.1-.9 4.4-4.7 7.8-9.3 8.1h-.8c-1.3 0-2.6-.3-3.7-.7-3.7-1.4-6.5-5.2-6.5-9.5zm-35.8 175.4l5.1.3c1.7 58 29.2 109.6 71.3 143.8-18.1-4-34-5.6-47.8-5.7-28.2-32.9-46.1-73.1-51.7-115.7 11.5-2.4 20.6-11.3 23.1-22.7zm17.9 8.2l165.9 165.9C258 608 187.2 537.2 180.5 448.8zm162.7-249c2.7-18.7 11.9-43.7 16.7-45.7 5.5 2.1 14 28 16.6 45.6.5 3.5.8 6.7.8 9.3 0 1.1-.1 2.1-.3 3.1-1.5 8.1-8.6 14.3-17.2 14.3s-15.7-6.2-17.2-14.3c-.2-1-.3-2.1-.3-3.1.1-2.7.4-5.8.9-9.2zm10.8 38.5v4.3c-44.6 1.4-85.4 18.1-117.4 44.9l-8.8-10.1c2.3-3.5 3.7-7.8 3.7-12.3 0-3.8-1-7.4-2.6-10.5 29.3-21.5 64-36 101.7-41.1 1.7 12.4 11.2 22.4 23.4 24.8zm-152.7-23.6c11 0 21.6-2.5 31.6-7.5.6-.3 57.7-30 103.9-34-3 10.1-5 20.6-6 27.8-41.1 5.1-79 21-110.7 44.6-3.4-2-7.2-3.1-11.4-3.1-3.5 0-6.8.8-9.7 2.2l-33.6-38.3c12.3 5.5 24.3 8.3 35.9 8.3zm-49.9 61.9l.5-.7c10.4-17.2 13-36.8 7.8-57.4l30 34.3c-2.3 3.5-3.7 7.8-3.7 12.3 0 3.3.7 6.4 2 9.3-32.7 35.2-54.7 80.4-61 130.4-8.9 1.4-20.7 5.2-29.6 10.9 3.5-52.8 21.2-98.5 54-139.1zM96.9 434c.2-5.8 16.3-13.8 29-16.4 2.8-.6 5.4-.9 7.6-.9 1.7 0 3.2.2 4.8.7 7.3 2.1 12.7 8.8 12.7 16.8s-5.4 14.7-12.7 16.8c-1.5.4-3.1.7-4.8.7-2.3 0-4.9-.3-7.6-.9-12.7-2.7-28.8-10.7-29-16.5v-.3zm.6 18.4c8.9 5.8 20.8 9.6 29.6 11 5.3 42.4 22.1 82.6 48.7 116.2-11.9 1.1-21.8 3.3-29.8 5.8-28.7-39.4-45.3-84.9-48.5-133zM154.9 597c-.3-.4-.6-.7-.9-1.1 30.1-8.3 63-3.9 86.1 1.6 27.9 6.7 48.3 16.4 48.5 16.5l.1-.2c22.1 8.8 46.2 13.7 71.4 13.7 25.1 0 49.1-4.8 71.1-13.6l.6-.3c2.6-1.1 5.3-2.2 7.8-3.4 8.5-3.5 22.8-8.7 40-12.8 23.3-5.6 56.3-10 86.4-1.6-5.2 6.4-10.6 12.5-16.4 18.4-8.4-2.3-29.8-6.7-58.7-3.6-31.4 3.4-77.6 16.8-124.8 60.4v-10.9c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v10.3c-46.9-43.1-92.9-56.4-124.1-59.8-29.6-3.2-51.3 1.6-59.2 3.8-5.2-5.4-10.5-11.3-15.5-17.4zm26.3 27.8c10-2 26.9-4 48-1.6 55.5 6.2 98.1 37.9 124.8 64.5v18.1c-.9.5-1.9 1.1-3 1.9-6.5-8.3-15-18-25.7-27.4-25.2-22.3-67.6-47.5-126.2-40.5v.1c-6.2-4.8-12.2-9.8-17.9-15.1zm155.3 98c-11.7-15-24.5-26.3-37.3-34.8l.1-.3c-.3-.1-.6-.2-.9-.2-21.3-13.9-42.7-20-59.9-22.5-8.1-4.2-16.1-8.9-23.8-14 37.7-1.1 71.9 11.7 102.1 38.2 10.4 9.1 18.6 18.5 24.8 26.6-1.9 2.1-3.6 4.4-5.1 7zm29.9 37.5c-1.5 1.8-3.1 3.6-4.9 5.4-.4.4-.9.9-1.4 1.3l-.1.1-.1.1v-.2c-.2-.2-.5-.4-.7-.7-2-1.9-3.7-3.8-5.3-5.7-7.3-8.7-10.5-16.8-9.4-24.2.1-.6.2-1.2.4-1.8.8-3.2 2.3-6 4.1-8.4 1.5-2 3.2-3.7 4.9-5.2 1.5-1.3 3-2.4 4.3-3.3.6-.4 1.1-.7 1.6-1 0 0 .1 0 .1-.1h.1c.7.4 1.4.9 2.3 1.5 1.2.8 2.6 1.9 4 3.1 1.8 1.6 3.6 3.5 5.1 5.6 1.8 2.6 3.3 5.5 3.9 8.8 0 .2.1.5.2.7 1.1 7.3-2 15.3-9.1 24zm24.4-45.1c-.2.2-.4.4-.5.6-2.3 2.6-4.4 5.2-6.3 7.7-1.5-2.6-3.2-5-5-7.1 6.2-8.1 14.6-17.8 25.2-27.1 30-26.4 64.1-39.2 101.5-38.3-7.8 5.1-15.8 9.9-24 14.1-42.8 6.5-72.1 28.7-90.9 50.1zm174.5-11.8c5.7 0 10.3 4.6 10.3 10.3 0 5.7-4.6 10.3-10.3 10.3s-10.3-4.6-10.3-10.3c0-5.6 4.6-10.3 10.3-10.3zm31.2 32.1c13.6 4 23.2 18.9 25.8 23.4 3.2 5.6 7.5 13 13.8 18.8H567c-2.6-9.4-6.3-18.3-11-26.5 7.6-13.6 24.6-20.4 40.5-15.7z",className:"st2"}),Object(v.createElement)("path",{d:"M69.6 301.1c0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4c0-10.1-8.2-18.4-18.4-18.4s-18.4 8.3-18.4 18.4zm24.4 0c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6zM648.7 301.1c0-10.1-8.2-18.4-18.4-18.4-10.1 0-18.4 8.2-18.4 18.4 0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4zm-24.4 0c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6c-3.3.1-6-2.6-6-6zM666.4 346.9c-2.3-.9-5-.4-6.8 1.4-8.1 8.3-21.4 8-21.6 8h-.2c-3.3 0-6 2.6-6.2 5.9-.1 3.4 2.5 6.3 5.9 6.4.6 0 10.4.3 20.4-4.3v100.9c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V352.6c-.1-2.5-1.6-4.8-3.9-5.7zM55.7 471.4c3.4 0 6.2-2.8 6.2-6.2V364.3c10 4.6 19.8 4.3 20.4 4.3 3.4-.1 6.1-3 5.9-6.4-.1-3.4-3-6.1-6.4-5.9-.1 0-13.5.3-21.6-8-1.8-1.8-4.4-2.3-6.8-1.4-2.3.9-3.8 3.2-3.8 5.7v112.7c-.1 3.4 2.7 6.1 6.1 6.1zM671.3 574.3c0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h40c3.4 0 6.2-2.7 6.2-6.2zM629.8 598c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-15.4c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.4zM644.8 609.4c0-3.4-2.8-6.2-6.2-6.2h-38.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.7 6.2-6.2zM620.6 627.1c0-3.4-2.8-6.2-6.2-6.2h-29.9c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2zM565.1 638.6c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-17zM665.1 532.8h-22.3c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h22.3c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 550.5H634c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h31.1c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 497.5h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM665.1 515.2h-15.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.2c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2z",className:"st2"}),Object(v.createElement)("circle",{cx:"55.5",cy:"485.6",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"80.5",cy:"627.3",r:"6.2",className:"st2"}),Object(v.createElement)("circle",{cx:"120.3",cy:"645",r:"6.2",className:"st2"}),Object(v.createElement)("path",{d:"M54.9 580.7h40c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM105.6 585.9H90.2c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h15.4c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM119.6 603.5H81.4c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.8 6.2-6.2 0-3.5-2.8-6.2-6.2-6.2zM135.5 621.1h-29.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM131.7 645c0 3.4 2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-17c-3.4 0-6.2 2.8-6.2 6.2zM54.9 545.4h22.3c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 563.1H86c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 510.1h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 527.7h15.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM360 767.1c.1-.1 0-.1 0-.2v.2zM641.2 202.7c.1 0 .1 0 0 0 2.8 0 5.3-1.9 6-4.7 2.2-8.8 1.3-16.3-2.9-22.5-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.4 9 19 9.3 20.2 9.4zm-7-20.2c1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6-1.6-2-2.4-4.6-2.4-7.9 2 1 4.2 2.6 5.7 4.8zM601 113.3c-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.2 9 18.8 9.3 20.1 9.3 2.8 0 5.3-1.9 6-4.7 2.3-8.6 1.4-16.2-2.8-22.4zm-13.5 10.1c-1.6-2-2.4-4.6-2.4-7.9 2.1 1 4.3 2.6 5.7 4.8 1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6zM97.3 163.4c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.6-3.2-3.6-5.3-6.8-4.9zm-6.7 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.8 5.9-2.3 7.9zM139.7 101.2c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.7-3.2-3.6-5.3-6.8-4.9zm-6.8 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.7 5.9-2.3 7.9zM555.1 392c.4 3.2 3 5.5 6.1 5.5h.7c3.4-.4 5.8-3.5 5.4-6.9-6.2-54-43.1-92.2-44.7-93.8-2.4-2.4-6.3-2.5-8.7-.1-2.4 2.4-2.5 6.3-.1 8.7.4.4 35.6 36.9 41.3 86.6zM159.1 397.4h.7c3.1 0 5.8-2.3 6.1-5.5 5.7-49.7 40.9-86.2 41.2-86.5 2.4-2.4 2.3-6.4-.1-8.7-2.4-2.4-6.4-2.4-8.7.1-1.6 1.6-38.4 39.8-44.7 93.8-.3 3.4 2.1 6.4 5.5 6.8z",className:"st2"})))),Z=function(e){u()(n,e);var t=F(n);function n(){var e;return a()(this,n),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(i()(e)),e.runPluginInstall=e.runPluginInstall.bind(i()(e)),e.focusMode=e.focusMode.bind(i()(e)),e.fullFocusMode=e.fullFocusMode.bind(i()(e)),e.selectedMode=e.selectedMode.bind(i()(e)),e.selectedFullMode=e.selectedFullMode.bind(i()(e)),e.backToDash=e.backToDash.bind(i()(e)),e.saveConfig=e.saveConfig.bind(i()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",fontPair:"",search:null,isFetching:!1,isImporting:!1,isSelected:!1,response:"",isPageSelected:!1,starterSettings:kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{},selectedPage:"home",progress:"",focusMode:!1,finished:!1,overrideColors:!1,overrideFonts:!1,isOpenCheckColor:!1,isOpenCheckFont:!1,isOpenCheckPast:!1,removePast:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],etemplates:kadenceStarterParams.etemplates?kadenceStarterParams.etemplates:[],palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[],logo:kadenceStarterParams.logo?kadenceStarterParams.logo:"",hasContent:!!kadenceStarterParams.has_content&&kadenceStarterParams.has_content,hasPastContent:!!kadenceStarterParams.has_previous&&kadenceStarterParams.has_previous,isSaving:!1},e}return s()(n,[{key:"saveConfig",value:function(e,t){var n=this;this.setState({isSaving:!0});var r=kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{};r[e]||(r[e]=""),r[e]=t,new wp.api.models.Settings({kadence_starter_templates_config:JSON.stringify(r)}).save().then((function(e){n.setState({starterSettings:r,isSaving:!1}),kadenceStarterParams.starterSettings=JSON.stringify(r)}))}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!1})}},{key:"fullFocusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!0})}},{key:"selectedFullMode",value:function(){this.setState({isSelected:!0})}},{key:"selectedMode",value:function(e){this.setState({selectedPage:e,isPageSelected:!0,isImporting:!0})}},{key:"backToDash",value:function(){this.setState({isFetching:!1,activeTemplate:"",overrideColors:!1,overrideFonts:!1,colorPalette:"",fontPair:"",focusMode:!1,finished:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",selectedPage:"home"})}},{key:"runPluginInstallSingle",value:function(e,t){this.setState({progress:"plugins",isFetching:!0});var n=new FormData;n.append("action","kadence_import_install_plugins"),n.append("security",kadenceStarterParams.ajax_nonce),n.append("selected",e),n.append("page_id",t),this.runPageAjax(n)}},{key:"runRemovePast",value:function(e){this.setState({progress:"remove",isFetching:!0});var t=new FormData;t.append("action","kadence_remove_past_import_data"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("selected",e),this.runAjax(t)}},{key:"runPluginInstall",value:function(e){this.setState({progress:"plugins",isFetching:!0});var t=new FormData;t.append("action","kadence_import_install_plugins"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("selected",e),this.runAjax(t)}},{key:"runPageAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(n,r,a){if(void 0!==n.status&&"newAJAX"===n.status)t.state.progress="contentNew",t.runPageAjax(e);else if(void 0!==n.status&&"pluginSuccess"===n.status){t.setState({progress:"content"});var c=new FormData;c.append("action","kadence_import_single_data"),c.append("security",kadenceStarterParams.ajax_nonce),c.append("selected",t.state.activeTemplate),c.append("page_id",t.state.selectedPage),c.append("override_colors",t.state.overrideColors),c.append("override_fonts",t.state.overrideFonts),c.append("palette",t.state.colorPalette),c.append("font",t.state.fontPair),t.runPageAjax(c)}else void 0!==n.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:"<p>"+n.message+"</p>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+n+"</p></div>"})})).fail((function(e){t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(n,r,a){if(void 0!==n.status&&"newAJAX"===n.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==n.status&&"customizerAJAX"===n.status){t.setState({progress:"customizer"}),(c=new FormData).append("action","kadence_import_customizer_data"),c.append("security",kadenceStarterParams.ajax_nonce),c.append("wp_customize","on"),t.runAjax(c)}else if(void 0!==n.status&&"afterAllImportAJAX"===n.status){t.setState({progress:"widgets"}),(c=new FormData).append("action","kadence_after_import_data"),c.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(c)}else if(void 0!==n.status&&"pluginSuccess"===n.status){t.setState({progress:"content"}),(c=new FormData).append("action","kadence_import_demo_data"),c.append("security",kadenceStarterParams.ajax_nonce),c.append("selected",t.state.activeTemplate),c.append("palette",t.state.colorPalette),c.append("font",t.state.fontPair),t.runAjax(c)}else if(void 0!==n.status&&"removeSuccess"===n.status){var c;t.setState({progress:"plugins"}),(c=new FormData).append("action","kadence_import_install_plugins"),c.append("security",kadenceStarterParams.ajax_nonce),c.append("selected",t.state.activeTemplate),t.runAjax(c)}else void 0!==n.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:"<p>"+n.message+"</p>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+n+"</p></div>"})})).fail((function(e){t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"render",value:function(){for(var e=this,t=["all"],n=0;n<this.state.templates.length;n++)for(var r=0;r<this.state.templates[n].categories.length;r++)t.includes(this.state.templates[n].categories[r])||t.push(this.state.templates[n].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var a=function(){var t=("elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})))[0];return Object(v.createElement)("div",{className:"kst-grid-single-site"},Object(v.createElement)("div",{className:"kst-import-selection-item"},Object(v.createElement)("div",{className:"kst-import-selection"},Object(v.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(v.createElement)("div",{className:"kst-import-selection-options"},Object(v.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(v.createElement)("div",{className:"kst-import-selection-title"},Object(v.createElement)("h2",null,A("Template:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.name),Object(v.createElement)("br",null)," ",A("Selected Page:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(v.createElement)("div",{className:"kst-import-grid-title"},Object(v.createElement)("h2",null,A("Page Template Plugins","kadence-starter-templates"))),Object(v.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,n=e.title,r=e.src;return Object(v.createElement)("li",{className:"plugin-required"},n," - ",Object(v.createElement)("span",{class:"plugin-status"},"notactive"===t?A("Not Installed","kadence-starter-templates"):t)," ","active"!==t&&"thirdparty"===r?Object(v.createElement)("span",{class:"plugin-install-required"},A("Please install and activate this third-party premium plugin")):"")}))),Object(v.createElement)("p",{className:"desc-small note-about-colors"},A("*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.","kadence-starter-templates")),Object(v.createElement)(Y,{label:A("Override Your Sites Global Colors?","kadence-starter-templates"),checked:void 0!==e.state.overrideColors&&e.state.overrideColors,onChange:function(t){return e.state.overrideColors?e.setState({overrideColors:!1}):e.setState({isOpenCheckColor:!0})}}),e.state.isOpenCheckColor?Object(v.createElement)(V,{className:"ksp-confirm-modal",title:A("Override Your Sites Colors on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckColor:!1})}},Object(v.createElement)("p",{className:"desc-small note-about-colors"},A("This will override the customizer settings for global colors on your current site when you import this page template.","kadence-starter-templates")),Object(v.createElement)("div",{className:"ksp-override-model-buttons"},Object(v.createElement)(G,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!1})}},A("Cancel","kadence-starter-templates")),Object(v.createElement)(G,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!0})}},A("Override Colors","kadence-starter-templates")))):null,e.state.overrideColors&&e.state.colorPalette&&Object(v.createElement)(H,null,Object(v.createElement)("h3",null,A("Selected Color Palette","kadence-starter-templates")),h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;if(n===e.state.colorPalette)return Object(v.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},h()(r,(function(e,t){return Object(v.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(v.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(v.createElement)(Y,{label:A("Override Your Sites Fonts?","kadence-starter-templates"),checked:void 0!==e.state.overrideFonts&&e.state.overrideFonts,onChange:function(t){return e.state.overrideFonts?e.setState({overrideFonts:!1}):e.setState({isOpenCheckFont:!0})}}),e.state.isOpenCheckFont?Object(v.createElement)(V,{className:"ksp-confirm-modal",title:A("Override Your Sites Fonts on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckFont:!1})}},Object(v.createElement)("p",{className:"desc-small note-about-colors"},A("This will override the customizer typography settings on your current site when you import this page template.","kadence-starter-templates")),Object(v.createElement)("div",{className:"ksp-override-model-buttons"},Object(v.createElement)(G,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!1})}},A("Cancel","kadence-starter-templates")),Object(v.createElement)(G,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!0})}},A("Override Fonts","kadence-starter-templates")))):null,e.state.fontPair&&e.state.overrideFonts&&Object(v.createElement)(H,null,Object(v.createElement)("h3",{className:"kst-selected-font-pair-title"},A("Selected Font Pair","kadence-starter-templates")),h()(e.state.fonts,(function(t){var n=t.font,r=t.img,a=t.name;if(n===e.state.fontPair)return Object(v.createElement)("div",{className:"kst-selected-font-pair"},Object(v.createElement)("img",{src:r,className:"font-pairing"}),Object(v.createElement)("h4",null,a))}))),"plugins"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),e.state.isFetching&&Object(v.createElement)(q,null),!kadenceStarterParams.isKadence&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},Object(v.createElement)("h2",null,A("This Template Requires the Kadence Theme","kadence-starter-templates")),Object(v.createElement)(U,{href:"https://kadence-theme.com/"},A("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(v.createElement)(H,null,Object(v.createElement)(G,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstallSingle(t.slug,e.state.selectedPage)}},A("Start Importing Page"))))))},c=function(){var t=("elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})))[0],n=!1;return Object(v.createElement)(H,null,Object(v.createElement)("div",{className:"kst-grid-single-site"},Object(v.createElement)("div",{className:"kst-import-selection-item"},Object(v.createElement)("div",{className:"kst-import-selection"},Object(v.createElement)("img",{src:t.pages.home.image,alt:t.name}))),Object(v.createElement)("div",{className:"kst-import-selection-options"},Object(v.createElement)("div",{className:"kst-import-selection-title"},Object(v.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(v.createElement)("h2",null,A("Template:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.name)))))),Object(v.createElement)(V,{className:"kst-import-modal",title:A("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},e.state.hasContent&&Object(v.createElement)("div",{className:"kadence_starter_templates_notice"},e.state.hasPastContent?Object(v.createElement)(H,null,kadenceStarterParams.notice_previous):Object(v.createElement)(H,null,kadenceStarterParams.notice)),Object(v.createElement)("h3",null,A("Starter Template Plugins","kadence-starter-templates")),h()(t.plugins,(function(e){var t=e.state,r=(e.title,e.src);"active"!==t&&"thirdparty"===r&&(n=!0)})),n&&Object(v.createElement)("p",{className:"desc-small install-third-party-notice"},A("*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.","kadence-starter-templates")),Object(v.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,n=e.title,r=e.src;return Object(v.createElement)("li",{className:"plugin-required"},n," ","active"!==t&&"thirdparty"===r?Object(v.createElement)("span",{class:"plugin-install-required"},A("Please install and activate this third-party premium Plugin")):"")}))),e.state.colorPalette&&Object(v.createElement)(H,null,Object(v.createElement)("h3",null,A("Selected Color Palette","kadence-starter-templates")),h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;if(n===e.state.colorPalette)return Object(v.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},h()(r,(function(e,t){return Object(v.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(v.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),e.state.fontPair&&Object(v.createElement)(H,null,Object(v.createElement)("h3",{className:"kst-selected-font-pair-title"},A("Selected Font Pair","kadence-starter-templates")),h()(e.state.fonts,(function(t){var n=t.font,r=t.img,a=t.name;if(n===e.state.fontPair)return Object(v.createElement)("div",{className:"kst-selected-font-pair"},Object(v.createElement)("img",{src:r,className:"font-pairing"}),Object(v.createElement)("h4",null,a))}))),e.state.hasPastContent&&Object(v.createElement)(H,null,Object(v.createElement)(Y,{label:A("Delete Previously Imported Posts and Images?","kadence-starter-templates"),checked:void 0!==e.state.removePast&&e.state.removePast,onChange:function(t){return e.state.removePast?e.setState({removePast:!1}):e.setState({removePast:!0})}})),"remove"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.remove_progress),"plugins"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(v.createElement)(q,null),!kadenceStarterParams.isKadence&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},Object(v.createElement)("h2",null,A("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(v.createElement)(U,{href:"https://kadence-theme.com/"},A("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(v.createElement)(H,null,n&&Object(v.createElement)(G,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug):e.runPluginInstall(t.slug)}},A("Skip and Import with Partial Content")),!n&&Object(v.createElement)(G,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug):e.runPluginInstall(t.slug)}},A("Start Importing")))))},s=function(){var t=("elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})))[0];return Object(v.createElement)(H,null,Object(v.createElement)("div",{className:"kst-import-selection-options"},Object(v.createElement)("div",{className:"kst-import-grid-title"},Object(v.createElement)("h2",null,A("Page Templates","kadence-starter-templates"))),Object(v.createElement)("div",{className:"templates-grid"},h()(t.pages,(function(t){var n=t.title,r=t.id,a=t.image;return Object(v.createElement)("div",{className:"kst-template-item"},Object(v.createElement)(G,{key:r,className:"kst-import-btn",isSmall:!0,onClick:function(){return e.selectedMode(r)}},Object(v.createElement)(j.a,{offsetBottom:200},Object(v.createElement)("img",{src:a.replace(r,r+"-thumb"),alt:n})),Object(v.createElement)("div",{className:"demo-title"},Object(v.createElement)("h4",null,n," ",Object(v.createElement)("span",null,A("View Details","kadence-starter-templates"))))))}))),Object(v.createElement)("div",{className:"kst-import-selection-bottom"},Object(v.createElement)(G,{className:"kt-import-fullsite",isPrimary:!0,onClick:function(){return e.selectedFullMode()}},A("Import Full Site","kadence-starter-templates")))))},o=function(){return Object(v.createElement)("div",{className:"templates-grid"},h()("elementor"===e.state.starterSettings.builderType?e.state.etemplates:e.state.templates,(function(t){var n=t.name,r=t.key,a=t.slug,c=t.image,s=(t.content,t.categories),o=t.keywords,i=t.pro,l=t.pages;if(("all"===e.state.category||s.includes(e.state.category))&&(!e.state.search||o&&o.some((function(t){return t.toLowerCase().includes(e.state.search.toLowerCase())}))))return Object(v.createElement)("div",{className:"kst-template-item"},Object(v.createElement)(G,{key:r,className:"kst-import-btn",isSmall:!0,isDisabled:void 0!==i&&i&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.fullFocusMode(a)}},Object(v.createElement)(j.a,{offsetBottom:200},Object(v.createElement)("img",{src:l?l.home.image.replace("home","home-thumb"):c,alt:n})),Object(v.createElement)("div",{className:"demo-title"},Object(v.createElement)("h4",null,n))),void 0!==i&&i&&Object(v.createElement)(H,null,Object(v.createElement)("span",{className:"kb-pro-template"},A("Membership","kadence-starter-sites")),"true"!==kadenceStarterParams.pro&&Object(v.createElement)("div",{className:"kt-popover-pro-notice"},Object(v.createElement)("h2",null,A("Kadence Full Membership required for this item","kadence-starter-sites")," "),Object(v.createElement)(U,{href:"https://www.kadencewp.com/product/kadence-membership/"},A("Upgrade to Membership","kadence-starter-sites")))))})))},i=function(){var t=("elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})))[0];return Object(v.createElement)("div",{className:"kst-grid-single-site"},Object(v.createElement)("div",{className:"kst-import-selection-item"},Object(v.createElement)("div",{className:"kst-import-selection"},Object(v.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(v.createElement)("div",{className:"kst-import-selection-options"},Object(v.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(v.createElement)("div",{className:"kst-import-selection-title"},Object(v.createElement)("h2",null,A("Template:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.name),Object(v.createElement)("br",null)," ",A("Selected Page:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(v.createElement)("div",{className:"kst-import-grid-title"},Object(v.createElement)("h2",null,A("Import complete!","kadence-starter-templates")),Object(v.createElement)("div",{class:"kadence_starter_templates_finished"},Object(v.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))},l=function(){var t=("elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})))[0];return Object(v.createElement)("div",{className:"kst-grid-single-site"},Object(v.createElement)("div",{className:"kst-import-selection-item"},Object(v.createElement)("div",{className:"kst-import-selection"},Object(v.createElement)("img",{src:t.pages.home.image}))),Object(v.createElement)("div",{className:"kst-import-selection-options"},Object(v.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(v.createElement)("div",{className:"kst-import-selection-title"},Object(v.createElement)("h2",null,A("Template:","kadence-starter-templates")," ",Object(v.createElement)("span",null,t.name))),Object(v.createElement)("div",{className:"kst-import-grid-title"},Object(v.createElement)("h2",null,A("Import complete!","kadence-starter-templates")),Object(v.createElement)("div",{class:"kadence_starter_templates_finished"},Object(v.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))};return Object(v.createElement)(H,null,Object(v.createElement)("div",{class:"kadence_theme_dash_head"},Object(v.createElement)("div",{class:"kadence_theme_dash_head_container"},Object(v.createElement)("div",{class:"kadence_theme_dash_logo"},Object(v.createElement)("img",{src:this.state.logo})),this.state.focusMode&&Object(v.createElement)("div",{class:"kadence_theme_dash_back"},this.state.isPageSelected?Object(v.createElement)(K,{text:A("Back to Individual Pages Grid")},Object(v.createElement)(G,{className:"kt-import-back",icon:C,onClick:function(){return!e.state.isFetching&&e.setState({colorPalette:"",finished:!1,selectedPage:"home",focusMode:!0,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""})}})):Object(v.createElement)(K,{text:A("Back to Starter Templates Grid")},Object(v.createElement)(G,{className:"kt-import-back",icon:C,onClick:function(){return e.backToDash()}}))),this.state.finished&&Object(v.createElement)("div",{class:"kadence_theme_dash_back"},Object(v.createElement)(K,{text:A("Back to Starter Templates Grid")},Object(v.createElement)(G,{className:"kt-import-back",icon:C,onClick:function(){return e.backToDash()}}))),Object(v.createElement)("div",{class:"kadence_starter_builder_type"},this.state.starterSettings&&this.state.starterSettings.builderType&&Object(v.createElement)(W,{className:"my-container-class-name",contentClassName:"kst-type-popover",position:"bottom left",renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(v.createElement)(G,{onClick:r,"aria-expanded":n,icon:"blocks"===e.state.starterSettings.builderType?Q:X},"blocks"===e.state.starterSettings.builderType?"Gutenberg":"Elementor",Object(v.createElement)($,{className:"kst-chev",icon:T}))},renderContent:function(t){t.isOpen;var n=t.onToggle;return Object(v.createElement)("div",null,Object(v.createElement)(J,{icon:Q,className:"blocks"===e.state.starterSettings.builderType?"active-item":"",isSelected:"blocks"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","blocks"),e.setState({activeTemplate:"",colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""}),n()}},A("Gutenberg","kadence-starter-templates")),Object(v.createElement)(J,{icon:X,className:"elementor"===e.state.starterSettings.builderType?"active-item":"",isSelected:"elementor"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","elementor"),e.setState({activeTemplate:"",colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""}),n()}},A("Elementor","kadence-starter-templates")))}})))),Object(v.createElement)("div",{class:"kadence_theme_starter_dash_inner"},this.state.starterSettings&&this.state.starterSettings.builderType?Object(v.createElement)((function(){return Object(v.createElement)(H,null,e.state.isSaving?Object(v.createElement)("div",{className:"kst-overlay-saving"},Object(v.createElement)(q,null)):Object(v.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(v.createElement)(H,null,e.state.isImporting&&Object(v.createElement)(H,null,e.state.isPageSelected?Object(v.createElement)(a,null):Object(v.createElement)(c,null)),!e.state.isImporting&&e.state.isSelected&&Object(v.createElement)(z,{item:"elementor"===e.state.starterSettings.builderType?e.state.etemplates.filter((function(t){return t.slug===e.state.activeTemplate})):e.state.templates.filter((function(t){return t.slug===e.state.activeTemplate})),colorPalette:e.state.colorPalette,fontPair:e.state.fontPair,onChange:function(t){e.setState(t)}}),!e.state.isImporting&&!e.state.isSelected&&Object(v.createElement)(s,null)),!e.state.focusMode&&!e.state.finished&&Object(v.createElement)(o,null),e.state.finished&&Object(v.createElement)(H,null,e.state.isPageSelected?Object(v.createElement)(i,null):Object(v.createElement)(l,null))))}),null):Object(v.createElement)((function(){return Object(v.createElement)("div",{className:"kst-choose-builder-wrap"},Object(v.createElement)("div",{className:"kst-choose-builder-center"},Object(v.createElement)("h2",{className:"kst-choose-builder-title"},A("Choose a Builder","kadence-starter-templates")),Object(v.createElement)("div",{className:"kst-choose-builder-inner"},Object(v.createElement)(G,{icon:Q,className:"kt-import-select-type",onClick:function(){return e.saveConfig("builderType","blocks")}},A("Gutenberg","kadence-starter-templates")),Object(v.createElement)(G,{icon:X,className:"kt-import-select-type",onClick:function(){return e.saveConfig("builderType","elementor")}},A("Elementor","kadence-starter-templates"))),e.state.isSaving&&Object(v.createElement)("div",{className:"kst-overlay-saving"},Object(v.createElement)(q,null))))}),null)))}}]),n}(R);wp.domReady((function(){D(Object(v.createElement)(Z,null),document.querySelector(".kadence_starter_dashboard_main"))}))}]);
|
1 |
+
!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=145)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,a){var r=a(31),n=a(49),s=a(128),c=a(4);e.exports=function(e,t){return(c(e)?r:s)(e,n(t,3))}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,a){var r=a(35),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},function(e,t){var a=Array.isArray;e.exports=a},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,a){var r=a(62),n=a(67);e.exports=function(e,t){var a=n(e,t);return r(a)?a:void 0}},function(e,t){function a(t){return e.exports=a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}e.exports=a},function(e,t,a){var r=a(12),n=a(63),s=a(64),c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?n(e):s(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,a){var r=a(52),n=a(53),s=a(54),c=a(55),o=a(56);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(33);e.exports=function(e,t){for(var a=e.length;a--;)if(r(e[a][0],t))return a;return-1}},function(e,t,a){var r=a(3).Symbol;e.exports=r},function(e,t,a){var r=a(6)(Object,"create");e.exports=r},function(e,t,a){var r=a(76);e.exports=function(e,t){var a=e.__data__;return r(t)?a["string"==typeof t?"string":"hash"]:a.map}},function(e,t,a){var r=a(29);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function a(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}},function(e,t,a){var r=a(48);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,a){var r=a(30),n=a(2);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?n(e):t}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),n=a(134),s=d(n),c=d(a(135)),o=a(138),i=a(139),l=d(a(140)),u=d(a(141)),p=d(a(142)),m=d(a(143));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.lazyLoadHandler=a.lazyLoadHandler.bind(a),e.throttle>0&&(e.debounce?a.lazyLoadHandler=(0,l.default)(a.lazyLoadHandler,e.throttle):a.lazyLoadHandler=(0,u.default)(a.lazyLoadHandler,e.throttle)),a.state={visible:!1},a}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),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,i.add)(window,"resize",this.lazyLoadHandler),(0,i.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,p.default)((0,o.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,a=e.offsetVertical,r=e.offsetHorizontal,n=e.offsetTop,s=e.offsetBottom,c=e.offsetLeft,o=e.offsetRight,i=e.threshold||t,l=a||i,u=r||i;return{top:n||l,bottom:s||l,left:c||u,right:o||u}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,o.findDOMNode)(this),a=this.getEventNode();if((0,m.default)(t,a,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,i.remove)(window,"resize",this.lazyLoadHandler),(0,i.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.className,r=e.height,c=e.width,o=this.state.visible,i={height:r,width:c},l="LazyLoad"+(o?" is-visible":"")+(a?" "+a:"");return s.default.createElement(this.props.elementType,{className:l,style:i},o&&n.Children.only(t))}}]),t}(n.Component);t.default=f,f.propTypes={children:c.default.node.isRequired,className:c.default.string,debounce:c.default.bool,elementType:c.default.string,height:c.default.oneOfType([c.default.string,c.default.number]),offset:c.default.number,offsetBottom:c.default.number,offsetHorizontal:c.default.number,offsetLeft:c.default.number,offsetRight:c.default.number,offsetTop:c.default.number,offsetVertical:c.default.number,threshold:c.default.number,throttle:c.default.number,width:c.default.oneOfType([c.default.string,c.default.number]),onContentVisible:c.default.func},f.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,a){var r=a(6)(a(3),"Map");e.exports=r},function(e,t){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch(e){"object"==typeof window&&(a=window)}e.exports=a},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,a){var r=a(68),n=a(75),s=a(77),c=a(78),o=a(79);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(97),n=a(104),s=a(27);e.exports=function(e){return s(e)?r(e):n(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,a){var r=a(34),n=a(26);e.exports=function(e){return null!=e&&n(e.length)&&!r(e)}},function(e,t,a){var r=a(4),n=a(29),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var a=typeof e;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=e&&!n(e))||(c.test(e)||!s.test(e)||null!=t&&e in Object(t))}},function(e,t,a){var r=a(8),n=a(9);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==r(e)}},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=Array(r);++a<r;)n[a]=t(e[a],a,e);return n}},function(e,t,a){var r=a(10),n=a(57),s=a(58),c=a(59),o=a(60),i=a(61);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=c,l.prototype.has=o,l.prototype.set=i,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,a){var r=a(8),n=a(23);e.exports=function(e){if(!n(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,a){(function(t){var a="object"==typeof t&&t&&t.Object===Object&&t;e.exports=a}).call(this,a(22))},function(e,t){var a=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return a.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,a){var r=a(80),n=a(9);e.exports=function e(t,a,s,c,o){return t===a||(null==t||null==a||!n(t)&&!n(a)?t!=t&&a!=a:r(t,a,s,c,e,o))}},function(e,t,a){var r=a(81),n=a(84),s=a(85);e.exports=function(e,t,a,c,o,i){var l=1&a,u=e.length,p=t.length;if(u!=p&&!(l&&p>u))return!1;var m=i.get(e);if(m&&i.get(t))return m==t;var d=-1,f=!0,v=2&a?new r:void 0;for(i.set(e,t),i.set(t,e);++d<u;){var b=e[d],h=t[d];if(c)var g=l?c(h,b,d,t,e,i):c(b,h,d,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(v){if(!n(t,(function(e,t){if(!s(v,t)&&(b===e||o(b,e,a,c,i)))return v.push(t)}))){f=!1;break}}else if(b!==h&&!o(b,h,a,c,i)){f=!1;break}}return i.delete(e),i.delete(t),f}},function(e,t,a){var r=a(99),n=a(9),s=Object.prototype,c=s.hasOwnProperty,o=s.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(e){return n(e)&&c.call(e,"callee")&&!o.call(e,"callee")};e.exports=i},function(e,t,a){(function(e){var r=a(3),n=a(100),s=t&&!t.nodeType&&t,c=s&&"object"==typeof e&&e&&!e.nodeType&&e,o=c&&c.exports===s?r.Buffer:void 0,i=(o?o.isBuffer:void 0)||n;e.exports=i}).call(this,a(41)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var a=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&a.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,a){var r=a(101),n=a(102),s=a(103),c=s&&s.isTypedArray,o=c?n(c):r;e.exports=o},function(e,t,a){var r=a(23);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(a){return null!=a&&(a[e]===t&&(void 0!==t||e in Object(a)))}}},function(e,t,a){var r=a(47),n=a(15);e.exports=function(e,t){for(var a=0,s=(t=r(t,e)).length;null!=e&&a<s;)e=e[n(t[a++])];return a&&a==s?e:void 0}},function(e,t,a){var r=a(4),n=a(28),s=a(116),c=a(119);e.exports=function(e,t){return r(e)?e:n(e,t)?[e]:s(c(e))}},function(e,t){function a(t,r){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,r)}e.exports=a},function(e,t,a){var r=a(50),n=a(114),s=a(124),c=a(4),o=a(125);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?c(e)?n(e[0],e[1]):r(e):o(e)}},function(e,t,a){var r=a(51),n=a(113),s=a(45);e.exports=function(e){var t=n(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(a){return a===e||r(a,e,t)}}},function(e,t,a){var r=a(32),n=a(37);e.exports=function(e,t,a,s){var c=a.length,o=c,i=!s;if(null==e)return!o;for(e=Object(e);c--;){var l=a[c];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++c<o;){var u=(l=a[c])[0],p=e[u],m=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var d=new r;if(s)var f=s(p,m,u,e,t,d);if(!(void 0===f?n(m,p,3,s,d):f))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,a){var r=a(11),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,a=r(t,e);return!(a<0)&&(a==t.length-1?t.pop():n.call(t,a,1),--this.size,!0)}},function(e,t,a){var r=a(11);e.exports=function(e){var t=this.__data__,a=r(t,e);return a<0?void 0:t[a][1]}},function(e,t,a){var r=a(11);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,a){var r=a(11);e.exports=function(e,t){var a=this.__data__,n=r(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this}},function(e,t,a){var r=a(10);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,a){var r=a(10),n=a(21),s=a(24);e.exports=function(e,t){var a=this.__data__;if(a instanceof r){var c=a.__data__;if(!n||c.length<199)return c.push([e,t]),this.size=++a.size,this;a=this.__data__=new s(c)}return a.set(e,t),this.size=a.size,this}},function(e,t,a){var r=a(34),n=a(65),s=a(23),c=a(36),o=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,p=l.hasOwnProperty,m=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||n(e))&&(r(e)?m:o).test(c(e))}},function(e,t,a){var r=a(12),n=Object.prototype,s=n.hasOwnProperty,c=n.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,o),a=e[o];try{e[o]=void 0;var r=!0}catch(e){}var n=c.call(e);return r&&(t?e[o]=a:delete e[o]),n}},function(e,t){var a=Object.prototype.toString;e.exports=function(e){return a.call(e)}},function(e,t,a){var r,n=a(66),s=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},function(e,t,a){var r=a(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,a){var r=a(69),n=a(10),s=a(21);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||n),string:new r}}},function(e,t,a){var r=a(70),n=a(71),s=a(72),c=a(73),o=a(74);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(13);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,a){var r=a(13),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var a=t[e];return"__lodash_hash_undefined__"===a?void 0:a}return n.call(t,e)?t[e]:void 0}},function(e,t,a){var r=a(13),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:n.call(t,e)}},function(e,t,a){var r=a(13);e.exports=function(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,a){var r=a(14);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,a){var r=a(14);e.exports=function(e){return r(this,e).get(e)}},function(e,t,a){var r=a(14);e.exports=function(e){return r(this,e).has(e)}},function(e,t,a){var r=a(14);e.exports=function(e,t){var a=r(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this}},function(e,t,a){var r=a(32),n=a(38),s=a(86),c=a(90),o=a(108),i=a(4),l=a(40),u=a(43),p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,d,f,v){var b=i(e),h=i(t),g=b?"[object Array]":o(e),j=h?"[object Array]":o(t),y=(g="[object Arguments]"==g?p:g)==p,k=(j="[object Arguments]"==j?p:j)==p,O=g==j;if(O&&l(e)){if(!l(t))return!1;b=!0,y=!1}if(O&&!y)return v||(v=new r),b||u(e)?n(e,t,a,d,f,v):s(e,t,g,a,d,f,v);if(!(1&a)){var _=y&&m.call(e,"__wrapped__"),E=k&&m.call(t,"__wrapped__");if(_||E){var S=_?e.value():e,P=E?t.value():t;return v||(v=new r),f(S,P,a,d,v)}}return!!O&&(v||(v=new r),c(e,t,a,d,f,v))}},function(e,t,a){var r=a(24),n=a(82),s=a(83);function c(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new r;++t<a;)this.add(e[t])}c.prototype.add=c.prototype.push=n,c.prototype.has=s,e.exports=c},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,a){var r=a(12),n=a(87),s=a(33),c=a(38),o=a(88),i=a(89),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,a,r,l,p,m){switch(a){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new n(e),new n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=o;case"[object Set]":var f=1&r;if(d||(d=i),e.size!=t.size&&!f)return!1;var v=m.get(e);if(v)return v==t;r|=2,m.set(e,t);var b=c(d(e),d(t),r,l,p,m);return m.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,a){var r=a(3).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e,r){a[++t]=[r,e]})),a}},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e){a[++t]=e})),a}},function(e,t,a){var r=a(91),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,s,c,o){var i=1&a,l=r(e),u=l.length;if(u!=r(t).length&&!i)return!1;for(var p=u;p--;){var m=l[p];if(!(i?m in t:n.call(t,m)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var v=i;++p<u;){var b=e[m=l[p]],h=t[m];if(s)var g=i?s(h,b,m,t,e,o):s(b,h,m,e,t,o);if(!(void 0===g?b===h||c(b,h,a,s,o):g)){f=!1;break}v||(v="constructor"==m)}if(f&&!v){var j=e.constructor,y=t.constructor;j==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f}},function(e,t,a){var r=a(92),n=a(94),s=a(25);e.exports=function(e){return r(e,s,n)}},function(e,t,a){var r=a(93),n=a(4);e.exports=function(e,t,a){var s=t(e);return n(e)?s:r(s,a(e))}},function(e,t){e.exports=function(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}},function(e,t,a){var r=a(95),n=a(96),s=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,o=c?function(e){return null==e?[]:(e=Object(e),r(c(e),(function(t){return s.call(e,t)})))}:n;e.exports=o},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=0,s=[];++a<r;){var c=e[a];t(c,a,e)&&(s[n++]=c)}return s}},function(e,t){e.exports=function(){return[]}},function(e,t,a){var r=a(98),n=a(39),s=a(4),c=a(40),o=a(42),i=a(43),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var a=s(e),u=!a&&n(e),p=!a&&!u&&c(e),m=!a&&!u&&!p&&i(e),d=a||u||p||m,f=d?r(e.length,String):[],v=f.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||p&&("offset"==b||"parent"==b)||m&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||o(b,v))||f.push(b);return f}},function(e,t){e.exports=function(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}},function(e,t,a){var r=a(8),n=a(9);e.exports=function(e){return n(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,a){var r=a(8),n=a(26),s=a(9),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&n(e.length)&&!!c[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,a){(function(e){var r=a(35),n=t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,c=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||c&&c.binding&&c.binding("util")}catch(e){}}();e.exports=o}).call(this,a(41)(e))},function(e,t,a){var r=a(105),n=a(106),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return n(e);var t=[];for(var a in Object(e))s.call(e,a)&&"constructor"!=a&&t.push(a);return t}},function(e,t){var a=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||a)}},function(e,t,a){var r=a(107)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(a){return e(t(a))}}},function(e,t,a){var r=a(109),n=a(21),s=a(110),c=a(111),o=a(112),i=a(8),l=a(36),u=l(r),p=l(n),m=l(s),d=l(c),f=l(o),v=i;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||n&&"[object Map]"!=v(new n)||s&&"[object Promise]"!=v(s.resolve())||c&&"[object Set]"!=v(new c)||o&&"[object WeakMap]"!=v(new o))&&(v=function(e){var t=i(e),a="[object Object]"==t?e.constructor:void 0,r=a?l(a):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case m:return"[object Promise]";case d:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,a){var r=a(6)(a(3),"DataView");e.exports=r},function(e,t,a){var r=a(6)(a(3),"Promise");e.exports=r},function(e,t,a){var r=a(6)(a(3),"Set");e.exports=r},function(e,t,a){var r=a(6)(a(3),"WeakMap");e.exports=r},function(e,t,a){var r=a(44),n=a(25);e.exports=function(e){for(var t=n(e),a=t.length;a--;){var s=t[a],c=e[s];t[a]=[s,c,r(c)]}return t}},function(e,t,a){var r=a(37),n=a(115),s=a(121),c=a(28),o=a(44),i=a(45),l=a(15);e.exports=function(e,t){return c(e)&&o(t)?i(l(e),t):function(a){var c=n(a,e);return void 0===c&&c===t?s(a,e):r(t,c,3)}}},function(e,t,a){var r=a(46);e.exports=function(e,t,a){var n=null==e?void 0:r(e,t);return void 0===n?a:n}},function(e,t,a){var r=a(117),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,c=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n,(function(e,a,r,n){t.push(r?n.replace(s,"$1"):a||e)})),t}));e.exports=c},function(e,t,a){var r=a(118);e.exports=function(e){var t=r(e,(function(e){return 500===a.size&&a.clear(),e})),a=t.cache;return t}},function(e,t,a){var r=a(24);function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=a.cache;if(s.has(n))return s.get(n);var c=e.apply(this,r);return a.cache=s.set(n,c)||s,c};return a.cache=new(n.Cache||r),a}n.Cache=r,e.exports=n},function(e,t,a){var r=a(120);e.exports=function(e){return null==e?"":r(e)}},function(e,t,a){var r=a(12),n=a(31),s=a(4),c=a(29),o=r?r.prototype:void 0,i=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return n(t,e)+"";if(c(t))return i?i.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a}},function(e,t,a){var r=a(122),n=a(123);e.exports=function(e,t){return null!=e&&n(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,a){var r=a(47),n=a(39),s=a(4),c=a(42),o=a(26),i=a(15);e.exports=function(e,t,a){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var m=i(t[l]);if(!(p=null!=e&&a(e,m)))break;e=e[m]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&o(u)&&c(m,u)&&(s(e)||n(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,a){var r=a(126),n=a(127),s=a(28),c=a(15);e.exports=function(e){return s(e)?r(c(e)):n(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,a){var r=a(46);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,a){var r=a(129),n=a(27);e.exports=function(e,t){var a=-1,s=n(e)?Array(e.length):[];return r(e,(function(e,r,n){s[++a]=t(e,r,n)})),s}},function(e,t,a){var r=a(130),n=a(133)(r);e.exports=n},function(e,t,a){var r=a(131),n=a(25);e.exports=function(e,t){return e&&r(e,t,n)}},function(e,t,a){var r=a(132)();e.exports=r},function(e,t){e.exports=function(e){return function(t,a,r){for(var n=-1,s=Object(t),c=r(t),o=c.length;o--;){var i=c[e?o:++n];if(!1===a(s[i],i,s))break}return t}}},function(e,t,a){var r=a(27);e.exports=function(e,t){return function(a,n){if(null==a)return a;if(!r(a))return e(a,n);for(var s=a.length,c=t?s:-1,o=Object(a);(t?c--:++c<s)&&!1!==n(o[c],c,o););return a}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,a){e.exports=a(136)()},function(e,t,a){"use strict";var r=a(137);function n(){}function s(){}s.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,s,c){if(c!==r){var o=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 o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var a={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:s,resetWarningCache:n};return a.PropTypes=a,a}},function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,a){var r,n;void 0===(n="function"==typeof(r=function(){function e(e,t){return function(a,r,n,s){a[e]?a[e](r,n,s):a[t]&&a[t]("on"+r,n)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,a,t,e):r)||(e.exports=n)},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r,n,s,c,o,i,l=0,u=!1,b=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(k,t),u?g(e):c}function y(e){var a=e-i;return void 0===i||a>=t||a<0||b&&e-l>=s}function k(){var e=d();if(y(e))return O(e);o=setTimeout(k,function(e){var a=t-(e-i);return b?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function _(){var e=d(),a=y(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(b)return o=setTimeout(k,t),g(i)}return void 0===o&&(o=setTimeout(k,t)),c}return t=v(t)||0,f(a)&&(u=!!a.leading,s=(b="maxWait"in a)?p(v(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),_.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},_.flush=function(){return void 0===o?c:O(d())},_}}).call(this,a(22))},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e,t,a){var r,n,s,c,o,i,l=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(k,t),u?g(e):c}function y(e){var a=e-i;return void 0===i||a>=t||a<0||f&&e-l>=s}function k(){var e=d();if(y(e))return O(e);o=setTimeout(k,function(e){var a=t-(e-i);return f?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function _(){var e=d(),a=y(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(f)return o=setTimeout(k,t),g(i)}return void 0===o&&(o=setTimeout(k,t)),c}return t=b(t)||0,v(a)&&(u=!!a.leading,s=(f="maxWait"in a)?p(b(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),_.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},_.flush=function(){return void 0===o?c:O(d())},_}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(a)&&(r="leading"in a?!!a.leading:r,n="trailing"in a?!!a.trailing:n),f(e,t,{leading:r,maxWait:t,trailing:n})}}).call(this,a(22))},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},n=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(n(t)))return t;t=t.parentNode}return window}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,a,r){if(function(e){return null===e.offsetParent}(t))return!1;var n=void 0,c=void 0,o=void 0,i=void 0;if(void 0===a||a===window)n=window.pageYOffset,o=window.pageXOffset,c=n+window.innerHeight,i=o+window.innerWidth;else{if(!e(a,window,r))return!1;var l=(0,s.default)(a);n=l.top,o=l.left,c=n+a.offsetHeight,i=o+a.offsetWidth}var u=(0,s.default)(t);return n<=u.top+t.offsetHeight+r.top&&c>=u.top-r.bottom&&o<=u.left+t.offsetWidth+r.left&&i>=u.left-r.right};var r,n=a(144),s=(r=n)&&r.__esModule?r:{default:r}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,a){"use strict";a.r(t);var r=a(16),n=a.n(r),s=a(17),c=a.n(s),o=a(2),i=a.n(o),l=a(18),u=a.n(l),p=a(19),m=a.n(p),d=a(7),f=a.n(d),v=a(30),b=a.n(v),h=a(0),g=a(1),j=a.n(g),y=a(20),k=a.n(y);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}var _=wp.i18n,E=_.__,S=(_.sprintf,wp.element),P=S.Fragment,w=S.Component,x=(S.render,S.PureComponent,wp.components),T=(x.Modal,x.Spinner,x.ButtonGroup),N=(x.Dropdown,x.Button),z=x.ExternalLink,M=(x.ToolbarGroup,x.MenuItem,x.Tooltip),C=function(e){u()(a,e);var t=O(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).state={colorPalette:e.props.colorPalette?e.props.colorPalette:"",fontPair:e.props.fontPair?e.props.fontPair:"",palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[]},e}return c()(a,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"render",value:function(){var e=this,t=this.props.item,a=!0,r=!1,n=!1;return Object(h.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(h.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(h.createElement)("div",{className:"wp-full-overlay-header"},Object(h.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.props.onChange({activeTemplate:"",colorPalette:"",fontPair:"",focusMode:!1})}})),Object(h.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(h.createElement)("div",{className:"install-theme-info"},Object(h.createElement)("div",{className:"theme-info-wrap"},Object(h.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(h.createElement)("div",{className:"theme-info-title-wrap"},Object(h.createElement)("h3",{className:"theme-name"},t.name),Object(h.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")))),Object(h.createElement)("div",{className:"palette-title-wrap"},Object(h.createElement)("h2",{className:"palette-title"},E("Optional: Change Color Scheme","kadence-starter-templates")),Object(h.createElement)(N,{label:E("clear"),className:"kst-clear-palette",disabled:!this.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({colorPalette:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:""},"*")}})),Object(h.createElement)(T,{className:"kst-palette-group","aria-label":E("Select a Palette","kadence-starter-templates")},j()(this.state.palettes,(function(t){var a=t.palette,r=t.colors;return Object(h.createElement)(N,{className:"kst-palette-btn",isPrimary:a===e.state.colorPalette,"aria-pressed":a===e.state.colorPalette,onClick:function(){document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:a},"*"),e.setState({colorPalette:a})}},Object(h.createElement)("span",{className:"kst-palette-bg",style:{background:r[4]?r[4]:void 0}}),j()(r,(function(e,t){if(4!==t)return Object(h.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)("p",{className:"desc-small"},E("*You can change this after import.","kadence-starter-templates")),Object(h.createElement)("div",{className:"font-title-wrap"},Object(h.createElement)("h2",{className:"font-title"},E("Optional: Change Font Family","kadence-starter-templates")),Object(h.createElement)(N,{label:E("clear"),className:"kst-clear-font",disabled:!this.state.fontPair,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({fontPair:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:""},"*")}})),Object(h.createElement)(T,{className:"kst-font-group","aria-label":E("Select a Font","kadence-starter-templates")},j()(this.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;return Object(h.createElement)(M,{text:n},Object(h.createElement)(N,{className:"kst-font-btn".concat(a===e.state.fontPair?" active":""),"aria-pressed":a===e.state.fontPair,onClick:function(){e.setState({fontPair:a}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:a},"*")}},Object(h.createElement)("img",{src:r,className:"font-pairing"})))}))),Object(h.createElement)("p",{className:"desc-small"},E("*You can change this after import.","kadence-starter-templates"))),Object(h.createElement)("div",{className:"kadence-starter-required-plugins"},Object(h.createElement)("h2",{className:"kst-required-title"},E("Required Plugins","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){if(kadenceStarterParams.plugins[e])return"active"!==kadenceStarterParams.plugins[e].state&&(a=!1,"thirdparty"===kadenceStarterParams.plugins[e].src&&(r=!0),"bundle"===kadenceStarterParams.plugins[e].src&&(n=!0)),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?E("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state))}))),!a&&Object(h.createElement)(P,null,(r||n)&&Object(h.createElement)("p",{className:"desc-small"},E("*Install Missing/Inactive Premium plugins to import.","kadence-starter-templates")),!r&&!n&&Object(h.createElement)("p",{className:"desc-small"},E("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates"))),void 0!==t.pro&&t.pro&&!t.member&&Object(h.createElement)("div",{className:"notice inline notice-alt notice-warning kadence-pro-notice"},Object(h.createElement)("p",null,Object(h.createElement)("strong",null,"Kadence Membership Site")),Object(h.createElement)("p",null,"To import this starter template you need to install Kadence Pro and Kadence Blocks Pro and activate your license using a ",Object(h.createElement)("strong",null,"full Kadence Membership license"),".")))),Object(h.createElement)("div",{class:"wp-full-overlay-footer"},void 0!==t.pro&&t.pro&&!t.member?Object(h.createElement)("div",{className:"kt-upgrade-notice"},Object(h.createElement)("h2",{className:"kst-import-options-title"},E("Kadence Membership is required","kadence-starter-sites")," "),Object(h.createElement)(z,{className:"kst-upgrade button-hero button button-primary",href:"https://www.kadencewp.com/product/kadence-membership/"},E("Upgrade to Membership","kadence-starter-sites"))):Object(h.createElement)(P,null,Object(h.createElement)("h2",{className:"kst-import-options-title"},E("Import Options","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(h.createElement)("button",{className:"kst-import-btn button-hero button",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isSelected:!1,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},E("Single Page","kadence-starter-templates")),Object(h.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isImporting:!0,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},E("Full Site","kadence-starter-templates")))))),Object(h.createElement)("div",{class:"wp-full-overlay-main"},Object(h.createElement)("iframe",{id:"kadence-starter-preview",src:t.url+"?cache=bust"})))}}]),a}(w),F=a(5),I=Object(h.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(h.createElement)(F.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),D=Object(h.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(h.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),A=Object(h.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)(F.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}function L(e){try{var t=JSON.parse(e);if(t&&"object"===b()(t))return t}catch(e){}return!1}var R=wp.i18n,B=R.__,V=(R.sprintf,wp.element),q=V.Fragment,W=V.Component,G=V.render,$=(V.PureComponent,wp.components),U=$.Modal,K=$.Spinner,J=($.ButtonGroup,$.Dropdown),Y=$.Icon,X=$.Button,Q=$.ExternalLink,Z=($.ToolbarGroup,$.ToggleControl),ee=$.MenuItem,te=$.Tooltip,ae=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M15.984 18v2.016H8.015V18h7.969zM11.016 7.969v8.016h1.969V7.969h3l-3.984-3.984-3.984 3.984h3z"})),re=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"url(#_Linear1)"}),Object(h.createElement)("path",{fill:"#fff",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 114.046H130.011V130.046H82z"}),Object(h.createElement)("defs",null,Object(h.createElement)("linearGradient",{id:"_Linear1",x1:"0",x2:"1",y1:"0",y2:"0",gradientTransform:"rotate(-52.456 186.056 40.829) scale(178.658)",gradientUnits:"userSpaceOnUse"},Object(h.createElement)("stop",{offset:"0",stopColor:"#372b73"}),Object(h.createElement)("stop",{offset:"1",stopColor:"#e9335e"})))),ne=(Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"#93003c"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 114.046H130.011V130.046H82z"})),Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",enableBackground:"new 0 0 720 864",viewBox:"0 0 720 864",className:"gblogo"},Object(h.createElement)("g",null,Object(h.createElement)("path",{d:"M432.4 415.6c-2.5-1.7-5.9-1-7.6 1.5-9.9 14.9-30.9 15.7-32 15.7h-.5c-25.9 0-35.8 22.1-36.2 23-1.2 2.8.1 6 2.8 7.2.7.3 1.5.5 2.2.5 2.1 0 4.1-1.2 5-3.3.1-.2 6.9-15.4 24.4-16.4v28.3c-.7 6.1-3.6 10.9-8.7 14.5-5.3 3.7-12.4 5.6-21.1 5.6-10.4 0-18.9-3.6-25.2-10.7-6.4-7.1-9.6-17.2-9.6-30.2l.1-31.2c.5-11.5 3.6-20.6 9.5-27.1 6.4-7.1 14.8-10.7 25.2-10.7 8.7 0 15.8 1.9 21.1 5.6 5.3 3.7 8.3 8.8 8.8 15.4v.7c0 3.8 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9v-.7c-1-9.9-5.5-17.7-13.6-23.6-8.1-5.9-18.2-8.8-30.4-8.8-14.5 0-26.2 4.8-35.1 14.3-8.4 8.9-12.8 20.6-13.3 35 0 1-.1 2-.1 3l.1 28.1h-.1c0 15.9 4.5 28.6 13.4 38.1s20.6 14.3 35.1 14.3c12.2 0 22.3-2.9 30.4-8.8 7.4-5.4 11.8-12.5 13.3-21.3l.3-31.4c9.1-2.2 21.5-7.2 29.3-19 2-2.5 1.3-5.9-1.3-7.6zM528.7 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2zM117.8 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.7 6.2 6.2 6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"609.3",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"359.8",cy:"130.6",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M244.8 150.2h.3c23.3 0 33.7-14.6 41.6-28.2 2.6-4.5 12.2-19.5 25.8-23.4 16.8-4.9 34.7 2.9 41.7 18.2 1 2.2 3.2 3.5 5.4 3.6h.7c2.2-.1 4.4-1.4 5.4-3.6 7-15.3 24.9-23.1 41.7-18.2 13.6 4 23.2 18.9 25.8 23.4 7.9 13.7 18.3 28.2 41.9 28.2 14.2 0 31-10.6 35.7-30.9 3.9-16.8-3.3-32-19-39.7-3.1-1.5-6.8-.3-8.3 2.8-1.5 3.1-.3 6.8 2.8 8.3 14.9 7.4 13.6 20.5 12.4 25.8-2.4 10.4-11.6 21.4-23.7 21.4-15.5 0-22.9-7.8-31.2-22.1-4.1-7-15.5-24-33-29.1-19.1-5.6-39.3 1.1-50.9 15.8-11.6-14.7-31.8-21.4-50.9-15.8-17.5 5.1-28.9 22.1-33 29.1-8.3 14.3-15.7 22.1-30.9 22.1h-.2c-13.2-.1-21.6-9.3-24-18.4-1.2-4.3-3.7-19 13.1-29 2.9-1.7 3.9-5.5 2.1-8.5-1.8-2.9-5.5-3.9-8.5-2.1-19.3 11.5-22.3 29.7-18.7 42.9 4.4 16.3 18.9 27.3 35.9 27.4z",className:"st2"}),Object(h.createElement)("path",{d:"M360 734L360.1 734 360.1 734 360 734z",className:"st2"}),Object(h.createElement)("circle",{cx:"108.1",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"90.7",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"631.3",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"664.5",cy:"485.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"639.6",cy:"627.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"599.8",cy:"644.8",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M231.9 111.2c0 9.2 7.5 16.7 16.7 16.7s16.7-7.5 16.7-16.7-7.5-16.7-16.7-16.7c-9.2-.1-16.7 7.4-16.7 16.7zm16.7-4.4c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM473.6 127.9c9.2 0 16.7-7.5 16.7-16.7s-7.5-16.7-16.7-16.7-16.7 7.5-16.7 16.7 7.5 16.7 16.7 16.7zm0-21.1c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM376.7 121.6c-3.2 1.2-4.8 4.7-3.6 7.9 1.2 3.2 4.7 4.8 7.9 3.7 1-.4 25-8.4 43.4 20.2 1.2 1.8 3.2 2.8 5.2 2.8 1.1 0 2.3-.3 3.3-1 2.9-1.8 3.7-5.7 1.9-8.5-19.2-29.7-46.4-29.4-58.1-25.1zM343.3 121.6c-.9-.3-9.1-3.2-20.3-1.5-10.4 1.5-25.3 7.4-37.7 26.7-1.8 2.9-1 6.7 1.9 8.5 1 .7 2.2 1 3.3 1 2 0 4-1 5.2-2.8 18.3-28.6 42.3-20.6 43.4-20.2 3.2 1.2 6.7-.5 7.9-3.7 1.2-3.2-.5-6.8-3.7-8zM627.8 138.5l30.1-34.2v49.3c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V88c0-2.6-1.6-4.9-4-5.8-2.4-.9-5.1-.2-6.8 1.7l-40.9 46.5c-2.3 2.6-2 6.5.6 8.7 2.4 2.3 6.3 2 8.6-.6zM56.8 159.9c3.4 0 6.2-2.8 6.2-6.2v-49.3l30.1 34.2c2.3 2.6 6.2 2.8 8.7.6 2.6-2.3 2.8-6.2.6-8.7L61.5 83.9c-1.7-1.9-4.4-2.6-6.8-1.7-2.4.9-4 3.2-4 5.8v65.7c0 3.4 2.7 6.2 6.1 6.2zM493.4 166c-2.9-.2-5.6 1.8-6.3 4.6-.7 2.9.7 5.9 3.3 7.1 9.8 4.6 18.7 6.4 26.7 6.4 15.3 0 27.5-6.7 36-13.7 13.6-11.2 20.6-25.3 20.9-25.9 1.4-2.9.4-6.4-2.4-8-6.3-3.7-17.2-6-33.8 4.1-8.3 5.1-14.7 11.2-15.8 12.3-15.2 13.4-27.9 13.1-28.6 13.1zm36.9-3.9l.3-.3c4.7-4.7 18-15.6 28.4-16.1-3 4.3-7.5 10.1-13.6 15.2-9 7.4-18.6 11-28.8 10.8 4.2-2.2 8.9-5.4 13.7-9.6zM151.4 136.5c-2.8 1.6-3.8 5.1-2.4 8 .3.6 7.3 14.7 20.9 25.9 8.5 7 20.6 13.7 36 13.7 8.1 0 17-1.8 26.7-6.4 2.7-1.3 4-4.2 3.3-7.1-.7-2.9-3.3-4.8-6.3-4.7-.5 0-13.3.4-28.5-13-1.1-1.1-7.5-7.2-15.8-12.3-16.6-10-27.6-7.7-33.9-4.1zm41.4 25.6c4.7 4.2 9.4 7.3 13.7 9.6-21.6.2-35.9-16.3-42.4-26 10.4.5 23.7 11.4 28.4 16.1l.3.3z",className:"st2"}),Object(h.createElement)("path",{d:"M671.8 664.6c-6.2-5.2-13-8.2-19.3-9.9 2.4-1.8 4.7-3.9 6.7-6.2 15.3-18 15.4-44.5.2-61.7-2.3-2.6-6.2-2.8-8.7-.5-2.6 2.3-2.8 6.2-.5 8.7 11.1 12.6 10.9 32.1-.4 45.5-9.2 10.8-26.7 13.4-31.9 14-15.7 1.7-33.3 5.3-42.8 26.8-1.5 3.3-2.4 7-2.6 11-2.2-.7-4.6-1.1-7-1.1-12.5 0-22.7 10.2-22.7 22.7 0 8.6 4.8 16.1 11.9 19.9-2.1 1.9-4.1 4-5.9 6.4-21-28.3-54.6-46.1-91.6-46.1-5.3 0-10.6.4-15.7 1.1 30.4-9.3 58.7-23.8 84.5-43 33.3-24.9 61-57.4 80-93.9 20-38.4 30.1-79.9 30.1-123.1v-.8-.2-.3c-.2-35.1-8-66.7-19.1-93.9 4.1.8 8 1.1 11.5 1.1 25.9 0 37.3-17.8 38.5-19.9 5.6-9.4 6.5-20.8 3.3-31.1.1-.3.1-.7.1-1.1V176.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2V271c-10.5-9.1-25.7-10.1-32-10.1-12.2.1-19.8-1.8-25.4-11.4-4.7-8.1-2-16.5 2.7-21.3 5.9-6 14.3-6.8 22.5-2.3 3 1.6 6.8.6 8.4-2.4 1.6-3 .6-6.8-2.4-8.4-13-7.2-27.6-5.4-37.3 4.4-9.6 9.8-11.4 24.3-4.6 36.1 8.9 15.3 22.4 17.5 35.7 17.5h.5c4 0 16.9.6 24.3 7.6 9.6 9.1 12.1 23.4 5.8 34 0 0-.1.1-.1.2-.5.9-12.4 21.1-45.6 10.5-10-21.2-21.6-39.2-32.4-53.6l-4.9 3.7 4.9-3.8-2-2.6c-21.3-35.7 3.3-73.7 16.1-89.8l7.2-8.2c2.2-2.6 2-6.5-.6-8.7-2.5-2.1-6.1-2-8.4.3-.2.2-1.3 1.3-3 3.2-11.1 11.3-54.5 51.3-96.6 30.4l-1.2-.8-.6-.4c-37.7-20.3-74.9-32-110.4-35-4.6-10.5-10.7-18.5-18.4-18.5-7.8 0-13.9 8.1-18.6 18.8-49.7 2.2-111.5 34.3-114.1 35.6-42.3 21.3-85.9-18.9-97-30.2-1.7-1.9-2.9-3-3-3.2-2.3-2.3-5.9-2.4-8.4-.3-2.6 2.2-2.8 6.1-.6 8.7l7.7 8.7c4.5 5.6 10.2 13.7 15 23.4 12 24.3 12.2 46.4.7 65.8-14.3 17.8-25.9 36.5-34.8 56.2-33.5 10.9-45.5-9.5-46-10.4 0-.1-.1-.1-.1-.2-6.3-10.6-3.8-24.9 5.8-34 7.4-7 20.3-7.6 24.3-7.6h.1c13.4 0 27.2-2.1 36.1-17.5 6.8-11.8 5-26.4-4.6-36.1-9.7-9.9-24.3-11.6-37.3-4.4-3 1.6-4.1 5.4-2.4 8.4 1.6 3 5.4 4.1 8.4 2.4 8.3-4.5 16.7-3.7 22.5 2.3 4.7 4.8 7.3 13.2 2.7 21.3-5.5 9.5-13 11.4-25 11.4h-.4c-5.5 0-18.3.8-28.5 7.4v-90.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v104c-6.8 12.2-7.2 27.1-.2 39.1.7 1.3 5 8.5 14.6 13.9 5.5 3.1 13.4 6 23.9 6 3.8 0 8-.4 12.5-1.3-10.8 29-16.2 60.2-16.4 94.2v1.1c0 61.4 21.6 121.7 60.8 169.8 34.7 42.6 81.9 74.2 134.2 90.3-5.5-.8-11.1-1.2-16.7-1.2-36.7 0-70 17.5-91 45.4-1.7-2.2-3.6-4.3-5.7-6.1 6.6-4 11.1-11.2 11.1-19.5 0-12.5-10.2-22.7-22.7-22.7-2.3 0-4.5.4-6.6 1-.3-3.9-1.2-7.6-2.6-10.9-9.6-21.5-27.1-25.1-42.8-26.8-5.2-.6-22.7-3.2-31.9-14-11.6-13.1-11.8-32.6-.7-45.2 2.3-2.6 2-6.5-.5-8.7-2.6-2.3-6.5-2-8.7.5-15.1 17.2-15 43.7.2 61.7 2 2.4 4.3 4.4 6.7 6.2-6.3 1.7-13.1 4.8-19.3 9.9-14.7 12.1-22.2 32.3-22.4 59.8-.5 2.5.6 5.1 2.8 6.5 1 .6 2.1.9 3.2.9.4 0 .9-.1 1.3-.2h.1c.2 0 .3-.1.5-.2.3-.1.7-.2 1-.4.1 0 .1-.1.2-.1 1-.6 1.9-1.4 2.5-2.4 2.4-3.1 12.3-7 20.5-8.7 32.1-7 38.8-28.7 37.8-39.1-.3-3.4-3.3-5.9-6.7-5.6-3.4.3-5.9 3.3-5.6 6.7 0 .1.1 1.9-.5 4.6-1.5 6.2-7 16.9-27.6 21.4h-.2c-2.4.5-9.6 2.2-16.3 5.3 1.8-17.8 7.5-30.8 17.2-38.9 14.9-12.4 34.6-8.9 34.8-8.8.7.1 1.3.1 1.9 0 3.3.7 6.1 1.1 8.2 1.3 16.5 1.8 26.6 5.4 32.9 19.5 4.9 11.1-1.4 23.9-9.9 30.3-4.3 3.3-15.8 9.8-28.7-.8-2.6-2.2-6.5-1.8-8.7.8-2.2 2.6-1.8 6.5.8 8.7 5.8 4.8 12.3 7.6 19 8.4-8.6 7-14.4 15.8-17 20.4-8.4 14.5-15.2 22.3-26.5 22.4V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v50.2c0 2.5 1.5 4.6 3.6 5.6 1.1.8 2.4 1.4 3.8 1.4h144c2.2 0 4-1.1 5.2-2.8.8-.8 1.5-1.8 1.8-3 5.7-22.1 25.6-37.5 48.4-37.5 20.4 0 38.5 12.4 46.2 30.9h-13.2c-5.4-13.3-18.4-22.2-33.1-22.2-16.1 0-30.3 10.9-34.6 26.4-.9 3.3 1.1 6.7 4.3 7.6 3.3.9 6.7-1.1 7.6-4.3 2.8-10.2 12.1-17.3 22.6-17.3 7.8 0 14.8 3.8 19.1 9.8h-3.6c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h12.5c.2 0 .5.1.7.1.3 0 .6 0 .8-.1h24.8c3.4 0 6.2-2.8 6.2-6.2 0-.3 0-.6-.1-.9.1-.8.1-1.7-.1-2.6-7.3-27.1-32.1-46-60.2-46-27.2 0-51.1 17.6-59.4 43.3h-32.3c2.6-8.3 6.1-16 10.5-23.2.3-.4.5-.8.8-1.2 18.3-28.7 50.3-47.1 85.8-47.1 21 0 41.2 6.4 58.3 18.4.5.3 1 .6 1.5.7 2.6 3.1 5.2 6.4 7.7 9.8.6.8 1.1 1.6 1.7 2.4-.6 12.7 6.3 26 20.6 39.6.5 1.5 1 2.8 1.3 3.8v1.3c0 3.4 2.8 6.2 6.2 6.2 2.9 0 5.2-1.9 5.9-4.6 0-.1.9-3.1 2.7-8.1 12.9-12.6 19.3-24.9 19.2-36.8.8-1.2 1.7-2.5 2.6-3.7 2.8-3.8 5.7-7.5 8.7-11 17-11.8 36.9-18 57.7-18 44.8 0 84 29.2 97 71.5h-32.3c-8.2-25.7-32.1-43.3-59.4-43.3-28.1 0-52.8 18.9-60.2 46-.3 1-.3 2 0 3v.5c0 3.4 2.8 6.2 6.2 6.2h54.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-19.7c4.3-6 11.3-9.8 19.1-9.8 10.7 0 20 7.2 22.7 17.6.7 2.8 3.2 4.6 6 4.6.5 0 1-.1 1.5-.2 3.3-.8 5.3-4.2 4.5-7.5-4.1-15.8-18.3-26.9-34.7-26.9-14.6 0-27.6 8.9-33.1 22.2h-12.5c7.6-18.5 25.8-30.9 46.2-30.9 22.8 0 42.7 15.4 48.4 37.5.1.5.4 1 .6 1.5.8 2.5 3.1 4.3 5.9 4.3H664c3.4 0 6.2-2.8 6.2-6.2v-.4-1.6c.1-.6.1-1.2.1-1.8 0-.1 0-.2-.1-.3V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v42c-10.4-.8-16.9-8.5-24.9-22.3-2.6-4.4-8-12.7-16-19.5 5.5-1.2 10.8-3.8 15.7-7.9 2.6-2.2 3-6.1.8-8.7-2.2-2.6-6.1-3-8.7-.8-12.8 10.6-24.3 4.1-28.7.8-8.5-6.4-14.8-19.3-9.9-30.3 6.3-14.1 16.4-17.8 32.9-19.5 2.1-.2 4.9-.6 8.2-1.3.6.1 1.3.1 2 0 .2 0 19.7-3.6 34.7 8.8 9.8 8.1 15.6 21.1 17.3 39-6.8-3.2-14.1-4.9-16.4-5.4h-.2c-20.5-4.5-26.1-15.1-27.6-21.3-.6-2.6-.6-4.4-.5-4.6.3-3.4-2.2-6.4-5.6-6.7-3.4-.3-6.4 2.2-6.7 5.6-1 10.5 5.7 32.1 37.9 39.1 8.3 1.8 18.8 5.9 20.7 9 0 0 0 .1.1.1.3.4.6.8.9 1.1.1.1.2.1.3.2.3.2.6.5.9.6.1.1.3.2.4.2.3.2.6.3.9.4.1 0 .3.1.4.1.4.1.9.2 1.4.2.4 0 .7 0 1.1-.1.1 0 .2 0 .3-.1.3-.1.6-.2 1-.3h.1c.3-.1.5-.3.8-.4l.1-.1c.2-.1.4-.3.5-.4.1-.1.3-.2.4-.4l.4-.4c.1-.2.3-.3.4-.5.1-.2.2-.3.3-.5.1-.2.2-.3.3-.5.1-.2.1-.4.2-.6.1-.2.1-.4.2-.6 0-.2.1-.4.1-.5 0-.2.1-.4.1-.7v-.1c-.1-28.3-7.7-48.8-22.6-61.1zM152.9 777.7H87.8c5.5-5.6 9.4-12.3 12.4-17.5 2.6-4.5 12.2-19.5 25.8-23.4 16-4.7 31 .8 38.4 13.5-4.9 8.5-8.8 17.7-11.5 27.4zm1.7-53.7c-5.7 0-10.3-4.6-10.3-10.3 0-5.7 4.6-10.3 10.3-10.3s10.3 4.6 10.3 10.3c0 5.7-4.7 10.3-10.3 10.3zm366.6-78.1l.9 1.1-.9-1.1zm.2-6.2c-58.4-6.8-100.6 18.3-125.8 40.5-10.9 9.6-19.5 19.5-26 27.9-1.2-.8-2.3-1.6-3.3-2.1v-17.6c47.3-47.5 94.3-61.7 125.5-65.2 20.7-2.3 37.4-.4 47.4 1.5-5.7 5.3-11.6 10.3-17.8 15zm73.3-87.2c-6 11.5-12.9 22.5-20.5 33.1-7.9-2.5-17.8-4.8-29.7-5.9 26.5-33.6 43.3-73.7 48.7-116 8.6-1 20.5-4.7 29.6-10.6-2.4 34.7-11.8 68.1-28.1 99.4zm-42.1-111.6l7.2-.3c2.4 10.7 10.5 19.3 21.1 22.2-5.6 42.8-23.4 83.2-51.8 116.2-13.7 0-29.6 1.6-47.6 5.5 42-34.2 69.4-85.7 71.1-143.6zm-117.5 158c-4 1.6-6.8 2.9-8.2 3.5-16.6 6.6-34.4 10.9-53 12.3l165.9-165.9c-5 66.8-46.6 123.4-104.7 150.1zm188.3-164.7c-.2 5.6-15.5 14.7-29 16.9-1.9.3-3.8.5-5.6.5-2.4 0-4.7-.5-6.8-1.4-6.3-2.7-10.7-8.9-10.7-16.1 0-7.2 4.4-13.4 10.7-16.1 2.1-.9 4.4-1.4 6.8-1.4 1.8 0 3.7.2 5.6.5 13.5 2.2 28.7 11.3 29 16.8v.3zM565.5 276l2.6 3.5c22.7 30.3 49.3 77.2 54.4 135.6-9-5.8-20.8-9.5-29.3-10.5-6.4-50.6-28.9-96.3-62.2-131.6 1.4-2.9 2.2-6.2 2.2-9.6 0-4.6-1.4-8.9-3.7-12.4l28.4-32.4c-5.4 20.6-2.8 40.1 7.6 57.4zm-82.9-70.1l1.3.9.7.4c9.9 5 20.5 7.5 31.5 7.5 11.6 0 23.7-2.8 35.9-8.4l-32 36.5c-2.9-1.4-6.1-2.1-9.6-2.1-4.5 0-8.6 1.3-12.1 3.5-31.5-23-68.8-38.3-109.4-43.3-1-7.3-3-17.7-6-27.9 32.1 3.6 65.6 14.6 99.7 32.9zm38.2 57.5c0 4.5-3 8.4-7.1 9.8-1 .3-2.1.5-3.2.5h-1c-4.6-.4-8.3-3.9-9.1-8.3-.1-.6-.2-1.3-.2-1.9 0-.7.1-1.3.2-2 .9-4.5 4.7-8 9.4-8.3H511.1c4.6.3 8.5 3.6 9.5 8 .1.6.2 1.1.2 1.7-.1.1 0 .3 0 .5zm-131.4-49.9c37.2 4.9 71.6 19.1 100.7 40.1-1.5 3-2.3 6.3-2.3 9.9 0 4.5 1.3 8.6 3.6 12.2l-49.8 56.8c-2.3 2.6-2 6.5.6 8.7 1.2 1 2.6 1.5 4.1 1.5 1.7 0 3.4-.7 4.7-2.1l49.7-56.7c3 1.5 6.3 2.3 9.9 2.3 4.6 0 8.8-1.4 12.3-3.7 31 33.2 51.9 75.8 58.1 123-10.7 3-19 11.8-21.2 22.8l-7.1.3c-1.5-45.7-19.2-89.3-50.1-123.2-2.3-2.5-6.2-2.7-8.7-.4-2.5 2.3-2.7 6.2-.4 8.7 27.2 29.8 43.4 67.6 46.5 107.6L473.5 355c-2.4-2.4-6.3-2.4-8.7 0-2.4 2.4-2.4 6.3 0 8.7l71.4 71.4-176 176-176-176 70.8-70.8c2.4-2.4 2.4-6.3 0-8.7-2.4-2.4-6.3-2.4-8.7 0l-65.7 65.7c3.5-45.5 23.9-86.4 55-116.2l31 35.4c1.2 1.4 2.9 2.1 4.7 2.1 1.4 0 2.9-.5 4.1-1.5 2.6-2.3 2.8-6.2.6-8.7l-31.1-35.5c28-23.4 63.1-38.5 101.6-41.4l-52.8 52.3c-2.4 2.4-2.4 6.3 0 8.7 1.2 1.2 2.8 1.8 4.4 1.8 1.6 0 3.1-.6 4.4-1.8l58-57.4 56.3 56.3c2.4 2.4 6.3 2.4 8.7 0 2.4-2.4 2.4-6.3 0-8.7l-51.2-51.2c31.7 2.4 61.9 13 88.2 31.1 2.8 1.9 6.7 1.2 8.6-1.6 1.9-2.8 1.2-6.7-1.6-8.6-30.4-20.9-65.8-32.5-102.8-33.6v-4.4c11.6-2.8 20.9-12.7 22.7-24.9zm-180.7 74.3c3.5 0 6.8-.8 9.7-2.2l8.9 10.2c-35.3 33.7-57.8 80.6-59.6 132.7l-5-.3c-2.4-11.7-11.5-20.9-23.2-23.3 6.1-46.3 26.5-88.1 56.5-120.9 3.7 2.4 8 3.8 12.7 3.8zm-10.3-22.6c0-.5 0-.9.1-1.4 0-.3.1-.5.1-.8.9-4.4 4.7-7.8 9.3-8.1h.7c4.7 0 8.7 3.2 9.9 7.6.2.9.4 1.8.4 2.7 0 .7-.1 1.4-.2 2.1-.9 4.4-4.7 7.8-9.3 8.1h-.8c-1.3 0-2.6-.3-3.7-.7-3.7-1.4-6.5-5.2-6.5-9.5zm-35.8 175.4l5.1.3c1.7 58 29.2 109.6 71.3 143.8-18.1-4-34-5.6-47.8-5.7-28.2-32.9-46.1-73.1-51.7-115.7 11.5-2.4 20.6-11.3 23.1-22.7zm17.9 8.2l165.9 165.9C258 608 187.2 537.2 180.5 448.8zm162.7-249c2.7-18.7 11.9-43.7 16.7-45.7 5.5 2.1 14 28 16.6 45.6.5 3.5.8 6.7.8 9.3 0 1.1-.1 2.1-.3 3.1-1.5 8.1-8.6 14.3-17.2 14.3s-15.7-6.2-17.2-14.3c-.2-1-.3-2.1-.3-3.1.1-2.7.4-5.8.9-9.2zm10.8 38.5v4.3c-44.6 1.4-85.4 18.1-117.4 44.9l-8.8-10.1c2.3-3.5 3.7-7.8 3.7-12.3 0-3.8-1-7.4-2.6-10.5 29.3-21.5 64-36 101.7-41.1 1.7 12.4 11.2 22.4 23.4 24.8zm-152.7-23.6c11 0 21.6-2.5 31.6-7.5.6-.3 57.7-30 103.9-34-3 10.1-5 20.6-6 27.8-41.1 5.1-79 21-110.7 44.6-3.4-2-7.2-3.1-11.4-3.1-3.5 0-6.8.8-9.7 2.2l-33.6-38.3c12.3 5.5 24.3 8.3 35.9 8.3zm-49.9 61.9l.5-.7c10.4-17.2 13-36.8 7.8-57.4l30 34.3c-2.3 3.5-3.7 7.8-3.7 12.3 0 3.3.7 6.4 2 9.3-32.7 35.2-54.7 80.4-61 130.4-8.9 1.4-20.7 5.2-29.6 10.9 3.5-52.8 21.2-98.5 54-139.1zM96.9 434c.2-5.8 16.3-13.8 29-16.4 2.8-.6 5.4-.9 7.6-.9 1.7 0 3.2.2 4.8.7 7.3 2.1 12.7 8.8 12.7 16.8s-5.4 14.7-12.7 16.8c-1.5.4-3.1.7-4.8.7-2.3 0-4.9-.3-7.6-.9-12.7-2.7-28.8-10.7-29-16.5v-.3zm.6 18.4c8.9 5.8 20.8 9.6 29.6 11 5.3 42.4 22.1 82.6 48.7 116.2-11.9 1.1-21.8 3.3-29.8 5.8-28.7-39.4-45.3-84.9-48.5-133zM154.9 597c-.3-.4-.6-.7-.9-1.1 30.1-8.3 63-3.9 86.1 1.6 27.9 6.7 48.3 16.4 48.5 16.5l.1-.2c22.1 8.8 46.2 13.7 71.4 13.7 25.1 0 49.1-4.8 71.1-13.6l.6-.3c2.6-1.1 5.3-2.2 7.8-3.4 8.5-3.5 22.8-8.7 40-12.8 23.3-5.6 56.3-10 86.4-1.6-5.2 6.4-10.6 12.5-16.4 18.4-8.4-2.3-29.8-6.7-58.7-3.6-31.4 3.4-77.6 16.8-124.8 60.4v-10.9c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v10.3c-46.9-43.1-92.9-56.4-124.1-59.8-29.6-3.2-51.3 1.6-59.2 3.8-5.2-5.4-10.5-11.3-15.5-17.4zm26.3 27.8c10-2 26.9-4 48-1.6 55.5 6.2 98.1 37.9 124.8 64.5v18.1c-.9.5-1.9 1.1-3 1.9-6.5-8.3-15-18-25.7-27.4-25.2-22.3-67.6-47.5-126.2-40.5v.1c-6.2-4.8-12.2-9.8-17.9-15.1zm155.3 98c-11.7-15-24.5-26.3-37.3-34.8l.1-.3c-.3-.1-.6-.2-.9-.2-21.3-13.9-42.7-20-59.9-22.5-8.1-4.2-16.1-8.9-23.8-14 37.7-1.1 71.9 11.7 102.1 38.2 10.4 9.1 18.6 18.5 24.8 26.6-1.9 2.1-3.6 4.4-5.1 7zm29.9 37.5c-1.5 1.8-3.1 3.6-4.9 5.4-.4.4-.9.9-1.4 1.3l-.1.1-.1.1v-.2c-.2-.2-.5-.4-.7-.7-2-1.9-3.7-3.8-5.3-5.7-7.3-8.7-10.5-16.8-9.4-24.2.1-.6.2-1.2.4-1.8.8-3.2 2.3-6 4.1-8.4 1.5-2 3.2-3.7 4.9-5.2 1.5-1.3 3-2.4 4.3-3.3.6-.4 1.1-.7 1.6-1 0 0 .1 0 .1-.1h.1c.7.4 1.4.9 2.3 1.5 1.2.8 2.6 1.9 4 3.1 1.8 1.6 3.6 3.5 5.1 5.6 1.8 2.6 3.3 5.5 3.9 8.8 0 .2.1.5.2.7 1.1 7.3-2 15.3-9.1 24zm24.4-45.1c-.2.2-.4.4-.5.6-2.3 2.6-4.4 5.2-6.3 7.7-1.5-2.6-3.2-5-5-7.1 6.2-8.1 14.6-17.8 25.2-27.1 30-26.4 64.1-39.2 101.5-38.3-7.8 5.1-15.8 9.9-24 14.1-42.8 6.5-72.1 28.7-90.9 50.1zm174.5-11.8c5.7 0 10.3 4.6 10.3 10.3 0 5.7-4.6 10.3-10.3 10.3s-10.3-4.6-10.3-10.3c0-5.6 4.6-10.3 10.3-10.3zm31.2 32.1c13.6 4 23.2 18.9 25.8 23.4 3.2 5.6 7.5 13 13.8 18.8H567c-2.6-9.4-6.3-18.3-11-26.5 7.6-13.6 24.6-20.4 40.5-15.7z",className:"st2"}),Object(h.createElement)("path",{d:"M69.6 301.1c0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4c0-10.1-8.2-18.4-18.4-18.4s-18.4 8.3-18.4 18.4zm24.4 0c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6zM648.7 301.1c0-10.1-8.2-18.4-18.4-18.4-10.1 0-18.4 8.2-18.4 18.4 0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4zm-24.4 0c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6c-3.3.1-6-2.6-6-6zM666.4 346.9c-2.3-.9-5-.4-6.8 1.4-8.1 8.3-21.4 8-21.6 8h-.2c-3.3 0-6 2.6-6.2 5.9-.1 3.4 2.5 6.3 5.9 6.4.6 0 10.4.3 20.4-4.3v100.9c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V352.6c-.1-2.5-1.6-4.8-3.9-5.7zM55.7 471.4c3.4 0 6.2-2.8 6.2-6.2V364.3c10 4.6 19.8 4.3 20.4 4.3 3.4-.1 6.1-3 5.9-6.4-.1-3.4-3-6.1-6.4-5.9-.1 0-13.5.3-21.6-8-1.8-1.8-4.4-2.3-6.8-1.4-2.3.9-3.8 3.2-3.8 5.7v112.7c-.1 3.4 2.7 6.1 6.1 6.1zM671.3 574.3c0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h40c3.4 0 6.2-2.7 6.2-6.2zM629.8 598c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-15.4c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.4zM644.8 609.4c0-3.4-2.8-6.2-6.2-6.2h-38.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.7 6.2-6.2zM620.6 627.1c0-3.4-2.8-6.2-6.2-6.2h-29.9c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2zM565.1 638.6c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-17zM665.1 532.8h-22.3c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h22.3c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 550.5H634c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h31.1c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 497.5h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM665.1 515.2h-15.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.2c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"55.5",cy:"485.6",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"80.5",cy:"627.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"120.3",cy:"645",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M54.9 580.7h40c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM105.6 585.9H90.2c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h15.4c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM119.6 603.5H81.4c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.8 6.2-6.2 0-3.5-2.8-6.2-6.2-6.2zM135.5 621.1h-29.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM131.7 645c0 3.4 2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-17c-3.4 0-6.2 2.8-6.2 6.2zM54.9 545.4h22.3c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 563.1H86c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 510.1h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 527.7h15.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM360 767.1c.1-.1 0-.1 0-.2v.2zM641.2 202.7c.1 0 .1 0 0 0 2.8 0 5.3-1.9 6-4.7 2.2-8.8 1.3-16.3-2.9-22.5-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.4 9 19 9.3 20.2 9.4zm-7-20.2c1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6-1.6-2-2.4-4.6-2.4-7.9 2 1 4.2 2.6 5.7 4.8zM601 113.3c-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.2 9 18.8 9.3 20.1 9.3 2.8 0 5.3-1.9 6-4.7 2.3-8.6 1.4-16.2-2.8-22.4zm-13.5 10.1c-1.6-2-2.4-4.6-2.4-7.9 2.1 1 4.3 2.6 5.7 4.8 1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6zM97.3 163.4c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.6-3.2-3.6-5.3-6.8-4.9zm-6.7 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.8 5.9-2.3 7.9zM139.7 101.2c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.7-3.2-3.6-5.3-6.8-4.9zm-6.8 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.7 5.9-2.3 7.9zM555.1 392c.4 3.2 3 5.5 6.1 5.5h.7c3.4-.4 5.8-3.5 5.4-6.9-6.2-54-43.1-92.2-44.7-93.8-2.4-2.4-6.3-2.5-8.7-.1-2.4 2.4-2.5 6.3-.1 8.7.4.4 35.6 36.9 41.3 86.6zM159.1 397.4h.7c3.1 0 5.8-2.3 6.1-5.5 5.7-49.7 40.9-86.2 41.2-86.5 2.4-2.4 2.3-6.4-.1-8.7-2.4-2.4-6.4-2.4-8.7.1-1.6 1.6-38.4 39.8-44.7 93.8-.3 3.4 2.1 6.4 5.5 6.8z",className:"st2"})))),se=function(e){u()(a,e);var t=H(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(i()(e)),e.runPluginInstall=e.runPluginInstall.bind(i()(e)),e.loadTemplateData=e.loadTemplateData.bind(i()(e)),e.reloadTemplateData=e.reloadTemplateData.bind(i()(e)),e.focusMode=e.focusMode.bind(i()(e)),e.fullFocusMode=e.fullFocusMode.bind(i()(e)),e.jumpToImport=e.jumpToImport.bind(i()(e)),e.selectedMode=e.selectedMode.bind(i()(e)),e.selectedFullMode=e.selectedFullMode.bind(i()(e)),e.backToDash=e.backToDash.bind(i()(e)),e.saveConfig=e.saveConfig.bind(i()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",fontPair:"",search:null,isFetching:!1,isImporting:!1,isSelected:!1,response:"",isPageSelected:!1,starterSettings:kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{},selectedPage:"home",progress:"",focusMode:!1,finished:!1,overrideColors:!1,overrideFonts:!1,isOpenCheckColor:!1,isOpenCheckFont:!1,isOpenCheckPast:!1,removePast:!1,errorTemplates:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],etemplates:kadenceStarterParams.etemplates?kadenceStarterParams.etemplates:[],activeTemplates:!1,palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[],logo:kadenceStarterParams.logo?kadenceStarterParams.logo:"",hasContent:!!kadenceStarterParams.has_content&&kadenceStarterParams.has_content,hasPastContent:!!kadenceStarterParams.has_previous&&kadenceStarterParams.has_previous,isSaving:!1},e}return c()(a,[{key:"saveConfig",value:function(e,t){var a=this;this.setState({isSaving:!0});var r=kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{};r[e]||(r[e]=""),r[e]=t,this.setState({starterSettings:r}),new wp.api.models.Settings({kadence_starter_templates_config:JSON.stringify(r)}).save().then((function(e){a.setState({starterSettings:r,isSaving:!1}),kadenceStarterParams.starterSettings=JSON.stringify(r)}))}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!1})}},{key:"fullFocusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!0})}},{key:"jumpToImport",value:function(e){this.setState({isImporting:!0,activeTemplate:e,focusMode:!0,isSelected:!0,fontPair:"",colorPalette:""})}},{key:"selectedFullMode",value:function(){this.setState({isSelected:!0})}},{key:"selectedMode",value:function(e){this.setState({selectedPage:e,isPageSelected:!0,isImporting:!0})}},{key:"backToDash",value:function(){this.setState({isFetching:!1,activeTemplate:"",overrideColors:!1,overrideFonts:!1,colorPalette:"",fontPair:"",focusMode:!1,finished:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",selectedPage:"home"})}},{key:"reloadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=new FormData;e.append("action","kadence_import_reload_template_data"),e.append("security",kadenceStarterParams.ajax_nonce),e.append("api_key",kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:""),e.append("api_email",kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:""),e.append("template_type",this.state.starterSettings.builderType);var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(e,a,r){if(e){var n=L(e);n?t.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):t.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),t.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"loadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=new FormData;e.append("action","kadence_import_get_template_data"),e.append("security",kadenceStarterParams.ajax_nonce),e.append("api_key",kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:""),e.append("api_email",kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:""),e.append("template_type",this.state.starterSettings.builderType);var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(e,a,r){if(e){var n=L(e);n?t.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):t.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),t.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"runPluginInstallSingle",value:function(e,t,a){this.setState({progress:"plugins",isFetching:!0});var r=new FormData;r.append("action","kadence_import_install_plugins"),r.append("security",kadenceStarterParams.ajax_nonce),r.append("selected",e),r.append("builder",a),r.append("page_id",t),this.runPageAjax(r)}},{key:"runRemovePast",value:function(e,t){this.setState({progress:"remove",isFetching:!0});var a=new FormData;a.append("action","kadence_remove_past_import_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runPluginInstall",value:function(e,t){this.setState({progress:"plugins",isFetching:!0});var a=new FormData;a.append("action","kadence_import_install_plugins"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runPageAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runPageAjax(e);else if(void 0!==a.status&&"pluginSuccess"===a.status){t.setState({progress:"content"});var s=new FormData;s.append("action","kadence_import_single_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),s.append("page_id",t.state.selectedPage),s.append("override_colors",t.state.overrideColors),s.append("override_fonts",t.state.overrideFonts),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair),t.runPageAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:"<p>"+a.message+"</p>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"})})).fail((function(e){t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==a.status&&"customizerAJAX"===a.status){t.setState({progress:"customizer"}),(s=new FormData).append("action","kadence_import_customizer_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("wp_customize","on"),t.runAjax(s)}else if(void 0!==a.status&&"afterAllImportAJAX"===a.status){t.setState({progress:"widgets"}),(s=new FormData).append("action","kadence_after_import_data"),s.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(s)}else if(void 0!==a.status&&"pluginSuccess"===a.status){t.setState({progress:"content"}),(s=new FormData).append("action","kadence_import_demo_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("builder",t.state.starterSettings.builderType),s.append("selected",t.state.activeTemplate),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair),t.runAjax(s)}else if(void 0!==a.status&&"removeSuccess"===a.status){var s;t.setState({progress:"plugins"}),(s=new FormData).append("action","kadence_import_install_plugins"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),t.runAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:"<p>"+a.message+"</p>"}):void 0===a.success||a.success?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+B("Failed Import. Something went wrong internally. Please try again.","kadence-starter-templates")+"</p></div>"})})).fail((function(e){console.log(e),t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"render",value:function(){for(var e=this,t=["all"],a=0;a<this.state.templates.length;a++)for(var r=0;r<this.state.templates[a].categories.length;r++)t.includes(this.state.templates[a].categories[r])||t.push(this.state.templates[a].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var n=B("Gutenberg","kadence-starter-templates"),s=ne;"elementor"===this.state.starterSettings.builderType&&(n=B("Elementor","kadence-starter-templates"),s=re),"custom"===this.state.starterSettings.builderType&&(n=kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates"),s=kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"components-menu-items__item-icon custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae);var c=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1;return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",B("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Page Template Plugins","kadence-starter-templates"))),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){if(kadenceStarterParams.plugins[e])return"active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(a=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?B("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium plugin")):"")}))),Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.","kadence-starter-templates")),Object(h.createElement)(Z,{label:B("Override Your Sites Global Colors?","kadence-starter-templates"),checked:void 0!==e.state.overrideColors&&e.state.overrideColors,onChange:function(t){return e.state.overrideColors?e.setState({overrideColors:!1}):e.setState({isOpenCheckColor:!0})}}),e.state.isOpenCheckColor?Object(h.createElement)(U,{className:"ksp-confirm-modal",title:B("Override Your Sites Colors on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckColor:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("This will override the customizer settings for global colors on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(X,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!1})}},B("Cancel","kadence-starter-templates")),Object(h.createElement)(X,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!0})}},B("Override Colors","kadence-starter-templates")))):null,e.state.overrideColors&&e.state.colorPalette&&Object(h.createElement)(q,null,Object(h.createElement)("h3",null,B("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)(Z,{label:B("Override Your Sites Fonts?","kadence-starter-templates"),checked:void 0!==e.state.overrideFonts&&e.state.overrideFonts,onChange:function(t){return e.state.overrideFonts?e.setState({overrideFonts:!1}):e.setState({isOpenCheckFont:!0})}}),e.state.isOpenCheckFont?Object(h.createElement)(U,{className:"ksp-confirm-modal",title:B("Override Your Sites Fonts on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckFont:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("This will override the customizer typography settings on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(X,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!1})}},B("Cancel","kadence-starter-templates")),Object(h.createElement)(X,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!0})}},B("Override Fonts","kadence-starter-templates")))):null,e.state.fontPair&&e.state.overrideFonts&&Object(h.createElement)(q,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},B("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))}))),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),e.state.isFetching&&Object(h.createElement)(K,null),!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("This Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://kadence-theme.com/"},B("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(q,null,a&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium Membership plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Membership Account","kadence-starter-templates"))),!a&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstallSingle(t.slug,e.state.selectedPage,e.state.starterSettings.builderType)}},B("Start Importing Page"))))))},o=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1,r=!1;return Object(h.createElement)(q,null,Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image,alt:t.name}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name)))))),Object(h.createElement)(U,{className:"kst-import-modal",title:B("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},e.state.hasContent&&Object(h.createElement)("div",{className:"kadence_starter_templates_notice"},e.state.hasPastContent?Object(h.createElement)(q,null,kadenceStarterParams.notice_previous):Object(h.createElement)(q,null,kadenceStarterParams.notice)),Object(h.createElement)("h3",null,B("Starter Template Plugins","kadence-starter-templates")),j()(t.plugins,(function(e){kadenceStarterParams.plugins[e]&&"active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src&&(a=!0)})),a&&Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},B("*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){if(kadenceStarterParams.plugins[e])return"active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(r=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?B("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium Plugin")):"")}))),e.state.colorPalette&&Object(h.createElement)(q,null,Object(h.createElement)("h3",null,B("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),e.state.fontPair&&Object(h.createElement)(q,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},B("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))}))),e.state.hasPastContent&&Object(h.createElement)(q,null,Object(h.createElement)(Z,{label:B("Delete Previously Imported Posts and Images?","kadence-starter-templates"),checked:void 0!==e.state.removePast&&e.state.removePast,onChange:function(t){return e.state.removePast?e.setState({removePast:!1}):e.setState({removePast:!0})}})),"remove"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.remove_progress),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(h.createElement)(K,null),!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://kadence-theme.com/"},B("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(q,null,a&&Object(h.createElement)(q,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium Membership plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Membership Account","kadence-starter-templates"))),!r&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},B("Skip and Import with Partial Content"))),!a&&Object(h.createElement)(q,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium Membership plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Membership Account","kadence-starter-templates"))),!r&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},B("Start Importing"))))))},i=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)(q,null,Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Page Templates","kadence-starter-templates"))),Object(h.createElement)("div",{className:"templates-grid"},j()(t.pages,(function(t){var a=t.title,r=t.id,n=t.thumbnail;return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(X,{key:r,className:"kst-import-btn",isSmall:!0,onClick:function(){return e.selectedMode(r)}},Object(h.createElement)(k.a,{offsetBottom:200},Object(h.createElement)("img",{src:n,alt:a})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,a," ",Object(h.createElement)("span",null,B("View Details","kadence-starter-templates"))))))}))),Object(h.createElement)("div",{className:"kst-import-selection-bottom"},Object(h.createElement)(X,{className:"kt-import-fullsite",isPrimary:!0,onClick:function(){return e.selectedFullMode()}},B("Import Full Site","kadence-starter-templates")))))},l=function(){var t=e;return Object(h.createElement)("div",{className:"templates-grid"},Object.keys(e.state.activeTemplates).map((function(e,a){var r=t.state.activeTemplates[e].name,n=t.state.activeTemplates[e].slug,s=t.state.activeTemplates[e].image,c=t.state.activeTemplates[e].categories,o=t.state.activeTemplates[e].keywords,i=t.state.activeTemplates[e].pro,l=(t.state.activeTemplates[e].member,t.state.activeTemplates[e].pages);if(("all"===t.state.category||c.includes(t.state.category))&&(!t.state.search||o&&o.some((function(e){return e.toLowerCase().includes(t.state.search.toLowerCase())}))))return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(X,{key:e,className:"kst-import-btn",isSmall:!0,onClick:function(){return"custom"===t.state.starterSettings.builderType?t.jumpToImport(n):t.fullFocusMode(n)}},Object(h.createElement)(k.a,{offsetBottom:200},Object(h.createElement)("img",{src:l&&l.home&&l.home.thumbnail?l.home.thumbnail:s,alt:r})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,r))),void 0!==i&&i&&Object(h.createElement)(q,null,Object(h.createElement)("span",{className:"kb-pro-template"},B("Membership","kadence-starter-sites"))))})))},u=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",B("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))},p=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))};return Object(h.createElement)(q,null,Object(h.createElement)("div",{class:"kadence_theme_dash_head"},Object(h.createElement)("div",{class:"kadence_theme_dash_head_container"},Object(h.createElement)("div",{class:"kadence_theme_dash_logo"},Object(h.createElement)("img",{src:this.state.logo})),this.state.focusMode&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},this.state.isPageSelected?Object(h.createElement)(te,{text:B("Back to Individual Pages Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return!e.state.isFetching&&e.setState({colorPalette:"",finished:!1,selectedPage:"home",focusMode:!0,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""})}})):Object(h.createElement)(te,{text:B("Back to Starter Templates Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return e.backToDash()}}))),this.state.finished&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},Object(h.createElement)(te,{text:B("Back to Starter Templates Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return e.backToDash()}}))),Object(h.createElement)("div",{class:"kadence_starter_builder_type"},this.state.starterSettings&&this.state.starterSettings.builderType&&Object(h.createElement)(J,{className:"my-container-class-name",contentClassName:"kst-type-popover",position:"bottom left",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.createElement)(X,{onClick:a,"aria-expanded":t,icon:s},n,Object(h.createElement)(Y,{className:"kst-chev",icon:A}))},renderContent:function(t){t.isOpen;var a=t.onToggle;return Object(h.createElement)("div",null,Object(h.createElement)(ee,{icon:ne,className:"blocks"===e.state.starterSettings.builderType?"active-item":"",isSelected:"blocks"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","blocks"),e.setState({activeTemplate:"",colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},B("Gutenberg","kadence-starter-templates")),Object(h.createElement)(ee,{icon:re,className:"elementor"===e.state.starterSettings.builderType?"active-item":"",isSelected:"elementor"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","elementor"),e.setState({activeTemplate:"",colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},B("Elementor","kadence-starter-templates")),kadenceStarterParams.ctemplates&&Object(h.createElement)(ee,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae,className:"custom"===e.state.starterSettings.builderType?"active-item":"",isSelected:"custom"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","custom"),e.setState({activeTemplate:"",colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates")))}})),!1!==this.state.activeTemplates&&this.state.starterSettings.builderType&&Object(h.createElement)("div",{class:"kadence_theme_dash_reload"},Object(h.createElement)(te,{text:B("Sync with Cloud")},Object(h.createElement)(X,{className:"kt-reload-templates",icon:I,onClick:function(){return e.reloadTemplateData()}}))))),Object(h.createElement)("div",{class:"kadence_theme_starter_dash_inner"},this.state.starterSettings&&this.state.starterSettings.builderType?Object(h.createElement)((function(){return Object(h.createElement)(q,null,e.state.isSaving||!1===e.state.activeTemplates||e.state.errorTemplates?Object(h.createElement)("div",{className:"main-panel"},Object(h.createElement)("div",{className:"kst-overlay-saving"},!e.state.errorTemplates&&Object(h.createElement)(K,null),e.state.errorTemplates&&Object(h.createElement)(q,null,Object(h.createElement)("h2",{style:{textAlign:"center"}},B("Error, Unable to access template database, please try re-downloading","kadence-starter-templates")),Object(h.createElement)("div",{style:{textAlign:"center"}},Object(h.createElement)(X,{className:"kt-reload-templates",icon:I,onClick:function(){return e.reloadTemplateData()}},B(" Sync with Cloud","kadence-starter-templates")))),!1===e.state.activeTemplates&&Object(h.createElement)(q,null,e.loadTemplateData()))):Object(h.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(h.createElement)(q,null,e.state.isImporting&&Object(h.createElement)(q,null,e.state.isPageSelected?Object(h.createElement)(c,null):Object(h.createElement)(o,null)),!e.state.isImporting&&e.state.isSelected&&Object(h.createElement)(C,{item:e.state.activeTemplates[e.state.activeTemplate],colorPalette:e.state.colorPalette,fontPair:e.state.fontPair,onChange:function(t){e.setState(t)}}),!e.state.isImporting&&!e.state.isSelected&&Object(h.createElement)(i,null)),!e.state.focusMode&&!e.state.finished&&Object(h.createElement)(l,null),e.state.finished&&Object(h.createElement)(q,null,e.state.isPageSelected?Object(h.createElement)(u,null):Object(h.createElement)(p,null))))}),null):Object(h.createElement)((function(){return Object(h.createElement)("div",{className:"kst-choose-builder-wrap".concat(kadenceStarterParams.ctemplates?" adjust-to-three-column":"")},Object(h.createElement)("div",{className:"kst-choose-builder-center"},Object(h.createElement)("h2",{className:"kst-choose-builder-title"},B("Choose a Builder","kadence-starter-templates")),Object(h.createElement)("div",{className:"kst-choose-builder-inner"},kadenceStarterParams.ctemplates&&Object(h.createElement)(X,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","custom")}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates")),Object(h.createElement)(X,{icon:ne,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","blocks")}},B("Gutenberg","kadence-starter-templates")),Object(h.createElement)(X,{icon:re,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","elementor")}},B("Elementor","kadence-starter-templates"))),e.state.isSaving&&Object(h.createElement)("div",{className:"kst-overlay-saving"},Object(h.createElement)(K,null))))}),null)))}}]),a}(W);wp.domReady((function(){G(Object(h.createElement)(se,null),document.querySelector(".kadence_starter_dashboard_main"))}))}]);
|
class-kadence-starter-templates.php
CHANGED
@@ -84,6 +84,13 @@ class Starter_Templates {
|
|
84 |
*/
|
85 |
private $selected_page;
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
/**
|
88 |
* Import Single Override colors
|
89 |
*
|
@@ -157,13 +164,31 @@ class Starter_Templates {
|
|
157 |
// Text Domain.
|
158 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
159 |
// Filters durning Import.
|
160 |
-
add_filter( 'kadence-starter-templates/import_files', array( $this, 'kadence_import_kadence_theme_files' ) );
|
161 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_kadence_theme_after_import' ), 10, 3 );
|
162 |
|
163 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_elementor_after_import' ), 20, 3 );
|
164 |
|
165 |
add_filter( 'plugin_action_links_kadence-starter-templates/kadence-starter-templates.php', array( $this, 'add_settings_link' ) );
|
166 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
/**
|
168 |
* Add a little css for submenu items.
|
169 |
*/
|
@@ -190,327 +215,31 @@ class Starter_Templates {
|
|
190 |
* @param array $selected_import the selected import.
|
191 |
*/
|
192 |
public function kadence_kadence_theme_after_import( $selected_import, $selected_palette, $selected_font ) {
|
193 |
-
if ( '
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
'
|
200 |
-
|
201 |
-
'
|
202 |
-
|
203 |
-
)
|
204 |
-
);
|
205 |
-
|
206 |
-
// Assign front page.
|
207 |
-
$homepage = get_page_by_title( 'Home' );
|
208 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
209 |
-
update_option( 'show_on_front', 'page' );
|
210 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
211 |
-
}
|
212 |
-
|
213 |
-
} elseif ( 'agency_free' === $selected_import['import_file_name'] ) {
|
214 |
-
|
215 |
-
// Assign menus to their locations.
|
216 |
-
$main_menu = get_term_by( 'name', 'Agency Menu', 'nav_menu' );
|
217 |
-
set_theme_mod(
|
218 |
-
'nav_menu_locations',
|
219 |
-
array(
|
220 |
-
'primary' => $main_menu->term_id,
|
221 |
-
'mobile' => $main_menu->term_id,
|
222 |
-
)
|
223 |
-
);
|
224 |
-
|
225 |
-
// Assign front page.
|
226 |
-
$homepage = get_page_by_title( 'Home' );
|
227 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
228 |
-
update_option( 'show_on_front', 'page' );
|
229 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
230 |
-
$blogpage = get_page_by_title( 'Blog' );
|
231 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
232 |
-
}
|
233 |
-
|
234 |
-
} elseif ( 'food' === $selected_import['import_file_name'] ) {
|
235 |
-
|
236 |
-
// Assign menus to their locations.
|
237 |
-
$main_menu = get_term_by( 'name', 'Food Primary', 'nav_menu' );
|
238 |
-
|
239 |
-
set_theme_mod(
|
240 |
-
'nav_menu_locations',
|
241 |
-
array(
|
242 |
-
'primary' => $main_menu->term_id,
|
243 |
-
'mobile' => $main_menu->term_id,
|
244 |
-
'footer' => $main_menu->term_id,
|
245 |
-
)
|
246 |
-
);
|
247 |
-
|
248 |
-
// Assign front page.
|
249 |
-
$homepage = get_page_by_title( 'Home' );
|
250 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
251 |
-
update_option( 'show_on_front', 'page' );
|
252 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
253 |
-
$blogpage = get_page_by_title( 'Recipes' );
|
254 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
255 |
-
}
|
256 |
-
|
257 |
-
} elseif ( 'shopping' === $selected_import['import_file_name'] ) {
|
258 |
-
// Assign Woo Pages.
|
259 |
-
if ( class_exists( 'woocommerce' ) ) {
|
260 |
-
$this->import_demo_woocommerce();
|
261 |
-
}
|
262 |
-
|
263 |
-
// Assign menus to their locations.
|
264 |
-
$main_menu = get_term_by( 'name', 'Shop Menu', 'nav_menu' );
|
265 |
-
|
266 |
-
set_theme_mod(
|
267 |
-
'nav_menu_locations',
|
268 |
-
array(
|
269 |
-
'primary' => $main_menu->term_id,
|
270 |
-
'mobile' => $main_menu->term_id,
|
271 |
-
)
|
272 |
-
);
|
273 |
-
|
274 |
-
// Assign front page.
|
275 |
-
$homepage = get_page_by_title( 'Home' );
|
276 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
277 |
-
update_option( 'show_on_front', 'page' );
|
278 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
279 |
-
$blogpage = get_page_by_title( 'Shop News' );
|
280 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
281 |
-
}
|
282 |
-
|
283 |
-
} elseif ( 'saas' === $selected_import['import_file_name'] ) {
|
284 |
-
// Assign menus to their locations.
|
285 |
-
$main_menu = get_term_by( 'name', 'Saas Menu', 'nav_menu' );
|
286 |
-
$footer_menu = get_term_by( 'name', 'Saas Footer', 'nav_menu' );
|
287 |
-
|
288 |
-
set_theme_mod(
|
289 |
-
'nav_menu_locations',
|
290 |
-
array(
|
291 |
-
'primary' => $main_menu->term_id,
|
292 |
-
'mobile' => $main_menu->term_id,
|
293 |
-
'footer' => $footer_menu->term_id,
|
294 |
-
)
|
295 |
-
);
|
296 |
-
|
297 |
-
// Assign front page.
|
298 |
-
$homepage = get_page_by_title( 'Home' );
|
299 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
300 |
-
update_option( 'show_on_front', 'page' );
|
301 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
302 |
-
}
|
303 |
-
|
304 |
-
} elseif ( 'yoga' === $selected_import['import_file_name'] ) {
|
305 |
-
// Assign menus to their locations.
|
306 |
-
$main_menu = get_term_by( 'name', 'Yoga Menu', 'nav_menu' );
|
307 |
-
|
308 |
-
set_theme_mod(
|
309 |
-
'nav_menu_locations',
|
310 |
-
array(
|
311 |
-
'primary' => $main_menu->term_id,
|
312 |
-
'mobile' => $main_menu->term_id,
|
313 |
-
)
|
314 |
-
);
|
315 |
-
|
316 |
-
// Assign front page.
|
317 |
-
$homepage = get_page_by_title( 'Home' );
|
318 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
319 |
-
update_option( 'show_on_front', 'page' );
|
320 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
321 |
-
}
|
322 |
-
|
323 |
-
} elseif ( 'ldcourse' === $selected_import['import_file_name'] ) {
|
324 |
-
// Assign menus to their locations.
|
325 |
-
$main_menu = get_term_by( 'name', 'Primary Menu', 'nav_menu' );
|
326 |
-
|
327 |
-
set_theme_mod(
|
328 |
-
'nav_menu_locations',
|
329 |
-
array(
|
330 |
-
'primary' => $main_menu->term_id,
|
331 |
-
'mobile' => $main_menu->term_id,
|
332 |
-
)
|
333 |
-
);
|
334 |
-
|
335 |
-
// Assign front page.
|
336 |
-
$homepage = get_page_by_title( 'Home' );
|
337 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
338 |
-
update_option( 'show_on_front', 'page' );
|
339 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
340 |
-
}
|
341 |
-
|
342 |
-
} elseif ( 'e01' === $selected_import['import_file_name'] ) {
|
343 |
-
// Assign menus to their locations.
|
344 |
-
$main_menu = get_term_by( 'name', 'Main Real Estate', 'nav_menu' );
|
345 |
-
|
346 |
-
set_theme_mod(
|
347 |
-
'nav_menu_locations',
|
348 |
-
array(
|
349 |
-
'primary' => $main_menu->term_id,
|
350 |
-
'footer' => $main_menu->term_id,
|
351 |
-
)
|
352 |
-
);
|
353 |
-
|
354 |
-
// Assign front page.
|
355 |
-
$homepage = get_page_by_title( 'Home' );
|
356 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
357 |
-
update_option( 'show_on_front', 'page' );
|
358 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
359 |
-
$blogpage = get_page_by_title( 'Blog' );
|
360 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
361 |
-
}
|
362 |
-
|
363 |
-
} elseif ( 'e02' === $selected_import['import_file_name'] ) {
|
364 |
-
|
365 |
-
// Assign Woo Pages.
|
366 |
-
if ( class_exists( 'woocommerce' ) ) {
|
367 |
-
$this->import_demo_woocommerce();
|
368 |
-
}
|
369 |
-
// Assign menus to their locations.
|
370 |
-
$main_menu = get_term_by( 'name', 'Store Menu', 'nav_menu' );
|
371 |
-
|
372 |
-
set_theme_mod(
|
373 |
-
'nav_menu_locations',
|
374 |
-
array(
|
375 |
-
'primary' => $main_menu->term_id,
|
376 |
-
)
|
377 |
-
);
|
378 |
-
|
379 |
-
// Assign front page.
|
380 |
-
$homepage = get_page_by_title( 'Home' );
|
381 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
382 |
-
update_option( 'show_on_front', 'page' );
|
383 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
384 |
-
}
|
385 |
-
|
386 |
-
} elseif ( 'e03' === $selected_import['import_file_name'] ) {
|
387 |
-
// Assign menus to their locations.
|
388 |
-
$main_menu = get_term_by( 'name', 'Course Main', 'nav_menu' );
|
389 |
-
|
390 |
-
set_theme_mod(
|
391 |
-
'nav_menu_locations',
|
392 |
-
array(
|
393 |
-
'primary' => $main_menu->term_id,
|
394 |
-
'mobile' => $main_menu->term_id,
|
395 |
-
)
|
396 |
-
);
|
397 |
-
|
398 |
-
// Assign front page.
|
399 |
-
$homepage = get_page_by_title( 'Home' );
|
400 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
401 |
-
update_option( 'show_on_front', 'page' );
|
402 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
403 |
-
$blogpage = get_page_by_title( 'Blog' );
|
404 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
405 |
-
}
|
406 |
-
|
407 |
-
} elseif ( 'e06' === $selected_import['import_file_name'] ) {
|
408 |
-
// Assign menus to their locations.
|
409 |
-
$main_menu = get_term_by( 'name', 'Control Menu', 'nav_menu' );
|
410 |
-
|
411 |
-
set_theme_mod(
|
412 |
-
'nav_menu_locations',
|
413 |
-
array(
|
414 |
-
'primary' => $main_menu->term_id,
|
415 |
-
)
|
416 |
-
);
|
417 |
-
|
418 |
-
// Assign front page.
|
419 |
-
$homepage = get_page_by_title( 'Home' );
|
420 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
421 |
-
update_option( 'show_on_front', 'page' );
|
422 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
423 |
-
$blogpage = get_page_by_title( 'Blog' );
|
424 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
425 |
-
}
|
426 |
-
|
427 |
-
} elseif ( 'e05' === $selected_import['import_file_name'] ) {
|
428 |
-
// Assign menus to their locations.
|
429 |
-
$main_menu = get_term_by( 'name', 'WebAgency Menu', 'nav_menu' );
|
430 |
-
|
431 |
-
set_theme_mod(
|
432 |
-
'nav_menu_locations',
|
433 |
-
array(
|
434 |
-
'primary' => $main_menu->term_id,
|
435 |
-
'mobile' => $main_menu->term_id,
|
436 |
-
)
|
437 |
-
);
|
438 |
-
|
439 |
-
// Assign front page.
|
440 |
-
$homepage = get_page_by_title( 'Home' );
|
441 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
442 |
-
update_option( 'show_on_front', 'page' );
|
443 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
444 |
-
$blogpage = get_page_by_title( 'Blog' );
|
445 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
446 |
-
}
|
447 |
-
|
448 |
-
} elseif ( 'g01' === $selected_import['import_file_name'] ) {
|
449 |
-
// Assign menus to their locations.
|
450 |
-
$main_menu = get_term_by( 'name', 'Main Real Estate', 'nav_menu' );
|
451 |
-
|
452 |
-
set_theme_mod(
|
453 |
-
'nav_menu_locations',
|
454 |
-
array(
|
455 |
-
'primary' => $main_menu->term_id,
|
456 |
-
'footer' => $main_menu->term_id,
|
457 |
-
)
|
458 |
-
);
|
459 |
-
|
460 |
-
// Assign front page.
|
461 |
-
$homepage = get_page_by_title( 'Home' );
|
462 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
463 |
-
update_option( 'show_on_front', 'page' );
|
464 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
465 |
-
$blogpage = get_page_by_title( 'Blog' );
|
466 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
467 |
-
}
|
468 |
-
|
469 |
-
} elseif ( 'g02' === $selected_import['import_file_name'] ) {
|
470 |
-
|
471 |
-
// Assign Woo Pages.
|
472 |
-
if ( class_exists( 'woocommerce' ) ) {
|
473 |
-
$this->import_demo_woocommerce();
|
474 |
}
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
'nav_menu_locations',
|
480 |
-
array(
|
481 |
-
'primary' => $main_menu->term_id,
|
482 |
-
)
|
483 |
-
);
|
484 |
-
|
485 |
-
// Assign front page.
|
486 |
-
$homepage = get_page_by_title( 'Home' );
|
487 |
if ( isset( $homepage ) && $homepage->ID ) {
|
488 |
update_option( 'show_on_front', 'page' );
|
489 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
490 |
}
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
set_theme_mod(
|
498 |
-
'nav_menu_locations',
|
499 |
-
array(
|
500 |
-
'primary' => $main_menu->term_id,
|
501 |
-
'mobile' => $main_menu->term_id,
|
502 |
-
)
|
503 |
-
);
|
504 |
-
|
505 |
-
// Assign front page.
|
506 |
-
$homepage = get_page_by_title( 'Home' );
|
507 |
-
if ( isset( $homepage ) && $homepage->ID ) {
|
508 |
-
update_option( 'show_on_front', 'page' );
|
509 |
-
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
510 |
-
$blogpage = get_page_by_title( 'Blog' );
|
511 |
-
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
512 |
}
|
513 |
-
|
514 |
}
|
515 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
516 |
$palette_presets = json_decode( '{"base":[{"color":"#2B6CB0"},{"color":"#265E9A"},{"color":"#222222"},{"color":"#3B3B3B"},{"color":"#515151"},{"color":"#626262"},{"color":"#E1E1E1"},{"color":"#F7F7F7"},{"color":"#ffffff"}],"bright":[{"color":"#255FDD"},{"color":"#00F2FF"},{"color":"#1A202C"},{"color":"#2D3748"},{"color":"#4A5568"},{"color":"#718096"},{"color":"#EDF2F7"},{"color":"#F7FAFC"},{"color":"#ffffff"}],"darkmode":[{"color":"#3296ff"},{"color":"#003174"},{"color":"#ffffff"},{"color":"#f7fafc"},{"color":"#edf2f7"},{"color":"#cbd2d9"},{"color":"#2d3748"},{"color":"#252c39"},{"color":"#1a202c"}],"orange":[{"color":"#e47b02"},{"color":"#ed8f0c"},{"color":"#1f2933"},{"color":"#3e4c59"},{"color":"#52606d"},{"color":"#7b8794"},{"color":"#f3f4f7"},{"color":"#f9f9fb"},{"color":"#ffffff"}],"pinkish":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#040037"},{"color":"#032075"},{"color":"#514d7c"},{"color":"#666699"},{"color":"#deddeb"},{"color":"#efeff5"},{"color":"#f8f9fa"}],"pinkishdark":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#f8f9fa"},{"color":"#efeff5"},{"color":"#deddeb"},{"color":"#c3c2d6"},{"color":"#514d7c"},{"color":"#221e5b"},{"color":"#040037"}],"green":[{"color":"#049f82"},{"color":"#008f72"},{"color":"#222222"},{"color":"#353535"},{"color":"#454545"},{"color":"#676767"},{"color":"#eeeeee"},{"color":"#f7f7f7"},{"color":"#ffffff"}],"fire":[{"color":"#dd6b20"},{"color":"#cf3033"},{"color":"#27241d"},{"color":"#423d33"},{"color":"#504a40"},{"color":"#625d52"},{"color":"#e8e6e1"},{"color":"#faf9f7"},{"color":"#ffffff"}],"mint":[{"color":"#2cb1bc"},{"color":"#13919b"},{"color":"#0f2a43"},{"color":"#133453"},{"color":"#587089"},{"color":"#829ab1"},{"color":"#e0fcff"},{"color":"#f5f7fa"},{"color":"#ffffff"}],"rich":[{"color":"#295CFF"},{"color":"#0E94FF"},{"color":"#1C0D5A"},{"color":"#3D3D3D"},{"color":"#57575D"},{"color":"#636363"},{"color":"#E1EBEE"},{"color":"#EFF7FB"},{"color":"#ffffff"}],"fem":[{"color":"#D86C97"},{"color":"#282828"},{"color":"#282828"},{"color":"#333333"},{"color":"#4d4d4d"},{"color":"#646464"},{"color":"#f7dede"},{"color":"#F6F2EF"},{"color":"#ffffff"}],"hot":[{"color":"#FF5698"},{"color":"#000000"},{"color":"#020202"},{"color":"#020202"},{"color":"#4E4E4E"},{"color":"#808080"},{"color":"#FDEDEC"},{"color":"#FDF6EE"},{"color":"#ffffff"}],"bold":[{"color":"#000000"},{"color":"#D1A155"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F6E7BC"},{"color":"#F9F7F7"},{"color":"#ffffff"}],"teal":[{"color":"#7ACFC4"},{"color":"#044355"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F5ECE5"},{"color":"#F9F7F7"},{"color":"#ffffff"}]}', true );
|
@@ -789,587 +518,6 @@ class Starter_Templates {
|
|
789 |
// Flush rules after install.
|
790 |
flush_rewrite_rules();
|
791 |
}
|
792 |
-
/**
|
793 |
-
* Kadence Import function.
|
794 |
-
*/
|
795 |
-
public function kadence_import_kadence_theme_files() {
|
796 |
-
$woocommerce = array(
|
797 |
-
'base' => 'woocommerce',
|
798 |
-
'slug' => 'woocommerce',
|
799 |
-
'path' => 'woocommerce/woocommerce.php',
|
800 |
-
'title' => 'Woocommerce',
|
801 |
-
'src' => 'repo',
|
802 |
-
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
803 |
-
);
|
804 |
-
$elementor = array(
|
805 |
-
'base' => 'elementor',
|
806 |
-
'slug' => 'elementor',
|
807 |
-
'path' => 'elementor/elementor.php',
|
808 |
-
'title' => 'Elementor',
|
809 |
-
'src' => 'repo',
|
810 |
-
'state' => Plugin_Check::active_check( 'elementor/elementor.php' ),
|
811 |
-
);
|
812 |
-
$fluentform = array(
|
813 |
-
'base' => 'fluentform',
|
814 |
-
'slug' => 'fluentform',
|
815 |
-
'path' => 'fluentform/fluentform.php',
|
816 |
-
'title' => 'Fluent Forms',
|
817 |
-
'src' => 'repo',
|
818 |
-
'state' => Plugin_Check::active_check( 'fluentform/fluentform.php' ),
|
819 |
-
);
|
820 |
-
$kadence_blocks = array(
|
821 |
-
'base' => 'kadence-blocks',
|
822 |
-
'slug' => 'kadence-blocks',
|
823 |
-
'path' => 'kadence-blocks/kadence-blocks.php',
|
824 |
-
'title' => 'Kadence Blocks',
|
825 |
-
'src' => 'repo',
|
826 |
-
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
827 |
-
);
|
828 |
-
$kadence_blocks_pro = array(
|
829 |
-
'base' => 'kadence-blocks-pro',
|
830 |
-
'slug' => 'kadence-blocks-pro',
|
831 |
-
'path' => 'kadence-blocks-pro/kadence-blocks-pro.php',
|
832 |
-
'title' => 'Kadence Block Pro',
|
833 |
-
'src' => 'bundle',
|
834 |
-
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
835 |
-
);
|
836 |
-
$wpzoom_recipe_card = array(
|
837 |
-
'base' => 'recipe-card-blocks-by-wpzoom',
|
838 |
-
'slug' => 'wpzoom-recipe-card',
|
839 |
-
'path' => 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php',
|
840 |
-
'title' => 'Recipe Card Blocks by WPZOOM',
|
841 |
-
'src' => 'repo',
|
842 |
-
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
843 |
-
);
|
844 |
-
$learn_dash = array(
|
845 |
-
'base' => 'sfwd-lms',
|
846 |
-
'slug' => 'sfwd_lms',
|
847 |
-
'path' => 'sfwd-lms/sfwd_lms.php',
|
848 |
-
'title' => 'LearnDash',
|
849 |
-
'src' => 'thirdparty',
|
850 |
-
'state' => Plugin_Check::active_check( 'sfwd-lms/sfwd_lms.php' ),
|
851 |
-
);
|
852 |
-
$demos = array(
|
853 |
-
'agency' => array(
|
854 |
-
'import_file_name' => 'agency',
|
855 |
-
'categories' => array( 'Kadence Blocks Pro' ),
|
856 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og01pro/demo_content.xml',
|
857 |
-
'import_widget_file_url' => '',
|
858 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og01pro/theme_options.json',
|
859 |
-
'preview_url' => 'https://demos.kadencewp.com/blocks-agency/',
|
860 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og01pro/imagespreview-image.jpg',
|
861 |
-
'import_notice' => '',
|
862 |
-
'pages' => array(
|
863 |
-
'home' => array(
|
864 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01pro/home_content.xml',
|
865 |
-
'meta' => 'clear',
|
866 |
-
),
|
867 |
-
'services' => array(
|
868 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01pro/services_content.xml',
|
869 |
-
'meta' => 'clear',
|
870 |
-
),
|
871 |
-
'about' => array(
|
872 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01pro/about_content.xml',
|
873 |
-
'meta' => 'clear',
|
874 |
-
),
|
875 |
-
'contact' => array(
|
876 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01pro/contact_content.xml',
|
877 |
-
'meta' => 'clear',
|
878 |
-
),
|
879 |
-
),
|
880 |
-
'plugins' => array(
|
881 |
-
$kadence_blocks,
|
882 |
-
$kadence_blocks_pro,
|
883 |
-
),
|
884 |
-
),
|
885 |
-
'agency_free' => array(
|
886 |
-
'import_file_name' => 'agency_free',
|
887 |
-
'categories' => array(),
|
888 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og01/demo_content.xml',
|
889 |
-
'import_widget_file_url' => '',
|
890 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og01/theme_options.json',
|
891 |
-
'preview_url' => 'https://demos.kadencewp.com/agency-free/',
|
892 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og01/images/preview-image.jpg',
|
893 |
-
'import_notice' => '',
|
894 |
-
'plugins' => array(
|
895 |
-
$kadence_blocks,
|
896 |
-
),
|
897 |
-
'pages' => array(
|
898 |
-
'home' => array(
|
899 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01/home_content.xml',
|
900 |
-
'meta' => 'clear',
|
901 |
-
),
|
902 |
-
'services' => array(
|
903 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01/services_content.xml',
|
904 |
-
'meta' => 'clear',
|
905 |
-
),
|
906 |
-
'about' => array(
|
907 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01/about_content.xml',
|
908 |
-
'meta' => 'clear',
|
909 |
-
),
|
910 |
-
'contact' => array(
|
911 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og01/contact_content.xml',
|
912 |
-
'meta' => 'clear',
|
913 |
-
),
|
914 |
-
),
|
915 |
-
),
|
916 |
-
'food' => array(
|
917 |
-
'import_file_name' => 'food',
|
918 |
-
'categories' => array(),
|
919 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og06/demo_content.xml',
|
920 |
-
'import_widget_file_url' => '',
|
921 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og06/theme_options.json',
|
922 |
-
'preview_url' => 'https://demos.kadencewp.com/food/',
|
923 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og06/image/preview-image.jpg',
|
924 |
-
'import_notice' => '',
|
925 |
-
'plugins' => array(
|
926 |
-
$kadence_blocks,
|
927 |
-
$wpzoom_recipe_card,
|
928 |
-
),
|
929 |
-
'pages' => array(
|
930 |
-
'home' => array(
|
931 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og06/home_content.xml',
|
932 |
-
'meta' => 'clear',
|
933 |
-
),
|
934 |
-
'about' => array(
|
935 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og06/about_content.xml',
|
936 |
-
'meta' => 'onherit',
|
937 |
-
),
|
938 |
-
'contact' => array(
|
939 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og06/contact_content.xml',
|
940 |
-
'meta' => 'inherit',
|
941 |
-
),
|
942 |
-
),
|
943 |
-
),
|
944 |
-
'shopping' => array(
|
945 |
-
'import_file_name' => 'shopping',
|
946 |
-
'categories' => array( 'Woocommerce' ),
|
947 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og04/demo_content.xml',
|
948 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/og04/widget_data.json',
|
949 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og04/theme_options.json',
|
950 |
-
'preview_url' => 'https://demos.kadencewp.com/blocks-store/',
|
951 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og04/images/preview-image.jpg',
|
952 |
-
'import_notice' => '',
|
953 |
-
'plugins' => array(
|
954 |
-
$kadence_blocks,
|
955 |
-
$woocommerce,
|
956 |
-
),
|
957 |
-
'pages' => array(
|
958 |
-
'home' => array(
|
959 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og04/home_content.xml',
|
960 |
-
'meta' => 'clear',
|
961 |
-
),
|
962 |
-
'about' => array(
|
963 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og04/about_content.xml',
|
964 |
-
'meta' => 'clear',
|
965 |
-
),
|
966 |
-
'contact' => array(
|
967 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og04/contact_content.xml',
|
968 |
-
'meta' => 'clear',
|
969 |
-
),
|
970 |
-
),
|
971 |
-
),
|
972 |
-
'yoga' => array(
|
973 |
-
'import_file_name' => 'yoga',
|
974 |
-
'categories' => array( 'Business' ),
|
975 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og05/demo_content.xml',
|
976 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/og05/widget_data.json',
|
977 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og05/theme_options.json',
|
978 |
-
'preview_url' => 'https://demos.kadencewp.com/blocks-active/',
|
979 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og05/images/preview-image.jpg',
|
980 |
-
'import_notice' => '',
|
981 |
-
'plugins' => array(
|
982 |
-
$kadence_blocks,
|
983 |
-
),
|
984 |
-
'pages' => array(
|
985 |
-
'home' => array(
|
986 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og05/home_content.xml',
|
987 |
-
'meta' => 'clear',
|
988 |
-
),
|
989 |
-
'gallery' => array(
|
990 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og05/gallery_content.xml',
|
991 |
-
'meta' => 'clear',
|
992 |
-
),
|
993 |
-
'pricing' => array(
|
994 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og05/pricing_content.xml',
|
995 |
-
'meta' => 'clear',
|
996 |
-
),
|
997 |
-
'about' => array(
|
998 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og05/about_content.xml',
|
999 |
-
'meta' => 'clear',
|
1000 |
-
),
|
1001 |
-
'contact' => array(
|
1002 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og05/contact_content.xml',
|
1003 |
-
'meta' => 'clear',
|
1004 |
-
),
|
1005 |
-
),
|
1006 |
-
),
|
1007 |
-
'saas' => array(
|
1008 |
-
'import_file_name' => 'saas',
|
1009 |
-
'categories' => array( 'Business' ),
|
1010 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og03/demo_content.xml',
|
1011 |
-
'import_widget_file_url' => '',
|
1012 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og03/theme_options.json',
|
1013 |
-
'preview_url' => 'https://demos.kadencewp.com/blocks-saas/',
|
1014 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og03/images/preview-image.jpg',
|
1015 |
-
'import_notice' => '',
|
1016 |
-
'plugins' => array(
|
1017 |
-
$kadence_blocks,
|
1018 |
-
),
|
1019 |
-
'pages' => array(
|
1020 |
-
'home' => array(
|
1021 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og03/home_content.xml',
|
1022 |
-
'meta' => 'clear',
|
1023 |
-
),
|
1024 |
-
'features' => array(
|
1025 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og03/features_content.xml',
|
1026 |
-
'meta' => 'clear',
|
1027 |
-
),
|
1028 |
-
'pricing' => array(
|
1029 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og03/pricing_content.xml',
|
1030 |
-
'meta' => 'clear',
|
1031 |
-
),
|
1032 |
-
'about' => array(
|
1033 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og03/about_content.xml',
|
1034 |
-
'meta' => 'clear',
|
1035 |
-
),
|
1036 |
-
'contact' => array(
|
1037 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og03/contact_content.xml',
|
1038 |
-
'meta' => 'clear',
|
1039 |
-
),
|
1040 |
-
),
|
1041 |
-
),
|
1042 |
-
'ldcourse' => array(
|
1043 |
-
'import_file_name' => 'ldcourse',
|
1044 |
-
'categories' => array( 'Business' ),
|
1045 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/og02/demo_content.xml',
|
1046 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/og02/widget_data.json',
|
1047 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/og02/theme_options.json',
|
1048 |
-
'preview_url' => 'https://demos.kadencewp.com/course/',
|
1049 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/og02/preview-image.jpg',
|
1050 |
-
'import_notice' => '',
|
1051 |
-
'plugins' => array(
|
1052 |
-
$kadence_blocks,
|
1053 |
-
$learn_dash,
|
1054 |
-
),
|
1055 |
-
'pages' => array(
|
1056 |
-
'home' => array(
|
1057 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og02/home_content.xml',
|
1058 |
-
'meta' => 'clear',
|
1059 |
-
),
|
1060 |
-
'about' => array(
|
1061 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og02/about_content.xml',
|
1062 |
-
'meta' => 'clear',
|
1063 |
-
),
|
1064 |
-
'contact' => array(
|
1065 |
-
'content' => 'https://startertemplatecloud.com/importer-content/og02/contact_content.xml',
|
1066 |
-
'meta' => 'clear',
|
1067 |
-
),
|
1068 |
-
),
|
1069 |
-
),
|
1070 |
-
'e01' => array(
|
1071 |
-
'import_file_name' => 'e01',
|
1072 |
-
'categories' => array(),
|
1073 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/e01/demo_content.xml',
|
1074 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/e01/widget_data.json',
|
1075 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/e01/theme_options.json',
|
1076 |
-
'import_forms_file_url' => 'https://startertemplatecloud.com/importer-content/e01/form_data.json',
|
1077 |
-
'preview_url' => 'https://startertemplatecloud.com/e01/',
|
1078 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/e01/preview-image.jpg',
|
1079 |
-
'import_notice' => '',
|
1080 |
-
'type' => 'elementor',
|
1081 |
-
'width' => 'large',
|
1082 |
-
'plugins' => array(
|
1083 |
-
$elementor,
|
1084 |
-
$fluentform,
|
1085 |
-
),
|
1086 |
-
'pages' => array(
|
1087 |
-
'home' => array(
|
1088 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/home_content.xml',
|
1089 |
-
'meta' => 'inherit',
|
1090 |
-
),
|
1091 |
-
'services' => array(
|
1092 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/services_content.xml',
|
1093 |
-
'meta' => 'inherit',
|
1094 |
-
),
|
1095 |
-
'about' => array(
|
1096 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/about_content.xml',
|
1097 |
-
'meta' => 'inherit',
|
1098 |
-
),
|
1099 |
-
'contact' => array(
|
1100 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/contact_content.xml',
|
1101 |
-
'meta' => 'inherit',
|
1102 |
-
'form' => true,
|
1103 |
-
),
|
1104 |
-
'brokerage' => array(
|
1105 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/brokerage_content.xml',
|
1106 |
-
'meta' => 'inherit',
|
1107 |
-
),
|
1108 |
-
'norman' => array(
|
1109 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e01/norman_content.xml',
|
1110 |
-
'meta' => 'inherit',
|
1111 |
-
),
|
1112 |
-
),
|
1113 |
-
),
|
1114 |
-
'e02' => array(
|
1115 |
-
'import_file_name' => 'e02',
|
1116 |
-
'categories' => array(),
|
1117 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/e02/demo_content.xml',
|
1118 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/e02/widget_data.json',
|
1119 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/e02/theme_options.json',
|
1120 |
-
'import_forms_file_url' => 'https://startertemplatecloud.com/importer-content/e02/form_data.json',
|
1121 |
-
'preview_url' => 'https://startertemplatecloud.com/e02/',
|
1122 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/e02/preview-image.jpg',
|
1123 |
-
'import_notice' => '',
|
1124 |
-
'type' => 'elementor',
|
1125 |
-
'plugins' => array(
|
1126 |
-
$elementor,
|
1127 |
-
$fluentform,
|
1128 |
-
$woocommerce,
|
1129 |
-
),
|
1130 |
-
'pages' => array(
|
1131 |
-
'home' => array(
|
1132 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e02/home_content.xml',
|
1133 |
-
'meta' => 'inherit',
|
1134 |
-
),
|
1135 |
-
'about' => array(
|
1136 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e02/about_content.xml',
|
1137 |
-
'meta' => 'inherit',
|
1138 |
-
),
|
1139 |
-
'contact' => array(
|
1140 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e02/contact_content.xml',
|
1141 |
-
'meta' => 'inherit',
|
1142 |
-
'form' => true,
|
1143 |
-
),
|
1144 |
-
),
|
1145 |
-
),
|
1146 |
-
'e03' => array(
|
1147 |
-
'import_file_name' => 'e03',
|
1148 |
-
'categories' => array(),
|
1149 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/e03/demo_content.xml',
|
1150 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/e03/widget_data.json',
|
1151 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/e03/theme_options.json',
|
1152 |
-
'import_forms_file_url' => 'https://startertemplatecloud.com/importer-content/e03/form_data.json',
|
1153 |
-
'preview_url' => 'https://startertemplatecloud.com/e03/',
|
1154 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/e03/images/preview-image.jpg',
|
1155 |
-
'import_notice' => '',
|
1156 |
-
'type' => 'elementor',
|
1157 |
-
'width' => 'large',
|
1158 |
-
'plugins' => array(
|
1159 |
-
$elementor,
|
1160 |
-
$fluentform,
|
1161 |
-
),
|
1162 |
-
'pages' => array(
|
1163 |
-
'home' => array(
|
1164 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e03/home_content.xml',
|
1165 |
-
'meta' => 'inherit',
|
1166 |
-
),
|
1167 |
-
'about' => array(
|
1168 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e03/about_content.xml',
|
1169 |
-
'meta' => 'inherit',
|
1170 |
-
),
|
1171 |
-
'contact' => array(
|
1172 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e03/contact_content.xml',
|
1173 |
-
'meta' => 'inherit',
|
1174 |
-
'form' => true,
|
1175 |
-
),
|
1176 |
-
'courses' => array(
|
1177 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e03/courses_content.xml',
|
1178 |
-
'meta' => 'inherit',
|
1179 |
-
),
|
1180 |
-
'course' => array(
|
1181 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e03/course_content.xml',
|
1182 |
-
'meta' => 'inherit',
|
1183 |
-
),
|
1184 |
-
),
|
1185 |
-
),
|
1186 |
-
'e06' => array(
|
1187 |
-
'import_file_name' => 'e06',
|
1188 |
-
'categories' => array(),
|
1189 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/e06/demo_content.xml',
|
1190 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/e06/widget_data.json',
|
1191 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/e06/theme_options.json',
|
1192 |
-
'import_forms_file_url' => '',
|
1193 |
-
'preview_url' => 'https://startertemplatecloud.com/e06/',
|
1194 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/e06/images/preview-image.jpg',
|
1195 |
-
'import_notice' => '',
|
1196 |
-
'type' => 'elementor',
|
1197 |
-
'plugins' => array(
|
1198 |
-
$elementor,
|
1199 |
-
),
|
1200 |
-
'pages' => array(
|
1201 |
-
'home' => array(
|
1202 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e06/home_content.xml',
|
1203 |
-
'meta' => 'inherit',
|
1204 |
-
),
|
1205 |
-
'features' => array(
|
1206 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e06/features_content.xml',
|
1207 |
-
'meta' => 'inherit',
|
1208 |
-
),
|
1209 |
-
'pricing' => array(
|
1210 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e06/pricing_content.xml',
|
1211 |
-
'meta' => 'inherit',
|
1212 |
-
),
|
1213 |
-
'support' => array(
|
1214 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e06/support_content.xml',
|
1215 |
-
'meta' => 'inherit',
|
1216 |
-
),
|
1217 |
-
'templates' => array(
|
1218 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e06/templates_content.xml',
|
1219 |
-
'meta' => 'inherit',
|
1220 |
-
),
|
1221 |
-
),
|
1222 |
-
),
|
1223 |
-
'e05' => array(
|
1224 |
-
'import_file_name' => 'e05',
|
1225 |
-
'categories' => array(),
|
1226 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/e05/demo_content.xml',
|
1227 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/e05/widget_data.json',
|
1228 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/e05/theme_options.json',
|
1229 |
-
'import_forms_file_url' => 'https://startertemplatecloud.com/importer-content/e05/form_data.json',
|
1230 |
-
'preview_url' => 'https://startertemplatecloud.com/e05/',
|
1231 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/e05/images/preview-image.jpg',
|
1232 |
-
'import_notice' => '',
|
1233 |
-
'type' => 'elementor',
|
1234 |
-
'plugins' => array(
|
1235 |
-
$elementor,
|
1236 |
-
$fluentform,
|
1237 |
-
),
|
1238 |
-
'pages' => array(
|
1239 |
-
'home' => array(
|
1240 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/home_content.xml',
|
1241 |
-
'meta' => 'inherit',
|
1242 |
-
),
|
1243 |
-
'about' => array(
|
1244 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/about_content.xml',
|
1245 |
-
'meta' => 'inherit',
|
1246 |
-
),
|
1247 |
-
'portfolio' => array(
|
1248 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/portfolio_content.xml',
|
1249 |
-
'meta' => 'inherit',
|
1250 |
-
),
|
1251 |
-
'single-portfolio' => array(
|
1252 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/single-portfolio_content.xml',
|
1253 |
-
'meta' => 'inherit',
|
1254 |
-
),
|
1255 |
-
'services' => array(
|
1256 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/services_content.xml',
|
1257 |
-
'meta' => 'inherit',
|
1258 |
-
),
|
1259 |
-
'contact' => array(
|
1260 |
-
'content' => 'https://startertemplatecloud.com/importer-content/e05/contact_content.xml',
|
1261 |
-
'meta' => 'inherit',
|
1262 |
-
),
|
1263 |
-
),
|
1264 |
-
),
|
1265 |
-
'g01' => array(
|
1266 |
-
'import_file_name' => 'g01',
|
1267 |
-
'categories' => array(),
|
1268 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/g01/demo_content.xml',
|
1269 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/g01/widget_data.json',
|
1270 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/g01/theme_options.json',
|
1271 |
-
'preview_url' => 'https://startertemplatecloud.com/g01/',
|
1272 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/g01/preview-image.jpg',
|
1273 |
-
'import_notice' => '',
|
1274 |
-
'type' => 'blocks',
|
1275 |
-
'plugins' => array(
|
1276 |
-
$kadence_blocks,
|
1277 |
-
),
|
1278 |
-
'pages' => array(
|
1279 |
-
'home' => array(
|
1280 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/home_content.xml',
|
1281 |
-
'meta' => 'inherit',
|
1282 |
-
),
|
1283 |
-
'services' => array(
|
1284 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/services_content.xml',
|
1285 |
-
'meta' => 'inherit',
|
1286 |
-
),
|
1287 |
-
'about' => array(
|
1288 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/about_content.xml',
|
1289 |
-
'meta' => 'inherit',
|
1290 |
-
),
|
1291 |
-
'contact' => array(
|
1292 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/contact_content.xml',
|
1293 |
-
'meta' => 'inherit',
|
1294 |
-
),
|
1295 |
-
'brokerage' => array(
|
1296 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/brokerage_content.xml',
|
1297 |
-
'meta' => 'inherit',
|
1298 |
-
),
|
1299 |
-
'norman' => array(
|
1300 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g01/norman_content.xml',
|
1301 |
-
'meta' => 'inherit',
|
1302 |
-
),
|
1303 |
-
),
|
1304 |
-
),
|
1305 |
-
'g02' => array(
|
1306 |
-
'import_file_name' => 'g02',
|
1307 |
-
'categories' => array(),
|
1308 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/g02/demo_content.xml',
|
1309 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/g02/widget_data.json',
|
1310 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/g02/theme_options.json',
|
1311 |
-
'preview_url' => 'https://startertemplatecloud.com/g02/',
|
1312 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/g02/preview-image.jpg',
|
1313 |
-
'import_notice' => '',
|
1314 |
-
'type' => 'blocks',
|
1315 |
-
'plugins' => array(
|
1316 |
-
$kadence_blocks,
|
1317 |
-
$woocommerce,
|
1318 |
-
),
|
1319 |
-
'pages' => array(
|
1320 |
-
'home' => array(
|
1321 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g02/home_content.xml',
|
1322 |
-
'meta' => 'inherit',
|
1323 |
-
),
|
1324 |
-
'about' => array(
|
1325 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g02/about_content.xml',
|
1326 |
-
'meta' => 'inherit',
|
1327 |
-
),
|
1328 |
-
'contact' => array(
|
1329 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g02/contact_content.xml',
|
1330 |
-
'meta' => 'inherit',
|
1331 |
-
),
|
1332 |
-
),
|
1333 |
-
),
|
1334 |
-
'g03' => array(
|
1335 |
-
'import_file_name' => 'g03',
|
1336 |
-
'categories' => array(),
|
1337 |
-
'import_file_url' => 'https://startertemplatecloud.com/importer-content/g03/demo_content.xml',
|
1338 |
-
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/g03/widget_data.json',
|
1339 |
-
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/g03/theme_options.json',
|
1340 |
-
'preview_url' => 'https://startertemplatecloud.com/g03/',
|
1341 |
-
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/g03/preview-image.jpg',
|
1342 |
-
'import_notice' => '',
|
1343 |
-
'type' => 'blocks',
|
1344 |
-
'plugins' => array(
|
1345 |
-
$kadence_blocks,
|
1346 |
-
),
|
1347 |
-
'pages' => array(
|
1348 |
-
'home' => array(
|
1349 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g03/home_content.xml',
|
1350 |
-
'meta' => 'inherit',
|
1351 |
-
),
|
1352 |
-
'about' => array(
|
1353 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g03/about_content.xml',
|
1354 |
-
'meta' => 'inherit',
|
1355 |
-
),
|
1356 |
-
'contact' => array(
|
1357 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g03/contact_content.xml',
|
1358 |
-
'meta' => 'inherit',
|
1359 |
-
),
|
1360 |
-
'courses' => array(
|
1361 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g03/courses_content.xml',
|
1362 |
-
'meta' => 'inherit',
|
1363 |
-
),
|
1364 |
-
'course' => array(
|
1365 |
-
'content' => 'https://startertemplatecloud.com/importer-content/g03/course_content.xml',
|
1366 |
-
'meta' => 'inherit',
|
1367 |
-
),
|
1368 |
-
),
|
1369 |
-
),
|
1370 |
-
);
|
1371 |
-
return $demos;
|
1372 |
-
}
|
1373 |
/**
|
1374 |
* Throw error on object clone.
|
1375 |
*
|
@@ -1390,28 +538,11 @@ class Starter_Templates {
|
|
1390 |
// Cloning instances of the class is forbidden.
|
1391 |
_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of the class is forbidden.', 'kadence-starter-templates' ), '1.0' );
|
1392 |
}
|
1393 |
-
|
1394 |
-
/**
|
1395 |
-
* Set plugin constants.
|
1396 |
-
*
|
1397 |
-
* Path/URL to root of this plugin, with trailing slash and plugin version.
|
1398 |
-
*/
|
1399 |
-
private function set_plugin_constants() {
|
1400 |
-
// Path/URL to root of this plugin, with trailing slash.
|
1401 |
-
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_PATH' ) ) {
|
1402 |
-
define( 'KADENCE_STARTER_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) );
|
1403 |
-
}
|
1404 |
-
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_URL' ) ) {
|
1405 |
-
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
1406 |
-
}
|
1407 |
-
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
1408 |
-
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.1.4' );
|
1409 |
-
}
|
1410 |
-
}
|
1411 |
/**
|
1412 |
* Include all plugin files.
|
1413 |
*/
|
1414 |
private function include_plugin_files() {
|
|
|
1415 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-author-meta.php';
|
1416 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-export-option.php';
|
1417 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-plugin-check.php';
|
@@ -1474,733 +605,56 @@ class Starter_Templates {
|
|
1474 |
* Loads admin style sheets and scripts
|
1475 |
*/
|
1476 |
public function scripts() {
|
1477 |
-
$
|
1478 |
-
'
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
$elementor = array(
|
1483 |
-
'title' => 'Elementor',
|
1484 |
-
'state' => Plugin_Check::active_check( 'elementor/elementor.php' ),
|
1485 |
-
'src' => 'repo',
|
1486 |
-
);
|
1487 |
-
$kadence_blocks = array(
|
1488 |
-
'title' => 'Kadence Blocks',
|
1489 |
-
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
1490 |
-
'src' => 'repo',
|
1491 |
-
);
|
1492 |
-
$kadence_blocks_pro = array(
|
1493 |
-
'title' => 'Kadence Block Pro',
|
1494 |
-
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
1495 |
-
'src' => 'bundle',
|
1496 |
-
);
|
1497 |
-
$fluentform = array(
|
1498 |
-
'title' => 'Fluent Forms',
|
1499 |
-
'src' => 'repo',
|
1500 |
-
'state' => Plugin_Check::active_check( 'fluentform/fluentform.php' ),
|
1501 |
-
);
|
1502 |
-
$wpzoom_recipe_card = array(
|
1503 |
-
'title' => 'Recipe Card Blocks by WPZOOM',
|
1504 |
-
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
1505 |
-
'src' => 'repo',
|
1506 |
-
);
|
1507 |
-
$learn_dash = array(
|
1508 |
-
'title' => 'LearnDash',
|
1509 |
-
'state' => Plugin_Check::active_check( 'sfwd-lms/sfwd_lms.php' ),
|
1510 |
-
'src' => 'thirdparty',
|
1511 |
-
);
|
1512 |
-
if ( 'notactive' !== $kadence_blocks_pro['state'] ) {
|
1513 |
-
$agency = array(
|
1514 |
-
'key' => 0,
|
1515 |
-
'slug' => 'agency',
|
1516 |
-
'name' => __( 'Agency', 'kadence-starter-templates' ),
|
1517 |
-
'keywords' => array(
|
1518 |
-
__( 'portfolio', 'kadence-starter-templates' ),
|
1519 |
-
__( 'services', 'kadence-starter-templates' ),
|
1520 |
-
__( 'business', 'kadence-starter-templates' ),
|
1521 |
-
__( 'transparent', 'kadence-starter-templates' ),
|
1522 |
-
),
|
1523 |
-
'url' => 'https://demos.kadencewp.com/blocks-agency/',
|
1524 |
-
'categories' => array( 'business' ),
|
1525 |
-
'plugins' => array(
|
1526 |
-
$kadence_blocks,
|
1527 |
-
$kadence_blocks_pro,
|
1528 |
-
),
|
1529 |
-
'pages' => array(
|
1530 |
-
'home' => array(
|
1531 |
-
'id' => 'home',
|
1532 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1533 |
-
'url' => 'https://demos.kadencewp.com/agency-free/',
|
1534 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/home.jpg',
|
1535 |
-
),
|
1536 |
-
'services' => array(
|
1537 |
-
'id' => 'services',
|
1538 |
-
'title' => __( 'Services', 'kadence-starter-templates' ),
|
1539 |
-
'url' => 'https://demos.kadencewp.com/agency-free/services/',
|
1540 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/services.jpg',
|
1541 |
-
),
|
1542 |
-
'about' => array(
|
1543 |
-
'id' => 'about',
|
1544 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1545 |
-
'url' => 'https://demos.kadencewp.com/agency-free/about/',
|
1546 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/about.jpg',
|
1547 |
-
),
|
1548 |
-
'contact' => array(
|
1549 |
-
'id' => 'contact',
|
1550 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1551 |
-
'url' => 'https://demos.kadencewp.com/agency-free/contact/',
|
1552 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/contact.jpg',
|
1553 |
-
),
|
1554 |
-
),
|
1555 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/preview-image.jpg',
|
1556 |
-
);
|
1557 |
-
} else {
|
1558 |
-
$agency = array(
|
1559 |
-
'key' => 0,
|
1560 |
-
'slug' => 'agency_free',
|
1561 |
-
'name' => __( 'Agency', 'kadence-starter-templates' ),
|
1562 |
-
'keywords' => array(
|
1563 |
-
__( 'portfolio', 'kadence-starter-templates' ),
|
1564 |
-
__( 'services', 'kadence-starter-templates' ),
|
1565 |
-
__( 'business', 'kadence-starter-templates' ),
|
1566 |
-
__( 'transparent', 'kadence-starter-templates' ),
|
1567 |
-
),
|
1568 |
-
'url' => 'https://demos.kadencewp.com/agency-free/',
|
1569 |
-
'categories' => array( 'business' ),
|
1570 |
-
'pages' => array(
|
1571 |
-
'home' => array(
|
1572 |
-
'id' => 'home',
|
1573 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1574 |
-
'url' => 'https://demos.kadencewp.com/agency-free/',
|
1575 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/home.jpg',
|
1576 |
-
),
|
1577 |
-
'services' => array(
|
1578 |
-
'id' => 'services',
|
1579 |
-
'title' => __( 'Services', 'kadence-starter-templates' ),
|
1580 |
-
'url' => 'https://demos.kadencewp.com/agency-free/services/',
|
1581 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/services.jpg',
|
1582 |
-
),
|
1583 |
-
'about' => array(
|
1584 |
-
'id' => 'about',
|
1585 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1586 |
-
'url' => 'https://demos.kadencewp.com/agency-free/about/',
|
1587 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/about.jpg',
|
1588 |
-
),
|
1589 |
-
'contact' => array(
|
1590 |
-
'id' => 'contact',
|
1591 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1592 |
-
'url' => 'https://demos.kadencewp.com/agency-free/contact/',
|
1593 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/contact.jpg',
|
1594 |
-
),
|
1595 |
-
),
|
1596 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og01/images/preview-image.jpg',
|
1597 |
-
'plugins' => array(
|
1598 |
-
$kadence_blocks,
|
1599 |
-
),
|
1600 |
-
);
|
1601 |
-
}
|
1602 |
-
$templates = array(
|
1603 |
-
$agency,
|
1604 |
-
array(
|
1605 |
-
'key' => 1,
|
1606 |
-
'slug' => 'g01',
|
1607 |
-
'name' => __( 'Real Estate', 'kadence-starter-templates' ),
|
1608 |
-
'keywords' => array(
|
1609 |
-
__( 'reale state', 'kadence-starter-templates' ),
|
1610 |
-
__( 'house', 'kadence-starter-templates' ),
|
1611 |
-
__( 'business', 'kadence-starter-templates' ),
|
1612 |
-
),
|
1613 |
-
'url' => 'https://startertemplatecloud.com/g01/',
|
1614 |
-
'categories' => array( 'business' ),
|
1615 |
-
'type' => 'blocks',
|
1616 |
-
'plugins' => array(
|
1617 |
-
$kadence_blocks,
|
1618 |
-
),
|
1619 |
-
'pages' => array(
|
1620 |
-
'home' => array(
|
1621 |
-
'id' => 'home',
|
1622 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1623 |
-
'url' => 'https://startertemplatecloud.com/g01/',
|
1624 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/home.jpg',
|
1625 |
-
),
|
1626 |
-
'services' => array(
|
1627 |
-
'id' => 'services',
|
1628 |
-
'title' => __( 'Services', 'kadence-starter-templates' ),
|
1629 |
-
'url' => 'https://startertemplatecloud.com/g01/services/',
|
1630 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/services.jpg',
|
1631 |
-
),
|
1632 |
-
'about' => array(
|
1633 |
-
'id' => 'about',
|
1634 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1635 |
-
'url' => 'https://startertemplatecloud.com/g01/about/',
|
1636 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/about.jpg',
|
1637 |
-
),
|
1638 |
-
'contact' => array(
|
1639 |
-
'id' => 'contact',
|
1640 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1641 |
-
'url' => 'https://startertemplatecloud.com/g01/contact/',
|
1642 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/contact.jpg',
|
1643 |
-
),
|
1644 |
-
'brokerage' => array(
|
1645 |
-
'id' => 'brokerage',
|
1646 |
-
'title' => __( 'Brokerage', 'kadence-starter-templates' ),
|
1647 |
-
'url' => 'https://startertemplatecloud.com/g01/brokerage/',
|
1648 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/brokerage.jpg',
|
1649 |
-
),
|
1650 |
-
'norman' => array(
|
1651 |
-
'id' => 'norman',
|
1652 |
-
'title' => __( '418 Norman Street', 'kadence-starter-templates' ),
|
1653 |
-
'url' => 'https://startertemplatecloud.com/g01/418-norman-street/',
|
1654 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/norman.jpg',
|
1655 |
-
),
|
1656 |
-
),
|
1657 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g01/images/preview-image.jpg',
|
1658 |
),
|
1659 |
-
array(
|
1660 |
-
'
|
1661 |
-
'
|
1662 |
-
'
|
1663 |
-
'keywords' => array(
|
1664 |
-
__( 'store', 'kadence-starter-templates' ),
|
1665 |
-
__( 'ecommerce', 'kadence-starter-templates' ),
|
1666 |
-
__( 'woocommerce', 'kadence-starter-templates' ),
|
1667 |
-
),
|
1668 |
-
'url' => 'https://startertemplatecloud.com/g02/',
|
1669 |
-
'categories' => array( 'business', 'ecommerce' ),
|
1670 |
-
'type' => 'blocks',
|
1671 |
-
'plugins' => array(
|
1672 |
-
$kadence_blocks,
|
1673 |
-
$woocommerce,
|
1674 |
-
),
|
1675 |
-
'pages' => array(
|
1676 |
-
'home' => array(
|
1677 |
-
'id' => 'home',
|
1678 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1679 |
-
'url' => 'https://startertemplatecloud.com/g02/',
|
1680 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/home.jpg',
|
1681 |
-
),
|
1682 |
-
'about' => array(
|
1683 |
-
'id' => 'about',
|
1684 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1685 |
-
'url' => 'https://startertemplatecloud.com/g02/about/',
|
1686 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/about.jpg',
|
1687 |
-
),
|
1688 |
-
'contact' => array(
|
1689 |
-
'id' => 'contact',
|
1690 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1691 |
-
'url' => 'https://startertemplatecloud.com/g02/contact/',
|
1692 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/contact.jpg',
|
1693 |
-
),
|
1694 |
-
),
|
1695 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/preview-image.jpg',
|
1696 |
),
|
1697 |
-
array(
|
1698 |
-
'
|
1699 |
-
'
|
1700 |
-
'
|
1701 |
-
'keywords' => array(
|
1702 |
-
__( 'lms', 'kadence-starter-templates' ),
|
1703 |
-
__( 'course', 'kadence-starter-templates' ),
|
1704 |
-
__( 'business', 'kadence-starter-templates' ),
|
1705 |
-
),
|
1706 |
-
'url' => 'https://startertemplatecloud.com/g03/',
|
1707 |
-
'categories' => array( 'business', 'course' ),
|
1708 |
-
'type' => 'blocks',
|
1709 |
-
'plugins' => array(
|
1710 |
-
$kadence_blocks,
|
1711 |
-
),
|
1712 |
-
'pages' => array(
|
1713 |
-
'home' => array(
|
1714 |
-
'id' => 'home',
|
1715 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1716 |
-
'url' => 'https://startertemplatecloud.com/g03/',
|
1717 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/home.jpg',
|
1718 |
-
),
|
1719 |
-
'about' => array(
|
1720 |
-
'id' => 'about',
|
1721 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1722 |
-
'url' => 'https://startertemplatecloud.com/g03/about/',
|
1723 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/about.jpg',
|
1724 |
-
),
|
1725 |
-
'courses' => array(
|
1726 |
-
'id' => 'courses',
|
1727 |
-
'title' => __( 'Courses', 'kadence-starter-templates' ),
|
1728 |
-
'url' => 'https://startertemplatecloud.com/g03/courses/',
|
1729 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/courses.jpg',
|
1730 |
-
),
|
1731 |
-
'course' => array(
|
1732 |
-
'id' => 'course',
|
1733 |
-
'title' => __( 'Course', 'kadence-starter-templates' ),
|
1734 |
-
'url' => 'https://startertemplatecloud.com/g03/course/',
|
1735 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/course.jpg',
|
1736 |
-
),
|
1737 |
-
'contact' => array(
|
1738 |
-
'id' => 'contact',
|
1739 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1740 |
-
'url' => 'https://startertemplatecloud.com/g03/contact/',
|
1741 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/contact.jpg',
|
1742 |
-
),
|
1743 |
-
),
|
1744 |
-
'image' => 'https://startertemplatecloud.com/importer-content/g03/images/preview-image.jpg',
|
1745 |
),
|
1746 |
-
array(
|
1747 |
-
'
|
1748 |
-
'
|
1749 |
-
'
|
1750 |
-
'keywords' => array(
|
1751 |
-
__( 'course', 'kadence-starter-templates' ),
|
1752 |
-
__( 'learndash', 'kadence-starter-templates' ),
|
1753 |
-
__( 'business', 'kadence-starter-templates' ),
|
1754 |
-
),
|
1755 |
-
'url' => 'https://demos.kadencewp.com/course/',
|
1756 |
-
'categories' => array( 'business' ),
|
1757 |
-
'plugins' => array(
|
1758 |
-
$kadence_blocks,
|
1759 |
-
$learn_dash,
|
1760 |
-
),
|
1761 |
-
'pages' => array(
|
1762 |
-
'home' => array(
|
1763 |
-
'id' => 'home',
|
1764 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1765 |
-
'url' => 'https://demos.kadencewp.com/course/',
|
1766 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/home.jpg',
|
1767 |
-
),
|
1768 |
-
'about' => array(
|
1769 |
-
'id' => 'about',
|
1770 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1771 |
-
'url' => 'https://demos.kadencewp.com/course/about/',
|
1772 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/about.jpg',
|
1773 |
-
),
|
1774 |
-
'contact' => array(
|
1775 |
-
'id' => 'contact',
|
1776 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1777 |
-
'url' => 'https://demos.kadencewp.com/course/contact/',
|
1778 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/contact.jpg',
|
1779 |
-
),
|
1780 |
-
),
|
1781 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/preview-image.jpg',
|
1782 |
),
|
1783 |
-
array(
|
1784 |
-
'
|
1785 |
-
'
|
1786 |
-
'
|
1787 |
-
'keywords' => array(
|
1788 |
-
__( 'blog', 'kadence-starter-templates' ),
|
1789 |
-
__( 'food', 'kadence-starter-templates' ),
|
1790 |
-
__( 'recipe', 'kadence-starter-templates' ),
|
1791 |
-
),
|
1792 |
-
'url' => 'https://demos.kadencewp.com/food/',
|
1793 |
-
'categories' => array( 'blog' ),
|
1794 |
-
'plugins' => array(
|
1795 |
-
$kadence_blocks,
|
1796 |
-
$wpzoom_recipe_card,
|
1797 |
-
),
|
1798 |
-
'pages' => array(
|
1799 |
-
'home' => array(
|
1800 |
-
'id' => 'home',
|
1801 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1802 |
-
'url' => 'https://demos.kadencewp.com/food/',
|
1803 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og06/images/home.jpg',
|
1804 |
-
),
|
1805 |
-
'about' => array(
|
1806 |
-
'id' => 'about',
|
1807 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1808 |
-
'url' => 'https://demos.kadencewp.com/food/about/',
|
1809 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og06/images/about.jpg',
|
1810 |
-
),
|
1811 |
-
'contact' => array(
|
1812 |
-
'id' => 'contact',
|
1813 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1814 |
-
'url' => 'https://demos.kadencewp.com/food/contact/',
|
1815 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og06/images/contact.jpg',
|
1816 |
-
),
|
1817 |
-
),
|
1818 |
-
'image' => 'https://kadence.design/importer/kadence/recipe_blog/preview-image.jpg',
|
1819 |
-
),
|
1820 |
-
array(
|
1821 |
-
'key' => 6,
|
1822 |
-
'slug' => 'yoga',
|
1823 |
-
'name' => __( 'Yoga Studio', 'kadence-starter-templates' ),
|
1824 |
-
'keywords' => array(
|
1825 |
-
__( 'yoga', 'kadence-starter-templates' ),
|
1826 |
-
__( 'gym', 'kadence-starter-templates' ),
|
1827 |
-
__( 'business', 'kadence-starter-templates' ),
|
1828 |
-
),
|
1829 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/',
|
1830 |
-
'categories' => array( 'business' ),
|
1831 |
-
'plugins' => array(
|
1832 |
-
$kadence_blocks,
|
1833 |
-
),
|
1834 |
-
'pages' => array(
|
1835 |
-
'home' => array(
|
1836 |
-
'id' => 'home',
|
1837 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1838 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/',
|
1839 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/home.jpg',
|
1840 |
-
),
|
1841 |
-
'gallery' => array(
|
1842 |
-
'id' => 'gallery',
|
1843 |
-
'title' => __( 'Gallery', 'kadence-starter-templates' ),
|
1844 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/yoga-studio-gallery/',
|
1845 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/gallery.jpg',
|
1846 |
-
),
|
1847 |
-
'pricing' => array(
|
1848 |
-
'id' => 'pricing',
|
1849 |
-
'title' => __( 'Pricing', 'kadence-starter-templates' ),
|
1850 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/yoga-pricing/',
|
1851 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/pricing.jpg',
|
1852 |
-
),
|
1853 |
-
'about' => array(
|
1854 |
-
'id' => 'about',
|
1855 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1856 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/yoga-about/',
|
1857 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/about.jpg',
|
1858 |
-
),
|
1859 |
-
'contact' => array(
|
1860 |
-
'id' => 'contact',
|
1861 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1862 |
-
'url' => 'https://demos.kadencewp.com/blocks-active/yoga-contact/',
|
1863 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/contact.jpg',
|
1864 |
-
),
|
1865 |
-
),
|
1866 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/preview-image.jpg',
|
1867 |
),
|
1868 |
-
array(
|
1869 |
-
'
|
1870 |
-
'
|
1871 |
-
'
|
1872 |
-
'keywords' => array(
|
1873 |
-
__( 'saas', 'kadence-starter-templates' ),
|
1874 |
-
__( 'pricing', 'kadence-starter-templates' ),
|
1875 |
-
__( 'business', 'kadence-starter-templates' ),
|
1876 |
-
),
|
1877 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/',
|
1878 |
-
'categories' => array( 'business' ),
|
1879 |
-
'plugins' => array(
|
1880 |
-
$kadence_blocks,
|
1881 |
-
),
|
1882 |
-
'pages' => array(
|
1883 |
-
'home' => array(
|
1884 |
-
'id' => 'home',
|
1885 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1886 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/',
|
1887 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/home.jpg',
|
1888 |
-
),
|
1889 |
-
'features' => array(
|
1890 |
-
'id' => 'features',
|
1891 |
-
'title' => __( 'Features', 'kadence-starter-templates' ),
|
1892 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/features/',
|
1893 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/services.jpg',
|
1894 |
-
),
|
1895 |
-
'pricing' => array(
|
1896 |
-
'id' => 'pricing',
|
1897 |
-
'title' => __( 'Pricing', 'kadence-starter-templates' ),
|
1898 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/pricing/',
|
1899 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/pricing.jpg',
|
1900 |
-
),
|
1901 |
-
'about' => array(
|
1902 |
-
'id' => 'about',
|
1903 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1904 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/about/',
|
1905 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/about.jpg',
|
1906 |
-
),
|
1907 |
-
'contact' => array(
|
1908 |
-
'id' => 'contact',
|
1909 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1910 |
-
'url' => 'https://demos.kadencewp.com/blocks-saas/contact/',
|
1911 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/contact.jpg',
|
1912 |
-
),
|
1913 |
-
),
|
1914 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/preview-image.jpg',
|
1915 |
-
),
|
1916 |
-
array(
|
1917 |
-
'key' => 8,
|
1918 |
-
'slug' => 'shopping',
|
1919 |
-
'name' => __( 'Shopping', 'kadence-starter-templates' ),
|
1920 |
-
'keywords' => array(
|
1921 |
-
__( 'ecommerce', 'kadence-starter-templates' ),
|
1922 |
-
__( 'shopping', 'kadence-starter-templates' ),
|
1923 |
-
__( 'business', 'kadence-starter-templates' ),
|
1924 |
-
),
|
1925 |
-
'url' => 'https://demos.kadencewp.com/blocks-store/',
|
1926 |
-
'categories' => array( 'ecommerce' ),
|
1927 |
-
'plugins' => array(
|
1928 |
-
$kadence_blocks,
|
1929 |
-
$woocommerce,
|
1930 |
-
),
|
1931 |
-
'pages' => array(
|
1932 |
-
'home' => array(
|
1933 |
-
'id' => 'home',
|
1934 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1935 |
-
'url' => 'https://demos.kadencewp.com/blocks-store/',
|
1936 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og04/images/home.jpg',
|
1937 |
-
),
|
1938 |
-
'about' => array(
|
1939 |
-
'id' => 'about',
|
1940 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1941 |
-
'url' => 'https://demos.kadencewp.com/blocks-store/about/',
|
1942 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og04/images/about.jpg',
|
1943 |
-
),
|
1944 |
-
'contact' => array(
|
1945 |
-
'id' => 'contact',
|
1946 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1947 |
-
'url' => 'https://demos.kadencewp.com/blocks-store/contact/',
|
1948 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og04/images/contact.jpg',
|
1949 |
-
),
|
1950 |
-
),
|
1951 |
-
'image' => 'https://startertemplatecloud.com/importer-content/og04/images/preview-image.jpg',
|
1952 |
-
),
|
1953 |
-
);
|
1954 |
-
$etemplates = array(
|
1955 |
-
array(
|
1956 |
-
'key' => 0,
|
1957 |
-
'slug' => 'e01',
|
1958 |
-
'name' => __( 'Real Estate', 'kadence-starter-templates' ),
|
1959 |
-
'keywords' => array(
|
1960 |
-
__( 'reale state', 'kadence-starter-templates' ),
|
1961 |
-
__( 'house', 'kadence-starter-templates' ),
|
1962 |
-
__( 'business', 'kadence-starter-templates' ),
|
1963 |
-
),
|
1964 |
-
'url' => 'https://startertemplatecloud.com/e01/',
|
1965 |
-
'categories' => array( 'business' ),
|
1966 |
-
'type' => 'elementor',
|
1967 |
-
'width' => 'large',
|
1968 |
-
'plugins' => array(
|
1969 |
-
$fluentform,
|
1970 |
-
$elementor,
|
1971 |
-
),
|
1972 |
-
'pages' => array(
|
1973 |
-
'home' => array(
|
1974 |
-
'id' => 'home',
|
1975 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1976 |
-
'url' => 'https://startertemplatecloud.com/e01/',
|
1977 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/home.jpg',
|
1978 |
-
),
|
1979 |
-
'services' => array(
|
1980 |
-
'id' => 'services',
|
1981 |
-
'title' => __( 'Services', 'kadence-starter-templates' ),
|
1982 |
-
'url' => 'https://startertemplatecloud.com/e01/services/',
|
1983 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/services.jpg',
|
1984 |
-
),
|
1985 |
-
'about' => array(
|
1986 |
-
'id' => 'about',
|
1987 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
1988 |
-
'url' => 'https://startertemplatecloud.com/e01/about/',
|
1989 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/about.jpg',
|
1990 |
-
),
|
1991 |
-
'contact' => array(
|
1992 |
-
'id' => 'contact',
|
1993 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1994 |
-
'url' => 'https://startertemplatecloud.com/e01/contact/',
|
1995 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/contact.jpg',
|
1996 |
-
),
|
1997 |
-
'brokerage' => array(
|
1998 |
-
'id' => 'brokerage',
|
1999 |
-
'title' => __( 'Brokerage', 'kadence-starter-templates' ),
|
2000 |
-
'url' => 'https://startertemplatecloud.com/e01/brokerage/',
|
2001 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/brokerage.jpg',
|
2002 |
-
),
|
2003 |
-
'norman' => array(
|
2004 |
-
'id' => 'norman',
|
2005 |
-
'title' => __( '418 Norman Street', 'kadence-starter-templates' ),
|
2006 |
-
'url' => 'https://startertemplatecloud.com/e01/418-norman-street/',
|
2007 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/norman.jpg',
|
2008 |
-
),
|
2009 |
-
),
|
2010 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e01/images/preview-image.jpg',
|
2011 |
),
|
2012 |
-
array(
|
2013 |
-
'
|
2014 |
-
'
|
2015 |
-
'
|
2016 |
-
'keywords' => array(
|
2017 |
-
__( 'store', 'kadence-starter-templates' ),
|
2018 |
-
__( 'ecommerce', 'kadence-starter-templates' ),
|
2019 |
-
__( 'woocommerce', 'kadence-starter-templates' ),
|
2020 |
-
),
|
2021 |
-
'url' => 'https://startertemplatecloud.com/e02/',
|
2022 |
-
'categories' => array( 'business', 'ecommerce' ),
|
2023 |
-
'type' => 'elementor',
|
2024 |
-
'plugins' => array(
|
2025 |
-
$fluentform,
|
2026 |
-
$elementor,
|
2027 |
-
),
|
2028 |
-
'pages' => array(
|
2029 |
-
'home' => array(
|
2030 |
-
'id' => 'home',
|
2031 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
2032 |
-
'url' => 'https://startertemplatecloud.com/e02/',
|
2033 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/home.jpg',
|
2034 |
-
),
|
2035 |
-
'about' => array(
|
2036 |
-
'id' => 'about',
|
2037 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
2038 |
-
'url' => 'https://startertemplatecloud.com/e02/about/',
|
2039 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/about.jpg',
|
2040 |
-
),
|
2041 |
-
'contact' => array(
|
2042 |
-
'id' => 'contact',
|
2043 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
2044 |
-
'url' => 'https://startertemplatecloud.com/e02/contact/',
|
2045 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/contact.jpg',
|
2046 |
-
),
|
2047 |
-
),
|
2048 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/preview-image.jpg',
|
2049 |
),
|
2050 |
-
array(
|
2051 |
-
'
|
2052 |
-
'
|
2053 |
-
'
|
2054 |
-
'keywords' => array(
|
2055 |
-
__( 'lms', 'kadence-starter-templates' ),
|
2056 |
-
__( 'course', 'kadence-starter-templates' ),
|
2057 |
-
__( 'business', 'kadence-starter-templates' ),
|
2058 |
-
),
|
2059 |
-
'url' => 'https://startertemplatecloud.com/e03/',
|
2060 |
-
'categories' => array( 'business', 'course' ),
|
2061 |
-
'type' => 'elementor',
|
2062 |
-
'plugins' => array(
|
2063 |
-
$fluentform,
|
2064 |
-
$elementor,
|
2065 |
-
),
|
2066 |
-
'pages' => array(
|
2067 |
-
'home' => array(
|
2068 |
-
'id' => 'home',
|
2069 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
2070 |
-
'url' => 'https://startertemplatecloud.com/e03/',
|
2071 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/home.jpg',
|
2072 |
-
),
|
2073 |
-
'about' => array(
|
2074 |
-
'id' => 'about',
|
2075 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
2076 |
-
'url' => 'https://startertemplatecloud.com/e03/about/',
|
2077 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/about.jpg',
|
2078 |
-
),
|
2079 |
-
'courses' => array(
|
2080 |
-
'id' => 'courses',
|
2081 |
-
'title' => __( 'Courses', 'kadence-starter-templates' ),
|
2082 |
-
'url' => 'https://startertemplatecloud.com/e03/courses/',
|
2083 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/courses.jpg',
|
2084 |
-
),
|
2085 |
-
'course' => array(
|
2086 |
-
'id' => 'course',
|
2087 |
-
'title' => __( 'Course', 'kadence-starter-templates' ),
|
2088 |
-
'url' => 'https://startertemplatecloud.com/e03/course/',
|
2089 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/course.jpg',
|
2090 |
-
),
|
2091 |
-
'contact' => array(
|
2092 |
-
'id' => 'contact',
|
2093 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
2094 |
-
'url' => 'https://startertemplatecloud.com/e03/contact/',
|
2095 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/contact.jpg',
|
2096 |
-
),
|
2097 |
-
),
|
2098 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e03/images/preview-image.jpg',
|
2099 |
),
|
2100 |
-
array(
|
2101 |
-
'
|
2102 |
-
'
|
2103 |
-
'
|
2104 |
-
'keywords' => array(
|
2105 |
-
__( 'saas', 'kadence-starter-templates' ),
|
2106 |
-
__( 'software', 'kadence-starter-templates' ),
|
2107 |
-
__( 'business', 'kadence-starter-templates' ),
|
2108 |
-
),
|
2109 |
-
'url' => 'https://startertemplatecloud.com/e06/',
|
2110 |
-
'categories' => array( 'business' ),
|
2111 |
-
'type' => 'elementor',
|
2112 |
-
'plugins' => array(
|
2113 |
-
$elementor,
|
2114 |
-
),
|
2115 |
-
'pages' => array(
|
2116 |
-
'home' => array(
|
2117 |
-
'id' => 'home',
|
2118 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
2119 |
-
'url' => 'https://startertemplatecloud.com/e06/',
|
2120 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/home.jpg',
|
2121 |
-
),
|
2122 |
-
'features' => array(
|
2123 |
-
'id' => 'features',
|
2124 |
-
'title' => __( 'Features', 'kadence-starter-templates' ),
|
2125 |
-
'url' => 'https://startertemplatecloud.com/e06/features/',
|
2126 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/features.jpg',
|
2127 |
-
),
|
2128 |
-
'pricing' => array(
|
2129 |
-
'id' => 'pricing',
|
2130 |
-
'title' => __( 'Pricing', 'kadence-starter-templates' ),
|
2131 |
-
'url' => 'https://startertemplatecloud.com/e06/price/',
|
2132 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/pricing.jpg',
|
2133 |
-
),
|
2134 |
-
'support' => array(
|
2135 |
-
'id' => 'support',
|
2136 |
-
'title' => __( 'Support', 'kadence-starter-templates' ),
|
2137 |
-
'url' => 'https://startertemplatecloud.com/e06/support/',
|
2138 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/support.jpg',
|
2139 |
-
),
|
2140 |
-
'templates' => array(
|
2141 |
-
'id' => 'templates',
|
2142 |
-
'title' => __( 'Templates', 'kadence-starter-templates' ),
|
2143 |
-
'url' => 'https://startertemplatecloud.com/e06/templates/',
|
2144 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/templates.jpg',
|
2145 |
-
),
|
2146 |
-
),
|
2147 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e06/images/preview-image.jpg',
|
2148 |
),
|
2149 |
-
array(
|
2150 |
-
'
|
2151 |
-
'
|
2152 |
-
'
|
2153 |
-
'keywords' => array(
|
2154 |
-
__( 'agency', 'kadence-starter-templates' ),
|
2155 |
-
__( 'web', 'kadence-starter-templates' ),
|
2156 |
-
__( 'business', 'kadence-starter-templates' ),
|
2157 |
-
),
|
2158 |
-
'url' => 'https://startertemplatecloud.com/e05/',
|
2159 |
-
'categories' => array( 'business' ),
|
2160 |
-
'type' => 'elementor',
|
2161 |
-
'plugins' => array(
|
2162 |
-
$elementor,
|
2163 |
-
$fluentform,
|
2164 |
-
),
|
2165 |
-
'pages' => array(
|
2166 |
-
'home' => array(
|
2167 |
-
'id' => 'home',
|
2168 |
-
'title' => __( 'Home', 'kadence-starter-templates' ),
|
2169 |
-
'url' => 'https://startertemplatecloud.com/e05/',
|
2170 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/home.jpg',
|
2171 |
-
),
|
2172 |
-
'about' => array(
|
2173 |
-
'id' => 'about',
|
2174 |
-
'title' => __( 'About', 'kadence-starter-templates' ),
|
2175 |
-
'url' => 'https://startertemplatecloud.com/e05/about/',
|
2176 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/about.jpg',
|
2177 |
-
),
|
2178 |
-
'portfolio' => array(
|
2179 |
-
'id' => 'portfolio',
|
2180 |
-
'title' => __( 'Portfolio', 'kadence-starter-templates' ),
|
2181 |
-
'url' => 'https://startertemplatecloud.com/e05/price/',
|
2182 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/portfolio.jpg',
|
2183 |
-
),
|
2184 |
-
'single-portfolio' => array(
|
2185 |
-
'id' => 'single-portfolio',
|
2186 |
-
'title' => __( 'Single Portfolio', 'kadence-starter-templates' ),
|
2187 |
-
'url' => 'https://startertemplatecloud.com/e05/single-portfolio/',
|
2188 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/single-portfolio.jpg',
|
2189 |
-
),
|
2190 |
-
'services' => array(
|
2191 |
-
'id' => 'services',
|
2192 |
-
'title' => __( 'Services', 'kadence-starter-templates' ),
|
2193 |
-
'url' => 'https://startertemplatecloud.com/e05/services/',
|
2194 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/services.jpg',
|
2195 |
-
),
|
2196 |
-
'contact' => array(
|
2197 |
-
'id' => 'contact',
|
2198 |
-
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
2199 |
-
'url' => 'https://startertemplatecloud.com/e05/contact/',
|
2200 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/contact.jpg',
|
2201 |
-
),
|
2202 |
-
),
|
2203 |
-
'image' => 'https://startertemplatecloud.com/importer-content/e05/images/preview-image.jpg',
|
2204 |
),
|
2205 |
);
|
2206 |
$palettes = array(
|
@@ -2414,23 +868,25 @@ class Starter_Templates {
|
|
2414 |
array(
|
2415 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
2416 |
'ajax_nonce' => wp_create_nonce( 'kadence-ajax-verification' ),
|
2417 |
-
'pro' => false,
|
2418 |
'isKadence' => class_exists( 'Kadence\Theme' ),
|
2419 |
-
'
|
2420 |
-
'
|
2421 |
-
'
|
2422 |
-
'
|
|
|
|
|
2423 |
'logo' => esc_attr( KADENCE_STARTER_TEMPLATES_URL . 'assets/images/kadence_logo.png' ),
|
2424 |
'has_content' => $has_content,
|
2425 |
'has_previous' => $has_previous,
|
2426 |
'starterSettings' => get_option( 'kadence_starter_templates_config' ),
|
|
|
2427 |
'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
|
2428 |
'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
|
2429 |
'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
|
2430 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
2431 |
'content_progress' => esc_html__( 'Importing Demo Content...', 'kadence-starter-templates' ),
|
2432 |
'content_new_progress' => esc_html__( 'Importing Demo Content... Still Importing.', 'kadence-starter-templates' ),
|
2433 |
-
'widgets_progress'
|
2434 |
'customizer_progress' => esc_html__( 'Importing Customizer Settings...', 'kadence-starter-templates' ),
|
2435 |
)
|
2436 |
);
|
@@ -2457,12 +913,22 @@ class Starter_Templates {
|
|
2457 |
public function install_plugins_ajax_callback() {
|
2458 |
Helpers::verify_ajax_call();
|
2459 |
|
2460 |
-
if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['selected'] ) ) {
|
2461 |
-
wp_send_json_error();
|
2462 |
}
|
2463 |
// Get selected file index or set it to 0.
|
2464 |
-
$selected_index
|
2465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2466 |
$info = $this->import_files[ $selected_index ];
|
2467 |
$install = true;
|
2468 |
|
@@ -2474,51 +940,136 @@ class Starter_Templates {
|
|
2474 |
if ( ! class_exists( 'WP_Upgrader' ) ) {
|
2475 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
2476 |
}
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2510 |
$install = false;
|
2511 |
}
|
2512 |
} else {
|
2513 |
$install = false;
|
2514 |
}
|
2515 |
-
}
|
2516 |
-
$
|
|
|
|
|
|
|
2517 |
}
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
$
|
|
|
|
|
|
|
2522 |
}
|
2523 |
}
|
2524 |
}
|
@@ -2597,11 +1148,20 @@ class Starter_Templates {
|
|
2597 |
}
|
2598 |
// Get selected file index or set it to 0.
|
2599 |
$this->selected_index = empty( $_POST['selected'] ) ? '' : sanitize_text_field( $_POST['selected'] );
|
|
|
2600 |
$this->selected_page = empty( $_POST['page_id'] ) ? '' : sanitize_text_field( $_POST['page_id'] );
|
2601 |
$this->override_colors = 'true' === $_POST['override_colors'] ? true : false;
|
2602 |
$this->override_fonts = 'true' === $_POST['override_fonts'] ? true : false;
|
2603 |
$this->selected_palette = empty( $_POST['palette'] ) ? '' : sanitize_text_field( $_POST['palette'] );
|
2604 |
$this->selected_font = empty( $_POST['font'] ) ? '' : sanitize_text_field( $_POST['font'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2605 |
/**
|
2606 |
* 1). Prepare import files.
|
2607 |
* Predefined import files via filter: kadence-starter-templates/import_files
|
@@ -2625,7 +1185,7 @@ class Starter_Templates {
|
|
2625 |
$log_added = Helpers::append_to_file(
|
2626 |
sprintf(
|
2627 |
__( 'The import files for: %s were successfully downloaded!', 'kadence-starter-templates' ),
|
2628 |
-
$this->import_files[ $this->selected_index ]['
|
2629 |
) . Helpers::import_file_info( $this->selected_import_files ),
|
2630 |
$this->log_file_path,
|
2631 |
esc_html__( 'Downloaded files' , 'kadence-starter-templates' )
|
@@ -2660,7 +1220,7 @@ class Starter_Templates {
|
|
2660 |
if ( ! empty( $this->selected_import_files['content'] ) ) {
|
2661 |
$meta = ( ! empty( $this->import_files[ $this->selected_index ] ) && ! empty( $this->selected_page ) && isset( $this->import_files[ $this->selected_index ]['pages'] ) && isset( $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ] ) && isset( $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ]['meta'] ) ? $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ]['meta'] : 'inherit' );
|
2662 |
$logger = $this->importer->import_content( $this->selected_import_files['content'], true, $meta );
|
2663 |
-
if ( is_object( $logger ) && $logger->error_output ) {
|
2664 |
$this->append_to_frontend_error_messages( $logger->error_output );
|
2665 |
} elseif ( is_object( $logger ) && $logger->messages ) {
|
2666 |
$messages = $logger->messages;
|
@@ -2986,6 +1546,16 @@ class Starter_Templates {
|
|
2986 |
$this->selected_index = empty( $_POST['selected'] ) ? '' : sanitize_text_field( $_POST['selected'] );
|
2987 |
$this->selected_palette = empty( $_POST['palette'] ) ? '' : sanitize_text_field( $_POST['palette'] );
|
2988 |
$this->selected_font = empty( $_POST['font'] ) ? '' : sanitize_text_field( $_POST['font'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2989 |
/**
|
2990 |
* 1). Prepare import files.
|
2991 |
* Predefined import files via filter: kadence-starter-templates/import_files
|
@@ -3009,7 +1579,7 @@ class Starter_Templates {
|
|
3009 |
$log_added = Helpers::append_to_file(
|
3010 |
sprintf(
|
3011 |
__( 'The import files for: %s were successfully downloaded!', 'kadence-starter-templates' ),
|
3012 |
-
$this->import_files[ $this->selected_index ]['
|
3013 |
) . Helpers::import_file_info( $this->selected_import_files ),
|
3014 |
$this->log_file_path,
|
3015 |
esc_html__( 'Downloaded files' , 'kadence-starter-templates' )
|
@@ -3118,7 +1688,7 @@ class Starter_Templates {
|
|
3118 |
$component->elementor_add_theme_colors();
|
3119 |
}
|
3120 |
}
|
3121 |
-
if ( isset( $selected_import['
|
3122 |
$container_width = array(
|
3123 |
'unit' => 'px',
|
3124 |
'size' => 1242,
|
@@ -3368,7 +1938,8 @@ class Starter_Templates {
|
|
3368 |
return;
|
3369 |
}
|
3370 |
// Get info of import data files and filter it.
|
3371 |
-
|
|
|
3372 |
//$this->import_files = Helpers::validate_import_file_info( apply_filters( 'kadence-starter-templates/import_files', array() ) );
|
3373 |
/**
|
3374 |
* Register all default actions (before content import, widget, customizer import and other actions)
|
84 |
*/
|
85 |
private $selected_page;
|
86 |
|
87 |
+
/**
|
88 |
+
* The selected builder for import.
|
89 |
+
*
|
90 |
+
* @var string
|
91 |
+
*/
|
92 |
+
private $selected_builder;
|
93 |
+
|
94 |
/**
|
95 |
* Import Single Override colors
|
96 |
*
|
164 |
// Text Domain.
|
165 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
166 |
// Filters durning Import.
|
|
|
167 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_kadence_theme_after_import' ), 10, 3 );
|
168 |
|
169 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_elementor_after_import' ), 20, 3 );
|
170 |
|
171 |
add_filter( 'plugin_action_links_kadence-starter-templates/kadence-starter-templates.php', array( $this, 'add_settings_link' ) );
|
172 |
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Set plugin constants.
|
176 |
+
*
|
177 |
+
* Path/URL to root of this plugin, with trailing slash and plugin version.
|
178 |
+
*/
|
179 |
+
private function set_plugin_constants() {
|
180 |
+
// Path/URL to root of this plugin, with trailing slash.
|
181 |
+
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_PATH' ) ) {
|
182 |
+
define( 'KADENCE_STARTER_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) );
|
183 |
+
}
|
184 |
+
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_URL' ) ) {
|
185 |
+
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
186 |
+
}
|
187 |
+
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
188 |
+
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.0' );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
/**
|
193 |
* Add a little css for submenu items.
|
194 |
*/
|
215 |
* @param array $selected_import the selected import.
|
216 |
*/
|
217 |
public function kadence_kadence_theme_after_import( $selected_import, $selected_palette, $selected_font ) {
|
218 |
+
if ( class_exists( 'woocommerce' ) && isset( $selected_import['ecommerce'] ) && $selected_import['ecommerce'] ) {
|
219 |
+
$this->import_demo_woocommerce();
|
220 |
+
}
|
221 |
+
if ( isset( $selected_import['menus'] ) && is_array( $selected_import['menus'] ) ) {
|
222 |
+
$menus_array = array();
|
223 |
+
foreach ( $selected_import['menus'] as $key => $value ) {
|
224 |
+
$menu = get_term_by( 'name', $value['title'], 'nav_menu' );
|
225 |
+
if ( $menu ) {
|
226 |
+
$menus_array[ $value['menu'] ] = $menu->term_id;
|
227 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
}
|
229 |
+
set_theme_mod( 'nav_menu_locations', $menus_array );
|
230 |
+
}
|
231 |
+
if ( isset( $selected_import['homepage'] ) && ! empty( $selected_import['homepage'] ) ) {
|
232 |
+
$homepage = get_page_by_title( $selected_import['homepage'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
if ( isset( $homepage ) && $homepage->ID ) {
|
234 |
update_option( 'show_on_front', 'page' );
|
235 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
236 |
}
|
237 |
+
}
|
238 |
+
if ( isset( $selected_import['blogpage'] ) && ! empty( $selected_import['blogpage'] ) ) {
|
239 |
+
$blogpage = get_page_by_title( $selected_import['blogpage'] );
|
240 |
+
if ( isset( $blogpage ) && $blogpage->ID ) {
|
241 |
+
update_option( 'page_for_posts', $blogpage->ID );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
|
|
243 |
}
|
244 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
245 |
$palette_presets = json_decode( '{"base":[{"color":"#2B6CB0"},{"color":"#265E9A"},{"color":"#222222"},{"color":"#3B3B3B"},{"color":"#515151"},{"color":"#626262"},{"color":"#E1E1E1"},{"color":"#F7F7F7"},{"color":"#ffffff"}],"bright":[{"color":"#255FDD"},{"color":"#00F2FF"},{"color":"#1A202C"},{"color":"#2D3748"},{"color":"#4A5568"},{"color":"#718096"},{"color":"#EDF2F7"},{"color":"#F7FAFC"},{"color":"#ffffff"}],"darkmode":[{"color":"#3296ff"},{"color":"#003174"},{"color":"#ffffff"},{"color":"#f7fafc"},{"color":"#edf2f7"},{"color":"#cbd2d9"},{"color":"#2d3748"},{"color":"#252c39"},{"color":"#1a202c"}],"orange":[{"color":"#e47b02"},{"color":"#ed8f0c"},{"color":"#1f2933"},{"color":"#3e4c59"},{"color":"#52606d"},{"color":"#7b8794"},{"color":"#f3f4f7"},{"color":"#f9f9fb"},{"color":"#ffffff"}],"pinkish":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#040037"},{"color":"#032075"},{"color":"#514d7c"},{"color":"#666699"},{"color":"#deddeb"},{"color":"#efeff5"},{"color":"#f8f9fa"}],"pinkishdark":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#f8f9fa"},{"color":"#efeff5"},{"color":"#deddeb"},{"color":"#c3c2d6"},{"color":"#514d7c"},{"color":"#221e5b"},{"color":"#040037"}],"green":[{"color":"#049f82"},{"color":"#008f72"},{"color":"#222222"},{"color":"#353535"},{"color":"#454545"},{"color":"#676767"},{"color":"#eeeeee"},{"color":"#f7f7f7"},{"color":"#ffffff"}],"fire":[{"color":"#dd6b20"},{"color":"#cf3033"},{"color":"#27241d"},{"color":"#423d33"},{"color":"#504a40"},{"color":"#625d52"},{"color":"#e8e6e1"},{"color":"#faf9f7"},{"color":"#ffffff"}],"mint":[{"color":"#2cb1bc"},{"color":"#13919b"},{"color":"#0f2a43"},{"color":"#133453"},{"color":"#587089"},{"color":"#829ab1"},{"color":"#e0fcff"},{"color":"#f5f7fa"},{"color":"#ffffff"}],"rich":[{"color":"#295CFF"},{"color":"#0E94FF"},{"color":"#1C0D5A"},{"color":"#3D3D3D"},{"color":"#57575D"},{"color":"#636363"},{"color":"#E1EBEE"},{"color":"#EFF7FB"},{"color":"#ffffff"}],"fem":[{"color":"#D86C97"},{"color":"#282828"},{"color":"#282828"},{"color":"#333333"},{"color":"#4d4d4d"},{"color":"#646464"},{"color":"#f7dede"},{"color":"#F6F2EF"},{"color":"#ffffff"}],"hot":[{"color":"#FF5698"},{"color":"#000000"},{"color":"#020202"},{"color":"#020202"},{"color":"#4E4E4E"},{"color":"#808080"},{"color":"#FDEDEC"},{"color":"#FDF6EE"},{"color":"#ffffff"}],"bold":[{"color":"#000000"},{"color":"#D1A155"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F6E7BC"},{"color":"#F9F7F7"},{"color":"#ffffff"}],"teal":[{"color":"#7ACFC4"},{"color":"#044355"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F5ECE5"},{"color":"#F9F7F7"},{"color":"#ffffff"}]}', true );
|
518 |
// Flush rules after install.
|
519 |
flush_rewrite_rules();
|
520 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
/**
|
522 |
* Throw error on object clone.
|
523 |
*
|
538 |
// Cloning instances of the class is forbidden.
|
539 |
_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of the class is forbidden.', 'kadence-starter-templates' ), '1.0' );
|
540 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
/**
|
542 |
* Include all plugin files.
|
543 |
*/
|
544 |
private function include_plugin_files() {
|
545 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-template-database-importer.php';
|
546 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-author-meta.php';
|
547 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-export-option.php';
|
548 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-plugin-check.php';
|
605 |
* Loads admin style sheets and scripts
|
606 |
*/
|
607 |
public function scripts() {
|
608 |
+
$plugins = array (
|
609 |
+
'woocommerce' => array(
|
610 |
+
'title' => 'Woocommerce',
|
611 |
+
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
612 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
),
|
614 |
+
'elementor' => array(
|
615 |
+
'title' => 'Elementor',
|
616 |
+
'state' => Plugin_Check::active_check( 'elementor/elementor.php' ),
|
617 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
),
|
619 |
+
'kadence-blocks' => array(
|
620 |
+
'title' => 'Kadence Blocks',
|
621 |
+
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
622 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
),
|
624 |
+
'kadence-blocks-pro' => array(
|
625 |
+
'title' => 'Kadence Block Pro',
|
626 |
+
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
627 |
+
'src' => 'bundle',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
),
|
629 |
+
'kadence-pro' => array(
|
630 |
+
'title' => 'Kadence Pro',
|
631 |
+
'state' => Plugin_Check::active_check( 'kadence-pro/kadence-pro.php' ),
|
632 |
+
'src' => 'bundle',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
),
|
634 |
+
'fluentform' => array(
|
635 |
+
'title' => 'Fluent Forms',
|
636 |
+
'src' => 'repo',
|
637 |
+
'state' => Plugin_Check::active_check( 'fluentform/fluentform.php' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
),
|
639 |
+
'wpzoom-recipe-card' => array(
|
640 |
+
'title' => 'Recipe Card Blocks by WPZOOM',
|
641 |
+
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
642 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
),
|
644 |
+
'learndash' => array(
|
645 |
+
'title' => 'LearnDash',
|
646 |
+
'state' => Plugin_Check::active_check( 'sfwd-lms/sfwd_lms.php' ),
|
647 |
+
'src' => 'thirdparty',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
),
|
649 |
+
'lifterlms' => array(
|
650 |
+
'title' => 'LifterLMS',
|
651 |
+
'state' => Plugin_Check::active_check( 'lifterlms/lifterlms.php' ),
|
652 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
),
|
654 |
+
'tutor' => array(
|
655 |
+
'title' => 'Tutor LMS',
|
656 |
+
'state' => Plugin_Check::active_check( 'tutor/tutor.php' ),
|
657 |
+
'src' => 'repo',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
),
|
659 |
);
|
660 |
$palettes = array(
|
868 |
array(
|
869 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
870 |
'ajax_nonce' => wp_create_nonce( 'kadence-ajax-verification' ),
|
|
|
871 |
'isKadence' => class_exists( 'Kadence\Theme' ),
|
872 |
+
'ctemplates' => apply_filters( 'kadence_custom_child_starter_templates_enable', false ),
|
873 |
+
'custom_icon' => apply_filters( 'kadence_custom_child_starter_templates_logo', '' ),
|
874 |
+
'custom_name' => apply_filters( 'kadence_custom_child_starter_templates_name', '' ),
|
875 |
+
'plugins' => apply_filters( 'kadence_starter_templates_plugins_array', $plugins ),
|
876 |
+
'palettes' => apply_filters( 'kadence_starter_templates_palettes_array', $palettes ),
|
877 |
+
'fonts' => apply_filters( 'kadence_starter_templates_fonts_array', $fonts ),
|
878 |
'logo' => esc_attr( KADENCE_STARTER_TEMPLATES_URL . 'assets/images/kadence_logo.png' ),
|
879 |
'has_content' => $has_content,
|
880 |
'has_previous' => $has_previous,
|
881 |
'starterSettings' => get_option( 'kadence_starter_templates_config' ),
|
882 |
+
'proData' => ( class_exists( 'Kadence_Theme_Pro' ) ? get_option( 'ktp_api_manager' ) : false ),
|
883 |
'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
|
884 |
'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
|
885 |
'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
|
886 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
887 |
'content_progress' => esc_html__( 'Importing Demo Content...', 'kadence-starter-templates' ),
|
888 |
'content_new_progress' => esc_html__( 'Importing Demo Content... Still Importing.', 'kadence-starter-templates' ),
|
889 |
+
'widgets_progress' => esc_html__( 'Importing Menus/Widgets...', 'kadence-starter-templates' ),
|
890 |
'customizer_progress' => esc_html__( 'Importing Customizer Settings...', 'kadence-starter-templates' ),
|
891 |
)
|
892 |
);
|
913 |
public function install_plugins_ajax_callback() {
|
914 |
Helpers::verify_ajax_call();
|
915 |
|
916 |
+
if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['selected'] ) || ! isset( $_POST['builder'] ) ) {
|
917 |
+
wp_send_json_error( 'Permissions Issue' );
|
918 |
}
|
919 |
// Get selected file index or set it to 0.
|
920 |
+
$selected_index = empty( $_POST['selected'] ) ? '' : sanitize_text_field( $_POST['selected'] );
|
921 |
+
$selected_builder = empty( $_POST['builder'] ) ? '' : sanitize_text_field( $_POST['builder'] );
|
922 |
+
if ( empty( $selected_index ) || empty( $selected_builder ) ) {
|
923 |
+
wp_send_json_error( 'Missing Parameters' );
|
924 |
+
}
|
925 |
+
if ( empty( $this->import_files ) || ( is_array( $this->import_files ) && ! isset( $this->import_files[ $selected_index ] ) ) ) {
|
926 |
+
$template_database = Template_Database_Importer::get_instance();
|
927 |
+
$this->import_files = $template_database->get_importer_files( $selected_index, $selected_builder );
|
928 |
+
}
|
929 |
+
if ( ! isset( $this->import_files[ $selected_index ] ) ) {
|
930 |
+
wp_send_json_error( 'Missing Template' );
|
931 |
+
}
|
932 |
$info = $this->import_files[ $selected_index ];
|
933 |
$install = true;
|
934 |
|
940 |
if ( ! class_exists( 'WP_Upgrader' ) ) {
|
941 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
942 |
}
|
943 |
+
$importer_plugins = array (
|
944 |
+
'woocommerce' => array(
|
945 |
+
'title' => 'Woocommerce',
|
946 |
+
'base' => 'woocommerce',
|
947 |
+
'slug' => 'woocommerce',
|
948 |
+
'path' => 'woocommerce/woocommerce.php',
|
949 |
+
'src' => 'repo',
|
950 |
+
),
|
951 |
+
'elementor' => array(
|
952 |
+
'title' => 'Elementor',
|
953 |
+
'base' => 'elementor',
|
954 |
+
'slug' => 'elementor',
|
955 |
+
'path' => 'elementor/elementor.php',
|
956 |
+
'src' => 'repo',
|
957 |
+
),
|
958 |
+
'kadence-blocks' => array(
|
959 |
+
'title' => 'Kadence Blocks',
|
960 |
+
'base' => 'kadence-blocks',
|
961 |
+
'slug' => 'kadence-blocks',
|
962 |
+
'path' => 'kadence-blocks/kadence-blocks.php',
|
963 |
+
'src' => 'repo',
|
964 |
+
),
|
965 |
+
'kadence-blocks-pro' => array(
|
966 |
+
'title' => 'Kadence Block Pro',
|
967 |
+
'base' => 'kadence-blocks-pro',
|
968 |
+
'slug' => 'kadence-blocks-pro',
|
969 |
+
'path' => 'kadence-blocks-pro/kadence-blocks-pro.php',
|
970 |
+
'src' => 'bundle',
|
971 |
+
),
|
972 |
+
'kadence-pro' => array(
|
973 |
+
'title' => 'Kadence Pro',
|
974 |
+
'base' => 'kadence-pro',
|
975 |
+
'slug' => 'kadence-pro',
|
976 |
+
'path' => 'kadence-pro/kadence-pro.php',
|
977 |
+
'src' => 'bundle',
|
978 |
+
),
|
979 |
+
'fluentform' => array(
|
980 |
+
'title' => 'Fluent Forms',
|
981 |
+
'src' => 'repo',
|
982 |
+
'base' => 'fluentform',
|
983 |
+
'slug' => 'fluentform',
|
984 |
+
'path' => 'fluentform/fluentform.php',
|
985 |
+
),
|
986 |
+
'wpzoom-recipe-card' => array(
|
987 |
+
'title' => 'Recipe Card Blocks by WPZOOM',
|
988 |
+
'base' => 'recipe-card-blocks-by-wpzoom',
|
989 |
+
'slug' => 'wpzoom-recipe-card',
|
990 |
+
'path' => 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php',
|
991 |
+
'src' => 'repo',
|
992 |
+
),
|
993 |
+
'learndash' => array(
|
994 |
+
'title' => 'LearnDash',
|
995 |
+
'base' => 'sfwd-lms',
|
996 |
+
'slug' => 'sfwd_lms',
|
997 |
+
'path' => 'sfwd-lms/sfwd_lms.php',
|
998 |
+
'src' => 'thirdparty',
|
999 |
+
),
|
1000 |
+
'lifterlms' => array(
|
1001 |
+
'title' => 'LifterLMS',
|
1002 |
+
'base' => 'lifterlms',
|
1003 |
+
'slug' => 'lifterlms',
|
1004 |
+
'path' => 'lifterlms/lifterlms.php',
|
1005 |
+
'src' => 'repo',
|
1006 |
+
),
|
1007 |
+
'tutor' => array(
|
1008 |
+
'title' => 'Tutor LMS',
|
1009 |
+
'base' => 'tutor',
|
1010 |
+
'slug' => 'tutor',
|
1011 |
+
'path' => 'tutor/tutor.php',
|
1012 |
+
'src' => 'repo',
|
1013 |
+
),
|
1014 |
+
);
|
1015 |
+
foreach( $info['plugins'] as $plugin ) {
|
1016 |
+
if ( isset( $importer_plugins[ $plugin ] ) ) {
|
1017 |
+
$state = Plugin_Check::active_check( $importer_plugins[ $plugin ]['path'] );
|
1018 |
+
if ( 'woocommerce' === $plugin && empty( get_option( 'woocommerce_db_version' ) ) ) {
|
1019 |
+
update_option( 'woocommerce_db_version', '4.0' );
|
1020 |
+
}
|
1021 |
+
if ( 'notactive' === $state && 'repo' === $importer_plugins[ $plugin ]['src'] ) {
|
1022 |
+
$api = plugins_api(
|
1023 |
+
'plugin_information',
|
1024 |
+
array(
|
1025 |
+
'slug' => $importer_plugins[ $plugin ]['base'],
|
1026 |
+
'fields' => array(
|
1027 |
+
'short_description' => false,
|
1028 |
+
'sections' => false,
|
1029 |
+
'requires' => false,
|
1030 |
+
'rating' => false,
|
1031 |
+
'ratings' => false,
|
1032 |
+
'downloaded' => false,
|
1033 |
+
'last_updated' => false,
|
1034 |
+
'added' => false,
|
1035 |
+
'tags' => false,
|
1036 |
+
'compatibility' => false,
|
1037 |
+
'homepage' => false,
|
1038 |
+
'donate_link' => false,
|
1039 |
+
),
|
1040 |
+
)
|
1041 |
+
);
|
1042 |
+
if ( ! is_wp_error( $api ) ) {
|
1043 |
+
|
1044 |
+
// Use AJAX upgrader skin instead of plugin installer skin.
|
1045 |
+
// ref: function wp_ajax_install_plugin().
|
1046 |
+
$upgrader = new \Plugin_Upgrader( new \WP_Ajax_Upgrader_Skin() );
|
1047 |
+
|
1048 |
+
$installed = $upgrader->install( $api->download_link );
|
1049 |
+
if ( $installed ) {
|
1050 |
+
$activate = activate_plugin( $importer_plugins[ $plugin ]['path'], '', false, true );
|
1051 |
+
if ( is_wp_error( $activate ) ) {
|
1052 |
+
$install = false;
|
1053 |
+
}
|
1054 |
+
} else {
|
1055 |
$install = false;
|
1056 |
}
|
1057 |
} else {
|
1058 |
$install = false;
|
1059 |
}
|
1060 |
+
} elseif ( 'installed' === $state ) {
|
1061 |
+
$activate = activate_plugin( $importer_plugins[ $plugin ]['path'], '', false, true );
|
1062 |
+
if ( is_wp_error( $activate ) ) {
|
1063 |
+
$install = false;
|
1064 |
+
}
|
1065 |
}
|
1066 |
+
if ( $plugin === 'kadence-pro' ) {
|
1067 |
+
$enabled = json_decode( get_option( 'kadence_pro_theme_config' ), true );
|
1068 |
+
$enabled['elements'] = true;
|
1069 |
+
$enabled['header_addons'] = true;
|
1070 |
+
$enabled['mega_menu'] = true;
|
1071 |
+
$enabled = json_encode( $enabled );
|
1072 |
+
update_option( 'kadence_pro_theme_config', $enabled );
|
1073 |
}
|
1074 |
}
|
1075 |
}
|
1148 |
}
|
1149 |
// Get selected file index or set it to 0.
|
1150 |
$this->selected_index = empty( $_POST['selected'] ) ? '' : sanitize_text_field( $_POST['selected'] );
|
1151 |
+
$this->selected_builder = empty( $_POST['builder'] ) ? 'blocks' : sanitize_text_field( $_POST['builder'] );
|
1152 |
$this->selected_page = empty( $_POST['page_id'] ) ? '' : sanitize_text_field( $_POST['page_id'] );
|
1153 |
$this->override_colors = 'true' === $_POST['override_colors'] ? true : false;
|
1154 |
$this->override_fonts = 'true' === $_POST['override_fonts'] ? true : false;
|
1155 |
$this->selected_palette = empty( $_POST['palette'] ) ? '' : sanitize_text_field( $_POST['palette'] );
|
1156 |
$this->selected_font = empty( $_POST['font'] ) ? '' : sanitize_text_field( $_POST['font'] );
|
1157 |
+
|
1158 |
+
if ( empty( $this->import_files ) || ( is_array( $this->import_files ) && ! isset( $this->import_files[ $this->selected_index ] ) ) ) {
|
1159 |
+
$template_database = Template_Database_Importer::get_instance();
|
1160 |
+
$this->import_files = $template_database->get_importer_files( $this->selected_index, $this->selected_builder );
|
1161 |
+
}
|
1162 |
+
if ( ! isset( $this->import_files[ $this->selected_index ] ) ) {
|
1163 |
+
wp_send_json_error();
|
1164 |
+
}
|
1165 |
/**
|
1166 |
* 1). Prepare import files.
|
1167 |
* Predefined import files via filter: kadence-starter-templates/import_files
|
1185 |
$log_added = Helpers::append_to_file(
|
1186 |
sprintf(
|
1187 |
__( 'The import files for: %s were successfully downloaded!', 'kadence-starter-templates' ),
|
1188 |
+
$this->import_files[ $this->selected_index ]['slug']
|
1189 |
) . Helpers::import_file_info( $this->selected_import_files ),
|
1190 |
$this->log_file_path,
|
1191 |
esc_html__( 'Downloaded files' , 'kadence-starter-templates' )
|
1220 |
if ( ! empty( $this->selected_import_files['content'] ) ) {
|
1221 |
$meta = ( ! empty( $this->import_files[ $this->selected_index ] ) && ! empty( $this->selected_page ) && isset( $this->import_files[ $this->selected_index ]['pages'] ) && isset( $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ] ) && isset( $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ]['meta'] ) ? $this->import_files[ $this->selected_index ]['pages'][ $this->selected_page ]['meta'] : 'inherit' );
|
1222 |
$logger = $this->importer->import_content( $this->selected_import_files['content'], true, $meta );
|
1223 |
+
if ( is_object( $logger ) && property_exists($logger, 'error_output') && $logger->error_output ) {
|
1224 |
$this->append_to_frontend_error_messages( $logger->error_output );
|
1225 |
} elseif ( is_object( $logger ) && $logger->messages ) {
|
1226 |
$messages = $logger->messages;
|
1546 |
$this->selected_index = empty( $_POST['selected'] ) ? '' : sanitize_text_field( $_POST['selected'] );
|
1547 |
$this->selected_palette = empty( $_POST['palette'] ) ? '' : sanitize_text_field( $_POST['palette'] );
|
1548 |
$this->selected_font = empty( $_POST['font'] ) ? '' : sanitize_text_field( $_POST['font'] );
|
1549 |
+
$this->selected_builder = empty( $_POST['builder'] ) ? 'blocks' : sanitize_text_field( $_POST['builder'] );
|
1550 |
+
|
1551 |
+
if ( empty( $this->import_files ) || ( is_array( $this->import_files ) && ! isset( $this->import_files[ $this->selected_index ] ) ) ) {
|
1552 |
+
$template_database = Template_Database_Importer::get_instance();
|
1553 |
+
$this->import_files = $template_database->get_importer_files( $this->selected_index, $this->selected_builder );
|
1554 |
+
}
|
1555 |
+
if ( ! isset( $this->import_files[ $this->selected_index ] ) ) {
|
1556 |
+
// Send JSON Error response to the AJAX call.
|
1557 |
+
wp_send_json( esc_html__( 'No import files specified!', 'kadence-starter-templates' ) );
|
1558 |
+
}
|
1559 |
/**
|
1560 |
* 1). Prepare import files.
|
1561 |
* Predefined import files via filter: kadence-starter-templates/import_files
|
1579 |
$log_added = Helpers::append_to_file(
|
1580 |
sprintf(
|
1581 |
__( 'The import files for: %s were successfully downloaded!', 'kadence-starter-templates' ),
|
1582 |
+
$this->import_files[ $this->selected_index ]['slug']
|
1583 |
) . Helpers::import_file_info( $this->selected_import_files ),
|
1584 |
$this->log_file_path,
|
1585 |
esc_html__( 'Downloaded files' , 'kadence-starter-templates' )
|
1688 |
$component->elementor_add_theme_colors();
|
1689 |
}
|
1690 |
}
|
1691 |
+
if ( isset( $selected_import['content_width'] ) && 'large' === $selected_import['content_width'] ) {
|
1692 |
$container_width = array(
|
1693 |
'unit' => 'px',
|
1694 |
'size' => 1242,
|
1938 |
return;
|
1939 |
}
|
1940 |
// Get info of import data files and filter it.
|
1941 |
+
//$this->import_files = apply_filters( 'kadence-starter-templates/import_files', array() );
|
1942 |
+
$this->import_files = '';
|
1943 |
//$this->import_files = Helpers::validate_import_file_info( apply_filters( 'kadence-starter-templates/import_files', array() ) );
|
1944 |
/**
|
1945 |
* Register all default actions (before content import, widget, customizer import and other actions)
|
inc/class-downloader.php
CHANGED
@@ -55,7 +55,7 @@ class Downloader {
|
|
55 |
if ( empty( $url ) ) {
|
56 |
return new \WP_Error(
|
57 |
'missing_url',
|
58 |
-
__( 'Missing URL for downloading a file!', '
|
59 |
);
|
60 |
}
|
61 |
|
@@ -73,7 +73,7 @@ class Downloader {
|
|
73 |
return new \WP_Error(
|
74 |
'download_error',
|
75 |
sprintf(
|
76 |
-
__( 'An error occurred while fetching file from: %1$s%2$s%3$s!%4$sReason: %5$s - %6$s.', '
|
77 |
'<strong>',
|
78 |
$url,
|
79 |
'</strong>',
|
@@ -102,8 +102,7 @@ class Downloader {
|
|
102 |
if ( is_array( $response ) ) {
|
103 |
$response_error['error_code'] = $response['response']['code'];
|
104 |
$response_error['error_message'] = $response['response']['message'];
|
105 |
-
}
|
106 |
-
else {
|
107 |
$response_error['error_code'] = $response->get_error_code();
|
108 |
$response_error['error_message'] = $response->get_error_message();
|
109 |
}
|
@@ -129,8 +128,7 @@ class Downloader {
|
|
129 |
public function set_download_directory_path( $download_directory_path ) {
|
130 |
if ( file_exists( $download_directory_path ) ) {
|
131 |
$this->download_directory_path = $download_directory_path;
|
132 |
-
}
|
133 |
-
else {
|
134 |
$upload_dir = wp_upload_dir();
|
135 |
$this->download_directory_path = apply_filters( 'kadence-starter-templates/upload_file_path', trailingslashit( $upload_dir['path'] ) );
|
136 |
}
|
55 |
if ( empty( $url ) ) {
|
56 |
return new \WP_Error(
|
57 |
'missing_url',
|
58 |
+
__( 'Missing URL for downloading a file!', 'kadence-starter-templates' )
|
59 |
);
|
60 |
}
|
61 |
|
73 |
return new \WP_Error(
|
74 |
'download_error',
|
75 |
sprintf(
|
76 |
+
__( 'An error occurred while fetching file from: %1$s%2$s%3$s!%4$sReason: %5$s - %6$s.', 'kadence-starter-templates' ),
|
77 |
'<strong>',
|
78 |
$url,
|
79 |
'</strong>',
|
102 |
if ( is_array( $response ) ) {
|
103 |
$response_error['error_code'] = $response['response']['code'];
|
104 |
$response_error['error_message'] = $response['response']['message'];
|
105 |
+
} else {
|
|
|
106 |
$response_error['error_code'] = $response->get_error_code();
|
107 |
$response_error['error_message'] = $response->get_error_message();
|
108 |
}
|
128 |
public function set_download_directory_path( $download_directory_path ) {
|
129 |
if ( file_exists( $download_directory_path ) ) {
|
130 |
$this->download_directory_path = $download_directory_path;
|
131 |
+
} else {
|
|
|
132 |
$upload_dir = wp_upload_dir();
|
133 |
$this->download_directory_path = apply_filters( 'kadence-starter-templates/upload_file_path', trailingslashit( $upload_dir['path'] ) );
|
134 |
}
|
inc/class-helpers.php
CHANGED
@@ -44,7 +44,7 @@ class Helpers {
|
|
44 |
* @return boolean
|
45 |
*/
|
46 |
private static function is_import_file_info_format_correct( $import_file_info ) {
|
47 |
-
if ( empty( $import_file_info['
|
48 |
return false;
|
49 |
}
|
50 |
|
@@ -76,12 +76,12 @@ class Helpers {
|
|
76 |
}
|
77 |
// ----- Set customizer file path -----
|
78 |
// Get customizer import file as well. If defined!
|
79 |
-
if ( ! empty( $import_file_info['
|
80 |
// Setup filename path to save the customizer content.
|
81 |
$customizer_filename = apply_filters( 'kaence-starter-templates/downloaded_customizer_file_prefix', 'demo-customizer-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_customizer_file_suffix_and_file_extension', '.dat' );
|
82 |
|
83 |
// Download the customizer import file.
|
84 |
-
$downloaded_files['customizer'] = $downloader->download_file( $import_file_info['
|
85 |
|
86 |
// Return from this function if there was an error.
|
87 |
if ( is_wp_error( $downloaded_files['customizer'] ) ) {
|
@@ -109,17 +109,17 @@ class Helpers {
|
|
109 |
$downloader = new Downloader();
|
110 |
|
111 |
// ----- Set content file path -----
|
112 |
-
// Check if '
|
113 |
-
if ( empty( $import_file_info['
|
114 |
-
if ( file_exists( $import_file_info['
|
115 |
-
$downloaded_files['content'] = $import_file_info['
|
116 |
}
|
117 |
} else {
|
118 |
// Set the filename string for content import file.
|
119 |
$content_filename = apply_filters( 'kaence-starter-templates/downloaded_content_file_prefix', 'demo-content-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_content_file_suffix_and_file_extension', '.xml' );
|
120 |
|
121 |
// Download the content import file.
|
122 |
-
$downloaded_files['content'] = $downloader->download_file( $import_file_info['
|
123 |
|
124 |
// Return from this function if there was an error.
|
125 |
if ( is_wp_error( $downloaded_files['content'] ) ) {
|
@@ -129,57 +129,57 @@ class Helpers {
|
|
129 |
|
130 |
// ----- Set widget file path -----
|
131 |
// Get widgets file as well. If defined!
|
132 |
-
if ( ! empty( $import_file_info['
|
133 |
// Set the filename string for widgets import file.
|
134 |
$widget_filename = apply_filters( 'kaence-starter-templates/downloaded_widgets_file_prefix', 'demo-widgets-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_widgets_file_suffix_and_file_extension', '.json' );
|
135 |
|
136 |
// Download the widgets import file.
|
137 |
-
$downloaded_files['widgets'] = $downloader->download_file( $import_file_info['
|
138 |
|
139 |
// Return from this function if there was an error.
|
140 |
if ( is_wp_error( $downloaded_files['widgets'] ) ) {
|
141 |
return $downloaded_files['widgets'];
|
142 |
}
|
143 |
-
} else if ( ! empty( $import_file_info['
|
144 |
-
if ( file_exists( $import_file_info['
|
145 |
-
$downloaded_files['widgets'] = $import_file_info['
|
146 |
}
|
147 |
}
|
148 |
|
149 |
// ----- Set customizer file path -----
|
150 |
// Get customizer import file as well. If defined!
|
151 |
-
if ( ! empty( $import_file_info['
|
152 |
// Setup filename path to save the customizer content.
|
153 |
$customizer_filename = apply_filters( 'kaence-starter-templates/downloaded_customizer_file_prefix', 'demo-customizer-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_customizer_file_suffix_and_file_extension', '.dat' );
|
154 |
|
155 |
// Download the customizer import file.
|
156 |
-
$downloaded_files['customizer'] = $downloader->download_file( $import_file_info['
|
157 |
|
158 |
// Return from this function if there was an error.
|
159 |
if ( is_wp_error( $downloaded_files['customizer'] ) ) {
|
160 |
return $downloaded_files['customizer'];
|
161 |
}
|
162 |
-
} else if ( ! empty( $import_file_info['
|
163 |
-
if ( file_exists( $import_file_info['
|
164 |
-
$downloaded_files['customizer'] = $import_file_info['
|
165 |
}
|
166 |
}
|
167 |
// ----- Set form file path -----
|
168 |
// Get form file as well. If defined!
|
169 |
-
if ( ! empty( $import_file_info['
|
170 |
// Set the filename string for form import file.
|
171 |
$form_filename = apply_filters( 'kaence-starter-templates/downloaded_forms_file_prefix', 'demo-forms-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_form_file_suffix_and_file_extension', '.json' );
|
172 |
|
173 |
// Download the form import file.
|
174 |
-
$downloaded_files['forms'] = $downloader->download_file( $import_file_info['
|
175 |
|
176 |
// Return from this function if there was an error.
|
177 |
if ( is_wp_error( $downloaded_files['forms'] ) ) {
|
178 |
return $downloaded_files['forms'];
|
179 |
}
|
180 |
-
} else if ( ! empty( $import_file_info['
|
181 |
-
if ( file_exists( $import_file_info['
|
182 |
-
$downloaded_files['forms'] = $import_file_info['
|
183 |
}
|
184 |
}
|
185 |
|
44 |
* @return boolean
|
45 |
*/
|
46 |
private static function is_import_file_info_format_correct( $import_file_info ) {
|
47 |
+
if ( empty( $import_file_info['slug'] ) ) {
|
48 |
return false;
|
49 |
}
|
50 |
|
76 |
}
|
77 |
// ----- Set customizer file path -----
|
78 |
// Get customizer import file as well. If defined!
|
79 |
+
if ( ! empty( $import_file_info['theme_options'] ) ) {
|
80 |
// Setup filename path to save the customizer content.
|
81 |
$customizer_filename = apply_filters( 'kaence-starter-templates/downloaded_customizer_file_prefix', 'demo-customizer-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_customizer_file_suffix_and_file_extension', '.dat' );
|
82 |
|
83 |
// Download the customizer import file.
|
84 |
+
$downloaded_files['customizer'] = $downloader->download_file( $import_file_info['theme_options'], $customizer_filename );
|
85 |
|
86 |
// Return from this function if there was an error.
|
87 |
if ( is_wp_error( $downloaded_files['customizer'] ) ) {
|
109 |
$downloader = new Downloader();
|
110 |
|
111 |
// ----- Set content file path -----
|
112 |
+
// Check if 'content' is not defined. That would mean a local file.
|
113 |
+
if ( empty( $import_file_info['content'] ) ) {
|
114 |
+
if ( file_exists( $import_file_info['local_content'] ) ) {
|
115 |
+
$downloaded_files['content'] = $import_file_info['local_content'];
|
116 |
}
|
117 |
} else {
|
118 |
// Set the filename string for content import file.
|
119 |
$content_filename = apply_filters( 'kaence-starter-templates/downloaded_content_file_prefix', 'demo-content-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_content_file_suffix_and_file_extension', '.xml' );
|
120 |
|
121 |
// Download the content import file.
|
122 |
+
$downloaded_files['content'] = $downloader->download_file( $import_file_info['content'], $content_filename );
|
123 |
|
124 |
// Return from this function if there was an error.
|
125 |
if ( is_wp_error( $downloaded_files['content'] ) ) {
|
129 |
|
130 |
// ----- Set widget file path -----
|
131 |
// Get widgets file as well. If defined!
|
132 |
+
if ( ! empty( $import_file_info['widget_data'] ) ) {
|
133 |
// Set the filename string for widgets import file.
|
134 |
$widget_filename = apply_filters( 'kaence-starter-templates/downloaded_widgets_file_prefix', 'demo-widgets-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_widgets_file_suffix_and_file_extension', '.json' );
|
135 |
|
136 |
// Download the widgets import file.
|
137 |
+
$downloaded_files['widgets'] = $downloader->download_file( $import_file_info['widget_data'], $widget_filename );
|
138 |
|
139 |
// Return from this function if there was an error.
|
140 |
if ( is_wp_error( $downloaded_files['widgets'] ) ) {
|
141 |
return $downloaded_files['widgets'];
|
142 |
}
|
143 |
+
} else if ( ! empty( $import_file_info['local_widget_data'] ) ) {
|
144 |
+
if ( file_exists( $import_file_info['local_widget_data'] ) ) {
|
145 |
+
$downloaded_files['widgets'] = $import_file_info['local_widget_data'];
|
146 |
}
|
147 |
}
|
148 |
|
149 |
// ----- Set customizer file path -----
|
150 |
// Get customizer import file as well. If defined!
|
151 |
+
if ( ! empty( $import_file_info['theme_options'] ) ) {
|
152 |
// Setup filename path to save the customizer content.
|
153 |
$customizer_filename = apply_filters( 'kaence-starter-templates/downloaded_customizer_file_prefix', 'demo-customizer-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_customizer_file_suffix_and_file_extension', '.dat' );
|
154 |
|
155 |
// Download the customizer import file.
|
156 |
+
$downloaded_files['customizer'] = $downloader->download_file( $import_file_info['theme_options'], $customizer_filename );
|
157 |
|
158 |
// Return from this function if there was an error.
|
159 |
if ( is_wp_error( $downloaded_files['customizer'] ) ) {
|
160 |
return $downloaded_files['customizer'];
|
161 |
}
|
162 |
+
} else if ( ! empty( $import_file_info['local_theme_options'] ) ) {
|
163 |
+
if ( file_exists( $import_file_info['local_theme_options'] ) ) {
|
164 |
+
$downloaded_files['customizer'] = $import_file_info['local_theme_options'];
|
165 |
}
|
166 |
}
|
167 |
// ----- Set form file path -----
|
168 |
// Get form file as well. If defined!
|
169 |
+
if ( ! empty( $import_file_info['form_data'] ) ) {
|
170 |
// Set the filename string for form import file.
|
171 |
$form_filename = apply_filters( 'kaence-starter-templates/downloaded_forms_file_prefix', 'demo-forms-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_form_file_suffix_and_file_extension', '.json' );
|
172 |
|
173 |
// Download the form import file.
|
174 |
+
$downloaded_files['forms'] = $downloader->download_file( $import_file_info['form_data'], $form_filename );
|
175 |
|
176 |
// Return from this function if there was an error.
|
177 |
if ( is_wp_error( $downloaded_files['forms'] ) ) {
|
178 |
return $downloaded_files['forms'];
|
179 |
}
|
180 |
+
} else if ( ! empty( $import_file_info['local_form_data'] ) ) {
|
181 |
+
if ( file_exists( $import_file_info['local_form_data'] ) ) {
|
182 |
+
$downloaded_files['forms'] = $import_file_info['local_form_data'];
|
183 |
}
|
184 |
}
|
185 |
|
inc/class-import-actions.php
CHANGED
@@ -136,10 +136,8 @@ class ImportActions {
|
|
136 |
*/
|
137 |
public function before_content_import_reset_setting( $selected_import_files, $import_files, $selected_index, $selected_palette, $selected_font ) {
|
138 |
|
139 |
-
|
140 |
|
141 |
-
if ( $old_data && ! empty( $old_data ) ) {
|
142 |
-
}
|
143 |
}
|
144 |
/**
|
145 |
* Execute the action: 'kadence-starter-templates/before_content_import'.
|
136 |
*/
|
137 |
public function before_content_import_reset_setting( $selected_import_files, $import_files, $selected_index, $selected_palette, $selected_font ) {
|
138 |
|
139 |
+
//$old_data = get_option( '_kadence_starter_templates_last_import_data', array() );
|
140 |
|
|
|
|
|
141 |
}
|
142 |
/**
|
143 |
* Execute the action: 'kadence-starter-templates/before_content_import'.
|
inc/class-importer.php
CHANGED
@@ -172,6 +172,7 @@ class Importer {
|
|
172 |
add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
|
173 |
// Check, if we need to send another AJAX request and set the importing author to the current user.
|
174 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'new_ajax_request_maybe' ) );
|
|
|
175 |
}
|
176 |
|
177 |
// Disables generation of multiple image sizes (thumbnails) in the content import step.
|
@@ -213,7 +214,35 @@ class Importer {
|
|
213 |
}
|
214 |
}
|
215 |
}
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
/**
|
218 |
* Run elementor Import.
|
219 |
*
|
@@ -377,7 +406,6 @@ class Importer {
|
|
377 |
if ( isset( $data['post_content'] ) && ! empty( $data['post_content'] ) ) {
|
378 |
|
379 |
$images = $this->find_all_image_urls( stripslashes( $data['post_content'] ) );
|
380 |
-
|
381 |
if ( count( $images ) == 0 ) {
|
382 |
return $data;
|
383 |
}
|
172 |
add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
|
173 |
// Check, if we need to send another AJAX request and set the importing author to the current user.
|
174 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'new_ajax_request_maybe' ) );
|
175 |
+
//add_filter( 'wxr_importer.processed.post', array( $this, 'process_kadence_galleries' ), 10, 5 );
|
176 |
}
|
177 |
|
178 |
// Disables generation of multiple image sizes (thumbnails) in the content import step.
|
214 |
}
|
215 |
}
|
216 |
}
|
217 |
+
/**
|
218 |
+
* Process Gallery Block
|
219 |
+
*
|
220 |
+
* @param int $post_id New post ID.
|
221 |
+
* @param array $data Raw data imported for the post.
|
222 |
+
* @param array $meta Raw meta data, already processed by {@see process_post_meta}.
|
223 |
+
* @param array $comments Raw comment data, already processed by {@see process_comments}.
|
224 |
+
* @param array $terms Raw term data, already processed.
|
225 |
+
*/
|
226 |
+
public function process_kadence_galleries( $post_id, $data, $meta, $comments, $terms ) {
|
227 |
+
$meta_data = wp_list_pluck( $meta, 'key' );
|
228 |
+
if ( in_array( '_elementor_data', $meta_data, true ) ) {
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
$content_post = get_post( $post_id );
|
232 |
+
if ( $content_post ) {
|
233 |
+
$content = $content_post->post_content;
|
234 |
+
$images = $this->find_all_image_urls( $content );
|
235 |
+
if ( count( $images ) == 0 ) {
|
236 |
+
return $data;
|
237 |
+
}
|
238 |
+
foreach ( $images as $image ) {
|
239 |
+
if ( ! empty( $image['url'] ) ) {
|
240 |
+
$this->replace_image_urls( $meta_item['value'] );
|
241 |
+
//error_log( print_r( $images, true ) );
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
/**
|
247 |
* Run elementor Import.
|
248 |
*
|
406 |
if ( isset( $data['post_content'] ) && ! empty( $data['post_content'] ) ) {
|
407 |
|
408 |
$images = $this->find_all_image_urls( stripslashes( $data['post_content'] ) );
|
|
|
409 |
if ( count( $images ) == 0 ) {
|
410 |
return $data;
|
411 |
}
|
inc/class-template-database-importer.php
ADDED
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for pulling in template database and saving locally
|
4 |
+
* Based on a package from the WPTT Team for local fonts.
|
5 |
+
*
|
6 |
+
* @package Kadence Starter Templates
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace Kadence_Starter_Templates;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class for pulling in template database and saving locally
|
13 |
+
*/
|
14 |
+
class Template_Database_Importer {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Instance of this class
|
18 |
+
*
|
19 |
+
* @var null
|
20 |
+
*/
|
21 |
+
private static $instance = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* API key for kadence membership
|
25 |
+
*
|
26 |
+
* @var null
|
27 |
+
*/
|
28 |
+
private static $api_key = '';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* API email for kadence membership
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private static $api_email = '';
|
36 |
+
/**
|
37 |
+
* API email for kadence membership
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private static $template_type = 'blocks';
|
42 |
+
/**
|
43 |
+
* Base URL.
|
44 |
+
*
|
45 |
+
* @access protected
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
protected $base_url;
|
49 |
+
/**
|
50 |
+
* Base path.
|
51 |
+
*
|
52 |
+
* @access protected
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
protected $base_path;
|
56 |
+
/**
|
57 |
+
* Subfolder name.
|
58 |
+
*
|
59 |
+
* @access protected
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $subfolder_name;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* The starter templates folder.
|
66 |
+
*
|
67 |
+
* @access protected
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
protected $starter_templates_folder;
|
71 |
+
/**
|
72 |
+
* The local stylesheet's path.
|
73 |
+
*
|
74 |
+
* @access protected
|
75 |
+
* @var string
|
76 |
+
*/
|
77 |
+
protected $local_template_data_path;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* The local stylesheet's URL.
|
81 |
+
*
|
82 |
+
* @access protected
|
83 |
+
* @var string
|
84 |
+
*/
|
85 |
+
protected $local_template_data_url;
|
86 |
+
/**
|
87 |
+
* The remote URL.
|
88 |
+
*
|
89 |
+
* @access protected
|
90 |
+
* @var string
|
91 |
+
*/
|
92 |
+
protected $remote_url = 'https://api.startertemplatecloud.com/wp-json/kadence-starter/v1/get/';
|
93 |
+
|
94 |
+
/**
|
95 |
+
* The final data.
|
96 |
+
*
|
97 |
+
* @access protected
|
98 |
+
* @var string
|
99 |
+
*/
|
100 |
+
protected $data;
|
101 |
+
/**
|
102 |
+
* Cleanup routine frequency.
|
103 |
+
*/
|
104 |
+
const CLEANUP_FREQUENCY = 'monthly';
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Instance Control
|
108 |
+
*/
|
109 |
+
public static function get_instance() {
|
110 |
+
if ( is_null( self::$instance ) ) {
|
111 |
+
self::$instance = new self();
|
112 |
+
}
|
113 |
+
return self::$instance;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Constructor.
|
118 |
+
*/
|
119 |
+
public function __construct() {
|
120 |
+
if ( is_admin() ) {
|
121 |
+
// Ajax Calls.
|
122 |
+
add_action( 'wp_ajax_kadence_import_get_template_data', array( $this, 'template_data_ajax_callback' ) );
|
123 |
+
add_action( 'wp_ajax_kadence_import_reload_template_data', array( $this, 'template_data_reload_ajax_callback' ) );
|
124 |
+
}
|
125 |
+
|
126 |
+
// Add a cleanup routine.
|
127 |
+
$this->schedule_cleanup();
|
128 |
+
add_action( 'delete_starter_templates_folder', array( $this, 'delete_starter_templates_folder' ) );
|
129 |
+
}
|
130 |
+
/**
|
131 |
+
* Get the local data file if there, else query the api.
|
132 |
+
*
|
133 |
+
* @access public
|
134 |
+
* @return string
|
135 |
+
*/
|
136 |
+
public function get_template_data( $skip_local = false ) {
|
137 |
+
if ( 'custom' === $this->template_type ) {
|
138 |
+
return wp_json_encode( apply_filters( 'kadence_starter_templates_custom_array', array() ) );
|
139 |
+
}
|
140 |
+
// Check if the local data file exists. (true means the file doesn't exist).
|
141 |
+
if ( $skip_local || $this->local_file_exists() ) {
|
142 |
+
// Attempt to create the file.
|
143 |
+
if ( $this->create_template_data_file( $skip_local ) ) {
|
144 |
+
return $this->get_local_template_data_contents();
|
145 |
+
}
|
146 |
+
}
|
147 |
+
if ( '[]' === $this->get_local_template_data_contents() ) {
|
148 |
+
if ( $this->create_template_data_file( $skip_local ) ) {
|
149 |
+
return $this->get_local_template_data_contents();
|
150 |
+
}
|
151 |
+
}
|
152 |
+
// If the local file exists, return it's data.
|
153 |
+
return file_exists( $this->get_local_template_data_path() )
|
154 |
+
? $this->get_local_template_data_contents()
|
155 |
+
: '';
|
156 |
+
}
|
157 |
+
/**
|
158 |
+
* Write the data to the filesystem.
|
159 |
+
*
|
160 |
+
* @access protected
|
161 |
+
* @return string|false Returns the absolute path of the file on success, or false on fail.
|
162 |
+
*/
|
163 |
+
protected function create_template_data_file( $skip_local ) {
|
164 |
+
$file_path = $this->get_local_template_data_path();
|
165 |
+
$filesystem = $this->get_filesystem();
|
166 |
+
|
167 |
+
// If the folder doesn't exist, create it.
|
168 |
+
if ( ! file_exists( $this->get_starter_templates_folder() ) ) {
|
169 |
+
$this->get_filesystem()->mkdir( $this->get_starter_templates_folder(), FS_CHMOD_DIR );
|
170 |
+
}
|
171 |
+
|
172 |
+
// If the file doesn't exist, create it. Return false if it can not be created.
|
173 |
+
if ( ! $filesystem->exists( $file_path ) && ! $filesystem->touch( $file_path ) ) {
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
// If we got this far, we need to write the file.
|
178 |
+
// Get the data.
|
179 |
+
if ( $skip_local || ! $this->data ) {
|
180 |
+
$this->get_data();
|
181 |
+
}
|
182 |
+
|
183 |
+
// Put the contents in the file. Return false if that fails.
|
184 |
+
if ( ! $filesystem->put_contents( $file_path, $this->data ) ) {
|
185 |
+
return false;
|
186 |
+
}
|
187 |
+
|
188 |
+
return $file_path;
|
189 |
+
}
|
190 |
+
/**
|
191 |
+
* Get data.
|
192 |
+
*
|
193 |
+
* @access public
|
194 |
+
* @return string
|
195 |
+
*/
|
196 |
+
public function get_data() {
|
197 |
+
// Get the remote URL contents.
|
198 |
+
$this->data = $this->get_remote_url_contents();
|
199 |
+
|
200 |
+
return $this->data;
|
201 |
+
}
|
202 |
+
/**
|
203 |
+
* Get local data contents.
|
204 |
+
*
|
205 |
+
* @access public
|
206 |
+
* @return string|false Returns the data contents.
|
207 |
+
*/
|
208 |
+
public function get_local_template_data_contents() {
|
209 |
+
$local_path = $this->get_local_template_data_path();
|
210 |
+
|
211 |
+
// Check if the local stylesheet exists. (true means the file doesn't exist).
|
212 |
+
if ( $this->local_file_exists() ) {
|
213 |
+
return false;
|
214 |
+
}
|
215 |
+
|
216 |
+
ob_start();
|
217 |
+
include $local_path;
|
218 |
+
return ob_get_clean();
|
219 |
+
}
|
220 |
+
/**
|
221 |
+
* Get remote file contents.
|
222 |
+
*
|
223 |
+
* @access public
|
224 |
+
* @return string Returns the remote URL contents.
|
225 |
+
*/
|
226 |
+
public function get_remote_url_contents() {
|
227 |
+
$args = array(
|
228 |
+
'request' => $this->template_type,
|
229 |
+
'api_email' => $this->api_email,
|
230 |
+
'api_key' => $this->api_key,
|
231 |
+
);
|
232 |
+
// Get the response.
|
233 |
+
$api_url = add_query_arg( $args, $this->remote_url );
|
234 |
+
$response = wp_remote_get( $api_url );
|
235 |
+
// Early exit if there was an error.
|
236 |
+
if ( is_wp_error( $response ) ) {
|
237 |
+
return '';
|
238 |
+
}
|
239 |
+
|
240 |
+
// Get the CSS from our response.
|
241 |
+
$contents = wp_remote_retrieve_body( $response );
|
242 |
+
|
243 |
+
// Early exit if there was an error.
|
244 |
+
if ( is_wp_error( $contents ) ) {
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
|
248 |
+
return $contents;
|
249 |
+
}
|
250 |
+
/**
|
251 |
+
* Check if the local file exists.
|
252 |
+
*
|
253 |
+
* @access public
|
254 |
+
* @return bool
|
255 |
+
*/
|
256 |
+
public function local_file_exists() {
|
257 |
+
return ( ! file_exists( $this->get_local_template_data_path() ) );
|
258 |
+
}
|
259 |
+
/**
|
260 |
+
* Get the data path.
|
261 |
+
*
|
262 |
+
* @access public
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
public function get_local_template_data_path() {
|
266 |
+
if ( ! $this->local_template_data_path ) {
|
267 |
+
$this->local_template_data_path = $this->get_starter_templates_folder() . '/' . $this->get_local_template_data_filename() . '.json';
|
268 |
+
}
|
269 |
+
return $this->local_template_data_path;
|
270 |
+
}
|
271 |
+
/**
|
272 |
+
* Get the local data filename.
|
273 |
+
*
|
274 |
+
* This is a hash, generated from the site-URL, the wp-content path and the URL.
|
275 |
+
* This way we can avoid issues with sites changing their URL, or the wp-content path etc.
|
276 |
+
*
|
277 |
+
* @access public
|
278 |
+
* @return string
|
279 |
+
*/
|
280 |
+
public function get_local_template_data_filename() {
|
281 |
+
$ktp_api = 'free';
|
282 |
+
if ( class_exists( 'Kadence_Theme_Pro' ) ) {
|
283 |
+
$ktp_data = get_option( 'ktp_api_manager' );
|
284 |
+
if ( $ktp_data && isset( $ktp_data['ktp_api_key'] ) && ! empty( $ktp_data['ktp_api_key'] ) ) {
|
285 |
+
$ktp_api = $ktp_data['ktp_api_key'];
|
286 |
+
}
|
287 |
+
}
|
288 |
+
return md5( $this->get_base_url() . $this->get_base_path() . $this->template_type . KADENCE_STARTER_TEMPLATES_VERSION . $ktp_api );
|
289 |
+
}
|
290 |
+
/**
|
291 |
+
* Main AJAX callback function for:
|
292 |
+
* 1). get local data if there
|
293 |
+
* 2). query api for data if needed
|
294 |
+
* 3). import content
|
295 |
+
* 4). execute 'after content import' actions (before widget import WP action, widget import, customizer import, after import WP action)
|
296 |
+
*/
|
297 |
+
public function template_data_ajax_callback() {
|
298 |
+
// Verify if the AJAX call is valid (checks nonce and current_user_can).
|
299 |
+
Helpers::verify_ajax_call();
|
300 |
+
$this->api_key = empty( $_POST['api_key'] ) ? '' : sanitize_text_field( $_POST['api_key'] );
|
301 |
+
$this->api_email = empty( $_POST['api_email'] ) ? '' : sanitize_text_field( $_POST['api_email'] );
|
302 |
+
$this->template_type = empty( $_POST['template_type'] ) ? 'blocks' : sanitize_text_field( $_POST['template_type'] );
|
303 |
+
// Do you have the data?
|
304 |
+
$get_data = $this->get_template_data();
|
305 |
+
if ( ! $get_data ) {
|
306 |
+
// Send JSON Error response to the AJAX call.
|
307 |
+
wp_send_json( esc_html__( 'No template data', 'kadence-starter-templates' ) );
|
308 |
+
} else {
|
309 |
+
wp_send_json( $get_data );
|
310 |
+
}
|
311 |
+
die;
|
312 |
+
}
|
313 |
+
/**
|
314 |
+
* Main AJAX callback function for:
|
315 |
+
* 1). get local data if there
|
316 |
+
* 2). query api for data if needed
|
317 |
+
* 3). import content
|
318 |
+
* 4). execute 'after content import' actions (before widget import WP action, widget import, customizer import, after import WP action)
|
319 |
+
*/
|
320 |
+
public function template_data_reload_ajax_callback() {
|
321 |
+
|
322 |
+
// Verify if the AJAX call is valid (checks nonce and current_user_can).
|
323 |
+
Helpers::verify_ajax_call();
|
324 |
+
$this->api_key = empty( $_POST['api_key'] ) ? '' : sanitize_text_field( $_POST['api_key'] );
|
325 |
+
$this->api_email = empty( $_POST['api_email'] ) ? '' : sanitize_text_field( $_POST['api_email'] );
|
326 |
+
$this->template_type = empty( $_POST['template_type'] ) ? 'blocks' : sanitize_text_field( $_POST['template_type'] );
|
327 |
+
|
328 |
+
$removed = $this->delete_starter_templates_folder();
|
329 |
+
if ( ! $removed ) {
|
330 |
+
wp_send_json_error( 'failed_to_flush' );
|
331 |
+
}
|
332 |
+
// Do you have the data?
|
333 |
+
$get_data = $this->get_template_data( true );
|
334 |
+
|
335 |
+
if ( ! $get_data ) {
|
336 |
+
// Send JSON Error response to the AJAX call.
|
337 |
+
wp_send_json( esc_html__( 'No template data', 'kadence-starter-templates' ) );
|
338 |
+
} else {
|
339 |
+
wp_send_json( $get_data );
|
340 |
+
}
|
341 |
+
die;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Get Importer Array.
|
346 |
+
*
|
347 |
+
* Used durning import to get information from the json.
|
348 |
+
*
|
349 |
+
* @access public
|
350 |
+
* @param string $slug the template slug.
|
351 |
+
* @param string $type the template type.
|
352 |
+
* @return array
|
353 |
+
*/
|
354 |
+
public function get_importer_files( $slug, $type ) {
|
355 |
+
$this->template_type = $type;
|
356 |
+
$get_data = $this->get_template_data();
|
357 |
+
if ( ! $get_data ) {
|
358 |
+
return array();
|
359 |
+
}
|
360 |
+
$data = json_decode( $get_data, true );
|
361 |
+
if ( isset( $data[ $slug ] ) ) {
|
362 |
+
return $data;
|
363 |
+
}
|
364 |
+
return array();
|
365 |
+
}
|
366 |
+
/**
|
367 |
+
* Schedule a cleanup.
|
368 |
+
*
|
369 |
+
* Deletes the templates files on a regular basis.
|
370 |
+
* This way templates get updated regularly.
|
371 |
+
*
|
372 |
+
* @access public
|
373 |
+
* @return void
|
374 |
+
*/
|
375 |
+
public function schedule_cleanup() {
|
376 |
+
if ( ! is_multisite() || ( is_multisite() && is_main_site() ) ) {
|
377 |
+
if ( ! wp_next_scheduled( 'delete_starter_templates_folder' ) && ! wp_installing() ) {
|
378 |
+
wp_schedule_event( time(), self::CLEANUP_FREQUENCY, 'delete_starter_templates_folder' );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
}
|
382 |
+
/**
|
383 |
+
* Delete the fonts folder.
|
384 |
+
*
|
385 |
+
* This runs as part of a cleanup routine.
|
386 |
+
*
|
387 |
+
* @access public
|
388 |
+
* @return bool
|
389 |
+
*/
|
390 |
+
public function delete_starter_templates_folder() {
|
391 |
+
return $this->get_filesystem()->delete( $this->get_starter_templates_folder(), true );
|
392 |
+
}
|
393 |
+
/**
|
394 |
+
* Get the folder for templates data.
|
395 |
+
*
|
396 |
+
* @access public
|
397 |
+
* @return string
|
398 |
+
*/
|
399 |
+
public function get_starter_templates_folder() {
|
400 |
+
if ( ! $this->starter_templates_folder ) {
|
401 |
+
$this->starter_templates_folder = $this->get_base_path();
|
402 |
+
if ( $this->get_subfolder_name() ) {
|
403 |
+
$this->starter_templates_folder .= $this->get_subfolder_name();
|
404 |
+
}
|
405 |
+
}
|
406 |
+
return $this->starter_templates_folder;
|
407 |
+
}
|
408 |
+
/**
|
409 |
+
* Get the subfolder name.
|
410 |
+
*
|
411 |
+
* @access public
|
412 |
+
* @return string
|
413 |
+
*/
|
414 |
+
public function get_subfolder_name() {
|
415 |
+
if ( ! $this->subfolder_name ) {
|
416 |
+
$this->subfolder_name = apply_filters( 'kadence_starter_templates_local_data_subfolder_name', 'kadence_starter_templates' );
|
417 |
+
}
|
418 |
+
return $this->subfolder_name;
|
419 |
+
}
|
420 |
+
/**
|
421 |
+
* Get the base path.
|
422 |
+
*
|
423 |
+
* @access public
|
424 |
+
* @return string
|
425 |
+
*/
|
426 |
+
public function get_base_path() {
|
427 |
+
if ( ! $this->base_path ) {
|
428 |
+
$this->base_path = apply_filters( 'kadence_starter_templates_local_data_base_path', trailingslashit( $this->get_filesystem()->wp_content_dir() ) );
|
429 |
+
}
|
430 |
+
return $this->base_path;
|
431 |
+
}
|
432 |
+
/**
|
433 |
+
* Get the base URL.
|
434 |
+
*
|
435 |
+
* @access public
|
436 |
+
* @return string
|
437 |
+
*/
|
438 |
+
public function get_base_url() {
|
439 |
+
if ( ! $this->base_url ) {
|
440 |
+
$this->base_url = apply_filters( 'kadence_starter_templates_local_data_base_url', content_url() );
|
441 |
+
}
|
442 |
+
return $this->base_url;
|
443 |
+
}
|
444 |
+
/**
|
445 |
+
* Get the filesystem.
|
446 |
+
*
|
447 |
+
* @access protected
|
448 |
+
* @return WP_Filesystem
|
449 |
+
*/
|
450 |
+
protected function get_filesystem() {
|
451 |
+
global $wp_filesystem;
|
452 |
+
|
453 |
+
// If the filesystem has not been instantiated yet, do it here.
|
454 |
+
if ( ! $wp_filesystem ) {
|
455 |
+
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
456 |
+
require_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' );
|
457 |
+
}
|
458 |
+
WP_Filesystem();
|
459 |
+
}
|
460 |
+
return $wp_filesystem;
|
461 |
+
}
|
462 |
+
}
|
463 |
+
Template_Database_Importer::get_instance();
|
inc/react/src/full-preview-mode.js
CHANGED
@@ -31,9 +31,11 @@ class KadenceImporterFullPreview extends Component {
|
|
31 |
return string.charAt( 0 ).toUpperCase() + string.slice( 1 );
|
32 |
}
|
33 |
render() {
|
34 |
-
|
|
|
35 |
let pluginsActive = true;
|
36 |
let pluginsPremium = false;
|
|
|
37 |
return (
|
38 |
<div className="kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded" style={ { display:'block' } }>
|
39 |
<div className="wp-full-overlay-sidebar">
|
@@ -154,51 +156,71 @@ class KadenceImporterFullPreview extends Component {
|
|
154 |
<div className="kadence-starter-required-plugins">
|
155 |
<h2 className="kst-required-title">{ __( 'Required Plugins', 'kadence-starter-templates' ) }</h2>
|
156 |
<ul className="kadence-required-wrap">
|
157 |
-
{ map( item.plugins, (
|
158 |
-
if (
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
162 |
}
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
-
return (
|
165 |
-
<li className="plugin-required">
|
166 |
-
{ title } - <span class="plugin-status">{ ( 'notactive' === state ? __( 'Not Installed', 'kadence-starter-templates' ) : state ) }</span>
|
167 |
-
</li>
|
168 |
-
);
|
169 |
} ) }
|
170 |
</ul>
|
171 |
{ ! pluginsActive && (
|
172 |
<Fragment>
|
173 |
-
{ pluginsPremium && (
|
174 |
<p className="desc-small">{__( '*Install Missing/Inactive Premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
175 |
) }
|
176 |
-
{ !pluginsPremium && (
|
177 |
<p className="desc-small">{__( '*Missing/Inactive plugins will be installed on import.', 'kadence-starter-templates' ) }</p>
|
178 |
) }
|
179 |
</Fragment>
|
180 |
) }
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
</div>
|
182 |
</div>
|
183 |
|
184 |
<div class="wp-full-overlay-footer">
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
className="kst-
|
189 |
-
|
190 |
-
|
191 |
-
>
|
192 |
-
{ __( '
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
</div>
|
203 |
</div>
|
204 |
|
31 |
return string.charAt( 0 ).toUpperCase() + string.slice( 1 );
|
32 |
}
|
33 |
render() {
|
34 |
+
//console.log( this.props.item );
|
35 |
+
const item = this.props.item;
|
36 |
let pluginsActive = true;
|
37 |
let pluginsPremium = false;
|
38 |
+
let pluginsMember = false;
|
39 |
return (
|
40 |
<div className="kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded" style={ { display:'block' } }>
|
41 |
<div className="wp-full-overlay-sidebar">
|
156 |
<div className="kadence-starter-required-plugins">
|
157 |
<h2 className="kst-required-title">{ __( 'Required Plugins', 'kadence-starter-templates' ) }</h2>
|
158 |
<ul className="kadence-required-wrap">
|
159 |
+
{ map( item.plugins, ( slug ) => {
|
160 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
161 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state ) {
|
162 |
+
pluginsActive = false;
|
163 |
+
if ( 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ) {
|
164 |
+
pluginsPremium = true;
|
165 |
+
}
|
166 |
+
if ( 'bundle' === kadenceStarterParams.plugins[ slug ].src ) {
|
167 |
+
pluginsMember = true;
|
168 |
+
}
|
169 |
}
|
170 |
+
return (
|
171 |
+
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
172 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span>
|
173 |
+
</li>
|
174 |
+
);
|
175 |
}
|
|
|
|
|
|
|
|
|
|
|
176 |
} ) }
|
177 |
</ul>
|
178 |
{ ! pluginsActive && (
|
179 |
<Fragment>
|
180 |
+
{ ( pluginsPremium || pluginsMember ) && (
|
181 |
<p className="desc-small">{__( '*Install Missing/Inactive Premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
182 |
) }
|
183 |
+
{ ! pluginsPremium && ! pluginsMember && (
|
184 |
<p className="desc-small">{__( '*Missing/Inactive plugins will be installed on import.', 'kadence-starter-templates' ) }</p>
|
185 |
) }
|
186 |
</Fragment>
|
187 |
) }
|
188 |
+
{ undefined !== item.pro && item.pro && ! item.member && (
|
189 |
+
<div className="notice inline notice-alt notice-warning kadence-pro-notice">
|
190 |
+
<p><strong>Kadence Membership Site</strong></p>
|
191 |
+
<p>To import this starter template you need to install Kadence Pro and Kadence Blocks Pro and activate your license using a <strong>full Kadence Membership license</strong>.</p>
|
192 |
+
</div>
|
193 |
+
) }
|
194 |
</div>
|
195 |
</div>
|
196 |
|
197 |
<div class="wp-full-overlay-footer">
|
198 |
+
{ undefined !== item.pro && item.pro && ! item.member ? (
|
199 |
+
<div className="kt-upgrade-notice">
|
200 |
+
<h2 className="kst-import-options-title">{ __( 'Kadence Membership is required', 'kadence-starter-sites' ) } </h2>
|
201 |
+
<ExternalLink className="kst-upgrade button-hero button button-primary" href={ 'https://www.kadencewp.com/product/kadence-membership/' }>{ __( 'Upgrade to Membership', 'kadence-starter-sites' ) }</ExternalLink>
|
202 |
+
</div>
|
203 |
+
) : (
|
204 |
+
<Fragment>
|
205 |
+
<h2 className="kst-import-options-title">{ __( 'Import Options', 'kadence-starter-templates' ) }</h2>
|
206 |
+
<div class="kadence-starter-templates-preview-actions">
|
207 |
+
<button
|
208 |
+
className="kst-import-btn button-hero button"
|
209 |
+
isDisabled={ undefined !== item.pro && item.pro && 'true' !== kadenceStarterParams.pro }
|
210 |
+
onClick={ () => this.props.onChange( { isSelected: false, fontPair: this.state.fontPair, colorPalette: this.state.colorPalette } ) }
|
211 |
+
>
|
212 |
+
{ __( 'Single Page', 'kadence-starter-templates' ) }
|
213 |
+
</button>
|
214 |
+
<button
|
215 |
+
className="kst-import-btn button-hero button button-primary"
|
216 |
+
isDisabled={ undefined !== item.pro && item.pro && 'true' !== kadenceStarterParams.pro }
|
217 |
+
onClick={ () => this.props.onChange( { isImporting: true, fontPair: this.state.fontPair, colorPalette: this.state.colorPalette } ) }
|
218 |
+
>
|
219 |
+
{ __( 'Full Site', 'kadence-starter-templates' ) }
|
220 |
+
</button>
|
221 |
+
</div>
|
222 |
+
</Fragment>
|
223 |
+
) }
|
224 |
</div>
|
225 |
</div>
|
226 |
|
inc/react/src/index.js
CHANGED
@@ -8,6 +8,22 @@
|
|
8 |
// import Sidebar from './sidebar';
|
9 |
// import CustomizerLinks from './customizer';
|
10 |
// import Notices from './notices';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
import map from 'lodash/map';
|
12 |
import LazyLoad from 'react-lazy-load';
|
13 |
import KadenceImporterFullPreview from './full-preview-mode.js'
|
@@ -18,10 +34,20 @@ const { __, sprintf } = wp.i18n;
|
|
18 |
const { Fragment, Component, render, PureComponent } = wp.element;
|
19 |
const { Modal, Spinner, ButtonGroup, Dropdown, Icon, Button, ExternalLink, ToolbarGroup, ToggleControl, MenuItem, Tooltip } = wp.components;
|
20 |
import {
|
21 |
-
|
|
|
|
|
22 |
chevronLeft,
|
23 |
chevronDown,
|
24 |
} from '@wordpress/icons';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
const eIcon = <svg
|
26 |
xmlns="http://www.w3.org/2000/svg"
|
27 |
fillRule="evenodd"
|
@@ -117,8 +143,11 @@ class KadenceImporter extends Component {
|
|
117 |
super( ...arguments );
|
118 |
this.runAjax = this.runAjax.bind( this );
|
119 |
this.runPluginInstall = this.runPluginInstall.bind( this );
|
|
|
|
|
120 |
this.focusMode = this.focusMode.bind( this );
|
121 |
this.fullFocusMode = this.fullFocusMode.bind( this );
|
|
|
122 |
this.selectedMode = this.selectedMode.bind( this );
|
123 |
this.selectedFullMode = this.selectedFullMode.bind( this );
|
124 |
this.backToDash = this.backToDash.bind( this );
|
@@ -145,8 +174,10 @@ class KadenceImporter extends Component {
|
|
145 |
isOpenCheckFont: false,
|
146 |
isOpenCheckPast: false,
|
147 |
removePast: false,
|
|
|
148 |
templates: ( kadenceStarterParams.templates ? kadenceStarterParams.templates : [] ),
|
149 |
etemplates: ( kadenceStarterParams.etemplates ? kadenceStarterParams.etemplates : [] ),
|
|
|
150 |
palettes: ( kadenceStarterParams.palettes ? kadenceStarterParams.palettes : [] ),
|
151 |
fonts: ( kadenceStarterParams.fonts ? kadenceStarterParams.fonts : [] ),
|
152 |
logo: ( kadenceStarterParams.logo ? kadenceStarterParams.logo : '' ),
|
@@ -162,6 +193,7 @@ class KadenceImporter extends Component {
|
|
162 |
config[ setting ] = '';
|
163 |
}
|
164 |
config[ setting ] = settingValue;
|
|
|
165 |
const settingModel = new wp.api.models.Settings( { kadence_starter_templates_config: JSON.stringify( config ) } );
|
166 |
settingModel.save().then( response => {
|
167 |
this.setState( { starterSettings: config, isSaving: false } );
|
@@ -177,6 +209,9 @@ class KadenceImporter extends Component {
|
|
177 |
fullFocusMode( template_id ) {
|
178 |
this.setState( { activeTemplate: template_id, focusMode: true, isSelected: true } )
|
179 |
}
|
|
|
|
|
|
|
180 |
selectedFullMode() {
|
181 |
this.setState( { isSelected: true } );
|
182 |
}
|
@@ -186,29 +221,94 @@ class KadenceImporter extends Component {
|
|
186 |
backToDash() {
|
187 |
this.setState( { isFetching: false, activeTemplate: '', overrideColors:false, overrideFonts:false, colorPalette: '', fontPair: '', focusMode: false, finished: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', selectedPage: 'home' } );
|
188 |
}
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
this.setState( { progress: 'plugins', isFetching: true } );
|
191 |
var data = new FormData();
|
192 |
data.append( 'action', 'kadence_import_install_plugins' );
|
193 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
194 |
data.append( 'selected', selected );
|
|
|
195 |
data.append( 'page_id', page_id );
|
196 |
this.runPageAjax( data );
|
197 |
}
|
198 |
-
runRemovePast( selected ) {
|
199 |
this.setState( { progress: 'remove', isFetching: true } );
|
200 |
var data = new FormData();
|
201 |
data.append( 'action', 'kadence_remove_past_import_data' );
|
202 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
203 |
data.append( 'selected', selected );
|
|
|
204 |
this.runAjax( data );
|
205 |
}
|
206 |
-
runPluginInstall( selected ) {
|
207 |
this.setState( { progress: 'plugins', isFetching: true } );
|
208 |
var data = new FormData();
|
209 |
data.append( 'action', 'kadence_import_install_plugins' );
|
210 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
211 |
data.append( 'selected', selected );
|
|
|
212 |
this.runAjax( data );
|
213 |
}
|
214 |
runPageAjax( data ) {
|
@@ -230,6 +330,7 @@ class KadenceImporter extends Component {
|
|
230 |
newData.append( 'action', 'kadence_import_single_data' );
|
231 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
232 |
newData.append( 'selected', control.state.activeTemplate );
|
|
|
233 |
newData.append( 'page_id', control.state.selectedPage );
|
234 |
newData.append( 'override_colors', control.state.overrideColors );
|
235 |
newData.append( 'override_fonts', control.state.overrideFonts );
|
@@ -283,6 +384,7 @@ class KadenceImporter extends Component {
|
|
283 |
var newData = new FormData();
|
284 |
newData.append( 'action', 'kadence_import_demo_data' );
|
285 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
|
|
286 |
newData.append( 'selected', control.state.activeTemplate );
|
287 |
newData.append( 'palette', control.state.colorPalette );
|
288 |
newData.append( 'font', control.state.fontPair );
|
@@ -293,16 +395,21 @@ class KadenceImporter extends Component {
|
|
293 |
newData.append( 'action', 'kadence_import_install_plugins' );
|
294 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
295 |
newData.append( 'selected', control.state.activeTemplate );
|
|
|
296 |
control.runAjax( newData );
|
297 |
} else if ( 'undefined' !== typeof response.message ) {
|
298 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
299 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<p>' + response.message + '</p>' } );
|
|
|
|
|
|
|
300 |
} else {
|
301 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
302 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
303 |
}
|
304 |
})
|
305 |
.fail( function( error ) {
|
|
|
306 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
307 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
308 |
});
|
@@ -319,9 +426,19 @@ class KadenceImporter extends Component {
|
|
319 |
const catOptions = cats.map( ( item ) => {
|
320 |
return { value: item, label: this.capitalizeFirstLetter( item ) }
|
321 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
const KadenceImportSingleMode = () => {
|
323 |
-
const
|
324 |
-
|
325 |
return (
|
326 |
<div className="kst-grid-single-site">
|
327 |
<div className="kst-import-selection-item">
|
@@ -338,12 +455,17 @@ class KadenceImporter extends Component {
|
|
338 |
<h2>{ __( 'Page Template Plugins', 'kadence-starter-templates' ) }</h2>
|
339 |
</div>
|
340 |
<ul className="kadence-required-wrap">
|
341 |
-
{ map( item.plugins, (
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
|
|
347 |
} ) }
|
348 |
</ul>
|
349 |
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
@@ -478,11 +600,19 @@ class KadenceImporter extends Component {
|
|
478 |
) }
|
479 |
{ kadenceStarterParams.isKadence && (
|
480 |
<Fragment>
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
{ __( '
|
485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
</Fragment>
|
487 |
) }
|
488 |
</div>
|
@@ -491,15 +621,15 @@ class KadenceImporter extends Component {
|
|
491 |
);
|
492 |
}
|
493 |
const KadenceImportMode = () => {
|
494 |
-
const
|
495 |
-
const item = itemArray[0];
|
496 |
let pluginsPremium = false;
|
|
|
497 |
return (
|
498 |
<Fragment>
|
499 |
<div className="kst-grid-single-site">
|
500 |
<div className="kst-import-selection-item">
|
501 |
<div className="kst-import-selection">
|
502 |
-
<img src={ item.pages['home'].image } alt={ item.name } />
|
503 |
</div>
|
504 |
</div>
|
505 |
<div className="kst-import-selection-options">
|
@@ -524,10 +654,12 @@ class KadenceImporter extends Component {
|
|
524 |
</div>
|
525 |
) }
|
526 |
<h3>{ __( 'Starter Template Plugins', 'kadence-starter-templates' ) }</h3>
|
527 |
-
{ map( item.plugins, (
|
528 |
-
if (
|
529 |
-
if ( '
|
530 |
-
|
|
|
|
|
531 |
}
|
532 |
}
|
533 |
} ) }
|
@@ -535,13 +667,18 @@ class KadenceImporter extends Component {
|
|
535 |
<p className="desc-small install-third-party-notice">{ __( '*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
536 |
) }
|
537 |
<ul className="kadence-required-wrap">
|
538 |
-
{ map( item.plugins, (
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
545 |
</ul>
|
546 |
{ this.state.colorPalette && (
|
547 |
<Fragment>
|
@@ -661,26 +798,46 @@ class KadenceImporter extends Component {
|
|
661 |
{ kadenceStarterParams.isKadence && (
|
662 |
<Fragment>
|
663 |
{ pluginsPremium && (
|
664 |
-
<
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
{
|
672 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
) }
|
674 |
{ ! pluginsPremium && (
|
675 |
-
<
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
{
|
683 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
) }
|
685 |
</Fragment>
|
686 |
) }
|
@@ -689,8 +846,7 @@ class KadenceImporter extends Component {
|
|
689 |
);
|
690 |
}
|
691 |
const KadencesSiteMode = () => {
|
692 |
-
const
|
693 |
-
const item = itemArray[0];
|
694 |
return (
|
695 |
// <div className="kst-grid-single-site">
|
696 |
// <div className="kst-import-selection-item">
|
@@ -707,7 +863,7 @@ class KadenceImporter extends Component {
|
|
707 |
<h2>{ __( 'Page Templates', 'kadence-starter-templates' ) }</h2>
|
708 |
</div>
|
709 |
<div className="templates-grid">
|
710 |
-
{ map( item.pages, ( { title, id,
|
711 |
return (
|
712 |
<div className="kst-template-item">
|
713 |
<Button
|
@@ -717,7 +873,7 @@ class KadenceImporter extends Component {
|
|
717 |
onClick={ () => this.selectedMode( id ) }
|
718 |
>
|
719 |
<LazyLoad offsetBottom={200}>
|
720 |
-
<img src={
|
721 |
</LazyLoad>
|
722 |
<div className="demo-title">
|
723 |
<h4>{ title } <span>{ __( 'View Details', 'kadence-starter-templates' ) }</span></h4>
|
@@ -748,47 +904,51 @@ class KadenceImporter extends Component {
|
|
748 |
</Fragment>
|
749 |
);
|
750 |
}
|
751 |
-
const KadenceSitesGrid = () =>
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
<
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
{
|
776 |
-
<
|
777 |
-
|
778 |
-
|
779 |
-
</
|
780 |
-
|
781 |
-
</
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
|
|
|
|
|
|
|
|
|
|
789 |
const KadenceFinishedPage = () => {
|
790 |
-
const
|
791 |
-
const item = itemArray[0];
|
792 |
return (
|
793 |
<div className="kst-grid-single-site">
|
794 |
<div className="kst-import-selection-item">
|
@@ -813,13 +973,12 @@ class KadenceImporter extends Component {
|
|
813 |
);
|
814 |
}
|
815 |
const KadenceFinished = () => {
|
816 |
-
const
|
817 |
-
const item = itemArray[0];
|
818 |
return (
|
819 |
<div className="kst-grid-single-site">
|
820 |
<div className="kst-import-selection-item">
|
821 |
<div className="kst-import-selection">
|
822 |
-
<img src={ item.pages['home'].image } />
|
823 |
</div>
|
824 |
</div>
|
825 |
<div className="kst-import-selection-options">
|
@@ -841,9 +1000,32 @@ class KadenceImporter extends Component {
|
|
841 |
|
842 |
const MainPanel = () => (
|
843 |
<Fragment>
|
844 |
-
{ this.state.isSaving ? (
|
845 |
-
<div className="
|
846 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
</div>
|
848 |
) : (
|
849 |
<div className="main-panel">
|
@@ -860,7 +1042,7 @@ class KadenceImporter extends Component {
|
|
860 |
) }
|
861 |
{ ! this.state.isImporting && this.state.isSelected && (
|
862 |
<KadenceImporterFullPreview
|
863 |
-
item={
|
864 |
colorPalette={ this.state.colorPalette }
|
865 |
fontPair={ this.state.fontPair }
|
866 |
onChange={ ( value ) => {
|
@@ -890,21 +1072,36 @@ class KadenceImporter extends Component {
|
|
890 |
</Fragment>
|
891 |
);
|
892 |
const ChooseBuilder = () => (
|
893 |
-
<div className=
|
894 |
<div className="kst-choose-builder-center">
|
895 |
<h2 className="kst-choose-builder-title">{ __( 'Choose a Builder', 'kadence-starter-templates' ) }</h2>
|
896 |
<div className="kst-choose-builder-inner">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
<Button
|
898 |
icon={ gbIcon }
|
899 |
className="kt-import-select-type"
|
900 |
-
onClick={ () =>
|
|
|
|
|
901 |
>
|
902 |
{ __( 'Gutenberg', 'kadence-starter-templates' ) }
|
903 |
</Button>
|
904 |
<Button
|
905 |
icon={ eIcon }
|
906 |
className="kt-import-select-type"
|
907 |
-
onClick={ () =>
|
|
|
|
|
908 |
>
|
909 |
{ __( 'Elementor', 'kadence-starter-templates' ) }
|
910 |
</Button>
|
@@ -964,8 +1161,8 @@ class KadenceImporter extends Component {
|
|
964 |
contentClassName="kst-type-popover"
|
965 |
position="bottom left"
|
966 |
renderToggle={ ( { isOpen, onToggle } ) => (
|
967 |
-
<Button onClick={ onToggle } aria-expanded={ isOpen } icon={
|
968 |
-
{
|
969 |
<Icon className="kst-chev" icon={ chevronDown } />
|
970 |
</Button>
|
971 |
) }
|
@@ -977,7 +1174,7 @@ class KadenceImporter extends Component {
|
|
977 |
isSelected={ ( 'blocks' === this.state.starterSettings['builderType'] ? true : false ) }
|
978 |
onClick={ () => {
|
979 |
this.saveConfig( 'builderType', 'blocks' );
|
980 |
-
this.setState( { activeTemplate: '', colorPalette: '', finished:false, selectedPage: 'home', focusMode: false, isSelected: false, isPageSelected:false, isImporting: false, progress: '' } );
|
981 |
onToggle();
|
982 |
} }
|
983 |
>
|
@@ -989,17 +1186,42 @@ class KadenceImporter extends Component {
|
|
989 |
isSelected={ ( 'elementor' === this.state.starterSettings['builderType'] ? true : false ) }
|
990 |
onClick={ () => {
|
991 |
this.saveConfig( 'builderType', 'elementor' );
|
992 |
-
this.setState( { activeTemplate: '', colorPalette: '', finished:false, selectedPage: 'home', focusMode: false, isSelected: false, isPageSelected:false, isImporting: false, progress: '' } );
|
993 |
onToggle();
|
994 |
} }
|
995 |
>
|
996 |
{ __( 'Elementor', 'kadence-starter-templates' ) }
|
997 |
</MenuItem>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
</div>
|
999 |
) }
|
1000 |
/>
|
1001 |
) }
|
1002 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1003 |
</div>
|
1004 |
</div>
|
1005 |
<div class="kadence_theme_starter_dash_inner">
|
8 |
// import Sidebar from './sidebar';
|
9 |
// import CustomizerLinks from './customizer';
|
10 |
// import Notices from './notices';
|
11 |
+
function kadenceTryParseJSON(jsonString){
|
12 |
+
try {
|
13 |
+
var o = JSON.parse(jsonString);
|
14 |
+
|
15 |
+
// Handle non-exception-throwing cases:
|
16 |
+
// Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,
|
17 |
+
// but... JSON.parse(null) returns null, and typeof null === "object",
|
18 |
+
// so we must check for that, too. Thankfully, null is falsey, so this suffices:
|
19 |
+
if (o && typeof o === "object") {
|
20 |
+
return o;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
catch (e) { }
|
24 |
+
|
25 |
+
return false;
|
26 |
+
};
|
27 |
import map from 'lodash/map';
|
28 |
import LazyLoad from 'react-lazy-load';
|
29 |
import KadenceImporterFullPreview from './full-preview-mode.js'
|
34 |
const { Fragment, Component, render, PureComponent } = wp.element;
|
35 |
const { Modal, Spinner, ButtonGroup, Dropdown, Icon, Button, ExternalLink, ToolbarGroup, ToggleControl, MenuItem, Tooltip } = wp.components;
|
36 |
import {
|
37 |
+
arrowLeft,
|
38 |
+
download,
|
39 |
+
update,
|
40 |
chevronLeft,
|
41 |
chevronDown,
|
42 |
} from '@wordpress/icons';
|
43 |
+
const cIcon = <svg
|
44 |
+
xmlns="http://www.w3.org/2000/svg"
|
45 |
+
width="24"
|
46 |
+
height="24"
|
47 |
+
viewBox="0 0 24 24"
|
48 |
+
>
|
49 |
+
<path d="M15.984 18v2.016H8.015V18h7.969zM11.016 7.969v8.016h1.969V7.969h3l-3.984-3.984-3.984 3.984h3z"></path>
|
50 |
+
</svg>;
|
51 |
const eIcon = <svg
|
52 |
xmlns="http://www.w3.org/2000/svg"
|
53 |
fillRule="evenodd"
|
143 |
super( ...arguments );
|
144 |
this.runAjax = this.runAjax.bind( this );
|
145 |
this.runPluginInstall = this.runPluginInstall.bind( this );
|
146 |
+
this.loadTemplateData = this.loadTemplateData.bind( this );
|
147 |
+
this.reloadTemplateData = this.reloadTemplateData.bind( this );
|
148 |
this.focusMode = this.focusMode.bind( this );
|
149 |
this.fullFocusMode = this.fullFocusMode.bind( this );
|
150 |
+
this.jumpToImport = this.jumpToImport.bind( this );
|
151 |
this.selectedMode = this.selectedMode.bind( this );
|
152 |
this.selectedFullMode = this.selectedFullMode.bind( this );
|
153 |
this.backToDash = this.backToDash.bind( this );
|
174 |
isOpenCheckFont: false,
|
175 |
isOpenCheckPast: false,
|
176 |
removePast: false,
|
177 |
+
errorTemplates:false,
|
178 |
templates: ( kadenceStarterParams.templates ? kadenceStarterParams.templates : [] ),
|
179 |
etemplates: ( kadenceStarterParams.etemplates ? kadenceStarterParams.etemplates : [] ),
|
180 |
+
activeTemplates: false,
|
181 |
palettes: ( kadenceStarterParams.palettes ? kadenceStarterParams.palettes : [] ),
|
182 |
fonts: ( kadenceStarterParams.fonts ? kadenceStarterParams.fonts : [] ),
|
183 |
logo: ( kadenceStarterParams.logo ? kadenceStarterParams.logo : '' ),
|
193 |
config[ setting ] = '';
|
194 |
}
|
195 |
config[ setting ] = settingValue;
|
196 |
+
this.setState( { starterSettings: config } );
|
197 |
const settingModel = new wp.api.models.Settings( { kadence_starter_templates_config: JSON.stringify( config ) } );
|
198 |
settingModel.save().then( response => {
|
199 |
this.setState( { starterSettings: config, isSaving: false } );
|
209 |
fullFocusMode( template_id ) {
|
210 |
this.setState( { activeTemplate: template_id, focusMode: true, isSelected: true } )
|
211 |
}
|
212 |
+
jumpToImport( template_id ) {
|
213 |
+
this.setState( { isImporting: true, activeTemplate: template_id, focusMode: true, isSelected: true, fontPair: '', colorPalette: '' } )
|
214 |
+
}
|
215 |
selectedFullMode() {
|
216 |
this.setState( { isSelected: true } );
|
217 |
}
|
221 |
backToDash() {
|
222 |
this.setState( { isFetching: false, activeTemplate: '', overrideColors:false, overrideFonts:false, colorPalette: '', fontPair: '', focusMode: false, finished: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', selectedPage: 'home' } );
|
223 |
}
|
224 |
+
reloadTemplateData() {
|
225 |
+
this.setState( { errorTemplates: false, isSaving: true, activeTemplates: 'loading' } );
|
226 |
+
var data = new FormData();
|
227 |
+
data.append( 'action', 'kadence_import_reload_template_data' );
|
228 |
+
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
229 |
+
data.append( 'api_key', ( kadenceStarterParams.proData && kadenceStarterParams.proData.ktp_api_key ? kadenceStarterParams.proData.ktp_api_key : '' ) );
|
230 |
+
data.append( 'api_email', ( kadenceStarterParams.proData && kadenceStarterParams.proData.activation_email ? kadenceStarterParams.proData.activation_email : '' ) );
|
231 |
+
data.append( 'template_type', this.state.starterSettings['builderType'] );
|
232 |
+
var control = this;
|
233 |
+
jQuery.ajax({
|
234 |
+
method: 'POST',
|
235 |
+
url: kadenceStarterParams.ajax_url,
|
236 |
+
data: data,
|
237 |
+
contentType: false,
|
238 |
+
processData: false,
|
239 |
+
})
|
240 |
+
.done( function( response, status, stately ) {
|
241 |
+
if ( response ) {
|
242 |
+
const o = kadenceTryParseJSON( response );
|
243 |
+
if ( o ) {
|
244 |
+
control.setState( { activeTemplates: o, errorTemplates: false, isSaving: false } );
|
245 |
+
} else {
|
246 |
+
control.setState( { activeTemplates: 'error', errorTemplates: true, isSaving: false } );
|
247 |
+
}
|
248 |
+
}
|
249 |
+
})
|
250 |
+
.fail( function( error ) {
|
251 |
+
console.log(error);
|
252 |
+
control.setState( { activeTemplates: 'error', errorTemplates: true, isSaving: false } );
|
253 |
+
});
|
254 |
+
}
|
255 |
+
loadTemplateData() {
|
256 |
+
this.setState( { errorTemplates: false, isSaving: true, activeTemplates: 'loading' } );
|
257 |
+
var data = new FormData();
|
258 |
+
data.append( 'action', 'kadence_import_get_template_data' );
|
259 |
+
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
260 |
+
data.append( 'api_key', ( kadenceStarterParams.proData && kadenceStarterParams.proData.ktp_api_key ? kadenceStarterParams.proData.ktp_api_key : '' ) );
|
261 |
+
data.append( 'api_email', ( kadenceStarterParams.proData && kadenceStarterParams.proData.activation_email ? kadenceStarterParams.proData.activation_email : '' ) );
|
262 |
+
data.append( 'template_type', this.state.starterSettings['builderType'] );
|
263 |
+
var control = this;
|
264 |
+
jQuery.ajax( {
|
265 |
+
method: 'POST',
|
266 |
+
url: kadenceStarterParams.ajax_url,
|
267 |
+
data: data,
|
268 |
+
contentType: false,
|
269 |
+
processData: false,
|
270 |
+
} )
|
271 |
+
.done( function( response, status, stately ) {
|
272 |
+
if ( response ) {
|
273 |
+
const o = kadenceTryParseJSON( response );
|
274 |
+
if ( o ) {
|
275 |
+
control.setState( { activeTemplates: o, errorTemplates: false, isSaving: false } );
|
276 |
+
} else {
|
277 |
+
control.setState( { activeTemplates: 'error', errorTemplates: true, isSaving: false } );
|
278 |
+
}
|
279 |
+
}
|
280 |
+
})
|
281 |
+
.fail( function( error ) {
|
282 |
+
console.log(error);
|
283 |
+
control.setState( { activeTemplates: 'error', errorTemplates: true, isSaving: false } );
|
284 |
+
});
|
285 |
+
}
|
286 |
+
runPluginInstallSingle( selected, page_id, builder ) {
|
287 |
this.setState( { progress: 'plugins', isFetching: true } );
|
288 |
var data = new FormData();
|
289 |
data.append( 'action', 'kadence_import_install_plugins' );
|
290 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
291 |
data.append( 'selected', selected );
|
292 |
+
data.append( 'builder', builder );
|
293 |
data.append( 'page_id', page_id );
|
294 |
this.runPageAjax( data );
|
295 |
}
|
296 |
+
runRemovePast( selected, builder ) {
|
297 |
this.setState( { progress: 'remove', isFetching: true } );
|
298 |
var data = new FormData();
|
299 |
data.append( 'action', 'kadence_remove_past_import_data' );
|
300 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
301 |
data.append( 'selected', selected );
|
302 |
+
data.append( 'builder', builder );
|
303 |
this.runAjax( data );
|
304 |
}
|
305 |
+
runPluginInstall( selected, builder ) {
|
306 |
this.setState( { progress: 'plugins', isFetching: true } );
|
307 |
var data = new FormData();
|
308 |
data.append( 'action', 'kadence_import_install_plugins' );
|
309 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
310 |
data.append( 'selected', selected );
|
311 |
+
data.append( 'builder', builder );
|
312 |
this.runAjax( data );
|
313 |
}
|
314 |
runPageAjax( data ) {
|
330 |
newData.append( 'action', 'kadence_import_single_data' );
|
331 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
332 |
newData.append( 'selected', control.state.activeTemplate );
|
333 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
334 |
newData.append( 'page_id', control.state.selectedPage );
|
335 |
newData.append( 'override_colors', control.state.overrideColors );
|
336 |
newData.append( 'override_fonts', control.state.overrideFonts );
|
384 |
var newData = new FormData();
|
385 |
newData.append( 'action', 'kadence_import_demo_data' );
|
386 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
387 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
388 |
newData.append( 'selected', control.state.activeTemplate );
|
389 |
newData.append( 'palette', control.state.colorPalette );
|
390 |
newData.append( 'font', control.state.fontPair );
|
395 |
newData.append( 'action', 'kadence_import_install_plugins' );
|
396 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
397 |
newData.append( 'selected', control.state.activeTemplate );
|
398 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
399 |
control.runAjax( newData );
|
400 |
} else if ( 'undefined' !== typeof response.message ) {
|
401 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
402 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<p>' + response.message + '</p>' } );
|
403 |
+
} else if ( 'undefined' !== typeof response.success && ! response.success ) {
|
404 |
+
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
405 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + __( 'Failed Import. Something went wrong internally. Please try again.', 'kadence-starter-templates' ) + '</p></div>' } );
|
406 |
} else {
|
407 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
408 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
409 |
}
|
410 |
})
|
411 |
.fail( function( error ) {
|
412 |
+
console.log( error );
|
413 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
414 |
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
415 |
});
|
426 |
const catOptions = cats.map( ( item ) => {
|
427 |
return { value: item, label: this.capitalizeFirstLetter( item ) }
|
428 |
} );
|
429 |
+
let builderTypeName = __( 'Gutenberg', 'kadence-starter-templates' );
|
430 |
+
let builderTypeIcon = gbIcon;
|
431 |
+
if ( this.state.starterSettings['builderType'] === 'elementor' ) {
|
432 |
+
builderTypeName = __( 'Elementor', 'kadence-starter-templates' );
|
433 |
+
builderTypeIcon = eIcon;
|
434 |
+
}
|
435 |
+
if ( this.state.starterSettings['builderType'] === 'custom' ) {
|
436 |
+
builderTypeName = ( kadenceStarterParams.custom_name ? kadenceStarterParams.custom_name : __( 'Pro Designs', 'kadence-starter-templates' ) );
|
437 |
+
builderTypeIcon = ( kadenceStarterParams.custom_icon ? <img className="components-menu-items__item-icon custom-image-icon-src" src={ kadenceStarterParams.custom_icon } /> : cIcon );
|
438 |
+
}
|
439 |
const KadenceImportSingleMode = () => {
|
440 |
+
const item = this.state.activeTemplates[this.state.activeTemplate];
|
441 |
+
let pluginsMember = false;
|
442 |
return (
|
443 |
<div className="kst-grid-single-site">
|
444 |
<div className="kst-import-selection-item">
|
455 |
<h2>{ __( 'Page Template Plugins', 'kadence-starter-templates' ) }</h2>
|
456 |
</div>
|
457 |
<ul className="kadence-required-wrap">
|
458 |
+
{ map( item.plugins, ( slug ) => {
|
459 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
460 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ) {
|
461 |
+
pluginsMember = true;
|
462 |
+
}
|
463 |
+
return (
|
464 |
+
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
465 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
466 |
+
</li>
|
467 |
+
);
|
468 |
+
}
|
469 |
} ) }
|
470 |
</ul>
|
471 |
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
600 |
) }
|
601 |
{ kadenceStarterParams.isKadence && (
|
602 |
<Fragment>
|
603 |
+
{ pluginsMember && (
|
604 |
+
<div class="kadence_starter_templates_response">
|
605 |
+
<h2>{ __( 'Install Missing/Inactive Highlighted Premium Membership plugins to Import', 'kadence-starter-templates' ) }</h2>
|
606 |
+
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Membership Account', 'kadence-starter-templates' ) }</ExternalLink>
|
607 |
+
</div>
|
608 |
+
) }
|
609 |
+
{ ! pluginsMember && (
|
610 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
611 |
+
this.runPluginInstallSingle( item.slug, this.state.selectedPage, this.state.starterSettings['builderType'] );
|
612 |
+
} }>
|
613 |
+
{ __( 'Start Importing Page' ) }
|
614 |
+
</Button>
|
615 |
+
) }
|
616 |
</Fragment>
|
617 |
) }
|
618 |
</div>
|
621 |
);
|
622 |
}
|
623 |
const KadenceImportMode = () => {
|
624 |
+
const item = this.state.activeTemplates[this.state.activeTemplate];
|
|
|
625 |
let pluginsPremium = false;
|
626 |
+
let pluginsMember = false;
|
627 |
return (
|
628 |
<Fragment>
|
629 |
<div className="kst-grid-single-site">
|
630 |
<div className="kst-import-selection-item">
|
631 |
<div className="kst-import-selection">
|
632 |
+
<img src={ item.pages && item.pages['home'] && item.pages['home'].image ? item.pages['home'].image : item.image } alt={ item.name } />
|
633 |
</div>
|
634 |
</div>
|
635 |
<div className="kst-import-selection-options">
|
654 |
</div>
|
655 |
) }
|
656 |
<h3>{ __( 'Starter Template Plugins', 'kadence-starter-templates' ) }</h3>
|
657 |
+
{ map( item.plugins, ( slug ) => {
|
658 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
659 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state ) {
|
660 |
+
if ( 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ) {
|
661 |
+
pluginsPremium = true;
|
662 |
+
}
|
663 |
}
|
664 |
}
|
665 |
} ) }
|
667 |
<p className="desc-small install-third-party-notice">{ __( '*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
668 |
) }
|
669 |
<ul className="kadence-required-wrap">
|
670 |
+
{ map( item.plugins, ( slug ) => {
|
671 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
672 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ) {
|
673 |
+
pluginsMember = true;
|
674 |
+
}
|
675 |
+
return (
|
676 |
+
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
677 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
678 |
+
</li>
|
679 |
+
);
|
680 |
+
}
|
681 |
+
} ) }
|
682 |
</ul>
|
683 |
{ this.state.colorPalette && (
|
684 |
<Fragment>
|
798 |
{ kadenceStarterParams.isKadence && (
|
799 |
<Fragment>
|
800 |
{ pluginsPremium && (
|
801 |
+
<Fragment>
|
802 |
+
{ pluginsMember && (
|
803 |
+
<div class="kadence_starter_templates_response">
|
804 |
+
<h2>{ __( 'Install Missing/Inactive Highlighted Premium Membership plugins to Import', 'kadence-starter-templates' ) }</h2>
|
805 |
+
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Membership Account', 'kadence-starter-templates' ) }</ExternalLink>
|
806 |
+
</div>
|
807 |
+
) }
|
808 |
+
{ ! pluginsMember && (
|
809 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
810 |
+
if ( this.state.removePast ) {
|
811 |
+
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
812 |
+
} else {
|
813 |
+
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
814 |
+
}
|
815 |
+
} }>
|
816 |
+
{ __( 'Skip and Import with Partial Content' ) }
|
817 |
+
</Button>
|
818 |
+
) }
|
819 |
+
</Fragment>
|
820 |
) }
|
821 |
{ ! pluginsPremium && (
|
822 |
+
<Fragment>
|
823 |
+
{ pluginsMember && (
|
824 |
+
<div class="kadence_starter_templates_response">
|
825 |
+
<h2>{ __( 'Install Missing/Inactive Highlighted Premium Membership plugins to Import', 'kadence-starter-templates' ) }</h2>
|
826 |
+
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Membership Account', 'kadence-starter-templates' ) }</ExternalLink>
|
827 |
+
</div>
|
828 |
+
) }
|
829 |
+
{ ! pluginsMember && (
|
830 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
831 |
+
if ( this.state.removePast ) {
|
832 |
+
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
833 |
+
} else {
|
834 |
+
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
835 |
+
}
|
836 |
+
} }>
|
837 |
+
{ __( 'Start Importing' ) }
|
838 |
+
</Button>
|
839 |
+
) }
|
840 |
+
</Fragment>
|
841 |
) }
|
842 |
</Fragment>
|
843 |
) }
|
846 |
);
|
847 |
}
|
848 |
const KadencesSiteMode = () => {
|
849 |
+
const item = this.state.activeTemplates[this.state.activeTemplate];
|
|
|
850 |
return (
|
851 |
// <div className="kst-grid-single-site">
|
852 |
// <div className="kst-import-selection-item">
|
863 |
<h2>{ __( 'Page Templates', 'kadence-starter-templates' ) }</h2>
|
864 |
</div>
|
865 |
<div className="templates-grid">
|
866 |
+
{ map( item.pages, ( { title, id, thumbnail } ) => {
|
867 |
return (
|
868 |
<div className="kst-template-item">
|
869 |
<Button
|
873 |
onClick={ () => this.selectedMode( id ) }
|
874 |
>
|
875 |
<LazyLoad offsetBottom={200}>
|
876 |
+
<img src={ thumbnail } alt={ title } />
|
877 |
</LazyLoad>
|
878 |
<div className="demo-title">
|
879 |
<h4>{ title } <span>{ __( 'View Details', 'kadence-starter-templates' ) }</span></h4>
|
904 |
</Fragment>
|
905 |
);
|
906 |
}
|
907 |
+
const KadenceSitesGrid = () => {
|
908 |
+
const control = this;
|
909 |
+
return (
|
910 |
+
<div className="templates-grid">
|
911 |
+
{/* { map( ( this.state.starterSettings['builderType'] === 'elementor' ? this.state.etemplates : this.state.templates ), ( { name, key, slug, image, content, categories, keywords, pro, pages } ) => { */}
|
912 |
+
{ Object.keys( this.state.activeTemplates ).map( function( key, index ) {
|
913 |
+
const name = control.state.activeTemplates[key].name;
|
914 |
+
const slug = control.state.activeTemplates[key].slug;
|
915 |
+
const image = control.state.activeTemplates[key].image;
|
916 |
+
const categories = control.state.activeTemplates[key].categories;
|
917 |
+
const keywords = control.state.activeTemplates[key].keywords;
|
918 |
+
const pro = control.state.activeTemplates[key].pro;
|
919 |
+
const member = control.state.activeTemplates[key].member;
|
920 |
+
const pages = control.state.activeTemplates[key].pages;
|
921 |
+
if ( ( 'all' === control.state.category || categories.includes( control.state.category ) ) && ( ! control.state.search || ( keywords && keywords.some( x => x.toLowerCase().includes( control.state.search.toLowerCase() ) ) ) ) ) {
|
922 |
+
return (
|
923 |
+
<div className="kst-template-item">
|
924 |
+
<Button
|
925 |
+
key={ key }
|
926 |
+
className="kst-import-btn"
|
927 |
+
isSmall
|
928 |
+
onClick={ () => ( 'custom' === control.state.starterSettings[ 'builderType' ] ? control.jumpToImport( slug ) : control.fullFocusMode( slug ) ) }
|
929 |
+
//onClick={ () => control.fullFocusMode( slug ) }
|
930 |
+
>
|
931 |
+
<LazyLoad offsetBottom={200}>
|
932 |
+
<img src={ pages && pages.home && pages.home.thumbnail ? pages.home.thumbnail : image } alt={ name } />
|
933 |
+
</LazyLoad>
|
934 |
+
<div className="demo-title">
|
935 |
+
<h4>{ name }</h4>
|
936 |
+
</div>
|
937 |
+
</Button>
|
938 |
+
{ undefined !== pro && pro && (
|
939 |
+
<Fragment>
|
940 |
+
<span className="kb-pro-template">{ __( 'Membership', 'kadence-starter-sites' ) }</span>
|
941 |
+
</Fragment>
|
942 |
+
) }
|
943 |
+
</div>
|
944 |
+
);
|
945 |
+
}
|
946 |
+
} ) }
|
947 |
+
</div>
|
948 |
+
);
|
949 |
+
}
|
950 |
const KadenceFinishedPage = () => {
|
951 |
+
const item = this.state.activeTemplates[this.state.activeTemplate];
|
|
|
952 |
return (
|
953 |
<div className="kst-grid-single-site">
|
954 |
<div className="kst-import-selection-item">
|
973 |
);
|
974 |
}
|
975 |
const KadenceFinished = () => {
|
976 |
+
const item = this.state.activeTemplates[this.state.activeTemplate];
|
|
|
977 |
return (
|
978 |
<div className="kst-grid-single-site">
|
979 |
<div className="kst-import-selection-item">
|
980 |
<div className="kst-import-selection">
|
981 |
+
<img src={ item.pages && item.pages['home'] && item.pages['home'].image ? item.pages['home'].image : item.image } />
|
982 |
</div>
|
983 |
</div>
|
984 |
<div className="kst-import-selection-options">
|
1000 |
|
1001 |
const MainPanel = () => (
|
1002 |
<Fragment>
|
1003 |
+
{ ( this.state.isSaving || false === this.state.activeTemplates || this.state.errorTemplates ) ? (
|
1004 |
+
<div className="main-panel">
|
1005 |
+
<div className="kst-overlay-saving">
|
1006 |
+
{ ! this.state.errorTemplates && (
|
1007 |
+
<Spinner />
|
1008 |
+
) }
|
1009 |
+
{ this.state.errorTemplates && (
|
1010 |
+
<Fragment>
|
1011 |
+
<h2 style={{ textAlign:'center' } }>
|
1012 |
+
{ __( 'Error, Unable to access template database, please try re-downloading', 'kadence-starter-templates' ) }
|
1013 |
+
</h2>
|
1014 |
+
<div style={{ textAlign:'center' } }>
|
1015 |
+
<Button
|
1016 |
+
className="kt-reload-templates"
|
1017 |
+
icon={ update }
|
1018 |
+
onClick={ () => this.reloadTemplateData() }
|
1019 |
+
>
|
1020 |
+
{ __( ' Sync with Cloud', 'kadence-starter-templates' ) }
|
1021 |
+
</Button>
|
1022 |
+
</div>
|
1023 |
+
</Fragment>
|
1024 |
+
) }
|
1025 |
+
{ false === this.state.activeTemplates && (
|
1026 |
+
<Fragment>{ this.loadTemplateData() }</Fragment>
|
1027 |
+
) }
|
1028 |
+
</div>
|
1029 |
</div>
|
1030 |
) : (
|
1031 |
<div className="main-panel">
|
1042 |
) }
|
1043 |
{ ! this.state.isImporting && this.state.isSelected && (
|
1044 |
<KadenceImporterFullPreview
|
1045 |
+
item={ this.state.activeTemplates[this.state.activeTemplate] }
|
1046 |
colorPalette={ this.state.colorPalette }
|
1047 |
fontPair={ this.state.fontPair }
|
1048 |
onChange={ ( value ) => {
|
1072 |
</Fragment>
|
1073 |
);
|
1074 |
const ChooseBuilder = () => (
|
1075 |
+
<div className={ `kst-choose-builder-wrap${ ( kadenceStarterParams.ctemplates ? ' adjust-to-three-column' : '' ) }` }>
|
1076 |
<div className="kst-choose-builder-center">
|
1077 |
<h2 className="kst-choose-builder-title">{ __( 'Choose a Builder', 'kadence-starter-templates' ) }</h2>
|
1078 |
<div className="kst-choose-builder-inner">
|
1079 |
+
{ kadenceStarterParams.ctemplates && (
|
1080 |
+
<Button
|
1081 |
+
icon={ ( kadenceStarterParams.custom_icon ? <img className="custom-image-icon-src" src={ kadenceStarterParams.custom_icon } /> : cIcon ) }
|
1082 |
+
className="kt-import-select-type"
|
1083 |
+
onClick={ () => {
|
1084 |
+
this.saveConfig( 'builderType', 'custom' );
|
1085 |
+
} }
|
1086 |
+
>
|
1087 |
+
{ ( kadenceStarterParams.custom_name ? kadenceStarterParams.custom_name : __( 'Pro Designs', 'kadence-starter-templates' ) ) }
|
1088 |
+
</Button>
|
1089 |
+
) }
|
1090 |
<Button
|
1091 |
icon={ gbIcon }
|
1092 |
className="kt-import-select-type"
|
1093 |
+
onClick={ () => {
|
1094 |
+
this.saveConfig( 'builderType', 'blocks' );
|
1095 |
+
} }
|
1096 |
>
|
1097 |
{ __( 'Gutenberg', 'kadence-starter-templates' ) }
|
1098 |
</Button>
|
1099 |
<Button
|
1100 |
icon={ eIcon }
|
1101 |
className="kt-import-select-type"
|
1102 |
+
onClick={ () => {
|
1103 |
+
this.saveConfig( 'builderType', 'elementor' );
|
1104 |
+
} }
|
1105 |
>
|
1106 |
{ __( 'Elementor', 'kadence-starter-templates' ) }
|
1107 |
</Button>
|
1161 |
contentClassName="kst-type-popover"
|
1162 |
position="bottom left"
|
1163 |
renderToggle={ ( { isOpen, onToggle } ) => (
|
1164 |
+
<Button onClick={ onToggle } aria-expanded={ isOpen } icon={ builderTypeIcon } >
|
1165 |
+
{ builderTypeName }
|
1166 |
<Icon className="kst-chev" icon={ chevronDown } />
|
1167 |
</Button>
|
1168 |
) }
|
1174 |
isSelected={ ( 'blocks' === this.state.starterSettings['builderType'] ? true : false ) }
|
1175 |
onClick={ () => {
|
1176 |
this.saveConfig( 'builderType', 'blocks' );
|
1177 |
+
this.setState( { activeTemplate: '', colorPalette: '', finished:false, selectedPage: 'home', focusMode: false, isSelected: false, isPageSelected:false, isImporting: false, progress: '', activeTemplates: false } );
|
1178 |
onToggle();
|
1179 |
} }
|
1180 |
>
|
1186 |
isSelected={ ( 'elementor' === this.state.starterSettings['builderType'] ? true : false ) }
|
1187 |
onClick={ () => {
|
1188 |
this.saveConfig( 'builderType', 'elementor' );
|
1189 |
+
this.setState( { activeTemplate: '', colorPalette: '', finished:false, selectedPage: 'home', focusMode: false, isSelected: false, isPageSelected:false, isImporting: false, progress: '', activeTemplates: false } );
|
1190 |
onToggle();
|
1191 |
} }
|
1192 |
>
|
1193 |
{ __( 'Elementor', 'kadence-starter-templates' ) }
|
1194 |
</MenuItem>
|
1195 |
+
{ kadenceStarterParams.ctemplates && (
|
1196 |
+
<MenuItem
|
1197 |
+
icon={ ( kadenceStarterParams.custom_icon ? <img className="custom-image-icon-src" src={ kadenceStarterParams.custom_icon } /> : cIcon ) }
|
1198 |
+
className={ ( 'custom' === this.state.starterSettings['builderType'] ? 'active-item' : '' ) }
|
1199 |
+
isSelected={ ( 'custom' === this.state.starterSettings['builderType'] ? true : false ) }
|
1200 |
+
onClick={ () => {
|
1201 |
+
this.saveConfig( 'builderType', 'custom' );
|
1202 |
+
this.setState( { activeTemplate: '', colorPalette: '', finished:false, selectedPage: 'home', focusMode: false, isSelected: false, isPageSelected:false, isImporting: false, progress: '', activeTemplates: false } );
|
1203 |
+
onToggle();
|
1204 |
+
} }
|
1205 |
+
>
|
1206 |
+
{ ( kadenceStarterParams.custom_name ? kadenceStarterParams.custom_name : __( 'Pro Designs', 'kadence-starter-templates' ) ) }
|
1207 |
+
</MenuItem>
|
1208 |
+
) }
|
1209 |
</div>
|
1210 |
) }
|
1211 |
/>
|
1212 |
) }
|
1213 |
</div>
|
1214 |
+
{ false !== this.state.activeTemplates && this.state.starterSettings['builderType'] && (
|
1215 |
+
<div class="kadence_theme_dash_reload">
|
1216 |
+
<Tooltip text={ __( 'Sync with Cloud' ) }>
|
1217 |
+
<Button
|
1218 |
+
className="kt-reload-templates"
|
1219 |
+
icon={ update }
|
1220 |
+
onClick={ () => this.reloadTemplateData() }
|
1221 |
+
/>
|
1222 |
+
</Tooltip>
|
1223 |
+
</div>
|
1224 |
+
) }
|
1225 |
</div>
|
1226 |
</div>
|
1227 |
<div class="kadence_theme_starter_dash_inner">
|
inc/react/src/single-template-import.js
CHANGED
@@ -35,14 +35,14 @@ class KadenceSingleTemplateImport extends Component {
|
|
35 |
return string.charAt( 0 ).toUpperCase() + string.slice( 1 );
|
36 |
}
|
37 |
render() {
|
38 |
-
const item = this.props.item
|
39 |
let pluginsActive = true;
|
40 |
let pluginsPremium = false;
|
41 |
return (
|
42 |
<div className="kst-grid-single-site">
|
43 |
<div className="kst-import-selection-item">
|
44 |
<div className="kst-import-selection">
|
45 |
-
<img src={ item.pages[this.state.selectedPage].image } alt={ item.pages[this.state.selectedPage].title } />
|
46 |
</div>
|
47 |
</div>
|
48 |
<div className="kst-import-selection-options">
|
@@ -54,12 +54,14 @@ class KadenceSingleTemplateImport extends Component {
|
|
54 |
<h2>{ __( 'Page Template Plugins', 'kadence-starter-templates' ) }</h2>
|
55 |
</div>
|
56 |
<ul className="kadence-required-wrap">
|
57 |
-
{ map( item.plugins, (
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
} ) }
|
64 |
</ul>
|
65 |
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
35 |
return string.charAt( 0 ).toUpperCase() + string.slice( 1 );
|
36 |
}
|
37 |
render() {
|
38 |
+
const item = this.props.item;
|
39 |
let pluginsActive = true;
|
40 |
let pluginsPremium = false;
|
41 |
return (
|
42 |
<div className="kst-grid-single-site">
|
43 |
<div className="kst-import-selection-item">
|
44 |
<div className="kst-import-selection">
|
45 |
+
<img src={ item.pages[this.state.selectedPage].image.replace( '-scaled', '' ) } alt={ item.pages[this.state.selectedPage].title } />
|
46 |
</div>
|
47 |
</div>
|
48 |
<div className="kst-import-selection-options">
|
54 |
<h2>{ __( 'Page Template Plugins', 'kadence-starter-templates' ) }</h2>
|
55 |
</div>
|
56 |
<ul className="kadence-required-wrap">
|
57 |
+
{ map( item.plugins, ( slug ) => {
|
58 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
59 |
+
return (
|
60 |
+
<li className="plugin-required">
|
61 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
62 |
+
</li>
|
63 |
+
);
|
64 |
+
}
|
65 |
} ) }
|
66 |
</ul>
|
67 |
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
inc/react/src/starter-templates.scss
CHANGED
@@ -6,12 +6,110 @@ $color-gray-500: #A0AEC0;
|
|
6 |
$color-gray-600: #718096;
|
7 |
$color-gray-700: #4A5568;
|
8 |
$color-gray-800: #2D3748;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
.appearance_page_kadence-starter-templates #wpcontent {
|
10 |
padding: 0;
|
11 |
}
|
12 |
.kadence_theme_dash_back {
|
13 |
height: 100%;
|
14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content {
|
16 |
bottom: 70px;
|
17 |
}
|
6 |
$color-gray-600: #718096;
|
7 |
$color-gray-700: #4A5568;
|
8 |
$color-gray-800: #2D3748;
|
9 |
+
.kb-pro-template {
|
10 |
+
padding: 4px 10px;
|
11 |
+
position: absolute;
|
12 |
+
z-index: 10000;
|
13 |
+
bottom: 10px;
|
14 |
+
right: 10px;
|
15 |
+
background: #C53030;
|
16 |
+
background: $color-gray-700;
|
17 |
+
border-radius: 10px;
|
18 |
+
line-height: 20px;
|
19 |
+
color: #fff;
|
20 |
+
text-transform: uppercase;
|
21 |
+
font-weight: bold;
|
22 |
+
font-size: 11px;
|
23 |
+
text-align: center;
|
24 |
+
}
|
25 |
+
.bundle-install-required .plugin-status {
|
26 |
+
color:#C53030
|
27 |
+
}
|
28 |
+
a.components-external-link.kst-upgrade.button-hero.button.button-primary {
|
29 |
+
width: 80%;
|
30 |
+
min-height: 36px;
|
31 |
+
line-height: 2.5;
|
32 |
+
font-size: 14px;
|
33 |
+
text-align: center;
|
34 |
+
}
|
35 |
+
|
36 |
+
.kt-upgrade-notice {
|
37 |
+
display: flex;
|
38 |
+
flex-direction: column;
|
39 |
+
justify-content: center;
|
40 |
+
align-items: center;
|
41 |
+
height: 70px;
|
42 |
+
}
|
43 |
+
.kt-popover-pro-notice {
|
44 |
+
position: absolute;
|
45 |
+
left: 0;
|
46 |
+
right: 0;
|
47 |
+
top: 0;
|
48 |
+
bottom: 0;
|
49 |
+
display: flex;
|
50 |
+
flex-direction: column;
|
51 |
+
justify-content: center;
|
52 |
+
align-items: center;
|
53 |
+
padding: 20px;
|
54 |
+
opacity: 0;
|
55 |
+
z-index: 10;
|
56 |
+
text-align: center;
|
57 |
+
background: rgba(2555,255,255,0.9);
|
58 |
+
transition: opacity .3s ease-in-out;
|
59 |
+
}
|
60 |
+
.kt-popover-pro-notice .components-external-link {
|
61 |
+
background:$color-primary;
|
62 |
+
padding: 10px 10px;
|
63 |
+
color: white;
|
64 |
+
border-radius: 4px;
|
65 |
+
text-decoration: none;
|
66 |
+
}
|
67 |
+
.kt-popover-pro-notice:hover {
|
68 |
+
opacity: 1;
|
69 |
+
}
|
70 |
.appearance_page_kadence-starter-templates #wpcontent {
|
71 |
padding: 0;
|
72 |
}
|
73 |
.kadence_theme_dash_back {
|
74 |
height: 100%;
|
75 |
}
|
76 |
+
.kst-choose-builder-wrap.adjust-to-three-column {
|
77 |
+
max-width: 600px;
|
78 |
+
}
|
79 |
+
.kst-choose-builder-wrap.adjust-to-three-column .kst-choose-builder-inner {
|
80 |
+
grid-template-columns: 1fr 1fr 1fr;
|
81 |
+
}
|
82 |
+
.kadence_theme_dash_head .components-menu-items__item-icon.custom-image-icon-src {
|
83 |
+
margin-right:10px;
|
84 |
+
}
|
85 |
+
.kst-choose-builder-inner img.custom-image-icon-src {
|
86 |
+
width: 100px;
|
87 |
+
max-height: 100px;
|
88 |
+
height: auto;
|
89 |
+
}
|
90 |
+
.custom-image-icon-src, .kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button img {
|
91 |
+
max-width: 100%;
|
92 |
+
width: 24px;
|
93 |
+
max-height: 24px;
|
94 |
+
height: auto;
|
95 |
+
}
|
96 |
+
.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon {
|
97 |
+
border-left: 1px solid #e2e8f0;
|
98 |
+
border-right: 1px solid #e2e8f0;
|
99 |
+
height: 100%;
|
100 |
+
width: 40px;
|
101 |
+
color: #4a5568;
|
102 |
+
border-radius: 0;
|
103 |
+
justify-content: center;
|
104 |
+
}
|
105 |
+
.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon svg {
|
106 |
+
margin: 0;
|
107 |
+
width: 18px;
|
108 |
+
height: 18px;
|
109 |
+
}
|
110 |
+
.kadence_theme_dash_reload {
|
111 |
+
height: 100%;
|
112 |
+
}
|
113 |
.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content {
|
114 |
bottom: 70px;
|
115 |
}
|
kadence-starter-templates.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
-
* Version: 1.
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
@@ -29,4 +29,4 @@ function kadence_starter_old_php_admin_error_notice() {
|
|
29 |
$message = __( 'The Kadence Starter templates plugin requires at least PHP 7.0 to run properly. Please contact your hosting company and ask them to update the PHP version of your site to at least PHP 7.0. We strongly encourage you to update to 7.3+', 'kadence-starter-templates' );
|
30 |
|
31 |
printf( '<div class="notice notice-error"><p>%1$s</p></div>', wp_kses_post( $message ) );
|
32 |
-
}
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
+
* Version: 1.2.0
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
29 |
$message = __( 'The Kadence Starter templates plugin requires at least PHP 7.0 to run properly. Please contact your hosting company and ask them to update the PHP version of your site to at least PHP 7.0. We strongly encourage you to update to 7.3+', 'kadence-starter-templates' );
|
30 |
|
31 |
printf( '<div class="notice notice-error"><p>%1$s</p></div>', wp_kses_post( $message ) );
|
32 |
+
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
|
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 1.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -108,6 +108,10 @@ Absolutely not.
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.1.4 =
|
112 |
* Add: New Elementor Template.
|
113 |
* Add: New Gutenberg Template.
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 1.2.0
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.2.0 =
|
112 |
+
* Add: New Templates and hooks
|
113 |
+
* Update: API call for template data.
|
114 |
+
|
115 |
= 1.1.4 =
|
116 |
* Add: New Elementor Template.
|
117 |
* Add: New Gutenberg Template.
|
vendor/wxr-importer/WXRImporter.php
CHANGED
@@ -1130,16 +1130,17 @@ class WXRImporter extends \WP_Importer {
|
|
1130 |
}
|
1131 |
|
1132 |
if ( $this->options['aggressive_url_search'] ) {
|
|
|
1133 |
// remap resized image URLs, works by stripping the extension and remapping the URL stub.
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
|
1138 |
-
|
1139 |
-
|
1140 |
|
1141 |
-
|
1142 |
-
}
|
1143 |
}
|
1144 |
|
1145 |
return $post_id;
|
1130 |
}
|
1131 |
|
1132 |
if ( $this->options['aggressive_url_search'] ) {
|
1133 |
+
//$this->replace_attachment_urls_in_content();
|
1134 |
// remap resized image URLs, works by stripping the extension and remapping the URL stub.
|
1135 |
+
// if ( preg_match( '!^image/!', $info['type'] ) ) {
|
1136 |
+
// $parts = pathinfo( $remote_url );
|
1137 |
+
// $name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2
|
1138 |
|
1139 |
+
// $parts_new = pathinfo( $upload['url'] );
|
1140 |
+
// $name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" );
|
1141 |
|
1142 |
+
// $this->url_remap[$parts['dirname'] . '/' . $name] = $parts_new['dirname'] . '/' . $name_new;
|
1143 |
+
// }
|
1144 |
}
|
1145 |
|
1146 |
return $post_id;
|