Version Description
Modified: Move template libraries to redux-core directory. Modified: Update to the Extendify template library. Release date: November 16, 2021
Download this release
Release Info
Developer | KProvance |
Plugin | Redux Framework |
Version | 4.3.3 |
Comparing to | |
See all releases |
Code changes from version 4.3.2 to 4.3.3
- class-redux-framework-plugin.php +2 -2
- extendify-sdk/public/build/extendify-sdk.css +0 -1
- extendify-sdk/public/build/extendify-sdk.js +0 -2
- extendify-sdk/public/mix-manifest.json +0 -5
- extendify-sdk/src/ExtendifyLibrary.js +0 -38
- extendify-sdk/src/api/Taxonomies.js +0 -7
- extendify-sdk/src/app.css +0 -52
- extendify-sdk/src/components/LoginInterface.js +0 -114
- extendify-sdk/src/components/Loginbutton.js +0 -25
- extendify-sdk/src/components/SearchPredict.js +0 -89
- extendify-sdk/src/components/TaxonomyBreadcrumbs.js +0 -26
- extendify-sdk/src/components/TaxonomySection.js +0 -178
- extendify-sdk/src/components/TemplateButton.js +0 -66
- extendify-sdk/src/components/TypeSelect.js +0 -47
- extendify-sdk/src/hooks/useBeacon.js +0 -73
- extendify-sdk/src/pages/CuratedView.js +0 -71
- extendify-sdk/src/pages/Login.js +0 -37
- extendify-sdk/src/pages/Router.js +0 -39
- extendify-sdk/src/pages/guide/GuideStart.js +0 -149
- extendify-sdk/src/pages/guide/GuideSteps.js +0 -231
- extendify-sdk/src/pages/guide/Welcome.js +0 -166
- extendify-sdk/src/pages/modals/WaitingCrunchingModal.js +0 -22
- extendify-sdk/src/pages/parts/HasSidebar.js +0 -43
- extendify-sdk/src/pages/parts/MainWindow.js +0 -77
- extendify-sdk/src/pages/parts/RowByTax.js +0 -70
- extendify-sdk/src/pages/parts/Toolbar.js +0 -71
- extendify-sdk/src/pages/parts/sidebars/SidebarMain.js +0 -51
- extendify-sdk/src/state/GlobalState.js +0 -17
- extendify-sdk/src/util/airtable.js +0 -18
- extendify-sdk/src/util/blocks.js +0 -26
- extendify-sdk/webpack.mix.js +0 -62
- readme.txt +6 -1
- redux-core/class-redux-core.php +23 -2
- {extendify-sdk → redux-core/extendify-sdk}/.eslintrc.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/.github/workflows/build-and-test.yml +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/.github/workflows/build-development-zip.yml +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/.github/workflows/force-production-on-main.yml +9 -1
- redux-core/extendify-sdk/.node-version +1 -0
- redux-core/extendify-sdk/.npmrc +1 -0
- {extendify-sdk → redux-core/extendify-sdk}/.phpcs.xml.dist +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Admin.php +42 -2
- {extendify-sdk → redux-core/extendify-sdk}/app/ApiRouter.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/App.php +6 -4
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/AuthController.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/MetaController.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/PingController.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/PluginController.php +0 -0
- redux-core/extendify-sdk/app/Controllers/SiteSettingsController.php +42 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/TaxonomyController.php +1 -2
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/TemplateController.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Controllers/UserController.php +0 -0
- redux-core/extendify-sdk/app/Frontend.php +70 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/Http.php +4 -1
- {extendify-sdk → redux-core/extendify-sdk}/app/Plugin.php +0 -0
- redux-core/extendify-sdk/app/Shared.php +298 -0
- redux-core/extendify-sdk/app/SiteSettings.php +72 -0
- {extendify-sdk → redux-core/extendify-sdk}/app/User.php +11 -3
- {extendify-sdk → redux-core/extendify-sdk}/bootstrap.php +4 -0
- {extendify-sdk → redux-core/extendify-sdk}/config.json +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/editorplus/EditorPlus.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/editorplus/editorplus-template.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/editorplus/editorplus.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/extendify-sdk.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/loader.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/public/.gitkeep +0 -0
- redux-core/extendify-sdk/public/build/extendify-sdk.css +1 -0
- redux-core/extendify-sdk/public/build/extendify-sdk.js +2 -0
- {extendify-sdk → redux-core/extendify-sdk}/public/build/extendify-sdk.js.LICENSE.txt +0 -0
- redux-core/extendify-sdk/public/build/extendify-utilities.css +1 -0
- {extendify-sdk → redux-core/extendify-sdk}/public/editorplus/editorplus.min.js +0 -0
- redux-core/extendify-sdk/public/editorplus/editorplus.min.js.LICENSE.txt +8 -0
- {extendify-sdk → redux-core/extendify-sdk}/readme.md +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/readme.txt +1 -1
- {extendify-sdk → redux-core/extendify-sdk}/routes/api.php +5 -1
- redux-core/extendify-sdk/src/ExtendifyLibrary.js +57 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/api/General.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/api/Plugins.js +0 -0
- redux-core/extendify-sdk/src/api/SiteSettings.js +18 -0
- redux-core/extendify-sdk/src/api/Taxonomies.js +16 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/api/Templates.js +45 -2
- {extendify-sdk → redux-core/extendify-sdk}/src/api/User.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/api/axios.js +0 -0
- redux-core/extendify-sdk/src/app.css +98 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/app.js +3 -2
- {extendify-sdk → redux-core/extendify-sdk}/src/buttons.js +36 -46
- {extendify-sdk → redux-core/extendify-sdk}/src/components/ImportButton.js +2 -1
- redux-core/extendify-sdk/src/components/ImportCounter.js +45 -0
- redux-core/extendify-sdk/src/components/ImportTemplateBlock.js +156 -0
- redux-core/extendify-sdk/src/components/LibraryAccessModal.js +95 -0
- redux-core/extendify-sdk/src/components/LoginInterface.js +185 -0
- redux-core/extendify-sdk/src/components/SiteTypeSelector.js +156 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/components/TaxonomyList.js +2 -2
- redux-core/extendify-sdk/src/components/TaxonomySection.js +41 -0
- redux-core/extendify-sdk/src/components/TemplateButton.js +50 -0
- redux-core/extendify-sdk/src/components/TemplateButtonLive.js +53 -0
- redux-core/extendify-sdk/src/components/TypeSelect.js +36 -0
- redux-core/extendify-sdk/src/components/WelcomeNotice.js +63 -0
- redux-core/extendify-sdk/src/components/buttons/Primary.js +11 -0
- redux-core/extendify-sdk/src/components/icons/index.js +6 -0
- redux-core/extendify-sdk/src/components/icons/library/alert.js +14 -0
- redux-core/extendify-sdk/src/components/icons/library/brand-mark.js +13 -0
- redux-core/extendify-sdk/src/components/icons/library/download.js +13 -0
- redux-core/extendify-sdk/src/components/icons/library/success.js +24 -0
- redux-core/extendify-sdk/src/components/icons/library/user.js +12 -0
- redux-core/extendify-sdk/src/components/modals/Modal.js +62 -0
- redux-core/extendify-sdk/src/components/modals/SettingsModal.js +20 -0
- redux-core/extendify-sdk/src/components/modals/SplitModal.js +51 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/config.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/hooks/helpers.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/hooks/useTaxonomies.js +6 -6
- {extendify-sdk → redux-core/extendify-sdk}/src/listeners/index.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/listeners/softerror-encountered.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/listeners/template-inserted.js +1 -1
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/NeedsPermissionModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/NeedsRegistrationModal.js +2 -11
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/ReloadRequiredModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ActivatePluginsModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ActivatingModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ErrorActivating.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/index.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/ErrorInstalling.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/InstallingModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/RequiredPluginsModal.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/index.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/helpers.js +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/middleware/index.js +3 -5
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/GridView.js +5 -5
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/MainContent.js +1 -3
- redux-core/extendify-sdk/src/pages/Router.js +12 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/SingleView.js +1 -1
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/Grid.js +26 -12
- redux-core/extendify-sdk/src/pages/parts/HasSidebar.js +19 -0
- redux-core/extendify-sdk/src/pages/parts/MainWindow.js +51 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/Single.js +0 -4
- redux-core/extendify-sdk/src/pages/parts/Toolbar.js +44 -0
- redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarMain.js +36 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/sidebars/SidebarSingle.js +1 -1
- redux-core/extendify-sdk/src/state/GlobalState.js +26 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/state/Importing.js +0 -0
- redux-core/extendify-sdk/src/state/SiteSettings.js +15 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/state/Taxonomies.js +4 -1
- {extendify-sdk → redux-core/extendify-sdk}/src/state/Templates.js +44 -32
- {extendify-sdk → redux-core/extendify-sdk}/src/state/User.js +23 -2
- {extendify-sdk → redux-core/extendify-sdk}/src/util/general.js +8 -0
- {extendify-sdk → redux-core/extendify-sdk}/src/util/templateInjection.js +0 -13
- redux-core/extendify-sdk/src/utility-control/index.js +127 -0
- {extendify-sdk → redux-core/extendify-sdk}/support/notices.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/tailwind.config.js +25 -4
- redux-core/extendify-sdk/utility-framework/block-styles/cover-angled.css +19 -0
- redux-core/extendify-sdk/utility-framework/classes/clip-path.css +11 -0
- redux-core/extendify-sdk/utility-framework/classes/columns.css +108 -0
- redux-core/extendify-sdk/utility-framework/classes/direction.css +7 -0
- redux-core/extendify-sdk/utility-framework/classes/editor/no-caption.css +3 -0
- redux-core/extendify-sdk/utility-framework/classes/editor/no-inserter.css +10 -0
- redux-core/extendify-sdk/utility-framework/classes/editor/no-resize.css +10 -0
- redux-core/extendify-sdk/utility-framework/classes/editor/pointer-events.css +3 -0
- redux-core/extendify-sdk/utility-framework/classes/fallback.css +10 -0
- redux-core/extendify-sdk/utility-framework/classes/inline-list.css +20 -0
- redux-core/extendify-sdk/utility-framework/classes/misc.css +4 -0
- redux-core/extendify-sdk/utility-framework/classes/text-stroke.css +14 -0
- redux-core/extendify-sdk/utility-framework/extendify-utilities.css +60 -0
- redux-core/extendify-sdk/utility-framework/fallback/align.css +5 -0
- redux-core/extendify-sdk/utility-framework/fallback/colors.css +51 -0
- redux-core/extendify-sdk/utility-framework/fallback/font-sizes.css +7 -0
- redux-core/extendify-sdk/utility-framework/fallback/grid.css +140 -0
- redux-core/extendify-sdk/utility-framework/fallback/group.css +36 -0
- redux-core/extendify-sdk/utility-framework/fallback/image.css +10 -0
- redux-core/extendify-sdk/utility-framework/suggestions.config.js +24 -0
- redux-core/extendify-sdk/utility-framework/suggestions.json +569 -0
- redux-core/extendify-sdk/utility-framework/tailwind.config.js +44 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/autoload.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/ClassLoader.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/InstalledVersions.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/LICENSE +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_classmap.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_namespaces.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_psr4.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_real.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_static.php +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/installed.json +0 -0
- {extendify-sdk → redux-core/extendify-sdk}/vendor/composer/installed.php +0 -0
- redux-core/extendify-sdk/webpack.mix.js +132 -0
- redux-core/framework.php +1 -1
- {redux-templates → redux-core/redux-templates}/assets/css/admin.min.css +0 -0
- {redux-templates → redux-core/redux-templates}/assets/css/font-awesome.min.css +0 -0
- {redux-templates → redux-core/redux-templates}/assets/css/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.eot +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.ttf +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.woff +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.woff2 +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.eot +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.ttf +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.woff +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.woff2 +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.eot +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.ttf +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.woff +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.woff2 +0 -0
- {redux-templates → redux-core/redux-templates}/assets/fonts/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/icon-color.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/icon-premium.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/icon.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/image-loader.gif +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/logo-color.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/logo.svg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/popup-congrats.png +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/popup-contact.png +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/reduxtemplates-medium.jpg +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-1.png +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-2.gif +0 -0
- {redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-3.png +0 -0
- {redux-templates → redux-core/redux-templates}/assets/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/redux-templates.js +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/redux-templates.js.map +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/redux-templates.min.js +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/redux-templates.min.js.map +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/vendor.js +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/vendor.js.map +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/vendor.min.js +0 -0
- {redux-templates → redux-core/redux-templates}/assets/js/vendor.min.js.map +0 -0
- {redux-templates → redux-core/redux-templates}/babel.config.js +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-api.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-gutenberg-custom-css.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-init.php +26 -22
- {redux-templates → redux-core/redux-templates}/classes/class-installer-muter.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-installer.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-notice-overrides.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-notices.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-supported-plugins.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-template-overrides.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/class-templates.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/library/collections.json +0 -0
- {redux-templates → redux-core/redux-templates}/classes/library/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/library/library.json +0 -0
- {redux-templates → redux-core/redux-templates}/classes/library/pages.json +0 -0
- {redux-templates → redux-core/redux-templates}/classes/library/sections.json +0 -0
- {redux-templates → redux-core/redux-templates}/classes/templates/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/templates/template-canvas.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/templates/template-contained.php +0 -0
- {redux-templates → redux-core/redux-templates}/classes/templates/template-full-width.php +0 -0
- {redux-templates → redux-core/redux-templates}/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/jest.config.js +0 -0
- {redux-templates → redux-core/redux-templates}/redux-templates.php +3 -3
- {redux-templates → redux-core/redux-templates}/src/_variables.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/blocks.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/components/edit.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/icon.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/transforms.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/utils/file.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/utils/import.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/import/utils/insert.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/library/edit.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/library/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/library/insert-library-button.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/library/save.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/blocks/library/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/_variable.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/ChallengeStepItem.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/ProgressBar.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/config.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/final-templates/congrats.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/final-templates/contact.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/final-templates/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/final-templates/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/final-templates/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/helper.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/tooltip/ChallengeDot.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/challenge/tooltip/TooltipBox.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/background-image/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/background-image/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/background-image/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/button-group/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/button-group/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/button-group/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/button-group/tests/__snapshots__/index.test.js.snap +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/button-group/tests/index.test.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/tests/__snapshots__/index.test.js.snap +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/tests/index.test.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/error-notice/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/error-notice/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/error-notice/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/error-notice/tests/__snapshots__/index.test.js.snap +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/error-notice/tests/index.test.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/config.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/styles.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/styles.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/multiple-item/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/multiple-item/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/pagination/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/pagination/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/pagination/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/preview-import-button/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/preview-import-button/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/preview-import-button/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/preview-import-button/tests/__snapshots__/index.test.js.snap +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/preview-import-button/tests/index.test.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/safe-image-load/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/single-item/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/single-item/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/single-item/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/tab-header/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/tab-header/tests/__snapshots__/index.test.js.snap +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/tab-header/tests/index.test.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-change/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-few.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-many.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-normal.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/welcome-guide/images.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/welcome-guide/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/welcome-guide/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/components/welcome-guide/test.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/custom-css/editor.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/custom-css/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/custom-css/inject-css.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/custom-css/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/editor.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/editor.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/editor.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/fontawesome.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/acf-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/advanced-custom-fields.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/advanced-gutenberg-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/atomic-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/block-options.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/block-slider.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/coblocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/creative-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/editorplus.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/elegant-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/enhanced-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/essential-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/forms-gutenberg.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/getwid.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/ghostkit.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/guteblock.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/gutentor.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/index.php +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/kadence-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/kioken-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/otter-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/qodeblock.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/qubely.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/snow-monkey-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/stackable-ultimate-gutenberg-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-addons-for-gutenberg.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-blocks.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-post.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/images/wordpress.svg +0 -0
- {redux-templates → redux-core/redux-templates}/src/icons/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-feedback/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-feedback/modal.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-feedback/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-feedback/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ImportingStep.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/InstallPluginStep.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/OptionStep.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ProPluginsStep.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesActivateBox.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesPremiumActivate.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesPremiumBox.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/dependencyHelper.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-import-wizard/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/layout-with-sidebar/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/categoryFilter.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/dependencyFilter.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/dependencyFilterRow.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/priceFilter.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-manager/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/FullyOverlayFooter.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/FullyOverlayHeader.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/SidebarContent.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/SitePreviewSidebar.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-preview/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-promotor-score/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/modal-promotor-score/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/modals.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/modals.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/export-page-menu-item/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/export/export-block-menu-item.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/export/file.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/export/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/export/reusable.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/library-context-menu-item/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/buttons.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/modal.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/style.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/style.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/sidebar-share/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/plugins/sidebar-share/sidebar.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/preview-template/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/scss/admin.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/scss/admin.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/scss/common.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/scss/font-awesome.css +0 -0
- {redux-templates → redux-core/redux-templates}/src/scss/font-awesome.scss +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/actionHelper.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/actions.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/dependencyHelper.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/filters.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/helper.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/index.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/stores/reducer.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/ajax-stub.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/file-transformer.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/image-stub.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/scss-stub.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/setup-test-framework.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/test/svgr-mock.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/util/collections.js +0 -0
- {redux-templates → redux-core/redux-templates}/src/util/index.js +0 -0
- redux-framework.php +1 -1
class-redux-framework-plugin.php
CHANGED
@@ -162,7 +162,7 @@ if ( ! class_exists( 'Redux_Framework_Plugin', false ) ) {
|
|
162 |
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
|
163 |
}
|
164 |
|
165 |
-
// Including extendify sdk.
|
166 |
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
167 |
if ( file_exists( plugin_dir_path( REDUX_PLUGIN_FILE ) . 'extendify-sdk/loader.php' ) ) {
|
168 |
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
|
@@ -172,7 +172,7 @@ if ( ! class_exists( 'Redux_Framework_Plugin', false ) ) {
|
|
172 |
|
173 |
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
174 |
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
175 |
-
}
|
176 |
|
177 |
if ( isset( Redux_Core::$as_plugin ) ) {
|
178 |
Redux_Core::$as_plugin = true;
|
162 |
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
|
163 |
}
|
164 |
|
165 |
+
/* // Including extendify sdk.
|
166 |
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
167 |
if ( file_exists( plugin_dir_path( REDUX_PLUGIN_FILE ) . 'extendify-sdk/loader.php' ) ) {
|
168 |
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
|
172 |
|
173 |
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
174 |
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
175 |
+
}*/
|
176 |
|
177 |
if ( isset( Redux_Core::$as_plugin ) ) {
|
178 |
Redux_Core::$as_plugin = true;
|
extendify-sdk/public/build/extendify-sdk.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*,:after,:before{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.aspect-w-1{padding-bottom:calc(var(--tw-aspect-h)/var(--tw-aspect-w)*100%);position:relative}.aspect-w-1>*{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.aspect-w-1{--tw-aspect-w:1}.aspect-h-1{--tw-aspect-h:1}.extendify-sdk .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.extendify-sdk .focus\:not-sr-only:focus{clip:auto;height:auto;margin:0;overflow:visible;padding:0;position:static;white-space:normal;width:auto}.extendify-sdk .pointer-events-none{pointer-events:none}.extendify-sdk .static{position:static}.extendify-sdk .fixed{position:fixed}.extendify-sdk .absolute{position:absolute}.extendify-sdk .relative{position:relative}.extendify-sdk .sticky{position:sticky}.extendify-sdk .inset-0{bottom:0;left:0;right:0;top:0}.extendify-sdk .top-0{top:0}.extendify-sdk .top-1{top:.25rem}.extendify-sdk .top-3{top:.75rem}.extendify-sdk .top-16{top:4rem}.extendify-sdk .-top-3{top:-.75rem}.extendify-sdk .right-0{right:0}.extendify-sdk .right-6{right:1.5rem}.extendify-sdk .bottom-0{bottom:0}.extendify-sdk .left-0{left:0}.extendify-sdk .left-1{left:.25rem}.extendify-sdk .left-px{left:1px}.extendify-sdk .z-0{z-index:0}.extendify-sdk .z-10{z-index:10}.extendify-sdk .z-20{z-index:20}.extendify-sdk .z-30{z-index:30}.extendify-sdk .z-50{z-index:50}.extendify-sdk .z-high{z-index:99999}.extendify-sdk .m-0{margin:0}.extendify-sdk .m-6{margin:1.5rem}.extendify-sdk .m-auto{margin:auto}.extendify-sdk .-m-4{margin:-1rem}.extendify-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.extendify-sdk .mx-auto{margin-left:auto;margin-right:auto}.extendify-sdk .my-2{margin-bottom:.5rem;margin-top:.5rem}.extendify-sdk .my-4{margin-bottom:1rem;margin-top:1rem}.extendify-sdk .mt-0{margin-top:0}.extendify-sdk .mt-1{margin-top:.25rem}.extendify-sdk .mt-4{margin-top:1rem}.extendify-sdk .mt-5{margin-top:1.25rem}.extendify-sdk .mt-16{margin-top:4rem}.extendify-sdk .mt-px{margin-top:1px}.extendify-sdk .-mt-2{margin-top:-.5rem}.extendify-sdk .-mt-6{margin-top:-1.5rem}.extendify-sdk .mb-1{margin-bottom:.25rem}.extendify-sdk .mb-2{margin-bottom:.5rem}.extendify-sdk .mb-4{margin-bottom:1rem}.extendify-sdk .mb-5{margin-bottom:1.25rem}.extendify-sdk .mb-6{margin-bottom:1.5rem}.extendify-sdk .mb-8{margin-bottom:2rem}.extendify-sdk .mb-10{margin-bottom:2.5rem}.extendify-sdk .mb-12{margin-bottom:3rem}.extendify-sdk .mb-16{margin-bottom:4rem}.extendify-sdk .mb-24{margin-bottom:6rem}.extendify-sdk .mb-2\.5{margin-bottom:.625rem}.extendify-sdk .ml-4{margin-left:1rem}.extendify-sdk .ml-8{margin-left:2rem}.extendify-sdk .-ml-px{margin-left:-1px}.extendify-sdk .block{display:block}.extendify-sdk .inline-block{display:inline-block}.extendify-sdk .flex{display:flex}.extendify-sdk .inline-flex{display:inline-flex}.extendify-sdk .table{display:table}.extendify-sdk .grid{display:grid}.extendify-sdk .hidden{display:none}.extendify-sdk .h-8{height:2rem}.extendify-sdk .h-16{height:4rem}.extendify-sdk .h-80{height:20rem}.extendify-sdk .h-auto{height:auto}.extendify-sdk .h-px{height:1px}.extendify-sdk .h-full{height:100%}.extendify-sdk .h-screen{height:100vh}.extendify-sdk .max-h-64{max-height:16rem}.extendify-sdk .min-h-0{min-height:0}.extendify-sdk .min-h-60{min-height:15rem}.extendify-sdk .min-h-screen{min-height:100vh}.extendify-sdk .w-32{width:8rem}.extendify-sdk .w-72{width:18rem}.extendify-sdk .w-80{width:20rem}.extendify-sdk .w-96{width:24rem}.extendify-sdk .w-full{width:100%}.extendify-sdk .w-screen{width:100vw}.extendify-sdk .max-w-xs{max-width:20rem}.extendify-sdk .max-w-md{max-width:28rem}.extendify-sdk .max-w-lg{max-width:32rem}.extendify-sdk .max-w-xl{max-width:36rem}.extendify-sdk .max-w-2xl{max-width:42rem}.extendify-sdk .max-w-full{max-width:100%}.extendify-sdk .max-w-screen-xl{max-width:1280px}.extendify-sdk .max-w-screen-2xl{max-width:1440px}.extendify-sdk .max-w-screen-4xl{max-width:1920px}.extendify-sdk .flex-1{flex:1 1 0%}.extendify-sdk .flex-shrink-0{flex-shrink:0}.extendify-sdk .flex-grow{flex-grow:1}.extendify-sdk .transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.extendify-sdk .-translate-x-3{--tw-translate-x:-0.75rem}.extendify-sdk .translate-x-full{--tw-translate-x:100%}.extendify-sdk .-translate-x-full{--tw-translate-x:-100%}.extendify-sdk .translate-y-0{--tw-translate-y:0px}.extendify-sdk .translate-y-2{--tw-translate-y:0.5rem}.extendify-sdk .translate-y-4{--tw-translate-y:1rem}.extendify-sdk .translate-y-0\.5{--tw-translate-y:0.125rem}.extendify-sdk .-translate-y-full{--tw-translate-y:-100%}.extendify-sdk .rotate-180{--tw-rotate:180deg}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.extendify-sdk .cursor-pointer{cursor:pointer}.extendify-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .flex-col{flex-direction:column}.extendify-sdk .items-start{align-items:flex-start}.extendify-sdk .items-end{align-items:flex-end}.extendify-sdk .items-center{align-items:center}.extendify-sdk .justify-start{justify-content:flex-start}.extendify-sdk .justify-end{justify-content:flex-end}.extendify-sdk .justify-center{justify-content:center}.extendify-sdk .justify-between{justify-content:space-between}.extendify-sdk .justify-items-center{justify-items:center}.extendify-sdk .gap-4{gap:1rem}.extendify-sdk .gap-6{gap:1.5rem}.extendify-sdk .space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)));margin-right:calc(0px*var(--tw-space-x-reverse))}.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.375rem*var(--tw-space-x-reverse))}.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(4rem*var(--tw-space-y-reverse));margin-top:calc(4rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.extendify-sdk .divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.extendify-sdk .overflow-hidden{overflow:hidden}.extendify-sdk .overflow-scroll{overflow:scroll}.extendify-sdk .overflow-y-auto{overflow-y:auto}.extendify-sdk .overflow-x-hidden{overflow-x:hidden}.extendify-sdk .overflow-y-scroll{overflow-y:scroll}.extendify-sdk .whitespace-nowrap{white-space:nowrap}.extendify-sdk .rounded-none{border-radius:0}.extendify-sdk .border-0{border-width:0}.extendify-sdk .border{border-width:1px}.extendify-sdk .border-t-0{border-top-width:0}.extendify-sdk .border-t{border-top-width:1px}.extendify-sdk .border-b-0{border-bottom-width:0}.extendify-sdk .border-b{border-bottom-width:1px}.extendify-sdk .border-l{border-left-width:1px}.extendify-sdk .border-solid{border-style:solid}.extendify-sdk .border-transparent{border-color:transparent}.extendify-sdk .border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.extendify-sdk .border-gray-200{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.extendify-sdk .border-gray-300{--tw-border-opacity:1;border-color:rgba(221,221,221,var(--tw-border-opacity))}.extendify-sdk .border-gray-900{--tw-border-opacity:1;border-color:rgba(30,30,30,var(--tw-border-opacity))}.extendify-sdk .border-extendify-main{--tw-border-opacity:1;border-color:rgba(0,129,96,var(--tw-border-opacity))}.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1;border-color:rgba(204,24,24,var(--tw-border-opacity))}.extendify-sdk .group:hover .group-hover\:border-wp-theme-500,.extendify-sdk .hover\:border-wp-theme-500:hover{border-color:var(--wp-admin-theme-color)}.extendify-sdk .focus\:border-transparent:focus{border-color:transparent}.extendify-sdk .bg-transparent{background-color:transparent}.extendify-sdk .bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.extendify-sdk .bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-50{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-100{--tw-bg-opacity:1;background-color:rgba(240,240,240,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-200{--tw-bg-opacity:1;background-color:rgba(224,224,224,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-900{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-lightest{--tw-bg-opacity:1;background-color:rgba(248,255,254,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-light{--tw-bg-opacity:1;background-color:rgba(231,248,245,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity))}.extendify-sdk .group:hover .group-hover\:bg-transparent{background-color:transparent}.extendify-sdk .hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(240,240,240,var(--tw-bg-opacity))}.extendify-sdk .hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgba(240,240,240,var(--tw-bg-opacity))}.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-opacity-30{--tw-bg-opacity:0.3}.extendify-sdk .fill-current{fill:currentColor}.extendify-sdk .stroke-current{stroke:currentColor}.extendify-sdk .object-cover{-o-object-fit:cover;object-fit:cover}.extendify-sdk .p-0{padding:0}.extendify-sdk .p-1{padding:.25rem}.extendify-sdk .p-2{padding:.5rem}.extendify-sdk .p-3{padding:.75rem}.extendify-sdk .p-4{padding:1rem}.extendify-sdk .p-6{padding:1.5rem}.extendify-sdk .p-8{padding:2rem}.extendify-sdk .p-14{padding:3.5rem}.extendify-sdk .p-1\.5{padding:.375rem}.extendify-sdk .p-3\.5{padding:.875rem}.extendify-sdk .px-1{padding-left:.25rem;padding-right:.25rem}.extendify-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.extendify-sdk .px-4{padding-left:1rem;padding-right:1rem}.extendify-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.extendify-sdk .py-0{padding-bottom:0;padding-top:0}.extendify-sdk .py-1{padding-bottom:.25rem;padding-top:.25rem}.extendify-sdk .py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .py-4{padding-bottom:1rem;padding-top:1rem}.extendify-sdk .py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.extendify-sdk .pt-4{padding-top:1rem}.extendify-sdk .pt-6{padding-top:1.5rem}.extendify-sdk .pt-14{padding-top:3.5rem}.extendify-sdk .pt-16{padding-top:4rem}.extendify-sdk .pt-px{padding-top:1px}.extendify-sdk .pr-2{padding-right:.5rem}.extendify-sdk .pr-4{padding-right:1rem}.extendify-sdk .pb-0{padding-bottom:0}.extendify-sdk .pb-2{padding-bottom:.5rem}.extendify-sdk .pb-3{padding-bottom:.75rem}.extendify-sdk .pb-4{padding-bottom:1rem}.extendify-sdk .pb-6{padding-bottom:1.5rem}.extendify-sdk .pb-16{padding-bottom:4rem}.extendify-sdk .pb-20{padding-bottom:5rem}.extendify-sdk .pb-32{padding-bottom:8rem}.extendify-sdk .pb-40{padding-bottom:10rem}.extendify-sdk .pb-60{padding-bottom:15rem}.extendify-sdk .pl-6{padding-left:1.5rem}.extendify-sdk .pl-12{padding-left:3rem}.extendify-sdk .text-left{text-align:left}.extendify-sdk .text-center{text-align:center}.extendify-sdk .text-xs{font-size:.75rem;line-height:1rem}.extendify-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.extendify-sdk .text-base{font-size:1rem;line-height:1.5rem}.extendify-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.extendify-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.extendify-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .text-5xl{font-size:3rem;line-height:1}.extendify-sdk .text-7xl{font-size:4.5rem;line-height:1}.extendify-sdk .font-normal{font-weight:400}.extendify-sdk .font-medium{font-weight:500}.extendify-sdk .font-semibold{font-weight:600}.extendify-sdk .font-bold{font-weight:700}.extendify-sdk .uppercase{text-transform:uppercase}.extendify-sdk .leading-none{line-height:1}.extendify-sdk .leading-tight{line-height:1.25}.extendify-sdk .leading-loose{line-height:2}.extendify-sdk .text-black{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.extendify-sdk .text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .text-gray-900{--tw-text-opacity:1;color:rgba(30,30,30,var(--tw-text-opacity))}.extendify-sdk .text-extendify-main{--tw-text-opacity:1;color:rgba(0,129,96,var(--tw-text-opacity))}.extendify-sdk .text-extendify-link{--tw-text-opacity:1;color:rgba(41,152,117,var(--tw-text-opacity))}.extendify-sdk .text-extendify-bright{--tw-text-opacity:1;color:rgba(48,168,80,var(--tw-text-opacity))}.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)}.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1;color:rgba(204,24,24,var(--tw-text-opacity))}.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)}.extendify-sdk .focus\:text-white:focus{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.extendify-sdk .active\:text-white:active{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .underline{text-decoration:underline}.extendify-sdk .no-underline{text-decoration:none}.extendify-sdk .placeholder-transparent::-moz-placeholder{color:transparent}.extendify-sdk .placeholder-transparent:-ms-input-placeholder{color:transparent}.extendify-sdk .placeholder-transparent::placeholder{color:transparent}.extendify-sdk .opacity-0{opacity:0}.extendify-sdk .focus\:opacity-100:focus,.extendify-sdk .group:hover .group-hover\:opacity-100,.extendify-sdk .opacity-100{opacity:1}*,:after,:before{--tw-shadow:0 0 #0000}.extendify-sdk .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.extendify-sdk .shadow-md,.extendify-sdk .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.extendify-sdk .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)}.extendify-sdk .outline-none{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.extendify-sdk .ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.extendify-sdk .focus\:ring-2:focus,.extendify-sdk .ring-4{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.extendify-sdk .focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .focus\:ring-extendify-main:focus,.extendify-sdk .ring-extendify-main{--tw-ring-opacity:1;--tw-ring-color:rgba(0,129,96,var(--tw-ring-opacity))}.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)}.extendify-sdk .ring-offset-1{--tw-ring-offset-width:1px}.extendify-sdk .focus\:ring-offset-4:focus,.extendify-sdk .ring-offset-4{--tw-ring-offset-width:4px}.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.extendify-sdk .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .delay-300{transition-delay:.3s}.extendify-sdk .duration-150{transition-duration:.15s}.extendify-sdk .duration-200{transition-duration:.2s}.extendify-sdk .duration-300{transition-duration:.3s}.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb;box-sizing:border-box}.extendify-sdk .button-focus{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-focus{--tw-ring-offset-width:1px}.extendify-sdk .button-focus-big-green{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-focus-big-green:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(0,129,96,var(--tw-ring-opacity));--tw-ring-offset-width:4px;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.button-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity));cursor:pointer;white-space:nowrap}.button-extendify-main:active,.button-extendify-main:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.button-extendify-main{padding:.375rem .75rem}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.button-extendify-main{text-decoration:none;transition-duration:.15s;transition-duration:.2s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .button-extendify-main{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-extendify-main{--tw-ring-offset-width:1px}.extendify-sdk input.button-extendify-main:focus,.extendify-sdk input.button-focus:focus,.extendify-sdk select.button-extendify-main:focus,.extendify-sdk select.button-focus:focus{border-color:transparent;outline:2px solid transparent;outline-offset:2px}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent;border-bottom:1px solid #e0e0e0!important}.extendify-sdk .components-modal__header{--tw-border-opacity:1;border-bottom-width:1px;border-color:rgba(221,221,221,var(--tw-border-opacity))}.extendify-special-input:-moz-placeholder-shown~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:-ms-input-placeholder~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:placeholder-shown~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:focus~label{--tw-text-opacity:1;color:rgba(0,129,96,var(--tw-text-opacity));font-size:.75rem;line-height:1rem;top:-1rem}@media (min-width:600px){.extendify-sdk .sm\:top-auto{top:auto}.extendify-sdk .sm\:m-0{margin:0}.extendify-sdk .sm\:my-6{margin-bottom:1.5rem;margin-top:1.5rem}.extendify-sdk .sm\:mt-64{margin-top:16rem}.extendify-sdk .sm\:mb-8{margin-bottom:2rem}.extendify-sdk .sm\:block{display:block}.extendify-sdk .sm\:flex{display:flex}.extendify-sdk .sm\:hidden{display:none}.extendify-sdk .sm\:h-auto{height:auto}.extendify-sdk .sm\:min-h-0{min-height:0}.extendify-sdk .sm\:w-56{width:14rem}.extendify-sdk .sm\:w-auto{width:auto}.extendify-sdk .sm\:w-full{width:100%}.extendify-sdk .sm\:translate-x-6{--tw-translate-x:1.5rem}.extendify-sdk .sm\:translate-x-8{--tw-translate-x:2rem}.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem}.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .sm\:border-0{border-width:0}.extendify-sdk .sm\:p-0{padding:0}.extendify-sdk .sm\:px-0{padding-left:0;padding-right:0}.extendify-sdk .sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.extendify-sdk .sm\:px-12{padding-left:3rem;padding-right:3rem}.extendify-sdk .sm\:py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .sm\:py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .sm\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.extendify-sdk .sm\:pt-0{padding-top:0}.extendify-sdk .sm\:pt-6{padding-top:1.5rem}.extendify-sdk .sm\:pr-8{padding-right:2rem}.extendify-sdk .sm\:pb-6{padding-bottom:1.5rem}.extendify-sdk .sm\:pl-0{padding-left:0}.extendify-sdk .sm\:pl-12{padding-left:3rem}.extendify-sdk .sm\:text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .sm\:text-3xl{font-size:2rem;line-height:2.5rem}.extendify-sdk .sm\:opacity-0{opacity:0}}@media (min-width:782px){.extendify-sdk .md\:-mt-32{margin-top:-8rem}.extendify-sdk .md\:flex{display:flex}.extendify-sdk .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .md\:p-16{padding:4rem}.extendify-sdk .md\:pb-0{padding-bottom:0}}@media (min-width:1080px){.extendify-sdk .lg\:static{position:static}.extendify-sdk .lg\:absolute{position:absolute}.extendify-sdk .lg\:sticky{position:sticky}.extendify-sdk .lg\:mx-0{margin-left:0;margin-right:0}.extendify-sdk .lg\:-mx-2{margin-left:-.5rem;margin-right:-.5rem}.extendify-sdk .lg\:-ml-px{margin-left:-1px}.extendify-sdk .lg\:block{display:block}.extendify-sdk .lg\:flex{display:flex}.extendify-sdk .lg\:h-full{height:100%}.extendify-sdk .lg\:w-72{width:18rem}.extendify-sdk .lg\:w-1\/2{width:50%}.extendify-sdk .lg\:flex-row{flex-direction:row}.extendify-sdk .lg\:items-center{align-items:center}.extendify-sdk .lg\:justify-between{justify-content:space-between}.extendify-sdk .lg\:space-x-16>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(4rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(4rem*var(--tw-space-x-reverse))}.extendify-sdk .lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .lg\:divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.extendify-sdk .lg\:overflow-hidden{overflow:hidden}.extendify-sdk .lg\:border-t-0{border-top-width:0}.extendify-sdk .lg\:border-b{border-bottom-width:1px}.extendify-sdk .lg\:p-5{padding:1.25rem}.extendify-sdk .lg\:px-0{padding-left:0;padding-right:0}.extendify-sdk .lg\:px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .lg\:px-20{padding-left:5rem;padding-right:5rem}.extendify-sdk .lg\:pt-0{padding-top:0}.extendify-sdk .lg\:pl-px{padding-left:1px}.extendify-sdk .lg\:leading-none{line-height:1}}@media (min-width:1280px){.extendify-sdk .xl\:w-1\/2{width:50%}.extendify-sdk .xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.extendify-sdk .xl\:space-x-32>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(8rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(8rem*var(--tw-space-x-reverse))}.extendify-sdk .xl\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}}@media (min-width:1440px){.extendify-sdk .\32xl\:mb-16{margin-bottom:4rem}.extendify-sdk .\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.extendify-sdk .\32xl\:p-28{padding:7rem}.extendify-sdk .\32xl\:pb-0{padding-bottom:0}}@media (min-width:1600px){.extendify-sdk .\33xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
|
|
extendify-sdk/public/build/extendify-sdk.js
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
-
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),i=n(570),o=n(940),a=n(581),s=n(574),u=n(845),l=n(338),c=n(524);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers,p=e.responseType;r.isFormData(f)&&delete d["Content-Type"];var m=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+v)}var y=s(e.baseURL,e.url);function x(){if(m){var r="getAllResponseHeaders"in m?u(m.getAllResponseHeaders()):null,o={data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m};i(t,n,o),m=null}}if(m.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,"onloadend"in m?m.onloadend=x:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(x)},m.onabort=function(){m&&(n(c("Request aborted",e,"ECONNABORTED",m)),m=null)},m.onerror=function(){n(c("Network Error",e,null,m)),m=null},m.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(c(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||l(y))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}"setRequestHeader"in m&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:m.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),p&&"json"!==p&&(m.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){m&&(m.abort(),n(e),m=null)})),f||(f=null),m.send(f)}))}},57:(e,t,n)=>{"use strict";var r=n(485),i=n(875),o=n(29),a=n(941);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=s(n(141));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(132),u.CancelToken=n(603),u.isCancel=n(475),u.all=function(e){return Promise.all(e)},u.spread=n(739),u.isAxiosError=n(835),e.exports=u,e.exports.default=u},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),i=n(581),o=n(96),a=n(9),s=n(941),u=n(144),l=u.validators;function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var c=[a,void 0];for(Array.prototype.unshift.apply(c,n),c=c.concat(o),i=Promise.resolve(e);c.length;)i=i.then(c.shift(),c.shift());return i}for(var f=e;n.length;){var d=n.shift(),p=n.shift();try{f=d(f)}catch(e){p(e);break}}try{i=a(f)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},c.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=c},96:(e,t,n)=>{"use strict";var r=n(485);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},574:(e,t,n)=>{"use strict";var r=n(642),i=n(288);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},9:(e,t,n)=>{"use strict";var r=n(485),i=n(212),o=n(475),a=n(141);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,l),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var c=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return r.forEach(f,l),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485),i=n(141);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),i=n(485),o=n(895),a=n(953),s={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(l=n(387)),l),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){c.headers[e]=i.merge(s)})),e.exports=c},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},895:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},144:(e,t,n)=>{"use strict";var r=n(995),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&s(t);function a(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(a(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},485:(e,t,n)=>{"use strict";var r=n(875),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},995:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_from":"axios@0.21.4"}')},446:(e,t,n)=>{"use strict";const r=wp.element;var i=n(804),o=n.n(i);function a(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let a=r(t);function s(){const n=r(t);if(!o(a,n)){const t=a;e(a=n,t)}}return n.add(s),()=>n.delete(s)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const s="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;function u(e){const t="function"==typeof e?a(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,i.useReducer)((e=>e+1),0),o=t.getState(),a=(0,i.useRef)(o),u=(0,i.useRef)(e),l=(0,i.useRef)(n),c=(0,i.useRef)(!1),f=(0,i.useRef)();let d;void 0===f.current&&(f.current=e(o));let p=!1;(a.current!==o||u.current!==e||l.current!==n||c.current)&&(d=e(o),p=!n(f.current,d)),s((()=>{p&&(f.current=d),a.current=o,u.current=e,l.current=n,c.current=!1}));const m=(0,i.useRef)(o);return s((()=>{const e=()=>{try{const e=t.getState(),n=u.current(e);l.current(f.current,n)||(a.current=e,f.current=n,r())}catch(e){c.current=!0,r()}},n=t.subscribe(e);return t.getState()!==m.current&&e(),n}),[]),p?d:f.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}var l="pattern",c=12;function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=window.wp.blocks.createBlock;return e.map((function(e){var n=f(Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],3),r=n[0],i=n[1],o=n[2];return t(r,i,p(void 0===o?[]:o))}))}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e,t){return"pattern"===e&&"tax_categories"===t?"Default":""},b=u((function(e,t){return{templates:[],skipNextFetch:!1,fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},searchParams:{taxonomies:{},type:l,search:""},nextPage:"",removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:y(new Map([].concat(y(t().templates),y(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(n){var r=Object.keys(n).reduce((function(e,n){return e[n]=function(e){return g(t().searchParams.type,e)}(n),e}),{}),i={};i.taxonomies=Object.assign({},r,t().searchParams.taxonomies),e({taxonomyDefaultState:r,searchParams:h({},Object.assign(t().searchParams,i))})},setActive:function(t){var n;if(e({activeTemplate:t}),Object.keys(t).length>0&&w.setState({currentPage:"single"}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code){var r=window.wp.blocks.parse;e({activeTemplateBlocks:p(r(t.fields.code))})}},resetTaxonomy:function(e){var n;t().updateTaxonomies(v({},e,null!==(n=t().taxonomyDefaultState[e])&&void 0!==n?n:""))},updateTaxonomies:function(e){var n={};n.taxonomies=Object.assign({},t().searchParams.taxonomies,e),t().updateSearchParams(n)},updateSearchParams:function(n){var r,i;null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState),null!=n&&n.type&&["","Default"].includes(null===(r=t().searchParams)||void 0===r||null===(i=r.taxonomies)||void 0===i?void 0:i.tax_categories)&&t().updateTaxonomies({tax_categories:g(n.type,"tax_categories")});var o=Object.assign({},t().searchParams,n);JSON.stringify(o)!==JSON.stringify(t().searchParams)&&e({templates:[],nextPage:"",searchParams:o})}}})),w=u((function(e){return{open:!1,metaData:{},currentPage:"main",setOpen:function(t){e({open:t}),t&&b.getState().removeTemplates()}}})),j=n(135),k=n.n(j),S=Object.defineProperty,_=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,N=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C=(e,t)=>{for(var n in t||(t={}))O.call(t,n)&&N(e,n,t[n]);if(_)for(var n of _(t))E.call(t,n)&&N(e,n,t[n]);return e};const P=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>P(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>P(t)(e)}}},A=(e,t)=>(n,r,i)=>{const{name:o,getStorage:a=(()=>localStorage),serialize:s=JSON.stringify,deserialize:u=JSON.parse,blacklist:l,whitelist:c,onRehydrateStorage:f,version:d=0,migrate:p,merge:m=((e,t)=>C(C({},t),e))}=t||{};let h;try{h=a()}catch(e){}if(!h)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...e)}),r,i);const v=P(s),y=()=>{const e=C({},r());let t;c&&Object.keys(e).forEach((t=>{!c.includes(t)&&delete e[t]})),l&&l.forEach((t=>delete e[t]));const n=v({state:e,version:d}).then((e=>h.setItem(o,e))).catch((e=>{t=e}));if(t)throw t;return n},x=i.setState;i.setState=(e,t)=>{x(e,t),y()};const g=e(((...e)=>{n(...e),y()}),r,i);let b;const w=(null==f?void 0:f(r()))||void 0;return P(h.getItem.bind(h))(o).then((e=>{if(e)return u(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===d)return e.state;if(p)return p(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(b=m(e,g),n(b,!0),y()))).then((()=>{null==w||w(b,void 0)})).catch((e=>{null==w||w(void 0,e)})),b||g};var T=n(206),F=n.n(T)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function L(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}F.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(L(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(L(e.response))}(e)})),F.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=K.getState().remainingImports(),e.data.entry_point=K.getState().entryPoint,e.data.total_imports=K.getState().imports),e}(e))}),(function(e){return e}));var I=function(){return F.get("user")},D=function(e){return F.get("user-meta",{params:{key:e}})},R=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),F.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},M=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),F.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})},V=function(e){var t=new FormData;return t.append("email",e),F.post("register-mailing-list",t,{headers:{"Content-Type":"multipart/form-data"}})};function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){q(o,r,i,a,s,"next",e)}function s(e){q(o,r,i,a,s,"throw",e)}a(void 0)}))}}var W,Z,$,G,J={getItem:(Z=z(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return Z.apply(this,arguments)}),setItem:(W=z(k().mark((function e(t,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return W.apply(this,arguments)})},K=u(A((function(e,t){return{email:"",apiKey:"",imports:0,uuid:"",registration:{email:""},allowedImports:0,entryPoint:"not-set",enabled:!0,hasClickedThroughWelcomePage:!1,canInstallPlugins:!1,canActivatePlugins:!1,preferredOptions:{taxonomies:{},type:"",search:""},incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0},updatePreferredOption:function(n,r){var i,o,a;Object.prototype.hasOwnProperty.call(t().preferredOptions,n)||(r=Object.assign({},null!==(o=null===(a=t().preferredOptions)||void 0===a?void 0:a.taxonomies)&&void 0!==o?o:{},U({},n,r)),n="taxonomies");var s="type"==n&&r!==(null===(i=t().preferredOptions)||void 0===i?void 0:i.type);e({preferredOptions:B({},Object.assign({},t().preferredOptions,U({},n,r),s?{taxonomies:{}}:{}))})}}}),{name:"extendify-user",getStorage:function(){return J}}));function Y(){return(Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function X(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function te(e,t){if(e in t){for(var n=t[e],r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,i):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,te),a}function ne(e){var t=e.props,n=e.slot,r=e.defaultTag,i=e.features,o=e.visible,a=void 0===o||o,s=e.name;if(a)return re(t,n,r,s);var u=null!=i?i:$.None;if(u&$.Static){var l=t.static,c=void 0!==l&&l,f=X(t,["static"]);if(c)return re(f,n,r,s)}if(u&$.RenderStrategy){var d,p=t.unmount,m=void 0===p||p,h=X(t,["unmount"]);return te(m?G.Unmount:G.Hidden,((d={})[G.Unmount]=function(){return null},d[G.Hidden]=function(){return re(Y({},h,{hidden:!0,style:{display:"none"}}),n,r,s)},d))}return re(t,n,r,s)}function re(e,t,n,r){var o;void 0===t&&(t={});var a=oe(e,["unmount","static"]),s=a.as,u=void 0===s?n:s,l=a.children,c=a.refName,f=void 0===c?"ref":c,d=X(a,["as","children","refName"]),p=void 0!==e.ref?((o={})[f]=e.ref,o):{},m="function"==typeof l?l(t):l;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),u===i.Fragment&&Object.keys(d).length>0){if(!(0,i.isValidElement)(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,i.cloneElement)(m,Object.assign({},function(e,t,n){for(var r,i=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(i,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},a=ee(n);!(r=a()).done;)o();return i}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(oe(d,["ref"])),m.props,["onClick"]),p))}return(0,i.createElement)(u,Object.assign({},oe(d,["ref"]),u!==i.Fragment&&p),m)}function ie(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function oe(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),i=ee(t);!(n=i()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}($||($={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(G||(G={}));var ae="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,se={serverHandoffComplete:!1};function ue(){var e=(0,i.useState)(se.serverHandoffComplete),t=e[0],n=e[1];return(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){!1===se.serverHandoffComplete&&(se.serverHandoffComplete=!0)}),[]),t}var le=0;function ce(){return++le}function fe(){var e=ue(),t=(0,i.useState)(e?ce:null),n=t[0],r=t[1];return ae((function(){null===n&&r(ce())}),[n]),null!=n?""+n:void 0}function de(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var pe,me,he=(0,i.createContext)(null);function ve(){return(0,i.useContext)(he)}function ye(e){var t=e.value,n=e.children;return o().createElement(he.Provider,{value:t},n)}function xe(){var e=(0,i.useRef)(!0);return(0,i.useEffect)((function(){e.current=!1}),[]),e.current}function ge(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=ee(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function be(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function we(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function je(e,t,n,r,i,o){var a=ge(),s=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return we.apply(void 0,[e].concat(i)),be.apply(void 0,[e].concat(t,n)),a.nextFrame((function(){we.apply(void 0,[e].concat(n)),be.apply(void 0,[e].concat(r)),a.add(function(e,t){var n=ge();if(!e)return n.dispose;var r=getComputedStyle(e),i=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=i[0],a=i[1];return 0!==o?n.setTimeout((function(){t(me.Finished)}),o+a):t(me.Finished),n.add((function(){return t(me.Cancelled)})),n.dispose}(e,(function(n){return we.apply(void 0,[e].concat(r,t)),be.apply(void 0,[e].concat(i)),s(n)})))})),a.add((function(){return we.apply(void 0,[e].concat(t,n,r,i))})),a.add((function(){return s(me.Cancelled)})),a.dispose}function ke(e){return void 0===e&&(e=""),(0,i.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}he.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(pe||(pe={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(me||(me={}));var Se,_e=(0,i.createContext)(null);_e.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(Se||(Se={}));var Oe=(0,i.createContext)(null);function Ee(e){return"children"in e?Ee(e.children):e.current.filter((function(e){return e.state===Se.Visible})).length>0}function Ne(e){var t=(0,i.useRef)(e),n=(0,i.useRef)([]),r=de();(0,i.useEffect)((function(){t.current=e}),[e]);var o=(0,i.useCallback)((function(e,i){var o;void 0===i&&(i=G.Hidden);var a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(te(i,((o={})[G.Unmount]=function(){n.current.splice(a,1)},o[G.Hidden]=function(){n.current[a].state=Se.Hidden},o)),!Ee(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),a=(0,i.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==Se.Visible&&(t.state=Se.Visible):n.current.push({id:e,state:Se.Visible}),function(){return o(e,G.Unmount)}}),[n,o]);return(0,i.useMemo)((function(){return{children:n,register:a,unregister:o}}),[a,o,n])}function Ce(){}Oe.displayName="NestingContext";var Pe=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ae(e){for(var t,n={},r=ee(Pe);!(t=r()).done;){var i,o=t.value;n[o]=null!=(i=e[o])?i:Ce}return n}var Te,Fe=$.RenderStrategy;function Le(e){var t,n=e.beforeEnter,r=e.afterEnter,a=e.beforeLeave,s=e.afterLeave,u=e.enter,l=e.enterFrom,c=e.enterTo,f=e.entered,d=e.leave,p=e.leaveFrom,m=e.leaveTo,h=X(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),v=(0,i.useRef)(null),y=(0,i.useState)(Se.Visible),x=y[0],g=y[1],b=h.unmount?G.Unmount:G.Hidden,w=function(){var e=(0,i.useContext)(_e);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,S=function(){var e=(0,i.useContext)(Oe);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),_=S.register,O=S.unregister,E=xe(),N=fe(),C=(0,i.useRef)(!1),P=Ne((function(){C.current||(g(Se.Hidden),O(N),M.current.afterLeave())}));ae((function(){if(N)return _(N)}),[_,N]),ae((function(){var e;b===G.Hidden&&N&&(j&&x!==Se.Visible?g(Se.Visible):te(x,((e={})[Se.Hidden]=function(){return O(N)},e[Se.Visible]=function(){return _(N)},e)))}),[x,N,_,O,j,b]);var A=ke(u),T=ke(l),F=ke(c),L=ke(f),I=ke(d),D=ke(p),R=ke(m),M=function(e){var t=(0,i.useRef)(Ae(e));return(0,i.useEffect)((function(){t.current=Ae(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:a,afterLeave:s}),V=ue();(0,i.useEffect)((function(){if(V&&x===Se.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,x,V]);var H=E&&!k;ae((function(){var e=v.current;if(e&&!H)return C.current=!0,j&&M.current.beforeEnter(),j||M.current.beforeLeave(),j?je(e,A,T,F,L,(function(e){C.current=!1,e===me.Finished&&M.current.afterEnter()})):je(e,I,D,R,L,(function(e){C.current=!1,e===me.Finished&&(Ee(P)||(g(Se.Hidden),O(N),M.current.afterLeave()))}))}),[M,N,C,O,P,v,H,j,A,T,F,I,D,R]);var B={ref:v},U=h;return o().createElement(Oe.Provider,{value:P},o().createElement(ye,{value:te(x,(t={},t[Se.Visible]=pe.Open,t[Se.Hidden]=pe.Closed,t))},ne({props:Y({},U,B),defaultTag:"div",features:Fe,visible:x===Se.Visible,name:"Transition.Child"})))}function Ie(e){var t,n=e.show,r=e.appear,a=void 0!==r&&r,s=e.unmount,u=X(e,["show","appear","unmount"]),l=ve();void 0===n&&null!==l&&(n=te(l,((t={})[pe.Open]=!0,t[pe.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var c=(0,i.useState)(n?Se.Visible:Se.Hidden),f=c[0],d=c[1],p=Ne((function(){d(Se.Hidden)})),m=xe(),h=(0,i.useMemo)((function(){return{show:n,appear:a||!m}}),[n,a,m]);(0,i.useEffect)((function(){n?d(Se.Visible):Ee(p)||d(Se.Hidden)}),[n,p]);var v={unmount:s};return o().createElement(Oe.Provider,{value:p},o().createElement(_e.Provider,{value:h},ne({props:Y({},v,{as:i.Fragment,children:o().createElement(Le,Object.assign({},v,u))}),defaultTag:i.Fragment,features:Fe,visible:f===Se.Visible,name:"Transition"})))}function De(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,i.useRef)(t);return(0,i.useEffect)((function(){r.current=t}),[t]),(0,i.useCallback)((function(e){for(var t,n=ee(r.current);!(t=n()).done;){var i=t.value;null!=i&&("function"==typeof i?i(e):i.current=e)}}),[r])}function Re(e){for(var t,n,r=e.parentElement,i=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(i=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(i))&&o}function Me(e,t,n){var r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Ie.Child=function(e){var t=null!==(0,i.useContext)(_e),n=null!==ve();return!t&&n?o().createElement(Ie,Object.assign({},e)):o().createElement(Le,Object.assign({},e))},Ie.Root=Ie,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Te||(Te={}));var Ve,He,Be,Ue,qe,ze=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function We(e){null==e||e.focus({preventScroll:!0})}function Ze(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(ze))}(e),r=document.activeElement,i=function(){if(t&(Ve.First|Ve.Next))return Be.Next;if(t&(Ve.Previous|Ve.Last))return Be.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),o=function(){if(t&Ve.First)return 0;if(t&Ve.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Ve.Next)return Math.max(0,n.indexOf(r))+1;if(t&Ve.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&Ve.NoScroll?{preventScroll:!0}:{},s=0,u=n.length,l=void 0;do{var c;if(s>=u||s+u<=0)return He.Error;var f=o+s;if(t&Ve.WrapAround)f=(f+u)%u;else{if(f<0)return He.Underflow;if(f>=u)return He.Overflow}null==(c=l=n[f])||c.focus(a),s+=i}while(l!==document.activeElement);return l.hasAttribute("tabindex")||l.setAttribute("tabindex","0"),He.Success}function $e(e,t,n){void 0===t&&(t=qe.All);var r=void 0===n?{}:n,o=r.initialFocus,a=r.containers,s=(0,i.useRef)("undefined"!=typeof window?document.activeElement:null),u=(0,i.useRef)(null),l=de(),c=Boolean(t&qe.RestoreFocus),f=Boolean(t&qe.InitialFocus);(0,i.useEffect)((function(){c&&(s.current=document.activeElement)}),[c]),(0,i.useEffect)((function(){if(c)return function(){We(s.current),s.current=null}}),[c]),(0,i.useEffect)((function(){if(f&&e.current){var t=document.activeElement;if(null==o?void 0:o.current){if((null==o?void 0:o.current)===t)return void(u.current=t)}else if(e.current.contains(t))return void(u.current=t);(null==o?void 0:o.current)?We(o.current):Ze(e.current,Ve.First)===He.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=document.activeElement}}),[e,o,f]),Me("keydown",(function(n){t&qe.TabLock&&e.current&&n.key===Te.Tab&&(n.preventDefault(),Ze(e.current,(n.shiftKey?Ve.Previous:Ve.Next)|Ve.WrapAround)===He.Success&&(u.current=document.activeElement))})),Me("focus",(function(n){if(t&qe.FocusLock){var r=new Set(null==a?void 0:a.current);if(r.add(e),r.size){var i=u.current;if(i&&l.current){var o=n.target;o&&o instanceof HTMLElement?!function(e,t){for(var n,r=ee(e);!(n=r()).done;){var i;if(null==(i=n.value.current)?void 0:i.contains(t))return!0}return!1}(r,o)?(n.preventDefault(),n.stopPropagation(),We(i)):(u.current=o,We(o)):We(u.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Ve||(Ve={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(He||(He={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(Be||(Be={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(Ue||(Ue={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(qe||(qe={}));var Ge=new Set,Je=new Map;function Ke(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Ye(e){var t=Je.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Xe=(0,i.createContext)(!1);function Qe(e){return o().createElement(Xe.Provider,{value:e.force},e.children)}const et=ReactDOM;function tt(){var e=(0,i.useContext)(Xe),t=(0,i.useContext)(ot),n=(0,i.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],o=n[1];return(0,i.useEffect)((function(){e||null!==t&&o(t.current)}),[t,o,e]),r}var nt=i.Fragment;function rt(e){var t=e,n=tt(),r=(0,i.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],o=ue();return ae((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),o&&n&&r?(0,et.createPortal)(ne({props:t,defaultTag:nt,name:"Portal"}),r):null}var it=i.Fragment,ot=(0,i.createContext)(null);rt.Group=function(e){var t=e.target,n=X(e,["target"]);return o().createElement(ot.Provider,{value:t},ne({props:n,defaultTag:it,name:"Popover.Group"}))};var at=(0,i.createContext)(null);function st(){var e=(0,i.useContext)(at);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,st),t}return e}var ut,lt,ct,ft,dt=(0,i.createContext)((function(){}));function pt(e){var t=e.children,n=e.onUpdate,r=e.type,a=e.element,s=(0,i.useContext)(dt),u=(0,i.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),s.apply(void 0,t)}),[s,n]);return ae((function(){return u(ut.Add,r,a),function(){return u(ut.Remove,r,a)}}),[u,r,a]),o().createElement(dt.Provider,{value:u},t)}dt.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(ut||(ut={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ct||(ct={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(ft||(ft={}));var mt=((lt={})[ft.SetTitleId]=function(e,t){return e.titleId===t.id?e:Y({},e,{titleId:t.id})},lt),ht=(0,i.createContext)(null);function vt(e){var t=(0,i.useContext)(ht);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+wt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,vt),n}return t}function yt(e,t){return te(t.type,mt,e,t)}ht.displayName="DialogContext";var xt=$.RenderStrategy|$.Static,gt=ie((function(e,t){var n,r=e.open,a=e.onClose,s=e.initialFocus,u=X(e,["open","onClose","initialFocus"]),l=(0,i.useState)(0),c=l[0],f=l[1],d=ve();void 0===r&&null!==d&&(r=te(d,((n={})[pe.Open]=!0,n[pe.Closed]=!1,n)));var p=(0,i.useRef)(new Set),m=(0,i.useRef)(null),h=De(m,t),v=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!v&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof a)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+a);var x=r?ct.Open:ct.Closed,g=null!==d?d===pe.Open:x===ct.Open,b=(0,i.useReducer)(yt,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,i.useCallback)((function(){return a(!1)}),[a]),S=(0,i.useCallback)((function(e){return j({type:ft.SetTitleId,id:e})}),[j]),_=ue()&&x===ct.Open,O=c>1,E=null!==(0,i.useContext)(ht);$e(m,_?te(O?"parent":"leaf",{parent:qe.RestoreFocus,leaf:qe.All}):qe.None,{initialFocus:s,containers:p}),function(e,t){void 0===t&&(t=!0),ae((function(){if(t&&e.current){var n=e.current;Ge.add(n);for(var r,i=ee(Je.keys());!(r=i()).done;){var o=r.value;o.contains(n)&&(Ye(o),Je.delete(o))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=ee(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===Ge.size&&(Je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ke(e))}})),function(){if(Ge.delete(n),Ge.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!Je.has(e)){for(var t,n=ee(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}Je.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ke(e)}}));else for(var e,t=ee(Je.keys());!(e=t()).done;){var r=e.value;Ye(r),Je.delete(r)}}}}),[t])}(m,!!O&&_),Me("mousedown",(function(e){var t,n=e.target;x===ct.Open&&(O||(null==(t=m.current)?void 0:t.contains(n))||k())})),Me("keydown",(function(e){e.key===Te.Escape&&x===ct.Open&&(O||(e.preventDefault(),e.stopPropagation(),k()))})),(0,i.useEffect)((function(){if(x===ct.Open&&!E){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[x,E]),(0,i.useEffect)((function(){if(x===ct.Open&&m.current){var e=new IntersectionObserver((function(e){for(var t,n=ee(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(m.current),function(){return e.disconnect()}}}),[x,m,k]);var N=function(){var e=(0,i.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=(0,i.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return o().createElement(at.Provider,{value:r},e.children)}}),[n])]}(),C=N[0],P=N[1],A="headlessui-dialog-"+fe(),T=(0,i.useMemo)((function(){return[{dialogState:x,close:k,setTitleId:S},w]}),[x,w,k,S]),F=(0,i.useMemo)((function(){return{open:x===ct.Open}}),[x]),L={ref:h,id:A,role:"dialog","aria-modal":x===ct.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":C,onClick:function(e){e.stopPropagation()}},I=u;return o().createElement(pt,{type:"Dialog",element:m,onUpdate:(0,i.useCallback)((function(e,t,n){var r;"Dialog"===t&&te(e,((r={})[ut.Add]=function(){p.current.add(n),f((function(e){return e+1}))},r[ut.Remove]=function(){p.current.add(n),f((function(e){return e-1}))},r))}),[])},o().createElement(Qe,{force:!0},o().createElement(rt,null,o().createElement(ht.Provider,{value:T},o().createElement(rt.Group,{target:m},o().createElement(Qe,{force:!1},o().createElement(P,{slot:F,name:"Dialog.Description"},ne({props:Y({},I,L),slot:F,defaultTag:"div",features:xt,visible:g,name:"Dialog"}))))))))})),bt=ie((function e(t,n){var r=vt([wt.displayName,e.name].join("."))[0],o=r.dialogState,a=r.close,s=De(n),u="headlessui-dialog-overlay-"+fe(),l=(0,i.useCallback)((function(e){if(Re(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}),[a]),c=(0,i.useMemo)((function(){return{open:o===ct.Open}}),[o]);return ne({props:Y({},t,{ref:s,id:u,"aria-hidden":!0,onClick:l}),slot:c,defaultTag:"div",name:"Dialog.Overlay"})}));var wt=Object.assign(gt,{Overlay:bt,Title:function e(t){var n=vt([wt.displayName,e.name].join("."))[0],r=n.dialogState,o=n.setTitleId,a="headlessui-dialog-title-"+fe();(0,i.useEffect)((function(){return o(a),function(){return o(null)}}),[a,o]);var s=(0,i.useMemo)((function(){return{open:r===ct.Open}}),[r]);return ne({props:Y({},t,{id:a}),slot:s,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=st(),n="headlessui-description-"+fe();ae((function(){return t.register(n)}),[n,t.register]);var r=e,i=Y({},t.props,{id:n});return ne({props:Y({},r,i),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const jt=wp.i18n;var kt=function(){return F.get("meta-data")},St=function(e){return F.post("simple-ping",{action:e})},_t=n(246);function Ot(){var e=b((function(e){return e.updateSearchParams})),t=function(t){St("welcome-".concat(null!=t?t:"closed")),K.setState({hasClickedThroughWelcomePage:!0}),e({type:null!=t?t:"pattern"}),w.setState({currentPage:"main"})};(0,r.useEffect)((function(){St("welcome-opened")}),[]);var n=(0,_t.jsx)("div",{className:"w-full h-16 relative z-10 border-solid border-0 flex-shrink-0",children:(0,_t.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,_t.jsx)("div",{className:"flex space-x-12 h-full"}),(0,_t.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,_t.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return t()},children:[(0,_t.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,_t.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,_t.jsx)("span",{className:"sr-only",children:(0,jt.__)("Close library","extendify-sdk")})]})})]})}),i="Redux"===window.extendifySdkData.source?(0,jt.__)("Welcome to the Redux Library by Extendify","extendify-sdk"):(0,jt.__)("Welcome to the Extendify library","extendify-sdk");return(0,_t.jsxs)("div",{className:"w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-white",children:[n,(0,_t.jsxs)("section",{className:"flex-grow w-full justify-between flex flex-col overflow-y-scroll",children:[(0,_t.jsx)("div",{className:"flex items-center flex-grow",children:(0,_t.jsxs)("div",{className:"w-full p-8 max-w-screen-2xl mx-auto lg:space-x-16 lg:flex space-y-16 lg:space-y-0",children:[(0,_t.jsxs)("div",{className:"flex-grow text-left",children:[(0,_t.jsx)("h1",{className:"m-0 mb-10 text-5xl",children:i}),(0,_t.jsxs)("div",{className:"max-w-2xl mb-24",children:[(0,_t.jsx)("p",{className:"mb-10 leading-loose",children:(0,jt.__)("Congratulations! You have access to our entire library of Gutenberg patterns and templates. You can add up to 3 templates or patterns to your site completely free.","extendify-sdk")}),(0,_t.jsx)("p",{className:"mb-6 leading-loose",children:(0,jt.__)("All patterns and templates are pre-designed to look beautiful with options to fit your style. They also keep your site running lightning fast by using only core blocks with no 3rd party page builder required.","extendify-sdk")}),(0,_t.jsx)("a",{className:"text-sm text-extendify-link underline",href:"https://extendify.com?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,jt.__)("Learn more about Extendify","extendify-sdk")})]}),(0,_t.jsx)("h2",{className:"font-bold border-b border-black max-w-lg pb-2 mb-1",children:(0,jt.__)("Don't want the library in your editor?","extendify-sdk")}),(0,_t.jsxs)("div",{className:"",children:[(0,_t.jsx)("p",{children:(0,jt.sprintf)((0,jt.__)("Extendify was included with the %s plugin.","extendify-sdk"),window.extendifySdkData.source)}),(0,_t.jsx)("a",{className:"text-xs text-extendify-link underline",href:"https://extendify.com/how-to-disable-the-extendify-library/?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,jt.__)("Learn how to remove the library","extendify-sdk")})]})]}),(0,_t.jsx)("div",{className:"flex-shrink-0 flex items-end",children:(0,_t.jsxs)("div",{className:"flex-grow flex items-center space-y-4 xl:space-y-8 flex-col",children:[(0,_t.jsxs)("button",{type:"button",onClick:function(){return t("pattern")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex space-y-4 flex-col items-center justify-center p-8 lg:px-0 w-80",children:[(0,_t.jsx)("h3",{className:"m-0 text-gray-900",children:(0,jt.__)("Sections","extendify-sdk")}),(0,_t.jsx)("span",{children:(0,_t.jsxs)("svg",{className:"mt-1",xmlns:"http://www.w3.org/2000/svg",width:"206",height:"122",viewBox:"0 0 206 122",fill:"none",children:[(0,_t.jsx)("path",{d:"M69 0H0V59H69V0Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M204 0H79V60H204V0Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M62.166 25H9.16602V28H62.166V25Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M63.166 18H10.166V21H63.166V18Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M62.166 34H9.16602V39H62.166V34Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M62.166 43H9.16602V48H62.166V43Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M140.166 25H87.166V28H140.166V25Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M140.166 34H87.166V39H140.166V34Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M140.166 43H87.166V48H140.166V43Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M197.166 25H151.166V28H197.166V25Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M141.166 17H88.166V20H141.166V17Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M198.166 17H152.166V20H198.166V17Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M62.166 10H9.16602V13H62.166V10Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M140.166 9H87.166V12H140.166V9Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M197.166 9H151.166V12H197.166V9Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M197.166 34H151.166V39H197.166V34Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M197.166 43H151.166V48H197.166V43Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M154.172 77.8088H0V121.216H154.172V77.8088Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M133.637 110.446C141.077 110.446 147.109 104.75 147.109 97.7229C147.109 90.6963 141.077 85 133.637 85C126.197 85 120.166 90.6963 120.166 97.7229C120.166 104.75 126.197 110.446 133.637 110.446Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M205.166 78H162.166V121H205.166V78Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M183.803 111.637C191.243 111.637 197.275 105.941 197.275 98.9141C197.275 91.8874 191.243 86.1912 183.803 86.1912C176.363 86.1912 170.332 91.8874 170.332 98.9141C170.332 105.941 176.363 111.637 183.803 111.637Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M113.695 88.7898H13.4082V100.764H113.695V88.7898Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M113.695 105.255H13.4082V109.745H113.695V105.255Z",fill:"#F9F9F9"})]})}),(0,_t.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,jt.__)("View patterns","extendify-sdk")})]}),(0,_t.jsxs)("button",{type:"button",onClick:function(){return t("template")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex space-y-4 flex-col items-center justify-center p-8 lg:px-0 w-80",children:[(0,_t.jsx)("h3",{className:"m-0 text-gray-900",children:(0,jt.__)("Full pages","extendify-sdk")}),(0,_t.jsx)("span",{children:(0,_t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"156",height:"128",viewBox:"0 0 156 128",fill:"none",children:[(0,_t.jsx)("path",{d:"M155.006 38.4395H0.833984V81.8471H155.006V38.4395Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M155 0H1V36H155V0Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M148 7H10V28H148V7Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M147.521 47.4204H9.81445V50.414H147.521V47.4204Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M147.521 56.4012H9.81445V60.8917H147.521V56.4012Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M147.521 65.3821H9.81445V69.8726H147.521V65.3821Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M155.006 83.8089H0.833984V127.217H155.006V83.8089Z",fill:"#DFDFDF"}),(0,_t.jsx)("path",{d:"M21.7897 118.236C29.2297 118.236 35.261 112.539 35.261 105.513C35.261 98.486 29.2297 92.7898 21.7897 92.7898C14.3497 92.7898 8.31836 98.486 8.31836 105.513C8.31836 112.539 14.3497 118.236 21.7897 118.236Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M144.529 92.7898H44.2422V104.764H144.529V92.7898Z",fill:"#F9F9F9"}),(0,_t.jsx)("path",{d:"M144.529 109.255H44.2422V113.745H144.529V109.255Z",fill:"#F9F9F9"})]})}),(0,_t.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,jt.__)("View templates","extendify-sdk")})]})]})})]})}),(0,_t.jsxs)("footer",{className:"flex justify-between p-14 w-full",children:[(0,_t.jsx)("div",{children:(0,_t.jsxs)("svg",{className:"block",width:"64",height:"64",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,_t.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),(0,_t.jsx)("button",{type:"button",onClick:function(){return t()},className:"bg-transparent cursor-pointer text-lg text-extendify-link underline",children:(0,jt.__)("Go to library","extendify-sdk")})]})]})]})}const Et=lodash,Nt=wp.components;var Ct=n(42),Pt=n.n(Ct);function At(e){return function(e){if(Array.isArray(e))return Tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ft=u((function(e,t){return{taxonomies:{},openedTaxonomies:[],setTaxonomies:function(t){return e({taxonomies:t})},toggleOpenedTaxonomy:function(n,r){var i=t().openedTaxonomies;e({openedTaxonomies:r?[].concat(At(i),[n]):At(i.filter((function(e){return e!=n})))})}}}));function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rt(e){var t,n=It(e.taxonomy,2),i=n[0],o=n[1],a=b((function(e){return e.updateTaxonomies})),s=b((function(e){return e.resetTaxonomy})),u=b((function(e){return e.searchParams})),l=Ft((function(e){return e.openedTaxonomies})),c=Ft((function(e){return e.toggleOpenedTaxonomy})),f=It((0,r.useState)({}),2),d=f[0],p=f[1],m=It((0,r.useState)({}),2),h=m[0],v=m[1],y=(0,r.useRef)(),x=(0,r.useRef)(),g=(0,r.useRef)(),w=(0,r.useRef)(!0),j=function(e){var t;return(null==u?void 0:u.taxonomies[i])===e.term||(null===(t=e.children)||void 0===t?void 0:t.filter((function(e){return e.term===(null==u?void 0:u.taxonomies[i])})).length)>0},k=(0,r.useCallback)((function(e){var t;return Object.prototype.hasOwnProperty.call(e,"children")?e.children.filter((function(e){return null==e?void 0:e.type.includes(u.type)})).length:null==e||null===(t=e.type)||void 0===t?void 0:t.includes(u.type)}),[u.type]);if((0,r.useEffect)((function(){w.current?w.current=!1:p({})}),[u.type]),(0,r.useEffect)((function(){Object.keys(d).length?setTimeout((function(){requestAnimationFrame((function(){v(y.current.clientHeight),g.current.focus()}))}),200):v("auto")}),[d]),(0,r.useEffect)((function(){!Object.values(o).filter((function(e){return k(e)})).length&&s(i)}),[s,i,k,o]),!Object.keys(o).length||!Object.values(o).filter((function(e){return k(e)})).length)return"";var S=i.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,_t.jsx)(Nt.PanelBody,{title:S,initialOpen:l.includes(i),onToggle:function(e){return c(i,e)},children:(0,_t.jsx)(Nt.PanelRow,{children:(0,_t.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:h},children:[(0,_t.jsxs)("ul",{className:Pt()("p-1 m-0 w-full transform transition duration-200",{"-translate-x-full":Object.keys(d).length}),children:[(0,_t.jsx)("li",{className:"m-0",children:(0,_t.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:x,onClick:function(){a(Lt({},i,"pattern"===u.type&&"tax_categories"===i?"Default":""))},children:(0,_t.jsx)("span",{className:Pt()({"text-wp-theme-500":!(null!==(t=u.taxonomies[i])&&void 0!==t&&t.length)||"Default"===(null==u?void 0:u.taxonomies[i])}),children:"pattern"===u.type&&"tax_categories"===i?(0,jt.__)("Default","extendify-sdk"):(0,jt.__)("All","extendify-sdk")})})}),Object.values(o).filter((function(e){return k(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,_t.jsx)("li",{className:"m-0 w-full",children:(0,_t.jsxs)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){Object.prototype.hasOwnProperty.call(e,"children")?p(e):a(Lt({},i,e.term))},children:[(0,_t.jsx)("span",{className:Pt()({"text-wp-theme-500":j(e)}),children:e.term}),Object.prototype.hasOwnProperty.call(e,"children")&&(0,_t.jsx)("span",{className:"text-black",children:(0,_t.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",className:"stroke-current",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})})})]})},e.term)}))]}),(0,_t.jsxs)("ul",{ref:y,className:Pt()("p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0",{"translate-x-full":!Object.keys(d).length}),children:[Object.values(d).length>0&&(0,_t.jsx)("li",{className:"m-0",children:(0,_t.jsxs)("button",{type:"button",className:"text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:g,onClick:function(){p({}),x.current.focus()},children:[(0,_t.jsx)("svg",{className:"stroke-current transform rotate-180",width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})}),(0,_t.jsx)("span",{children:d.term})]})}),Object.values(d).length&&Object.values(d.children).filter((function(e){return k(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,_t.jsx)("li",{className:"m-0 pl-6 w-full flex justify-between items-center",children:(0,_t.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){a(Lt({},i,e.term))},children:(0,_t.jsx)("span",{className:Pt()({"text-wp-theme-500":j(e)}),children:e.term})})},e.term)}))]})]})})})}function Mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ht(){var e,t=b((function(e){return e.updateSearchParams})),n=Ft((function(e){return e.taxonomies})),i=b((function(e){return e.searchParams})),o=(0,Et.debounce)((function(e){return t({taxonomies:{},search:e})}),500),a=Mt((0,r.useState)(null!==(e=null==i?void 0:i.search)&&void 0!==e?e:""),2),s=a[0],u=a[1];return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("div",{className:"mt-px bg-white mb-6 mx-6 pt-6 lg:mx-0 lg:pt-0",children:[(0,_t.jsx)("label",{className:"sr-only",htmlFor:"extendify-search-input",children:(0,jt.__)("What are you looking for?","extendify-sdk")}),(0,_t.jsx)("input",{id:"extendify-search-input",type:"search",placeholder:(0,jt.__)("What are you looking for?","extendify-sdk"),onChange:function(e){b.setState({nextPage:""}),u(e.target.value),o(e.target.value)},value:s,className:"button-focus bg-gray-100 focus:bg-white border-0 m-0 p-3.5 pb-3 rounded-none text-sm w-full",autoComplete:"off"}),(0,_t.jsx)("svg",{className:"absolute top-3 right-6 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,_t.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),(0,_t.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,_t.jsx)(Nt.Panel,{children:Object.entries(n).map((function(e){return(0,_t.jsx)(Rt,{taxonomy:e},e[0])}))})})]})}function Bt(e){var t=e.taxonomies,n=e.search,r=e.type,i=[],o=Object.entries(t).filter((function(e){return Boolean(e[1].length)})).map((function(e){return"".concat(e[0],' = "').concat(e[1],'"')})).join(", ");return o.length&&i.push(o),(null==n?void 0:n.length)&&i.push('OR(FIND(LOWER("'.concat(n,'"), LOWER(title))!= 0, FIND(LOWER("').concat(n,'"), LOWER({tax_categories})) != 0)')),r.length&&i.push('{type}="'.concat(r,'"')),i.length?"AND(".concat(i.join(", "),")").replace(/\r?\n|\r/g,""):""}function Ut(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function qt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ut(o,r,i,a,s,"next",e)}function s(e){Ut(o,r,i,a,s,"throw",e)}a(void 0)}))}}var zt=0,Wt=function(e){var t=arguments;return qt(k().mark((function n(){var r,i,o,a;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.length>1&&void 0!==t[1]?t[1]:{},zt++,n.next=4,F.post("templates",{filterByFormula:Bt(e),pageSize:null!==(r=null==o?void 0:o.pageSize)&&void 0!==r?r:c,categories:e.taxonomies,search:e.search,type:e.type,offset:null!==(i=o.offset)&&void 0!==i?i:"",initial:1===zt,request_count:zt});case 4:return a=n.sent,n.abrupt("return",a);case 6:case"end":return n.stop()}}),n)})))()},Zt=function(e,t,n){var r,i,o,a;return F.post("related",{pageSize:4,query_type:t,wanted_type:n,categories:null==e||null===(r=e.fields)||void 0===r?void 0:r.tax_categories,pattern_types:null==e||null===(i=e.fields)||void 0===i?void 0:i.tax_pattern_types,style:null==e||null===(o=e.fields)||void 0===o?void 0:o.tax_style,type:null==e||null===(a=e.fields)||void 0===a?void 0:a.type,template_id:null==e?void 0:e.id})},$t=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Gt=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,single:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Jt=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,imported:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})};function Kt(){return(Kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Yt=new Map,Xt=new WeakMap,Qt=0;function en(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Xt.has(n)||(Qt+=1,Xt.set(n,Qt.toString())),Xt.get(n)):"0":e[t]);var n})).toString()}function tn(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=en(e),n=Yt.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},Yt.set(t,n)}return n}(n),i=r.id,o=r.observer,a=r.elements,s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),Yt.delete(i))}}function nn(e){return"function"!=typeof e.children}var rn=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),nn(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=tn(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!nn(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,o=r.children,a=r.as,s=r.tag,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,i.createElement)(a||s||"div",Kt({ref:this.handleNode},u),o)},r}(i.Component);rn.displayName="InView",rn.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function on(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}})),e}function an(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var un=function(){return(0,_t.jsx)("div",{className:"aspect-w-1 aspect-h-1",children:(0,_t.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,_t.jsx)(Nt.Spinner,{})})})};function ln(e){var t,n,i=e.template,o=e.imageLoaded,a=e.setActiveTemplate,s=an((0,r.useState)(!1),2),u=s[0],l=s[1],c=(0,r.useRef)(),f=on();return(0,r.useEffect)((function(){var e,t,n,r,a,s,d;if(!u&&f.current){var p=new Image;p.role="button",p.className="max-w-full block m-auto object-cover",p.onload=function(){f.current&&(l(!0),c.current&&c.current.appendChild(p),o(i.id))},p.src=null!==(e=null==i||null===(t=i.fields)||void 0===t||null===(n=t.screenshot[0])||void 0===n||null===(r=n.thumbnails)||void 0===r||null===(a=r.large)||void 0===a?void 0:a.url)&&void 0!==e?e:null==i||null===(s=i.fields)||void 0===s||null===(d=s.screenshot[0])||void 0===d?void 0:d.url}}),[i,o,u,f]),u?(0,_t.jsxs)("div",{className:"flex flex-col justify-between group overflow-hidden max-w-lg",children:[(0,_t.jsx)("div",{className:"flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden",onClick:a,ref:c}),(0,_t.jsx)("span",{role:"img","aria-hidden":"true",className:"h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"}),(0,_t.jsxs)("div",{className:"bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",role:"button",onClick:a,children:[(0,_t.jsxs)("div",{children:[(0,_t.jsx)("h4",{className:"m-0 font-bold",children:i.fields.display_title}),(0,_t.jsx)("p",{className:"m-0",children:null==i||null===(t=i.fields)||void 0===t||null===(n=t.tax_categories)||void 0===n?void 0:n.filter((function(e){return"default"!==e.toLowerCase()})).join(", ")})]}),(0,_t.jsx)(Nt.Button,{isSecondary:!0,className:"sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100",onClick:function(e){e.stopPropagation(),a()},children:(0,jt.__)("View","extendify-sdk")})]})]}):(0,_t.jsx)(un,{})}function cn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function fn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){cn(o,r,i,a,s,"next",e)}function s(e){cn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function dn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mn(){var e=on(),t=b((function(e){return e.templates})),n=b((function(e){return e.setActive})),o=b((function(e){return e.appendTemplates})),a=dn((0,r.useState)(""),2),s=a[0],u=a[1],l=dn((0,r.useState)(!1),2),c=l[0],f=l[1],d=dn(function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,o=t.trackVisibility,a=t.rootMargin,s=t.root,u=t.triggerOnce,l=t.skip,c=t.initialInView,f=(0,i.useRef)(),d=(0,i.useState)({inView:!!c}),p=d[0],m=d[1],h=(0,i.useCallback)((function(e){void 0!==f.current&&(f.current(),f.current=void 0),l||e&&(f.current=tn(e,(function(e,t){m({inView:e,entry:t}),t.isIntersecting&&u&&f.current&&(f.current(),f.current=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:o,delay:r}))}),[Array.isArray(n)?n.toString():n,s,a,u,l,o,r]);(0,i.useEffect)((function(){f.current||!p.entry||u||l||m({inView:!!c})}));var v=[h,p.inView,p.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}(),2),p=d[0],m=d[1],h=b((function(e){return e.updateSearchParams})),v=b((function(e){return e.searchParams})),y=(0,r.useRef)(b.getState().nextPage),x=(0,r.useRef)(b.getState().searchParams);(0,r.useEffect)((function(){return b.subscribe((function(e){return y.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return b.subscribe((function(e){return x.current=e}),(function(e){return e.searchParams}))}),[]);var g=(0,r.useCallback)(fn(k().mark((function t(){var n,r;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(""),f(!1),t.next=4,Wt(x.current,{offset:y.current}).catch((function(e){console.error(e),u(e&&e.message?e.message:(0,jt.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:if(r=t.sent,e.current){t.next=7;break}return t.abrupt("return");case 7:null!=r&&null!==(n=r.error)&&void 0!==n&&n.length&&u(null==r?void 0:r.error),null!=r&&r.records&&v===x.current&&(b.setState({nextPage:r.offset}),o(r.records),f(r.records.length<=0));case 9:case"end":return t.stop()}}),t)}))),[v,o,e]);return(0,r.useEffect)((function(){Object.keys(x.current.taxonomies).length&&(b.getState().skipNextFetch?b.setState({skipNextFetch:!1}):g())}),[g,x]),(0,r.useEffect)((function(){m&&g()}),[m,g]),s.length?(0,_t.jsxs)("div",{className:"text-left",children:[(0,_t.jsx)("h2",{className:"text-left",children:(0,jt.__)("Server error","extendify-sdk")}),(0,_t.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:s}),(0,_t.jsx)(Nt.Button,{isTertiary:!0,onClick:function(){h({taxonomies:{},search:""}),g()},children:(0,jt.__)("Press here to reload experience")})]}):c?null!=v&&v.search.length?(0,_t.jsx)("h2",{className:"text-left",children:(0,jt.sprintf)((0,jt.__)("No results for %s.","extendify-sdk"),null==v?void 0:v.search)}):(0,_t.jsx)("h2",{className:"text-left",children:(0,jt.__)("No results found.","extendify-sdk")}):t.length?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 pb-32 m-0",children:t.map((function(e){return(0,_t.jsx)("li",{children:(0,_t.jsx)(ln,{template:e,setActiveTemplate:function(){return n(e)},imageLoaded:function(){}})},e.id)}))}),b.getState().nextPage&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:p,style:{zIndex:-1}}),(0,_t.jsx)("div",{className:"my-4",children:(0,_t.jsx)(Nt.Spinner,{})})]})]}):(0,_t.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,_t.jsx)(Nt.Spinner,{})})}function hn(){return 0===K((function(e){return e.apiKey})).length?(0,_t.jsx)("button",{type:"button",className:"components-button inline-block flex-1 text-center hover:bg-gray-100",onClick:function(){return w.setState({currentPage:"login"})},children:(0,jt.__)("Log into account","extendify-sdk")}):(0,_t.jsx)("button",{type:"button",className:"components-button inline-block flex-1 text-center hover:bg-gray-100",onClick:function(){return K.setState({apiKey:""})},children:(0,jt.__)("Log out","extendify-sdk")})}function vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xn(e){var t=e.children,n=K((function(e){return e.apiKey})),i=vn((0,r.useState)(!1),2),o=i[0],a=i[1];return(0,r.useEffect)((function(){a(!n.length||window.location.search.indexOf("DEVMODE")>-1)}),[n]),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("aside",{className:"flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative",children:[(0,_t.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col lg:h-full",children:t[0]}),(0,_t.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 bg-white mb-4 w-72 text-left space-y-4",children:(0,_t.jsx)("div",{className:"border-t border-gray-300 flex divide-x",children:o&&(0,_t.jsx)(hn,{})})})]}),(0,_t.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function gn(){var e=b((function(e){return e.updateSearchParams})),t=b((function(e){return e.searchParams})),n=function(t){return e({type:t})};return(0,_t.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0",children:[(0,_t.jsx)("h4",{className:"sr-only",children:(0,jt.__)("Type select","extendify-sdk")}),(0,_t.jsxs)("button",{type:"button",className:Pt()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t.type,"bg-transparent text-black":"pattern"!==t.type}),onClick:function(){return n("pattern")},children:[(0,_t.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,_t.jsx)("span",{className:"",children:(0,jt.__)("Patterns","extendify-sdk")})]}),(0,_t.jsxs)("button",{type:"button",className:Pt()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t.type,"bg-transparent text-black":"template"!==t.type}),onClick:function(){return n("template")},children:[(0,_t.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,_t.jsx)("span",{className:"",children:(0,jt.__)("Page templates","extendify-sdk")})]})]})}function bn(){var e=b((function(e){return e.searchParams}));return(0,_t.jsx)("div",{className:"hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none",children:Object.entries(e.taxonomies).map((function(t){return"template"===e.type&&"tax_pattern_types"===t[0]||"template"===e.type&&"tax_features"===t[0]||"pattern"===e.type&&"tax_page_types"===t[0]?"":(0,_t.jsxs)("div",{className:"lg:px-2 text-left",children:[(0,_t.jsx)("span",{className:"font-bold",children:(n=t[0],n.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,_t.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function wn(e){var t,n,r,i,o,a,s=e.className,u=K((function(e){return e.remainingImports})),l=K((function(e){return e.apiKey})),c=K((function(e){return e.allowedImports})),f=w((function(e){return e.metaData})),d=w((function(e){return e.setOpen}));return(0,_t.jsx)("div",{className:s,children:(0,_t.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,_t.jsxs)("div",{className:"flex space-x-12 h-full",children:[(0,_t.jsxs)("div",{className:"bg-transparent font-bold flex items-center space-x-1.5 lg:w-72",children:[(0,_t.jsxs)("svg",{className:"",width:"30",height:"30",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,_t.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,_t.jsx)("span",{className:"text-sm transform translate-y-0.5 whitespace-nowrap",children:(0,jt.__)("Extendify Library","extendify-sdk")})]}),!l.length&&(0,_t.jsx)(_t.Fragment,{children:(0,_t.jsxs)("div",{className:"items-center ml-8 h-full hidden md:flex",children:[(0,_t.jsx)("div",{className:"m-0 p-0 px-6 text-sm bg-gray-50 border-l border-gray-300 h-full flex items-center whitespace-nowrap",children:(0,jt.sprintf)((0,jt.__)("Imports left: %s / %s"),u(),Number(c))}),(0,_t.jsx)("div",{className:"h-full items-center border-l hidden lg:flex",children:(null==f||null===(t=f.banners)||void 0===t?void 0:t.library_header)&&(0,_t.jsxs)(_t.Fragment,{children:[(null===(n=f.banners.library_header)||void 0===n?void 0:n.image)&&(0,_t.jsx)("a",{className:"h-full block",target:"_blank",rel:"noreferrer",href:f.banners.library_header.url,children:(0,_t.jsx)("img",{src:f.banners.library_header.image,alt:"Extendify notice"})}),!(null!==(r=f.banners.library_header)&&void 0!==r&&r.image)&&(0,_t.jsxs)("div",{className:"text-gray-900 space-x-6 bg-extendify-light px-6 p-2 h-full flex items-center",children:[(0,_t.jsx)("span",{className:"font-bold text-left",children:f.banners.library_header.text_backup}),(null===(i=f.banners.library_header)||void 0===i?void 0:i.url)&&(0,_t.jsx)("div",{children:(0,_t.jsx)("a",{className:"button-extendify-main",target:"_blank",rel:"noreferrer",href:"".concat(f.banners.library_header.url,"&utm_source=").concat(encodeURIComponent(window.extendifySdkData.source),"&utm_medium=library&utm_campaign=banner"),children:null!==(o=null===(a=f.banners.library_header)||void 0===a?void 0:a.button_text)&&void 0!==o?o:(0,jt.__)("Get it now","extendify-sdk")})})]})]})})]})})]}),(0,_t.jsx)("div",{className:"space-x-2 transform sm:translate-x-6",children:(0,_t.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return d(!1)},children:[(0,_t.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,_t.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,_t.jsx)("span",{className:"sr-only",children:(0,jt.__)("Close library","extendify-sdk")})]})})]})})}function jn(){return(0,_t.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(wn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,_t.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,_t.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,jt.__)("Skip to content","extendify-sdk")}),(0,_t.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,_t.jsxs)(xn,{children:[(0,_t.jsx)(Ht,{}),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(gn,{}),(0,_t.jsx)(bn,{}),(0,_t.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,_t.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40",children:(0,_t.jsx)(mn,{})})})]})]})})]})]})}function kn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _n=new Map;function On(e){var t=e.searchParams,n=e.title,i=e.tax,o=b((function(e){return e.updateTaxonomies})),a=Ft((function(e){return e.toggleOpenedTaxonomy})),s=kn((0,r.useState)([]),2),u=s[0],l=s[1],c=kn((0,r.useState)(),2),f=c[0],d=c[1],p=b((function(e){return e.setActive})),m=w((function(e){return e.open})),h=on();return(0,r.useEffect)((function(){d(window.innerWidth<1600?3:4)}),[]),(0,r.useEffect)((function(){if(h.current&&f&&m){var e=JSON.stringify(Object.assign(t,{pageSize:f,force:!0}));_n.has(e)?l(_n.get(e)):Wt(t,{pageSize:f,force:!0}).then((function(t){var n;null!=t&&null!==(n=t.records)&&void 0!==n&&n.length&&h.current&&(_n.set(e,t.records),l(t.records))}))}}),[t,h,f,m]),(0,_t.jsxs)("section",{children:[(0,_t.jsxs)("div",{className:"flex justify-between",children:[(0,_t.jsx)("h2",{className:"text-2xl mb-2 text-extendify-main uppercase m-0 text-left font-bold",children:n}),(0,_t.jsx)("button",{onClick:function(){var e,t,r;o((r=n,(t=i)in(e={})?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e)),a("tax_pattern_types",!0)},type:"button",className:"components-button",children:(0,jt.__)("View all","extendify-sdk")})]}),(0,_t.jsxs)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 3xl:grid-cols-4 pb-16 m-0",children:[0===u.length&&Array.from({length:f},(function(e,t){return(0,_t.jsx)(un,{},t)})),u.map((function(e){return(0,_t.jsx)("li",{children:(0,_t.jsx)(ln,{template:e,setActiveTemplate:function(){return p(e)},imageLoaded:function(){}})},e.id)}))]})]})}function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function An(){var e=Cn((0,r.useState)([]),2),t=e[0],n=e[1],i=(0,r.useRef)(),o=Ft((function(e){return e.taxonomies})),a=b((function(e){return e.searchParams})),s=function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){Nn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a);return n.taxonomies=Object.assign({},a.taxonomies,Nn({},e,t)),n};return(0,r.useEffect)((function(){var e,t;Object.keys(null!==(e=null==o?void 0:o.tax_pattern_types)&&void 0!==e?e:{}).length&&n((t=o.tax_pattern_types,Object.values(t).filter((function(e){return e.type.includes("pattern")})).map((function(e){return e.term}))))}),[o]),(0,r.useEffect)((function(){i.current.scrollTop=0}),[a]),(0,_t.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(wn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,_t.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,_t.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,jt.__)("Skip to content","extendify-sdk")}),(0,_t.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,_t.jsxs)(xn,{children:[(0,_t.jsx)(Ht,{}),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(gn,{}),(0,_t.jsx)(bn,{}),(0,_t.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,_t.jsx)("div",{ref:i,className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-16 px-6 sm:pl-0 sm:pr-8 pb-60",children:t.length>0&&t.map((function(e){return(0,_t.jsx)(On,{title:e,tax:"tax_pattern_types",searchParams:s("tax_pattern_types",e)},e)}))})})]})]})})]})]})}var Tn=function(){return F.get("plugins")},Fn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),F.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},Ln=function(){return F.get("active-plugins")};function In(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Dn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){In(o,r,i,a,s,"next",e)}function s(e){In(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Rn=[],Mn=[];function Vn(e){return Hn.apply(this,arguments)}function Hn(){return(Hn=Dn(k().mark((function e(t){var n,r,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(Rn.length){e.next=10;break}return e.t0=Object,e.next=8,Tn();case 8:e.t1=e.sent,Rn=e.t0.keys.call(e.t0,e.t1);case 10:return o=!!i.length&&i.filter((function(e){return!Rn.some((function(t){return t.includes(e)}))})),e.abrupt("return",o.length);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bn(e){return Un.apply(this,arguments)}function Un(){return(Un=Dn(k().mark((function e(t){var n,r,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(Mn.length){e.next=10;break}return e.t0=Object,e.next=8,Ln();case 8:e.t1=e.sent,Mn=e.t0.values.call(e.t0,e.t1);case 10:if(!(o=!!i.length&&i.filter((function(e){return!Mn.some((function(t){return t.includes(e)}))})))){e.next=16;break}return e.next=14,Vn(t);case 14:if(!e.sent){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",o.length);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qn=u(A((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function zn(e){var t=e.msg;return(0,_t.jsxs)(Nt.Modal,{style:{maxWidth:"500px"},title:(0,jt.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,jt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,_t.jsx)("br",{}),(0,_t.jsx)(Nt.Notice,{isDismissible:!1,status:"error",children:t}),(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(tr,{}),document.getElementById("extendify-root"))},children:(0,jt.__)("Go back","extendify-sdk")})]})}const Wn=wp.data;function Zn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gn(){var e=Zn((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,Wn.select)("core/editor").isEditedPostDirty)()?(0,_t.jsxs)(Nt.Modal,{title:(0,jt.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:(0,jt.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,_t.jsxs)(Nt.ButtonGroup,{children:[(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,jt.__)("Reload page","extendify-sdk")}),(0,_t.jsx)(Nt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Wn.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,jt.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}function Jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yn(){var e,t=Jn((0,r.useState)(""),2),n=t[0],i=t[1],o=qn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return Fn(a).then((function(){qn.setState({importOnLoad:!0}),(0,r.render)((0,_t.jsx)(Gn,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,_t.jsx)(zn,{msg:n}):(0,_t.jsx)(Nt.Modal,{title:(0,jt.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsx)(Nt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,jt.__)("Installing...","extendify-sdk")})})}var Xn=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";K.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function Qn(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function er(){var e,t,n,i=qn((function(e){return e.wantedTemplate})),o=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,_t.jsxs)(Nt.Modal,{title:(0,jt.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:(0,jt.sprintf)((0,jt.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==i||null===(n=i.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,_t.jsx)("ul",{children:o.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:Qn(e)},e)}))}),(0,_t.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,jt.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(ei,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,jt.__)("Return to library","extendify-sdk")})]})}function tr(e){var t,n,i,o,a,s,u,l,c=qn((function(e){return e.wantedTemplate})),f=(null==c||null===(t=c.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=K.getState())&&void 0!==n&&n.canInstallPlugins?(0,_t.jsxs)(Nt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,jt.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,jt.__)((0,jt.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(a=null==c||null===(s=c.fields)||void 0===s?void 0:s.type)&&void 0!==a?a:"template"),"extendify-sdk")}),(null===(u=e.message)||void 0===u?void 0:u.length)>0||(0,_t.jsx)("ul",{children:f.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:Qn(e)},e)}))}),(0,_t.jsxs)(Nt.ButtonGroup,{children:[(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(Yn,{}),document.getElementById("extendify-root"))},children:null!==(l=e.buttonLabel)&&void 0!==l?l:(0,jt.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,_t.jsx)(Nt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,_t.jsx)(ei,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,jt.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,_t.jsx)(er,{})}function nr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var rr=function(){var e,t=(e=k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vn(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,_t.jsx)(tr,{}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){nr(o,r,i,a,s,"next",e)}function s(e){nr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function ir(e){var t=e.msg;return(0,_t.jsxs)(Nt.Modal,{style:{maxWidth:"500px"},title:(0,jt.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,jt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,_t.jsx)("br",{}),(0,_t.jsx)(Nt.Notice,{isDismissible:!1,status:"error",children:t}),(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,_t.jsx)(cr,{}),document.getElementById("extendify-root"))},children:(0,jt.__)("Go back","extendify-sdk")})]})}function or(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function ar(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){or(o,r,i,a,s,"next",e)}function s(e){or(o,r,i,a,s,"throw",e)}a(void 0)}))}}function sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lr(){var e,t=sr((0,r.useState)(""),2),n=t[0],i=t[1],o=qn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return Fn(a).then((function(){qn.setState({importOnLoad:!0})})).then(ar(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,_t.jsx)(Gn,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;i(t.data.message)})),n?(0,_t.jsx)(ir,{msg:n}):(0,_t.jsx)(Nt.Modal,{title:(0,jt.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsx)(Nt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,jt.__)("Activating...","extendify-sdk")})})}function cr(e){var t,n,i,o,a,s=qn((function(e){return e.wantedTemplate})),u=(null==s||null===(t=s.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=K.getState())&&void 0!==n&&n.canActivatePlugins?(0,_t.jsx)(Nt.Modal,{title:(0,jt.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsxs)("div",{children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,jt.__)((0,jt.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==s||null===(a=s.fields)||void 0===a?void 0:a.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,_t.jsx)("ul",{children:u.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:Qn(e)},e)}))}),(0,_t.jsxs)(Nt.ButtonGroup,{children:[(0,_t.jsx)(Nt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(lr,{}),document.getElementById("extendify-root"))},children:(0,jt.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,_t.jsx)(Nt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(ei,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,jt.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,_t.jsx)(er,{})}function fr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var dr=function(){var e,t=(e=k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bn(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,_t.jsx)(cr,{showClose:!0}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){fr(o,r,i,a,s,"next",e)}function s(e){fr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function pr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vr(e){var t=e.finished,n=mr((0,r.useState)(""),2),i=n[0],o=n[1],a=(0,r.useRef)(),s=function(){var e,n=(e=k().mark((function e(n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,V(i);case 3:K.setState({registration:{email:i}}),t();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){pr(o,r,i,a,s,"next",e)}function s(e){pr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){D("user_email").then((function(e){return o(null!=e?e:"")})),a.current.focus()}),[]),(0,_t.jsxs)(Nt.Modal,{className:"extendify-sdk",title:(0,jt.__)("One last step...","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{className:"m-0 mb-4 max-w-md",children:(0,jt.__)("Register now to receive updates and special offers from Extendify","extendify-sdk")}),(0,_t.jsxs)("form",{onSubmit:s,className:"flex space-x-4 mb-8",children:[(0,_t.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,_t.jsx)("input",{id:"extendify-email-register",value:i,required:!0,onChange:function(e){return o(e.target.value)},type:"text",className:"extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2",placeholder:(0,jt.__)("Email","extendify-sdk")}),(0,_t.jsx)("label",{htmlFor:"extendify-email-register",className:"-top-3 bg-white absolute left-1 px-1 transition-all",children:(0,jt.__)("Email","extendify-sdk")})]}),(0,_t.jsx)("input",{type:"submit",className:"hidden"})]}),(0,_t.jsxs)(Nt.ButtonGroup,{children:[(0,_t.jsx)(Nt.Button,{ref:a,isPrimary:!0,onClick:s,children:(0,jt.__)("Submit and import","extendify-sdk")}),(0,_t.jsx)(Nt.Button,{isTertiary:!0,onClick:t,style:{boxShadow:"none",margin:"0 4px"},children:(0,jt.__)("Skip and import","extendify-sdk")})]})]})}function yr(){var e;return{id:"NeedsRegistrationModal",pass:(null===(e=K.getState().registration)||void 0===e?void 0:e.email)||K.getState().apiKey,allow:function(){},deny:function(){return new Promise((function(e){(0,r.render)((0,_t.jsx)(vr,{finished:e}),document.getElementById("extendify-root"))}))}}}function xr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function br(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function wr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){br(o,r,i,a,s,"next",e)}function s(e){br(o,r,i,a,s,"throw",e)}a(void 0)}))}}function jr(e){return function(){return new kr(e.apply(this,arguments))}}function kr(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof Sr;Promise.resolve(s?a.wrapped:a).then((function(e){s?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function Sr(e){this.wrapped=e}kr.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},kr.prototype.next=function(e){return this._invoke("next",e)},kr.prototype.throw=function(e){return this._invoke("throw",e)},kr.prototype.return=function(e){return this._invoke("return",e)};function _r(){return(_r=wr(k().mark((function e(t){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Or(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Or(e){return Er.apply(this,arguments)}function Er(){return(Er=jr(k().mark((function e(t){var n,r,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=xr(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function Nr(e,t){return(0,(0,Wn.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function Cr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:rr,hasPluginsActivated:dr,NeedsRegistrationModal:yr,stack:[],check:function(t){var n=this;return wr(k().mark((function r(){var i,o,a;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=xr(e),r.prev=1,a=k().mark((function e(){var r,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.value,e.next=3,n["".concat(r)](t);case 3:i=e.sent,setTimeout((function(){n.stack.push(i.pass?i.allow:i.deny)}),0);case 5:case"end":return e.stop()}}),e)})),i.s();case 4:if((o=i.n()).done){r.next=8;break}return r.delegateYield(a(),"t0",6);case 6:r.next=4;break;case 8:r.next=13;break;case 10:r.prev=10,r.t1=r.catch(1),i.e(r.t1);case 13:return r.prev=13,i.f(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},reset:function(){this.stack=[]}}}(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function Tr(e){var t=e.template,n=(0,r.useRef)(null),i=b((function(e){return e.activeTemplateBlocks})),o=K((function(e){return e.canImport})),a=K((function(e){return e.apiKey})),s=w((function(e){return e.setOpen})),u=Cr((0,r.useState)(!1),2),l=u[0],c=u[1],f=Cr((0,r.useState)(!1),2),d=f[0],p=f[1],m=qn((function(e){return e.setWanted})),h=function(){(function(e){return _r.apply(this,arguments)})(Ar.stack).then((function(){setTimeout((function(){Nr(i,t).then((function(){return s(!1)})).then((function(){return(0,r.render)((0,_t.jsx)(ei,{}),document.getElementById("extendify-root"))}))}),100)}))};(0,r.useEffect)((function(){return Ar.check(t).then((function(){return p(!0)})),function(){return Ar.reset()&&p(!1)}}),[t]),(0,r.useEffect)((function(){!l&&n.current&&n.current.focus()}),[n,l,d]);return d&&Object.keys(i).length?a||o()?l?(0,_t.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,jt.__)("Importing...","extendify-sdk")}):(0,_t.jsx)("button",{ref:n,type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return $t(t),c(!0),m(t),void h()},children:(0,jt.sprintf)((0,jt.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,_t.jsx)("a",{ref:n,className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=single_page"),rel:"noreferrer",children:(0,jt.__)("Sign up now","extendify-sdk")}):""}function Fr(e){var t=e.categories,n=e.styles,r=e.types,i=e.requiredPlugins;return(0,_t.jsxs)(_t.Fragment,{children:[t&&(0,_t.jsxs)("div",{className:"w-full pb-4",children:[(0,_t.jsx)("h3",{className:"text-sm m-0 mb-2",children:(0,jt.__)("Categories:","extendify-sdk")}),(0,_t.jsx)("div",{children:t.join(", ")})]}),n&&(0,_t.jsxs)("div",{className:"w-full py-4",children:[(0,_t.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,jt.__)("Styles:","extendify-sdk")}),(0,_t.jsx)("div",{children:n.join(", ")})]}),r&&(0,_t.jsxs)("div",{className:"w-full py-4",children:[(0,_t.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,jt.__)("Types:","extendify-sdk")}),(0,_t.jsx)("div",{children:r.join(", ")})]}),i.filter((function(e){return"editorplus"!==e})).length>0&&(0,_t.jsxs)("div",{className:"pt-4 w-full",children:[(0,_t.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,jt.__)("Required Plugins:","extendify-sdk")}),(0,_t.jsx)("div",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return Qn(e)})).join(", ")})]}),(0,_t.jsx)("div",{className:"py-4 mt-4",children:(0,_t.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sidebar"),rel:"noreferrer",target:"_blank",children:(0,jt.__)("What happens when a template is added?","extendify-sdk")})})]})}function Lr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Ir(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Rr=new Map;function Mr(e){var t,n,i,o,a,s,u,l=e.template,c=l.fields,f=c.tax_categories,d=c.required_plugins,p=c.tax_style,m=c.tax_pattern_types,h=K((function(e){return e.apiKey})),v=Ir((0,r.useState)([]),2),y=v[0],x=v[1],g=Ir((0,r.useState)([]),2),w=g[0],j=g[1],S=on(),_=b((function(e){return e.setActive})),O=function(e){x([]),j([]),requestAnimationFrame((function(){return _(e)}))},E=(0,r.useCallback)(function(){var e,t=(e=k().mark((function e(t,n){var r,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="".concat(l.id,"|").concat(t,"|").concat(n),!Rr.has(r)){e.next=3;break}return e.abrupt("return",Rr.get(r));case 3:return e.next=5,Zt(l,t,n);case 5:return i=e.sent,Rr.set(r,i),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Lr(o,r,i,a,s,"next",e)}function s(e){Lr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),[l]);return(0,r.useEffect)((function(){Gt(l)}),[l]),(0,r.useEffect)((function(){E("related","pattern").then((function(e){S.current&&x(e)}))}),[l,E,S]),(0,_t.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,_t.jsxs)("div",{className:"lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300",children:[(0,_t.jsxs)("div",{className:"text-left m-0 h-full px-6 sm:p-0",children:[(0,_t.jsx)("h1",{className:"leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal",children:l.fields.display_title}),(0,_t.jsx)(Nt.ExternalLink,{href:l.fields.url,children:(0,jt.__)("Demo","extendify-sdk")})]}),(0,_t.jsx)("div",{className:Pt()({"inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!h.length,"top-0":h.length>0}),children:(0,_t.jsx)(Tr,{template:l})})]}),(0,_t.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46",children:(0,_t.jsx)("img",{className:"max-w-full w-full block",src:null!==(t=null==l||null===(n=l.fields)||void 0===n||null===(i=n.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(a=o.full)||void 0===a?void 0:a.url)&&void 0!==t?t:null==l||null===(s=l.fields)||void 0===s||null===(u=s.screenshot[0])||void 0===u?void 0:u.url})}),(0,_t.jsxs)("div",{className:"divide-y p-6 sm:p-0 mb-16",children:[y.length>0&&(0,_t.jsxs)("section",{className:"mb-4",children:[(0,_t.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,jt.__)("Related","extendify-sdk")}),(0,_t.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:y.map((function(e){var t,n,r,i,o,a,s;return(0,_t.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,_t.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(a=e.fields)||void 0===a||null===(s=a.screenshot[0])||void 0===s?void 0:s.url})},e.id)}))})]}),w.length>0&&(0,_t.jsxs)("section",{className:"mb-4 pt-6",children:[(0,_t.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,jt.__)("Alternatives","extendify-sdk")}),(0,_t.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:w.map((function(e){var t,n,r,i,o,a,s;return(0,_t.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,_t.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(a=e.fields)||void 0===a||null===(s=a.screenshot[0])||void 0===s?void 0:s.url})},e.id)}))})]})]}),(0,_t.jsx)("div",{className:"text-xs text-left p-6 w-full block sm:hidden divide-y",children:(0,_t.jsx)(Fr,{categories:f,types:m,requiredPlugins:d,styles:p})})]})}function Vr(e){var t=e.template,n=b((function(e){return e.setActive})),r=t.fields,i=r.tax_categories,o=r.required_plugins,a=r.tax_style,s=r.tax_pattern_types,u=K((function(e){return e.apiKey}));return(0,_t.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!u.length&&(0,_t.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,_t.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,jt.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,_t.jsx)("button",{className:"components-button",onClick:function(){return w.setState({currentPage:"login"})},children:(0,jt.__)("Log in","extendify-sdk")})]}),(0,_t.jsx)("div",{className:"p-6 sm:p-0",children:(0,_t.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){w.setState({currentPage:"main"}),n({})},children:[(0,_t.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,_t.jsx)("span",{className:"ml-4",children:(0,jt.__)("Go back","extendify-sdk")})]})}),(0,_t.jsx)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:(0,_t.jsx)(Fr,{categories:i,types:s,requiredPlugins:o,styles:a})})]})}function Hr(){var e=b((function(e){return e.activeTemplate}));return(0,_t.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(wn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,_t.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,_t.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,jt.__)("Skip to content","extendify-sdk")}),(0,_t.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,_t.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,_t.jsxs)(xn,{children:[(0,_t.jsx)(Vr,{template:e}),(0,_t.jsx)(Mr,{template:e})]})})})]})]})}function Br(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zr(){var e=Ur((0,r.useState)(K.getState().apiKey),2),t=e[0],n=e[1],i=Ur((0,r.useState)(K.getState().email),2),o=i[0],a=i[1],s=Ur((0,r.useState)(""),2),u=s[0],l=s[1],c=Ur((0,r.useState)("info"),2),f=c[0],d=c[1],p=Ur((0,r.useState)(""),2),m=p[0],h=p[1];(0,r.useEffect)((function(){return function(){return d("info")}}),[]);var v=function(){var e,n=(e=k().mark((function e(n){var r,i,a,s,u,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),l(""),r=o.length?o:m,e.next=5,R(r,t);case 5:if(i=e.sent,a=i.token,s=i.error,u=i.exception,void 0===(c=i.message)){e.next=13;break}return d("error"),e.abrupt("return",l(c.length?c:"Error: Are you interacting with the wrong server?"));case 13:if(!s&&!u){e.next=16;break}return d("error"),e.abrupt("return",l(s.length?s:u));case 16:if(a&&"string"==typeof a){e.next=19;break}return d("error"),e.abrupt("return",l((0,jt.__)("Something went wrong","extendify-sdk")));case 19:return d("success"),l("Success!"),e.next=23,new Promise((function(e){return setTimeout(e,1500)}));case 23:K.setState({apiKey:a}),w.setState({currentPage:"main"});case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Br(o,r,i,a,s,"next",e)}function s(e){Br(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){o||D("user_email").then((function(e){return h(e)}))}),[o]),(0,_t.jsxs)("section",{className:"w-96 text-left md:-mt-32",children:[(0,_t.jsx)("h1",{className:"border-b border-gray-900 mb-12 pb-4",children:(0,jt.__)("Welcome","extendify-sdk")}),u&&(0,_t.jsx)("div",{className:Pt()({"border-b pb-6 mb-6 -mt-6":!0,"border-gray-900 text-gray-900":"info"===f,"border-wp-alert-red text-wp-alert-red":"error"===f,"border-extendify-main text-extendify-main":"success"===f}),children:u}),(0,_t.jsxs)("form",{onSubmit:v,className:" space-y-6",children:[(0,_t.jsxs)("div",{className:"flex items-center",children:[(0,_t.jsx)("label",{htmlFor:"extendifysdk-login-email",className:"w-32 font-bold",children:(0,jt.__)("Email:","extendify-sdk")}),(0,_t.jsx)("input",{id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border px-2 w-full",placeholder:"Email",value:o.length?o:m,onChange:function(e){return a(e.target.value)}})]}),(0,_t.jsxs)("div",{className:"flex items-center",children:[(0,_t.jsx)("label",{htmlFor:"extendifysdk-login-license",className:"w-32 font-bold",children:(0,jt.__)("License:","extendify-sdk")}),(0,_t.jsx)("input",{id:"extendifysdk-login-license",name:"extendifysdk-login-email",type:"text",className:"border px-2 w-full",placeholder:"License key",value:t,onChange:function(e){return n(e.target.value)}})]}),(0,_t.jsx)("div",{className:"flex justify-end",children:(0,_t.jsx)("button",{type:"submit",className:"button-extendify-main p-3 px-4",children:(0,jt.__)("Sign in","extendify-sdk")})})]})]})}function Wr(){return(0,_t.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(wn,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,_t.jsxs)("div",{className:"w-full flex-grow overflow-hidden bg-extendify-light",children:[(0,_t.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,jt.__)("Skip to content","extendify-sdk")}),(0,_t.jsx)("div",{className:"flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,_t.jsxs)("div",{className:"absolute flex inset-0 items-center justify-center z-20 sm:space-x-12",children:[(0,_t.jsx)("div",{className:"pl-12 py-6 absolute top-0 left-0",children:(0,_t.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return w.setState({currentPage:"main"})},children:[(0,_t.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,_t.jsx)("span",{className:"ml-4",children:(0,jt.__)("Go back","extendify-sdk")})]})}),(0,_t.jsx)("div",{className:"flex justify-center",children:(0,_t.jsx)(zr,{})})]})})]})]})}function Zr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Zr(o,r,i,a,s,"next",e)}function s(e){Zr(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Gr(e){var t=e.action,n=e.callback,i=e.text;return(0,r.useEffect)((function(){t.then($r(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))))})),(0,_t.jsx)(Nt.Modal,{title:i,isDismissible:!1,children:(0,_t.jsx)(Nt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,jt.__)("Please wait...","extendify-sdk")})})}function Jr(e){var t,n,r=e.page,i=b((function(e){return e.searchParams}));switch("main"!==r||Object.keys(null!==(t=null==i?void 0:i.taxonomies)&&void 0!==t?t:{}).length||(r="curated"),"main"===r&&"pattern"===(null==i?void 0:i.type)&&""===(null==i||null===(n=i.taxonomies)||void 0===n?void 0:n.tax_pattern_types)&&(r="curated"),r){case"welcome":return(0,_t.jsx)(Ot,{});case"waiting-crunching":return(0,_t.jsx)(Gr,{});case"curated":return(0,_t.jsx)(An,{});case"main":return(0,_t.jsx)(jn,{});case"single":return(0,_t.jsx)(Hr,{});case"login":return(0,_t.jsx)(Wr,{})}}var Kr=function(){return F.get("taxonomies")};function Yr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Xr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Yr(o,r,i,a,s,"next",e)}function s(e){Yr(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Qr(){var e,t,n,i=(0,r.useRef)(null),o=w((function(e){return e.open})),a=w((function(e){return e.metaData})),s=w((function(e){return e.currentPage}));return e=o,t=function(){var e=document.getElementById("beacon-container");e&&(e.style.position="relative",e.style.zIndex=Number.MAX_SAFE_INTEGER,e.style.display="block")},n=function(){var e=document.getElementById("beacon-container");e&&(e.style.display="none",window.Beacon("close"))},(0,r.useEffect)((function(){if(e)return window.Beacon?(t(),function(){return n()}):(function(e,t,n){function r(){var e,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.async=!0,r.src="https://beacon-v2.helpscout.net",null===(e=n.parentNode)||void 0===e||e.insertBefore(r,n)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)}(window,document,window.Beacon||function(){}),window.Beacon("init","2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91"),window.Beacon("on","ready",t),function(){window.Beacon("off","ready",t),n()})}),[e]),function(e){var t=b((function(e){return e.setupDefaultTaxonomies})),n=Ft((function(e){return e.setTaxonomies})),i=(0,r.useCallback)(Xr(k().mark((function e(){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kr();case 2:r=e.sent,r=Object.keys(r).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,t){return e[t]=r[t],e}),{}),t(r),n(r);case 6:case"end":return e.stop()}}),e)}))),[t,n]);(0,r.useEffect)((function(){e&&i()}),[i,e])}(o),(0,r.useEffect)((function(){o&&(K.getState().hasClickedThroughWelcomePage||w.setState({currentPage:"welcome"}))}),[o]),(0,r.useEffect)((function(){o&&!Object.keys(a).length&&kt().then((function(e){return w.setState({metaData:e})}))}),[o,a]),(0,_t.jsx)(Ie.Root,{show:o,as:r.Fragment,children:(0,_t.jsx)(wt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:i,onClose:function(){},children:(0,_t.jsx)("div",{className:"h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,_t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,_t.jsx)(Ie.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,_t.jsx)(wt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,_t.jsx)(Ie.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,_t.jsx)("div",{ref:i,tabIndex:"0",className:"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:p-5",children:(0,_t.jsx)(Jr,{page:s})})})]})})})})}function ei(e){var t=e.show,n=void 0!==t&&t,i=w((function(e){return e.setOpen})),o=(0,r.useCallback)((function(){return i(!0)}),[i]),a=(0,r.useCallback)((function(){i(!1)}),[i]);return(0,r.useEffect)((function(){n&&i(!0)}),[n,i]),(0,r.useEffect)((function(){return window.localStorage.getItem("etfy_library__key")&&K.setState({apiKey:"any-key-will-work-during-beta"}),function(){return window.localStorage.removeItem("etfy_library__key")}}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",o),window.addEventListener("extendify-sdk::close-library",a),function(){window.removeEventListener("extendify-sdk::open-library",o),window.removeEventListener("extendify-sdk::close-library",a)}}),[a,o]),(0,_t.jsx)(Qr,{})}const ti=wp.plugins,ni=wp.editPost;function ri(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ri(o,r,i,a,s,"next",e)}function s(e){ri(o,r,i,a,s,"throw",e)}a(void 0)}))}}var oi=function(e){var t,n;Xn(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},ai=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},si=(0,_t.jsx)("div",{id:"extendify-templates-inserter",children:(0,_t.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,_t.jsxs)("svg",{style:"margin-right:0.5rem",width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,_t.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,jt.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){ai()&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(si)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",oi)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(ai()&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,_t.jsx)("div",{children:(0,_t.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,jt.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",oi)}}),0)}));window._wpLoadBlockEditor&&ai()&&(0,ti.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return(0,_t.jsx)(ni.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:oi,icon:(0,_t.jsx)("span",{className:"components-menu-items__item-icon",children:(0,_t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,_t.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),children:(0,jt.__)("Library","extendify-sdk")})}});window._wpLoadBlockEditor&&(0,ti.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,_t.jsx)(ni.PluginSidebarMoreMenuItem,{onClick:ii(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I();case 2:return t=e.sent,(t=JSON.parse(t)).state.enabled=!ai(),e.next=7,M(JSON.stringify(Object.assign({},t)));case 7:location.reload();case 8:case"end":return e.stop()}}),e)}))),icon:(0,_t.jsx)(_t.Fragment,{}),children:ai()?(0,jt.__)("Disable Extendify","extendify-sdk"):(0,jt.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,Wn.dispatch)("core/notices").createNotice,t=K.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,jt.__)("Template Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),Jt(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,Et.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,_t.jsx)(tr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=Object.assign(document.createElement("div"),{id:"extendify-root"});if(document.body.append(e),(0,r.render)((0,_t.jsx)(ei,{}),e),e.parentNode.insertBefore(Object.assign(document.createElement("div"),{id:"extendify-util"}),e.nextSibling),qn.getState().importOnLoad){var t=qn.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");Nr(p((0,window.wp.blocks.parse)((0,Et.get)(e,"fields.code"))),e)}(t)}),0)}qn.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},716:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,u=i(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))n.call(a,c)&&(u[c]=a[c]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},61:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,u=[],l=!1,c=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(804),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:o,_owner:a.current}}t.jsx=l,t.jsxs=l},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new N(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===m){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?m:d,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=m,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",h={};function v(){}function y(){}function x(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&r.call(w,o)&&(g=w);var j=x.prototype=v.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var u=c(e[i],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function C(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=j.constructor=x,x.constructor=y,y.displayName=u(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,s,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[a]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new S(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(j),u(j,s,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},804:e=>{"use strict";e.exports=React}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,i,o]=e[l],s=!0,u=0;u<n.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(s=!1,o<a&&(a=o));s&&(e.splice(l--,1),t=i())}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={172:0,106:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[a,s,u]=n,l=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(u)var c=u(r);for(t&&t(n);l<a.length;l++)o=a[l],r.o(e,o)&&e[o]&&e[o][0](),e[a[l]]=0;return r.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[106],(()=>r(446)));var i=r.O(void 0,[106],(()=>r(716)));i=r.O(i)})();
|
|
|
|
extendify-sdk/public/mix-manifest.json
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"/build/extendify-sdk.js": "/build/extendify-sdk.js",
|
3 |
-
"/editorplus/editorplus.min.js": "/editorplus/editorplus.min.js",
|
4 |
-
"/build/extendify-sdk.css": "/build/extendify-sdk.css"
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/ExtendifyLibrary.js
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
import { useEffect, useCallback } from '@wordpress/element'
|
2 |
-
import { useGlobalStore } from './state/GlobalState'
|
3 |
-
import { useUserStore } from './state/User'
|
4 |
-
import MainWindow from './pages/parts/MainWindow'
|
5 |
-
|
6 |
-
export default function ExtendifyLibrary({ show = false }) {
|
7 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
8 |
-
const showLibrary = useCallback(() => setOpen(true), [setOpen])
|
9 |
-
const hideLibrary = useCallback(() => {
|
10 |
-
setOpen(false)
|
11 |
-
}, [setOpen])
|
12 |
-
|
13 |
-
useEffect(() => {
|
14 |
-
show && setOpen(true)
|
15 |
-
}, [show, setOpen])
|
16 |
-
|
17 |
-
// Here for legacy reasons, we're checking if they have the old key stored
|
18 |
-
useEffect(() => {
|
19 |
-
if (window.localStorage.getItem('etfy_library__key')) {
|
20 |
-
useUserStore.setState({
|
21 |
-
apiKey: 'any-key-will-work-during-beta',
|
22 |
-
})
|
23 |
-
}
|
24 |
-
return () => window.localStorage.removeItem('etfy_library__key')
|
25 |
-
}, [])
|
26 |
-
|
27 |
-
// Let the visibility to be controlled from outside the application
|
28 |
-
useEffect(() => {
|
29 |
-
window.addEventListener('extendify-sdk::open-library', showLibrary)
|
30 |
-
window.addEventListener('extendify-sdk::close-library', hideLibrary)
|
31 |
-
return () => {
|
32 |
-
window.removeEventListener('extendify-sdk::open-library', showLibrary)
|
33 |
-
window.removeEventListener('extendify-sdk::close-library', hideLibrary)
|
34 |
-
}
|
35 |
-
}, [hideLibrary, showLibrary])
|
36 |
-
|
37 |
-
return <MainWindow/>
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/api/Taxonomies.js
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
import { Axios as api } from './axios'
|
2 |
-
|
3 |
-
export const Taxonomies = {
|
4 |
-
get() {
|
5 |
-
return api.get('taxonomies')
|
6 |
-
},
|
7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/app.css
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
@tailwind base;
|
2 |
-
@tailwind components;
|
3 |
-
@tailwind utilities;
|
4 |
-
|
5 |
-
/* Adding CSS classes should be done with consideration and rarely */
|
6 |
-
.extendify-sdk *, .extendify-sdk *:after, .extendify-sdk *:before {
|
7 |
-
box-sizing: border-box;
|
8 |
-
border: 0 solid #e5e7eb;
|
9 |
-
}
|
10 |
-
.extendify-sdk .button-focus {
|
11 |
-
@apply focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none;
|
12 |
-
}
|
13 |
-
.extendify-sdk .button-focus-big-green {
|
14 |
-
@apply focus:ring-4 focus:ring-offset-4 focus:ring-extendify-main outline-none;
|
15 |
-
}
|
16 |
-
.extendify-sdk select.button-focus,
|
17 |
-
.extendify-sdk input.button-focus {
|
18 |
-
@apply focus:border-transparent focus:outline-none;
|
19 |
-
}
|
20 |
-
|
21 |
-
.button-extendify-main {
|
22 |
-
@apply bg-extendify-main button-focus cursor-pointer transition duration-200 p-1.5 px-3 text-white hover:text-white no-underline hover:bg-gray-900 active:bg-gray-900 active:text-white focus:text-white whitespace-nowrap;
|
23 |
-
}
|
24 |
-
#extendify-search-input:focus ~ svg,
|
25 |
-
#extendify-search-input:not(:placeholder-shown) ~ svg {
|
26 |
-
@apply hidden;
|
27 |
-
}
|
28 |
-
#extendify-search-input::-webkit-textfield-decoration-container {
|
29 |
-
@apply mr-3;
|
30 |
-
}
|
31 |
-
|
32 |
-
/* WP tweaks and overrides */
|
33 |
-
.extendify-sdk .components-panel__body > .components-panel__body-title {
|
34 |
-
/* Override WP aggressive boder:none and border:0 */
|
35 |
-
border-bottom: 1px solid #e0e0e0 !important;
|
36 |
-
@apply bg-transparent;
|
37 |
-
}
|
38 |
-
.extendify-sdk .components-modal__header {
|
39 |
-
@apply border-b border-gray-300;
|
40 |
-
}
|
41 |
-
|
42 |
-
/* Special input animation */
|
43 |
-
.extendify-special-input:placeholder-shown ~ label {
|
44 |
-
@apply top-1.5;
|
45 |
-
@apply text-sm;
|
46 |
-
@apply text-gray-600;
|
47 |
-
}
|
48 |
-
.extendify-special-input:focus ~ label {
|
49 |
-
@apply -top-4;
|
50 |
-
@apply text-xs;
|
51 |
-
@apply text-extendify-main;
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/LoginInterface.js
DELETED
@@ -1,114 +0,0 @@
|
|
1 |
-
import { useUserStore } from '../state/User'
|
2 |
-
import { useState, useEffect } from '@wordpress/element'
|
3 |
-
import { User as UserApi } from '../api/User'
|
4 |
-
import { __ } from '@wordpress/i18n'
|
5 |
-
import { useGlobalStore } from '../state/GlobalState'
|
6 |
-
import classNames from 'classnames'
|
7 |
-
|
8 |
-
export default function LoginInterface() {
|
9 |
-
const [apiKey, setApiKey] = useState(useUserStore.getState().apiKey)
|
10 |
-
const [email, setEmail] = useState(useUserStore.getState().email)
|
11 |
-
const [feedback, setFeedback] = useState('')
|
12 |
-
const [feedbackType, setFeedbackType] = useState('info')
|
13 |
-
const [possibleEmail, setPossibleEmail] = useState('')
|
14 |
-
|
15 |
-
// This will reset the default error state to info
|
16 |
-
useEffect(() => () => setFeedbackType('info'), [])
|
17 |
-
|
18 |
-
const confirmKey = async (event) => {
|
19 |
-
event.preventDefault()
|
20 |
-
setFeedback('')
|
21 |
-
const emailToSend = email.length
|
22 |
-
? email
|
23 |
-
: possibleEmail
|
24 |
-
const { token, error, exception, message } = await UserApi.authenticate(emailToSend, apiKey)
|
25 |
-
|
26 |
-
if (typeof message !== 'undefined') {
|
27 |
-
setFeedbackType('error')
|
28 |
-
return setFeedback(message.length
|
29 |
-
? message
|
30 |
-
: 'Error: Are you interacting with the wrong server?')
|
31 |
-
}
|
32 |
-
|
33 |
-
if (error || exception) {
|
34 |
-
setFeedbackType('error')
|
35 |
-
return setFeedback(error.length
|
36 |
-
? error
|
37 |
-
: exception)
|
38 |
-
}
|
39 |
-
|
40 |
-
if (!token || typeof token !== 'string') {
|
41 |
-
setFeedbackType('error')
|
42 |
-
return setFeedback(__('Something went wrong', 'extendify-sdk'))
|
43 |
-
}
|
44 |
-
|
45 |
-
setFeedbackType('success')
|
46 |
-
setFeedback('Success!')
|
47 |
-
await new Promise((resolve) => setTimeout(resolve, 1500))
|
48 |
-
useUserStore.setState({
|
49 |
-
// email: emailToSend,
|
50 |
-
apiKey: token,
|
51 |
-
})
|
52 |
-
useGlobalStore.setState({
|
53 |
-
currentPage: 'main',
|
54 |
-
})
|
55 |
-
}
|
56 |
-
|
57 |
-
useEffect(() => {
|
58 |
-
if (!email) {
|
59 |
-
UserApi.getMeta('user_email')
|
60 |
-
.then((value) => setPossibleEmail(value))
|
61 |
-
}
|
62 |
-
}, [email])
|
63 |
-
|
64 |
-
return <section className="w-96 text-left md:-mt-32">
|
65 |
-
<h1 className="border-b border-gray-900 mb-12 pb-4">{__('Welcome', 'extendify-sdk')}</h1>
|
66 |
-
{feedback &&
|
67 |
-
<div className={classNames({
|
68 |
-
'border-b pb-6 mb-6 -mt-6': true,
|
69 |
-
'border-gray-900 text-gray-900': feedbackType === 'info',
|
70 |
-
'border-wp-alert-red text-wp-alert-red': feedbackType === 'error',
|
71 |
-
'border-extendify-main text-extendify-main': feedbackType === 'success',
|
72 |
-
})}>
|
73 |
-
{feedback}
|
74 |
-
</div>
|
75 |
-
}
|
76 |
-
<form onSubmit={confirmKey} className=" space-y-6">
|
77 |
-
<div className="flex items-center">
|
78 |
-
<label htmlFor="extendifysdk-login-email" className="w-32 font-bold">
|
79 |
-
{__('Email:', 'extendify-sdk')}
|
80 |
-
</label>
|
81 |
-
<input
|
82 |
-
id="extendifysdk-login-email"
|
83 |
-
name="extendifysdk-login-email"
|
84 |
-
type="email"
|
85 |
-
className="border px-2 w-full"
|
86 |
-
placeholder="Email"
|
87 |
-
value={email.length
|
88 |
-
? email
|
89 |
-
: possibleEmail}
|
90 |
-
onChange={(event) => setEmail(event.target.value)}/>
|
91 |
-
</div>
|
92 |
-
<div className="flex items-center">
|
93 |
-
<label htmlFor="extendifysdk-login-license" className="w-32 font-bold">
|
94 |
-
{__('License:', 'extendify-sdk')}
|
95 |
-
</label>
|
96 |
-
<input
|
97 |
-
id="extendifysdk-login-license"
|
98 |
-
name="extendifysdk-login-email"
|
99 |
-
type="text"
|
100 |
-
className="border px-2 w-full"
|
101 |
-
placeholder="License key"
|
102 |
-
value={apiKey}
|
103 |
-
onChange={(event) => setApiKey(event.target.value)}/>
|
104 |
-
</div>
|
105 |
-
<div className="flex justify-end">
|
106 |
-
<button
|
107 |
-
type="submit"
|
108 |
-
className="button-extendify-main p-3 px-4">
|
109 |
-
{__('Sign in', 'extendify-sdk')}
|
110 |
-
</button>
|
111 |
-
</div>
|
112 |
-
</form>
|
113 |
-
</section>
|
114 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/Loginbutton.js
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
import { useGlobalStore } from '../state/GlobalState'
|
2 |
-
import { useUserStore } from '../state/User'
|
3 |
-
import { __ } from '@wordpress/i18n'
|
4 |
-
|
5 |
-
export default function LoginButton() {
|
6 |
-
const apiKey = useUserStore(state => state.apiKey)
|
7 |
-
if (apiKey.length === 0) {
|
8 |
-
return <button
|
9 |
-
type="button"
|
10 |
-
className="components-button inline-block flex-1 text-center hover:bg-gray-100"
|
11 |
-
onClick={() => useGlobalStore.setState({
|
12 |
-
currentPage: 'login',
|
13 |
-
})}>
|
14 |
-
{__('Log into account', 'extendify-sdk')}
|
15 |
-
</button>
|
16 |
-
}
|
17 |
-
|
18 |
-
// This code currently won't render unless in DEVMODE
|
19 |
-
return <button
|
20 |
-
type="button"
|
21 |
-
className="components-button inline-block flex-1 text-center hover:bg-gray-100"
|
22 |
-
onClick={() => useUserStore.setState({
|
23 |
-
apiKey: '',
|
24 |
-
})}>{__('Log out', 'extendify-sdk')}</button>
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/SearchPredict.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, useRef,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import Fuse from 'fuse.js'
|
5 |
-
|
6 |
-
export default function SearchPredict({ value, setValue, list, label, touched }) {
|
7 |
-
const searchRef = useRef()
|
8 |
-
const wasFocused = useRef(false)
|
9 |
-
const [componentId] = useState('extendify-label' + Date.now() + Math.floor(Math.random() * 1000000))
|
10 |
-
const [fuzzy, setFuzzy] = useState({})
|
11 |
-
const [tempValue, setTempValue] = useState('')
|
12 |
-
const [visibleChoices, setVisibleChoices] = useState([])
|
13 |
-
|
14 |
-
const updateSearch = (term) => {
|
15 |
-
wasFocused.current = true
|
16 |
-
setTempValue(term)
|
17 |
-
filter(term)
|
18 |
-
}
|
19 |
-
|
20 |
-
const filter = (term = '') => {
|
21 |
-
if (!term) {
|
22 |
-
setVisibleChoices(list)
|
23 |
-
}
|
24 |
-
const results = fuzzy.search(term)
|
25 |
-
if (!results || !results.length) {
|
26 |
-
return
|
27 |
-
}
|
28 |
-
setVisibleChoices(results.length ? results.map(t => t.item) : list)
|
29 |
-
}
|
30 |
-
|
31 |
-
useEffect(() => {
|
32 |
-
setTempValue(value)
|
33 |
-
}, [value])
|
34 |
-
|
35 |
-
useEffect(() => {
|
36 |
-
setFuzzy(new Fuse(list, {}))
|
37 |
-
}, [list])
|
38 |
-
|
39 |
-
useEffect(() => {
|
40 |
-
if (!list.length) {
|
41 |
-
return
|
42 |
-
}
|
43 |
-
const handle = (event) => {
|
44 |
-
if (searchRef.current.isSameNode(event.target)) {
|
45 |
-
return
|
46 |
-
}
|
47 |
-
if (event.target.classList.contains(`extendify-predict-${componentId}`)) {
|
48 |
-
return setVisibleChoices([])
|
49 |
-
}
|
50 |
-
setVisibleChoices([])
|
51 |
-
if (!list.includes(searchRef.current.value)) {
|
52 |
-
setValue('')
|
53 |
-
}
|
54 |
-
|
55 |
-
// Consider the component touched when clicked away
|
56 |
-
wasFocused.current && touched()
|
57 |
-
}
|
58 |
-
document.addEventListener('click', handle)
|
59 |
-
return () => document.removeEventListener('click', handle)
|
60 |
-
}, [componentId, touched, setValue, list])
|
61 |
-
|
62 |
-
return <div className="relative max-w-md">
|
63 |
-
<input
|
64 |
-
ref={searchRef}
|
65 |
-
id={componentId}
|
66 |
-
value={tempValue || ''}
|
67 |
-
onChange={(event) => updateSearch(event.target.value)}
|
68 |
-
onFocus={() => updateSearch('')}
|
69 |
-
type="text"
|
70 |
-
disabled={!Object.keys(fuzzy).length}
|
71 |
-
className="extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2 button-focus-big-green"
|
72 |
-
placeholder={label} />
|
73 |
-
<label htmlFor={componentId} className="-top-3 bg-white absolute left-1 px-1 transition-all delay-300">
|
74 |
-
{label}
|
75 |
-
</label>
|
76 |
-
{/* TODO: this could use some accessability updates like keyboard nav, etc */}
|
77 |
-
{visibleChoices && <div className="absolute top-100 flex flex-col w-full shadow-md bg-white overflow-x-hidden left-px divide-y max-h-64 overflow-scroll">
|
78 |
-
{visibleChoices.map((cat =>
|
79 |
-
<button
|
80 |
-
key={cat}
|
81 |
-
type="button"
|
82 |
-
className={`outline-none focus:bg-gray-100 bg-white text-left p-4 text-sm border-gray-300 hover:bg-gray-100 extendify-predict-${componentId}`}
|
83 |
-
onClick={() => { setValue(cat); setTempValue(cat)}}>
|
84 |
-
{cat}
|
85 |
-
</button>
|
86 |
-
))}
|
87 |
-
</div>}
|
88 |
-
</div>
|
89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/TaxonomyBreadcrumbs.js
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
import { useTemplatesStore } from '../state/Templates'
|
2 |
-
|
3 |
-
export default function TaxonomyBreadcrumbs() {
|
4 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
5 |
-
const formatTitle = (title) => title.replace('tax_', '').replace(/_/g , ' ').replace(/\b\w/g, l => l.toUpperCase())
|
6 |
-
return <div className="hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none">
|
7 |
-
{Object.entries(searchParams.taxonomies).map((tax) => {
|
8 |
-
// Special exception for page templates
|
9 |
-
if (searchParams.type === 'template' && tax[0] === 'tax_pattern_types') {
|
10 |
-
return ''
|
11 |
-
}
|
12 |
-
// Special exception for plugins (like metaslider) that won't have full page templates
|
13 |
-
if (searchParams.type === 'template' && tax[0] === 'tax_features') {
|
14 |
-
return ''
|
15 |
-
}
|
16 |
-
// Special exception for page types
|
17 |
-
if (searchParams.type === 'pattern' && tax[0] === 'tax_page_types') {
|
18 |
-
return ''
|
19 |
-
}
|
20 |
-
return <div key={tax[0]} className="lg:px-2 text-left">
|
21 |
-
<span className="font-bold">{formatTitle(tax[0])}</span>: <span>{tax[1]
|
22 |
-
? tax[1]
|
23 |
-
: 'All'}</span>
|
24 |
-
</div>
|
25 |
-
})}</div>
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/TaxonomySection.js
DELETED
@@ -1,178 +0,0 @@
|
|
1 |
-
import { PanelBody, PanelRow } from '@wordpress/components'
|
2 |
-
import classNames from 'classnames'
|
3 |
-
import { useTemplatesStore } from '../state/Templates'
|
4 |
-
import { __ } from '@wordpress/i18n'
|
5 |
-
import {
|
6 |
-
useState, useEffect, useRef, useCallback,
|
7 |
-
} from '@wordpress/element'
|
8 |
-
import { useTaxonomyStore } from '../state/Taxonomies'
|
9 |
-
|
10 |
-
export default function TaxonomySection({ taxonomy: [title, data] }) {
|
11 |
-
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
12 |
-
const resetTaxonomy = useTemplatesStore(state => state.resetTaxonomy)
|
13 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
14 |
-
const openedTaxonomies = useTaxonomyStore(state => state.openedTaxonomies)
|
15 |
-
const toggleOpenedTaxonomy = useTaxonomyStore(state => state.toggleOpenedTaxonomy)
|
16 |
-
const [pageTwoTerms, setPageTwoTerms] = useState({})
|
17 |
-
const [taxListHeight, setTaxListHeight] = useState({})
|
18 |
-
const pageTwo = useRef()
|
19 |
-
const pageOneFocus = useRef()
|
20 |
-
const pageTwoFocus = useRef()
|
21 |
-
const firstUpdate = useRef(true)
|
22 |
-
|
23 |
-
// This will check whether the term is current (either child or top level/has no child)
|
24 |
-
// And then it will search children so the parent is also marked as selected
|
25 |
-
const isCurrentTax = (tax) => searchParams?.taxonomies[title] === tax.term
|
26 |
-
|| tax.children?.filter((t) => {
|
27 |
-
return t.term === searchParams?.taxonomies[title]
|
28 |
-
}).length > 0
|
29 |
-
|
30 |
-
// Todo: memo this
|
31 |
-
const isAvailableOnCurrentType = useCallback((tax) => {
|
32 |
-
if (Object.prototype.hasOwnProperty.call(tax, 'children')) {
|
33 |
-
return tax.children.filter((t) => t?.type.includes(searchParams.type)).length
|
34 |
-
}
|
35 |
-
return tax?.type?.includes(searchParams.type)
|
36 |
-
}, [searchParams.type])
|
37 |
-
|
38 |
-
useEffect(() => {
|
39 |
-
if (firstUpdate.current) {
|
40 |
-
firstUpdate.current = false
|
41 |
-
return
|
42 |
-
}
|
43 |
-
setPageTwoTerms({})
|
44 |
-
}, [searchParams.type])
|
45 |
-
|
46 |
-
useEffect(() => {
|
47 |
-
if (Object.keys(pageTwoTerms).length) {
|
48 |
-
setTimeout(() => {
|
49 |
-
requestAnimationFrame(() => {
|
50 |
-
setTaxListHeight(pageTwo.current.clientHeight)
|
51 |
-
pageTwoFocus.current.focus()
|
52 |
-
})
|
53 |
-
}, 200)
|
54 |
-
return
|
55 |
-
}
|
56 |
-
setTaxListHeight('auto')
|
57 |
-
}, [pageTwoTerms])
|
58 |
-
|
59 |
-
useEffect(() => {
|
60 |
-
const notSupported = !Object.values(data).filter((tax) => isAvailableOnCurrentType(tax)).length
|
61 |
-
// Reset taxonomies that aren't supported on a type
|
62 |
-
notSupported && resetTaxonomy(title)
|
63 |
-
}, [resetTaxonomy, title, isAvailableOnCurrentType, data])
|
64 |
-
|
65 |
-
// Return early if 1. No data or 2. Children don't match this type
|
66 |
-
if (!Object.keys(data).length || !Object.values(data).filter((tax) => isAvailableOnCurrentType(tax)).length) {
|
67 |
-
return ''
|
68 |
-
}
|
69 |
-
|
70 |
-
const theTitle = title.replace('tax_', '').replace(/_/g , ' ').replace(/\b\w/g, l => l.toUpperCase())
|
71 |
-
return <PanelBody
|
72 |
-
title={theTitle}
|
73 |
-
initialOpen={openedTaxonomies.includes(title)}
|
74 |
-
onToggle={(value) => toggleOpenedTaxonomy(title, value)}>
|
75 |
-
<PanelRow>
|
76 |
-
<div className="overflow-hidden w-full relative" style={{
|
77 |
-
height: taxListHeight,
|
78 |
-
}}>
|
79 |
-
<ul className={classNames('p-1 m-0 w-full transform transition duration-200', {
|
80 |
-
'-translate-x-full': Object.keys(pageTwoTerms).length,
|
81 |
-
})}>
|
82 |
-
<li className="m-0">
|
83 |
-
<button
|
84 |
-
type="button"
|
85 |
-
className="text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus"
|
86 |
-
ref={pageOneFocus}
|
87 |
-
onClick={() => {
|
88 |
-
updateTaxonomies({
|
89 |
-
[title]: searchParams.type === 'pattern' && title === 'tax_categories'
|
90 |
-
? 'Default'
|
91 |
-
: '',
|
92 |
-
})
|
93 |
-
}}>
|
94 |
-
<span className={classNames({
|
95 |
-
'text-wp-theme-500': (!searchParams.taxonomies[title]?.length || searchParams?.taxonomies[title] === 'Default'),
|
96 |
-
})}>
|
97 |
-
{searchParams.type === 'pattern' && title === 'tax_categories'
|
98 |
-
? __('Default', 'extendify-sdk')
|
99 |
-
: __('All', 'extendify-sdk')}
|
100 |
-
</span>
|
101 |
-
</button>
|
102 |
-
</li>
|
103 |
-
{Object.values(data)
|
104 |
-
.filter((tax) => isAvailableOnCurrentType(tax))
|
105 |
-
.sort((prev, next) => prev.term.localeCompare(next.term))
|
106 |
-
.map((tax) =>
|
107 |
-
<li className="m-0 w-full" key={tax.term}>
|
108 |
-
<button
|
109 |
-
type="button"
|
110 |
-
className="text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus"
|
111 |
-
onClick={() => {
|
112 |
-
if (Object.prototype.hasOwnProperty.call(tax, 'children')) {
|
113 |
-
setPageTwoTerms(tax)
|
114 |
-
return
|
115 |
-
}
|
116 |
-
updateTaxonomies({
|
117 |
-
[title]: tax.term,
|
118 |
-
})
|
119 |
-
}}>
|
120 |
-
<span className={classNames({
|
121 |
-
'text-wp-theme-500': isCurrentTax(tax),
|
122 |
-
})}>
|
123 |
-
{tax.term}
|
124 |
-
</span>
|
125 |
-
{Object.prototype.hasOwnProperty.call(tax, 'children') && <span className="text-black">
|
126 |
-
<svg width="8" height="14" viewBox="0 0 8 14" className="stroke-current" fill="none" xmlns="http://www.w3.org/2000/svg">
|
127 |
-
<path d="M1 12.5L6 6.99998L1 1.5" strokeWidth="1.5"/>
|
128 |
-
</svg>
|
129 |
-
</span>}
|
130 |
-
</button>
|
131 |
-
</li>)
|
132 |
-
}
|
133 |
-
</ul>
|
134 |
-
<ul ref={pageTwo} className={classNames('p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0', {
|
135 |
-
'translate-x-full': !Object.keys(pageTwoTerms).length,
|
136 |
-
})}>
|
137 |
-
{Object.values(pageTwoTerms).length > 0 && <li className="m-0">
|
138 |
-
<button
|
139 |
-
type="button"
|
140 |
-
className="text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus"
|
141 |
-
ref={pageTwoFocus}
|
142 |
-
onClick={() => {
|
143 |
-
setPageTwoTerms({})
|
144 |
-
pageOneFocus.current.focus()
|
145 |
-
}}>
|
146 |
-
<svg className="stroke-current transform rotate-180" width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
147 |
-
<path d="M1 12.5L6 6.99998L1 1.5" strokeWidth="1.5"/>
|
148 |
-
</svg>
|
149 |
-
<span>{pageTwoTerms.term}</span>
|
150 |
-
</button>
|
151 |
-
</li> }
|
152 |
-
{Object.values(pageTwoTerms).length
|
153 |
-
&& Object.values(pageTwoTerms.children)
|
154 |
-
.filter((tax) => isAvailableOnCurrentType(tax))
|
155 |
-
.sort((prev, next) => prev.term.localeCompare(next.term))
|
156 |
-
.map((childTax) =>
|
157 |
-
<li className="m-0 pl-6 w-full flex justify-between items-center" key={childTax.term}>
|
158 |
-
<button
|
159 |
-
type="button"
|
160 |
-
className="text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus"
|
161 |
-
onClick={() => {
|
162 |
-
updateTaxonomies({
|
163 |
-
[title]: childTax.term,
|
164 |
-
})
|
165 |
-
}}>
|
166 |
-
<span className={classNames({
|
167 |
-
'text-wp-theme-500': isCurrentTax(childTax),
|
168 |
-
})}>
|
169 |
-
{childTax.term}
|
170 |
-
</span>
|
171 |
-
</button>
|
172 |
-
</li>)
|
173 |
-
}
|
174 |
-
</ul>
|
175 |
-
</div>
|
176 |
-
</PanelRow>
|
177 |
-
</PanelBody>
|
178 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/TemplateButton.js
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
import { Spinner, Button } from '@wordpress/components'
|
2 |
-
import {
|
3 |
-
useState, useEffect, useRef,
|
4 |
-
} from '@wordpress/element'
|
5 |
-
import { __ } from '@wordpress/i18n'
|
6 |
-
import { useIsMounted } from '../hooks/helpers'
|
7 |
-
|
8 |
-
export const TemplateButtonSkeleton = () => <div className="aspect-w-1 aspect-h-1">
|
9 |
-
<div className="w-full h-full flex items-center justify-center bg-gray-100">
|
10 |
-
<Spinner/>
|
11 |
-
</div>
|
12 |
-
</div>
|
13 |
-
|
14 |
-
export default function TemplateButton({ template, imageLoaded, setActiveTemplate }) {
|
15 |
-
const [loaded, setLoaded] = useState(false)
|
16 |
-
const imageContainerRef = useRef()
|
17 |
-
const isMounted = useIsMounted()
|
18 |
-
|
19 |
-
useEffect(() => {
|
20 |
-
if (loaded || !isMounted.current) {
|
21 |
-
return
|
22 |
-
}
|
23 |
-
const img = new Image()
|
24 |
-
img.role = 'button'
|
25 |
-
img.className = 'max-w-full block m-auto object-cover'
|
26 |
-
img.onload = () => {
|
27 |
-
if (isMounted.current) {
|
28 |
-
setLoaded(true)
|
29 |
-
imageContainerRef.current && imageContainerRef.current.appendChild(img)
|
30 |
-
imageLoaded(template.id)
|
31 |
-
}
|
32 |
-
}
|
33 |
-
img.src = template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url
|
34 |
-
}, [template, imageLoaded, loaded, isMounted])
|
35 |
-
|
36 |
-
if (!loaded) {
|
37 |
-
return <TemplateButtonSkeleton/>
|
38 |
-
}
|
39 |
-
return <div className="flex flex-col justify-between group overflow-hidden max-w-lg">
|
40 |
-
{/* Note: This doesn't have tabindex nor keyboard event on purpose. a11y tabs to the button only */}
|
41 |
-
<div
|
42 |
-
className="flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden"
|
43 |
-
onClick={setActiveTemplate}
|
44 |
-
ref={imageContainerRef}>
|
45 |
-
</div>
|
46 |
-
<span
|
47 |
-
role="img"
|
48 |
-
aria-hidden="true"
|
49 |
-
className="h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"></span>
|
50 |
-
<div
|
51 |
-
className="bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer"
|
52 |
-
role="button"
|
53 |
-
onClick={setActiveTemplate}>
|
54 |
-
<div>
|
55 |
-
<h4 className="m-0 font-bold">{template.fields.display_title}</h4>
|
56 |
-
<p className="m-0">{template?.fields?.tax_categories?.filter(c => c.toLowerCase() !== 'default').join(', ')}</p>
|
57 |
-
</div>
|
58 |
-
<Button
|
59 |
-
isSecondary
|
60 |
-
className="sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100"
|
61 |
-
onClick={(e) => {e.stopPropagation();setActiveTemplate()}}>
|
62 |
-
{__('View', 'extendify-sdk')}
|
63 |
-
</Button>
|
64 |
-
</div>
|
65 |
-
</div>
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/components/TypeSelect.js
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
import { __ } from '@wordpress/i18n'
|
2 |
-
import { useTemplatesStore } from '../state/Templates'
|
3 |
-
import classNames from 'classnames'
|
4 |
-
|
5 |
-
export default function TypeSelect() {
|
6 |
-
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
7 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
8 |
-
const updateType = (type) => updateSearchParams({
|
9 |
-
type: type,
|
10 |
-
})
|
11 |
-
return <div className="text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0">
|
12 |
-
<h4 className="sr-only">{__('Type select', 'extendify-sdk')}</h4>
|
13 |
-
<button type="button" className={classNames({
|
14 |
-
'cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus': true,
|
15 |
-
'bg-gray-900 text-white': searchParams.type === 'pattern',
|
16 |
-
'bg-transparent text-black': searchParams.type !== 'pattern',
|
17 |
-
})}
|
18 |
-
onClick={() => updateType('pattern')}>
|
19 |
-
<svg width="17" height="13" viewBox="0 0 17 13" className="fill-current" xmlns="http://www.w3.org/2000/svg">
|
20 |
-
<path d="M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"/>
|
21 |
-
</svg>
|
22 |
-
<span className="">{__('Patterns', 'extendify-sdk')}</span>
|
23 |
-
</button>
|
24 |
-
<button type="button" className={classNames({
|
25 |
-
'cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px': true,
|
26 |
-
'bg-gray-900 text-white': searchParams.type === 'template',
|
27 |
-
'bg-transparent text-black': searchParams.type !== 'template',
|
28 |
-
})}
|
29 |
-
onClick={() => updateType('template')}>
|
30 |
-
<svg width="17" height="13" viewBox="0 0 17 13" className="fill-current" xmlns="http://www.w3.org/2000/svg">
|
31 |
-
<path d="M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"/>
|
32 |
-
</svg>
|
33 |
-
<span className="">{__('Page templates', 'extendify-sdk')}</span>
|
34 |
-
</button>
|
35 |
-
{/* <button type="button" className={classNames({
|
36 |
-
'cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px': true,
|
37 |
-
'bg-gray-900 text-white': searchParams.type === 'sitekit',
|
38 |
-
'bg-transparent text-black': searchParams.type !== 'sitekit',
|
39 |
-
})}
|
40 |
-
onClick={() => updateType('sitekit')}>
|
41 |
-
<svg width="17" height="13" viewBox="0 0 17 13" className="fill-current" xmlns="http://www.w3.org/2000/svg">
|
42 |
-
<path d="M1 6H4C4.55 6 5 5.55 5 5V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V5C0 5.55 0.45 6 1 6ZM1 13H4C4.55 13 5 12.55 5 12V8C5 7.45 4.55 7 4 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM7 6H10C10.55 6 11 5.55 11 5V1C11 0.45 10.55 0 10 0H7C6.45 0 6 0.45 6 1V5C6 5.55 6.45 6 7 6ZM12 1V5C12 5.55 12.45 6 13 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H13C12.45 0 12 0.45 12 1Z"/>
|
43 |
-
</svg>
|
44 |
-
<span className="">{__('Site kits', 'extendify-sdk')}</span>
|
45 |
-
</button> */}
|
46 |
-
</div>
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/hooks/useBeacon.js
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
import { useEffect } from '@wordpress/element'
|
2 |
-
|
3 |
-
export default function useBeacon(show) {
|
4 |
-
const showBeacon = () => {
|
5 |
-
const container = document.getElementById('beacon-container')
|
6 |
-
if (container) {
|
7 |
-
container.style.position = 'relative'
|
8 |
-
container.style.zIndex = Number.MAX_SAFE_INTEGER
|
9 |
-
container.style.display = 'block'
|
10 |
-
}
|
11 |
-
}
|
12 |
-
|
13 |
-
const hideBeacon = () => {
|
14 |
-
const container = document.getElementById('beacon-container')
|
15 |
-
if (container) {
|
16 |
-
container.style.display = 'none'
|
17 |
-
window.Beacon('close')
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
useEffect(() => {
|
22 |
-
if (!show) {
|
23 |
-
return
|
24 |
-
}
|
25 |
-
|
26 |
-
if (window.Beacon) {
|
27 |
-
showBeacon()
|
28 |
-
return () => hideBeacon()
|
29 |
-
}
|
30 |
-
|
31 |
-
// Code direct from HS
|
32 |
-
(function (
|
33 |
-
e, t, n,
|
34 |
-
) {
|
35 |
-
function a() {
|
36 |
-
const e = t.getElementsByTagName('script')[0],
|
37 |
-
n = t.createElement('script')
|
38 |
-
;(n.async = !0), (n.src = 'https://beacon-v2.helpscout.net'), e.parentNode?.insertBefore(n, e)
|
39 |
-
}
|
40 |
-
if (
|
41 |
-
((e.Beacon = n = function (
|
42 |
-
t, n, a,
|
43 |
-
) {
|
44 |
-
e.Beacon.readyQueue.push({
|
45 |
-
method: t, options: n, data: a,
|
46 |
-
})
|
47 |
-
}),
|
48 |
-
(n.readyQueue = []),
|
49 |
-
'complete' === t.readyState)
|
50 |
-
)
|
51 |
-
return a()
|
52 |
-
e.attachEvent
|
53 |
-
? e.attachEvent('onload', a)
|
54 |
-
: e.addEventListener(
|
55 |
-
'load', a, !1,
|
56 |
-
)
|
57 |
-
})(
|
58 |
-
window, document, window.Beacon || function () {},
|
59 |
-
)
|
60 |
-
|
61 |
-
window.Beacon('init', '2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91')
|
62 |
-
window.Beacon(
|
63 |
-
'on', 'ready', showBeacon,
|
64 |
-
)
|
65 |
-
return () => {
|
66 |
-
window.Beacon(
|
67 |
-
'off', 'ready', showBeacon,
|
68 |
-
)
|
69 |
-
hideBeacon()
|
70 |
-
}
|
71 |
-
}, [show])
|
72 |
-
|
73 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/CuratedView.js
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useRef, useState,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import { __ } from '@wordpress/i18n'
|
5 |
-
import { useTaxonomyStore } from '../state/Taxonomies'
|
6 |
-
import SidebarMain from './parts/sidebars/SidebarMain'
|
7 |
-
import RowByTax from './parts/RowByTax'
|
8 |
-
import HasSidebar from './parts/HasSidebar'
|
9 |
-
import TypeSelect from '../components/TypeSelect'
|
10 |
-
import TaxonomyBreadcrumbs from '../components/TaxonomyBreadcrumbs'
|
11 |
-
import Toolbar from './parts/Toolbar'
|
12 |
-
import { useTemplatesStore } from '../state/Templates'
|
13 |
-
|
14 |
-
export default function CuratedView() {
|
15 |
-
const [terms, setTerms] = useState([])
|
16 |
-
const scrollableArea = useRef()
|
17 |
-
const taxonomies = useTaxonomyStore(state => state.taxonomies)
|
18 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
19 |
-
const termsFiltered = (t) => Object.values(t)
|
20 |
-
.filter((term) => term.type.includes('pattern'))
|
21 |
-
.map((term) => term.term)
|
22 |
-
const mergeTerm = (tax, term) => {
|
23 |
-
const params = { ...searchParams }
|
24 |
-
params.taxonomies = Object.assign(
|
25 |
-
{}, searchParams.taxonomies, { [tax]: term },
|
26 |
-
)
|
27 |
-
return params
|
28 |
-
}
|
29 |
-
|
30 |
-
useEffect(() => {
|
31 |
-
if (Object.keys(taxonomies?.tax_pattern_types ?? {}).length) {
|
32 |
-
setTerms(termsFiltered(taxonomies.tax_pattern_types))
|
33 |
-
}
|
34 |
-
}, [taxonomies])
|
35 |
-
|
36 |
-
useEffect(() => {
|
37 |
-
scrollableArea.current.scrollTop = 0
|
38 |
-
}, [searchParams])
|
39 |
-
|
40 |
-
return <div className="bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto">
|
41 |
-
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
42 |
-
<div className="w-full flex-grow overflow-hidden">
|
43 |
-
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
44 |
-
{__('Skip to content', 'extendify-sdk')}
|
45 |
-
</a>
|
46 |
-
<div className="sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full">
|
47 |
-
<HasSidebar>
|
48 |
-
<SidebarMain/>
|
49 |
-
<>
|
50 |
-
<TypeSelect/>
|
51 |
-
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
52 |
-
<TaxonomyBreadcrumbs/>
|
53 |
-
<div className="relative h-full z-30 bg-white">
|
54 |
-
<div
|
55 |
-
ref={scrollableArea}
|
56 |
-
className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-16 px-6 sm:pl-0 sm:pr-8 pb-60">
|
57 |
-
{terms.length > 0 && terms.map((term) => {
|
58 |
-
return <RowByTax
|
59 |
-
key={term}
|
60 |
-
title={term}
|
61 |
-
tax="tax_pattern_types"
|
62 |
-
searchParams={mergeTerm('tax_pattern_types', term)}/>
|
63 |
-
})}
|
64 |
-
</div>
|
65 |
-
</div>
|
66 |
-
</>
|
67 |
-
</HasSidebar>
|
68 |
-
</div>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/Login.js
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
// import { useEffect } from '@wordpress/element'
|
2 |
-
import LoginInterface from '../components/LoginInterface'
|
3 |
-
import { __ } from '@wordpress/i18n'
|
4 |
-
import { useGlobalStore } from '../state/GlobalState'
|
5 |
-
import Toolbar from './parts/Toolbar'
|
6 |
-
|
7 |
-
export default function Login() {
|
8 |
-
|
9 |
-
return <div className="bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto">
|
10 |
-
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
11 |
-
<div className="w-full flex-grow overflow-hidden bg-extendify-light">
|
12 |
-
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
13 |
-
{__('Skip to content', 'extendify-sdk')}
|
14 |
-
</a>
|
15 |
-
<div className="flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full">
|
16 |
-
<div className="absolute flex inset-0 items-center justify-center z-20 sm:space-x-12">
|
17 |
-
<div className="pl-12 py-6 absolute top-0 left-0">
|
18 |
-
<button
|
19 |
-
type="button"
|
20 |
-
className="cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus"
|
21 |
-
onClick={() => useGlobalStore.setState({
|
22 |
-
currentPage: 'main',
|
23 |
-
})}>
|
24 |
-
<svg className="fill-current" width="8" height="12" viewBox="0 0 8 12" xmlns="http://www.w3.org/2000/svg">
|
25 |
-
<path d="M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"/>
|
26 |
-
</svg>
|
27 |
-
<span className="ml-4">{__('Go back', 'extendify-sdk')}</span>
|
28 |
-
</button>
|
29 |
-
</div>
|
30 |
-
<div className="flex justify-center">
|
31 |
-
<LoginInterface/>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/Router.js
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
import Welcome from './guide/Welcome.js'
|
2 |
-
// import GuideStart from './guide/GuideStart.js'
|
3 |
-
// import GuideSteps from './guide/GuideSteps.js'
|
4 |
-
import GridView from './GridView.js'
|
5 |
-
import CuratedView from './CuratedView.js'
|
6 |
-
import SingleView from './SingleView.js'
|
7 |
-
import Login from './Login.js'
|
8 |
-
import WaitingCrunching from './modals/WaitingCrunchingModal.js'
|
9 |
-
import { useTemplatesStore } from '../state/Templates.js'
|
10 |
-
|
11 |
-
// Probably the most basic router you can imagine
|
12 |
-
export default function Router({ page }) {
|
13 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
14 |
-
|
15 |
-
// TODO: Possibly we can have a loading screen while we fetch terms, etc
|
16 |
-
if (page === 'main' && !Object.keys(searchParams?.taxonomies ?? {}).length) {
|
17 |
-
page = 'curated'
|
18 |
-
}
|
19 |
-
|
20 |
-
// Reroute the main page depending on the taxonomy and type choices
|
21 |
-
// If no pattern types are selected, show a curated page
|
22 |
-
if (page === 'main' &&
|
23 |
-
searchParams?.type === 'pattern' &&
|
24 |
-
searchParams?.taxonomies?.tax_pattern_types === '')
|
25 |
-
{
|
26 |
-
page = 'curated'
|
27 |
-
}
|
28 |
-
|
29 |
-
switch (page) {
|
30 |
-
case 'welcome': return <Welcome/>
|
31 |
-
// case 'guide-start': return <GuideStart/>
|
32 |
-
// case 'guide-steps': return <GuideSteps/>
|
33 |
-
case 'waiting-crunching': return <WaitingCrunching/>
|
34 |
-
case 'curated': return <CuratedView/>
|
35 |
-
case 'main': return <GridView/>
|
36 |
-
case 'single': return <SingleView/>
|
37 |
-
case 'login': return <Login/>
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/guide/GuideStart.js
DELETED
@@ -1,149 +0,0 @@
|
|
1 |
-
// import { useEffect } from '@wordpress/element'
|
2 |
-
import { __ } from '@wordpress/i18n'
|
3 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
4 |
-
import { useUserStore } from '../../state/User'
|
5 |
-
import { General as GeneralApi } from '../../api/General'
|
6 |
-
import { useEffect, useRef } from '@wordpress/element'
|
7 |
-
import { useTemplatesStore } from '../../state/Templates'
|
8 |
-
|
9 |
-
export default function GuideStart() {
|
10 |
-
const preferred = useUserStore(state => state.preferredOptions)
|
11 |
-
const templates = useTemplatesStore(state => state.templates)
|
12 |
-
const closeGuide = () => {
|
13 |
-
GeneralApi.ping('guide-cancelled')
|
14 |
-
templates.length && useTemplatesStore.setState({ skipNextFetch: true })
|
15 |
-
useGlobalStore.setState({ currentPage: 'main' })
|
16 |
-
}
|
17 |
-
const goToWelcome = () => {
|
18 |
-
useGlobalStore.setState({ currentPage: 'welcome' })
|
19 |
-
}
|
20 |
-
const setTypeAndProgress = (type) => {
|
21 |
-
// Update their preferred type and start the guide, or if they x
|
22 |
-
// then send them to the main screen
|
23 |
-
type && useUserStore.getState().updatePreferredOption('type', type)
|
24 |
-
useGlobalStore.setState({
|
25 |
-
currentPage: type
|
26 |
-
? 'guide-steps'
|
27 |
-
: 'main',
|
28 |
-
})
|
29 |
-
}
|
30 |
-
|
31 |
-
const templatesRef = useRef()
|
32 |
-
const patternsRef = useRef()
|
33 |
-
|
34 |
-
useEffect(() => {
|
35 |
-
GeneralApi.ping('guide-started')
|
36 |
-
|
37 |
-
preferred?.type === 'pattern'
|
38 |
-
? patternsRef.current.focus()
|
39 |
-
: templatesRef.current.focus()
|
40 |
-
}, [preferred?.type])
|
41 |
-
|
42 |
-
const emptyToolbar = <div className="w-full h-16 relative z-10 border-solid border-0 flex-shrink-0">
|
43 |
-
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
44 |
-
<div className="flex space-x-12 h-full">
|
45 |
-
</div>
|
46 |
-
<div className="space-x-2 transform sm:translate-x-8">
|
47 |
-
<button
|
48 |
-
type="button"
|
49 |
-
className="components-button has-icon"
|
50 |
-
onClick={closeGuide}>
|
51 |
-
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
52 |
-
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
53 |
-
</button>
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
</div>
|
57 |
-
|
58 |
-
return <div className="w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-white">
|
59 |
-
{emptyToolbar}
|
60 |
-
<section className="flex-grow w-full justify-between flex flex-col overflow-y-scroll">
|
61 |
-
<div className="flex flex-col w-full lg:h-full max-w-screen-2xl mx-auto p-8" style={{ paddingTop: '13vh' }}>
|
62 |
-
<h1 className="text-left m-0 mb-8 2xl:mb-16 text-7xl">
|
63 |
-
{__('Hello', 'extendify-sdk')}
|
64 |
-
</h1>
|
65 |
-
<div className="flex-grow flex flex-col lg:flex-row space-x-0 space-y-16 lg:space-y-0 lg:space-x-16 xl:space-x-32">
|
66 |
-
<button
|
67 |
-
style={{ maxHeight: '26rem' }}
|
68 |
-
ref={patternsRef}
|
69 |
-
onClick={() => setTypeAndProgress('pattern')}
|
70 |
-
className="button-focus-big-green cursor-pointer bg-white border border-black flex xl:w-1/2 flex-col h-full hover:bg-gray-50 min-h-60 p-8 lg:px-20 space-y-4">
|
71 |
-
<h3 className="text-2xl m-0 text-extendify-main">{__('Add a section', 'extendify-sdk')}</h3>
|
72 |
-
<p className="text-left mb-8 text-lg">{__('Add to an existing page or build your own using patterns.', 'extendify-sdk')}</p>
|
73 |
-
<span className="pt-4">
|
74 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="206" height="122" viewBox="0 0 206 122" fill="none">
|
75 |
-
<path d="M69 0H0V59H69V0Z" fill="#DFDFDF"/>
|
76 |
-
<path d="M204 0H79V60H204V0Z" fill="#DFDFDF"/>
|
77 |
-
<path d="M62.166 25H9.16602V28H62.166V25Z" fill="#F9F9F9"/>
|
78 |
-
<path d="M63.166 18H10.166V21H63.166V18Z" fill="#F9F9F9"/>
|
79 |
-
<path d="M62.166 34H9.16602V39H62.166V34Z" fill="#F9F9F9"/>
|
80 |
-
<path d="M62.166 43H9.16602V48H62.166V43Z" fill="#F9F9F9"/>
|
81 |
-
<path d="M140.166 25H87.166V28H140.166V25Z" fill="#F9F9F9"/>
|
82 |
-
<path d="M140.166 34H87.166V39H140.166V34Z" fill="#F9F9F9"/>
|
83 |
-
<path d="M140.166 43H87.166V48H140.166V43Z" fill="#F9F9F9"/>
|
84 |
-
<path d="M197.166 25H151.166V28H197.166V25Z" fill="#F9F9F9"/>
|
85 |
-
<path d="M141.166 17H88.166V20H141.166V17Z" fill="#F9F9F9"/>
|
86 |
-
<path d="M198.166 17H152.166V20H198.166V17Z" fill="#F9F9F9"/>
|
87 |
-
<path d="M62.166 10H9.16602V13H62.166V10Z" fill="#F9F9F9"/>
|
88 |
-
<path d="M140.166 9H87.166V12H140.166V9Z" fill="#F9F9F9"/>
|
89 |
-
<path d="M197.166 9H151.166V12H197.166V9Z" fill="#F9F9F9"/>
|
90 |
-
<path d="M197.166 34H151.166V39H197.166V34Z" fill="#F9F9F9"/>
|
91 |
-
<path d="M197.166 43H151.166V48H197.166V43Z" fill="#F9F9F9"/>
|
92 |
-
<path d="M154.172 77.8088H0V121.216H154.172V77.8088Z" fill="#DFDFDF"/>
|
93 |
-
<path d="M133.637 110.446C141.077 110.446 147.109 104.75 147.109 97.7229C147.109 90.6963 141.077 85 133.637 85C126.197 85 120.166 90.6963 120.166 97.7229C120.166 104.75 126.197 110.446 133.637 110.446Z" fill="#F9F9F9"/>
|
94 |
-
<path d="M205.166 78H162.166V121H205.166V78Z" fill="#DFDFDF"/>
|
95 |
-
<path d="M183.803 111.637C191.243 111.637 197.275 105.941 197.275 98.9141C197.275 91.8874 191.243 86.1912 183.803 86.1912C176.363 86.1912 170.332 91.8874 170.332 98.9141C170.332 105.941 176.363 111.637 183.803 111.637Z" fill="#F9F9F9"/>
|
96 |
-
<path d="M113.695 88.7898H13.4082V100.764H113.695V88.7898Z" fill="#F9F9F9"/>
|
97 |
-
<path d="M113.695 105.255H13.4082V109.745H113.695V105.255Z" fill="#F9F9F9"/>
|
98 |
-
</svg>
|
99 |
-
</span>
|
100 |
-
</button>
|
101 |
-
<button
|
102 |
-
style={{
|
103 |
-
maxHeight: '26rem',
|
104 |
-
}}
|
105 |
-
ref={templatesRef}
|
106 |
-
onClick={() => setTypeAndProgress('template')}
|
107 |
-
className="button-focus-big-green cursor-pointer bg-white border border-black flex xl:w-1/2 flex-col h-full hover:bg-gray-50 min-h-60 p-8 lg:px-20 space-y-4">
|
108 |
-
<h3 className="text-2xl m-0 text-extendify-main">{__('Add a page', 'extendify-sdk')}</h3>
|
109 |
-
<p className="text-left mb-8 text-lg">{__('Use a full page template that you can customize to make your own.', 'extendify-sdk')}</p>
|
110 |
-
<span className="pt-4">
|
111 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="156" height="128" viewBox="0 0 156 128" fill="none">
|
112 |
-
<path d="M155.006 38.4395H0.833984V81.8471H155.006V38.4395Z" fill="#DFDFDF"/>
|
113 |
-
<path d="M155 0H1V36H155V0Z" fill="#DFDFDF"/>
|
114 |
-
<path d="M148 7H10V28H148V7Z" fill="#F9F9F9"/>
|
115 |
-
<path d="M147.521 47.4204H9.81445V50.414H147.521V47.4204Z" fill="#F9F9F9"/>
|
116 |
-
<path d="M147.521 56.4012H9.81445V60.8917H147.521V56.4012Z" fill="#F9F9F9"/>
|
117 |
-
<path d="M147.521 65.3821H9.81445V69.8726H147.521V65.3821Z" fill="#F9F9F9"/>
|
118 |
-
<path d="M155.006 83.8089H0.833984V127.217H155.006V83.8089Z" fill="#DFDFDF"/>
|
119 |
-
<path d="M21.7897 118.236C29.2297 118.236 35.261 112.539 35.261 105.513C35.261 98.486 29.2297 92.7898 21.7897 92.7898C14.3497 92.7898 8.31836 98.486 8.31836 105.513C8.31836 112.539 14.3497 118.236 21.7897 118.236Z" fill="#F9F9F9"/>
|
120 |
-
<path d="M144.529 92.7898H44.2422V104.764H144.529V92.7898Z" fill="#F9F9F9"/>
|
121 |
-
<path d="M144.529 109.255H44.2422V113.745H144.529V109.255Z" fill="#F9F9F9"/>
|
122 |
-
</svg>
|
123 |
-
</span>
|
124 |
-
</button>
|
125 |
-
</div>
|
126 |
-
</div>
|
127 |
-
<footer className="flex justify-between p-14 w-full">
|
128 |
-
<button
|
129 |
-
type="button"
|
130 |
-
className="cursor-pointer bg-transparent space-x-8 flex items-center hover:bg-gray-100 p-4 -m-4"
|
131 |
-
onClick={goToWelcome}>
|
132 |
-
<svg className="block" width="64" height="64" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
133 |
-
<rect y="25.75" width="70.8125" height="77.25" fill="#000000"/>
|
134 |
-
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2"/>
|
135 |
-
</svg>
|
136 |
-
<span className="text-2xl font-bold text-extendify-main">
|
137 |
-
{__('What is Extendify?', 'extendify-sdk')}
|
138 |
-
</span>
|
139 |
-
</button>
|
140 |
-
{/* <button
|
141 |
-
type="button"
|
142 |
-
onClick={closeGuide}
|
143 |
-
className="bg-transparent cursor-pointer text-lg text-extendify-link underline">
|
144 |
-
{__('Skip', 'extendify-sdk')}
|
145 |
-
</button> */}
|
146 |
-
</footer>
|
147 |
-
</section>
|
148 |
-
</div>
|
149 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/guide/GuideSteps.js
DELETED
@@ -1,231 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, render, unmountComponentAtNode,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import { __ } from '@wordpress/i18n'
|
5 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
6 |
-
import { useUserStore } from '../../state/User'
|
7 |
-
import { General as GeneralApi } from '../../api/General'
|
8 |
-
import { useTaxonomyStore } from '../../state/Taxonomies'
|
9 |
-
import classNames from 'classnames'
|
10 |
-
import { useTemplatesStore } from '../../state/Templates'
|
11 |
-
import SearchPredict from '../../components/SearchPredict'
|
12 |
-
import { Transition } from '@headlessui/react'
|
13 |
-
import WaitingCrunching from '../modals/WaitingCrunchingModal'
|
14 |
-
import { Templates as TemplatesApi } from '../../api/Templates'
|
15 |
-
|
16 |
-
export default function GuideSteps() {
|
17 |
-
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
18 |
-
const templates = useTemplatesStore(state => state.templates)
|
19 |
-
const taxonomyDefaultState = useTemplatesStore(state => state.taxonomyDefaultState)
|
20 |
-
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
21 |
-
const appendTemplates = useTemplatesStore(state => state.appendTemplates)
|
22 |
-
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
23 |
-
const taxonomies = useTaxonomyStore(state => state.taxonomies)
|
24 |
-
const preferred = useUserStore(state => state.preferredOptions)
|
25 |
-
const [allCats, setAllCats] = useState([])
|
26 |
-
const [stepOneTouched, setStepOneTouched] = useState(false)
|
27 |
-
const [stepTwoTouched, setStepTwoTouched] = useState(false)
|
28 |
-
const [stepThreeTouched, setStepThreeTouched] = useState(false)
|
29 |
-
|
30 |
-
const setPreferred = (key, value) => {
|
31 |
-
useUserStore.getState().updatePreferredOption(key, value)
|
32 |
-
}
|
33 |
-
const typeTax = preferred?.type == 'template'
|
34 |
-
? 'tax_page_types'
|
35 |
-
: 'tax_pattern_types'
|
36 |
-
|
37 |
-
const closeGuide = () => {
|
38 |
-
GeneralApi.ping('guide-cancelled')
|
39 |
-
templates.length && useTemplatesStore.setState({ skipNextFetch: true })
|
40 |
-
useGlobalStore.setState({ currentPage: 'main' })
|
41 |
-
}
|
42 |
-
const fetchDelayThenDisplay = () => {
|
43 |
-
updateSearchParams({
|
44 |
-
taxonomies: Object.assign(
|
45 |
-
{}, taxonomyDefaultState, preferred.taxonomies,
|
46 |
-
),
|
47 |
-
type: preferred.type,
|
48 |
-
search: preferred.search,
|
49 |
-
})
|
50 |
-
const action = new Promise((resolve) => {
|
51 |
-
useTemplatesStore.setState({ skipNextFetch: true })
|
52 |
-
const setupTemplates = (data) => {
|
53 |
-
appendTemplates(data)
|
54 |
-
data.length === 1 && setActiveTemplate(data[0])
|
55 |
-
useTemplatesStore.setState({
|
56 |
-
nextPage: data.offset,
|
57 |
-
})
|
58 |
-
}
|
59 |
-
// TODO: this could probably be smarter and recursive we want to remove more
|
60 |
-
TemplatesApi.get(useTemplatesStore.getState().searchParams).then((response) => {
|
61 |
-
if (response.records.length) {
|
62 |
-
setupTemplates(response.records)
|
63 |
-
return resolve()
|
64 |
-
}
|
65 |
-
// Remove the style and try again
|
66 |
-
updateTaxonomies({ tax_style: '' })
|
67 |
-
TemplatesApi.get(useTemplatesStore.getState().searchParams).then((response) => {
|
68 |
-
setupTemplates(response.records)
|
69 |
-
return resolve()
|
70 |
-
})
|
71 |
-
})
|
72 |
-
})
|
73 |
-
const callback = async () => {
|
74 |
-
await new Promise((resolve) => setTimeout(resolve, 1500))
|
75 |
-
useGlobalStore.setState({
|
76 |
-
currentPage: 'main',
|
77 |
-
})
|
78 |
-
unmountComponentAtNode(document.getElementById('extendify-util'))
|
79 |
-
}
|
80 |
-
render(<WaitingCrunching
|
81 |
-
action={action}
|
82 |
-
callback={callback}
|
83 |
-
text={__('Finding templates...', 'extendify-sdk')}
|
84 |
-
/>, document.getElementById('extendify-util'))
|
85 |
-
}
|
86 |
-
|
87 |
-
const showStepTwo = () => (stepOneTouched || preferred?.taxonomies?.tax_categories) ? true : false
|
88 |
-
const showStepThree = () => (showStepTwo() && (!taxonomies[typeTax] || stepTwoTouched || preferred?.taxonomies[typeTax])) ? true : false
|
89 |
-
const showFinalButton = () => (showStepThree() && (stepThreeTouched || preferred?.taxonomies?.tax_style)) ? true : false
|
90 |
-
|
91 |
-
useEffect(() => {
|
92 |
-
if (!taxonomies?.tax_categories) {
|
93 |
-
return
|
94 |
-
}
|
95 |
-
|
96 |
-
const all = Object.values(taxonomies.tax_categories)
|
97 |
-
// Map over all terms
|
98 |
-
.map((term) =>
|
99 |
-
// Filter out terms not of this type (pattern/template)
|
100 |
-
term.children.filter(c => c.type.includes(preferred?.type)).map(c => c.term))
|
101 |
-
// merge all together
|
102 |
-
.flat().sort()
|
103 |
-
|
104 |
-
setAllCats([...new Set(all)])
|
105 |
-
}, [taxonomies, preferred?.type])
|
106 |
-
|
107 |
-
const emptyToolbar = <div className="w-full h-16 relative z-10 border-solid border-0 flex-shrink-0">
|
108 |
-
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
109 |
-
<div className="flex space-x-12 h-full">
|
110 |
-
</div>
|
111 |
-
<div className="space-x-2 transform sm:translate-x-8">
|
112 |
-
<button
|
113 |
-
type="button"
|
114 |
-
className="components-button has-icon"
|
115 |
-
onClick={closeGuide}>
|
116 |
-
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
117 |
-
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
118 |
-
</button>
|
119 |
-
</div>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
|
123 |
-
return <div className="w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-white">
|
124 |
-
{emptyToolbar}
|
125 |
-
<section className="flex-grow w-full justify-between flex flex-col overflow-y-scroll">
|
126 |
-
<div className="flex flex-col w-full h-full p-8 pb-0 md:p-16 md:pb-0 2xl:p-28 2xl:pb-0 max-w-screen-2xl mx-auto">
|
127 |
-
<h1 className="text-left m-0 mb-12 text-7xl">
|
128 |
-
{__('Hello', 'extendify-sdk')}
|
129 |
-
</h1>
|
130 |
-
<div className="flex-grow lg:flex justify-between space-y-8 lg:space-y-0 lg:space-x-16 xl:space-x-32">
|
131 |
-
<div className="text-left flex-shrink-0 lg:w-1/2">
|
132 |
-
<h2 className="text-2xl m-0 mb-8">
|
133 |
-
{preferred?.type === 'template' ?
|
134 |
-
__('Help me find a template', 'extendify-sdk') :
|
135 |
-
__('Help me find a pattern', 'extendify-sdk')}
|
136 |
-
</h2>
|
137 |
-
<div className="flex flex-col space-y-8">
|
138 |
-
<div>
|
139 |
-
<p className="text-base text-gray-900 m-0 mb-5">{__('Select your industry:', 'extendify-sdk')}</p>
|
140 |
-
<SearchPredict
|
141 |
-
list={allCats}
|
142 |
-
value={preferred?.taxonomies?.tax_categories}
|
143 |
-
touched={() => setStepOneTouched(true)}
|
144 |
-
label={__('Category', 'extendify-sdk')}
|
145 |
-
setValue={(v) => setPreferred('tax_categories', v)}/>
|
146 |
-
</div>
|
147 |
-
|
148 |
-
<Transition
|
149 |
-
enter="transform transition duration-50 duration-300"
|
150 |
-
enterFrom="opacity-0 translate-y-2"
|
151 |
-
enterTo="opacity-100 translate-y-0"
|
152 |
-
show={showStepTwo()}>
|
153 |
-
{taxonomies[typeTax] && <div onChange={() => setStepTwoTouched(true)}>
|
154 |
-
<label
|
155 |
-
className="text-base text-gray-900 m-0 mb-4 block"
|
156 |
-
htmlFor="typeTax-search">
|
157 |
-
{__('What type of section are you trying to add?', 'extendify-sdk')}
|
158 |
-
</label>
|
159 |
-
<select
|
160 |
-
onChange={(event) => setPreferred(typeTax, event.target.value)}
|
161 |
-
value={preferred?.taxonomies[typeTax] ?? ''}
|
162 |
-
id="typeTax-search"
|
163 |
-
className="h-8 max-w-md min-h-0 w-full px-2 text-sm border border-gray-900 button-focus-big-green rounded-none">
|
164 |
-
<option value="">{__('Select type', 'extendify-sdk')}</option>
|
165 |
-
{Object.values(taxonomies[typeTax]).map((t) => {
|
166 |
-
return <option key={t.term} value={t.term}>
|
167 |
-
{t.term}
|
168 |
-
</option>
|
169 |
-
})}
|
170 |
-
</select>
|
171 |
-
</div>}
|
172 |
-
</Transition>
|
173 |
-
</div>
|
174 |
-
</div>
|
175 |
-
<div className="mt-16 text-left">
|
176 |
-
<Transition
|
177 |
-
enter="transform transition duration-50 duration-300"
|
178 |
-
enterFrom="opacity-0 translate-y-2"
|
179 |
-
enterTo="opacity-100 translate-y-0"
|
180 |
-
show={showStepThree()}>
|
181 |
-
<div onClick={() => setStepThreeTouched(true)}>
|
182 |
-
<p className="text-base text-gray-900 m-0 mb-4">
|
183 |
-
{__('What style best matches what you\'re looking for?', 'extendify-sdk')}
|
184 |
-
</p>
|
185 |
-
<div>
|
186 |
-
{taxonomies?.tax_style && <div className="grid grid-cols-2 gap-4 mb-8">
|
187 |
-
{Object.values(taxonomies.tax_style)
|
188 |
-
.filter((t) => t?.type?.includes(preferred?.type) && t?.thumbnail)
|
189 |
-
.map((t) => {
|
190 |
-
return <button
|
191 |
-
key={t.term}
|
192 |
-
onClick={() => setPreferred('tax_style', t.term)}
|
193 |
-
className={classNames({
|
194 |
-
'bg-transparent p-0 m-0 cursor-pointer': true,
|
195 |
-
'ring-4 ring-offset-4 ring-extendify-main outline-none': t.term === preferred?.taxonomies?.tax_style,
|
196 |
-
})}>
|
197 |
-
<span className="sr-only">{t.term}</span>
|
198 |
-
<img className="w-full" src={t.thumbnail} alt={`Style named ${t.term}`} />
|
199 |
-
</button>
|
200 |
-
})}
|
201 |
-
</div>}
|
202 |
-
</div>
|
203 |
-
</div>
|
204 |
-
</Transition>
|
205 |
-
<Transition
|
206 |
-
enter="transform transition duration-50 duration-300"
|
207 |
-
enterFrom="opacity-0 translate-y-2"
|
208 |
-
enterTo="opacity-100 translate-y-0"
|
209 |
-
show={showFinalButton()}>
|
210 |
-
<button
|
211 |
-
onClick={() => fetchDelayThenDisplay()}
|
212 |
-
className="button-extendify-main button-focus-big-green p-4 text-xl">
|
213 |
-
{preferred?.type === 'template' ?
|
214 |
-
__('View templates', 'extendify-sdk') :
|
215 |
-
__('View patterns', 'extendify-sdk')}
|
216 |
-
</button>
|
217 |
-
</Transition>
|
218 |
-
</div>
|
219 |
-
</div>
|
220 |
-
</div>
|
221 |
-
<footer className="flex justify-between p-14 w-full">
|
222 |
-
<div>
|
223 |
-
<svg className="block" width="64" height="64" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
224 |
-
<rect y="25.75" width="70.8125" height="77.25" fill="#000000"/>
|
225 |
-
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2"/>
|
226 |
-
</svg>
|
227 |
-
</div>
|
228 |
-
</footer>
|
229 |
-
</section>
|
230 |
-
</div>
|
231 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/guide/Welcome.js
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
// import { useEffect } from '@wordpress/element'
|
2 |
-
import { __, sprintf } from '@wordpress/i18n'
|
3 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
4 |
-
import { useUserStore } from '../../state/User'
|
5 |
-
import { General as GeneralApi } from '../../api/General'
|
6 |
-
import { useEffect } from '@wordpress/element'
|
7 |
-
import { useTemplatesStore } from '../../state/Templates'
|
8 |
-
|
9 |
-
export default function Welcome() {
|
10 |
-
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
11 |
-
const updateTypeAndClose = (type) => {
|
12 |
-
GeneralApi.ping(`welcome-${type ?? 'closed'}`)
|
13 |
-
|
14 |
-
useUserStore.setState({
|
15 |
-
hasClickedThroughWelcomePage: true,
|
16 |
-
})
|
17 |
-
|
18 |
-
// Update their preferred type and start the guide, or if they x
|
19 |
-
// then send them to the main screen
|
20 |
-
// type && useUserStore.getState().updatePreferredOption('type', type)
|
21 |
-
// useGlobalStore.setState({
|
22 |
-
// currentPage: type
|
23 |
-
// ? 'guide-steps'
|
24 |
-
// : 'main',
|
25 |
-
// })
|
26 |
-
// Delete if using welcome guide
|
27 |
-
updateSearchParams({
|
28 |
-
type: type ?? 'pattern',
|
29 |
-
})
|
30 |
-
useGlobalStore.setState({ currentPage: 'main' })
|
31 |
-
}
|
32 |
-
|
33 |
-
useEffect(() => {
|
34 |
-
GeneralApi.ping('welcome-opened')
|
35 |
-
}, [])
|
36 |
-
|
37 |
-
const emptyToolbar = <div className="w-full h-16 relative z-10 border-solid border-0 flex-shrink-0">
|
38 |
-
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
39 |
-
<div className="flex space-x-12 h-full">
|
40 |
-
</div>
|
41 |
-
<div className="space-x-2 transform sm:translate-x-8">
|
42 |
-
<button
|
43 |
-
type="button"
|
44 |
-
className="components-button has-icon"
|
45 |
-
onClick={() => updateTypeAndClose()}>
|
46 |
-
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
47 |
-
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
48 |
-
</button>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
</div>
|
52 |
-
|
53 |
-
const headerText = window.extendifySdkData.source === 'Redux' ?
|
54 |
-
__('Welcome to the Redux Library by Extendify', 'extendify-sdk') :
|
55 |
-
__('Welcome to the Extendify library', 'extendify-sdk')
|
56 |
-
|
57 |
-
return <div className="w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-white">
|
58 |
-
{emptyToolbar}
|
59 |
-
<section className="flex-grow w-full justify-between flex flex-col overflow-y-scroll">
|
60 |
-
<div className="flex items-center flex-grow">
|
61 |
-
<div className="w-full p-8 max-w-screen-2xl mx-auto lg:space-x-16 lg:flex space-y-16 lg:space-y-0">
|
62 |
-
<div className="flex-grow text-left">
|
63 |
-
<h1 className="m-0 mb-10 text-5xl">
|
64 |
-
{headerText}
|
65 |
-
</h1>
|
66 |
-
<div className="max-w-2xl mb-24">
|
67 |
-
<p className="mb-10 leading-loose">{__('Congratulations! You have access to our entire library of Gutenberg patterns and templates. You can add up to 3 templates or patterns to your site completely free.', 'extendify-sdk')}</p>
|
68 |
-
<p className="mb-6 leading-loose">{__('All patterns and templates are pre-designed to look beautiful with options to fit your style. They also keep your site running lightning fast by using only core blocks with no 3rd party page builder required.', 'extendify-sdk')}</p>
|
69 |
-
<a
|
70 |
-
className="text-sm text-extendify-link underline"
|
71 |
-
href={`https://extendify.com?utm_source=${window.extendifySdkData.source}&utm_medium=library&utm_campaign=welcome`}
|
72 |
-
target="_blank"
|
73 |
-
rel="noreferrer">
|
74 |
-
{__('Learn more about Extendify', 'extendify-sdk')}
|
75 |
-
</a>
|
76 |
-
</div>
|
77 |
-
<h2 className="font-bold border-b border-black max-w-lg pb-2 mb-1">
|
78 |
-
{__('Don\'t want the library in your editor?', 'extendify-sdk')}
|
79 |
-
</h2>
|
80 |
-
<div className="">
|
81 |
-
<p>{sprintf(__('Extendify was included with the %s plugin.', 'extendify-sdk'),
|
82 |
-
window.extendifySdkData.source)
|
83 |
-
}</p>
|
84 |
-
<a
|
85 |
-
className="text-xs text-extendify-link underline"
|
86 |
-
href={`https://extendify.com/how-to-disable-the-extendify-library/?utm_source=${window.extendifySdkData.source}&utm_medium=library&utm_campaign=welcome`}
|
87 |
-
target="_blank"
|
88 |
-
rel="noreferrer">{__('Learn how to remove the library', 'extendify-sdk')}</a>
|
89 |
-
</div>
|
90 |
-
</div>
|
91 |
-
<div className="flex-shrink-0 flex items-end">
|
92 |
-
<div className="flex-grow flex items-center space-y-4 xl:space-y-8 flex-col">
|
93 |
-
<button type="button" onClick={() => updateTypeAndClose('pattern')} className="bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex space-y-4 flex-col items-center justify-center p-8 lg:px-0 w-80">
|
94 |
-
<h3 className="m-0 text-gray-900">{__('Sections', 'extendify-sdk')}</h3>
|
95 |
-
<span>
|
96 |
-
<svg className="mt-1" xmlns="http://www.w3.org/2000/svg" width="206" height="122" viewBox="0 0 206 122" fill="none">
|
97 |
-
<path d="M69 0H0V59H69V0Z" fill="#DFDFDF"/>
|
98 |
-
<path d="M204 0H79V60H204V0Z" fill="#DFDFDF"/>
|
99 |
-
<path d="M62.166 25H9.16602V28H62.166V25Z" fill="#F9F9F9"/>
|
100 |
-
<path d="M63.166 18H10.166V21H63.166V18Z" fill="#F9F9F9"/>
|
101 |
-
<path d="M62.166 34H9.16602V39H62.166V34Z" fill="#F9F9F9"/>
|
102 |
-
<path d="M62.166 43H9.16602V48H62.166V43Z" fill="#F9F9F9"/>
|
103 |
-
<path d="M140.166 25H87.166V28H140.166V25Z" fill="#F9F9F9"/>
|
104 |
-
<path d="M140.166 34H87.166V39H140.166V34Z" fill="#F9F9F9"/>
|
105 |
-
<path d="M140.166 43H87.166V48H140.166V43Z" fill="#F9F9F9"/>
|
106 |
-
<path d="M197.166 25H151.166V28H197.166V25Z" fill="#F9F9F9"/>
|
107 |
-
<path d="M141.166 17H88.166V20H141.166V17Z" fill="#F9F9F9"/>
|
108 |
-
<path d="M198.166 17H152.166V20H198.166V17Z" fill="#F9F9F9"/>
|
109 |
-
<path d="M62.166 10H9.16602V13H62.166V10Z" fill="#F9F9F9"/>
|
110 |
-
<path d="M140.166 9H87.166V12H140.166V9Z" fill="#F9F9F9"/>
|
111 |
-
<path d="M197.166 9H151.166V12H197.166V9Z" fill="#F9F9F9"/>
|
112 |
-
<path d="M197.166 34H151.166V39H197.166V34Z" fill="#F9F9F9"/>
|
113 |
-
<path d="M197.166 43H151.166V48H197.166V43Z" fill="#F9F9F9"/>
|
114 |
-
<path d="M154.172 77.8088H0V121.216H154.172V77.8088Z" fill="#DFDFDF"/>
|
115 |
-
<path d="M133.637 110.446C141.077 110.446 147.109 104.75 147.109 97.7229C147.109 90.6963 141.077 85 133.637 85C126.197 85 120.166 90.6963 120.166 97.7229C120.166 104.75 126.197 110.446 133.637 110.446Z" fill="#F9F9F9"/>
|
116 |
-
<path d="M205.166 78H162.166V121H205.166V78Z" fill="#DFDFDF"/>
|
117 |
-
<path d="M183.803 111.637C191.243 111.637 197.275 105.941 197.275 98.9141C197.275 91.8874 191.243 86.1912 183.803 86.1912C176.363 86.1912 170.332 91.8874 170.332 98.9141C170.332 105.941 176.363 111.637 183.803 111.637Z" fill="#F9F9F9"/>
|
118 |
-
<path d="M113.695 88.7898H13.4082V100.764H113.695V88.7898Z" fill="#F9F9F9"/>
|
119 |
-
<path d="M113.695 105.255H13.4082V109.745H113.695V105.255Z" fill="#F9F9F9"/>
|
120 |
-
</svg>
|
121 |
-
</span>
|
122 |
-
<span className="text-extendify-bright underline text-base font-bold">
|
123 |
-
{__('View patterns', 'extendify-sdk')}
|
124 |
-
</span>
|
125 |
-
</button>
|
126 |
-
<button type="button" onClick={() => updateTypeAndClose('template')} className="bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex space-y-4 flex-col items-center justify-center p-8 lg:px-0 w-80">
|
127 |
-
<h3 className="m-0 text-gray-900">{__('Full pages', 'extendify-sdk')}</h3>
|
128 |
-
<span>
|
129 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="156" height="128" viewBox="0 0 156 128" fill="none">
|
130 |
-
<path d="M155.006 38.4395H0.833984V81.8471H155.006V38.4395Z" fill="#DFDFDF"/>
|
131 |
-
<path d="M155 0H1V36H155V0Z" fill="#DFDFDF"/>
|
132 |
-
<path d="M148 7H10V28H148V7Z" fill="#F9F9F9"/>
|
133 |
-
<path d="M147.521 47.4204H9.81445V50.414H147.521V47.4204Z" fill="#F9F9F9"/>
|
134 |
-
<path d="M147.521 56.4012H9.81445V60.8917H147.521V56.4012Z" fill="#F9F9F9"/>
|
135 |
-
<path d="M147.521 65.3821H9.81445V69.8726H147.521V65.3821Z" fill="#F9F9F9"/>
|
136 |
-
<path d="M155.006 83.8089H0.833984V127.217H155.006V83.8089Z" fill="#DFDFDF"/>
|
137 |
-
<path d="M21.7897 118.236C29.2297 118.236 35.261 112.539 35.261 105.513C35.261 98.486 29.2297 92.7898 21.7897 92.7898C14.3497 92.7898 8.31836 98.486 8.31836 105.513C8.31836 112.539 14.3497 118.236 21.7897 118.236Z" fill="#F9F9F9"/>
|
138 |
-
<path d="M144.529 92.7898H44.2422V104.764H144.529V92.7898Z" fill="#F9F9F9"/>
|
139 |
-
<path d="M144.529 109.255H44.2422V113.745H144.529V109.255Z" fill="#F9F9F9"/>
|
140 |
-
</svg>
|
141 |
-
</span>
|
142 |
-
<span className="text-extendify-bright underline text-base font-bold">
|
143 |
-
{__('View templates', 'extendify-sdk')}
|
144 |
-
</span>
|
145 |
-
</button>
|
146 |
-
</div>
|
147 |
-
</div>
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
<footer className="flex justify-between p-14 w-full">
|
151 |
-
<div>
|
152 |
-
<svg className="block" width="64" height="64" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
153 |
-
<rect y="25.75" width="70.8125" height="77.25" fill="#000000"/>
|
154 |
-
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2"/>
|
155 |
-
</svg>
|
156 |
-
</div>
|
157 |
-
<button
|
158 |
-
type="button"
|
159 |
-
onClick={() => updateTypeAndClose()}
|
160 |
-
className="bg-transparent cursor-pointer text-lg text-extendify-link underline">
|
161 |
-
{__('Go to library', 'extendify-sdk')}
|
162 |
-
</button>
|
163 |
-
</footer>
|
164 |
-
</section>
|
165 |
-
</div>
|
166 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/modals/WaitingCrunchingModal.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
import { Button, Modal } from '@wordpress/components'
|
2 |
-
import { useEffect } from '@wordpress/element'
|
3 |
-
import { __ } from '@wordpress/i18n'
|
4 |
-
|
5 |
-
export default function WaitingCrunchingModal({ action, callback, text }) {
|
6 |
-
useEffect(() => {
|
7 |
-
action.then(async () => await callback())
|
8 |
-
})
|
9 |
-
|
10 |
-
// Currently this is just a basic WP modal that is invoked/rendered outside of the
|
11 |
-
// application, but could instead act as a mediary page that renderes within. It's
|
12 |
-
// just not yet used there at this time.
|
13 |
-
return <Modal
|
14 |
-
title={text}
|
15 |
-
isDismissible={false}>
|
16 |
-
<Button style={{
|
17 |
-
width: '100%',
|
18 |
-
}} disabled isPrimary isBusy onClick={() => {}}>
|
19 |
-
{__('Please wait...', 'extendify-sdk')}
|
20 |
-
</Button>
|
21 |
-
</Modal>
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/parts/HasSidebar.js
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
import LoginButton from '../../components/Loginbutton'
|
2 |
-
import { useUserStore } from '../../state/User'
|
3 |
-
import { useState, useEffect } from '@wordpress/element'
|
4 |
-
// import { useGlobalStore } from '../../state/GlobalState'
|
5 |
-
// import { __ } from '@wordpress/i18n'
|
6 |
-
// import { useTemplatesStore } from '../../state/Templates'
|
7 |
-
|
8 |
-
export default function HasSidebar({ children }) {
|
9 |
-
const apiKey = useUserStore(state => state.apiKey)
|
10 |
-
const [canLogInOut, setCanInLogOut] = useState(false)
|
11 |
-
// const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
12 |
-
// const openGuide = () => {
|
13 |
-
// useGlobalStore.setState({
|
14 |
-
// currentPage: 'guide-start',
|
15 |
-
// })
|
16 |
-
// setActiveTemplate({})
|
17 |
-
// }
|
18 |
-
useEffect(() => {
|
19 |
-
setCanInLogOut(!apiKey.length || window.location.search.indexOf('DEVMODE') > -1)
|
20 |
-
}, [apiKey])
|
21 |
-
return <>
|
22 |
-
<aside className="flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative">
|
23 |
-
<div className="sm:w-56 lg:w-72 sticky flex flex-col lg:h-full">{children[0]}</div>
|
24 |
-
<div className="hidden sm:flex flex-col absolute bottom-0 bg-white mb-4 w-72 text-left space-y-4">
|
25 |
-
<div className="border-t border-gray-300 flex divide-x">
|
26 |
-
{/* <button
|
27 |
-
type="button"
|
28 |
-
className="components-button inline-block flex-1 text-center hover:bg-gray-100"
|
29 |
-
onClick={openGuide}>
|
30 |
-
{__('Welcome Guide', 'extendify-sdk')}
|
31 |
-
</button> */}
|
32 |
-
{canLogInOut && <LoginButton/>}
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
</aside>
|
36 |
-
<main
|
37 |
-
id="extendify-templates"
|
38 |
-
// tabIndex="0"
|
39 |
-
className="w-full smp:l-12 sm:pt-6 h-full overflow-hidden">
|
40 |
-
{children[1]}
|
41 |
-
</main>
|
42 |
-
</>
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/parts/MainWindow.js
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
Fragment, useRef, useEffect,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import { Dialog, Transition } from '@headlessui/react'
|
5 |
-
import useBeacon from '../../hooks/useBeacon'
|
6 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
7 |
-
import Router from '../Router'
|
8 |
-
import useTaxonomies from '../../hooks/useTaxonomies'
|
9 |
-
import { General as GeneralApi } from '../../api/General'
|
10 |
-
import { useUserStore } from '../../state/User'
|
11 |
-
|
12 |
-
export default function MainWindow() {
|
13 |
-
const containerRef = useRef(null)
|
14 |
-
const open = useGlobalStore(state => state.open)
|
15 |
-
const metaData = useGlobalStore(state => state.metaData)
|
16 |
-
const currentPage = useGlobalStore(state => state.currentPage)
|
17 |
-
useBeacon(open)
|
18 |
-
useTaxonomies(open)
|
19 |
-
|
20 |
-
useEffect(() => {
|
21 |
-
if (!open) return
|
22 |
-
if (!useUserStore.getState().hasClickedThroughWelcomePage) {
|
23 |
-
useGlobalStore.setState({ currentPage: 'welcome' })
|
24 |
-
return
|
25 |
-
}
|
26 |
-
// if (!window.sessionStorage.getItem('esxtendify-show-guide')) {
|
27 |
-
// window.sessionStorage.setItem('esxtendify-show-guide', '1')
|
28 |
-
// useGlobalStore.setState({ currentPage: 'guide-start' })
|
29 |
-
// return
|
30 |
-
// }
|
31 |
-
}, [open])
|
32 |
-
|
33 |
-
useEffect(() => {
|
34 |
-
if (!open || Object.keys(metaData).length) {
|
35 |
-
return
|
36 |
-
}
|
37 |
-
GeneralApi.metaData().then((data) => useGlobalStore.setState({ metaData: data }))
|
38 |
-
}, [open, metaData])
|
39 |
-
|
40 |
-
return (
|
41 |
-
<Transition.Root show={open} as={Fragment}>
|
42 |
-
<Dialog
|
43 |
-
as="div"
|
44 |
-
static
|
45 |
-
className="extendify-sdk"
|
46 |
-
initialFocus={containerRef}
|
47 |
-
onClose={() => {}}
|
48 |
-
>
|
49 |
-
<div className="h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto">
|
50 |
-
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
51 |
-
<Transition.Child
|
52 |
-
as={Fragment}
|
53 |
-
enter="ease-out duration-300"
|
54 |
-
enterFrom="opacity-0"
|
55 |
-
enterTo="opacity-100"
|
56 |
-
>
|
57 |
-
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 transition-opacity" />
|
58 |
-
</Transition.Child>
|
59 |
-
<Transition.Child
|
60 |
-
as={Fragment}
|
61 |
-
enter="ease-out duration-300"
|
62 |
-
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
63 |
-
enterTo="opacity-100 translate-y-0"
|
64 |
-
>
|
65 |
-
<div
|
66 |
-
ref={containerRef}
|
67 |
-
tabIndex="0"
|
68 |
-
className="fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:p-5">
|
69 |
-
<Router page={currentPage} />
|
70 |
-
</div>
|
71 |
-
</Transition.Child>
|
72 |
-
</div>
|
73 |
-
</div>
|
74 |
-
</Dialog>
|
75 |
-
</Transition.Root>
|
76 |
-
)
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/parts/RowByTax.js
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
import { useState, useEffect } from '@wordpress/element'
|
2 |
-
import { Templates as TemplatesApi } from '../../api/Templates'
|
3 |
-
import { useTemplatesStore } from '../../state/Templates'
|
4 |
-
import TemplateButton, { TemplateButtonSkeleton } from '../../components/TemplateButton'
|
5 |
-
import { useIsMounted } from '../../hooks/helpers'
|
6 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
7 |
-
import { __ } from '@wordpress/i18n'
|
8 |
-
import { useTaxonomyStore } from '../../state/Taxonomies'
|
9 |
-
|
10 |
-
const apiResponses = new Map()
|
11 |
-
|
12 |
-
export default function RowByTax({ searchParams, title, tax }) {
|
13 |
-
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
14 |
-
const toggleOpenedTaxonomy = useTaxonomyStore(state => state.toggleOpenedTaxonomy)
|
15 |
-
const [templates, setTemplates] = useState([])
|
16 |
-
const [howManyToFetch, setHowManyToFetch] = useState()
|
17 |
-
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
18 |
-
const isModalOpen = useGlobalStore(state => state.open)
|
19 |
-
const isMounted = useIsMounted()
|
20 |
-
|
21 |
-
useEffect(() => {
|
22 |
-
setHowManyToFetch(window.innerWidth < 1600 ? 3 : 4)
|
23 |
-
}, [])
|
24 |
-
|
25 |
-
useEffect(() => {
|
26 |
-
if (!isMounted.current || !howManyToFetch || !isModalOpen) {
|
27 |
-
return
|
28 |
-
}
|
29 |
-
const key = JSON.stringify(Object.assign(searchParams, { pageSize: howManyToFetch, force: true }))
|
30 |
-
if (apiResponses.has(key)) {
|
31 |
-
setTemplates(apiResponses.get(key))
|
32 |
-
return
|
33 |
-
}
|
34 |
-
TemplatesApi.get(searchParams, { pageSize: howManyToFetch, force: true }).then((response) => {
|
35 |
-
if (response?.records?.length && isMounted.current) {
|
36 |
-
apiResponses.set(key, response.records)
|
37 |
-
setTemplates(response.records)
|
38 |
-
}
|
39 |
-
})
|
40 |
-
}, [searchParams, isMounted, howManyToFetch, isModalOpen])
|
41 |
-
|
42 |
-
return <section>
|
43 |
-
<div className="flex justify-between">
|
44 |
-
<h2 className="text-2xl mb-2 text-extendify-main uppercase m-0 text-left font-bold">
|
45 |
-
{title}
|
46 |
-
</h2>
|
47 |
-
<button
|
48 |
-
onClick={() => {
|
49 |
-
updateTaxonomies({ [tax]: title })
|
50 |
-
toggleOpenedTaxonomy('tax_pattern_types', true)
|
51 |
-
}}
|
52 |
-
type="button"
|
53 |
-
className="components-button">{ __('View all', 'extendify-sdk') }</button>
|
54 |
-
</div>
|
55 |
-
<ul className="flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 3xl:grid-cols-4 pb-16 m-0">
|
56 |
-
{/* TODO: we may want to keep intermediary state to have a better loading experience */}
|
57 |
-
{templates.length === 0 && Array.from({ length: howManyToFetch }, (_, i) => <TemplateButtonSkeleton key={i}/>)}
|
58 |
-
{templates.map((template) => {
|
59 |
-
return <li key={template.id}>
|
60 |
-
<TemplateButton
|
61 |
-
template={template}
|
62 |
-
setActiveTemplate={() => setActiveTemplate(template)}
|
63 |
-
imageLoaded={() => {}}
|
64 |
-
/>
|
65 |
-
</li>
|
66 |
-
})}
|
67 |
-
</ul>
|
68 |
-
</section>
|
69 |
-
// return <div>
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/parts/Toolbar.js
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
import { __, sprintf } from '@wordpress/i18n'
|
2 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
3 |
-
import { useUserStore } from '../../state/User'
|
4 |
-
|
5 |
-
export default function Toolbar({ className }) {
|
6 |
-
const remainingImports = useUserStore(state => state.remainingImports)
|
7 |
-
const apiKey = useUserStore(state => state.apiKey)
|
8 |
-
const allowedImports = useUserStore(state => state.allowedImports)
|
9 |
-
const metaData = useGlobalStore(state => state.metaData)
|
10 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
11 |
-
|
12 |
-
return <div className={className}>
|
13 |
-
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
14 |
-
<div className="flex space-x-12 h-full">
|
15 |
-
<div className="bg-transparent font-bold flex items-center space-x-1.5 lg:w-72">
|
16 |
-
<svg className="" width="30" height="30" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
17 |
-
<rect y="25.75" width="70.8125" height="77.25" fill="#000000"/>
|
18 |
-
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2"/>
|
19 |
-
</svg>
|
20 |
-
<span className="text-sm transform translate-y-0.5 whitespace-nowrap">
|
21 |
-
{__('Extendify Library', 'extendify-sdk')}
|
22 |
-
</span>
|
23 |
-
</div>
|
24 |
-
{!apiKey.length && <>
|
25 |
-
<div className="items-center ml-8 h-full hidden md:flex">
|
26 |
-
<div className="m-0 p-0 px-6 text-sm bg-gray-50 border-l border-gray-300 h-full flex items-center whitespace-nowrap">
|
27 |
-
{sprintf(
|
28 |
-
__('Imports left: %s / %s'), remainingImports(), Number(allowedImports),
|
29 |
-
)}
|
30 |
-
</div>
|
31 |
-
<div className="h-full items-center border-l hidden lg:flex">
|
32 |
-
{metaData?.banners?.library_header && <>
|
33 |
-
{metaData.banners.library_header?.image &&
|
34 |
-
<a
|
35 |
-
className="h-full block"
|
36 |
-
target="_blank"
|
37 |
-
rel="noreferrer"
|
38 |
-
href={metaData.banners.library_header.url}>
|
39 |
-
<img
|
40 |
-
src={metaData.banners.library_header.image}
|
41 |
-
alt="Extendify notice"/>
|
42 |
-
</a>
|
43 |
-
}
|
44 |
-
{!metaData.banners.library_header?.image &&
|
45 |
-
<div className="text-gray-900 space-x-6 bg-extendify-light px-6 p-2 h-full flex items-center">
|
46 |
-
<span className="font-bold text-left">{metaData.banners.library_header.text_backup}</span>
|
47 |
-
{metaData.banners.library_header?.url && <div>
|
48 |
-
<a
|
49 |
-
className="button-extendify-main"
|
50 |
-
target="_blank"
|
51 |
-
rel="noreferrer"
|
52 |
-
href={`${metaData.banners.library_header.url}&utm_source=${encodeURIComponent(window.extendifySdkData.source)}&utm_medium=library&utm_campaign=banner`}>
|
53 |
-
{metaData.banners.library_header?.button_text ?? __('Get it now', 'extendify-sdk')}
|
54 |
-
</a>
|
55 |
-
</div>}
|
56 |
-
</div>
|
57 |
-
}
|
58 |
-
</>}
|
59 |
-
</div>
|
60 |
-
</div>
|
61 |
-
</>}
|
62 |
-
</div>
|
63 |
-
<div className="space-x-2 transform sm:translate-x-6">
|
64 |
-
<button type="button" className="components-button has-icon" onClick={() => setOpen(false)}>
|
65 |
-
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
66 |
-
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
67 |
-
</button>
|
68 |
-
</div>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/pages/parts/sidebars/SidebarMain.js
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
import { useTemplatesStore } from '../../../state/Templates'
|
2 |
-
// import { SelectControl } from '@wordpress/components'
|
3 |
-
import { __ } from '@wordpress/i18n'
|
4 |
-
import { debounce } from 'lodash'
|
5 |
-
import { useState } from '@wordpress/element'
|
6 |
-
import { Panel } from '@wordpress/components'
|
7 |
-
import TaxonomySection from '../../../components/TaxonomySection'
|
8 |
-
import { useTaxonomyStore } from '../../../state/Taxonomies'
|
9 |
-
|
10 |
-
export default function SidebarMain() {
|
11 |
-
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
12 |
-
const taxonomies = useTaxonomyStore(state => state.taxonomies)
|
13 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
14 |
-
const searchInputUpdate = debounce((value) => updateSearchParams({
|
15 |
-
taxonomies: {},
|
16 |
-
search: value,
|
17 |
-
}), 500)
|
18 |
-
const [searchValue, setSearchValue] = useState(searchParams?.search ?? '')
|
19 |
-
|
20 |
-
return <>
|
21 |
-
<div className="mt-px bg-white mb-6 mx-6 pt-6 lg:mx-0 lg:pt-0">
|
22 |
-
<label
|
23 |
-
className="sr-only"
|
24 |
-
htmlFor="extendify-search-input">{__('What are you looking for?', 'extendify-sdk')}</label>
|
25 |
-
<input
|
26 |
-
id="extendify-search-input"
|
27 |
-
type="search"
|
28 |
-
placeholder={__('What are you looking for?', 'extendify-sdk')}
|
29 |
-
onChange={(event) => {
|
30 |
-
useTemplatesStore.setState({
|
31 |
-
nextPage: '',
|
32 |
-
})
|
33 |
-
setSearchValue(event.target.value)
|
34 |
-
searchInputUpdate(event.target.value)
|
35 |
-
}}
|
36 |
-
value={searchValue}
|
37 |
-
className="button-focus bg-gray-100 focus:bg-white border-0 m-0 p-3.5 pb-3 rounded-none text-sm w-full"
|
38 |
-
autoComplete="off" />
|
39 |
-
<svg className="absolute top-3 right-6 hidden lg:block pointer-events-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path></svg>
|
40 |
-
</div>
|
41 |
-
<div className="mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block">
|
42 |
-
<Panel>
|
43 |
-
{Object.entries(taxonomies).map((taxonomy) => {
|
44 |
-
return <TaxonomySection
|
45 |
-
key={taxonomy[0]}
|
46 |
-
taxonomy={taxonomy} />
|
47 |
-
})}
|
48 |
-
</Panel>
|
49 |
-
</div>
|
50 |
-
</>
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/state/GlobalState.js
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
import create from 'zustand'
|
2 |
-
import { useTemplatesStore } from './Templates'
|
3 |
-
|
4 |
-
export const useGlobalStore = create((set) => ({
|
5 |
-
open: false,
|
6 |
-
metaData: {},
|
7 |
-
currentPage: 'main',
|
8 |
-
setOpen: (value) => {
|
9 |
-
set({
|
10 |
-
open: value,
|
11 |
-
})
|
12 |
-
// Reset the state if it's closed manualy
|
13 |
-
// value && useTemplatesStore.getState().setActive({}) - Not this though
|
14 |
-
value && useTemplatesStore.getState().removeTemplates()
|
15 |
-
// value && useTemplatesStore.getState().setActive({}) // This can be used to default to grid
|
16 |
-
},
|
17 |
-
}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/util/airtable.js
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
export function createTemplatesFilterFormula(filters) {
|
2 |
-
const { taxonomies, search, type } = filters
|
3 |
-
const formula = []
|
4 |
-
|
5 |
-
// Builds the taxonomy list by looping over all supplied taxonomies
|
6 |
-
const taxFormula = Object.entries(taxonomies)
|
7 |
-
.filter((tax) => Boolean(tax[1].length))
|
8 |
-
.map((tax) => `${tax[0]} = "${tax[1]}"`)
|
9 |
-
.join(', ')
|
10 |
-
|
11 |
-
taxFormula.length && formula.push(taxFormula)
|
12 |
-
search?.length && formula.push(`OR(FIND(LOWER("${search}"), LOWER(title))!= 0, FIND(LOWER("${search}"), LOWER({tax_categories})) != 0)`)
|
13 |
-
type.length && formula.push(`{type}="${type}"`)
|
14 |
-
|
15 |
-
return formula.length
|
16 |
-
? `AND(${formula.join(', ')})`.replace(/\r?\n|\r/g, '')
|
17 |
-
: ''
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/util/blocks.js
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
|
2 |
-
/**
|
3 |
-
* Given an array of InnerBlocks templates or Block Objects,
|
4 |
-
* returns an array of created Blocks from them.
|
5 |
-
* It handles the case of having InnerBlocks as Blocks by
|
6 |
-
* converting them to the proper format to continue recursively.
|
7 |
-
*
|
8 |
-
* @param {Array} innerBlocksOrTemplate Nested blocks or InnerBlocks templates.
|
9 |
-
*
|
10 |
-
* @return {Object[]} Array of Block objects.
|
11 |
-
*/
|
12 |
-
export function createBlocksFromInnerBlocksTemplate(innerBlocksOrTemplate = []) {
|
13 |
-
const { createBlock } = window.wp.blocks
|
14 |
-
|
15 |
-
// TODO: This should return the native implementation if available here
|
16 |
-
|
17 |
-
return innerBlocksOrTemplate.map((innerBlock) => {
|
18 |
-
const innerBlockTemplate = Array.isArray(innerBlock)
|
19 |
-
? innerBlock
|
20 |
-
: [innerBlock.name, innerBlock.attributes, innerBlock.innerBlocks]
|
21 |
-
const [name, attributes, innerBlocks = []] = innerBlockTemplate
|
22 |
-
return createBlock(
|
23 |
-
name, attributes, createBlocksFromInnerBlocksTemplate(innerBlocks),
|
24 |
-
)
|
25 |
-
})
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/webpack.mix.js
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
const path = require('path')
|
2 |
-
const camelCaseDash = (string) => string.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase())
|
3 |
-
const mix = require('laravel-mix')
|
4 |
-
|
5 |
-
// If you add additional WP imports, include them here (could we generate these?)
|
6 |
-
const externals = [
|
7 |
-
'api-fetch',
|
8 |
-
'block-editor',
|
9 |
-
'blocks',
|
10 |
-
'components',
|
11 |
-
'compose',
|
12 |
-
'data',
|
13 |
-
'date',
|
14 |
-
'htmlEntities',
|
15 |
-
'hooks',
|
16 |
-
'edit-post',
|
17 |
-
'element',
|
18 |
-
'editor',
|
19 |
-
'i18n',
|
20 |
-
'plugins',
|
21 |
-
'viewport',
|
22 |
-
'ajax',
|
23 |
-
'codeEditor',
|
24 |
-
'rich-text',
|
25 |
-
]
|
26 |
-
const globals = externals.reduce((externals, name) => ({
|
27 |
-
...externals,
|
28 |
-
[`@wordpress/${name}`]: `wp.${camelCaseDash(name)}`,
|
29 |
-
}), {})
|
30 |
-
|
31 |
-
const webpackConfig = (context) => {
|
32 |
-
return {
|
33 |
-
context: context,
|
34 |
-
externals: {
|
35 |
-
wp: 'wp',
|
36 |
-
lodash: 'lodash',
|
37 |
-
fetch: 'fetch',
|
38 |
-
react: 'React',
|
39 |
-
'react-dom': 'ReactDOM',
|
40 |
-
...globals,
|
41 |
-
},
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
mix.js('src/app.js', 'public/build/extendify-sdk.js')
|
46 |
-
.webpackConfig(webpackConfig(path.resolve(__dirname, 'src')))
|
47 |
-
.react()
|
48 |
-
.setPublicPath('public')
|
49 |
-
.postCss(
|
50 |
-
'src/app.css',
|
51 |
-
'public/build/extendify-sdk.css',
|
52 |
-
[require('tailwindcss')],
|
53 |
-
)
|
54 |
-
.browserSync({
|
55 |
-
proxy: 'wordpress.test',
|
56 |
-
open: false,
|
57 |
-
files: ['src/**/*'],
|
58 |
-
})
|
59 |
-
|
60 |
-
mix.js('editorplus/editorplus.js', 'editorplus/editorplus.min.js')
|
61 |
-
.webpackConfig(webpackConfig(path.resolve(__dirname, 'editorplus')))
|
62 |
-
.react()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block ed
|
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
Tested up to: 5.8.2
|
7 |
-
Stable tag: 4.3.
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
@@ -108,6 +108,11 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
= 4.3.2 =
|
112 |
Added: Metaboxes!
|
113 |
Fixed: Incorrect return type in Options Constructor.
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
Tested up to: 5.8.2
|
7 |
+
Stable tag: 4.3.3
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 4.3.3 =
|
112 |
+
Modified: Move template libraries to redux-core directory.
|
113 |
+
Modified: Update to the Extendify template library.
|
114 |
+
Release date: November 16, 2021
|
115 |
+
|
116 |
= 4.3.2 =
|
117 |
Added: Metaboxes!
|
118 |
Fixed: Incorrect return type in Options Constructor.
|
redux-core/class-redux-core.php
CHANGED
@@ -329,8 +329,7 @@ if ( ! class_exists( 'Redux_Core', false ) ) {
|
|
329 |
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
330 |
self::$upload_url = apply_filters( 'redux/upload_url', self::$upload_url );
|
331 |
|
332 |
-
self
|
333 |
-
self::$extendify_templates_enabled = (bool) get_option( 'use_extendify_templates', true );
|
334 |
}
|
335 |
|
336 |
/**
|
@@ -346,6 +345,28 @@ if ( ! class_exists( 'Redux_Core', false ) ) {
|
|
346 |
|
347 |
}
|
348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
/**
|
350 |
* Autoregister run.
|
351 |
*
|
329 |
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
330 |
self::$upload_url = apply_filters( 'redux/upload_url', self::$upload_url );
|
331 |
|
332 |
+
self::load_template_libraries();
|
|
|
333 |
}
|
334 |
|
335 |
/**
|
345 |
|
346 |
}
|
347 |
|
348 |
+
/**
|
349 |
+
* Load Redux and Extendify template libraries.
|
350 |
+
*
|
351 |
+
* @return void
|
352 |
+
*/
|
353 |
+
private static function load_template_libraries(){
|
354 |
+
self::$redux_templates_enabled = (bool) get_option( 'use_redux_templates' );
|
355 |
+
self::$extendify_templates_enabled = (bool) get_option( 'use_extendify_templates', true );
|
356 |
+
|
357 |
+
// Including extendify sdk.
|
358 |
+
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
359 |
+
if ( file_exists( dirname( __FILE__ ) . '/extendify-sdk/loader.php' ) ) {
|
360 |
+
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
|
361 |
+
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
366 |
+
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
/**
|
371 |
* Autoregister run.
|
372 |
*
|
{extendify-sdk → redux-core/extendify-sdk}/.eslintrc.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/.github/workflows/build-and-test.yml
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/.github/workflows/build-development-zip.yml
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/.github/workflows/force-production-on-main.yml
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
name: Build production
|
2 |
on:
|
3 |
push:
|
4 |
branches:
|
@@ -53,9 +53,11 @@ jobs:
|
|
53 |
npm run build
|
54 |
env:
|
55 |
CI: true
|
|
|
56 |
- name: Increment version number
|
57 |
run: |
|
58 |
perl -i -pe 's/(Stable tag: )([\d.]+)$/$1.($2+.1)/e' readme.txt
|
|
|
59 |
- name: Commit dist folder if needed #it fails if nothing has changed so we allow an error
|
60 |
run: git commit -am 'Build produciton assets'
|
61 |
continue-on-error: true
|
@@ -64,3 +66,9 @@ jobs:
|
|
64 |
with:
|
65 |
github_token: ${{ secrets.GITHUB_TOKEN }}
|
66 |
branch: main
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build production and deploy
|
2 |
on:
|
3 |
push:
|
4 |
branches:
|
53 |
npm run build
|
54 |
env:
|
55 |
CI: true
|
56 |
+
|
57 |
- name: Increment version number
|
58 |
run: |
|
59 |
perl -i -pe 's/(Stable tag: )([\d.]+)$/$1.($2+.1)/e' readme.txt
|
60 |
+
perl -i -pe 's/(Version: )([\d.]+)$/$1.($2+.1)/e' extendify-sdk.php
|
61 |
- name: Commit dist folder if needed #it fails if nothing has changed so we allow an error
|
62 |
run: git commit -am 'Build produciton assets'
|
63 |
continue-on-error: true
|
66 |
with:
|
67 |
github_token: ${{ secrets.GITHUB_TOKEN }}
|
68 |
branch: main
|
69 |
+
|
70 |
+
- name: Deploy to library.extendify.com
|
71 |
+
uses: fjogeleit/http-request-action@master
|
72 |
+
with:
|
73 |
+
url: ${{ secrets.DEPLOY_WEBHOOK }}
|
74 |
+
method: 'POST'
|
redux-core/extendify-sdk/.node-version
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
14.18.1
|
redux-core/extendify-sdk/.npmrc
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
engine-strict=true
|
{extendify-sdk → redux-core/extendify-sdk}/.phpcs.xml.dist
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/Admin.php
RENAMED
@@ -7,6 +7,7 @@ namespace Extendify\ExtendifySdk;
|
|
7 |
|
8 |
use Extendify\ExtendifySdk\App;
|
9 |
use Extendify\ExtendifySdk\User;
|
|
|
10 |
|
11 |
/**
|
12 |
* This class handles any file loading for the admin area.
|
@@ -54,6 +55,10 @@ class Admin
|
|
54 |
return;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
57 |
$this->addScopedScriptsAndStyles();
|
58 |
}
|
59 |
);
|
@@ -87,7 +92,6 @@ class Admin
|
|
87 |
App::$slug . '-scripts',
|
88 |
EXTENDIFYSDK_BASE_URL . 'public/build/extendify-sdk.js',
|
89 |
[
|
90 |
-
'wp-api',
|
91 |
'wp-i18n',
|
92 |
'wp-components',
|
93 |
'wp-element',
|
@@ -103,7 +107,8 @@ class Admin
|
|
103 |
'root' => \esc_url_raw(rest_url(APP::$slug . '/' . APP::$apiVersion)),
|
104 |
'nonce' => \wp_create_nonce('wp_rest'),
|
105 |
'user' => json_decode(User::data('extendifysdk_user_data'), true),
|
106 |
-
'
|
|
|
107 |
]
|
108 |
);
|
109 |
\wp_enqueue_script(App::$slug . '-scripts');
|
@@ -117,5 +122,40 @@ class Admin
|
|
117 |
$version,
|
118 |
'all'
|
119 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
}
|
7 |
|
8 |
use Extendify\ExtendifySdk\App;
|
9 |
use Extendify\ExtendifySdk\User;
|
10 |
+
use Extendify\ExtendifySdk\SiteSettings;
|
11 |
|
12 |
/**
|
13 |
* This class handles any file loading for the admin area.
|
55 |
return;
|
56 |
}
|
57 |
|
58 |
+
if (!$this->isLibraryEnabled()) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
|
62 |
$this->addScopedScriptsAndStyles();
|
63 |
}
|
64 |
);
|
92 |
App::$slug . '-scripts',
|
93 |
EXTENDIFYSDK_BASE_URL . 'public/build/extendify-sdk.js',
|
94 |
[
|
|
|
95 |
'wp-i18n',
|
96 |
'wp-components',
|
97 |
'wp-element',
|
107 |
'root' => \esc_url_raw(rest_url(APP::$slug . '/' . APP::$apiVersion)),
|
108 |
'nonce' => \wp_create_nonce('wp_rest'),
|
109 |
'user' => json_decode(User::data('extendifysdk_user_data'), true),
|
110 |
+
'sitesettings' => json_decode(SiteSettings::data()),
|
111 |
+
'sdk_partner' => \esc_attr(APP::$sdkPartner),
|
112 |
]
|
113 |
);
|
114 |
\wp_enqueue_script(App::$slug . '-scripts');
|
122 |
$version,
|
123 |
'all'
|
124 |
);
|
125 |
+
|
126 |
+
\wp_enqueue_style(
|
127 |
+
App::$slug . '-utility-classes',
|
128 |
+
EXTENDIFYSDK_BASE_URL . 'public/build/extendify-utilities.css',
|
129 |
+
[],
|
130 |
+
$version,
|
131 |
+
'all'
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Check if current user is Admin
|
137 |
+
*
|
138 |
+
* @return Boolean
|
139 |
+
*/
|
140 |
+
private function isAdmin()
|
141 |
+
{
|
142 |
+
return in_array('administrator', \wp_get_current_user()->roles, true);
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Check if scripts should add
|
147 |
+
*
|
148 |
+
* @return Boolean
|
149 |
+
*/
|
150 |
+
public function isLibraryEnabled()
|
151 |
+
{
|
152 |
+
$settings = json_decode(SiteSettings::data());
|
153 |
+
|
154 |
+
// If it's disabled, only show it for admins.
|
155 |
+
if (isset($settings->state) && (isset($settings->state->enabled)) && !$settings->state->enabled) {
|
156 |
+
return $this->isAdmin();
|
157 |
+
}
|
158 |
+
|
159 |
+
return true;
|
160 |
}
|
161 |
}
|
{extendify-sdk → redux-core/extendify-sdk}/app/ApiRouter.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/App.php
RENAMED
@@ -56,11 +56,11 @@ class App
|
|
56 |
public static $environment = '';
|
57 |
|
58 |
/**
|
59 |
-
*
|
60 |
*
|
61 |
* @var string
|
62 |
*/
|
63 |
-
public static $
|
64 |
|
65 |
/**
|
66 |
* Host plugin
|
@@ -83,8 +83,10 @@ class App
|
|
83 |
*/
|
84 |
public function __construct()
|
85 |
{
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
}
|
89 |
|
90 |
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
56 |
public static $environment = '';
|
57 |
|
58 |
/**
|
59 |
+
* The partner plugin/theme
|
60 |
*
|
61 |
* @var string
|
62 |
*/
|
63 |
+
public static $sdkPartner = '';
|
64 |
|
65 |
/**
|
66 |
* Host plugin
|
83 |
*/
|
84 |
public function __construct()
|
85 |
{
|
86 |
+
// Set the "partner" plugin/theme here with a fallback to support the previous plugin implementation.
|
87 |
+
self::$sdkPartner = isset($GLOBALS['extendify_sdk_partner']) ? $GLOBALS['extendify_sdk_partner'] : '';
|
88 |
+
if (!self::$sdkPartner && isset($GLOBALS['extendifySdkSourcePlugin'])) {
|
89 |
+
self::$sdkPartner = $GLOBALS['extendifySdkSourcePlugin'];
|
90 |
}
|
91 |
|
92 |
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/AuthController.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/MetaController.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/PingController.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/PluginController.php
RENAMED
File without changes
|
redux-core/extendify-sdk/app/Controllers/SiteSettingsController.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controls User info
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Extendify\ExtendifySdk\Controllers;
|
7 |
+
|
8 |
+
use Extendify\ExtendifySdk\SiteSettings;
|
9 |
+
|
10 |
+
if (!defined('ABSPATH')) {
|
11 |
+
die('No direct access.');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The controller for managing Extendify SiteSettings.
|
16 |
+
*/
|
17 |
+
class SiteSettingsController
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Return Current SiteSettings meta data
|
22 |
+
*
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public static function show()
|
26 |
+
{
|
27 |
+
return new \WP_REST_Response(SiteSettings::data());
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Persist the data
|
32 |
+
*
|
33 |
+
* @param \WP_REST_Request $request - The request.
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
public static function store($request)
|
37 |
+
{
|
38 |
+
$settingsData = json_decode($request->get_param('data'), true);
|
39 |
+
\update_option(SiteSettings::key(), $settingsData, true);
|
40 |
+
return new \WP_REST_Response(SiteSettings::data());
|
41 |
+
}
|
42 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/TaxonomyController.php
RENAMED
@@ -16,7 +16,6 @@ if (!defined('ABSPATH')) {
|
|
16 |
*/
|
17 |
class TaxonomyController
|
18 |
{
|
19 |
-
|
20 |
/**
|
21 |
* Return all taxonomies
|
22 |
*
|
@@ -24,7 +23,7 @@ class TaxonomyController
|
|
24 |
*/
|
25 |
public static function index()
|
26 |
{
|
27 |
-
$response = Http::get('/airtable-taxonomies', []);
|
28 |
return new \WP_REST_Response($response);
|
29 |
}
|
30 |
}
|
16 |
*/
|
17 |
class TaxonomyController
|
18 |
{
|
|
|
19 |
/**
|
20 |
* Return all taxonomies
|
21 |
*
|
23 |
*/
|
24 |
public static function index()
|
25 |
{
|
26 |
+
$response = Http::get('/airtable-taxonomies-simple', []);
|
27 |
return new \WP_REST_Response($response);
|
28 |
}
|
29 |
}
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/TemplateController.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/app/Controllers/UserController.php
RENAMED
File without changes
|
redux-core/extendify-sdk/app/Frontend.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Manage any frontend related tasks here.
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Extendify\ExtendifySdk;
|
7 |
+
|
8 |
+
use Extendify\ExtendifySdk\App;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* This class handles any file loading for the frontend of the site.
|
12 |
+
*/
|
13 |
+
class Frontend
|
14 |
+
{
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The instance
|
18 |
+
*
|
19 |
+
* @var $instance
|
20 |
+
*/
|
21 |
+
public static $instance = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Adds various actions to set up the page
|
25 |
+
*
|
26 |
+
* @return self|void
|
27 |
+
*/
|
28 |
+
public function __construct()
|
29 |
+
{
|
30 |
+
if (self::$instance) {
|
31 |
+
return self::$instance;
|
32 |
+
}
|
33 |
+
|
34 |
+
self::$instance = $this;
|
35 |
+
$this->loadScripts();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Adds scripts and styles to every page is enabled
|
40 |
+
*
|
41 |
+
* @return void
|
42 |
+
*/
|
43 |
+
public function loadScripts()
|
44 |
+
{
|
45 |
+
\add_action(
|
46 |
+
'wp_enqueue_scripts',
|
47 |
+
function () {
|
48 |
+
// TODO: Determine a way to conditionally load assets (https://github.com/extendify/company-product/issues/72).
|
49 |
+
$this->addStylesheets();
|
50 |
+
}
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Adds stylesheets as needed
|
56 |
+
*
|
57 |
+
* @return void
|
58 |
+
*/
|
59 |
+
public function addStylesheets()
|
60 |
+
{
|
61 |
+
$version = App::$environment === 'PRODUCTION' ? App::$version : uniqid();
|
62 |
+
\wp_enqueue_style(
|
63 |
+
App::$slug . '-utility-classes',
|
64 |
+
EXTENDIFYSDK_BASE_URL . 'public/build/extendify-utilities.css',
|
65 |
+
[],
|
66 |
+
$version,
|
67 |
+
'all'
|
68 |
+
);
|
69 |
+
}
|
70 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/app/Http.php
RENAMED
@@ -60,10 +60,13 @@ class Http
|
|
60 |
$this->baseUrl = $request->get_header('x_extendify_local_mode') !== 'false' ? App::$config['api']['local'] : $this->baseUrl;
|
61 |
|
62 |
$this->data = [
|
|
|
|
|
63 |
'mode' => App::$environment,
|
64 |
'uuid' => User::data('uuid'),
|
65 |
'sdk_version' => App::$version,
|
66 |
-
'
|
|
|
67 |
];
|
68 |
|
69 |
$this->headers = [
|
60 |
$this->baseUrl = $request->get_header('x_extendify_local_mode') !== 'false' ? App::$config['api']['local'] : $this->baseUrl;
|
61 |
|
62 |
$this->data = [
|
63 |
+
'wp_language' => \get_locale(),
|
64 |
+
'wp_theme' => \get_option('template'),
|
65 |
'mode' => App::$environment,
|
66 |
'uuid' => User::data('uuid'),
|
67 |
'sdk_version' => App::$version,
|
68 |
+
'wp_active_plugins' => $request->get_method() === 'POST' ? \get_option('active_plugins') : [],
|
69 |
+
'sdk_partner' => App::$sdkPartner,
|
70 |
];
|
71 |
|
72 |
$this->headers = [
|
{extendify-sdk → redux-core/extendify-sdk}/app/Plugin.php
RENAMED
File without changes
|
redux-core/extendify-sdk/app/Shared.php
ADDED
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Manage any shared assets that load within the editor and the front-end.
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Extendify\ExtendifySdk;
|
7 |
+
|
8 |
+
use Extendify\ExtendifySdk\App;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* This class handles assets that load within the editor and the front-end.
|
12 |
+
*/
|
13 |
+
class Shared
|
14 |
+
{
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The instance
|
18 |
+
*
|
19 |
+
* @var $instance
|
20 |
+
*/
|
21 |
+
public static $instance = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Current theme
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
// phpcs:ignore
|
29 |
+
private $theme;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Adds various actions to set up the page
|
33 |
+
*
|
34 |
+
* @return self|void
|
35 |
+
*/
|
36 |
+
public function __construct()
|
37 |
+
{
|
38 |
+
if (self::$instance) {
|
39 |
+
return self::$instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
self::$instance = $this;
|
43 |
+
|
44 |
+
// Load only if a compatible theme is active.
|
45 |
+
$this->theme = get_option('template');
|
46 |
+
if (in_array( $this->theme, $this->compatibleThemes(), true )) {
|
47 |
+
$this->loadScripts();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Themes with additional compatibility
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function compatibleThemes()
|
57 |
+
{
|
58 |
+
$themes = [
|
59 |
+
'kadence',
|
60 |
+
'neve',
|
61 |
+
'blocksy',
|
62 |
+
'go',
|
63 |
+
'astra',
|
64 |
+
'oceanwp',
|
65 |
+
'generatepress',
|
66 |
+
'twentytwentyone',
|
67 |
+
'twentytwentytwo',
|
68 |
+
'twentytwenty',
|
69 |
+
'twentynineteen',
|
70 |
+
];
|
71 |
+
|
72 |
+
return $themes;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Adds styles to the front-end and editor
|
77 |
+
*
|
78 |
+
* @return void
|
79 |
+
*/
|
80 |
+
public function loadScripts()
|
81 |
+
{
|
82 |
+
\add_action(
|
83 |
+
'wp_enqueue_scripts',
|
84 |
+
function () {
|
85 |
+
$this->themeCompatInlineStyles();
|
86 |
+
}
|
87 |
+
);
|
88 |
+
|
89 |
+
\add_action(
|
90 |
+
'admin_enqueue_scripts',
|
91 |
+
function () {
|
92 |
+
$this->themeCompatInlineStyles();
|
93 |
+
}
|
94 |
+
);
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Inline styles to be applied for compatible themes
|
99 |
+
*
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
// phpcs:ignore
|
103 |
+
public function themeCompatInlineStyles()
|
104 |
+
{
|
105 |
+
$css = '';
|
106 |
+
|
107 |
+
if ($this->theme === 'kadence') {
|
108 |
+
$css = 'body, .editor-styles-wrapper {
|
109 |
+
--wp--preset--color--background: var(--global-palette8);
|
110 |
+
--wp--preset--color--foreground: var(--global-palette4);
|
111 |
+
--wp--preset--color--primary: var(--global-palette1);
|
112 |
+
--wp--preset--color--secondary: var(--global-palette2);
|
113 |
+
--wp--preset--color--tertiary: var(--global-palette7);
|
114 |
+
--wp--custom--spacing--large: clamp(var(--global-sm-spacing), 5vw, var(--global-xxl-spacing));
|
115 |
+
--wp--preset--font-size--large: var(--h2FontSize);
|
116 |
+
--wp--preset--font-size--huge: var(--h1FontSize);
|
117 |
+
}';
|
118 |
+
}
|
119 |
+
|
120 |
+
if ($this->theme === 'neve') {
|
121 |
+
$css = 'body, .editor-styles-wrapper {
|
122 |
+
--wp--preset--color--background: var(--nv-site-bg);
|
123 |
+
--wp--preset--color--foreground: var(--nv-text-color);
|
124 |
+
--wp--preset--color--primary: var(--nv-primary-accent);
|
125 |
+
--wp--preset--color--secondary: var(--nv-secondary-accent);
|
126 |
+
--wp--preset--color--tertiary: var(--nv-light-bg);
|
127 |
+
--wp--custom--spacing--large: clamp(15px, 5vw, 80px);
|
128 |
+
--wp--preset--font-size--large: var(--h2FontSize);
|
129 |
+
--wp--preset--font-size--huge: var(--h1FontSize);
|
130 |
+
}';
|
131 |
+
}
|
132 |
+
|
133 |
+
if ($this->theme === 'blocksy') {
|
134 |
+
$css = 'body, .editor-styles-wrapper {
|
135 |
+
--wp--preset--color--background: var(--paletteColor7);
|
136 |
+
--wp--preset--color--foreground: var(--color);
|
137 |
+
--wp--preset--color--primary: var(--paletteColor1);
|
138 |
+
--wp--preset--color--secondary: var(--paletteColor4);
|
139 |
+
}';
|
140 |
+
}
|
141 |
+
|
142 |
+
if ($this->theme === 'go') {
|
143 |
+
$css = 'body, .editor-styles-wrapper {
|
144 |
+
--wp--preset--color--background: var(--go--color--background);
|
145 |
+
--wp--preset--color--foreground: var(--go--color--text);
|
146 |
+
}';
|
147 |
+
}
|
148 |
+
|
149 |
+
if ($this->theme === 'astra') {
|
150 |
+
$css = 'body, .editor-styles-wrapper {
|
151 |
+
--wp--preset--color--background: #ffffff;
|
152 |
+
--wp--preset--color--foreground: var(--ast-global-color-2);
|
153 |
+
--wp--preset--color--primary: var(--ast-global-color-0);
|
154 |
+
--wp--preset--color--secondary: var(--ast-global-color-2);
|
155 |
+
}';
|
156 |
+
}
|
157 |
+
|
158 |
+
if ($this->theme === 'oceanwp') {
|
159 |
+
$background = get_theme_mod( 'ocean_background_color', '#ffffff' );
|
160 |
+
$primary = get_theme_mod( 'ocean_primary_color', '#13aff0' );
|
161 |
+
$secondary = get_theme_mod( 'ocean_hover_primary_color', '#0b7cac' );
|
162 |
+
$gap = get_theme_mod( 'ocean_separate_content_padding', '30px' );
|
163 |
+
|
164 |
+
$css = 'body, .editor-styles-wrapper {
|
165 |
+
--wp--preset--color--background: ' . $background . ';
|
166 |
+
--wp--preset--color--foreground: #1B1B1B;
|
167 |
+
--wp--preset--color--primary: ' . $primary . ';
|
168 |
+
--wp--preset--color--secondary: ' . $secondary . ';
|
169 |
+
--wp--style--block-gap: ' . $gap . ';
|
170 |
+
--wp--custom--spacing--large: clamp(2rem, 7vw, 8rem);
|
171 |
+
}';
|
172 |
+
}
|
173 |
+
|
174 |
+
if ($this->theme === 'generatepress') {
|
175 |
+
$settings = get_option( 'generate_settings' );
|
176 |
+
|
177 |
+
if (! array_key_exists( 'background_color', $settings )) {
|
178 |
+
$background = '#f7f8f9';
|
179 |
+
} else {
|
180 |
+
$background = $settings['background_color'];
|
181 |
+
}
|
182 |
+
|
183 |
+
if (! array_key_exists( 'text_color', $settings )) {
|
184 |
+
$foreground = '#222222';
|
185 |
+
} else {
|
186 |
+
$foreground = $settings['text_color'];
|
187 |
+
}
|
188 |
+
|
189 |
+
if (! array_key_exists( 'link_color', $settings )) {
|
190 |
+
$primary = '#1e73be';
|
191 |
+
} else {
|
192 |
+
$primary = $settings['link_color'];
|
193 |
+
}
|
194 |
+
|
195 |
+
if (! array_key_exists( 'link_color', $settings )) {
|
196 |
+
$primary = '#1e73be';
|
197 |
+
} else {
|
198 |
+
$primary = $settings['link_color'];
|
199 |
+
}
|
200 |
+
|
201 |
+
$css = 'body, .editor-styles-wrapper {
|
202 |
+
--wp--preset--color--background: ' . $background . ';
|
203 |
+
--wp--preset--color--foreground: ' . $foreground . ';
|
204 |
+
--wp--preset--color--primary: ' . $primary . ';
|
205 |
+
--wp--preset--color--secondary: #636363;
|
206 |
+
--wp--style--block-gap: 3rem;
|
207 |
+
--wp--custom--spacing--large: clamp(2rem, 7vw, 8rem);
|
208 |
+
--responsive--alignwide-width: 1120px;
|
209 |
+
}';
|
210 |
+
}//end if
|
211 |
+
|
212 |
+
if ($this->theme === 'twentytwentytwo') {
|
213 |
+
$css = 'body, .editor-styles-wrapper {
|
214 |
+
--extendify--spacing--large: clamp(2rem,8vw,8rem);
|
215 |
+
}';
|
216 |
+
}
|
217 |
+
|
218 |
+
if ($this->theme === 'twentytwentyone') {
|
219 |
+
$css = 'body, .editor-styles-wrapper {
|
220 |
+
--wp--preset--color--background: var(--global--color-background);
|
221 |
+
--wp--preset--color--foreground: var(--global--color-primary);
|
222 |
+
--wp--preset--color--primary: var(--global--color-gray);
|
223 |
+
--wp--preset--color--secondary: #464b56;
|
224 |
+
--wp--preset--color--tertiary: var(--global--color-light-gray);
|
225 |
+
--wp--style--block-gap: var(--global--spacing-unit);
|
226 |
+
--wp--preset--font-size--large: 2.5rem;
|
227 |
+
--wp--preset--font-size--huge: var(--global--font-size-xxl);
|
228 |
+
}
|
229 |
+
.has-foreground-background-color,
|
230 |
+
.has-primary-background-color,
|
231 |
+
.has-secondary-background-color {
|
232 |
+
--local--color-primary: var(--wp--preset--color--background);
|
233 |
+
--local--color-background: var(--wp--preset--color--primary);
|
234 |
+
}';
|
235 |
+
}
|
236 |
+
|
237 |
+
if ($this->theme === 'twentytwenty') {
|
238 |
+
$background = sanitize_hex_color_no_hash( get_theme_mod( 'background_color', 'f5efe0' ) );
|
239 |
+
$primary = get_theme_mod(
|
240 |
+
'accent_accessible_colors',
|
241 |
+
[
|
242 |
+
'content' => [ 'accent' => '#cd2653' ],
|
243 |
+
]
|
244 |
+
);
|
245 |
+
$primary = $primary['content']['accent'];
|
246 |
+
$css = 'body, .editor-styles-wrapper {
|
247 |
+
--wp--preset--color--background: #' . $background . ';
|
248 |
+
--wp--preset--color--foreground: #000;
|
249 |
+
--wp--preset--color--primary: ' . $primary . ';
|
250 |
+
--wp--preset--color--secondary: #69603e;
|
251 |
+
--wp--style--block-gap: 3rem;
|
252 |
+
--wp--custom--spacing--large: clamp(2rem, 7vw, 8rem);
|
253 |
+
--responsive--alignwide-width: 120rem;
|
254 |
+
}';
|
255 |
+
}//end if
|
256 |
+
|
257 |
+
if ($this->theme === 'twentynineteen') {
|
258 |
+
/**
|
259 |
+
* Use the color from Twenty Nineteen's customizer value.
|
260 |
+
*/
|
261 |
+
$primary = 199;
|
262 |
+
if (get_theme_mod( 'primary_color', 'default' ) !== 'default') {
|
263 |
+
$primary = absint( get_theme_mod( 'primary_color_hue', 199 ) );
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Filters Twenty Nineteen default saturation level.
|
268 |
+
*
|
269 |
+
* @since Twenty Nineteen 1.0
|
270 |
+
*
|
271 |
+
* @param int $saturation Color saturation level.
|
272 |
+
*/
|
273 |
+
// phpcs:ignore
|
274 |
+
$saturation = apply_filters( 'twentynineteen_custom_colors_saturation', 100 );
|
275 |
+
$saturation = absint( $saturation ) . '%';
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Filters Twenty Nineteen default lightness level.
|
279 |
+
*
|
280 |
+
* @since Twenty Nineteen 1.0
|
281 |
+
*
|
282 |
+
* @param int $lightness Color lightness level.
|
283 |
+
*/
|
284 |
+
// phpcs:ignore
|
285 |
+
$lightness = apply_filters( 'twentynineteen_custom_colors_lightness', 33 );
|
286 |
+
$lightness = absint( $lightness ) . '%';
|
287 |
+
|
288 |
+
$css = 'body, .editor-styles-wrapper {
|
289 |
+
--wp--preset--color--foreground: #111;
|
290 |
+
--wp--preset--color--primary: hsl( ' . $primary . ', ' . $saturation . ', ' . $lightness . ' );
|
291 |
+
--wp--preset--color--secondary: #767676;
|
292 |
+
--wp--preset--color--tertiary: #f7f7f7;
|
293 |
+
}';
|
294 |
+
}//end if
|
295 |
+
|
296 |
+
wp_add_inline_style( App::$slug . '-utility-classes', $css );
|
297 |
+
}
|
298 |
+
}
|
redux-core/extendify-sdk/app/SiteSettings.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Helper class for interacting with the user
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Extendify\ExtendifySdk;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Helper class for interacting with the user
|
10 |
+
*/
|
11 |
+
class SiteSettings
|
12 |
+
{
|
13 |
+
|
14 |
+
/**
|
15 |
+
* SiteSettings option_name
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $key = 'extendifysdk_sitesettings';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* SiteSettings default value
|
23 |
+
*
|
24 |
+
* @var Json
|
25 |
+
*/
|
26 |
+
protected $default = '{"state":{"enabled":true}}';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The class instance.
|
30 |
+
*
|
31 |
+
* @var $instance
|
32 |
+
*/
|
33 |
+
protected static $instance = null;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Returns Setting
|
37 |
+
* Use it like Setting::data()
|
38 |
+
*
|
39 |
+
* @return mixed - Setting Data
|
40 |
+
*/
|
41 |
+
private function dataHandler()
|
42 |
+
{
|
43 |
+
return \get_option($this->key, $this->default);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns Setting Key
|
48 |
+
* Use it like Setting::key()
|
49 |
+
*
|
50 |
+
* @return string - Setting key
|
51 |
+
*/
|
52 |
+
private function keyHandler()
|
53 |
+
{
|
54 |
+
return $this->key;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Use it like Setting::method() e.g. Setting::data()
|
59 |
+
*
|
60 |
+
* @param string $name - The name of the method to call.
|
61 |
+
* @param array $arguments - The arguments to pass in.
|
62 |
+
*
|
63 |
+
* @return mixed
|
64 |
+
*/
|
65 |
+
public static function __callStatic($name, array $arguments)
|
66 |
+
{
|
67 |
+
$name = "{$name}Handler";
|
68 |
+
self::$instance = new static();
|
69 |
+
$r = self::$instance;
|
70 |
+
return $r->$name(...$arguments);
|
71 |
+
}
|
72 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/app/User.php
RENAMED
@@ -5,6 +5,8 @@
|
|
5 |
|
6 |
namespace Extendify\ExtendifySdk;
|
7 |
|
|
|
|
|
8 |
/**
|
9 |
* Helper class for interacting with the user
|
10 |
*/
|
@@ -103,15 +105,21 @@ class User
|
|
103 |
$userData['version'] = 0;
|
104 |
}
|
105 |
|
106 |
-
//
|
107 |
-
if (!isset($userData['state']['allowedImports'])) {
|
|
|
108 |
$currentImports = Http::get('/max-free-imports');
|
109 |
-
$userData['state']['allowedImports'] = is_numeric($currentImports) && $currentImports > 0 ? $currentImports :
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
$userData['state']['uuid'] = self::data('uuid');
|
113 |
$userData['state']['canInstallPlugins'] = \current_user_can('install_plugins');
|
114 |
$userData['state']['canActivatePlugins'] = \current_user_can('activate_plugins');
|
|
|
115 |
|
116 |
return \wp_json_encode($userData);
|
117 |
}
|
5 |
|
6 |
namespace Extendify\ExtendifySdk;
|
7 |
|
8 |
+
use Extendify\ExtendifySdk\App;
|
9 |
+
|
10 |
/**
|
11 |
* Helper class for interacting with the user
|
12 |
*/
|
105 |
$userData['version'] = 0;
|
106 |
}
|
107 |
|
108 |
+
// This will update the user's allowed import allowance weekly.
|
109 |
+
if (!get_transient('extendifySdk_import_max_check_' . $this->user->ID) || !isset($userData['state']['allowedImports'])) {
|
110 |
+
set_transient('extendifySdk_import_max_check_' . $this->user->ID, time(), strtotime('1 week', 0));
|
111 |
$currentImports = Http::get('/max-free-imports');
|
112 |
+
$userData['state']['allowedImports'] = is_numeric($currentImports) && $currentImports > 0 ? $currentImports : 25;
|
113 |
+
}
|
114 |
+
|
115 |
+
if (!$userData['state']['sdkPartner']) {
|
116 |
+
$userData['state']['sdkPartner'] = App::$sdkPartner;
|
117 |
}
|
118 |
|
119 |
$userData['state']['uuid'] = self::data('uuid');
|
120 |
$userData['state']['canInstallPlugins'] = \current_user_can('install_plugins');
|
121 |
$userData['state']['canActivatePlugins'] = \current_user_can('activate_plugins');
|
122 |
+
$userData['state']['isAdmin'] = \current_user_can('create_users');
|
123 |
|
124 |
return \wp_json_encode($userData);
|
125 |
}
|
{extendify-sdk → redux-core/extendify-sdk}/bootstrap.php
RENAMED
@@ -4,6 +4,8 @@
|
|
4 |
*/
|
5 |
|
6 |
use Extendify\ExtendifySdk\Admin;
|
|
|
|
|
7 |
|
8 |
if (!defined('ABSPATH')) {
|
9 |
die('No direct access.');
|
@@ -18,6 +20,8 @@ if (is_readable(EXTENDIFYSDK_PATH . 'vendor/autoload.php')) {
|
|
18 |
}
|
19 |
|
20 |
$extendifysdkAdmin = new Admin();
|
|
|
|
|
21 |
|
22 |
require EXTENDIFYSDK_PATH . 'routes/api.php';
|
23 |
require EXTENDIFYSDK_PATH . 'editorplus/EditorPlus.php';
|
4 |
*/
|
5 |
|
6 |
use Extendify\ExtendifySdk\Admin;
|
7 |
+
use Extendify\ExtendifySdk\Frontend;
|
8 |
+
use Extendify\ExtendifySdk\Shared;
|
9 |
|
10 |
if (!defined('ABSPATH')) {
|
11 |
die('No direct access.');
|
20 |
}
|
21 |
|
22 |
$extendifysdkAdmin = new Admin();
|
23 |
+
$extendifysdkFrontend = new Frontend();
|
24 |
+
$extendifysdkShared = new Shared();
|
25 |
|
26 |
require EXTENDIFYSDK_PATH . 'routes/api.php';
|
27 |
require EXTENDIFYSDK_PATH . 'editorplus/EditorPlus.php';
|
{extendify-sdk → redux-core/extendify-sdk}/config.json
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/editorplus/EditorPlus.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/editorplus/editorplus-template.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/editorplus/editorplus.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/extendify-sdk.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/loader.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/public/.gitkeep
RENAMED
File without changes
|
redux-core/extendify-sdk/public/build/extendify-sdk.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
div.extendify-sdk .sr-only{clip:rect(0,0,0,0)!important;border-width:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}div.extendify-sdk .focus\:not-sr-only:focus{clip:auto!important;height:auto!important;margin:0!important;overflow:visible!important;padding:0!important;position:static!important;white-space:normal!important;width:auto!important}div.extendify-sdk .pointer-events-none{pointer-events:none!important}div.extendify-sdk .visible{visibility:visible!important}div.extendify-sdk .invisible{visibility:hidden!important}div.extendify-sdk .static{position:static!important}div.extendify-sdk .fixed{position:fixed!important}div.extendify-sdk .absolute{position:absolute!important}div.extendify-sdk .relative{position:relative!important}div.extendify-sdk .sticky{position:sticky!important}div.extendify-sdk .inset-0{bottom:0!important;left:0!important;right:0!important;top:0!important}div.extendify-sdk .top-0{top:0!important}div.extendify-sdk .top-1{top:.25rem!important}div.extendify-sdk .top-2{top:.5rem!important}div.extendify-sdk .top-16{top:4rem!important}div.extendify-sdk .-top-3{top:-.75rem!important}div.extendify-sdk .right-0{right:0!important}div.extendify-sdk .right-1{right:.25rem!important}div.extendify-sdk .right-2{right:.5rem!important}div.extendify-sdk .right-2\.5{right:.625rem!important}div.extendify-sdk .bottom-0{bottom:0!important}div.extendify-sdk .left-1{left:.25rem!important}div.extendify-sdk .z-0{z-index:0!important}div.extendify-sdk .z-20{z-index:20!important}div.extendify-sdk .z-30{z-index:30!important}div.extendify-sdk .z-50{z-index:50!important}div.extendify-sdk .z-high{z-index:99999!important}div.extendify-sdk .m-0{margin:0!important}div.extendify-sdk .m-6{margin:1.5rem!important}div.extendify-sdk .m-8{margin:2rem!important}div.extendify-sdk .m-auto{margin:auto!important}div.extendify-sdk .mx-6{margin-left:1.5rem!important;margin-right:1.5rem!important}div.extendify-sdk .mx-auto{margin-left:auto!important;margin-right:auto!important}div.extendify-sdk .my-0{margin-bottom:0!important;margin-top:0!important}div.extendify-sdk .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}div.extendify-sdk .my-4{margin-bottom:1rem!important;margin-top:1rem!important}div.extendify-sdk .mt-0{margin-top:0!important}div.extendify-sdk .mt-4{margin-top:1rem!important}div.extendify-sdk .mt-5{margin-top:1.25rem!important}div.extendify-sdk .mt-10{margin-top:2.5rem!important}div.extendify-sdk .mt-px{margin-top:1px!important}div.extendify-sdk .-mt-10{margin-top:-2.5rem!important}div.extendify-sdk .mr-1{margin-right:.25rem!important}div.extendify-sdk .mb-1{margin-bottom:.25rem!important}div.extendify-sdk .mb-2{margin-bottom:.5rem!important}div.extendify-sdk .mb-4{margin-bottom:1rem!important}div.extendify-sdk .mb-6{margin-bottom:1.5rem!important}div.extendify-sdk .mb-8{margin-bottom:2rem!important}div.extendify-sdk .mb-10{margin-bottom:2.5rem!important}div.extendify-sdk .mb-16{margin-bottom:4rem!important}div.extendify-sdk .mb-2\.5{margin-bottom:.625rem!important}div.extendify-sdk .ml-4{margin-left:1rem!important}div.extendify-sdk .-ml-1{margin-left:-.25rem!important}div.extendify-sdk .-ml-2{margin-left:-.5rem!important}div.extendify-sdk .-ml-8{margin-left:-2rem!important}div.extendify-sdk .-ml-px{margin-left:-1px!important}div.extendify-sdk .block{display:block!important}div.extendify-sdk .flex{display:flex!important}div.extendify-sdk .inline-flex{display:inline-flex!important}div.extendify-sdk .table{display:table!important}div.extendify-sdk .grid{display:grid!important}div.extendify-sdk .hidden{display:none!important}div.extendify-sdk .h-8{height:2rem!important}div.extendify-sdk .h-16{height:4rem!important}div.extendify-sdk .h-40{height:10rem!important}div.extendify-sdk .h-80{height:20rem!important}div.extendify-sdk .h-auto{height:auto!important}div.extendify-sdk .h-full{height:100%!important}div.extendify-sdk .h-screen{height:100vh!important}div.extendify-sdk .min-h-0{min-height:0!important}div.extendify-sdk .min-h-60{min-height:15rem!important}div.extendify-sdk .min-h-screen{min-height:100vh!important}div.extendify-sdk .w-60{width:15rem!important}div.extendify-sdk .w-64{width:16rem!important}div.extendify-sdk .w-80{width:20rem!important}div.extendify-sdk .w-auto{width:auto!important}div.extendify-sdk .w-full{width:100%!important}div.extendify-sdk .w-screen{width:100vw!important}div.extendify-sdk .max-w-xs{max-width:20rem!important}div.extendify-sdk .max-w-md{max-width:28rem!important}div.extendify-sdk .max-w-lg{max-width:32rem!important}div.extendify-sdk .max-w-xl{max-width:36rem!important}div.extendify-sdk .max-w-full{max-width:100%!important}div.extendify-sdk .max-w-screen-xl{max-width:1280px!important}div.extendify-sdk .max-w-screen-4xl{max-width:1920px!important}div.extendify-sdk .max-w-8xl{max-width:98rem!important}div.extendify-sdk .flex-shrink-0{flex-shrink:0!important}div.extendify-sdk .flex-grow{flex-grow:1!important}div.extendify-sdk .transform{--tw-translate-x:0!important;--tw-translate-y:0!important;--tw-rotate:0!important;--tw-skew-x:0!important;--tw-skew-y:0!important;--tw-scale-x:1!important;--tw-scale-y:1!important;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}div.extendify-sdk .-translate-x-1{--tw-translate-x:-0.25rem!important}div.extendify-sdk .-translate-x-3{--tw-translate-x:-0.75rem!important}div.extendify-sdk .translate-y-0{--tw-translate-y:0px!important}div.extendify-sdk .translate-y-4{--tw-translate-y:1rem!important}div.extendify-sdk .-translate-y-full{--tw-translate-y:-100%!important}div.extendify-sdk .rotate-90{--tw-rotate:90deg!important}div.extendify-sdk .cursor-pointer{cursor:pointer!important}div.extendify-sdk .flex-col{flex-direction:column!important}div.extendify-sdk .items-start{align-items:flex-start!important}div.extendify-sdk .items-end{align-items:flex-end!important}div.extendify-sdk .items-center{align-items:center!important}div.extendify-sdk .justify-start{justify-content:flex-start!important}div.extendify-sdk .justify-end{justify-content:flex-end!important}div.extendify-sdk .justify-center{justify-content:center!important}div.extendify-sdk .justify-between{justify-content:space-between!important}div.extendify-sdk .justify-items-center{justify-items:center!important}div.extendify-sdk .gap-6{gap:1.5rem!important}div.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.75rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.375rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2rem*var(--tw-space-y-reverse))!important;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-bottom-width:calc(1px*var(--tw-divide-y-reverse))!important;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))!important}div.extendify-sdk .overflow-hidden{overflow:hidden!important}div.extendify-sdk .overflow-y-auto{overflow-y:auto!important}div.extendify-sdk .whitespace-nowrap{white-space:nowrap!important}div.extendify-sdk .rounded-none{border-radius:0!important}div.extendify-sdk .rounded-sm{border-radius:.125rem!important}div.extendify-sdk .rounded{border-radius:.25rem!important}div.extendify-sdk .rounded-md{border-radius:.375rem!important}div.extendify-sdk .border-0{border-width:0!important}div.extendify-sdk .border-2{border-width:2px!important}div.extendify-sdk .border{border-width:1px!important}div.extendify-sdk .border-b{border-bottom-width:1px!important}div.extendify-sdk .border-solid{border-style:solid!important}div.extendify-sdk .border-transparent{border-color:transparent!important}div.extendify-sdk .border-black{--tw-border-opacity:1!important;border-color:rgba(0,0,0,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-200{--tw-border-opacity:1!important;border-color:rgba(224,224,224,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-300{--tw-border-opacity:1!important;border-color:rgba(221,221,221,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-900{--tw-border-opacity:1!important;border-color:rgba(30,30,30,var(--tw-border-opacity))!important}div.extendify-sdk .border-extendify-main{--tw-border-opacity:1!important;border-color:rgba(0,129,96,var(--tw-border-opacity))!important}div.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1!important;border-color:rgba(204,24,24,var(--tw-border-opacity))!important}div.extendify-sdk .hover\:border-wp-theme-500:hover{border-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .focus\:border-transparent:focus{border-color:transparent!important}div.extendify-sdk .focus\:border-wp-theme-500:focus{border-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .bg-transparent{background-color:transparent!important}div.extendify-sdk .bg-black{--tw-bg-opacity:1!important;background-color:rgba(0,0,0,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-white{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-100{--tw-bg-opacity:1!important;background-color:rgba(240,240,240,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-900{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-lightest{--tw-bg-opacity:1!important;background-color:rgba(248,255,254,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(0,129,96,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-alert{--tw-bg-opacity:1!important;background-color:rgba(132,16,16,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-secondary{--tw-bg-opacity:1!important;background-color:rgba(203,195,245,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-gray-150:hover{--tw-bg-opacity:1!important;background-color:rgba(234,234,234,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-extendify-main-dark:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}div.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-opacity-30{--tw-bg-opacity:0.3!important}div.extendify-sdk .bg-clip-padding{background-clip:padding-box!important}div.extendify-sdk .fill-current{fill:currentColor!important}div.extendify-sdk .stroke-current{stroke:currentColor!important}div.extendify-sdk .object-cover{-o-object-fit:cover!important;object-fit:cover!important}div.extendify-sdk .p-0{padding:0!important}div.extendify-sdk .p-1{padding:.25rem!important}div.extendify-sdk .p-2{padding:.5rem!important}div.extendify-sdk .p-3{padding:.75rem!important}div.extendify-sdk .p-4{padding:1rem!important}div.extendify-sdk .p-6{padding:1.5rem!important}div.extendify-sdk .p-10{padding:2.5rem!important}div.extendify-sdk .p-12{padding:3rem!important}div.extendify-sdk .p-1\.5{padding:.375rem!important}div.extendify-sdk .p-3\.5{padding:.875rem!important}div.extendify-sdk .px-1{padding-left:.25rem!important;padding-right:.25rem!important}div.extendify-sdk .px-2{padding-left:.5rem!important;padding-right:.5rem!important}div.extendify-sdk .px-3{padding-left:.75rem!important;padding-right:.75rem!important}div.extendify-sdk .px-4{padding-left:1rem!important;padding-right:1rem!important}div.extendify-sdk .px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}div.extendify-sdk .px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}div.extendify-sdk .py-0{padding-bottom:0!important;padding-top:0!important}div.extendify-sdk .py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}div.extendify-sdk .py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}div.extendify-sdk .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}div.extendify-sdk .py-4{padding-bottom:1rem!important;padding-top:1rem!important}div.extendify-sdk .py-1\.5{padding-bottom:.375rem!important;padding-top:.375rem!important}div.extendify-sdk .py-2\.5{padding-bottom:.625rem!important;padding-top:.625rem!important}div.extendify-sdk .pt-0{padding-top:0!important}div.extendify-sdk .pt-2{padding-top:.5rem!important}div.extendify-sdk .pt-4{padding-top:1rem!important}div.extendify-sdk .pt-6{padding-top:1.5rem!important}div.extendify-sdk .pt-14{padding-top:3.5rem!important}div.extendify-sdk .pt-px{padding-top:1px!important}div.extendify-sdk .pr-2{padding-right:.5rem!important}div.extendify-sdk .pr-3{padding-right:.75rem!important}div.extendify-sdk .pb-2{padding-bottom:.5rem!important}div.extendify-sdk .pb-4{padding-bottom:1rem!important}div.extendify-sdk .pb-6{padding-bottom:1.5rem!important}div.extendify-sdk .pb-32{padding-bottom:8rem!important}div.extendify-sdk .pb-40{padding-bottom:10rem!important}div.extendify-sdk .pl-0{padding-left:0!important}div.extendify-sdk .pl-5{padding-left:1.25rem!important}div.extendify-sdk .pl-6{padding-left:1.5rem!important}div.extendify-sdk .pl-8{padding-left:2rem!important}div.extendify-sdk .text-left{text-align:left!important}div.extendify-sdk .text-center{text-align:center!important}div.extendify-sdk .text-xs{font-size:.75rem!important;line-height:1rem!important}div.extendify-sdk .text-sm{font-size:.875rem!important;line-height:1.25rem!important}div.extendify-sdk .text-base{font-size:1rem!important;line-height:1.5rem!important}div.extendify-sdk .text-lg{font-size:1.125rem!important;line-height:1.75rem!important}div.extendify-sdk .text-xl{font-size:1.25rem!important;line-height:1.75rem!important}div.extendify-sdk .font-light{font-weight:300!important}div.extendify-sdk .font-normal{font-weight:400!important}div.extendify-sdk .font-medium{font-weight:500!important}div.extendify-sdk .font-semibold{font-weight:600!important}div.extendify-sdk .font-bold{font-weight:700!important}div.extendify-sdk .uppercase{text-transform:uppercase!important}div.extendify-sdk .leading-none{line-height:1!important}div.extendify-sdk .leading-tight{line-height:1.25!important}div.extendify-sdk .leading-extra-tight{line-height:.5!important}div.extendify-sdk .text-black{--tw-text-opacity:1!important;color:rgba(0,0,0,var(--tw-text-opacity))!important}div.extendify-sdk .text-white{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-700{--tw-text-opacity:1!important;color:rgba(117,117,117,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-800{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-900{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-main{--tw-text-opacity:1!important;color:rgba(0,129,96,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-gray{--tw-text-opacity:1!important;color:rgba(95,95,95,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-black{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1!important;color:rgba(204,24,24,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .focus\:text-white:focus{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1!important;color:rgba(59,130,246,var(--tw-text-opacity))!important}div.extendify-sdk .active\:text-white:active{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .underline{text-decoration:underline!important}div.extendify-sdk .hover\:no-underline:hover,div.extendify-sdk .no-underline{text-decoration:none!important}div.extendify-sdk .placeholder-transparent::-moz-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent:-ms-input-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent::placeholder{color:transparent!important}div.extendify-sdk .opacity-0{opacity:0!important}div.extendify-sdk .opacity-30{opacity:.3!important}div.extendify-sdk .opacity-50{opacity:.5!important}div.extendify-sdk .opacity-75{opacity:.75!important}div.extendify-sdk .focus\:opacity-100:focus,div.extendify-sdk .hover\:opacity-100:hover,div.extendify-sdk .opacity-100{opacity:1!important}div.extendify-sdk .shadow-modal{--tw-shadow: 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.035),0 0 1px rgba(0,0,0,.05)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}div.extendify-sdk .focus\:outline-none:focus,div.extendify-sdk .outline-none{outline:2px solid transparent!important;outline-offset:2px!important}div.extendify-sdk .focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}div.extendify-sdk .focus\:ring-2:focus,div.extendify-sdk .focus\:ring-wp:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}div.extendify-sdk .focus\:ring-wp:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}div.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .ring-offset-1{--tw-ring-offset-width:1px!important}div.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/)!important;--tw-brightness:var(--tw-empty,/*!*/ /*!*/)!important;--tw-contrast:var(--tw-empty,/*!*/ /*!*/)!important;--tw-grayscale:var(--tw-empty,/*!*/ /*!*/)!important;--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-invert:var(--tw-empty,/*!*/ /*!*/)!important;--tw-saturate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-sepia:var(--tw-empty,/*!*/ /*!*/)!important;--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}div.extendify-sdk .transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition{transition-duration:.15s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .duration-150{transition-duration:.15s!important}div.extendify-sdk .duration-200{transition-duration:.2s!important}div.extendify-sdk .duration-300{transition-duration:.3s!important}div.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}.extendify-sdk{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/)!important;--tw-ring-offset-width:0px!important;--tw-ring-offset-color:transparent!important;--tw-ring-color:var(--wp-admin-theme-color)!important}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb!important;box-sizing:border-box!important}.extendify-sdk .button-focus:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-focus{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.button-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(0,129,96,var(--tw-bg-opacity))!important;cursor:pointer!important;white-space:nowrap!important}.button-extendify-main:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}.button-extendify-main:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}.button-extendify-main{padding:.375rem .75rem!important}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}.button-extendify-main{text-decoration:none!important;transition-duration:.15s!important;transition-duration:.2s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.extendify-sdk .button-extendify-main:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-extendify-main{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.extendify-sdk input.button-extendify-main:focus,.extendify-sdk input.button-focus:focus,.extendify-sdk select.button-extendify-main:focus,.extendify-sdk select.button-focus:focus{--tw-shadow:0 0 #0000!important;border-color:transparent!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;outline:2px solid transparent!important;outline-offset:2px!important}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none!important}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none!important}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none!important}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem!important}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent!important;border-bottom:1px solid #e0e0e0!important}.extendify-sdk .components-modal__header{--tw-border-opacity:1!important;border-bottom-width:1px!important;border-color:rgba(221,221,221,var(--tw-border-opacity))!important}.extendify-special-input:-moz-placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:-ms-input-placeholder~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:focus~label{--tw-text-opacity:1!important;color:rgba(0,129,96,var(--tw-text-opacity))!important;font-size:.75rem!important;line-height:1rem!important;top:-1rem!important}.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.ext{max-width:none!important}.block-editor-block-list__layout.is-root-container .ext.block-editor-block-list__block{max-width:100%!important}.extendify-sdk .block-editor-block-preview__container{-webkit-animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;opacity:0}.extendify-sdk .is-root-container>[data-align=full],.extendify-sdk .is-root-container>[data-align=full]>.wp-block,.extendify-sdk .is-root-container>[data-block]{margin-bottom:0!important;margin-top:0!important}.editor-styles-wrapper:not(.block-editor-writing-flow)>.is-root-container :where(.wp-block)[data-align=full]{margin-bottom:0!important;margin-top:0!important}@-webkit-keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}@keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}.extendify-sdk .with-light-shadow:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,0.08),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)!important;border-width:0!important;bottom:0!important;content:""!important;left:0!important;position:absolute!important;right:0!important;top:0!important}.extendify-sdk .with-light-shadow:after,.extendify-sdk .with-light-shadow:hover:after{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .with-light-shadow:hover:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,0.16),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)!important}@media (min-width:600px){div.extendify-sdk .sm\:top-auto{top:auto!important}div.extendify-sdk .sm\:m-0{margin:0!important}div.extendify-sdk .sm\:my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}div.extendify-sdk .sm\:mt-64{margin-top:16rem!important}div.extendify-sdk .sm\:mb-8{margin-bottom:2rem!important}div.extendify-sdk .sm\:block{display:block!important}div.extendify-sdk .sm\:flex{display:flex!important}div.extendify-sdk .sm\:hidden{display:none!important}div.extendify-sdk .sm\:h-auto{height:auto!important}div.extendify-sdk .sm\:min-h-0{min-height:0!important}div.extendify-sdk .sm\:w-56{width:14rem!important}div.extendify-sdk .sm\:w-auto{width:auto!important}div.extendify-sdk .sm\:w-full{width:100%!important}div.extendify-sdk .sm\:translate-x-6{--tw-translate-x:1.5rem!important}div.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem!important}div.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .sm\:border-0{border-width:0!important}div.extendify-sdk .sm\:p-0{padding:0!important}div.extendify-sdk .sm\:px-0{padding-left:0!important;padding-right:0!important}div.extendify-sdk .sm\:px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}div.extendify-sdk .sm\:py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}div.extendify-sdk .sm\:py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}div.extendify-sdk .sm\:py-2\.5{padding-bottom:.625rem!important;padding-top:.625rem!important}div.extendify-sdk .sm\:pt-0{padding-top:0!important}div.extendify-sdk .sm\:pt-6{padding-top:1.5rem!important}div.extendify-sdk .sm\:pr-8{padding-right:2rem!important}div.extendify-sdk .sm\:pr-12{padding-right:3rem!important}div.extendify-sdk .sm\:pb-8{padding-bottom:2rem!important}div.extendify-sdk .sm\:pl-0{padding-left:0!important}div.extendify-sdk .sm\:pl-6{padding-left:1.5rem!important}div.extendify-sdk .sm\:text-2xl{font-size:1.5rem!important;line-height:2rem!important}div.extendify-sdk .sm\:text-3xl{font-size:2rem!important;line-height:2.5rem!important}}@media (min-width:782px){div.extendify-sdk .md\:m-0{margin:0!important}div.extendify-sdk .md\:block{display:block!important}div.extendify-sdk .md\:flex{display:flex!important}div.extendify-sdk .md\:w-6\/12{width:50%!important}div.extendify-sdk .md\:w-7\/12{width:58.333333%!important}div.extendify-sdk .md\:max-w-2xl{max-width:42rem!important}div.extendify-sdk .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}div.extendify-sdk .md\:rounded-l-md{border-bottom-left-radius:.375rem!important;border-top-left-radius:.375rem!important}div.extendify-sdk .md\:rounded-tr-none{border-top-right-radius:0!important}div.extendify-sdk .md\:leading-3{line-height:.75rem!important}}@media (min-width:1080px){div.extendify-sdk .lg\:static{position:static!important}div.extendify-sdk .lg\:sticky{position:sticky!important}div.extendify-sdk .lg\:mx-0{margin-left:0!important;margin-right:0!important}div.extendify-sdk .lg\:-ml-px{margin-left:-1px!important}div.extendify-sdk .lg\:block{display:block!important}div.extendify-sdk .lg\:flex{display:flex!important}div.extendify-sdk .lg\:h-full{height:100%!important}div.extendify-sdk .lg\:w-64{width:16rem!important}div.extendify-sdk .lg\:flex-row{flex-direction:row!important}div.extendify-sdk .lg\:items-center{align-items:center!important}div.extendify-sdk .lg\:justify-between{justify-content:space-between!important}div.extendify-sdk .lg\:border-t-0{border-top-width:0!important}div.extendify-sdk .lg\:border-b{border-bottom-width:1px!important}div.extendify-sdk .lg\:p-20{padding:5rem!important}div.extendify-sdk .lg\:pt-0{padding-top:0!important}div.extendify-sdk .lg\:pl-px{padding-left:1px!important}}@media (min-width:1280px){div.extendify-sdk .xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
|
redux-core/extendify-sdk/public/build/extendify-sdk.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
+
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),i=n(570),o=n(940),s=n(581),a=n(574),l=n(845),c=n(338),u=n(524);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+x)}var y=a(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,o={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,o),h=null}}if(h.open(e.method.toUpperCase(),s(y,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;g&&(f[e.xsrfHeaderName]=g)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},57:(e,t,n)=>{"use strict";var r=n(485),i=n(875),o=n(29),s=n(941);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=a(n(141));l.Axios=o,l.create=function(e){return a(s(l.defaults,e))},l.Cancel=n(132),l.CancelToken=n(603),l.isCancel=n(475),l.all=function(e){return Promise.all(e)},l.spread=n(739),l.isAxiosError=n(835),e.exports=l,e.exports.default=l},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),i=n(581),o=n(96),s=n(9),a=n(941),l=n(144),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[s,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{i=s(d)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},96:(e,t,n)=>{"use strict";var r=n(485);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},574:(e,t,n)=>{"use strict";var r=n(642),i=n(288);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},9:(e,t,n)=>{"use strict";var r=n(485),i=n(212),o=n(475),s=n(141);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(a,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(s).concat(a),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485),i=n(141);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),i=n(485),o=n(446),s=n(953),a={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(387)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){u.headers[e]=i.merge(a)})),e.exports=u},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},144:(e,t,n)=>{"use strict";var r=n(843),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},s=r.version.split(".");function a(e,t){for(var n=t?t.split("."):s,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&a(t);function s(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(s(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},485:(e,t,n)=>{"use strict";var r=n(875),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},363:(e,t,n)=>{"use strict";const r=wp.element;var i=n(995),o=n.n(i);function s(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let s=r(t);function a(){const n=r(t);if(!o(s,n)){const t=s;e(s=n,t)}}return n.add(a),()=>n.delete(a)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const a="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;function l(e){const t="function"==typeof e?s(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,i.useReducer)((e=>e+1),0),o=t.getState(),s=(0,i.useRef)(o),l=(0,i.useRef)(e),c=(0,i.useRef)(n),u=(0,i.useRef)(!1),d=(0,i.useRef)();let f;void 0===d.current&&(d.current=e(o));let p=!1;(s.current!==o||l.current!==e||c.current!==n||u.current)&&(f=e(o),p=!n(d.current,f)),a((()=>{p&&(d.current=f),s.current=o,l.current=e,c.current=n,u.current=!1}));const h=(0,i.useRef)(o);return a((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(d.current,n)||(s.current=e,d.current=n,r())}catch(e){u.current=!0,r()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]),p?f:d.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}var c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))d.call(t,n)&&p(e,n,t[n]);if(u)for(var n of u(t))f.call(t,n)&&p(e,n,t[n]);return e};const m=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>m(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>m(t)(e)}}},x=(e,t)=>(n,r,i)=>{const{name:o,getStorage:s=(()=>localStorage),serialize:a=JSON.stringify,deserialize:l=JSON.parse,blacklist:c,whitelist:u,onRehydrateStorage:d,version:f=0,migrate:p,merge:x=((e,t)=>h(h({},t),e))}=t||{};let y;try{y=s()}catch(e){}if(!y)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...e)}),r,i);const v=m(a),g=()=>{const e=h({},r());let t;u&&Object.keys(e).forEach((t=>{!u.includes(t)&&delete e[t]})),c&&c.forEach((t=>delete e[t]));const n=v({state:e,version:f}).then((e=>y.setItem(o,e))).catch((e=>{t=e}));if(t)throw t;return n},b=i.setState;i.setState=(e,t)=>{b(e,t),g()};const w=e(((...e)=>{n(...e),g()}),r,i);let j;const k=(null==d?void 0:d(r()))||void 0;return m(y.getItem.bind(y))(o).then((e=>{if(e)return l(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===f)return e.state;if(p)return p(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(j=x(e,w),n(j,!0),g()))).then((()=>{null==k||k(j,void 0)})).catch((e=>{null==k||k(void 0,e)})),j||w};var y="pattern",v=12;const g=wp.blocks;var b=n(135),w=n.n(b),j=n(206),k=n.n(j)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function S(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}k.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(S(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(S(e.response))}(e)})),k.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=B.getState().remainingImports(),e.data.entry_point=B.getState().entryPoint,e.data.total_imports=B.getState().imports),e}(e))}),(function(e){return e}));var O=function(){return k.get("user")},_=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),k.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},C=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),k.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})},E=function(e){var t=new FormData;return t.append("email",e),k.post("register-mailing-list",t,{headers:{"Content-Type":"multipart/form-data"}})};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){I(o,r,i,s,a,"next",e)}function a(e){I(o,r,i,s,a,"throw",e)}s(void 0)}))}}var R,F,D={getItem:(F=L(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return F.apply(this,arguments)}),setItem:(R=L(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return R.apply(this,arguments)})},B=l(x((function(e,t){return{email:"",apiKey:"",imports:0,uuid:"",sdkPartner:"",registration:{email:""},noticesDismissedAt:{welcome:""},allowedImports:0,entryPoint:"not-set",enabled:null===window.extendifySdkData.sitesettings||(null===(n=window.extendifySdkData)||void 0===n||null===(r=n.sitesettings)||void 0===r||null===(i=r.state)||void 0===i?void 0:i.enabled),canInstallPlugins:!1,canActivatePlugins:!1,preferredOptions:{taxonomies:{},type:"",search:""},preferredOptionsHistory:{siteType:[]},incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0},updateSiteType:function(n){if(t().updatePreferredOption("tax_categories",n),n&&"Unknown"!==n){var r=new Set([n].concat(T(t().preferredOptionsHistory.siteType)));e({preferredOptionsHistory:Object.assign({},t().preferredOptionsHistory,{siteType:T(r).slice(0,3)})})}},updatePreferredOption:function(n,r){var i,o,s;Object.prototype.hasOwnProperty.call(t().preferredOptions,n)||(r=Object.assign({},null!==(o=null===(s=t().preferredOptions)||void 0===s?void 0:s.taxonomies)&&void 0!==o?o:{},P({},n,r)),n="taxonomies");var a="type"==n&&r!==(null===(i=t().preferredOptions)||void 0===i?void 0:i.type);e({preferredOptions:A({},Object.assign({},t().preferredOptions,P({},n,r),a?{taxonomies:{}}:{}))})}};var n,r,i}),{name:"extendify-user",getStorage:function(){return D}}));function U(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=l(x((function(e,t){return{taxonomies:{},openedTaxonomies:[],setTaxonomies:function(t){return e({taxonomies:t})},toggleOpenedTaxonomy:function(n,r){var i=t().openedTaxonomies;e({openedTaxonomies:r?[].concat(U(i),[n]):U(i.filter((function(e){return e!=n})))})}}}),{name:"extendify-taxonomies"}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Z,G,K=l((function(e,t){return{templates:[],skipNextFetch:!1,fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},nextPage:"",searchParams:{taxonomies:{},type:y},initTemplateData:function(){e({activeTemplate:{}}),t().setupDefaultTaxonomies(),t().updateType(Y.getState().currentType)},removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:W(new Map([].concat(W(t().templates),W(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(){var n,r,i,o,s=V.getState().taxonomies,a=Object.entries(s).reduce((function(e,t){return e[t[0]]=function(e){var t,n,r;return"tax_categories"===e?"Unknown":null!==(t=null===(n=V.getState())||void 0===n||null===(r=n.taxonomies[e][0])||void 0===r?void 0:r.term)&&void 0!==t?t:void 0}(t[0]),e}),{}),l={};a=Object.assign({},a,null!==(n=null===(r=B.getState().preferredOptions)||void 0===r?void 0:r.taxonomies)&&void 0!==n?n:{},null!==(i=null===(o=Y.getState())||void 0===o?void 0:o.currentTaxonomies)&&void 0!==i?i:{}),l.taxonomies=Object.assign({},a),e({taxonomyDefaultState:a,searchParams:H({},Object.assign(t().searchParams,l))})},setActive:function(t){var n;e({activeTemplate:t}),Object.keys(t).length>0&&Y.setState({currentPage:"single"}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code&&e({activeTemplateBlocks:(0,g.rawHandler)({HTML:t.fields.code})})},updateTaxonomies:function(e){var n,r,i={};(i.taxonomies=Object.assign({},t().searchParams.taxonomies,e),null!=i&&null!==(n=i.taxonomies)&&void 0!==n&&n.tax_categories)&&B.getState().updatePreferredOption("tax_categories",null==i||null===(r=i.taxonomies)||void 0===r?void 0:r.tax_categories);Y.getState().updateCurrentTaxonomies(null==i?void 0:i.taxonomies),t().updateSearchParams(i)},updateType:function(e){Y.getState().updateCurrentType(e),t().updateSearchParams({type:e})},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState);var r=Object.assign({},t().searchParams,n);JSON.stringify(r)!==JSON.stringify(t().searchParams)&&e({templates:[],nextPage:"",searchParams:r})}}})),Y=l(x((function(e){return{open:!1,metaData:{},currentPage:"main",currentTaxonomies:{},currentType:y,settingsModal:!1,updateCurrentTaxonomies:function(t){return e({currentTaxonomies:Object.assign({},t)})},updateCurrentType:function(t){return e({currentType:t})},setOpen:function(t){e({open:t}),t&&K.getState().removeTemplates()}}}),{name:"extendify-global-state"}));function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function Q(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function ne(e,t){if(e in t){for(var n=t[e],r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,i):n}var s=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(s,ne),s}function re(e){var t=e.props,n=e.slot,r=e.defaultTag,i=e.features,o=e.visible,s=void 0===o||o,a=e.name;if(s)return ie(t,n,r,a);var l=null!=i?i:Z.None;if(l&Z.Static){var c=t.static,u=void 0!==c&&c,d=Q(t,["static"]);if(u)return ie(d,n,r,a)}if(l&Z.RenderStrategy){var f,p=t.unmount,h=void 0===p||p,m=Q(t,["unmount"]);return ne(h?G.Unmount:G.Hidden,((f={})[G.Unmount]=function(){return null},f[G.Hidden]=function(){return ie(X({},m,{hidden:!0,style:{display:"none"}}),n,r,a)},f))}return ie(t,n,r,a)}function ie(e,t,n,r){var o;void 0===t&&(t={});var s=se(e,["unmount","static"]),a=s.as,l=void 0===a?n:a,c=s.children,u=s.refName,d=void 0===u?"ref":u,f=Q(s,["as","children","refName"]),p=void 0!==e.ref?((o={})[d]=e.ref,o):{},h="function"==typeof c?c(t):c;if(f.className&&"function"==typeof f.className&&(f.className=f.className(t)),l===i.Fragment&&Object.keys(f).length>0){if(!(0,i.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(f).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,i.cloneElement)(h,Object.assign({},function(e,t,n){for(var r,i=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(i,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},s=te(n);!(r=s()).done;)o();return i}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(se(f,["ref"])),h.props,["onClick"]),p))}return(0,i.createElement)(l,Object.assign({},se(f,["ref"]),l!==i.Fragment&&p),h)}function oe(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function se(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),i=te(t);!(n=i()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(Z||(Z={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(G||(G={}));var ae="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,le={serverHandoffComplete:!1};function ce(){var e=(0,i.useState)(le.serverHandoffComplete),t=e[0],n=e[1];return(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){!1===le.serverHandoffComplete&&(le.serverHandoffComplete=!0)}),[]),t}var ue=0;function de(){return++ue}function fe(){var e=ce(),t=(0,i.useState)(e?de:null),n=t[0],r=t[1];return ae((function(){null===n&&r(de())}),[n]),null!=n?""+n:void 0}function pe(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var he,me,xe=(0,i.createContext)(null);function ye(){return(0,i.useContext)(xe)}function ve(e){var t=e.value,n=e.children;return o().createElement(xe.Provider,{value:t},n)}function ge(){var e=(0,i.useRef)(!0);return(0,i.useEffect)((function(){e.current=!1}),[]),e.current}function be(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=te(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function we(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function je(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function ke(e,t,n,r,i,o){var s=be(),a=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return je.apply(void 0,[e].concat(i)),we.apply(void 0,[e].concat(t,n)),s.nextFrame((function(){je.apply(void 0,[e].concat(n)),we.apply(void 0,[e].concat(r)),s.add(function(e,t){var n=be();if(!e)return n.dispose;var r=getComputedStyle(e),i=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=i[0],s=i[1];return 0!==o?n.setTimeout((function(){t(me.Finished)}),o+s):t(me.Finished),n.add((function(){return t(me.Cancelled)})),n.dispose}(e,(function(n){return je.apply(void 0,[e].concat(r,t)),we.apply(void 0,[e].concat(i)),a(n)})))})),s.add((function(){return je.apply(void 0,[e].concat(t,n,r,i))})),s.add((function(){return a(me.Cancelled)})),s.dispose}function Se(e){return void 0===e&&(e=""),(0,i.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}xe.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(he||(he={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(me||(me={}));var Oe,_e=(0,i.createContext)(null);_e.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(Oe||(Oe={}));var Ce=(0,i.createContext)(null);function Ee(e){return"children"in e?Ee(e.children):e.current.filter((function(e){return e.state===Oe.Visible})).length>0}function Ne(e){var t=(0,i.useRef)(e),n=(0,i.useRef)([]),r=pe();(0,i.useEffect)((function(){t.current=e}),[e]);var o=(0,i.useCallback)((function(e,i){var o;void 0===i&&(i=G.Hidden);var s=n.current.findIndex((function(t){return t.id===e}));-1!==s&&(ne(i,((o={})[G.Unmount]=function(){n.current.splice(s,1)},o[G.Hidden]=function(){n.current[s].state=Oe.Hidden},o)),!Ee(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),s=(0,i.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==Oe.Visible&&(t.state=Oe.Visible):n.current.push({id:e,state:Oe.Visible}),function(){return o(e,G.Unmount)}}),[n,o]);return(0,i.useMemo)((function(){return{children:n,register:s,unregister:o}}),[s,o,n])}function Ae(){}Ce.displayName="NestingContext";var Pe=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Te(e){for(var t,n={},r=te(Pe);!(t=r()).done;){var i,o=t.value;n[o]=null!=(i=e[o])?i:Ae}return n}var Me,Ie=Z.RenderStrategy;function Le(e){var t,n=e.beforeEnter,r=e.afterEnter,s=e.beforeLeave,a=e.afterLeave,l=e.enter,c=e.enterFrom,u=e.enterTo,d=e.entered,f=e.leave,p=e.leaveFrom,h=e.leaveTo,m=Q(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),x=(0,i.useRef)(null),y=(0,i.useState)(Oe.Visible),v=y[0],g=y[1],b=m.unmount?G.Unmount:G.Hidden,w=function(){var e=(0,i.useContext)(_e);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,S=function(){var e=(0,i.useContext)(Ce);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),O=S.register,_=S.unregister,C=ge(),E=fe(),N=(0,i.useRef)(!1),A=Ne((function(){N.current||(g(Oe.Hidden),_(E),D.current.afterLeave())}));ae((function(){if(E)return O(E)}),[O,E]),ae((function(){var e;b===G.Hidden&&E&&(j&&v!==Oe.Visible?g(Oe.Visible):ne(v,((e={})[Oe.Hidden]=function(){return _(E)},e[Oe.Visible]=function(){return O(E)},e)))}),[v,E,O,_,j,b]);var P=Se(l),T=Se(c),M=Se(u),I=Se(d),L=Se(f),R=Se(p),F=Se(h),D=function(e){var t=(0,i.useRef)(Te(e));return(0,i.useEffect)((function(){t.current=Te(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:s,afterLeave:a}),B=ce();(0,i.useEffect)((function(){if(B&&v===Oe.Visible&&null===x.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[x,v,B]);var U=C&&!k;ae((function(){var e=x.current;if(e&&!U)return N.current=!0,j&&D.current.beforeEnter(),j||D.current.beforeLeave(),j?ke(e,P,T,M,I,(function(e){N.current=!1,e===me.Finished&&D.current.afterEnter()})):ke(e,L,R,F,I,(function(e){N.current=!1,e===me.Finished&&(Ee(A)||(g(Oe.Hidden),_(E),D.current.afterLeave()))}))}),[D,E,N,_,A,x,U,j,P,T,M,L,R,F]);var q={ref:x},V=m;return o().createElement(Ce.Provider,{value:A},o().createElement(ve,{value:ne(v,(t={},t[Oe.Visible]=he.Open,t[Oe.Hidden]=he.Closed,t))},re({props:X({},V,q),defaultTag:"div",features:Ie,visible:v===Oe.Visible,name:"Transition.Child"})))}function Re(e){var t,n=e.show,r=e.appear,s=void 0!==r&&r,a=e.unmount,l=Q(e,["show","appear","unmount"]),c=ye();void 0===n&&null!==c&&(n=ne(c,((t={})[he.Open]=!0,t[he.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var u=(0,i.useState)(n?Oe.Visible:Oe.Hidden),d=u[0],f=u[1],p=Ne((function(){f(Oe.Hidden)})),h=ge(),m=(0,i.useMemo)((function(){return{show:n,appear:s||!h}}),[n,s,h]);(0,i.useEffect)((function(){n?f(Oe.Visible):Ee(p)||f(Oe.Hidden)}),[n,p]);var x={unmount:a};return o().createElement(Ce.Provider,{value:p},o().createElement(_e.Provider,{value:m},re({props:X({},x,{as:i.Fragment,children:o().createElement(Le,Object.assign({},x,l))}),defaultTag:i.Fragment,features:Ie,visible:d===Oe.Visible,name:"Transition"})))}function Fe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,i.useRef)(t);return(0,i.useEffect)((function(){r.current=t}),[t]),(0,i.useCallback)((function(e){for(var t,n=te(r.current);!(t=n()).done;){var i=t.value;null!=i&&("function"==typeof i?i(e):i.current=e)}}),[r])}function De(e){for(var t,n,r=e.parentElement,i=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(i=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(i))&&o}function Be(e,t,n){var r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Re.Child=function(e){var t=null!==(0,i.useContext)(_e),n=null!==ye();return!t&&n?o().createElement(Re,Object.assign({},e)):o().createElement(Le,Object.assign({},e))},Re.Root=Re,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Me||(Me={}));var Ue,qe,Ve,ze,He,$e=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function We(e){null==e||e.focus({preventScroll:!0})}function Je(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll($e))}(e),r=document.activeElement,i=function(){if(t&(Ue.First|Ue.Next))return Ve.Next;if(t&(Ue.Previous|Ue.Last))return Ve.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),o=function(){if(t&Ue.First)return 0;if(t&Ue.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Ue.Next)return Math.max(0,n.indexOf(r))+1;if(t&Ue.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),s=t&Ue.NoScroll?{preventScroll:!0}:{},a=0,l=n.length,c=void 0;do{var u;if(a>=l||a+l<=0)return qe.Error;var d=o+a;if(t&Ue.WrapAround)d=(d+l)%l;else{if(d<0)return qe.Underflow;if(d>=l)return qe.Overflow}null==(u=c=n[d])||u.focus(s),a+=i}while(c!==document.activeElement);return c.hasAttribute("tabindex")||c.setAttribute("tabindex","0"),qe.Success}function Ze(e,t,n){void 0===t&&(t=He.All);var r=void 0===n?{}:n,o=r.initialFocus,s=r.containers,a=(0,i.useRef)("undefined"!=typeof window?document.activeElement:null),l=(0,i.useRef)(null),c=pe(),u=Boolean(t&He.RestoreFocus),d=Boolean(t&He.InitialFocus);(0,i.useEffect)((function(){u&&(a.current=document.activeElement)}),[u]),(0,i.useEffect)((function(){if(u)return function(){We(a.current),a.current=null}}),[u]),(0,i.useEffect)((function(){if(d&&e.current){var t=document.activeElement;if(null==o?void 0:o.current){if((null==o?void 0:o.current)===t)return void(l.current=t)}else if(e.current.contains(t))return void(l.current=t);(null==o?void 0:o.current)?We(o.current):Je(e.current,Ue.First)===qe.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),l.current=document.activeElement}}),[e,o,d]),Be("keydown",(function(n){t&He.TabLock&&e.current&&n.key===Me.Tab&&(n.preventDefault(),Je(e.current,(n.shiftKey?Ue.Previous:Ue.Next)|Ue.WrapAround)===qe.Success&&(l.current=document.activeElement))})),Be("focus",(function(n){if(t&He.FocusLock){var r=new Set(null==s?void 0:s.current);if(r.add(e),r.size){var i=l.current;if(i&&c.current){var o=n.target;o&&o instanceof HTMLElement?!function(e,t){for(var n,r=te(e);!(n=r()).done;){var i;if(null==(i=n.value.current)?void 0:i.contains(t))return!0}return!1}(r,o)?(n.preventDefault(),n.stopPropagation(),We(i)):(l.current=o,We(o)):We(l.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Ue||(Ue={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(qe||(qe={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(Ve||(Ve={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(ze||(ze={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(He||(He={}));var Ge=new Set,Ke=new Map;function Ye(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Xe(e){var t=Ke.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Qe=(0,i.createContext)(!1);function et(e){return o().createElement(Qe.Provider,{value:e.force},e.children)}const tt=ReactDOM;function nt(){var e=(0,i.useContext)(Qe),t=(0,i.useContext)(st),n=(0,i.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],o=n[1];return(0,i.useEffect)((function(){e||null!==t&&o(t.current)}),[t,o,e]),r}var rt=i.Fragment;function it(e){var t=e,n=nt(),r=(0,i.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],o=ce();return ae((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),o&&n&&r?(0,tt.createPortal)(re({props:t,defaultTag:rt,name:"Portal"}),r):null}var ot=i.Fragment,st=(0,i.createContext)(null);it.Group=function(e){var t=e.target,n=Q(e,["target"]);return o().createElement(st.Provider,{value:t},re({props:n,defaultTag:ot,name:"Popover.Group"}))};var at=(0,i.createContext)(null);function lt(){var e=(0,i.useContext)(at);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,lt),t}return e}var ct,ut,dt,ft,pt=(0,i.createContext)((function(){}));function ht(e){var t=e.children,n=e.onUpdate,r=e.type,s=e.element,a=(0,i.useContext)(pt),l=(0,i.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),a.apply(void 0,t)}),[a,n]);return ae((function(){return l(ct.Add,r,s),function(){return l(ct.Remove,r,s)}}),[l,r,s]),o().createElement(pt.Provider,{value:l},t)}pt.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(ct||(ct={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(dt||(dt={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(ft||(ft={}));var mt=((ut={})[ft.SetTitleId]=function(e,t){return e.titleId===t.id?e:X({},e,{titleId:t.id})},ut),xt=(0,i.createContext)(null);function yt(e){var t=(0,i.useContext)(xt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+jt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,yt),n}return t}function vt(e,t){return ne(t.type,mt,e,t)}xt.displayName="DialogContext";var gt=Z.RenderStrategy|Z.Static,bt=oe((function(e,t){var n,r=e.open,s=e.onClose,a=e.initialFocus,l=Q(e,["open","onClose","initialFocus"]),c=(0,i.useState)(0),u=c[0],d=c[1],f=ye();void 0===r&&null!==f&&(r=ne(f,((n={})[he.Open]=!0,n[he.Closed]=!1,n)));var p=(0,i.useRef)(new Set),h=(0,i.useRef)(null),m=Fe(h,t),x=e.hasOwnProperty("open")||null!==f,y=e.hasOwnProperty("onClose");if(!x&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof s)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+s);var v=r?dt.Open:dt.Closed,g=null!==f?f===he.Open:v===dt.Open,b=(0,i.useReducer)(vt,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,i.useCallback)((function(){return s(!1)}),[s]),S=(0,i.useCallback)((function(e){return j({type:ft.SetTitleId,id:e})}),[j]),O=ce()&&v===dt.Open,_=u>1,C=null!==(0,i.useContext)(xt);Ze(h,O?ne(_?"parent":"leaf",{parent:He.RestoreFocus,leaf:He.All}):He.None,{initialFocus:a,containers:p}),function(e,t){void 0===t&&(t=!0),ae((function(){if(t&&e.current){var n=e.current;Ge.add(n);for(var r,i=te(Ke.keys());!(r=i()).done;){var o=r.value;o.contains(n)&&(Xe(o),Ke.delete(o))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=te(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===Ge.size&&(Ke.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ye(e))}})),function(){if(Ge.delete(n),Ge.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!Ke.has(e)){for(var t,n=te(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}Ke.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ye(e)}}));else for(var e,t=te(Ke.keys());!(e=t()).done;){var r=e.value;Xe(r),Ke.delete(r)}}}}),[t])}(h,!!_&&O),Be("mousedown",(function(e){var t,n=e.target;v===dt.Open&&(_||(null==(t=h.current)?void 0:t.contains(n))||k())})),Be("keydown",(function(e){e.key===Me.Escape&&v===dt.Open&&(_||(e.preventDefault(),e.stopPropagation(),k()))})),(0,i.useEffect)((function(){if(v===dt.Open&&!C){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[v,C]),(0,i.useEffect)((function(){if(v===dt.Open&&h.current){var e=new IntersectionObserver((function(e){for(var t,n=te(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(h.current),function(){return e.disconnect()}}}),[v,h,k]);var E=function(){var e=(0,i.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=(0,i.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return o().createElement(at.Provider,{value:r},e.children)}}),[n])]}(),N=E[0],A=E[1],P="headlessui-dialog-"+fe(),T=(0,i.useMemo)((function(){return[{dialogState:v,close:k,setTitleId:S},w]}),[v,w,k,S]),M=(0,i.useMemo)((function(){return{open:v===dt.Open}}),[v]),I={ref:m,id:P,role:"dialog","aria-modal":v===dt.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":N,onClick:function(e){e.stopPropagation()}},L=l;return o().createElement(ht,{type:"Dialog",element:h,onUpdate:(0,i.useCallback)((function(e,t,n){var r;"Dialog"===t&&ne(e,((r={})[ct.Add]=function(){p.current.add(n),d((function(e){return e+1}))},r[ct.Remove]=function(){p.current.add(n),d((function(e){return e-1}))},r))}),[])},o().createElement(et,{force:!0},o().createElement(it,null,o().createElement(xt.Provider,{value:T},o().createElement(it.Group,{target:h},o().createElement(et,{force:!1},o().createElement(A,{slot:M,name:"Dialog.Description"},re({props:X({},L,I),slot:M,defaultTag:"div",features:gt,visible:g,name:"Dialog"}))))))))})),wt=oe((function e(t,n){var r=yt([jt.displayName,e.name].join("."))[0],o=r.dialogState,s=r.close,a=Fe(n),l="headlessui-dialog-overlay-"+fe(),c=(0,i.useCallback)((function(e){if(De(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}),[s]),u=(0,i.useMemo)((function(){return{open:o===dt.Open}}),[o]);return re({props:X({},t,{ref:a,id:l,"aria-hidden":!0,onClick:c}),slot:u,defaultTag:"div",name:"Dialog.Overlay"})}));var jt=Object.assign(bt,{Overlay:wt,Title:function e(t){var n=yt([jt.displayName,e.name].join("."))[0],r=n.dialogState,o=n.setTitleId,s="headlessui-dialog-title-"+fe();(0,i.useEffect)((function(){return o(s),function(){return o(null)}}),[s,o]);var a=(0,i.useMemo)((function(){return{open:r===dt.Open}}),[r]);return re({props:X({},t,{id:s}),slot:a,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=lt(),n="headlessui-description-"+fe();ae((function(){return t.register(n)}),[n,t.register]);var r=e,i=X({},t.props,{id:n});return re({props:X({},r,i),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const kt=wp.components;var St=n(42),Ot=n.n(St);const _t=lodash;var Ct=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";B.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function Et(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Nt(e){switch(e){case"tax_categories":return"Site Type";case"tax_pattern_types":return"Content"}return e.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}))}var At=n(246);function Pt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mt(e){var t=Pt(e.taxonomy,2),n=t[0],r=t[1],i=K((function(e){return e.updateTaxonomies})),o=K((function(e){return e.searchParams})),s=V((function(e){return e.openedTaxonomies})),a=V((function(e){return e.toggleOpenedTaxonomy})),l=function(e){return(null==o?void 0:o.taxonomies[n])===e.term},c=Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(o.type)})).length;return Object.keys(r).length&&c?(0,At.jsx)(kt.PanelBody,{title:Nt(n),initialOpen:s.includes(n)||"tax_pattern_types"===n||"tax_page_types"===n,onToggle:function(e){return a(n,e)},children:(0,At.jsx)(kt.PanelRow,{children:(0,At.jsx)("div",{className:"overflow-hidden w-full relative",children:(0,At.jsx)("ul",{className:"p-1 m-0 w-full",children:Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(o.type)})).map((function(e){return(0,At.jsx)("li",{className:"m-0 w-full",children:(0,At.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){return i((t={},r=n,o=e.term,r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t));var t,r,o},children:(0,At.jsx)("span",{className:Ot()({"text-wp-theme-500":l(e)}),children:e.term})})},e.term)}))})})})}):null}const It=wp.i18n;function Lt(e){return Array.isArray?Array.isArray(e):"[object Array]"===Vt(e)}function Rt(e){return"string"==typeof e}function Ft(e){return"number"==typeof e}function Dt(e){return!0===e||!1===e||function(e){return Bt(e)&&null!==e}(e)&&"[object Boolean]"==Vt(e)}function Bt(e){return"object"==typeof e}function Ut(e){return null!=e}function qt(e){return!e.trim().length}function Vt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zt=Object.prototype.hasOwnProperty;class Ht{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=$t(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function $t(e){let t=null,n=null,r=null,i=1;if(Rt(e)||Lt(e))r=e,t=Wt(e),n=Jt(e);else{if(!zt.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const o=e.name;if(r=o,zt.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(o));t=Wt(o),n=Jt(o)}return{path:t,id:n,weight:i,src:r}}function Wt(e){return Lt(e)?e:e.split(".")}function Jt(e){return Lt(e)?e.join("."):e}var Zt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,o)=>{if(Ut(e))if(t[o]){const s=e[t[o]];if(!Ut(s))return;if(o===t.length-1&&(Rt(s)||Ft(s)||Dt(s)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s));else if(Lt(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1)}else t.length&&i(s,t,o+1)}else n.push(e)};return i(e,Rt(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}};const Gt=/[^ ]+/g;class Kt{constructor({getFn:e=Zt.getFn}={}){this.norm=function(e=3){const t=new Map,n=Math.pow(10,e);return{get(e){const r=e.match(Gt).length;if(t.has(r))return t.get(r);const i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Rt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();Rt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Ut(e)||qt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let i=this.getFn(e,t.path);if(Ut(i))if(Lt(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(Ut(r))if(Rt(r)&&!qt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else Lt(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(!qt(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Yt(e,t,{getFn:n=Zt.getFn}={}){const r=new Kt({getFn:n});return r.setKeys(e.map($t)),r.setSources(t),r.create(),r}function Xt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=Zt.distance,ignoreLocation:o=Zt.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(r-n);return i?s+a/i:a?1:s}const Qt=32;function en(e,t,n,{location:r=Zt.location,distance:i=Zt.distance,threshold:o=Zt.threshold,findAllMatches:s=Zt.findAllMatches,minMatchCharLength:a=Zt.minMatchCharLength,includeMatches:l=Zt.includeMatches,ignoreLocation:c=Zt.ignoreLocation}={}){if(t.length>Qt)throw new Error(`Pattern length exceeds max of ${Qt}.`);const u=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let p=o,h=f;const m=a>1||l,x=m?Array(d):[];let y;for(;(y=e.indexOf(t,h))>-1;){let e=Xt(t,{currentLocation:y,expectedLocation:f,distance:i,ignoreLocation:c});if(p=Math.min(e,p),h=y+u,m){let e=0;for(;e<u;)x[y+e]=1,e+=1}}h=-1;let v=[],g=1,b=u+d;const w=1<<u-1;for(let r=0;r<u;r+=1){let o=0,a=b;for(;o<a;){Xt(t,{errors:r,currentLocation:f+a,expectedLocation:f,distance:i,ignoreLocation:c})<=p?o=a:b=a,a=Math.floor((b-o)/2+o)}b=a;let l=Math.max(1,f-a+1),y=s?d:Math.min(f+a,d)+u,j=Array(y+2);j[y+1]=(1<<r)-1;for(let o=y;o>=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(m&&(x[s]=+!!a),j[o]=(j[o+1]<<1|1)&a,r&&(j[o]|=(v[o+1]|v[o])<<1|1|v[o+1]),j[o]&w&&(g=Xt(t,{errors:r,currentLocation:s,expectedLocation:f,distance:i,ignoreLocation:c}),g<=p)){if(p=g,h=s,h<=f)break;l=Math.max(1,2*f-h)}}if(Xt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>p)break;v=j}const j={isMatch:h>=0,score:Math.max(.001,g)};if(m){const e=function(e=[],t=Zt.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let s=e.length;o<s;o+=1){let s=e[o];s&&-1===r?r=o:s||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(x,a);e.length?l&&(j.indices=e):j.isMatch=!1}return j}function tn(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class nn{constructor(e,{location:t=Zt.location,threshold:n=Zt.threshold,distance:r=Zt.distance,includeMatches:i=Zt.includeMatches,findAllMatches:o=Zt.findAllMatches,minMatchCharLength:s=Zt.minMatchCharLength,isCaseSensitive:a=Zt.isCaseSensitive,ignoreLocation:l=Zt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:tn(e),startIndex:t})},u=this.pattern.length;if(u>Qt){let e=0;const t=u%Qt,n=u-t;for(;e<n;)c(this.pattern.substr(e,Qt),e),e+=Qt;if(t){const e=u-Qt;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:f,startIndex:p})=>{const{isMatch:h,score:m,indices:x}=en(e,t,f,{location:r+p,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});h&&(d=!0),u+=m,h&&x&&(c=[...c,...x])}));let f={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(f.indices=c),f}}class rn{constructor(e){this.pattern=e}static isMultiMatch(e){return on(e,this.multiRegex)}static isSingleMatch(e){return on(e,this.singleRegex)}search(){}}function on(e,t){const n=e.match(t);return n?n[1]:null}class sn extends rn{constructor(e,{location:t=Zt.location,threshold:n=Zt.threshold,distance:r=Zt.distance,includeMatches:i=Zt.includeMatches,findAllMatches:o=Zt.findAllMatches,minMatchCharLength:s=Zt.minMatchCharLength,isCaseSensitive:a=Zt.isCaseSensitive,ignoreLocation:l=Zt.ignoreLocation}={}){super(e),this._bitapSearch=new nn(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class an extends rn{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const ln=[class extends rn{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},an,class extends rn{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},sn],cn=ln.length,un=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const dn=new Set([sn.type,an.type]);class fn{constructor(e,{isCaseSensitive:t=Zt.isCaseSensitive,includeMatches:n=Zt.includeMatches,minMatchCharLength:r=Zt.minMatchCharLength,ignoreLocation:i=Zt.ignoreLocation,findAllMatches:o=Zt.findAllMatches,location:s=Zt.location,threshold:a=Zt.threshold,distance:l=Zt.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(un).filter((e=>e&&!!e.trim())),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,s=-1;for(;!o&&++s<cn;){const e=ln[s];let n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),o=!0)}if(!o)for(s=-1;++s<cn;){const e=ln[s];let n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let i=0,o=[],s=0;for(let r=0,a=t.length;r<a;r+=1){const a=t[r];o.length=0,i=0;for(let t=0,r=a.length;t<r;t+=1){const r=a[t],{isMatch:l,indices:c,score:u}=r.search(e);if(!l){s=0,i=0,o.length=0;break}if(i+=1,s+=u,n){const e=r.constructor.type;dn.has(e)?o=[...o,...c]:o.push(c)}}if(i){let e={isMatch:!0,score:s/i};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const pn=[];function hn(e,t){for(let n=0,r=pn.length;n<r;n+=1){let r=pn[n];if(r.condition(e,t))return new r(e,t)}return new nn(e,t)}const mn="$and",xn="$or",yn="$path",vn="$val",gn=e=>!(!e[mn]&&!e[xn]),bn=e=>({[mn]:Object.keys(e).map((t=>({[t]:e[t]})))});function wn(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const o=(e=>!!e[yn])(e);if(!o&&i.length>1&&!gn(e))return r(bn(e));if((e=>!Lt(e)&&Bt(e)&&!gn(e))(e)){const r=o?e[yn]:i[0],s=o?e[vn]:e[r];if(!Rt(s))throw new Error((e=>`Invalid value for key ${e}`)(r));const a={keyId:Jt(r),pattern:s};return n&&(a.searcher=hn(s,t)),a}let s={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];Lt(n)&&n.forEach((e=>{s.children.push(r(e))}))})),s};return gn(e)||(e=bn(e)),r(e)}function jn(e,t){const n=e.matches;t.matches=[],Ut(n)&&n.forEach((e=>{if(!Ut(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function kn(e,t){t.score=e.score}class Sn{constructor(e,t={},n){this.options={...Zt,...t},this.options.useExtendedSearch,this._keyStore=new Ht(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Kt))throw new Error("Incorrect 'index' type");this._myIndex=t||Yt(this.options.keys,this._docs,{getFn:this.options.getFn})}add(e){Ut(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:o,ignoreFieldNorm:s}=this.options;let a=Rt(e)?Rt(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=Zt.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))})),e.score=n}))}(a,{ignoreFieldNorm:s}),i&&a.sort(o),Ft(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=Zt.includeMatches,includeScore:r=Zt.includeScore}={}){const i=[];return n&&i.push(jn),r&&i.push(kn),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,r)})),r}))}(a,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=hn(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:i})=>{if(!Ut(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:s,value:e,norm:i,indices:a}]})})),r}_searchLogical(e){const t=wn(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}switch(e.operator){case mn:{const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(!a.length)return[];i.push(...a)}return i}case xn:{const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(a.length){i.push(...a);break}}return i}}},r=this._myIndex.records,i={},o=[];return r.forEach((({$:e,i:r})=>{if(Ut(e)){let s=n(t,e,r);s.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},o.push(i[r])),s.forEach((({matches:e})=>{i[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=hn(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:e,i:r})=>{if(!Ut(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&i.push({idx:r,item:e,matches:o})})),i}_findMatches({key:e,value:t,searcher:n}){if(!Ut(t))return[];let r=[];if(Lt(t))t.forEach((({v:t,i,n:o})=>{if(!Ut(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&r.push({score:a,key:e,value:t,idx:i,norm:o,indices:l})}));else{const{v:i,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(i);s&&r.push({score:a,key:e,value:i,norm:o,indices:l})}return r}}Sn.version="6.4.6",Sn.createIndex=Yt,Sn.parseIndex=function(e,{getFn:t=Zt.getFn}={}){const{keys:n,records:r}=e,i=new Kt({getFn:t});return i.setKeys(n),i.setIndexRecords(r),i},Sn.config=Zt,Sn.parseQuery=wn,function(...e){pn.push(...e)}(fn);const On=Sn;function _n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var En=new Map;function Nn(e){var t=e.value,n=e.setValue,i=e.terms,o=B((function(e){return e.preferredOptionsHistory})),s=K((function(e){return e.searchParams})),a=_n((0,r.useState)(!1),2),l=a[0],c=a[1],u=(0,r.useRef)(),d=_n((0,r.useState)({}),2),f=d[0],p=d[1],h=_n((0,r.useState)(""),2),m=h[0],x=h[1],y=_n((0,r.useState)([]),2),v=y[0],g=y[1],b=(0,r.useMemo)((function(){return Object.values(i.filter((function(e){return null==e?void 0:e.featured})).sort((function(e,t){return e.term<t.term?-1:e.term>t.term?1:0})))}),[i]),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(En.has(e))g(En.get(e));else{var t=f.search(e);En.set(e,null!=t&&t.length?t.map((function(e){return e.item})):b),g(En.get(e))}},j="Unknown"===t||!t.length;(0,r.useEffect)((function(){p(new On(i,{keys:["term","parent","keywords"],minMatchCharLength:2,threshold:.3}))}),[i]),(0,r.useEffect)((function(){m.length||g(b)}),[b,m]),(0,r.useEffect)((function(){l&&u.current.focus()}),[l]);var k,S,O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,It.__)("Suggestions","extendify-sdk");return e===b&&(t=(0,It.__)("Examples","extendify-sdk")),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("h4",{className:"mt-4 mb-2 text-left uppercase text-xs text-gray-700",children:t}),(0,At.jsx)("ul",{className:"m-0",children:e.map((function(e){var t;Object.prototype.hasOwnProperty.call(e,"term")&&(e=e.term);var r=(null==s||null===(t=s.taxonomies)||void 0===t?void 0:t.tax_categories)===e;return(0,At.jsx)("li",{className:"m-0 mb-1",children:(0,At.jsx)("button",{type:"button",className:Ot()("w-full text-left text-sm bg-transparent hover:text-wp-theme-500 m-0 pl-0 cursor-pointer",{"text-gray-800":!r}),onClick:function(){c(!1),n(e)},children:e})},e)}))})]})};return(0,At.jsxs)("div",{className:"w-full bg-gray-100 rounded",children:[(0,At.jsx)("button",{type:"button",onClick:function(){return c((function(e){return!e}))},className:"flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded",children:(S=l?(0,It.__)("What kind of site is this?","extendify-sdk"):t,(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("span",{className:"flex flex-col text-left",children:[(0,At.jsx)("span",{className:"text-sm mb-1",children:(0,It.__)("Site Type","extendify-sdk")}),(0,At.jsx)("span",{className:"font-light text-xs",children:S})]}),(0,At.jsxs)("span",{className:"flex items-center space-x-4",children:[j&&!l&&(0,At.jsxs)("svg",{className:"text-wp-alert-red","aria-hidden":"true",focusable:"false",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{className:"stroke-current",d:"M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z",strokeWidth:"1.25"}),(0,At.jsx)("path",{className:"fill-current",d:"M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"}),(0,At.jsx)("path",{className:"fill-current",d:"M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"})]}),(0,At.jsx)("svg",{className:Ot()("text-gray-700 stroke-current",{"transform rotate-90 -translate-x-1":l}),"aria-hidden":"true",focusable:"false",width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215",strokeWidth:"1.5"})})]})]}))}),l&&(0,At.jsxs)("div",{className:"p-4 pt-0",children:[(0,At.jsxs)("div",{className:"relative my-2",children:[(0,At.jsx)("label",{htmlFor:"site-type-search",className:"sr-only",children:(0,It.__)("Search","extendify-sdk")}),(0,At.jsx)("input",{ref:u,id:"site-type-search",value:m||"",onChange:function(e){return t=e.target.value,x(t),void w(t);var t},type:"text",className:"button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full",placeholder:(0,It.__)("Search","extendify-sdk")}),(0,At.jsx)("svg",{className:"absolute top-2 right-2 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,At.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),m.length>1&&v===b&&(0,At.jsx)("p",{className:"text-left",children:(0,It.__)("Nothing found...","extendify-sdk")}),v===b&&(null==o||null===(k=o.siteType)||void 0===k?void 0:k.length)>0&&(0,At.jsx)("div",{className:"mb-8",children:O(null==o?void 0:o.siteType,(0,It.__)("Recent","extendify-sdk"))}),v&&(0,At.jsx)("div",{children:O(v)}),j||(0,At.jsx)("button",{type:"button",className:"mt-4 w-full text-left text-sm bg-transparent hover:text-wp-theme-500 pl-0 cursor-pointer text-wp-theme-500",onClick:function(){c(!1),n("Unknown")},children:(0,It.__)("Reset","extendify-sdk")})]})]})}function An(){var e,t,n,r=V((function(e){return e.taxonomies})),i=K((function(e){return e.searchParams})),o=B((function(e){return e.updateSiteType})),s=K((function(e){return e.updateTaxonomies}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"mt-px bg-white mb-8 mx-6 pt-6 lg:mx-0 lg:pt-0",children:Object.keys(null!==(e=null==r?void 0:r.tax_categories)&&void 0!==e?e:{}).length>0&&(0,At.jsx)(Nn,{value:null!==(t=null==i||null===(n=i.taxonomies)||void 0===n?void 0:n.tax_categories)&&void 0!==t?t:"",setValue:function(e){o(e),s({tax_categories:e})},terms:r.tax_categories})}),(0,At.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,At.jsx)(kt.Panel,{children:Object.entries(r).map((function(e){return"tax_categories"===e[0]?null:(0,At.jsx)(Mt,{taxonomy:e},e[0])}))})})]})}function Pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Rn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Ln(o,r,i,s,a,"next",e)}function a(e){Ln(o,r,i,s,a,"throw",e)}s(void 0)}))}}var Fn=0,Dn=function(e){var t=arguments;return Rn(w().mark((function n(){var r,i,o,s,a;return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=t.length>1&&void 0!==t[1]?t[1]:{},Fn++,n.next=4,k.post("templates",{filterByFormula:zn(e),pageSize:null!==(r=null==s?void 0:s.pageSize)&&void 0!==r?r:v,categories:e.taxonomies,search:e.search,type:e.type,offset:null!==(i=s.offset)&&void 0!==i?i:"",initial:1===Fn,request_count:Fn,sdk_partner:null!==(o=B.getState().sdkPartner)&&void 0!==o?o:""});case 4:return a=n.sent,n.abrupt("return",a);case 6:case"end":return n.stop()}}),n)})))()},Bn=function(e,t,n){var r,i,o,s;return k.post("related",{pageSize:4,query_type:t,wanted_type:n,categories:null==e||null===(r=e.fields)||void 0===r?void 0:r.tax_categories,pattern_types:null==e||null===(i=e.fields)||void 0===i?void 0:i.tax_pattern_types,style:null==e||null===(o=e.fields)||void 0===o?void 0:o.tax_style,type:null==e||null===(s=e.fields)||void 0===s?void 0:s.type,template_id:null==e?void 0:e.id})},Un=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},qn=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,single:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Vn=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,imported:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},zn=function(e){var t,n=e.taxonomies,r=e.type;n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(n),!0).forEach((function(t){In(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);var i=[];"Unknown"===(null===(t=n)||void 0===t?void 0:t.tax_categories)&&(n.tax_categories="Default");var o=Object.entries(n).filter((function(e){var t=Pn(e,2),n=t[0],i=t[1];return $n(n,i,r)})).filter((function(e){var t=Pn(e,1)[0];return Boolean(t[1].length)})).map((function(e){var t=Pn(e,2),n=t[0],r=t[1];return"".concat(n,' = "').concat(r,'"')})).join(", ");return o.length&&i.push(o),r.length&&i.push('{type}="'.concat(r,'"')),i.length?"AND(".concat(i.join(", "),")").replace(/\r?\n|\r/g,""):""},Hn=new Map,$n=function(e,t,n){var r,i,o,s,a="".concat(e,"-").concat(t,"-").concat(n);if("tax_categories-Default-pattern"===a)return!0;Hn.has(a)||Hn.set(a,null===(r=V.getState())||void 0===r||null===(i=r.taxonomies[e])||void 0===i||null===(o=i.find((function(e){return(null==e?void 0:e.term)===t})))||void 0===o||null===(s=o.type)||void 0===s?void 0:s.includes(n));return Hn.get(a)};function Wn(){return Wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wn.apply(this,arguments)}var Jn=new Map,Zn=new WeakMap,Gn=0;function Kn(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Zn.has(n)||(Gn+=1,Zn.set(n,Gn.toString())),Zn.get(n)):"0":e[t]);var n})).toString()}function Yn(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=Kn(e),n=Jn.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},Jn.set(t,n)}return n}(n),i=r.id,o=r.observer,s=r.elements,a=s.get(e)||[];return s.has(e)||s.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(s.delete(e),o.unobserve(e)),0===s.size&&(o.disconnect(),Jn.delete(i))}}function Xn(e){return"function"!=typeof e.children}var Qn=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),Xn(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=Yn(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!Xn(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,o=r.children,s=r.as,a=r.tag,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,i.createElement)(s||a||"div",Wn({ref:this.handleNode},l),o)},r}(i.Component);function er(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,l=t.triggerOnce,c=t.skip,u=t.initialInView,d=(0,i.useRef)(),f=(0,i.useState)({inView:!!u}),p=f[0],h=f[1],m=(0,i.useCallback)((function(e){void 0!==d.current&&(d.current(),d.current=void 0),c||e&&(d.current=Yn(e,(function(e,t){h({inView:e,entry:t}),t.isIntersecting&&l&&d.current&&(d.current(),d.current=void 0)}),{root:a,rootMargin:s,threshold:n,trackVisibility:o,delay:r}))}),[Array.isArray(n)?n.toString():n,a,s,l,c,o,r]);(0,i.useEffect)((function(){d.current||!p.entry||l||c||h({inView:!!u})}));var x=[m,p.inView,p.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}Qn.displayName="InView",Qn.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function tr(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}})),e}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ir=function(){return(0,At.jsx)("div",{className:"aspect-w-1 aspect-h-1",children:(0,At.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,At.jsx)(kt.Spinner,{})})})};function or(e){var t=e.template,n=e.imageLoaded,i=e.setActiveTemplate,o=nr((0,r.useState)(!1),2),s=o[0],a=o[1],l=(0,r.useRef)(),c=tr();return(0,r.useEffect)((function(){var e,r,i,o,u,d,f;if(!s&&c.current){var p=new Image;p.role="button",p.className="max-w-full block m-auto object-cover",p.onload=function(){c.current&&(a(!0),l.current&&!l.current.querySelector("img")&&(l.current.appendChild(p),n(t.id)))},p.src=null!==(e=null==t||null===(r=t.fields)||void 0===r||null===(i=r.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(u=o.large)||void 0===u?void 0:u.url)&&void 0!==e?e:null==t||null===(d=t.fields)||void 0===d||null===(f=d.screenshot[0])||void 0===f?void 0:f.url}}),[t,n,s,c]),s?(0,At.jsx)("button",{type:"button",className:"flex mb-10 justify-items-center flex-grow h-80 border-gray-200 bg-white border focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden",onClick:i,ref:l}):(0,At.jsx)(ir,{})}function sr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ar(){return ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ar.apply(this,arguments)}function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){ur(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dr={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class fr extends o().Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame((()=>{this.reCalculateColumnCount()}))):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let i in t){const o=parseInt(i);o>0&&e<=o&&o<n&&(n=o,r=t[i])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=o().Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const i=r%e;t[i]||(t[i]=[]),t[i].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),i=100/r.length+"%";let s=n;s&&"string"!=typeof s&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===s&&(s="my-masonry-grid_column"));const a=cr(cr(cr({},e),t),{},{style:cr(cr({},t.style),{},{width:i}),className:s});return r.map(((e,t)=>o().createElement("div",ar({},a,{key:t}),e)))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:r,columnAttrs:i,column:s,className:a}=e,l=sr(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let c=a;return"string"!=typeof a&&(this.logDeprecated('The property "className" requires a string'),void 0===a&&(c="my-masonry-grid")),o().createElement("div",ar({},l,{className:c}),this.renderColumns())}}fr.defaultProps=dr;const pr=fr;var hr=function(){return k.get("plugins")},mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),k.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},xr=function(){return k.get("active-plugins")};function yr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function vr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){yr(o,r,i,s,a,"next",e)}function a(e){yr(o,r,i,s,a,"throw",e)}s(void 0)}))}}var gr=[],br=[];function wr(e){return jr.apply(this,arguments)}function jr(){return(jr=vr(w().mark((function e(t){var n,r,i,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(gr.length){e.next=10;break}return e.t0=Object,e.next=8,hr();case 8:e.t1=e.sent,gr=e.t0.keys.call(e.t0,e.t1);case 10:return o=!!i.length&&i.filter((function(e){return!gr.some((function(t){return t.includes(e)}))})),e.abrupt("return",o.length);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kr(e){return Sr.apply(this,arguments)}function Sr(){return(Sr=vr(w().mark((function e(t){var n,r,i,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(br.length){e.next=10;break}return e.t0=Object,e.next=8,xr();case 8:e.t1=e.sent,br=e.t0.values.call(e.t0,e.t1);case 10:if(!(o=!!i.length&&i.filter((function(e){return!br.some((function(t){return t.includes(e)}))})))){e.next=16;break}return e.next=14,wr(t);case 14:if(!e.sent){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",o.length);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Or=l(x((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function _r(e){var t=e.msg;return(0,At.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,It.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,It.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,At.jsx)("br",{}),(0,At.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Lr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Go back","extendify-sdk")})]})}const Cr=wp.data;function Er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ar(){var e=Er((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,Cr.select)("core/editor").isEditedPostDirty)()?(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:(0,It.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,It.__)("Reload page","extendify-sdk")}),(0,At.jsx)(kt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Cr.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,It.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}function Pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mr(){var e,t=Pr((0,r.useState)(""),2),n=t[0],i=t[1],o=Or((function(e){return e.wantedTemplate})),s=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return mr(s).then((function(){Or.setState({importOnLoad:!0}),(0,r.render)((0,At.jsx)(Ar,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,At.jsx)(_r,{msg:n}):(0,At.jsx)(kt.Modal,{title:(0,It.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,It.__)("Installing...","extendify-sdk")})})}function Ir(){var e,t,n,i=Or((function(e){return e.wantedTemplate})),o=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:(0,It.sprintf)((0,It.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==i||null===(n=i.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,At.jsx)("ul",{children:o.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,It.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,It.__)("Return to library","extendify-sdk")})]})}function Lr(e){var t,n,i,o,s,a,l,c,u=Or((function(e){return e.wantedTemplate})),d=(null==u||null===(t=u.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=B.getState())&&void 0!==n&&n.canInstallPlugins?(0,At.jsxs)(kt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,It.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,It.__)((0,It.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(s=null==u||null===(a=u.fields)||void 0===a?void 0:a.type)&&void 0!==s?s:"template"),"extendify-sdk")}),(null===(l=e.message)||void 0===l?void 0:l.length)>0||(0,At.jsx)("ul",{children:d.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Mr,{}),document.getElementById("extendify-root"))},children:null!==(c=e.buttonLabel)&&void 0!==c?c:(0,It.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,At.jsx)(Ir,{})}function Rr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}var Fr=function(){var e,t=(e=w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wr(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,At.jsx)(Lr,{}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Rr(o,r,i,s,a,"next",e)}function a(e){Rr(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Dr(e){var t=e.msg;return(0,At.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,It.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,It.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,At.jsx)("br",{}),(0,At.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,At.jsx)(Hr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Go back","extendify-sdk")})]})}function Br(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ur(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Br(o,r,i,s,a,"next",e)}function a(e){Br(o,r,i,s,a,"throw",e)}s(void 0)}))}}function qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zr(){var e,t=qr((0,r.useState)(""),2),n=t[0],i=t[1],o=Or((function(e){return e.wantedTemplate})),s=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return mr(s).then((function(){Or.setState({importOnLoad:!0})})).then(Ur(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,At.jsx)(Ar,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;i(t.data.message)})),n?(0,At.jsx)(Dr,{msg:n}):(0,At.jsx)(kt.Modal,{title:(0,It.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,It.__)("Activating...","extendify-sdk")})})}function Hr(e){var t,n,i,o,s,a=Or((function(e){return e.wantedTemplate})),l=(null==a||null===(t=a.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=B.getState())&&void 0!==n&&n.canActivatePlugins?(0,At.jsx)(kt.Modal,{title:(0,It.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsxs)("div",{children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,It.__)((0,It.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==a||null===(s=a.fields)||void 0===s?void 0:s.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,At.jsx)("ul",{children:l.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(zr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,At.jsx)(Ir,{})}function $r(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}var Wr=function(){var e,t=(e=w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kr(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,At.jsx)(Hr,{showClose:!0}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){$r(o,r,i,s,a,"next",e)}function a(e){$r(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Jr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kr(e){var t=e.finished,n=Zr((0,r.useState)(""),2),i=n[0],o=n[1],s=(0,r.useRef)(),a=function(){var e,n=(e=w().mark((function e(n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,E(i);case 3:B.setState({registration:{email:i}}),t();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Jr(o,r,i,s,a,"next",e)}function a(e){Jr(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,At.jsxs)(kt.Modal,{className:"extendify-sdk",title:(0,It.__)("One last step...","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{className:"m-0 mb-4 max-w-md",children:(0,It.__)("Register now to receive updates and special offers from Extendify","extendify-sdk")}),(0,At.jsxs)("form",{onSubmit:a,className:"flex space-x-4 mb-8",children:[(0,At.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,At.jsx)("input",{id:"extendify-email-register",required:!0,onChange:function(e){return o(e.target.value)},type:"text",className:"extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2",placeholder:(0,It.__)("Email","extendify-sdk")}),(0,At.jsx)("label",{htmlFor:"extendify-email-register",className:"-top-3 bg-white absolute left-1 px-1 transition-all",children:(0,It.__)("Email","extendify-sdk")})]}),(0,At.jsx)("input",{type:"submit",className:"hidden"})]}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{ref:s,isPrimary:!0,onClick:a,children:(0,It.__)("Submit and import","extendify-sdk")}),(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:t,style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("Skip and import","extendify-sdk")})]})]})}function Yr(){var e;return{id:"NeedsRegistrationModal",pass:Boolean((null===(e=B.getState().registration)||void 0===e?void 0:e.email)||B.getState().apiKey),allow:function(){},deny:function(){return new Promise((function(e){(0,r.render)((0,At.jsx)(Kr,{finished:e}),document.getElementById("extendify-root"))}))}}}function Xr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ei(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function ti(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ei(o,r,i,s,a,"next",e)}function a(e){ei(o,r,i,s,a,"throw",e)}s(void 0)}))}}function ni(e){return function(){return new ri(e.apply(this,arguments))}}function ri(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,a=s instanceof ii;Promise.resolve(a?s.wrapped:s).then((function(e){a?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function ii(e){this.wrapped=e}ri.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},ri.prototype.next=function(e){return this._invoke("next",e)},ri.prototype.throw=function(e){return this._invoke("throw",e)},ri.prototype.return=function(e){return this._invoke("return",e)};var oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:Fr,hasPluginsActivated:Wr,NeedsRegistrationModal:Yr,stack:[],check:function(t){var n=this;return ti(w().mark((function r(){var i,o,s,a;return w().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Xr(e),r.prev=1,i.s();case 3:if((o=i.n()).done){r.next=11;break}return s=o.value,r.next=7,n["".concat(s)](t);case 7:a=r.sent,n.stack.push(a.pass?a.allow:a.deny);case 9:r.next=3;break;case 11:r.next=16;break;case 13:r.prev=13,r.t0=r.catch(1),i.e(r.t0);case 16:return r.prev=16,i.f(),r.finish(16);case 19:case"end":return r.stop()}}),r,null,[[1,13,16,19]])})))()},reset:function(){this.stack=[]}}};function si(e){return ai.apply(this,arguments)}function ai(){return(ai=ti(w().mark((function e(t){var n;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=li(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function li(e){return ci.apply(this,arguments)}function ci(){return(ci=ni(w().mark((function e(t){var n,r,i;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Xr(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function ui(e,t){return(0,(0,Cr.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}const di=wp.blockEditor;var fi=["tagName","children"];function pi(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hi(e){var t=e.tagName,n=void 0===t?"button":t,i=e.children,o=pi(e,fi);return o.className=Ot()(o.className,"bg-extendify-main hover:bg-extendify-main-dark py-3 pl-5 pr-3 w-60 rounded no-underline text-base text-white flex justify-center items-center space-x-2"),(0,r.createElement)(n,o,i)}const mi=function({icon:e,size:t=24,...n}){return(0,r.cloneElement)(e,{width:t,height:t,...n})},xi=e=>(0,r.createElement)("circle",e),yi=e=>(0,r.createElement)("g",e),vi=e=>(0,r.createElement)("path",e),gi=e=>(0,r.createElement)("rect",e),bi=({className:e,isPressed:t,...n})=>{const i={...n,className:Ot()(e,{"is-pressed":t})||void 0,role:"img","aria-hidden":!0,focusable:!1};return(0,r.createElement)("svg",i)},wi=(0,r.createElement)(bi,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(vi,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function ji(e){var t=e.onRequestClose,n=e.isOpen,i=e.left,o=e.right;return(0,At.jsx)(Re.Root,{show:!0,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,open:n,className:"extendify-sdk",onClose:t,children:(0,At.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsx)("div",{className:"m-auto",children:(0,At.jsxs)("div",{className:"relative m-8 md:m-0 max-w-md rounded-sm md:flex bg-gray-100 items-center justify-center md:max-w-2xl",children:[(0,At.jsxs)("button",{onClick:t,className:"absolute block p-4 top-0 right-0 rounded-md cursor-pointer text-gray-700 opacity-30 hover:opacity-100",children:[(0,At.jsx)("span",{className:"sr-only",children:(0,It.__)("Close","extendify-sdk")}),(0,At.jsx)(mi,{icon:wi})]}),(0,At.jsx)("div",{className:"rounded-md md:rounded-l-md md:rounded-tr-none bg-white p-12 text-center md:w-7/12 items-center",children:i}),(0,At.jsx)("div",{className:"justify-center md:justify-none md:w-6/12 p-10 text-black hidden md:block ",children:o})]})})})]})})})}function ki(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Si(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Oi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _i=(0,r.memo)((function(e){var t=e.blocks;return(0,At.jsx)("div",{className:"with-light-shadow relative",children:(0,At.jsx)(di.BlockPreview,{blocks:t,live:!1,viewportWidth:1400})})}),(function(e,t){return e.clientId==t.clientId})),Ci=oi(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function Ei(e){var t,n=e.template,i=(0,r.useRef)(null),o=(0,r.useRef)(!1),s=B((function(e){return e.canImport})),a=Or((function(e){return e.setWanted})),l=Y((function(e){return e.setOpen})),c=(0,g.rawHandler)({HTML:n.fields.code}),u=Si((0,r.useState)(!1),2),d=u[0],f=u[1],p=Si(er(),2),h=p[0],m=p[1],x=Si((0,r.useState)(!1),2),y=x[0],v=x[1],b=function(){var e,t=(e=w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ci.check(n);case 2:si(Ci.stack).then((function(){setTimeout((function(){ui(c,n).then((function(){return l(!1)})).then((function(){return(0,r.render)((0,At.jsx)(Fo,{}),document.getElementById("extendify-root"))})).then((function(){return Ci.reset()}))}),100)}));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ki(o,r,i,s,a,"next",e)}function a(e){ki(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(){return t.apply(this,arguments)}}(),j=function(){s()?(Un(n),a(n),b()):v(!0)};return(0,r.useEffect)((function(){!d&&m&&f(!0)}),[m,d,n]),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("div",{role:"button",tabIndex:"0",ref:i,"aria-label":(0,It.sprintf)((0,It.__)("Press to import %s","extendify-sdk"),null==n||null===(t=n.fields)||void 0===t?void 0:t.type),className:"mb-8 cursor-pointer button-focus",onFocus:function(){o.current||(o.current=!0,Array.from(i.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).forEach((function(e){return e.setAttribute("tabIndex","-1")})))},onClick:j,onKeyDown:function(e){["Enter","Space"," "].includes(e.key)&&(e.stopPropagation(),e.preventDefault(),j())},children:[(0,At.jsx)("div",{ref:h,className:"invisible absolute inset-0 pointer-events-none"}),d&&(0,At.jsx)(_i,{blocks:c})]}),y&&(0,At.jsx)(ji,{isOpen:y,onRequestClose:function(){return v(!1)},left:(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"flex space-x-2 items-center justify-center mb-10",children:(0,At.jsxs)("svg",{fill:"none",height:"30",viewBox:"0 0 153 30",width:"153",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{d:"m33.2598 24.7079v-18.89872h12.7345v3.29434h-8.7388v4.50318h8.0835v3.2944h-8.0835v4.5124h8.7756v3.2944zm19.1224-14.174 2.6023 4.9553 2.6668-4.9553h4.0327l-4.1066 7.087 4.2173 7.087h-4.0141l-2.7961-4.9-2.7499 4.9h-4.0603l4.2079-7.087-4.0602-7.087zm19.1756 0v2.9529h-8.5359v-2.9529zm-6.598-3.39592h3.9312v13.21432c0 .363.0552.646.1661.849.1106.1968.2644.3353.4612.4152.2031.08.437.12.7014.12.1845 0 .3692-.0154.5537-.0461.1845-.0369.3261-.0646.4244-.0831l.6183 2.9252c-.1968.0615-.4736.1323-.8305.2122-.3568.0862-.7906.1386-1.301.157-.9474.0368-1.7781-.0892-2.4916-.3783-.7074-.2893-1.2581-.7383-1.6518-1.3474-.3937-.609-.5875-1.378-.5814-2.3069zm15.466 17.84662c-1.458 0-2.7131-.2951-3.7651-.8857-1.0457-.5968-1.8517-1.4396-2.4175-2.5285-.5661-1.0951-.8491-2.39-.8491-3.8849 0-1.458.283-2.7376.8491-3.8388.5658-1.1012 1.3625-1.9594 2.39-2.5746 1.0334-.6152 2.2454-.9228 3.6356-.9228.9353 0 1.8056.1507 2.6116.4521.812.2954 1.5195.7414 2.1224 1.3381.6091.5967 1.0827 1.3473 1.4212 2.2516.3382.8982.5073 1.9502.5073 3.1559v1.0797h-11.9683v-2.4362h8.268c0-.5659-.123-1.0673-.369-1.5041-.2462-.4368-.5875-.7782-1.0243-1.0243-.4307-.2522-.932-.3783-1.5041-.3783-.5968 0-1.1259.1384-1.5873.4152-.4552.2707-.8121.6367-1.0704 1.0981-.2584.4553-.3907.9628-.3967 1.5226v2.3162c0 .7014.129 1.3073.3874 1.8179.2646.5106.6368.9043 1.1167 1.1812.4797.2768 1.0487.4153 1.707.4153.4368 0 .8368-.0616 1.1997-.1846.363-.1231.6737-.3076.932-.5537.2584-.2461.4552-.5475.5906-.9043l3.6358.2399c-.1845.8736-.563 1.6364-1.1351 2.2885-.5659.646-1.298 1.1505-2.1963 1.5134-.8919.3569-1.9223.5351-3.0912.5351zm13.002-8.4711v8.1944h-3.931v-14.174h3.7465v2.5007h.1661c.3137-.8244.8397-1.4764 1.5779-1.9563.7383-.486 1.6335-.729 2.6855-.729.9842 0 1.8423.2153 2.5742.6459.732.4307 1.301 1.0459 1.707 1.8456.406.7936.609 1.741.609 2.8422v9.0249h-3.9305v-8.3236c.0061-.8674-.2155-1.5441-.6646-2.0301-.4491-.4922-1.0674-.7382-1.8547-.7382-.529 0-.9966.1138-1.4026.3414-.4.2276-.7137.5598-.9413.9966-.2216.4306-.3352.9505-.3415 1.5595zm17.4572 8.425c-1.077 0-2.052-.2767-2.926-.8305-.867-.5598-1.556-1.381-2.067-2.4638-.504-1.0889-.756-2.4238-.756-4.0049 0-1.6241.261-2.9744.784-4.051.523-1.0828 1.218-1.8917 2.086-2.427.873-.5413 1.83-.812 2.869-.812.794 0 1.455.1353 1.984.406.536.2646.966.5968 1.292.9966.333.3937.585.7813.757 1.1627h.12v-7.10542h3.922v18.89872h-3.876v-2.2701h-.166c-.185.3937-.446.7844-.784 1.172-.333.3814-.766.6981-1.301.9504-.53.2523-1.176.3783-1.938.3783zm1.246-3.1282c.633 0 1.168-.1722 1.605-.5167.443-.3507.781-.8398 1.015-1.4673.24-.6275.36-1.3626.36-2.2054s-.117-1.5749-.351-2.1963c-.233-.6213-.572-1.1012-1.015-1.4395-.442-.3384-.981-.5076-1.614-.5076-.646 0-1.191.1754-1.634.526-.443.3507-.778.8367-1.006 1.458-.227.6214-.341 1.3412-.341 2.1594 0 .8243.114 1.5533.341 2.187.234.6275.569 1.1196 1.006 1.4764.443.3507.988.526 1.634.526zm10.051 2.8976v-14.174h3.931v14.174zm1.984-16.00116c-.584 0-1.086-.19379-1.504-.58137-.418-.39372-.628-.86435-.628-1.41187 0-.54137.21-1.00584.628-1.39339.418-.39373.916-.59059 1.495-.59059.59 0 1.092.19686 1.504.59059.418.38755.627.85202.627 1.39339 0 .54752-.209 1.01815-.627 1.41187-.412.38758-.911.58137-1.495.58137zm12.718 1.82716v2.9529h-8.748v-2.9529zm-6.745 14.174v-15.19835c0-1.02737.2-1.8794.6-2.55611.406-.67671.959-1.18426 1.66-1.52261.702-.33836 1.498-.50753 2.39-.50753.603 0 1.154.04613 1.652.13842.505.09227.88.17532 1.126.24914l-.701 2.95293c-.154-.04922-.345-.09535-.572-.13842-.222-.04307-.449-.06459-.683-.06459-.578 0-.981.13534-1.209.40602-.228.26454-.341.63672-.341 1.11657v15.12453zm11.574 5.2876c-.499 0-.966-.04-1.403-.1199-.431-.0739-.787-.1661-1.07-.277l.886-2.9437c.695.2154 1.279.2706 1.753.1663.48-.0986.858-.4678 1.135-1.1075l.231-.5998-5.085-14.58h4.134l2.935 10.409h.147l2.962-10.409 4.162.0184-5.509 15.6874c-.264.7567-.624 1.415-1.08 1.9747-.449.5661-1.018 1.0029-1.707 1.3104-.689.3137-1.519.4707-2.491.4707z",fill:"#000"}),(0,At.jsx)("path",{d:"m18.9306 6.53613h-17.994321v18.85127h17.994321z",fill:"#000"}),(0,At.jsx)("path",{d:"m25.5.823639h-12.2819v12.281861h12.2819z",fill:"#37c2a2"})]})}),(0,At.jsx)("h3",{className:"text-xl md:leading-3",children:(0,It.__)("You're out of imports","extendify-sdk")}),(0,At.jsx)("p",{className:"text-sm text-black",children:(0,It.__)("Sign up today and get unlimited access to our entire collection of patterns and page layouts.","extendify-sdk")}),(0,At.jsx)("div",{children:(0,At.jsxs)(hi,{tagName:"a",target:"_blank",className:"m-auto mt-10",href:"https://extendify.com/pricing/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports"),rel:"noreferrer",children:[(0,It.__)("Get Unlimited Imports","extendify-sdk"),(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 25 24",width:"25",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"m10.3949 8.7864 5.5476-.02507m0 0-.0476 5.52507m.0476-5.52507c-2.357 2.35707-5.4183 5.41827-7.68101 7.68097",stroke:"currentColor",strokeWidth:"1.5"})})]})})]}),right:(0,At.jsxs)("div",{className:"space-y-2",children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z",fill:"currentColor"}),(0,At.jsx)("path",{d:"M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z",fill:"currentColor"}),(0,At.jsx)("path",{d:"M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z",fill:"currentColor"})]}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Access to 100's of Patterns","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,At.jsx)("path",{d:"m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z"}),(0,At.jsx)("path",{d:"m9.25 19v-14"})]})}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Beautiful full page layouts","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("circle",{cx:"12",cy:"12",r:"7.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,At.jsx)("circle",{cx:"12",cy:"12",r:"4.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,At.jsx)("circle",{cx:"11.9999",cy:"12.2",r:"6",transform:"rotate(-45 11.9999 12.2)",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"1.5 4"})]}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Fast and friendly support","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z",fill:"currentColor"})}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("14-Day guarantee","extendify-sdk")})]})]})})]})}function Ni(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ai(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Ni(o,r,i,s,a,"next",e)}function a(e){Ni(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Pi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ti(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mi(){var e=tr(),t=K((function(e){return e.templates})),n=K((function(e){return e.setActive})),i=K((function(e){return e.appendTemplates})),o=Pi((0,r.useState)(""),2),s=o[0],a=o[1],l=Pi((0,r.useState)(!1),2),c=l[0],u=l[1],d=Pi(er(),2),f=d[0],p=d[1],h=K((function(e){return e.updateSearchParams})),m=K((function(e){return e.searchParams})),x=(0,r.useRef)(K.getState().nextPage),y=(0,r.useRef)(K.getState().searchParams);(0,r.useEffect)((function(){return K.subscribe((function(e){return x.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return K.subscribe((function(e){return y.current=e}),(function(e){return e.searchParams}))}),[]);var v=(0,r.useCallback)(Ai(w().mark((function t(){var n,r;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(""),u(!1),t.next=4,Dn(y.current,{offset:x.current}).catch((function(e){console.error(e),a(e&&e.message?e.message:(0,It.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:if(r=t.sent,e.current){t.next=7;break}return t.abrupt("return");case 7:null!=r&&null!==(n=r.error)&&void 0!==n&&n.length&&a(null==r?void 0:r.error),null!=r&&r.records&&m===y.current&&(K.setState({nextPage:r.offset}),i(r.records),u(r.records.length<=0));case 9:case"end":return t.stop()}}),t)}))),[m,i,e]);if((0,r.useEffect)((function(){Object.keys(y.current.taxonomies).length&&(K.getState().skipNextFetch?K.setState({skipNextFetch:!1}):v())}),[v,y]),(0,r.useEffect)((function(){p&&v()}),[p,v]),s.length)return(0,At.jsxs)("div",{className:"text-left",children:[(0,At.jsx)("h2",{className:"text-left",children:(0,It.__)("Server error","extendify-sdk")}),(0,At.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:s}),(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){h({taxonomies:{},search:""}),v()},children:(0,It.__)("Press here to reload experience")})]});if(c)return(0,At.jsx)("h2",{className:"text-left",children:(0,It.__)("No results found.","extendify-sdk")});if(!t.length)return(0,At.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,At.jsx)(kt.Spinner,{})});return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(pr,{breakpointCols:{default:3,1320:2,860:1,599:2,400:1},className:"flex -ml-8 w-auto pb-40",columnClassName:"pl-8 bg-clip-padding",children:t.map((function(e){return"pattern"===m.type?(0,At.jsx)(Ei,{template:e},e.id):(0,At.jsx)(or,{template:e,setActiveTemplate:function(){return n(e)},imageLoaded:function(){}},e.id)}))}),K.getState().nextPage&&(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:f,style:{zIndex:-1}}),(0,At.jsx)("div",{className:"my-4",children:(0,At.jsx)(kt.Spinner,{})})]})]})}const Ii=(0,At.jsxs)(bi,{viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,At.jsx)(vi,{d:"M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z",fill:"currentColor"}),(0,At.jsx)(vi,{d:"M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z",fill:"currentColor"})]});const Li=(0,At.jsxs)(bi,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"m15.7919 7.73624h-11.67902v12.23516h11.67902z",fill:"#1e1e1e"}),(0,At.jsx)(vi,{d:"m20 4h-8v8h8z",fill:"#37c2a2"})]});const Ri=(0,At.jsxs)(bi,{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"white",strokeWidth:"1.25"}),(0,At.jsx)(vi,{d:"M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z",stroke:"white",strokeWidth:"1.25"})]});const Fi=(0,At.jsx)(bi,{fill:"none",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)(vi,{clipRule:"evenodd",d:"m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z",fill:"currentColor",fillRule:"evenodd"})});const Di=(0,At.jsxs)(bi,{fill:"none",viewBox:"0 0 151 148",width:"151",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(xi,{cx:"65.6441",cy:"66.6114",fill:"#0b4a43",r:"65.3897"}),(0,At.jsxs)(yi,{fill:"#cbc3f5",stroke:"#0b4a43",children:[(0,At.jsx)(vi,{d:"m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z",strokeWidth:"1.5"}),(0,At.jsx)(vi,{d:"m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z",strokeWidth:"1.75"}),(0,At.jsx)(gi,{height:"45.5077",rx:"9.13723",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 191.5074 -96.0026)",width:"18.2745",x:"143.755",y:"47.7524"}),(0,At.jsx)(gi,{height:"42.3038",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 241.97 -50.348)",width:"17.4735",x:"146.159",y:"95.811"}),(0,At.jsx)(gi,{height:"55.9204",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 213.1347 -85.5913)",width:"17.4735",x:"149.363",y:"63.7717"}),(0,At.jsx)(gi,{height:"51.1145",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 229.1545 -69.5715)",width:"17.4735",x:"149.363",y:"79.7915"}),(0,At.jsx)(vi,{d:"m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"}),(0,At.jsx)(vi,{d:"m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"})]})]});const Bi=function(){var e=B((function(e){return e.remainingImports})),t=B((function(e){return e.allowedImports})),n=e()>0?"has-imports":"no-imports",r="has-imports"===n?"bg-extendify-main hover:bg-extendify-main-dark":"bg-extendify-alert",i="has-imports"===n?Ri:Ii;return(0,At.jsxs)("a",{target:"_blank",rel:"noreferrer",className:Ot()(r,"flex w-full no-underline button-focus -mt-10 text-sm justify-between py-3 px-4 text-white rounded"),href:"https://www.extendify.com/pricing/?utm_source=".concat(encodeURIComponent(window.extendifySdkData.sdk_partner),"&utm_medium=library&utm_campaign=import-counter&utm_content=upgrade&utm_term=").concat(n),children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2 no-underline",children:[(0,At.jsx)(mi,{icon:i,size:14}),(0,At.jsx)("span",{children:(0,It.sprintf)((0,It.__)("%s/%s Imports","extendify-sdk"),e(),Number(t))})]}),(0,At.jsx)("span",{className:"text-white no-underline font-medium outline-none",children:(0,It.__)("Upgrade","extendify-sdk")})]})};function Ui(e){var t=e.children,n=B((function(e){return e.apiKey}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("aside",{className:"flex-shrink-0 sm:pl-6 py-0 sm:py-6 relative",children:[(0,At.jsx)("div",{className:"sm:w-56 lg:w-64 sticky flex flex-col lg:h-full",children:t[0]}),(0,At.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 mb-6 w-64 text-left space-y-4",children:!n.length&&(0,At.jsx)(Bi,{})})]}),(0,At.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function qi(){var e=K((function(e){return e.updateType})),t=Y((function(e){return e.currentType?e.currentType:y}));return(0,At.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-8 mt-px border-b sm:border-0",children:[(0,At.jsx)("h4",{className:"sr-only",children:(0,It.__)("Type select","extendify-sdk")}),(0,At.jsxs)("button",{type:"button",className:Ot()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t,"bg-transparent text-black":"pattern"!==t}),onClick:function(){return e("pattern")},children:[(0,At.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,At.jsx)("span",{className:"",children:(0,It.__)("Patterns","extendify-sdk")})]}),(0,At.jsxs)("button",{type:"button",className:Ot()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t,"bg-transparent text-black":"template"!==t}),onClick:function(){return e("template")},children:[(0,At.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,At.jsx)("span",{className:"",children:(0,It.__)("Page layouts","extendify-sdk")})]})]})}function Vi(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $i(e){var t=e.actionCallback,n=e.initialFocus,i=B((function(e){return e.apiKey.length})),o=zi((0,r.useState)(""),2),s=o[0],a=o[1],l=zi((0,r.useState)(""),2),c=l[0],u=l[1],d=zi((0,r.useState)(""),2),f=d[0],p=d[1],h=zi((0,r.useState)("info"),2),m=h[0],x=h[1],y=zi((0,r.useState)(!1),2),v=y[0],g=y[1],b=zi((0,r.useState)(!1),2),j=b[0],k=b[1],S=(0,r.useRef)(null),O=(0,r.useRef)(null);(0,r.useEffect)((function(){return a(B.getState().email),function(){return x("info")}}),[]),(0,r.useEffect)((function(){var e;j&&(null==S||null===(e=S.current)||void 0===e||e.focus())}),[j]);var C=function(){var e,t=(e=w().mark((function e(t){var n,r,i,o,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),g(!0),p(""),e.next=5,_(s,c);case 5:if(n=e.sent,r=n.token,i=n.error,o=n.exception,void 0===(a=n.message)){e.next=15;break}return x("error"),g(!1),p(a.length?a:"Error: Are you interacting with the wrong server?"),e.abrupt("return");case 15:if(!i&&!o){e.next=20;break}return x("error"),g(!1),p(i.length?i:o),e.abrupt("return");case 20:if(r&&"string"==typeof r){e.next=25;break}return x("error"),g(!1),p((0,It.__)("Something went wrong","extendify-sdk")),e.abrupt("return");case 25:x("success"),p("Success!"),k(!0),g(!1),B.setState({email:s,apiKey:r});case 30:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Vi(o,r,i,s,a,"next",e)}function a(e){Vi(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();return j?(0,At.jsxs)("section",{className:"w-80 space-y-8 text-center pt-2 pb-4",children:[(0,At.jsx)(mi,{icon:Di,size:148}),(0,At.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,It.__)("You've signed in to Extendify","extendify-sdk")}),(0,At.jsx)(kt.Button,{ref:S,className:"px-4 p-2 cursor-pointer text-center rounded bg-extendify-main text-white",onClick:t,children:(0,It.__)("View patterns","extendify-sdk")})]}):i?(0,At.jsxs)("section",{className:"space-y-8 w-full pb-2",children:[(0,At.jsx)("p",{className:"text-base text-extendify-black leading-extra-tight",children:(0,It.__)("Account","extendify-sdk")}),(0,At.jsxs)("div",{className:"flex justify-between items-center",children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2 -ml-2",children:[(0,At.jsx)(mi,{icon:Fi,size:48}),(0,At.jsx)("p",{className:"text-extendify-black",children:null!=s&&s.length?s:(0,It.__)("Logged In","extendify-sdk")})]}),window.location.search.indexOf("DEVMODE")>-1&&(0,At.jsx)(kt.Button,{className:"px-4 py-3 cursor-pointer text-center rounded bg-extendify-main text-white",onClick:function(){u(""),B.setState({apiKey:""}),setTimeout((function(){var e;null==O||null===(e=O.current)||void 0===e||e.focus()}),0)},children:(0,It.__)("Sign out","extendify-sdk")})]})]}):(0,At.jsxs)("section",{className:"w-80 text-left space-y-8 pb-6",children:[(0,At.jsxs)("div",{children:[(0,At.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,It.__)("Sign in to Extendify","extendify-sdk")}),(0,At.jsxs)("p",{className:"text-sm text-extendify-gray text-center space-x-1 leading-extra-tight",children:[(0,At.jsx)("span",{children:(0,It.__)("Don't have an account?","extendify-sdk")}),(0,At.jsx)("a",{href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up"),target:"_blank",className:"underline hover:no-underline text-extendify-gray",rel:"noreferrer",children:(0,It.__)("Sign up","extendify-sdk")})]})]}),(0,At.jsxs)("form",{onSubmit:C,className:"space-y-2",children:[(0,At.jsxs)("div",{className:"flex items-center",children:[(0,At.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-email",children:(0,It.__)("Email address","extendify-sdk")}),(0,At.jsx)("input",{ref:n,id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border-2 p-2 w-full rounded",placeholder:(0,It.__)("Email address","extendify-sdk"),value:s.length?s:"",onChange:function(e){return a(e.target.value)}})]}),(0,At.jsxs)("div",{className:"flex items-center",children:[(0,At.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-license",children:(0,It.__)("License key","extendify-sdk")}),(0,At.jsx)("input",{ref:O,id:"extendifysdk-login-license",name:"extendifysdk-login-license",type:"text",className:"border-2 p-2 w-full rounded",placeholder:(0,It.__)("License key","extendify-sdk"),value:c,onChange:function(e){return u(e.target.value)}})]}),(0,At.jsx)("div",{className:"pt-2 flex justify-center",children:(0,At.jsxs)("button",{type:"submit",className:"relative p-2 py-3 w-64 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main text-base text-white ",children:[(0,At.jsx)("span",{children:(0,It.__)("Sign In","extendify-sdk")}),v&&(0,At.jsx)("div",{className:"absolute right-2.5",children:(0,At.jsx)(kt.Spinner,{})})]})}),f&&(0,At.jsx)("div",{className:Ot()({"border-gray-900 text-gray-900":"info"===m,"border-wp-alert-red text-wp-alert-red":"error"===m,"border-extendify-main text-extendify-main":"success"===m}),children:f}),(0,At.jsx)("div",{className:"text-center pt-4",children:(0,At.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://extendify.com/guides/sign-in?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help"),className:"underline hover:no-underline text-sm text-extendify-gray",children:(0,It.__)("Need Help?","extendify-sdk")})})]})]})}function Wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(n),!0).forEach((function(t){Zi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gi=function(e){return(0,At.jsx)(kt.Button,Ji(Ji({},e),{},{icon:wi,className:"text-extendify-black opacity-75 hover:opacity-100",showTooltip:!1,label:(0,It.__)("Close dialog","extendify-sdk")}))},Ki=(0,r.forwardRef)((function(e,t){var n=e.isOpen,i=e.heading,o=e.onRequestClose,s=e.children,a=(0,r.useRef)(null);return(0,At.jsx)(Re.Root,{appear:!0,show:n,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,open:n,initialFocus:null!=t?t:a,className:"extendify-sdk",onClose:o,children:(0,At.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsx)("div",{className:"m-auto relative w-full",children:(0,At.jsxs)("div",{className:"bg-white shadow-modal items-center justify-center m-auto max-w-lg relative rounded-sm w-full",children:[i?(0,At.jsxs)("div",{className:"border-b flex justify-between items-center leading-none pl-6 py-2 pr-3",children:[(0,At.jsx)("span",{className:"text-base text-extendify-black whitespace-nowrap",children:i}),(0,At.jsx)(Gi,{onClick:o})]}):(0,At.jsx)("div",{className:"absolute block px-6 py-4 top-0 right-0 ",children:(0,At.jsx)(Gi,{ref:a,onClick:o})}),(0,At.jsx)("div",{children:s})]})})})]})})})}));function Yi(e){var t=e.isOpen,n=e.onClose,i=(0,r.useRef)(null);return(0,At.jsx)(Ki,{heading:(0,It.__)("Settings","extendify-sdk"),isOpen:t,ref:i,onRequestClose:n,children:(0,At.jsx)("div",{className:"flex p-6 justify-center",children:(0,At.jsx)($i,{initialFocus:i,actionCallback:n})})})}function Xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eo(e){var t=e.className,n=Y((function(e){return e.setOpen})),i=Xi((0,r.useState)(!1),2),o=i[0],s=i[1];return(0,At.jsx)("div",{className:t,children:(0,At.jsxs)("div",{className:"flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full",children:[(0,At.jsx)("div",{className:"flex space-x-12 h-full",children:(0,At.jsx)("div",{className:"bg-transparent flex items-center space-x-1.5 lg:w-64 -ml-1",children:(0,At.jsx)(mi,{icon:Li,size:40})})}),(0,At.jsxs)("div",{className:"space-x-2 transform sm:translate-x-6",children:[(0,At.jsx)(kt.Button,{onClick:function(){return s(!0)},icon:(0,At.jsx)(mi,{icon:Fi,size:24}),label:(0,It.__)("Settings","extendify-sdk")}),o&&(0,At.jsx)(Yi,{isOpen:o,onClose:function(){return s(!1)}}),(0,At.jsx)(kt.Button,{onClick:function(){return n(!1)},icon:(0,At.jsx)(mi,{icon:wi,size:24}),label:(0,It.__)("Close library","extendify-sdk")})]})]})})}function to(){return(0,At.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto",children:[(0,At.jsx)(eo,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,At.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,At.jsx)("button",{onClick:function(){return document.getElementById("extendify-templates").querySelector("button").focus()},className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,It.__)("Skip to content","extendify-sdk")}),(0,At.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,At.jsxs)(Ui,{children:[(0,At.jsx)(An,{}),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(qi,{}),(0,At.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,At.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40",children:(0,At.jsx)(Mi,{})})})]})]})})]})]})}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ro(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var io=oi(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function oo(e){var t=e.template,n=(0,r.useRef)(null),i=K((function(e){return e.activeTemplateBlocks})),o=B((function(e){return e.canImport})),s=B((function(e){return e.apiKey})),a=Y((function(e){return e.setOpen})),l=no((0,r.useState)(!1),2),c=l[0],u=l[1],d=no((0,r.useState)(!1),2),f=d[0],p=d[1],h=Or((function(e){return e.setWanted}));(0,r.useEffect)((function(){return io.check(t).then((function(){return p(!0)})),function(){return io.reset()&&p(!1)}}),[t]),(0,r.useEffect)((function(){!c&&n.current&&n.current.focus()}),[n,c,f]);var m=function(){Un(t),u(!0),h(t),si(io.stack).then((function(){setTimeout((function(){ui(i,t).then((function(){return a(!1)})).then((function(){return(0,r.render)((0,At.jsx)(Fo,{}),document.getElementById("extendify-root"))})).then((function(){return setTimeout((function(){return Y.setState({currentPage:"main"})}),500)}))}),100)}))};return f&&Object.keys(i).length?s||o()?c?(0,At.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,It.__)("Importing...","extendify-sdk")}):(0,At.jsx)("button",{ref:n,type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return m()},children:(0,It.sprintf)((0,It.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,At.jsx)("a",{ref:n,className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign_up&utm_content=single_page"),rel:"noreferrer",children:(0,It.__)("Sign up now","extendify-sdk")}):""}function so(e){var t=e.categories,n=e.styles,r=e.types,i=e.requiredPlugins;return(0,At.jsxs)(At.Fragment,{children:[t&&(0,At.jsxs)("div",{className:"w-full pb-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 mb-2",children:(0,It.__)("Categories:","extendify-sdk")}),(0,At.jsx)("div",{children:t.join(", ")})]}),n&&(0,At.jsxs)("div",{className:"w-full py-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Styles:","extendify-sdk")}),(0,At.jsx)("div",{children:n.join(", ")})]}),r&&(0,At.jsxs)("div",{className:"w-full py-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Types:","extendify-sdk")}),(0,At.jsx)("div",{children:r.join(", ")})]}),i.filter((function(e){return"editorplus"!==e})).length>0&&(0,At.jsxs)("div",{className:"pt-4 w-full",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Required Plugins:","extendify-sdk")}),(0,At.jsx)("div",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return Et(e)})).join(", ")})]}),(0,At.jsx)("div",{className:"py-4 mt-4",children:(0,At.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sidebar"),rel:"noreferrer",target:"_blank",children:(0,It.__)("What happens when a page layout is added?","extendify-sdk")})})]})}function ao(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return co(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uo=new Map;function fo(e){var t,n,i,o,s,a,l,c=e.template,u=c.fields,d=u.tax_categories,f=u.required_plugins,p=u.tax_style,h=u.tax_pattern_types,m=B((function(e){return e.apiKey})),x=lo((0,r.useState)([]),2),y=x[0],v=x[1],g=lo((0,r.useState)([]),2),b=g[0],j=g[1],k=tr(),S=K((function(e){return e.setActive})),O=function(e){v([]),j([]),requestAnimationFrame((function(){return S(e)}))},_=(0,r.useCallback)(function(){var e,t=(e=w().mark((function e(t,n){var r,i;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="".concat(c.id,"|").concat(t,"|").concat(n),!uo.has(r)){e.next=3;break}return e.abrupt("return",uo.get(r));case 3:return e.next=5,Bn(c,t,n);case 5:return i=e.sent,uo.set(r,i),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ao(o,r,i,s,a,"next",e)}function a(e){ao(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),[c]);return(0,r.useEffect)((function(){qn(c)}),[c]),(0,r.useEffect)((function(){_("related","pattern").then((function(e){k.current&&v(e)}))}),[c,_,k]),(0,At.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,At.jsxs)("div",{className:"lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300",children:[(0,At.jsx)("div",{className:"text-left m-0 h-full px-6 sm:p-0",children:(0,At.jsx)("h1",{className:"leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal",children:c.fields.display_title})}),(0,At.jsx)("div",{className:Ot()({"inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!m.length,"top-0":m.length>0}),children:(0,At.jsx)(oo,{template:c})})]}),(0,At.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46",children:(0,At.jsx)("img",{className:"max-w-full w-full block",src:null!==(t=null==c||null===(n=c.fields)||void 0===n||null===(i=n.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(s=o.full)||void 0===s?void 0:s.url)&&void 0!==t?t:null==c||null===(a=c.fields)||void 0===a||null===(l=a.screenshot[0])||void 0===l?void 0:l.url})}),(0,At.jsxs)("div",{className:"divide-y p-6 sm:p-0 mb-16",children:[y.length>0&&(0,At.jsxs)("section",{className:"mb-4",children:[(0,At.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,It.__)("Related","extendify-sdk")}),(0,At.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:y.map((function(e){var t,n,r,i,o,s,a;return(0,At.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,At.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(s=e.fields)||void 0===s||null===(a=s.screenshot[0])||void 0===a?void 0:a.url})},e.id)}))})]}),b.length>0&&(0,At.jsxs)("section",{className:"mb-4 pt-6",children:[(0,At.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,It.__)("Alternatives","extendify-sdk")}),(0,At.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:b.map((function(e){var t,n,r,i,o,s,a;return(0,At.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,At.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(s=e.fields)||void 0===s||null===(a=s.screenshot[0])||void 0===a?void 0:a.url})},e.id)}))})]})]}),(0,At.jsx)("div",{className:"text-xs text-left p-6 w-full block sm:hidden divide-y",children:(0,At.jsx)(so,{categories:d,types:h,requiredPlugins:f,styles:p})})]})}function po(e){var t=e.template,n=K((function(e){return e.setActive})),r=t.fields,i=r.tax_categories,o=r.required_plugins,s=r.tax_style,a=r.tax_pattern_types,l=B((function(e){return e.apiKey}));return(0,At.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!l.length&&(0,At.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,At.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,It.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,At.jsx)("button",{className:"components-button",onClick:function(){return Y.setState({currentPage:"login"})},children:(0,It.__)("Log in","extendify-sdk")})]}),(0,At.jsx)("div",{className:"p-6 sm:p-0",children:(0,At.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){Y.setState({currentPage:"main"}),n({})},children:[(0,At.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,At.jsx)("span",{className:"ml-4",children:(0,It.__)("Go back","extendify-sdk")})]})}),(0,At.jsx)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:(0,At.jsx)(so,{categories:i,types:a,requiredPlugins:o,styles:s})})]})}function ho(){var e=K((function(e){return e.activeTemplate}));return(0,At.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto",children:[(0,At.jsx)(eo,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,At.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,At.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,It.__)("Skip to content","extendify-sdk")}),(0,At.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,At.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,At.jsxs)(Ui,{children:[(0,At.jsx)(po,{template:e}),(0,At.jsx)(fo,{template:e})]})})})]})]})}function mo(e){switch(e.page){case"main":return(0,At.jsx)(to,{});case"single":return(0,At.jsx)(ho,{})}}const xo=(0,r.createElement)(bi,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(vi,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function go(){var e,t=yo((0,r.useState)(!(null!==(e=B.getState().noticesDismissedAt)&&void 0!==e&&e.welcome)),2),n=t[0],i=t[1],o=Y((function(e){return e.setOpen}));return n?(0,At.jsxs)("div",{className:"bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative",children:[(0,At.jsx)("span",{className:"text-black",children:(0,It.__)("Welcome to the Extendify Library","extendify-sdk")}),(0,At.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,At.jsxs)("div",{className:"flex space-x-2 justify-center items-center",children:[(0,At.jsx)(kt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",href:"https://extendify.com/welcome/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more"),target:"_blank",children:(0,It.__)("Tell me more","extendify-sdk")}),(0,At.jsx)("span",{className:"font-bold","aria-hidden":"true",children:"•"}),(0,At.jsx)(kt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",onClick:function(){document.getElementById("extendify-templates-inserter-btn").classList.add("invisible"),B.setState({enabled:!1}),o(!1)},children:(0,It.__)("Turn off the library","extendify-sdk")})]}),(0,At.jsx)("div",{className:"absolute right-1",children:(0,At.jsx)(kt.Button,{className:"opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black",icon:(0,At.jsx)(mi,{icon:xo}),label:(0,It.__)("Dismiss this notice","extendify-sdk"),onClick:function(){i(!1),B.setState({noticesDismissedAt:{welcome:(new Date).toISOString()}})},showTooltip:!1})})]}):null}function bo(){var e=(0,r.useRef)(null),t=Y((function(e){return e.open})),n=Y((function(e){return e.setOpen})),i=Y((function(e){return e.currentPage}));return(0,At.jsx)(Re.Root,{show:t,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:e,onClose:function(){return n(!1)},children:(0,At.jsx)("div",{className:"h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,At.jsxs)("div",{className:"flex h-full overflow-hidden p-4 lg:p-20 text-center w-full",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsxs)("div",{ref:e,tabIndex:"0",className:"max-w-8xl mx-auto w-full",children:[(0,At.jsx)(mo,{page:i}),(0,At.jsx)(go,{})]})})]})})})})}const wo=wp.compose,jo=wp.hooks,ko=JSON.parse('{"t":["ext-absolute","ext-relative","ext-top-base","ext-top-lg","ext--top-base","ext--top-lg","ext-right-base","ext-right-lg","ext--right-base","ext--right-lg","ext-bottom-base","ext-bottom-lg","ext--bottom-base","ext--bottom-lg","ext-left-base","ext-left-lg","ext--left-base","ext--left-lg","ext-order-1","ext-order-2","ext-col-auto","ext-col-span-1","ext-col-span-2","ext-col-span-3","ext-col-span-4","ext-col-span-5","ext-col-span-6","ext-col-span-7","ext-col-span-8","ext-col-span-9","ext-col-span-10","ext-col-span-11","ext-col-span-12","ext-col-span-full","ext-col-start-1","ext-col-start-2","ext-col-start-3","ext-col-start-4","ext-col-start-5","ext-col-start-6","ext-col-start-7","ext-col-start-8","ext-col-start-9","ext-col-start-10","ext-col-start-11","ext-col-start-12","ext-col-start-13","ext-col-start-auto","ext-col-end-1","ext-col-end-2","ext-col-end-3","ext-col-end-4","ext-col-end-5","ext-col-end-6","ext-col-end-7","ext-col-end-8","ext-col-end-9","ext-col-end-10","ext-col-end-11","ext-col-end-12","ext-col-end-13","ext-col-end-auto","ext-row-auto","ext-row-span-1","ext-row-span-2","ext-row-span-3","ext-row-span-4","ext-row-span-5","ext-row-span-6","ext-row-span-full","ext-row-start-1","ext-row-start-2","ext-row-start-3","ext-row-start-4","ext-row-start-5","ext-row-start-6","ext-row-start-7","ext-row-start-auto","ext-row-end-1","ext-row-end-2","ext-row-end-3","ext-row-end-4","ext-row-end-5","ext-row-end-6","ext-row-end-7","ext-row-end-auto","ext-m-0","ext-m-auto","ext-m-base","ext-m-lg","ext--m-base","ext--m-lg","ext-mx-0","ext-mx-auto","ext-mx-base","ext-mx-lg","ext--mx-base","ext--mx-lg","ext-my-0","ext-my-auto","ext-my-base","ext-my-lg","ext--my-base","ext--my-lg","ext-mt-0","ext-mt-auto","ext-mt-base","ext-mt-lg","ext--mt-base","ext--mt-lg","ext-mr-0","ext-mr-auto","ext-mr-base","ext-mr-lg","ext--mr-base","ext--mr-lg","ext-mb-0","ext-mb-auto","ext-mb-base","ext-mb-lg","ext--mb-base","ext--mb-lg","ext-ml-0","ext-ml-auto","ext-ml-base","ext-ml-lg","ext--ml-base","ext--ml-lg","ext-block","ext-inline-block","ext-inline","ext-flex","ext-inline-flex","ext-grid","ext-inline-grid","ext-hidden","ext-w-auto","ext-w-full","ext-max-w-full","ext-flex-1","ext-flex-auto","ext-flex-initial","ext-flex-none","ext-flex-shrink-0","ext-flex-shrink","ext-flex-grow-0","ext-flex-grow","ext-list-none","ext-grid-cols-1","ext-grid-cols-2","ext-grid-cols-3","ext-grid-cols-4","ext-grid-cols-5","ext-grid-cols-6","ext-grid-cols-7","ext-grid-cols-8","ext-grid-cols-9","ext-grid-cols-10","ext-grid-cols-11","ext-grid-cols-12","ext-grid-cols-none","ext-grid-rows-1","ext-grid-rows-2","ext-grid-rows-3","ext-grid-rows-4","ext-grid-rows-5","ext-grid-rows-6","ext-grid-rows-none","ext-flex-row","ext-flex-row-reverse","ext-flex-col","ext-flex-col-reverse","ext-flex-wrap","ext-flex-wrap-reverse","ext-flex-nowrap","ext-items-start","ext-items-end","ext-items-center","ext-items-baseline","ext-items-stretch","ext-justify-start","ext-justify-end","ext-justify-center","ext-justify-between","ext-justify-around","ext-justify-evenly","ext-justify-items-start","ext-justify-items-end","ext-justify-items-center","ext-justify-items-stretch","ext-gap-0","ext-gap-base","ext-gap-lg","ext-gap-x-0","ext-gap-x-base","ext-gap-x-lg","ext-gap-y-0","ext-gap-y-base","ext-gap-y-lg","ext-justify-self-auto","ext-justify-self-start","ext-justify-self-end","ext-justify-self-center","ext-justify-self-stretch","ext-rounded-none","ext-rounded-full","ext-rounded-t-none","ext-rounded-t-full","ext-rounded-r-none","ext-rounded-r-full","ext-rounded-b-none","ext-rounded-b-full","ext-rounded-l-none","ext-rounded-l-full","ext-rounded-tl-none","ext-rounded-tl-full","ext-rounded-tr-none","ext-rounded-tr-full","ext-rounded-br-none","ext-rounded-br-full","ext-rounded-bl-none","ext-rounded-bl-full","ext-border-0","ext-border-t-0","ext-border-r-0","ext-border-b-0","ext-border-l-0","ext-p-0","ext-p-base","ext-p-lg","ext-px-0","ext-px-base","ext-px-lg","ext-py-0","ext-py-base","ext-py-lg","ext-pt-0","ext-pt-base","ext-pt-lg","ext-pr-0","ext-pr-base","ext-pr-lg","ext-pb-0","ext-pb-base","ext-pb-lg","ext-pl-0","ext-pl-base","ext-pl-lg","ext-text-left","ext-text-center","ext-text-right","ext-leading-none","ext-leading-tight","ext-leading-snug","ext-leading-normal","ext-leading-relaxed","ext-leading-loose","clip-path--rhombus","clip-path--diamond","clip-path--rhombus-alt","tablet\\\\:fullwidth-cols","desktop\\\\:fullwidth-cols","direction-rtl","direction-ltr","bring-to-front","text-stroke","text-stroke--primary","text-stroke--secondary","editor\\\\:no-caption","editor\\\\:no-inserter","editor\\\\:no-resize","editor\\\\:pointer-events-none","tablet\\\\:ext-absolute","tablet\\\\:ext-relative","tablet\\\\:ext-top-base","tablet\\\\:ext-top-lg","tablet\\\\:ext--top-base","tablet\\\\:ext--top-lg","tablet\\\\:ext-right-base","tablet\\\\:ext-right-lg","tablet\\\\:ext--right-base","tablet\\\\:ext--right-lg","tablet\\\\:ext-bottom-base","tablet\\\\:ext-bottom-lg","tablet\\\\:ext--bottom-base","tablet\\\\:ext--bottom-lg","tablet\\\\:ext-left-base","tablet\\\\:ext-left-lg","tablet\\\\:ext--left-base","tablet\\\\:ext--left-lg","tablet\\\\:ext-order-1","tablet\\\\:ext-order-2","tablet\\\\:ext-m-0","tablet\\\\:ext-m-auto","tablet\\\\:ext-m-base","tablet\\\\:ext-m-lg","tablet\\\\:ext--m-base","tablet\\\\:ext--m-lg","tablet\\\\:ext-mx-0","tablet\\\\:ext-mx-auto","tablet\\\\:ext-mx-base","tablet\\\\:ext-mx-lg","tablet\\\\:ext--mx-base","tablet\\\\:ext--mx-lg","tablet\\\\:ext-my-0","tablet\\\\:ext-my-auto","tablet\\\\:ext-my-base","tablet\\\\:ext-my-lg","tablet\\\\:ext--my-base","tablet\\\\:ext--my-lg","tablet\\\\:ext-mt-0","tablet\\\\:ext-mt-auto","tablet\\\\:ext-mt-base","tablet\\\\:ext-mt-lg","tablet\\\\:ext--mt-base","tablet\\\\:ext--mt-lg","tablet\\\\:ext-mr-0","tablet\\\\:ext-mr-auto","tablet\\\\:ext-mr-base","tablet\\\\:ext-mr-lg","tablet\\\\:ext--mr-base","tablet\\\\:ext--mr-lg","tablet\\\\:ext-mb-0","tablet\\\\:ext-mb-auto","tablet\\\\:ext-mb-base","tablet\\\\:ext-mb-lg","tablet\\\\:ext--mb-base","tablet\\\\:ext--mb-lg","tablet\\\\:ext-ml-0","tablet\\\\:ext-ml-auto","tablet\\\\:ext-ml-base","tablet\\\\:ext-ml-lg","tablet\\\\:ext--ml-base","tablet\\\\:ext--ml-lg","tablet\\\\:ext-block","tablet\\\\:ext-inline-block","tablet\\\\:ext-inline","tablet\\\\:ext-flex","tablet\\\\:ext-inline-flex","tablet\\\\:ext-grid","tablet\\\\:ext-inline-grid","tablet\\\\:ext-hidden","tablet\\\\:ext-w-auto","tablet\\\\:ext-w-full","tablet\\\\:ext-max-w-full","tablet\\\\:ext-flex-1","tablet\\\\:ext-flex-auto","tablet\\\\:ext-flex-initial","tablet\\\\:ext-flex-none","tablet\\\\:ext-flex-shrink-0","tablet\\\\:ext-flex-shrink","tablet\\\\:ext-flex-grow-0","tablet\\\\:ext-flex-grow","tablet\\\\:ext-list-none","tablet\\\\:ext-grid-cols-1","tablet\\\\:ext-grid-cols-2","tablet\\\\:ext-grid-cols-3","tablet\\\\:ext-grid-cols-4","tablet\\\\:ext-grid-cols-5","tablet\\\\:ext-grid-cols-6","tablet\\\\:ext-grid-cols-7","tablet\\\\:ext-grid-cols-8","tablet\\\\:ext-grid-cols-9","tablet\\\\:ext-grid-cols-10","tablet\\\\:ext-grid-cols-11","tablet\\\\:ext-grid-cols-12","tablet\\\\:ext-grid-cols-none","tablet\\\\:ext-flex-row","tablet\\\\:ext-flex-row-reverse","tablet\\\\:ext-flex-col","tablet\\\\:ext-flex-col-reverse","tablet\\\\:ext-flex-wrap","tablet\\\\:ext-flex-wrap-reverse","tablet\\\\:ext-flex-nowrap","tablet\\\\:ext-items-start","tablet\\\\:ext-items-end","tablet\\\\:ext-items-center","tablet\\\\:ext-items-baseline","tablet\\\\:ext-items-stretch","tablet\\\\:ext-justify-start","tablet\\\\:ext-justify-end","tablet\\\\:ext-justify-center","tablet\\\\:ext-justify-between","tablet\\\\:ext-justify-around","tablet\\\\:ext-justify-evenly","tablet\\\\:ext-justify-items-start","tablet\\\\:ext-justify-items-end","tablet\\\\:ext-justify-items-center","tablet\\\\:ext-justify-items-stretch","tablet\\\\:ext-justify-self-auto","tablet\\\\:ext-justify-self-start","tablet\\\\:ext-justify-self-end","tablet\\\\:ext-justify-self-center","tablet\\\\:ext-justify-self-stretch","tablet\\\\:ext-p-0","tablet\\\\:ext-p-base","tablet\\\\:ext-p-lg","tablet\\\\:ext-px-0","tablet\\\\:ext-px-base","tablet\\\\:ext-px-lg","tablet\\\\:ext-py-0","tablet\\\\:ext-py-base","tablet\\\\:ext-py-lg","tablet\\\\:ext-pt-0","tablet\\\\:ext-pt-base","tablet\\\\:ext-pt-lg","tablet\\\\:ext-pr-0","tablet\\\\:ext-pr-base","tablet\\\\:ext-pr-lg","tablet\\\\:ext-pb-0","tablet\\\\:ext-pb-base","tablet\\\\:ext-pb-lg","tablet\\\\:ext-pl-0","tablet\\\\:ext-pl-base","tablet\\\\:ext-pl-lg","tablet\\\\:ext-text-left","tablet\\\\:ext-text-center","tablet\\\\:ext-text-right","desktop\\\\:ext-absolute","desktop\\\\:ext-relative","desktop\\\\:ext-top-base","desktop\\\\:ext-top-lg","desktop\\\\:ext--top-base","desktop\\\\:ext--top-lg","desktop\\\\:ext-right-base","desktop\\\\:ext-right-lg","desktop\\\\:ext--right-base","desktop\\\\:ext--right-lg","desktop\\\\:ext-bottom-base","desktop\\\\:ext-bottom-lg","desktop\\\\:ext--bottom-base","desktop\\\\:ext--bottom-lg","desktop\\\\:ext-left-base","desktop\\\\:ext-left-lg","desktop\\\\:ext--left-base","desktop\\\\:ext--left-lg","desktop\\\\:ext-order-1","desktop\\\\:ext-order-2","desktop\\\\:ext-m-0","desktop\\\\:ext-m-auto","desktop\\\\:ext-m-base","desktop\\\\:ext-m-lg","desktop\\\\:ext--m-base","desktop\\\\:ext--m-lg","desktop\\\\:ext-mx-0","desktop\\\\:ext-mx-auto","desktop\\\\:ext-mx-base","desktop\\\\:ext-mx-lg","desktop\\\\:ext--mx-base","desktop\\\\:ext--mx-lg","desktop\\\\:ext-my-0","desktop\\\\:ext-my-auto","desktop\\\\:ext-my-base","desktop\\\\:ext-my-lg","desktop\\\\:ext--my-base","desktop\\\\:ext--my-lg","desktop\\\\:ext-mt-0","desktop\\\\:ext-mt-auto","desktop\\\\:ext-mt-base","desktop\\\\:ext-mt-lg","desktop\\\\:ext--mt-base","desktop\\\\:ext--mt-lg","desktop\\\\:ext-mr-0","desktop\\\\:ext-mr-auto","desktop\\\\:ext-mr-base","desktop\\\\:ext-mr-lg","desktop\\\\:ext--mr-base","desktop\\\\:ext--mr-lg","desktop\\\\:ext-mb-0","desktop\\\\:ext-mb-auto","desktop\\\\:ext-mb-base","desktop\\\\:ext-mb-lg","desktop\\\\:ext--mb-base","desktop\\\\:ext--mb-lg","desktop\\\\:ext-ml-0","desktop\\\\:ext-ml-auto","desktop\\\\:ext-ml-base","desktop\\\\:ext-ml-lg","desktop\\\\:ext--ml-base","desktop\\\\:ext--ml-lg","desktop\\\\:ext-block","desktop\\\\:ext-inline-block","desktop\\\\:ext-inline","desktop\\\\:ext-flex","desktop\\\\:ext-inline-flex","desktop\\\\:ext-grid","desktop\\\\:ext-inline-grid","desktop\\\\:ext-hidden","desktop\\\\:ext-w-auto","desktop\\\\:ext-w-full","desktop\\\\:ext-max-w-full","desktop\\\\:ext-flex-1","desktop\\\\:ext-flex-auto","desktop\\\\:ext-flex-initial","desktop\\\\:ext-flex-none","desktop\\\\:ext-flex-shrink-0","desktop\\\\:ext-flex-shrink","desktop\\\\:ext-flex-grow-0","desktop\\\\:ext-flex-grow","desktop\\\\:ext-list-none","desktop\\\\:ext-grid-cols-1","desktop\\\\:ext-grid-cols-2","desktop\\\\:ext-grid-cols-3","desktop\\\\:ext-grid-cols-4","desktop\\\\:ext-grid-cols-5","desktop\\\\:ext-grid-cols-6","desktop\\\\:ext-grid-cols-7","desktop\\\\:ext-grid-cols-8","desktop\\\\:ext-grid-cols-9","desktop\\\\:ext-grid-cols-10","desktop\\\\:ext-grid-cols-11","desktop\\\\:ext-grid-cols-12","desktop\\\\:ext-grid-cols-none","desktop\\\\:ext-flex-row","desktop\\\\:ext-flex-row-reverse","desktop\\\\:ext-flex-col","desktop\\\\:ext-flex-col-reverse","desktop\\\\:ext-flex-wrap","desktop\\\\:ext-flex-wrap-reverse","desktop\\\\:ext-flex-nowrap","desktop\\\\:ext-items-start","desktop\\\\:ext-items-end","desktop\\\\:ext-items-center","desktop\\\\:ext-items-baseline","desktop\\\\:ext-items-stretch","desktop\\\\:ext-justify-start","desktop\\\\:ext-justify-end","desktop\\\\:ext-justify-center","desktop\\\\:ext-justify-between","desktop\\\\:ext-justify-around","desktop\\\\:ext-justify-evenly","desktop\\\\:ext-justify-items-start","desktop\\\\:ext-justify-items-end","desktop\\\\:ext-justify-items-center","desktop\\\\:ext-justify-items-stretch","desktop\\\\:ext-justify-self-auto","desktop\\\\:ext-justify-self-start","desktop\\\\:ext-justify-self-end","desktop\\\\:ext-justify-self-center","desktop\\\\:ext-justify-self-stretch","desktop\\\\:ext-p-0","desktop\\\\:ext-p-base","desktop\\\\:ext-p-lg","desktop\\\\:ext-px-0","desktop\\\\:ext-px-base","desktop\\\\:ext-px-lg","desktop\\\\:ext-py-0","desktop\\\\:ext-py-base","desktop\\\\:ext-py-lg","desktop\\\\:ext-pt-0","desktop\\\\:ext-pt-base","desktop\\\\:ext-pt-lg","desktop\\\\:ext-pr-0","desktop\\\\:ext-pr-base","desktop\\\\:ext-pr-lg","desktop\\\\:ext-pb-0","desktop\\\\:ext-pb-base","desktop\\\\:ext-pb-lg","desktop\\\\:ext-pl-0","desktop\\\\:ext-pl-base","desktop\\\\:ext-pl-lg","desktop\\\\:ext-text-left","desktop\\\\:ext-text-center","desktop\\\\:ext-text-right"]}');function So(e){return function(e){if(Array.isArray(e))return Oo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Oo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var No=(0,wo.createHigherOrderComponent)((function(e){return function(t){var n=t.attributes.extUtilities,r=ko.t.map((function(e){return e.replace(".","").replace(new RegExp("\\\\","g"),"")}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(e,Co({},t)),n&&(0,At.jsx)(di.InspectorAdvancedControls,{children:(0,At.jsx)(kt.FormTokenField,{label:(0,It.__)("Extendify Utilities","extendify-sdk"),tokenizeOnSpace:!0,value:n,suggestions:r,onChange:function(e){t.setAttributes({extUtilities:e})}})})]})}}),"utilityClassEdit");function Ao(e,t,n){var r=e.className,i=n.extUtilities,o=n.className;if(!i||!Object.keys(i).length)return e;var s=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return e.split(" ");case"[object Array]":return e;default:return[]}},a=new Set([].concat(So(s(o)),So(s(r)),So(s(i))));return Object.assign({},e,{className:So(a).join(" ")})}function Po(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(0,jo.addFilter)("blocks.registerBlockType","extendify/utilities/attributes",(function(e){return Co(Co({},e),{},{attributes:Co(Co({},e.attributes),{},{extUtilities:{type:"array",default:[]}})})})),(0,jo.addFilter)("blocks.registerBlockType","extendify/utilities/addEditProps",(function(e){var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Ao(r,e,n)},e})),(0,jo.addFilter)("editor.BlockEdit","extendify/utilities/advancedClassControls",No),(0,jo.addFilter)("blocks.getSaveContent.extraProps","extendify/utilities/extra-props",Ao);var To=function(){return(e=w().mark((function e(){var t;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.get("taxonomies-simple");case 2:return(t=e.sent)["tax_pattern_types_2.0"]&&(t.tax_pattern_types=t["tax_pattern_types_2.0"],delete t["tax_pattern_types_2.0"]),t["tax_page_types_2.0"]&&(t.tax_page_types=t["tax_page_types_2.0"],delete t["tax_page_types_2.0"]),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Po(o,r,i,s,a,"next",e)}function a(e){Po(o,r,i,s,a,"throw",e)}s(void 0)}))})();var e};function Mo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Io(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Mo(o,r,i,s,a,"next",e)}function a(e){Mo(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ro(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fo(e){var t=e.show,n=void 0!==t&&t,i=Y((function(e){return e.open})),o=Y((function(e){return e.setOpen})),s=Lo((0,r.useState)(!1),2),a=s[0],l=s[1],c=(0,r.useCallback)((function(){return o(!0)}),[o]),u=(0,r.useCallback)((function(){return o(!1)}),[o]),d=K((function(e){return e.initTemplateData})),f=B((function(e){return e.uuid.length>0})),p=K((function(e){return Object.keys(e.taxonomyDefaultState).length>0}));return function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=K((function(e){return e.setupDefaultTaxonomies})),n=V((function(e){return e.setTaxonomies})),i=(0,r.useCallback)(Io(w().mark((function e(){var r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,To();case 2:r=e.sent,r=Object.keys(r).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,t){return e[t]=r[t],e}),{}),n(r),t();case 6:case"end":return e.stop()}}),e)}))),[n,t]);(0,r.useEffect)((function(){e&&i()}),[i,e])}(i),(0,r.useEffect)((function(){f&&p&&("single"===Y.getState().currentPage&&Y.setState({currentPage:"main"}),d(),l(!0))}),[f,p,d]),(0,r.useEffect)((function(){n&&o(!0)}),[n,o]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",c),window.addEventListener("extendify-sdk::close-library",u),function(){window.removeEventListener("extendify-sdk::open-library",c),window.removeEventListener("extendify-sdk::close-library",u)}}),[u,c]),a?(0,At.jsx)(bo,{}):null}const Do=wp.plugins,Bo=wp.editPost;var Uo=function(){return k.get("site-settings")},qo=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),k.post("site-settings",t,{headers:{"Content-Type":"multipart/form-data"}})};function Vo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zo(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Vo(o,r,i,s,a,"next",e)}function a(e){Vo(o,r,i,s,a,"throw",e)}s(void 0)}))}}var Ho={getItem:function(){var e=zo(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Uo();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),setItem:function(){var e=zo(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},$o=l(x((function(){return{enabled:!0}}),{name:"extendify-sitesettings",getStorage:function(){return Ho}}));function Wo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Jo(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Wo(o,r,i,s,a,"next",e)}function a(e){Wo(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Zo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Go(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Go(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Go(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ko=function(){var e=(0,Cr.useSelect)((function(e){return e("core").canUser("create","users")})),t=Zo((0,r.useState)(B((function(e){return e.enabled}))),2),n=t[0],i=t[1],o=Zo((0,r.useState)($o((function(e){return e.enabled}))),2),s=o[0],a=o[1];function l(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementById("extendify-templates-inserter-btn");t&&(e?t.classList.add("invisible"):t.classList.remove("invisible"))}function c(e){return u.apply(this,arguments)}function u(){return(u=Jo(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return f.apply(this,arguments)}function f(){return(f=Jo(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$o.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Jo(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("global"!==n){e.next=5;break}return e.next=3,d(t);case 3:e.next=7;break;case 5:return e.next=7,c(t);case 7:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function m(e){"global"===e?a((function(t){return p(!t,e),!t})):i((function(t){return l(!t),p(!t,e),!t}))}return(0,r.useEffect)((function(){l(!n)}),[n]),(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Extendify Settings","extendify-sdk"),onRequestClose:function(){var e=document.getElementById("extendify-util");(0,r.unmountComponentAtNode)(e)},children:[(0,At.jsx)(kt.ToggleControl,{label:e?(0,It.__)("Enable the library for myself","extendify-sdk"):(0,It.__)("Enable the library","extendify-sdk"),help:(0,It.__)("Publish with hundreds of patterns & page layouts","extendify-sdk"),checked:n,onChange:function(){return m("user")}}),e&&(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("br",{}),(0,At.jsx)(kt.ToggleControl,{label:(0,It.__)("Allow all users to publish with the library"),help:(0,It.__)("Everyone publishes with patterns & page layouts","extendify-sdk"),checked:s,onChange:function(){return m("global")}})]})]})};var Yo=function(e){var t,n;Ct(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Xo=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.isAdmin)},Qo=function(){var e,t,n;return null===window.extendifySdkData.sitesettings||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.sitesettings)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},es=(0,At.jsx)("div",{id:"extendify-templates-inserter",className:"extendify-sdk",children:(0,At.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494 !important;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,At.jsx)(mi,{icon:Li,size:24,className:"-ml-1 mr-1"}),(0,It.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){var e,t,n;(Qo()||Xo())&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(es)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Yo),(null===window.extendifySdkData.user?Qo():null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)||document.getElementById("extendify-templates-inserter-btn").classList.add("invisible")))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if((Qo()||Xo())&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,At.jsx)("div",{children:(0,At.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,It.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Yo)}}),0)}));window._wpLoadBlockEditor&&(0,Do.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,At.jsx)(At.Fragment,{children:(0,At.jsxs)(Bo.PluginSidebarMoreMenuItem,{onClick:function(){var e=document.getElementById("extendify-util");(0,r.render)((0,At.jsx)(Ko,{}),e)},icon:(0,At.jsx)(mi,{icon:Li,size:24}),children:[" ",(0,It.__)("Extendify","extendify-sdk")]})})}}),[{register:function(){var e=(0,Cr.dispatch)("core/notices").createNotice,t=B.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,It.__)("Page layout Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),Vn(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,_t.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,At.jsx)(Lr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=Object.assign(document.createElement("div"),{id:"extendify-root"});if(document.body.append(e),(0,r.render)((0,At.jsx)(Fo,{}),e),e.parentNode.insertBefore(Object.assign(document.createElement("div"),{id:"extendify-util"}),e.nextSibling),Or.getState().importOnLoad){var t=Or.getState().wantedTemplate;setTimeout((function(){ui((0,g.rawHandler)({HTML:t.fields.code}),t)}),0)}Or.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},716:()=>{},965:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,a,l=i(e),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))n.call(s,u)&&(l[u]=s[u]);if(t){a=t(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l}},61:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,l=[],c=!1,u=-1;function d(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(995),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.jsx=c,t.jsxs=c},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,o=Object.create(i.prototype),s=new E(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=O(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=u(e,t,n);if("normal"===l.type){if(r=n.done?h:f,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,s),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function x(){}function y(){}function v(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==n&&r.call(w,o)&&(g=w);var j=v.prototype=x.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,s,a){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(l.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function N(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:A}}function A(){return{value:t,done:!0}}return y.prototype=j.constructor=v,v.constructor=y,y.displayName=l(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,a,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[s]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new S(c(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(j),l(j,a,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=N,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return a.type="throw",a.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},995:e=>{"use strict";e.exports=React},843:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_from":"axios@0.21.4"}')}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,i,o]=e[u],a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={286:0,506:0,310:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var u=l(r)}for(t&&t(n);c<s.length;c++)o=s[c],r.o(e,o)&&e[o]&&e[o][0](),e[s[c]]=0;return r.O(u)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[506,310],(()=>r(363))),r.O(void 0,[506,310],(()=>r(716)));var i=r.O(void 0,[506,310],(()=>r(965)));i=r.O(i)})();
|
{extendify-sdk → redux-core/extendify-sdk}/public/build/extendify-sdk.js.LICENSE.txt
RENAMED
File without changes
|
redux-core/extendify-sdk/public/build/extendify-utilities.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.ext-absolute{position:absolute!important}.ext-relative{position:relative!important}.ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.ext-top-lg{top:var(--extendify--spacing--large)!important}.ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.ext-right-lg{right:var(--extendify--spacing--large)!important}.ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.ext-left-lg{left:var(--extendify--spacing--large)!important}.ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.ext-order-1{order:1!important}.ext-order-2{order:2!important}.ext-col-auto{grid-column:auto!important}.ext-col-span-1{grid-column:span 1/span 1!important}.ext-col-span-2{grid-column:span 2/span 2!important}.ext-col-span-3{grid-column:span 3/span 3!important}.ext-col-span-4{grid-column:span 4/span 4!important}.ext-col-span-5{grid-column:span 5/span 5!important}.ext-col-span-6{grid-column:span 6/span 6!important}.ext-col-span-7{grid-column:span 7/span 7!important}.ext-col-span-8{grid-column:span 8/span 8!important}.ext-col-span-9{grid-column:span 9/span 9!important}.ext-col-span-10{grid-column:span 10/span 10!important}.ext-col-span-11{grid-column:span 11/span 11!important}.ext-col-span-12{grid-column:span 12/span 12!important}.ext-col-span-full{grid-column:1/-1!important}.ext-col-start-1{grid-column-start:1!important}.ext-col-start-2{grid-column-start:2!important}.ext-col-start-3{grid-column-start:3!important}.ext-col-start-4{grid-column-start:4!important}.ext-col-start-5{grid-column-start:5!important}.ext-col-start-6{grid-column-start:6!important}.ext-col-start-7{grid-column-start:7!important}.ext-col-start-8{grid-column-start:8!important}.ext-col-start-9{grid-column-start:9!important}.ext-col-start-10{grid-column-start:10!important}.ext-col-start-11{grid-column-start:11!important}.ext-col-start-12{grid-column-start:12!important}.ext-col-start-13{grid-column-start:13!important}.ext-col-start-auto{grid-column-start:auto!important}.ext-col-end-1{grid-column-end:1!important}.ext-col-end-2{grid-column-end:2!important}.ext-col-end-3{grid-column-end:3!important}.ext-col-end-4{grid-column-end:4!important}.ext-col-end-5{grid-column-end:5!important}.ext-col-end-6{grid-column-end:6!important}.ext-col-end-7{grid-column-end:7!important}.ext-col-end-8{grid-column-end:8!important}.ext-col-end-9{grid-column-end:9!important}.ext-col-end-10{grid-column-end:10!important}.ext-col-end-11{grid-column-end:11!important}.ext-col-end-12{grid-column-end:12!important}.ext-col-end-13{grid-column-end:13!important}.ext-col-end-auto{grid-column-end:auto!important}.ext-row-auto{grid-row:auto!important}.ext-row-span-1{grid-row:span 1/span 1!important}.ext-row-span-2{grid-row:span 2/span 2!important}.ext-row-span-3{grid-row:span 3/span 3!important}.ext-row-span-4{grid-row:span 4/span 4!important}.ext-row-span-5{grid-row:span 5/span 5!important}.ext-row-span-6{grid-row:span 6/span 6!important}.ext-row-span-full{grid-row:1/-1!important}.ext-row-start-1{grid-row-start:1!important}.ext-row-start-2{grid-row-start:2!important}.ext-row-start-3{grid-row-start:3!important}.ext-row-start-4{grid-row-start:4!important}.ext-row-start-5{grid-row-start:5!important}.ext-row-start-6{grid-row-start:6!important}.ext-row-start-7{grid-row-start:7!important}.ext-row-start-auto{grid-row-start:auto!important}.ext-row-end-1{grid-row-end:1!important}.ext-row-end-2{grid-row-end:2!important}.ext-row-end-3{grid-row-end:3!important}.ext-row-end-4{grid-row-end:4!important}.ext-row-end-5{grid-row-end:5!important}.ext-row-end-6{grid-row-end:6!important}.ext-row-end-7{grid-row-end:7!important}.ext-row-end-auto{grid-row-end:auto!important}.ext-m-0:not([style*=margin]){margin:0!important}.ext-m-auto:not([style*=margin]){margin:auto!important}.ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mt-0:not([style*=margin]){margin-top:0!important}.ext-mt-auto:not([style*=margin]){margin-top:auto!important}.ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mr-0:not([style*=margin]){margin-right:0!important}.ext-mr-auto:not([style*=margin]){margin-right:auto!important}.ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-mb-0:not([style*=margin]){margin-bottom:0!important}.ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-ml-0:not([style*=margin]){margin-left:0!important}.ext-ml-auto:not([style*=margin]){margin-left:auto!important}.ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.ext-block{display:block!important}.ext-inline-block{display:inline-block!important}.ext-inline{display:inline!important}.ext-flex{display:flex!important}.ext-inline-flex{display:inline-flex!important}.ext-grid{display:grid!important}.ext-inline-grid{display:inline-grid!important}.ext-hidden{display:none!important}.ext-w-auto{width:auto!important}.ext-w-full{width:100%!important}.ext-max-w-full{max-width:100%!important}.ext-flex-1{flex:1 1 0%!important}.ext-flex-auto{flex:1 1 auto!important}.ext-flex-initial{flex:0 1 auto!important}.ext-flex-none{flex:none!important}.ext-flex-shrink-0{flex-shrink:0!important}.ext-flex-shrink{flex-shrink:1!important}.ext-flex-grow-0{flex-grow:0!important}.ext-flex-grow{flex-grow:1!important}.ext-list-none{list-style-type:none!important}.ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext-grid-cols-none{grid-template-columns:none!important}.ext-grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext-grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext-grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext-grid-rows-4{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext-grid-rows-5{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext-grid-rows-none{grid-template-rows:none!important}.ext-flex-row{flex-direction:row!important}.ext-flex-row-reverse{flex-direction:row-reverse!important}.ext-flex-col{flex-direction:column!important}.ext-flex-col-reverse{flex-direction:column-reverse!important}.ext-flex-wrap{flex-wrap:wrap!important}.ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.ext-flex-nowrap{flex-wrap:nowrap!important}.ext-items-start{align-items:flex-start!important}.ext-items-end{align-items:flex-end!important}.ext-items-center{align-items:center!important}.ext-items-baseline{align-items:baseline!important}.ext-items-stretch{align-items:stretch!important}.ext-justify-start{justify-content:flex-start!important}.ext-justify-end{justify-content:flex-end!important}.ext-justify-center{justify-content:center!important}.ext-justify-between{justify-content:space-between!important}.ext-justify-around{justify-content:space-around!important}.ext-justify-evenly{justify-content:space-evenly!important}.ext-justify-items-start{justify-items:start!important}.ext-justify-items-end{justify-items:end!important}.ext-justify-items-center{justify-items:center!important}.ext-justify-items-stretch{justify-items:stretch!important}.ext-gap-0{gap:0!important}.ext-gap-base{gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-lg{gap:var(--extendify--spacing--large)!important}.ext-gap-x-0{-moz-column-gap:0!important;column-gap:0!important}.ext-gap-x-base{-moz-column-gap:var(--wp--style--block-gap,2rem)!important;column-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-x-lg{-moz-column-gap:var(--extendify--spacing--large)!important;column-gap:var(--extendify--spacing--large)!important}.ext-gap-y-0{row-gap:0!important}.ext-gap-y-base{row-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-y-lg{row-gap:var(--extendify--spacing--large)!important}.ext-justify-self-auto{justify-self:auto!important}.ext-justify-self-start{justify-self:start!important}.ext-justify-self-end{justify-self:end!important}.ext-justify-self-center{justify-self:center!important}.ext-justify-self-stretch{justify-self:stretch!important}.ext-rounded-none{border-radius:0!important}.ext-rounded-full{border-radius:9999px!important}.ext-rounded-t-none{border-top-left-radius:0!important;border-top-right-radius:0!important}.ext-rounded-t-full{border-top-left-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.ext-rounded-r-full{border-bottom-right-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ext-rounded-b-full{border-bottom-left-radius:9999px!important;border-bottom-right-radius:9999px!important}.ext-rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.ext-rounded-l-full{border-bottom-left-radius:9999px!important;border-top-left-radius:9999px!important}.ext-rounded-tl-none{border-top-left-radius:0!important}.ext-rounded-tl-full{border-top-left-radius:9999px!important}.ext-rounded-tr-none{border-top-right-radius:0!important}.ext-rounded-tr-full{border-top-right-radius:9999px!important}.ext-rounded-br-none{border-bottom-right-radius:0!important}.ext-rounded-br-full{border-bottom-right-radius:9999px!important}.ext-rounded-bl-none{border-bottom-left-radius:0!important}.ext-rounded-bl-full{border-bottom-left-radius:9999px!important}.ext-border-0{border-width:0!important}.ext-border-t-0{border-top-width:0!important}.ext-border-r-0{border-right-width:0!important}.ext-border-b-0{border-bottom-width:0!important}.ext-border-l-0{border-left-width:0!important}.ext-p-0:not([style*=padding]){padding:0!important}.ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.ext-pt-0:not([style*=padding]){padding-top:0!important}.ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.ext-pr-0:not([style*=padding]){padding-right:0!important}.ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.ext-pb-0:not([style*=padding]){padding-bottom:0!important}.ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.ext-pl-0:not([style*=padding]){padding-left:0!important}.ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.ext-text-left{text-align:left!important}.ext-text-center{text-align:center!important}.ext-text-right{text-align:right!important}.ext-leading-none{line-height:1!important}.ext-leading-tight{line-height:1.25!important}.ext-leading-snug{line-height:1.375!important}.ext-leading-normal{line-height:1.5!important}.ext-leading-relaxed{line-height:1.625!important}.ext-leading-loose{line-height:2!important}.clip-path--rhombus img{-webkit-clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%);clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%)}.clip-path--diamond img{-webkit-clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%);clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%)}.clip-path--rhombus-alt img{-webkit-clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%);clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%)}.wp-block-columns[class*=fullwidth-cols]{margin-bottom:unset}.ext .wp-block-columns .wp-block-column[style*=padding]{padding-left:0!important;padding-right:0!important}.ext .wp-block-columns+.wp-block-columns:not([class*=mt-]):not([class*=my-]):not([style*=margin]){margin-top:0!important}[class*=fullwidth-cols] .wp-block-column:first-child,[class*=fullwidth-cols] .wp-block-group:first-child{margin-top:0}[class*=fullwidth-cols] .wp-block-column:last-child,[class*=fullwidth-cols] .wp-block-group:last-child{margin-bottom:0}[class*=fullwidth-cols] .wp-block-column :first-child,[class*=fullwidth-cols] .wp-block-column:first-child *{margin-top:0}.ext .is-not-stacked-on-mobile .wp-block-column,[class*=fullwidth-cols] .wp-block-column :last-child{margin-bottom:0}.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)}@media (min-width:782px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:0}}.wp-block-columns[class*=fullwidth-cols].is-not-stacked-on-mobile>.wp-block-column{margin-bottom:0!important}@media (min-width:600px) and (max-width:781px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (max-width:781px){.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}}@media (max-width:1079px){.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)!important}}.direction-rtl{direction:rtl}.direction-ltr{direction:ltr}.is-style-inline-list{padding-left:0!important}.is-style-inline-list li{list-style-type:none!important}@media (min-width:782px){.is-style-inline-list li{display:inline!important;margin-right:var(--wp--style--block-gap,2rem)!important}}@media (min-width:782px){.is-style-inline-list li:first-child{margin-left:0!important}}@media (min-width:782px){.is-style-inline-list li:last-child{margin-right:0!important}}.bring-to-front{position:relative;z-index:10}.text-stroke{-webkit-text-stroke-color:var(--wp--preset--color--background)}.text-stroke,.text-stroke--primary{-webkit-text-stroke-width:var(--wp--custom--typography--text-stroke-width,2px )}.text-stroke--primary{-webkit-text-stroke-color:var(--wp--preset--color--primary)}.text-stroke--secondary{-webkit-text-stroke-width:var(--wp--custom--typography--text-stroke-width,2px );-webkit-text-stroke-color:var(--wp--preset--color--secondary)}.editor\:no-caption .block-editor-rich-text__editable{display:none!important}.editor\:no-inserter .wp-block-column:not(.is-selected)>.block-list-appender,.editor\:no-inserter .wp-block-cover__inner-container>.block-list-appender,.editor\:no-inserter .wp-block-group__inner-container>.block-list-appender,.editor\:no-inserter>.block-list-appender{display:none}.editor\:no-resize .components-resizable-box__handle,.editor\:no-resize .components-resizable-box__handle:after,.editor\:no-resize .components-resizable-box__side-handle:before{display:none;pointer-events:none}.editor\:no-resize .components-resizable-box__container{display:block}.editor\:pointer-events-none{pointer-events:none}.is-style-angled{justify-content:flex-end}.ext .is-style-angled>[class*=_inner-container],.is-style-angled{align-items:center}.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,30% 0,50% 100%,0 100%);clip-path:polygon(0 0,30% 0,50% 100%,0 100%);z-index:1}@media (min-width:782px){.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,55% 0,65% 100%,0 100%);clip-path:polygon(0 0,55% 0,65% 100%,0 100%)}}.ext .wp-block[data-align=wide]{margin-bottom:0!important;margin-top:0!important}.has-foreground-color{color:var(--wp--preset--color--foreground,#000)!important}.has-foreground-background-color{background-color:var(--wp--preset--color--foreground,#000)!important}.has-background-color{color:var(--wp--preset--color--background,#fff)!important}.has-background-background-color{background-color:var(--wp--preset--color--background,#fff)!important}.has-primary-color{color:var(--wp--preset--color--primary,#4b5563)!important}.has-primary-background-color{background-color:var(--wp--preset--color--primary,#4b5563)!important}.has-secondary-color{color:var(--wp--preset--color--secondary,#9ca3af)!important}.has-secondary-background-color{background-color:var(--wp--preset--color--secondary,#9ca3af)!important}.ext.has-text-color h1,.ext.has-text-color h2,.ext.has-text-color h3,.ext.has-text-color h4,.ext.has-text-color h5,.ext.has-text-color h6,.ext.has-text-color p{color:currentColor}.editor-styles-wrapper .has-gigantic-font-size.wp-block,.has-gigantic-font-size{--fallback-size:clamp(var(--wp--preset--font-size--huge,22px),calc(1rem + var(--wp--custom--typography--gigantic--preferred, 5vw)),var(--wp--preset--font-size--huge,42px) * 2);font-size:var( --wp--preset--font-size--gigantic,var(--fallback-size ) )}.ext .ext-grid>[class*=_inner-container]{display:grid}.ext>[class*=_inner-container]>.ext-grid:not([class*=columns]),.ext>[class*=_inner-container]>.wp-block>.ext-grid:not([class*=columns]){display:initial!important}.ext .ext-grid-cols-1>[class*=_inner-container]{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-cols-2>[class*=_inner-container]{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-cols-3>[class*=_inner-container]{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-cols-4>[class*=_inner-container]{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-cols-5>[class*=_inner-container]{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-cols-6>[class*=_inner-container]{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-cols-7>[class*=_inner-container]{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext .ext-grid-cols-8>[class*=_inner-container]{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext .ext-grid-cols-9>[class*=_inner-container]{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext .ext-grid-cols-10>[class*=_inner-container]{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext .ext-grid-cols-11>[class*=_inner-container]{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext .ext-grid-cols-12>[class*=_inner-container]{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext .ext-grid-cols-13>[class*=_inner-container]{grid-template-columns:repeat(13,minmax(0,1fr))!important}.ext .ext-grid-cols-none>[class*=_inner-container]{grid-template-columns:none!important}.ext .ext-grid-rows-1>[class*=_inner-container]{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-rows-2>[class*=_inner-container]{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-rows-3>[class*=_inner-container]{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-rows-4>[class*=_inner-container]{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-rows-5>[class*=_inner-container]{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-rows-6>[class*=_inner-container]{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-rows-none>[class*=_inner-container]{grid-template-rows:none!important}.ext .ext-items-start>[class*=_inner-container]{align-items:flex-start!important}.ext .ext-items-end>[class*=_inner-container]{align-items:flex-end!important}.ext .ext-items-center>[class*=_inner-container]{align-items:center!important}.ext .ext-items-baseline>[class*=_inner-container]{align-items:baseline!important}.ext .ext-items-stretch>[class*=_inner-container]{align-items:stretch!important}.ext.wp-block-group>:last-child{margin-bottom:0}.ext .wp-block-group__inner-container{padding:0!important}.ext.has-background{padding-left:var(--wp--style--block-gap,2rem);padding-right:var(--wp--style--block-gap,2rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]{max-width:var(--responsive--alignwide-width,120rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]>*{max-width:100%!important}.ext [class*=inner-container]>.alignfull [class*=inner-container]{max-width:100%}.ext [class*=inner-container]>.alignfull [class*=inner-container]>*{max-width:100%!important}.ext .wp-block-image{position:relative;text-align:center}.ext .wp-block-image img{display:inline-block;vertical-align:middle}body{--extendify--spacing--large:var(--wp--custom--spacing--large,clamp(2em,8vw,8em))}.ast-separate-container .ext .block-editor-block-list__layout{padding:0!important}.ext [data-block].wp-block-buttons .wp-block-button{margin-bottom:0;margin-top:0}.ext [data-block].wp-block-buttons .wp-block-button:first-child{margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:0!important}.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull{margin-bottom:unset;margin-top:unset}.ext .alignwide{margin-left:auto!important;margin-right:auto!important}@media (min-width:782px){.tablet\:ext-absolute{position:absolute!important}.tablet\:ext-relative{position:relative!important}.tablet\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-top-lg{top:var(--extendify--spacing--large)!important}.tablet\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-right-lg{right:var(--extendify--spacing--large)!important}.tablet\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.tablet\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-left-lg{left:var(--extendify--spacing--large)!important}.tablet\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-order-1{order:1!important}.tablet\:ext-order-2{order:2!important}.tablet\:ext-m-0:not([style*=margin]){margin:0!important}.tablet\:ext-m-auto:not([style*=margin]){margin:auto!important}.tablet\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.tablet\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.tablet\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.tablet\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.tablet\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.tablet\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mt-0:not([style*=margin]){margin-top:0!important}.tablet\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.tablet\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mr-0:not([style*=margin]){margin-right:0!important}.tablet\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.tablet\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.tablet\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.tablet\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.tablet\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-ml-0:not([style*=margin]){margin-left:0!important}.tablet\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.tablet\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.tablet\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-block{display:block!important}.tablet\:ext-inline-block{display:inline-block!important}.tablet\:ext-inline{display:inline!important}.tablet\:ext-flex{display:flex!important}.tablet\:ext-inline-flex{display:inline-flex!important}.tablet\:ext-grid{display:grid!important}.tablet\:ext-inline-grid{display:inline-grid!important}.tablet\:ext-hidden{display:none!important}.tablet\:ext-w-auto{width:auto!important}.tablet\:ext-w-full{width:100%!important}.tablet\:ext-max-w-full{max-width:100%!important}.tablet\:ext-flex-1{flex:1 1 0%!important}.tablet\:ext-flex-auto{flex:1 1 auto!important}.tablet\:ext-flex-initial{flex:0 1 auto!important}.tablet\:ext-flex-none{flex:none!important}.tablet\:ext-flex-shrink-0{flex-shrink:0!important}.tablet\:ext-flex-shrink{flex-shrink:1!important}.tablet\:ext-flex-grow-0{flex-grow:0!important}.tablet\:ext-flex-grow{flex-grow:1!important}.tablet\:ext-list-none{list-style-type:none!important}.tablet\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.tablet\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tablet\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.tablet\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.tablet\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.tablet\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.tablet\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.tablet\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.tablet\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.tablet\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.tablet\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.tablet\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.tablet\:ext-grid-cols-none{grid-template-columns:none!important}.tablet\:ext-flex-row{flex-direction:row!important}.tablet\:ext-flex-row-reverse{flex-direction:row-reverse!important}.tablet\:ext-flex-col{flex-direction:column!important}.tablet\:ext-flex-col-reverse{flex-direction:column-reverse!important}.tablet\:ext-flex-wrap{flex-wrap:wrap!important}.tablet\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.tablet\:ext-flex-nowrap{flex-wrap:nowrap!important}.tablet\:ext-items-start{align-items:flex-start!important}.tablet\:ext-items-end{align-items:flex-end!important}.tablet\:ext-items-center{align-items:center!important}.tablet\:ext-items-baseline{align-items:baseline!important}.tablet\:ext-items-stretch{align-items:stretch!important}.tablet\:ext-justify-start{justify-content:flex-start!important}.tablet\:ext-justify-end{justify-content:flex-end!important}.tablet\:ext-justify-center{justify-content:center!important}.tablet\:ext-justify-between{justify-content:space-between!important}.tablet\:ext-justify-around{justify-content:space-around!important}.tablet\:ext-justify-evenly{justify-content:space-evenly!important}.tablet\:ext-justify-items-start{justify-items:start!important}.tablet\:ext-justify-items-end{justify-items:end!important}.tablet\:ext-justify-items-center{justify-items:center!important}.tablet\:ext-justify-items-stretch{justify-items:stretch!important}.tablet\:ext-justify-self-auto{justify-self:auto!important}.tablet\:ext-justify-self-start{justify-self:start!important}.tablet\:ext-justify-self-end{justify-self:end!important}.tablet\:ext-justify-self-center{justify-self:center!important}.tablet\:ext-justify-self-stretch{justify-self:stretch!important}.tablet\:ext-p-0:not([style*=padding]){padding:0!important}.tablet\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.tablet\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.tablet\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.tablet\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pt-0:not([style*=padding]){padding-top:0!important}.tablet\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pr-0:not([style*=padding]){padding-right:0!important}.tablet\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.tablet\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.tablet\:ext-pl-0:not([style*=padding]){padding-left:0!important}.tablet\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.tablet\:ext-text-left{text-align:left!important}.tablet\:ext-text-center{text-align:center!important}.tablet\:ext-text-right{text-align:right!important}}@media (min-width:1080px){.desktop\:ext-absolute{position:absolute!important}.desktop\:ext-relative{position:relative!important}.desktop\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-top-lg{top:var(--extendify--spacing--large)!important}.desktop\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-right-lg{right:var(--extendify--spacing--large)!important}.desktop\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.desktop\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-left-lg{left:var(--extendify--spacing--large)!important}.desktop\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-order-1{order:1!important}.desktop\:ext-order-2{order:2!important}.desktop\:ext-m-0:not([style*=margin]){margin:0!important}.desktop\:ext-m-auto:not([style*=margin]){margin:auto!important}.desktop\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.desktop\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.desktop\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.desktop\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.desktop\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.desktop\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mt-0:not([style*=margin]){margin-top:0!important}.desktop\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.desktop\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mr-0:not([style*=margin]){margin-right:0!important}.desktop\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.desktop\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.desktop\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.desktop\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.desktop\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-ml-0:not([style*=margin]){margin-left:0!important}.desktop\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.desktop\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.desktop\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-block{display:block!important}.desktop\:ext-inline-block{display:inline-block!important}.desktop\:ext-inline{display:inline!important}.desktop\:ext-flex{display:flex!important}.desktop\:ext-inline-flex{display:inline-flex!important}.desktop\:ext-grid{display:grid!important}.desktop\:ext-inline-grid{display:inline-grid!important}.desktop\:ext-hidden{display:none!important}.desktop\:ext-w-auto{width:auto!important}.desktop\:ext-w-full{width:100%!important}.desktop\:ext-max-w-full{max-width:100%!important}.desktop\:ext-flex-1{flex:1 1 0%!important}.desktop\:ext-flex-auto{flex:1 1 auto!important}.desktop\:ext-flex-initial{flex:0 1 auto!important}.desktop\:ext-flex-none{flex:none!important}.desktop\:ext-flex-shrink-0{flex-shrink:0!important}.desktop\:ext-flex-shrink{flex-shrink:1!important}.desktop\:ext-flex-grow-0{flex-grow:0!important}.desktop\:ext-flex-grow{flex-grow:1!important}.desktop\:ext-list-none{list-style-type:none!important}.desktop\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.desktop\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.desktop\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.desktop\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.desktop\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.desktop\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.desktop\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.desktop\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.desktop\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.desktop\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.desktop\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.desktop\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.desktop\:ext-grid-cols-none{grid-template-columns:none!important}.desktop\:ext-flex-row{flex-direction:row!important}.desktop\:ext-flex-row-reverse{flex-direction:row-reverse!important}.desktop\:ext-flex-col{flex-direction:column!important}.desktop\:ext-flex-col-reverse{flex-direction:column-reverse!important}.desktop\:ext-flex-wrap{flex-wrap:wrap!important}.desktop\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.desktop\:ext-flex-nowrap{flex-wrap:nowrap!important}.desktop\:ext-items-start{align-items:flex-start!important}.desktop\:ext-items-end{align-items:flex-end!important}.desktop\:ext-items-center{align-items:center!important}.desktop\:ext-items-baseline{align-items:baseline!important}.desktop\:ext-items-stretch{align-items:stretch!important}.desktop\:ext-justify-start{justify-content:flex-start!important}.desktop\:ext-justify-end{justify-content:flex-end!important}.desktop\:ext-justify-center{justify-content:center!important}.desktop\:ext-justify-between{justify-content:space-between!important}.desktop\:ext-justify-around{justify-content:space-around!important}.desktop\:ext-justify-evenly{justify-content:space-evenly!important}.desktop\:ext-justify-items-start{justify-items:start!important}.desktop\:ext-justify-items-end{justify-items:end!important}.desktop\:ext-justify-items-center{justify-items:center!important}.desktop\:ext-justify-items-stretch{justify-items:stretch!important}.desktop\:ext-justify-self-auto{justify-self:auto!important}.desktop\:ext-justify-self-start{justify-self:start!important}.desktop\:ext-justify-self-end{justify-self:end!important}.desktop\:ext-justify-self-center{justify-self:center!important}.desktop\:ext-justify-self-stretch{justify-self:stretch!important}.desktop\:ext-p-0:not([style*=padding]){padding:0!important}.desktop\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.desktop\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.desktop\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.desktop\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pt-0:not([style*=padding]){padding-top:0!important}.desktop\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pr-0:not([style*=padding]){padding-right:0!important}.desktop\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.desktop\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.desktop\:ext-pl-0:not([style*=padding]){padding-left:0!important}.desktop\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.desktop\:ext-text-left{text-align:left!important}.desktop\:ext-text-center{text-align:center!important}.desktop\:ext-text-right{text-align:right!important}}
|
{extendify-sdk → redux-core/extendify-sdk}/public/editorplus/editorplus.min.js
RENAMED
File without changes
|
redux-core/extendify-sdk/public/editorplus/editorplus.min.js.LICENSE.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @license
|
3 |
+
* Lodash <https://lodash.com/>
|
4 |
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
5 |
+
* Released under MIT license <https://lodash.com/license>
|
6 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
7 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
8 |
+
*/
|
{extendify-sdk → redux-core/extendify-sdk}/readme.md
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/readme.txt
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
-
Stable tag: 7
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
+
Stable tag: 11.7
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
{extendify-sdk → redux-core/extendify-sdk}/routes/api.php
RENAMED
@@ -13,6 +13,7 @@ use Extendify\ExtendifySdk\Controllers\MetaController;
|
|
13 |
use Extendify\ExtendifySdk\Controllers\PingController;
|
14 |
use Extendify\ExtendifySdk\Controllers\UserController;
|
15 |
use Extendify\ExtendifySdk\Controllers\PluginController;
|
|
|
16 |
use Extendify\ExtendifySdk\Controllers\TaxonomyController;
|
17 |
use Extendify\ExtendifySdk\Controllers\TemplateController;
|
18 |
|
@@ -23,7 +24,7 @@ use Extendify\ExtendifySdk\Controllers\TemplateController;
|
|
23 |
ApiRouter::get('/plugins', [PluginController::class, 'index']);
|
24 |
ApiRouter::post('/plugins', [PluginController::class, 'install']);
|
25 |
|
26 |
-
ApiRouter::get('/taxonomies', [TaxonomyController::class, 'index']);
|
27 |
|
28 |
ApiRouter::post('/templates', [TemplateController::class, 'index']);
|
29 |
ApiRouter::post('/templates/(?P<template_id>[a-zA-Z0-9-]+)', [TemplateController::class, 'ping']);
|
@@ -39,5 +40,8 @@ use Extendify\ExtendifySdk\Controllers\TemplateController;
|
|
39 |
|
40 |
ApiRouter::get('/meta-data', [MetaController::class, 'getAll']);
|
41 |
ApiRouter::post('/simple-ping', [PingController::class, 'ping']);
|
|
|
|
|
|
|
42 |
}
|
43 |
);
|
13 |
use Extendify\ExtendifySdk\Controllers\PingController;
|
14 |
use Extendify\ExtendifySdk\Controllers\UserController;
|
15 |
use Extendify\ExtendifySdk\Controllers\PluginController;
|
16 |
+
use Extendify\ExtendifySdk\Controllers\SiteSettingsController;
|
17 |
use Extendify\ExtendifySdk\Controllers\TaxonomyController;
|
18 |
use Extendify\ExtendifySdk\Controllers\TemplateController;
|
19 |
|
24 |
ApiRouter::get('/plugins', [PluginController::class, 'index']);
|
25 |
ApiRouter::post('/plugins', [PluginController::class, 'install']);
|
26 |
|
27 |
+
ApiRouter::get('/taxonomies-simple', [TaxonomyController::class, 'index']);
|
28 |
|
29 |
ApiRouter::post('/templates', [TemplateController::class, 'index']);
|
30 |
ApiRouter::post('/templates/(?P<template_id>[a-zA-Z0-9-]+)', [TemplateController::class, 'ping']);
|
40 |
|
41 |
ApiRouter::get('/meta-data', [MetaController::class, 'getAll']);
|
42 |
ApiRouter::post('/simple-ping', [PingController::class, 'ping']);
|
43 |
+
|
44 |
+
ApiRouter::get('/site-settings', [SiteSettingsController::class, 'show']);
|
45 |
+
ApiRouter::post('/site-settings', [SiteSettingsController::class, 'store']);
|
46 |
}
|
47 |
);
|
redux-core/extendify-sdk/src/ExtendifyLibrary.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {
|
2 |
+
useEffect, useCallback, useState,
|
3 |
+
} from '@wordpress/element'
|
4 |
+
import { useGlobalStore } from './state/GlobalState'
|
5 |
+
import { useUserStore } from './state/User'
|
6 |
+
import { useTemplatesStore } from './state/Templates'
|
7 |
+
import MainWindow from './pages/parts/MainWindow'
|
8 |
+
import './utility-control'
|
9 |
+
import useTaxonomies from './hooks/useTaxonomies'
|
10 |
+
|
11 |
+
export default function ExtendifyLibrary({ show = false }) {
|
12 |
+
const open = useGlobalStore(state => state.open)
|
13 |
+
const setOpen = useGlobalStore(state => state.setOpen)
|
14 |
+
const [ready, setReady] = useState(false)
|
15 |
+
const showLibrary = useCallback(() => setOpen(true), [setOpen])
|
16 |
+
const hideLibrary = useCallback(() => setOpen(false), [setOpen])
|
17 |
+
const initTemplateData = useTemplatesStore(state => state.initTemplateData)
|
18 |
+
|
19 |
+
// When the uuid of the user comes back from the database, we can
|
20 |
+
// assume that the state object is ready. This is important to check
|
21 |
+
// as the library may be "open" when loaded, but not ready.
|
22 |
+
const userStoreReady = useUserStore(state => state.uuid.length > 0)
|
23 |
+
const templatesStoreReady = useTemplatesStore(state => Object.keys(state.taxonomyDefaultState).length > 0)
|
24 |
+
useTaxonomies(open)
|
25 |
+
|
26 |
+
useEffect(() => {
|
27 |
+
if (userStoreReady && templatesStoreReady) {
|
28 |
+
// TODO: temporary needed until single views are removed.
|
29 |
+
if (useGlobalStore.getState().currentPage === 'single') {
|
30 |
+
useGlobalStore.setState({
|
31 |
+
currentPage: 'main',
|
32 |
+
})
|
33 |
+
}
|
34 |
+
initTemplateData()
|
35 |
+
setReady(true)
|
36 |
+
}
|
37 |
+
}, [userStoreReady, templatesStoreReady, initTemplateData])
|
38 |
+
|
39 |
+
useEffect(() => {
|
40 |
+
show && setOpen(true)
|
41 |
+
}, [show, setOpen])
|
42 |
+
|
43 |
+
// Let the visibility to be controlled from outside the application
|
44 |
+
useEffect(() => {
|
45 |
+
window.addEventListener('extendify-sdk::open-library', showLibrary)
|
46 |
+
window.addEventListener('extendify-sdk::close-library', hideLibrary)
|
47 |
+
return () => {
|
48 |
+
window.removeEventListener('extendify-sdk::open-library', showLibrary)
|
49 |
+
window.removeEventListener('extendify-sdk::close-library', hideLibrary)
|
50 |
+
}
|
51 |
+
}, [hideLibrary, showLibrary])
|
52 |
+
|
53 |
+
if (!ready) {
|
54 |
+
return null
|
55 |
+
}
|
56 |
+
return <MainWindow/>
|
57 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/api/General.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/api/Plugins.js
RENAMED
File without changes
|
redux-core/extendify-sdk/src/api/SiteSettings.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Axios as api } from './axios'
|
2 |
+
|
3 |
+
export const SiteSettings = {
|
4 |
+
getData() {
|
5 |
+
return api.get('site-settings')
|
6 |
+
},
|
7 |
+
setData(data) {
|
8 |
+
const formData = new FormData()
|
9 |
+
formData.append('data', JSON.stringify(data))
|
10 |
+
return api.post(
|
11 |
+
'site-settings', formData, {
|
12 |
+
headers: {
|
13 |
+
'Content-Type': 'multipart/form-data',
|
14 |
+
},
|
15 |
+
},
|
16 |
+
)
|
17 |
+
},
|
18 |
+
}
|
redux-core/extendify-sdk/src/api/Taxonomies.js
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Axios as api } from './axios'
|
2 |
+
|
3 |
+
export const Taxonomies = {
|
4 |
+
async get() {
|
5 |
+
const taxonomies = await api.get('taxonomies-simple')
|
6 |
+
if (taxonomies['tax_pattern_types_2.0']) {
|
7 |
+
taxonomies.tax_pattern_types = taxonomies['tax_pattern_types_2.0']
|
8 |
+
delete taxonomies['tax_pattern_types_2.0']
|
9 |
+
}
|
10 |
+
if (taxonomies['tax_page_types_2.0']) {
|
11 |
+
taxonomies.tax_page_types = taxonomies['tax_page_types_2.0']
|
12 |
+
delete taxonomies['tax_page_types_2.0']
|
13 |
+
}
|
14 |
+
return taxonomies
|
15 |
+
},
|
16 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/api/Templates.js
RENAMED
@@ -1,6 +1,7 @@
|
|
1 |
-
import { createTemplatesFilterFormula } from '../util/airtable'
|
2 |
import { Axios as api } from './axios'
|
3 |
import { templates as config } from '../config'
|
|
|
|
|
4 |
|
5 |
let count = 0
|
6 |
|
@@ -8,7 +9,7 @@ export const Templates = {
|
|
8 |
async get(searchParams, options = {}) {
|
9 |
count++
|
10 |
const templates = await api.post('templates', {
|
11 |
-
filterByFormula:
|
12 |
pageSize: options?.pageSize ?? config.templatesPerRequest,
|
13 |
categories: searchParams.taxonomies,
|
14 |
search: searchParams.search,
|
@@ -16,6 +17,7 @@ export const Templates = {
|
|
16 |
offset: options.offset ?? '',
|
17 |
initial: count === 1,
|
18 |
request_count: count,
|
|
|
19 |
})
|
20 |
return templates
|
21 |
},
|
@@ -63,3 +65,44 @@ export const Templates = {
|
|
63 |
})
|
64 |
},
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import { Axios as api } from './axios'
|
2 |
import { templates as config } from '../config'
|
3 |
+
import { useTaxonomyStore } from '../state/Taxonomies'
|
4 |
+
import { useUserStore } from '../state/User'
|
5 |
|
6 |
let count = 0
|
7 |
|
9 |
async get(searchParams, options = {}) {
|
10 |
count++
|
11 |
const templates = await api.post('templates', {
|
12 |
+
filterByFormula: prepareFilterFormula(searchParams),
|
13 |
pageSize: options?.pageSize ?? config.templatesPerRequest,
|
14 |
categories: searchParams.taxonomies,
|
15 |
search: searchParams.search,
|
17 |
offset: options.offset ?? '',
|
18 |
initial: count === 1,
|
19 |
request_count: count,
|
20 |
+
sdk_partner: useUserStore.getState().sdkPartner ?? '',
|
21 |
})
|
22 |
return templates
|
23 |
},
|
65 |
})
|
66 |
},
|
67 |
}
|
68 |
+
|
69 |
+
const prepareFilterFormula = (filters) => {
|
70 |
+
let { taxonomies, type } = filters
|
71 |
+
taxonomies = { ... taxonomies }
|
72 |
+
const formula = []
|
73 |
+
|
74 |
+
// In Airtable, we tag them as Default
|
75 |
+
if (taxonomies?.tax_categories === 'Unknown') {
|
76 |
+
taxonomies.tax_categories = 'Default'
|
77 |
+
}
|
78 |
+
|
79 |
+
// Builds the taxonomy list by looping over all supplied taxonomies
|
80 |
+
const taxFormula = Object.entries(taxonomies)
|
81 |
+
.filter(([tax, term]) => checkTermIsAvailableOnType(
|
82 |
+
tax, term, type,
|
83 |
+
))
|
84 |
+
.filter(([tax]) => Boolean(tax[1].length))
|
85 |
+
.map(([tax, term]) => `${tax} = "${term}"`)
|
86 |
+
.join(', ')
|
87 |
+
|
88 |
+
taxFormula.length && formula.push(taxFormula)
|
89 |
+
type.length && formula.push(`{type}="${type}"`)
|
90 |
+
|
91 |
+
return formula.length
|
92 |
+
? `AND(${formula.join(', ')})`.replace(/\r?\n|\r/g, '')
|
93 |
+
: ''
|
94 |
+
}
|
95 |
+
|
96 |
+
const termTypeMap = new Map()
|
97 |
+
const checkTermIsAvailableOnType = (
|
98 |
+
tax, term, type,
|
99 |
+
) => {
|
100 |
+
const key = `${tax}-${term}-${type}`
|
101 |
+
if (key === 'tax_categories-Default-pattern') {
|
102 |
+
return true
|
103 |
+
}
|
104 |
+
if (!termTypeMap.has(key)) {
|
105 |
+
termTypeMap.set(key, useTaxonomyStore.getState()?.taxonomies[tax]?.find((item) => item?.term === term)?.type?.includes(type))
|
106 |
+
}
|
107 |
+
return termTypeMap.get(key)
|
108 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/api/User.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/api/axios.js
RENAMED
File without changes
|
redux-core/extendify-sdk/src/app.css
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Adding CSS classes should be done with consideration and rarely */
|
2 |
+
@tailwind base;
|
3 |
+
@tailwind components;
|
4 |
+
@tailwind utilities;
|
5 |
+
|
6 |
+
.extendify-sdk {
|
7 |
+
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
8 |
+
--tw-ring-offset-width: 0px;
|
9 |
+
--tw-ring-offset-color: transparent;
|
10 |
+
--tw-ring-color: var(--wp-admin-theme-color);
|
11 |
+
}
|
12 |
+
|
13 |
+
.extendify-sdk *, .extendify-sdk *:after, .extendify-sdk *:before {
|
14 |
+
box-sizing: border-box;
|
15 |
+
border: 0 solid #e5e7eb;
|
16 |
+
}
|
17 |
+
.extendify-sdk .button-focus {
|
18 |
+
@apply focus:ring-wp focus:ring-wp-theme-500 outline-none focus:shadow-none;
|
19 |
+
}
|
20 |
+
.extendify-sdk select.button-focus,
|
21 |
+
.extendify-sdk input.button-focus {
|
22 |
+
@apply focus:border-transparent focus:outline-none focus:shadow-none;
|
23 |
+
}
|
24 |
+
|
25 |
+
.button-extendify-main {
|
26 |
+
@apply bg-extendify-main button-focus cursor-pointer transition duration-200 p-1.5 px-3 text-white hover:text-white no-underline hover:bg-extendify-main-dark active:bg-gray-900 active:text-white focus:text-white whitespace-nowrap;
|
27 |
+
}
|
28 |
+
#extendify-search-input:focus ~ svg,
|
29 |
+
#extendify-search-input:not(:placeholder-shown) ~ svg {
|
30 |
+
@apply hidden;
|
31 |
+
}
|
32 |
+
#extendify-search-input::-webkit-textfield-decoration-container {
|
33 |
+
@apply mr-3;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* WP tweaks and overrides */
|
37 |
+
.extendify-sdk .components-panel__body > .components-panel__body-title {
|
38 |
+
/* Override WP aggressive boder:none and border:0 */
|
39 |
+
border-bottom: 1px solid #e0e0e0 !important;
|
40 |
+
@apply bg-transparent;
|
41 |
+
}
|
42 |
+
.extendify-sdk .components-modal__header {
|
43 |
+
@apply border-b border-gray-300;
|
44 |
+
}
|
45 |
+
|
46 |
+
/* Special input animation */
|
47 |
+
.extendify-special-input:placeholder-shown ~ label {
|
48 |
+
@apply top-1.5;
|
49 |
+
@apply text-sm;
|
50 |
+
@apply text-gray-600;
|
51 |
+
}
|
52 |
+
|
53 |
+
.extendify-special-input:focus ~ label {
|
54 |
+
@apply -top-4;
|
55 |
+
@apply text-xs;
|
56 |
+
@apply text-extendify-main;
|
57 |
+
}
|
58 |
+
|
59 |
+
/* A shim to ensure live previews w/o iframes display properly */
|
60 |
+
.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container > .ext {
|
61 |
+
@apply max-w-none;
|
62 |
+
}
|
63 |
+
|
64 |
+
/* Ensure our patterns display fullwidth on old themes + < 5.9 */
|
65 |
+
.block-editor-block-list__layout.is-root-container .ext.block-editor-block-list__block {
|
66 |
+
@apply max-w-full;
|
67 |
+
}
|
68 |
+
|
69 |
+
.extendify-sdk .block-editor-block-preview__container {
|
70 |
+
/* no important */
|
71 |
+
@apply opacity-0;
|
72 |
+
animation: extendifyOpacityIn 200ms cubic-bezier(0.694, 0, 0.335, 1) forwards 0ms;
|
73 |
+
}
|
74 |
+
|
75 |
+
/* Remove excess margin for top-level patterns on < 5.9 */
|
76 |
+
.extendify-sdk .is-root-container > [data-block],
|
77 |
+
.extendify-sdk .is-root-container > [data-align="full"],
|
78 |
+
.extendify-sdk .is-root-container > [data-align="full"] > .wp-block {
|
79 |
+
@apply my-0 !important;
|
80 |
+
}
|
81 |
+
|
82 |
+
/* Remove excess margin for top-level patterns on 5.9+ */
|
83 |
+
.editor-styles-wrapper:not(.block-editor-writing-flow) > .is-root-container :where(.wp-block)[data-align=full] {
|
84 |
+
@apply my-0 !important;
|
85 |
+
}
|
86 |
+
|
87 |
+
@keyframes extendifyOpacityIn {
|
88 |
+
0% { opacity: 0 }
|
89 |
+
100% { opacity: 1 }
|
90 |
+
}
|
91 |
+
|
92 |
+
.extendify-sdk .with-light-shadow::after {
|
93 |
+
content: '';
|
94 |
+
@apply absolute inset-0 border-0 shadow-inner-sm;
|
95 |
+
}
|
96 |
+
.extendify-sdk .with-light-shadow:hover::after {
|
97 |
+
@apply shadow-inner-md;
|
98 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/app.js
RENAMED
@@ -1,7 +1,8 @@
|
|
1 |
import ExtendifyLibrary from './ExtendifyLibrary'
|
2 |
import { render } from '@wordpress/element'
|
3 |
import { useWantedTemplateStore } from './state/Importing'
|
4 |
-
import {
|
|
|
5 |
import './buttons'
|
6 |
import './listeners'
|
7 |
|
@@ -20,7 +21,7 @@ window._wpLoadBlockEditor && window.wp.domReady(() => {
|
|
20 |
// fix a bug where imports would go from 3->0.
|
21 |
if (useWantedTemplateStore.getState().importOnLoad) {
|
22 |
const template = useWantedTemplateStore.getState().wantedTemplate
|
23 |
-
setTimeout(() => {
|
24 |
}
|
25 |
|
26 |
// Reset template state after checking if we need an import
|
1 |
import ExtendifyLibrary from './ExtendifyLibrary'
|
2 |
import { render } from '@wordpress/element'
|
3 |
import { useWantedTemplateStore } from './state/Importing'
|
4 |
+
import { injectTemplateBlocks } from './util/templateInjection'
|
5 |
+
import { rawHandler } from '@wordpress/blocks'
|
6 |
import './buttons'
|
7 |
import './listeners'
|
8 |
|
21 |
// fix a bug where imports would go from 3->0.
|
22 |
if (useWantedTemplateStore.getState().importOnLoad) {
|
23 |
const template = useWantedTemplateStore.getState().wantedTemplate
|
24 |
+
setTimeout(() => { injectTemplateBlocks(rawHandler({ HTML: template.fields.code }), template) }, 0)
|
25 |
}
|
26 |
|
27 |
// Reset template state after checking if we need an import
|
{extendify-sdk → redux-core/extendify-sdk}/src/buttons.js
RENAMED
@@ -1,39 +1,46 @@
|
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
-
import { renderToString } from '@wordpress/element'
|
3 |
import { registerPlugin } from '@wordpress/plugins'
|
4 |
import { openModal } from './util/general'
|
5 |
import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post'
|
6 |
-
import {
|
|
|
|
|
7 |
|
8 |
const openLibrary = (event) => {
|
9 |
openModal(event.target.closest('[data-extendify-identifier]')?.dataset?.extendifyIdentifier)
|
10 |
}
|
11 |
|
12 |
// This returns true if the user object is null (Library never opened), or if it's enabled in the user settings
|
13 |
-
const
|
|
|
|
|
14 |
|
15 |
-
const mainButton = <div id="extendify-templates-inserter">
|
16 |
<button
|
17 |
-
style="background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px"
|
18 |
type="button"
|
19 |
data-extendify-identifier="main-button"
|
20 |
id="extendify-templates-inserter-btn"
|
21 |
className="components-button">
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
{__('Library', 'extendify-sdk')}
|
27 |
</button>
|
28 |
</div>
|
29 |
|
30 |
// Add the MAIN button when Gutenberg is available and ready
|
31 |
window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
|
|
32 |
setTimeout(() => {
|
33 |
-
|
34 |
-
if
|
35 |
return
|
36 |
}
|
|
|
|
|
37 |
if (document.getElementById('extendify-templates-inserter-btn')) {
|
38 |
return
|
39 |
}
|
@@ -42,6 +49,9 @@ window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
|
42 |
}
|
43 |
document.querySelector('.edit-post-header-toolbar').insertAdjacentHTML('beforeend', renderToString(mainButton))
|
44 |
document.getElementById('extendify-templates-inserter-btn').addEventListener('click', openLibrary)
|
|
|
|
|
|
|
45 |
}, 0)
|
46 |
})
|
47 |
|
@@ -49,7 +59,7 @@ window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
|
49 |
window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
50 |
setTimeout(() => {
|
51 |
// Redundant extra check added because of a bug where the above check wasn't working
|
52 |
-
if
|
53 |
return
|
54 |
}
|
55 |
if (!document.querySelector('[id$=patterns-view]')) {
|
@@ -72,42 +82,22 @@ window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
|
72 |
}, 0)
|
73 |
})
|
74 |
|
75 |
-
//
|
76 |
-
const
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
<
|
81 |
-
<svg width="20" height="20" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
82 |
-
<rect y="25.75" width="70.8125" height="77.25" fill="#000000"/>
|
83 |
-
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2"/>
|
84 |
-
</svg>
|
85 |
-
</span>
|
86 |
}
|
87 |
-
>
|
88 |
-
{__('Library', 'extendify-sdk')}
|
89 |
-
</PluginSidebarMoreMenuItem>
|
90 |
-
window._wpLoadBlockEditor && isLibraryEnabled() && registerPlugin('extendify-temps-more-menu-trigger', {
|
91 |
-
render: SideMenuButton,
|
92 |
-
})
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
await User.setData(JSON.stringify(Object.assign({}, userData)))
|
103 |
-
location.reload()
|
104 |
-
}}
|
105 |
-
icon={<></>}
|
106 |
-
>
|
107 |
-
{isLibraryEnabled()
|
108 |
-
? __('Disable Extendify', 'extendify-sdk')
|
109 |
-
: __('Enable Extendify', 'extendify-sdk')}
|
110 |
-
</PluginSidebarMoreMenuItem>
|
111 |
|
112 |
// Load this button always, which is used to enable or disable
|
113 |
window._wpLoadBlockEditor && registerPlugin('extendify-settings-enable-disable', {
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
+
import { renderToString, render } from '@wordpress/element'
|
3 |
import { registerPlugin } from '@wordpress/plugins'
|
4 |
import { openModal } from './util/general'
|
5 |
import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post'
|
6 |
+
import { Icon } from '@wordpress/icons'
|
7 |
+
import { brandMark } from './components/icons/'
|
8 |
+
import LibraryAccessModal from './components/LibraryAccessModal'
|
9 |
|
10 |
const openLibrary = (event) => {
|
11 |
openModal(event.target.closest('[data-extendify-identifier]')?.dataset?.extendifyIdentifier)
|
12 |
}
|
13 |
|
14 |
// This returns true if the user object is null (Library never opened), or if it's enabled in the user settings
|
15 |
+
const isAdmin = () => window.extendifySdkData.user === null || window.extendifySdkData?.user?.state?.isAdmin
|
16 |
+
const isGlobalLibraryEnabled = () => window.extendifySdkData.sitesettings === null || window.extendifySdkData?.sitesettings?.state?.enabled
|
17 |
+
const isLibraryEnabled = () => window.extendifySdkData.user === null ? isGlobalLibraryEnabled() : window.extendifySdkData?.user?.state?.enabled
|
18 |
|
19 |
+
const mainButton = <div id="extendify-templates-inserter" className="extendify-sdk">
|
20 |
<button
|
21 |
+
style="background:#D9F1EE;color:#1e1e1e;border:1px solid #949494 !important;font-weight:bold;font-size:14px;padding:8px;margin-right:8px"
|
22 |
type="button"
|
23 |
data-extendify-identifier="main-button"
|
24 |
id="extendify-templates-inserter-btn"
|
25 |
className="components-button">
|
26 |
+
<Icon
|
27 |
+
icon={ brandMark }
|
28 |
+
size={ 24 }
|
29 |
+
className="-ml-1 mr-1" />
|
30 |
{__('Library', 'extendify-sdk')}
|
31 |
</button>
|
32 |
</div>
|
33 |
|
34 |
// Add the MAIN button when Gutenberg is available and ready
|
35 |
window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
36 |
+
|
37 |
setTimeout(() => {
|
38 |
+
|
39 |
+
if(!isGlobalLibraryEnabled() && !isAdmin()){
|
40 |
return
|
41 |
}
|
42 |
+
|
43 |
+
// Redundant extra check added because of a bug where the above check wasn't working
|
44 |
if (document.getElementById('extendify-templates-inserter-btn')) {
|
45 |
return
|
46 |
}
|
49 |
}
|
50 |
document.querySelector('.edit-post-header-toolbar').insertAdjacentHTML('beforeend', renderToString(mainButton))
|
51 |
document.getElementById('extendify-templates-inserter-btn').addEventListener('click', openLibrary)
|
52 |
+
if (!isLibraryEnabled()) {
|
53 |
+
document.getElementById('extendify-templates-inserter-btn').classList.add('invisible')
|
54 |
+
}
|
55 |
}, 0)
|
56 |
})
|
57 |
|
59 |
window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
60 |
setTimeout(() => {
|
61 |
// Redundant extra check added because of a bug where the above check wasn't working
|
62 |
+
if(!isGlobalLibraryEnabled() && !isAdmin()){
|
63 |
return
|
64 |
}
|
65 |
if (!document.querySelector('[id$=patterns-view]')) {
|
82 |
}, 0)
|
83 |
})
|
84 |
|
85 |
+
// This will add a button to enable or disable the library button
|
86 |
+
const LibraryEnableDisable = () => {
|
87 |
+
|
88 |
+
function setOpenSiteSettingsModal(){
|
89 |
+
const util = document.getElementById('extendify-util')
|
90 |
+
render(<LibraryAccessModal/>, util)
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
return <>
|
94 |
+
<PluginSidebarMoreMenuItem
|
95 |
+
onClick={setOpenSiteSettingsModal}
|
96 |
+
icon={ <Icon icon={ brandMark } size={ 24 } /> }
|
97 |
+
> { __('Extendify', 'extendify-sdk') }
|
98 |
+
</PluginSidebarMoreMenuItem>
|
99 |
+
</>
|
100 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
// Load this button always, which is used to enable or disable
|
103 |
window._wpLoadBlockEditor && registerPlugin('extendify-settings-enable-disable', {
|
{extendify-sdk → redux-core/extendify-sdk}/src/components/ImportButton.js
RENAMED
@@ -29,6 +29,7 @@ export function ImportButton({ template }) {
|
|
29 |
injectTemplateBlocks(activeTemplateBlocks, template)
|
30 |
.then(() => setOpen(false))
|
31 |
.then(() => render(<ExtendifyLibrary/>, document.getElementById('extendify-root')))
|
|
|
32 |
}, 100)
|
33 |
})
|
34 |
}
|
@@ -62,7 +63,7 @@ export function ImportButton({ template }) {
|
|
62 |
ref={importButtonRef}
|
63 |
className="button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5"
|
64 |
target="_blank"
|
65 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.
|
66 |
rel="noreferrer">
|
67 |
{__('Sign up now', 'extendify-sdk')}
|
68 |
</a>
|
29 |
injectTemplateBlocks(activeTemplateBlocks, template)
|
30 |
.then(() => setOpen(false))
|
31 |
.then(() => render(<ExtendifyLibrary/>, document.getElementById('extendify-root')))
|
32 |
+
.then(() => setTimeout(() => useGlobalStore.setState({ currentPage: 'main' }), 500))
|
33 |
}, 100)
|
34 |
})
|
35 |
}
|
63 |
ref={importButtonRef}
|
64 |
className="button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5"
|
65 |
target="_blank"
|
66 |
+
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign_up&utm_content=single_page`}
|
67 |
rel="noreferrer">
|
68 |
{__('Sign up now', 'extendify-sdk')}
|
69 |
</a>
|
redux-core/extendify-sdk/src/components/ImportCounter.js
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import classnames from 'classnames'
|
5 |
+
|
6 |
+
/**
|
7 |
+
* WordPress dependencies
|
8 |
+
*/
|
9 |
+
import { Icon } from '@wordpress/icons'
|
10 |
+
import { __, sprintf } from '@wordpress/i18n'
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Internal dependencies
|
14 |
+
*/
|
15 |
+
import { alert } from './icons/'
|
16 |
+
import { download } from './icons/'
|
17 |
+
import { useUserStore } from '../state/User'
|
18 |
+
|
19 |
+
function ImportCounter() {
|
20 |
+
const remainingImports = useUserStore(state => state.remainingImports)
|
21 |
+
const allowedImports = useUserStore(state => state.allowedImports)
|
22 |
+
const status = remainingImports() > 0 ? 'has-imports' : 'no-imports'
|
23 |
+
const backgroundColor = status === 'has-imports' ? 'bg-extendify-main hover:bg-extendify-main-dark' : 'bg-extendify-alert'
|
24 |
+
const icon = status === 'has-imports' ? download : alert
|
25 |
+
|
26 |
+
return <a
|
27 |
+
target="_blank"
|
28 |
+
rel="noreferrer"
|
29 |
+
className={ classnames(backgroundColor, 'flex w-full no-underline button-focus -mt-10 text-sm justify-between py-3 px-4 text-white rounded')}
|
30 |
+
href={`https://www.extendify.com/pricing/?utm_source=${encodeURIComponent(window.extendifySdkData.sdk_partner)}&utm_medium=library&utm_campaign=import-counter&utm_content=upgrade&utm_term=${status}`}>
|
31 |
+
<div className='flex items-center space-x-2 no-underline'>
|
32 |
+
<Icon icon={ icon } size={ 14 } />
|
33 |
+
<span>
|
34 |
+
{ sprintf(
|
35 |
+
__('%s/%s Imports', 'extendify-sdk'), remainingImports(), Number(allowedImports),
|
36 |
+
) }
|
37 |
+
</span>
|
38 |
+
</div>
|
39 |
+
<span className="text-white no-underline font-medium outline-none">
|
40 |
+
{ __('Upgrade', 'extendify-sdk') }
|
41 |
+
</span>
|
42 |
+
</a>
|
43 |
+
}
|
44 |
+
|
45 |
+
export default ImportCounter
|
redux-core/extendify-sdk/src/components/ImportTemplateBlock.js
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {
|
2 |
+
useEffect, useState, useRef,memo,
|
3 |
+
} from '@wordpress/element'
|
4 |
+
import { AuthorizationCheck, Middleware } from '../middleware'
|
5 |
+
import { injectTemplateBlocks } from '../util/templateInjection'
|
6 |
+
import { useWantedTemplateStore } from '../state/Importing'
|
7 |
+
import { useUserStore } from '../state/User'
|
8 |
+
import { useGlobalStore } from '../state/GlobalState'
|
9 |
+
import { __, sprintf } from '@wordpress/i18n'
|
10 |
+
import { Templates as TemplatesApi } from '../api/Templates'
|
11 |
+
import { useInView } from 'react-intersection-observer'
|
12 |
+
import { BlockPreview } from '@wordpress/block-editor'
|
13 |
+
import { rawHandler } from '@wordpress/blocks'
|
14 |
+
import { render } from '@wordpress/element'
|
15 |
+
import ExtendifyLibrary from '../ExtendifyLibrary'
|
16 |
+
import Primary from './buttons/Primary'
|
17 |
+
import SplitModal from './modals/SplitModal'
|
18 |
+
|
19 |
+
const LiveBlocksMemoized = memo(({ blocks }) => {
|
20 |
+
return <div className='with-light-shadow relative'>
|
21 |
+
<BlockPreview
|
22 |
+
blocks={blocks}
|
23 |
+
live={false}
|
24 |
+
viewportWidth={1400} />
|
25 |
+
</div>
|
26 |
+
}, (oldBlocks, newBlocks) => oldBlocks.clientId == newBlocks.clientId)
|
27 |
+
const canImportMiddleware = Middleware(['NeedsRegistrationModal', 'hasRequiredPlugins', 'hasPluginsActivated'])
|
28 |
+
|
29 |
+
export function ImportTemplateBlock({ template }) {
|
30 |
+
const importButtonRef = useRef(null)
|
31 |
+
const once = useRef(false)
|
32 |
+
const canImport = useUserStore(state => state.canImport)
|
33 |
+
const setWanted = useWantedTemplateStore(state => state.setWanted)
|
34 |
+
const setOpen = useGlobalStore(state => state.setOpen)
|
35 |
+
const blocks = rawHandler({ HTML: template.fields.code })
|
36 |
+
const [hasBeenSeen, setHasBeenSeen] = useState(false)
|
37 |
+
const [onlyLoadInView, inView] = useInView()
|
38 |
+
const [showModal, setShowModal] = useState(false)
|
39 |
+
|
40 |
+
const focusTrapInnerBlocks = () => {
|
41 |
+
if (once.current) return
|
42 |
+
once.current = true
|
43 |
+
Array.from(importButtonRef.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'))
|
44 |
+
.forEach(el => el.setAttribute('tabIndex', '-1'))
|
45 |
+
}
|
46 |
+
|
47 |
+
const importTemplates = async () => {
|
48 |
+
await canImportMiddleware.check(template)
|
49 |
+
AuthorizationCheck(canImportMiddleware.stack).then(() => {
|
50 |
+
setTimeout(() => {
|
51 |
+
injectTemplateBlocks(blocks, template)
|
52 |
+
.then(() => setOpen(false))
|
53 |
+
.then(() => render(<ExtendifyLibrary/>, document.getElementById('extendify-root')))
|
54 |
+
.then(()=> canImportMiddleware.reset())
|
55 |
+
}, 100)
|
56 |
+
})
|
57 |
+
}
|
58 |
+
|
59 |
+
const handleKeyDown = (event) => {
|
60 |
+
if (['Enter', 'Space', ' '].includes(event.key)) {
|
61 |
+
event.stopPropagation()
|
62 |
+
event.preventDefault()
|
63 |
+
importTemplate()
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
const importTemplate = () => {
|
68 |
+
if(!canImport()) {
|
69 |
+
setShowModal(true)
|
70 |
+
return
|
71 |
+
}
|
72 |
+
TemplatesApi.maybeImport(template)
|
73 |
+
// TODO: Is this needed? Check when removing all single page views
|
74 |
+
setWanted(template)
|
75 |
+
importTemplates()
|
76 |
+
}
|
77 |
+
|
78 |
+
useEffect(() => {
|
79 |
+
if (!hasBeenSeen && inView) {
|
80 |
+
setHasBeenSeen(true)
|
81 |
+
}
|
82 |
+
}, [inView, hasBeenSeen, template])
|
83 |
+
|
84 |
+
return <>
|
85 |
+
<div
|
86 |
+
role="button"
|
87 |
+
tabIndex="0"
|
88 |
+
ref={importButtonRef}
|
89 |
+
aria-label={sprintf(__('Press to import %s', 'extendify-sdk'), template?.fields?.type)}
|
90 |
+
className="mb-8 cursor-pointer button-focus"
|
91 |
+
onFocus={focusTrapInnerBlocks}
|
92 |
+
onClick={importTemplate}
|
93 |
+
onKeyDown={handleKeyDown}>
|
94 |
+
<div ref={onlyLoadInView} className="invisible absolute inset-0 pointer-events-none"></div>
|
95 |
+
{hasBeenSeen && <LiveBlocksMemoized blocks={blocks} />}
|
96 |
+
</div>
|
97 |
+
{ showModal && <SplitModal
|
98 |
+
isOpen={showModal}
|
99 |
+
onRequestClose={()=>setShowModal(false)}
|
100 |
+
left={<>
|
101 |
+
<div className="flex space-x-2 items-center justify-center mb-10">
|
102 |
+
<svg fill="none" height="30" viewBox="0 0 153 30" width="153" xmlns="http://www.w3.org/2000/svg"><path d="m33.2598 24.7079v-18.89872h12.7345v3.29434h-8.7388v4.50318h8.0835v3.2944h-8.0835v4.5124h8.7756v3.2944zm19.1224-14.174 2.6023 4.9553 2.6668-4.9553h4.0327l-4.1066 7.087 4.2173 7.087h-4.0141l-2.7961-4.9-2.7499 4.9h-4.0603l4.2079-7.087-4.0602-7.087zm19.1756 0v2.9529h-8.5359v-2.9529zm-6.598-3.39592h3.9312v13.21432c0 .363.0552.646.1661.849.1106.1968.2644.3353.4612.4152.2031.08.437.12.7014.12.1845 0 .3692-.0154.5537-.0461.1845-.0369.3261-.0646.4244-.0831l.6183 2.9252c-.1968.0615-.4736.1323-.8305.2122-.3568.0862-.7906.1386-1.301.157-.9474.0368-1.7781-.0892-2.4916-.3783-.7074-.2893-1.2581-.7383-1.6518-1.3474-.3937-.609-.5875-1.378-.5814-2.3069zm15.466 17.84662c-1.458 0-2.7131-.2951-3.7651-.8857-1.0457-.5968-1.8517-1.4396-2.4175-2.5285-.5661-1.0951-.8491-2.39-.8491-3.8849 0-1.458.283-2.7376.8491-3.8388.5658-1.1012 1.3625-1.9594 2.39-2.5746 1.0334-.6152 2.2454-.9228 3.6356-.9228.9353 0 1.8056.1507 2.6116.4521.812.2954 1.5195.7414 2.1224 1.3381.6091.5967 1.0827 1.3473 1.4212 2.2516.3382.8982.5073 1.9502.5073 3.1559v1.0797h-11.9683v-2.4362h8.268c0-.5659-.123-1.0673-.369-1.5041-.2462-.4368-.5875-.7782-1.0243-1.0243-.4307-.2522-.932-.3783-1.5041-.3783-.5968 0-1.1259.1384-1.5873.4152-.4552.2707-.8121.6367-1.0704 1.0981-.2584.4553-.3907.9628-.3967 1.5226v2.3162c0 .7014.129 1.3073.3874 1.8179.2646.5106.6368.9043 1.1167 1.1812.4797.2768 1.0487.4153 1.707.4153.4368 0 .8368-.0616 1.1997-.1846.363-.1231.6737-.3076.932-.5537.2584-.2461.4552-.5475.5906-.9043l3.6358.2399c-.1845.8736-.563 1.6364-1.1351 2.2885-.5659.646-1.298 1.1505-2.1963 1.5134-.8919.3569-1.9223.5351-3.0912.5351zm13.002-8.4711v8.1944h-3.931v-14.174h3.7465v2.5007h.1661c.3137-.8244.8397-1.4764 1.5779-1.9563.7383-.486 1.6335-.729 2.6855-.729.9842 0 1.8423.2153 2.5742.6459.732.4307 1.301 1.0459 1.707 1.8456.406.7936.609 1.741.609 2.8422v9.0249h-3.9305v-8.3236c.0061-.8674-.2155-1.5441-.6646-2.0301-.4491-.4922-1.0674-.7382-1.8547-.7382-.529 0-.9966.1138-1.4026.3414-.4.2276-.7137.5598-.9413.9966-.2216.4306-.3352.9505-.3415 1.5595zm17.4572 8.425c-1.077 0-2.052-.2767-2.926-.8305-.867-.5598-1.556-1.381-2.067-2.4638-.504-1.0889-.756-2.4238-.756-4.0049 0-1.6241.261-2.9744.784-4.051.523-1.0828 1.218-1.8917 2.086-2.427.873-.5413 1.83-.812 2.869-.812.794 0 1.455.1353 1.984.406.536.2646.966.5968 1.292.9966.333.3937.585.7813.757 1.1627h.12v-7.10542h3.922v18.89872h-3.876v-2.2701h-.166c-.185.3937-.446.7844-.784 1.172-.333.3814-.766.6981-1.301.9504-.53.2523-1.176.3783-1.938.3783zm1.246-3.1282c.633 0 1.168-.1722 1.605-.5167.443-.3507.781-.8398 1.015-1.4673.24-.6275.36-1.3626.36-2.2054s-.117-1.5749-.351-2.1963c-.233-.6213-.572-1.1012-1.015-1.4395-.442-.3384-.981-.5076-1.614-.5076-.646 0-1.191.1754-1.634.526-.443.3507-.778.8367-1.006 1.458-.227.6214-.341 1.3412-.341 2.1594 0 .8243.114 1.5533.341 2.187.234.6275.569 1.1196 1.006 1.4764.443.3507.988.526 1.634.526zm10.051 2.8976v-14.174h3.931v14.174zm1.984-16.00116c-.584 0-1.086-.19379-1.504-.58137-.418-.39372-.628-.86435-.628-1.41187 0-.54137.21-1.00584.628-1.39339.418-.39373.916-.59059 1.495-.59059.59 0 1.092.19686 1.504.59059.418.38755.627.85202.627 1.39339 0 .54752-.209 1.01815-.627 1.41187-.412.38758-.911.58137-1.495.58137zm12.718 1.82716v2.9529h-8.748v-2.9529zm-6.745 14.174v-15.19835c0-1.02737.2-1.8794.6-2.55611.406-.67671.959-1.18426 1.66-1.52261.702-.33836 1.498-.50753 2.39-.50753.603 0 1.154.04613 1.652.13842.505.09227.88.17532 1.126.24914l-.701 2.95293c-.154-.04922-.345-.09535-.572-.13842-.222-.04307-.449-.06459-.683-.06459-.578 0-.981.13534-1.209.40602-.228.26454-.341.63672-.341 1.11657v15.12453zm11.574 5.2876c-.499 0-.966-.04-1.403-.1199-.431-.0739-.787-.1661-1.07-.277l.886-2.9437c.695.2154 1.279.2706 1.753.1663.48-.0986.858-.4678 1.135-1.1075l.231-.5998-5.085-14.58h4.134l2.935 10.409h.147l2.962-10.409 4.162.0184-5.509 15.6874c-.264.7567-.624 1.415-1.08 1.9747-.449.5661-1.018 1.0029-1.707 1.3104-.689.3137-1.519.4707-2.491.4707z" fill="#000"/><path d="m18.9306 6.53613h-17.994321v18.85127h17.994321z" fill="#000"/><path d="m25.5.823639h-12.2819v12.281861h12.2819z" fill="#37c2a2"/></svg>
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<h3 className="text-xl md:leading-3">{__('You\'re out of imports','extendify-sdk')}</h3>
|
106 |
+
<p className="text-sm text-black">
|
107 |
+
{__('Sign up today and get unlimited access to our entire collection of patterns and page layouts.','extendify-sdk')}
|
108 |
+
</p>
|
109 |
+
<div>
|
110 |
+
<Primary
|
111 |
+
tagName="a"
|
112 |
+
target="_blank"
|
113 |
+
className="m-auto mt-10"
|
114 |
+
href={`https://extendify.com/pricing/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports`}
|
115 |
+
rel="noreferrer">
|
116 |
+
{__('Get Unlimited Imports','extendify-sdk')}
|
117 |
+
<svg fill="none" height="24" viewBox="0 0 25 24" width="25" xmlns="http://www.w3.org/2000/svg"><path d="m10.3949 8.7864 5.5476-.02507m0 0-.0476 5.52507m.0476-5.52507c-2.357 2.35707-5.4183 5.41827-7.68101 7.68097" stroke="currentColor" strokeWidth="1.5"/></svg>
|
118 |
+
</Primary>
|
119 |
+
</div>
|
120 |
+
</>}
|
121 |
+
right={
|
122 |
+
<div className="space-y-2">
|
123 |
+
<div className="flex items-center space-x-2">
|
124 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
125 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z" fill="currentColor"/>
|
126 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z" fill="currentColor"/>
|
127 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z" fill="currentColor"/>
|
128 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z" fill="currentColor"/>
|
129 |
+
<path d="M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z" fill="currentColor"/>
|
130 |
+
<path d="M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z" fill="currentColor"/>
|
131 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z" fill="currentColor"/>
|
132 |
+
</svg>
|
133 |
+
<span className="text-sm leading-none">{__('Access to 100\'s of Patterns','extendify-sdk')}</span>
|
134 |
+
</div>
|
135 |
+
<div className="flex items-center space-x-2">
|
136 |
+
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" strokeWidth="1.5"><path d="m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z"/><path d="m9.25 19v-14"/></g></svg>
|
137 |
+
<span className="text-sm leading-none">{__('Beautiful full page layouts','extendify-sdk')}</span>
|
138 |
+
</div>
|
139 |
+
<div className="flex items-center space-x-2">
|
140 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
141 |
+
<circle cx="12" cy="12" r="7.25" stroke="currentColor" strokeWidth="1.5"/>
|
142 |
+
<circle cx="12" cy="12" r="4.25" stroke="currentColor" strokeWidth="1.5"/>
|
143 |
+
<circle cx="11.9999" cy="12.2" r="6" transform="rotate(-45 11.9999 12.2)" stroke="currentColor" strokeWidth="3" strokeDasharray="1.5 4"/>
|
144 |
+
</svg>
|
145 |
+
|
146 |
+
<span className="text-sm leading-none">{__('Fast and friendly support','extendify-sdk')}</span>
|
147 |
+
</div>
|
148 |
+
<div className="flex items-center space-x-2">
|
149 |
+
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z" fill="currentColor"/></svg>
|
150 |
+
<span className="text-sm leading-none">{__('14-Day guarantee','extendify-sdk')}</span>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
}
|
154 |
+
/> }
|
155 |
+
</>
|
156 |
+
}
|
redux-core/extendify-sdk/src/components/LibraryAccessModal.js
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Modal } from '@wordpress/components'
|
2 |
+
import {
|
3 |
+
unmountComponentAtNode, useState, useEffect,
|
4 |
+
} from '@wordpress/element'
|
5 |
+
import { ToggleControl } from '@wordpress/components'
|
6 |
+
import { __ } from '@wordpress/i18n'
|
7 |
+
import { useSelect } from '@wordpress/data'
|
8 |
+
|
9 |
+
import { useUserStore } from '../state/User'
|
10 |
+
import { useSiteSettingsStore } from '../state/SiteSettings'
|
11 |
+
|
12 |
+
const LibraryAccessModal = () => {
|
13 |
+
const isAdmin = useSelect((select) => select('core').canUser('create', 'users'))
|
14 |
+
|
15 |
+
const [libraryforMyself, setLibraryforMyself] = useState(useUserStore((store) => store.enabled))
|
16 |
+
const [libraryforEveryone, setLibraryforEveryone] = useState(useSiteSettingsStore((store) => store.enabled))
|
17 |
+
|
18 |
+
const closeModal = () => {
|
19 |
+
const util = document.getElementById('extendify-util')
|
20 |
+
unmountComponentAtNode(util)
|
21 |
+
}
|
22 |
+
|
23 |
+
useEffect(() => {
|
24 |
+
hideButton(!libraryforMyself)
|
25 |
+
}, [libraryforMyself])
|
26 |
+
|
27 |
+
function hideButton(state=true){
|
28 |
+
const button = document.getElementById('extendify-templates-inserter-btn')
|
29 |
+
if(!button) return
|
30 |
+
if(state) {
|
31 |
+
button.classList.add('invisible')
|
32 |
+
}
|
33 |
+
else{
|
34 |
+
button.classList.remove('invisible')
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
async function saveUser(value){
|
39 |
+
await useUserStore.setState({ enabled: value })
|
40 |
+
}
|
41 |
+
|
42 |
+
async function saveSetting(value){
|
43 |
+
await useSiteSettingsStore.setState({ enabled: value })
|
44 |
+
}
|
45 |
+
|
46 |
+
async function saveToggle(state,type){
|
47 |
+
if(type==='global') {
|
48 |
+
await saveSetting(state)
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
await saveUser(state)
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
function handleToggle(type){
|
56 |
+
if(type==='global'){
|
57 |
+
setLibraryforEveryone((state) => {
|
58 |
+
saveToggle(!state,type)
|
59 |
+
return !state
|
60 |
+
})
|
61 |
+
}
|
62 |
+
else{
|
63 |
+
setLibraryforMyself((state) => {
|
64 |
+
hideButton(!state)
|
65 |
+
saveToggle(!state,type)
|
66 |
+
return !state
|
67 |
+
})
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
return (
|
72 |
+
<Modal title={__('Extendify Settings','extendify-sdk')} onRequestClose={ closeModal }>
|
73 |
+
<ToggleControl
|
74 |
+
label={ isAdmin ? __('Enable the library for myself','extendify-sdk') : __('Enable the library','extendify-sdk')}
|
75 |
+
help={__('Publish with hundreds of patterns & page layouts','extendify-sdk')}
|
76 |
+
checked={ libraryforMyself }
|
77 |
+
onChange={ () => handleToggle('user')}
|
78 |
+
/>
|
79 |
+
|
80 |
+
{ isAdmin &&
|
81 |
+
<>
|
82 |
+
<br/>
|
83 |
+
<ToggleControl
|
84 |
+
label={__('Allow all users to publish with the library')}
|
85 |
+
help={__('Everyone publishes with patterns & page layouts','extendify-sdk')}
|
86 |
+
checked={ libraryforEveryone }
|
87 |
+
onChange={ () => handleToggle('global')}
|
88 |
+
/>
|
89 |
+
</>
|
90 |
+
}
|
91 |
+
</Modal>
|
92 |
+
)
|
93 |
+
}
|
94 |
+
|
95 |
+
export default LibraryAccessModal
|
redux-core/extendify-sdk/src/components/LoginInterface.js
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useUserStore } from '../state/User'
|
2 |
+
import {
|
3 |
+
useState, useEffect, useRef,
|
4 |
+
} from '@wordpress/element'
|
5 |
+
import { User as UserApi } from '../api/User'
|
6 |
+
import { __ } from '@wordpress/i18n'
|
7 |
+
import classNames from 'classnames'
|
8 |
+
import { Spinner, Button } from '@wordpress/components'
|
9 |
+
|
10 |
+
import { Icon } from '@wordpress/icons'
|
11 |
+
import { user } from './icons/'
|
12 |
+
import { success as successIcon } from './icons/'
|
13 |
+
|
14 |
+
export default function LoginInterface({ actionCallback, initialFocus }) {
|
15 |
+
const loggedIn = useUserStore(state => state.apiKey.length)
|
16 |
+
const [email, setEmail] = useState('')
|
17 |
+
const [apiKey, setApiKey] = useState('')
|
18 |
+
const [feedback, setFeedback] = useState('')
|
19 |
+
const [feedbackType, setFeedbackType] = useState('info')
|
20 |
+
const [isWorking, setIsWorking] = useState(false)
|
21 |
+
const [success, setSuccess] = useState(false)
|
22 |
+
const viewPatternsButtonRef = useRef(null)
|
23 |
+
const licenseKeyRef = useRef(null)
|
24 |
+
|
25 |
+
useEffect(() => {
|
26 |
+
setEmail(useUserStore.getState().email)
|
27 |
+
// This will reset the default error state to info
|
28 |
+
return () => setFeedbackType('info')
|
29 |
+
}, [])
|
30 |
+
|
31 |
+
useEffect(() => {
|
32 |
+
success && viewPatternsButtonRef?.current?.focus()
|
33 |
+
}, [success])
|
34 |
+
|
35 |
+
const logout = () => {
|
36 |
+
setApiKey('')
|
37 |
+
useUserStore.setState({ apiKey: '' })
|
38 |
+
setTimeout(() => { licenseKeyRef?.current?.focus() }, 0)
|
39 |
+
}
|
40 |
+
|
41 |
+
const confirmKey = async (event) => {
|
42 |
+
event.preventDefault()
|
43 |
+
setIsWorking(true)
|
44 |
+
setFeedback('')
|
45 |
+
const { token, error, exception, message } = await UserApi.authenticate(email, apiKey)
|
46 |
+
|
47 |
+
if (typeof message !== 'undefined') {
|
48 |
+
setFeedbackType('error')
|
49 |
+
setIsWorking(false)
|
50 |
+
setFeedback(message.length
|
51 |
+
? message
|
52 |
+
: 'Error: Are you interacting with the wrong server?')
|
53 |
+
return
|
54 |
+
}
|
55 |
+
|
56 |
+
if (error || exception) {
|
57 |
+
setFeedbackType('error')
|
58 |
+
setIsWorking(false)
|
59 |
+
setFeedback(error.length
|
60 |
+
? error
|
61 |
+
: exception)
|
62 |
+
return
|
63 |
+
}
|
64 |
+
|
65 |
+
if (!token || typeof token !== 'string') {
|
66 |
+
setFeedbackType('error')
|
67 |
+
setIsWorking(false)
|
68 |
+
setFeedback(__('Something went wrong', 'extendify-sdk'))
|
69 |
+
return
|
70 |
+
}
|
71 |
+
|
72 |
+
setFeedbackType('success')
|
73 |
+
setFeedback('Success!')
|
74 |
+
setSuccess(true)
|
75 |
+
setIsWorking(false)
|
76 |
+
useUserStore.setState({
|
77 |
+
email: email,
|
78 |
+
apiKey: token,
|
79 |
+
})
|
80 |
+
}
|
81 |
+
|
82 |
+
if(success) {
|
83 |
+
return <section className="w-80 space-y-8 text-center pt-2 pb-4">
|
84 |
+
<Icon icon={ successIcon } size={ 148 } />
|
85 |
+
<p className="text-lg text-extendify-black text-center leading-extra-tight font-semibold">
|
86 |
+
{__('You\'ve signed in to Extendify', 'extendify-sdk')}
|
87 |
+
</p>
|
88 |
+
<Button
|
89 |
+
ref={viewPatternsButtonRef}
|
90 |
+
className="px-4 p-2 cursor-pointer text-center rounded bg-extendify-main text-white"
|
91 |
+
onClick={actionCallback}>
|
92 |
+
{__('View patterns', 'extendify-sdk')}
|
93 |
+
</Button>
|
94 |
+
</section>
|
95 |
+
}
|
96 |
+
|
97 |
+
if(loggedIn) {
|
98 |
+
return <section className="space-y-8 w-full pb-2">
|
99 |
+
<p className='text-base text-extendify-black leading-extra-tight'>{__('Account', 'extendify-sdk')}</p>
|
100 |
+
<div className='flex justify-between items-center'>
|
101 |
+
<div className='flex items-center space-x-2 -ml-2'>
|
102 |
+
<Icon icon={ user } size={ 48 } />
|
103 |
+
<p className='text-extendify-black'>{email?.length ? email : __('Logged In', 'extendify-sdk')}</p>
|
104 |
+
</div>
|
105 |
+
{ window.location.search.indexOf('DEVMODE') > -1 && <Button
|
106 |
+
className="px-4 py-3 cursor-pointer text-center rounded bg-extendify-main text-white"
|
107 |
+
onClick={logout}>
|
108 |
+
{__('Sign out', 'extendify-sdk')}
|
109 |
+
</Button>}
|
110 |
+
</div>
|
111 |
+
</section>
|
112 |
+
}
|
113 |
+
|
114 |
+
return <section className="w-80 text-left space-y-8 pb-6">
|
115 |
+
<div>
|
116 |
+
<p className='text-lg text-extendify-black text-center leading-extra-tight font-semibold'>{__('Sign in to Extendify', 'extendify-sdk')}</p>
|
117 |
+
<p className='text-sm text-extendify-gray text-center space-x-1 leading-extra-tight'>
|
118 |
+
<span>{__('Don\'t have an account?', 'extendify-sdk')}</span>
|
119 |
+
<a
|
120 |
+
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up`}
|
121 |
+
target="_blank"
|
122 |
+
className="underline hover:no-underline text-extendify-gray"
|
123 |
+
rel="noreferrer">
|
124 |
+
{__('Sign up', 'extendify-sdk')}
|
125 |
+
</a>
|
126 |
+
</p>
|
127 |
+
</div>
|
128 |
+
<form onSubmit={confirmKey} className="space-y-2">
|
129 |
+
<div className="flex items-center">
|
130 |
+
<label className="sr-only" htmlFor="extendifysdk-login-email">
|
131 |
+
{__('Email address', 'extendify-sdk')}
|
132 |
+
</label>
|
133 |
+
<input
|
134 |
+
ref={initialFocus}
|
135 |
+
id="extendifysdk-login-email"
|
136 |
+
name="extendifysdk-login-email"
|
137 |
+
type="email"
|
138 |
+
className="border-2 p-2 w-full rounded"
|
139 |
+
placeholder={__('Email address', 'extendify-sdk')}
|
140 |
+
value={email.length
|
141 |
+
? email
|
142 |
+
: ''}
|
143 |
+
onChange={(event) => setEmail(event.target.value)}/>
|
144 |
+
</div>
|
145 |
+
<div className="flex items-center">
|
146 |
+
<label className="sr-only" htmlFor="extendifysdk-login-license">
|
147 |
+
{__('License key', 'extendify-sdk')}
|
148 |
+
</label>
|
149 |
+
<input
|
150 |
+
ref={licenseKeyRef}
|
151 |
+
id="extendifysdk-login-license"
|
152 |
+
name="extendifysdk-login-license"
|
153 |
+
type="text"
|
154 |
+
className="border-2 p-2 w-full rounded"
|
155 |
+
placeholder={__('License key', 'extendify-sdk')}
|
156 |
+
value={apiKey}
|
157 |
+
onChange={(event) => setApiKey(event.target.value)}/>
|
158 |
+
</div>
|
159 |
+
<div className="pt-2 flex justify-center">
|
160 |
+
<button
|
161 |
+
type="submit"
|
162 |
+
className="relative p-2 py-3 w-64 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main text-base text-white ">
|
163 |
+
<span>{__('Sign In', 'extendify-sdk')}</span>
|
164 |
+
{isWorking && <div className='absolute right-2.5'>
|
165 |
+
<Spinner/>
|
166 |
+
</div>}
|
167 |
+
</button>
|
168 |
+
</div>
|
169 |
+
{feedback &&
|
170 |
+
<div className={classNames({
|
171 |
+
'border-gray-900 text-gray-900': feedbackType === 'info',
|
172 |
+
'border-wp-alert-red text-wp-alert-red': feedbackType === 'error',
|
173 |
+
'border-extendify-main text-extendify-main': feedbackType === 'success',
|
174 |
+
})}>
|
175 |
+
{feedback}
|
176 |
+
</div>
|
177 |
+
}
|
178 |
+
<div className='text-center pt-4'>
|
179 |
+
<a target='_blank' rel="noreferrer" href={`https://extendify.com/guides/sign-in?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help`} className="underline hover:no-underline text-sm text-extendify-gray">
|
180 |
+
{__('Need Help?', 'extendify-sdk')}
|
181 |
+
</a>
|
182 |
+
</div>
|
183 |
+
</form>
|
184 |
+
</section>
|
185 |
+
}
|
redux-core/extendify-sdk/src/components/SiteTypeSelector.js
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {
|
2 |
+
useEffect, useState, useRef, useMemo,
|
3 |
+
} from '@wordpress/element'
|
4 |
+
import { __ } from '@wordpress/i18n'
|
5 |
+
import classNames from 'classnames'
|
6 |
+
import Fuse from 'fuse.js'
|
7 |
+
import { useTemplatesStore } from '../state/Templates'
|
8 |
+
import { useUserStore } from '../state/User'
|
9 |
+
|
10 |
+
const searchMemo = new Map()
|
11 |
+
|
12 |
+
export default function SiteTypeSelector({ value, setValue, terms }) {
|
13 |
+
const preferredOptionsHistory = useUserStore(state => state.preferredOptionsHistory)
|
14 |
+
const searchParams = useTemplatesStore(state => state.searchParams)
|
15 |
+
const [expanded, setExpanded] = useState(false)
|
16 |
+
const searchRef = useRef()
|
17 |
+
const [fuzzy, setFuzzy] = useState({})
|
18 |
+
const [tempValue, setTempValue] = useState('')
|
19 |
+
const [visibleChoices, setVisibleChoices] = useState([])
|
20 |
+
|
21 |
+
const examples = useMemo(() => Object.values(terms.filter(t => t?.featured).sort((a, b) => {
|
22 |
+
if (a.term < b.term) return -1
|
23 |
+
if (a.term > b.term) return 1
|
24 |
+
return 0
|
25 |
+
})), [terms])
|
26 |
+
|
27 |
+
const updateSearch = (term) => {
|
28 |
+
setTempValue(term)
|
29 |
+
filter(term)
|
30 |
+
}
|
31 |
+
|
32 |
+
const filter = (term = '') => {
|
33 |
+
if (searchMemo.has(term)) {
|
34 |
+
setVisibleChoices(searchMemo.get(term))
|
35 |
+
return
|
36 |
+
}
|
37 |
+
const results = fuzzy.search(term)
|
38 |
+
searchMemo.set(term, results?.length ? results.map(t => t.item) : examples)
|
39 |
+
setVisibleChoices(searchMemo.get(term))
|
40 |
+
}
|
41 |
+
|
42 |
+
const showRecent = () => visibleChoices === examples && preferredOptionsHistory?.siteType?.length > 0
|
43 |
+
const unknown = value === 'Unknown' || !value.length
|
44 |
+
|
45 |
+
useEffect(() => {
|
46 |
+
setFuzzy(new Fuse(terms, {
|
47 |
+
keys: ['term', 'parent', 'keywords'],
|
48 |
+
minMatchCharLength: 2,
|
49 |
+
threshold: 0.3,
|
50 |
+
}))
|
51 |
+
}, [terms])
|
52 |
+
|
53 |
+
useEffect(() => {
|
54 |
+
if (!tempValue.length) setVisibleChoices(examples)
|
55 |
+
}, [examples, tempValue])
|
56 |
+
|
57 |
+
useEffect(() => {
|
58 |
+
expanded && searchRef.current.focus()
|
59 |
+
}, [expanded])
|
60 |
+
|
61 |
+
const contentHeader = (description) => {
|
62 |
+
return <>
|
63 |
+
<span className="flex flex-col text-left">
|
64 |
+
<span className="text-sm mb-1">{__('Site Type', 'extendify-sdk')}</span>
|
65 |
+
<span className="font-light text-xs">{description}</span>
|
66 |
+
</span>
|
67 |
+
<span className="flex items-center space-x-4">
|
68 |
+
{unknown && !expanded && <svg
|
69 |
+
className="text-wp-alert-red"
|
70 |
+
aria-hidden="true" focusable="false" width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
71 |
+
<path className="stroke-current" d="M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z" strokeWidth="1.25"/>
|
72 |
+
<path className="fill-current" d="M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"/>
|
73 |
+
<path className="fill-current" d="M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"/>
|
74 |
+
</svg>}
|
75 |
+
<svg
|
76 |
+
className={classNames('text-gray-700 stroke-current', {
|
77 |
+
'transform rotate-90 -translate-x-1': expanded,
|
78 |
+
})}
|
79 |
+
aria-hidden="true" focusable="false" width="8" height="13" viewBox="0 0 8 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
80 |
+
<path d="M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215" strokeWidth="1.5"/>
|
81 |
+
</svg>
|
82 |
+
</span>
|
83 |
+
</>
|
84 |
+
}
|
85 |
+
|
86 |
+
const choicesList = (choices, title = __('Suggestions', 'extendify-sdk')) => {
|
87 |
+
if (choices === examples) {
|
88 |
+
title = __('Examples', 'extendify-sdk')
|
89 |
+
}
|
90 |
+
return <>
|
91 |
+
<h4 className="mt-4 mb-2 text-left uppercase text-xs text-gray-700">
|
92 |
+
{title}
|
93 |
+
</h4>
|
94 |
+
<ul className="m-0">
|
95 |
+
{choices.map((item) => {
|
96 |
+
if (Object.prototype.hasOwnProperty.call(item, 'term')) {
|
97 |
+
item = item.term
|
98 |
+
}
|
99 |
+
const current = searchParams?.taxonomies?.tax_categories === item
|
100 |
+
return <li key={item} className="m-0 mb-1">
|
101 |
+
<button
|
102 |
+
type="button"
|
103 |
+
className={
|
104 |
+
classNames('w-full text-left text-sm bg-transparent hover:text-wp-theme-500 m-0 pl-0 cursor-pointer', {
|
105 |
+
'text-gray-800': !current,
|
106 |
+
})
|
107 |
+
}
|
108 |
+
onClick={() => { setExpanded(false); setValue(item) }}>
|
109 |
+
{item}
|
110 |
+
</button>
|
111 |
+
</li>
|
112 |
+
})}
|
113 |
+
</ul>
|
114 |
+
</>
|
115 |
+
}
|
116 |
+
|
117 |
+
return <div className="w-full bg-gray-100 rounded">
|
118 |
+
<button
|
119 |
+
type="button"
|
120 |
+
onClick={() => setExpanded(((value) => !value))}
|
121 |
+
className="flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded">
|
122 |
+
{contentHeader(expanded ? __('What kind of site is this?', 'extendify-sdk') : value)}
|
123 |
+
</button>
|
124 |
+
{expanded && <div className="p-4 pt-0">
|
125 |
+
<div className="relative my-2">
|
126 |
+
<label htmlFor="site-type-search" className="sr-only">
|
127 |
+
{__('Search', 'extendify-sdk')}
|
128 |
+
</label>
|
129 |
+
<input
|
130 |
+
ref={searchRef}
|
131 |
+
id="site-type-search"
|
132 |
+
value={tempValue || ''}
|
133 |
+
onChange={(event) => updateSearch(event.target.value)}
|
134 |
+
type="text"
|
135 |
+
className="button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full"
|
136 |
+
placeholder={__('Search', 'extendify-sdk')} />
|
137 |
+
<svg className="absolute top-2 right-2 hidden lg:block pointer-events-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path></svg>
|
138 |
+
</div>
|
139 |
+
{tempValue.length > 1 && visibleChoices === examples && <p className="text-left">
|
140 |
+
{__('Nothing found...', 'extendify-sdk')}
|
141 |
+
</p>}
|
142 |
+
{showRecent() && <div className="mb-8">
|
143 |
+
{choicesList(preferredOptionsHistory?.siteType, __('Recent', 'extendify-sdk'))}
|
144 |
+
</div>}
|
145 |
+
{visibleChoices && <div>
|
146 |
+
{choicesList(visibleChoices)}
|
147 |
+
</div>}
|
148 |
+
{unknown || <button
|
149 |
+
type="button"
|
150 |
+
className="mt-4 w-full text-left text-sm bg-transparent hover:text-wp-theme-500 pl-0 cursor-pointer text-wp-theme-500"
|
151 |
+
onClick={() => { setExpanded(false); setValue('Unknown') }}>
|
152 |
+
{__('Reset', 'extendify-sdk')}
|
153 |
+
</button>}
|
154 |
+
</div>}
|
155 |
+
</div>
|
156 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/components/TaxonomyList.js
RENAMED
@@ -29,10 +29,10 @@ export default function TaxonomyList({ categories, styles, types, requiredPlugin
|
|
29 |
</div>}
|
30 |
<div className="py-4 mt-4">
|
31 |
<a
|
32 |
-
href={`https://extendify.com/what-happens-when-a-template-is-added?utm_source=${window.extendifySdkData.
|
33 |
rel="noreferrer"
|
34 |
target="_blank">
|
35 |
-
{__('What happens when a
|
36 |
</a>
|
37 |
</div>
|
38 |
</>
|
29 |
</div>}
|
30 |
<div className="py-4 mt-4">
|
31 |
<a
|
32 |
+
href={`https://extendify.com/what-happens-when-a-template-is-added?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sidebar`}
|
33 |
rel="noreferrer"
|
34 |
target="_blank">
|
35 |
+
{__('What happens when a page layout is added?', 'extendify-sdk')}
|
36 |
</a>
|
37 |
</div>
|
38 |
</>
|
redux-core/extendify-sdk/src/components/TaxonomySection.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { PanelBody, PanelRow } from '@wordpress/components'
|
2 |
+
import classNames from 'classnames'
|
3 |
+
import { useTemplatesStore } from '../state/Templates'
|
4 |
+
import { useTaxonomyStore } from '../state/Taxonomies'
|
5 |
+
import { getTaxonomyName } from '../util/general'
|
6 |
+
|
7 |
+
export default function TaxonomySection({ taxonomy: [title, data] }) {
|
8 |
+
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
9 |
+
const searchParams = useTemplatesStore(state => state.searchParams)
|
10 |
+
const openedTaxonomies = useTaxonomyStore(state => state.openedTaxonomies)
|
11 |
+
const toggleOpenedTaxonomy = useTaxonomyStore(state => state.toggleOpenedTaxonomy)
|
12 |
+
const isCurrentTax = (tax) => searchParams?.taxonomies[title] === tax.term
|
13 |
+
const taxSupported = Object.values(data).filter((tax) => tax?.type?.includes(searchParams.type)).length
|
14 |
+
|
15 |
+
if (!Object.keys(data).length || !taxSupported) return null
|
16 |
+
return <PanelBody
|
17 |
+
title={getTaxonomyName(title)}
|
18 |
+
initialOpen={openedTaxonomies.includes(title) || title === 'tax_pattern_types' || title === 'tax_page_types'}
|
19 |
+
onToggle={(value) => toggleOpenedTaxonomy(title, value)}>
|
20 |
+
<PanelRow>
|
21 |
+
<div className="overflow-hidden w-full relative">
|
22 |
+
<ul className="p-1 m-0 w-full">
|
23 |
+
{Object.values(data)
|
24 |
+
.filter((tax) => tax?.type?.includes(searchParams.type))
|
25 |
+
.map((tax) =>
|
26 |
+
<li className="m-0 w-full" key={tax.term}>
|
27 |
+
<button
|
28 |
+
type="button"
|
29 |
+
className="text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus"
|
30 |
+
onClick={() => updateTaxonomies({ [title]: tax.term })}>
|
31 |
+
<span className={classNames({ 'text-wp-theme-500': isCurrentTax(tax) })}>
|
32 |
+
{tax.term}
|
33 |
+
</span>
|
34 |
+
</button>
|
35 |
+
</li>)
|
36 |
+
}
|
37 |
+
</ul>
|
38 |
+
</div>
|
39 |
+
</PanelRow>
|
40 |
+
</PanelBody>
|
41 |
+
}
|
redux-core/extendify-sdk/src/components/TemplateButton.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Spinner } from '@wordpress/components'
|
2 |
+
import {
|
3 |
+
useState, useEffect, useRef,
|
4 |
+
} from '@wordpress/element'
|
5 |
+
import { useIsMounted } from '../hooks/helpers'
|
6 |
+
|
7 |
+
export const TemplateButtonSkeleton = () => <div className="aspect-w-1 aspect-h-1">
|
8 |
+
<div className="w-full h-full flex items-center justify-center bg-gray-100">
|
9 |
+
<Spinner/>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
|
13 |
+
export default function TemplateButton({ template, imageLoaded, setActiveTemplate }) {
|
14 |
+
const [loaded, setLoaded] = useState(false)
|
15 |
+
const imageContainerRef = useRef()
|
16 |
+
const isMounted = useIsMounted()
|
17 |
+
|
18 |
+
useEffect(() => {
|
19 |
+
if (loaded || !isMounted.current) {
|
20 |
+
return
|
21 |
+
}
|
22 |
+
const img = new Image()
|
23 |
+
img.role = 'button'
|
24 |
+
img.className = 'max-w-full block m-auto object-cover'
|
25 |
+
img.onload = () => {
|
26 |
+
if (isMounted.current) {
|
27 |
+
setLoaded(true)
|
28 |
+
// Check the image wasn't already appended
|
29 |
+
if (imageContainerRef.current && !imageContainerRef.current.querySelector('img')) {
|
30 |
+
imageContainerRef.current.appendChild(img)
|
31 |
+
imageLoaded(template.id)
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
img.src = template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url
|
36 |
+
}, [template, imageLoaded, loaded, isMounted])
|
37 |
+
|
38 |
+
if (!loaded) {
|
39 |
+
return <TemplateButtonSkeleton/>
|
40 |
+
}
|
41 |
+
return (
|
42 |
+
<button
|
43 |
+
type="button"
|
44 |
+
className="flex mb-10 justify-items-center flex-grow h-80 border-gray-200 bg-white border focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden"
|
45 |
+
onClick={setActiveTemplate}
|
46 |
+
ref={imageContainerRef}
|
47 |
+
>
|
48 |
+
</button>
|
49 |
+
)
|
50 |
+
}
|
redux-core/extendify-sdk/src/components/TemplateButtonLive.js
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Spinner } from '@wordpress/components'
|
2 |
+
import { BlockPreview } from '@wordpress/block-editor'
|
3 |
+
import { rawHandler } from '@wordpress/blocks'
|
4 |
+
import { __, sprintf } from '@wordpress/i18n'
|
5 |
+
import {
|
6 |
+
useState, useEffect, useRef, memo,
|
7 |
+
} from '@wordpress/element'
|
8 |
+
import { useInView } from 'react-intersection-observer'
|
9 |
+
|
10 |
+
export const TemplateButtonLiveSkeleton = ({ extraClasses }) => (
|
11 |
+
<div className={`w-full h-40 flex items-center justify-center bg-gray-100 ${extraClasses}`}>
|
12 |
+
<Spinner/>
|
13 |
+
</div>
|
14 |
+
)
|
15 |
+
|
16 |
+
const LiveBlocksMemoized = memo(({ blocks }) => {
|
17 |
+
return <BlockPreview
|
18 |
+
blocks={blocks}
|
19 |
+
live={false}
|
20 |
+
viewportWidth={1400}/>
|
21 |
+
}, (oldBlocks, newBlocks) => oldBlocks.clientId == newBlocks.clientId)
|
22 |
+
|
23 |
+
export default function TemplateButtonLive({ template, setActiveTemplate }) {
|
24 |
+
// Converts HTML to blocks
|
25 |
+
const blocks = rawHandler({ HTML: template.fields.code })
|
26 |
+
const [hasBeenSeen, setHasBeenSeen] = useState(false)
|
27 |
+
const previewRef = useRef()
|
28 |
+
const [onlyLoadInView, inView] = useInView()
|
29 |
+
|
30 |
+
// This makes sure the component doesn't stop rendering before it's
|
31 |
+
// memoized in case the user scrolls too fast. ie once it's in view once, it
|
32 |
+
// will always be considered inView and visible
|
33 |
+
useEffect(() => {
|
34 |
+
if (!hasBeenSeen && inView) {
|
35 |
+
setHasBeenSeen(true)
|
36 |
+
}
|
37 |
+
}, [inView, hasBeenSeen])
|
38 |
+
|
39 |
+
// The live preview injects real, rendered html inside the component (not in an iFrame),
|
40 |
+
// which includes any sort of html elements, so we have can't use a button here.
|
41 |
+
return <div
|
42 |
+
role="button"
|
43 |
+
aria-label={sprintf(__('Open details about the %s', 'extendify-sdk'), template?.fields?.type)}
|
44 |
+
tabIndex="0"
|
45 |
+
className="mb-10 w-full relative focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden"
|
46 |
+
onClick={setActiveTemplate}
|
47 |
+
onKeyDown={(e) => ['Enter', 'Space'].includes(e.key) && setActiveTemplate() }
|
48 |
+
ref={previewRef}
|
49 |
+
>
|
50 |
+
<div ref={onlyLoadInView} className="invisible absolute inset-0 pointer-events-none"></div>
|
51 |
+
{hasBeenSeen && <LiveBlocksMemoized blocks={blocks} />}
|
52 |
+
</div>
|
53 |
+
}
|
redux-core/extendify-sdk/src/components/TypeSelect.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { useTemplatesStore } from '../state/Templates'
|
3 |
+
import classNames from 'classnames'
|
4 |
+
import { useGlobalStore } from '../state/GlobalState'
|
5 |
+
import { templates as config } from '../config'
|
6 |
+
|
7 |
+
export default function TypeSelect() {
|
8 |
+
const updateType = useTemplatesStore(state => state.updateType)
|
9 |
+
const currentType = useGlobalStore(state => state.currentType ? state.currentType : config.defaultType)
|
10 |
+
|
11 |
+
return <div className="text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-8 mt-px border-b sm:border-0">
|
12 |
+
<h4 className="sr-only">{__('Type select', 'extendify-sdk')}</h4>
|
13 |
+
<button type="button" className={classNames({
|
14 |
+
'cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus': true,
|
15 |
+
'bg-gray-900 text-white': currentType === 'pattern',
|
16 |
+
'bg-transparent text-black': currentType !== 'pattern',
|
17 |
+
})}
|
18 |
+
onClick={() => updateType('pattern')}>
|
19 |
+
<svg width="17" height="13" viewBox="0 0 17 13" className="fill-current" xmlns="http://www.w3.org/2000/svg">
|
20 |
+
<path d="M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"/>
|
21 |
+
</svg>
|
22 |
+
<span className="">{__('Patterns', 'extendify-sdk')}</span>
|
23 |
+
</button>
|
24 |
+
<button type="button" className={classNames({
|
25 |
+
'cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px': true,
|
26 |
+
'bg-gray-900 text-white': currentType === 'template',
|
27 |
+
'bg-transparent text-black': currentType !== 'template',
|
28 |
+
})}
|
29 |
+
onClick={() => updateType('template')}>
|
30 |
+
<svg width="17" height="13" viewBox="0 0 17 13" className="fill-current" xmlns="http://www.w3.org/2000/svg">
|
31 |
+
<path d="M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"/>
|
32 |
+
</svg>
|
33 |
+
<span className="">{__('Page layouts', 'extendify-sdk')}</span>
|
34 |
+
</button>
|
35 |
+
</div>
|
36 |
+
}
|
redux-core/extendify-sdk/src/components/WelcomeNotice.js
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Icon, closeSmall } from '@wordpress/icons'
|
3 |
+
import { Button } from '@wordpress/components'
|
4 |
+
import { useUserStore } from '../state/User'
|
5 |
+
import { useState } from '@wordpress/element'
|
6 |
+
import { useGlobalStore } from '../state/GlobalState'
|
7 |
+
|
8 |
+
export default function WelcomeNotice() {
|
9 |
+
const [visible, setVisible] = useState(!useUserStore.getState().noticesDismissedAt?.welcome)
|
10 |
+
const setOpen = useGlobalStore(state => state.setOpen)
|
11 |
+
|
12 |
+
const dismiss = () => {
|
13 |
+
setVisible(false)
|
14 |
+
useUserStore.setState({
|
15 |
+
noticesDismissedAt: {
|
16 |
+
welcome: (new Date).toISOString(),
|
17 |
+
},
|
18 |
+
})
|
19 |
+
}
|
20 |
+
|
21 |
+
const disableLibrary = () => {
|
22 |
+
const button = document.getElementById('extendify-templates-inserter-btn')
|
23 |
+
button.classList.add('invisible')
|
24 |
+
useUserStore.setState({ enabled: false })
|
25 |
+
setOpen(false)
|
26 |
+
}
|
27 |
+
|
28 |
+
if(!visible) return null
|
29 |
+
|
30 |
+
return <div className="bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative">
|
31 |
+
<span className='text-black'>
|
32 |
+
{ __('Welcome to the Extendify Library', 'extendify-sdk') }
|
33 |
+
</span>
|
34 |
+
<span className="px-2 opacity-50" aria-hidden="true">|</span>
|
35 |
+
<div className='flex space-x-2 justify-center items-center'>
|
36 |
+
<Button
|
37 |
+
variant="link"
|
38 |
+
className="text-black underline hover:no-underline p-0 h-auto"
|
39 |
+
href={`https://extendify.com/welcome/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more`}
|
40 |
+
target="_blank"
|
41 |
+
>
|
42 |
+
{ __('Tell me more', 'extendify-sdk') }
|
43 |
+
</Button>
|
44 |
+
<span className="font-bold" aria-hidden="true">•</span>
|
45 |
+
<Button
|
46 |
+
variant="link"
|
47 |
+
className="text-black underline hover:no-underline p-0 h-auto"
|
48 |
+
onClick={ disableLibrary }
|
49 |
+
>
|
50 |
+
{ __('Turn off the library', 'extendify-sdk') }
|
51 |
+
</Button>
|
52 |
+
</div>
|
53 |
+
<div className="absolute right-1">
|
54 |
+
<Button
|
55 |
+
className="opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black"
|
56 |
+
icon={ <Icon icon={ closeSmall } /> }
|
57 |
+
label={ __('Dismiss this notice', 'extendify-sdk') }
|
58 |
+
onClick={ dismiss }
|
59 |
+
showTooltip={ false }
|
60 |
+
/>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
}
|
redux-core/extendify-sdk/src/components/buttons/Primary.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import classNames from 'classnames'
|
2 |
+
import { createElement } from '@wordpress/element'
|
3 |
+
|
4 |
+
export default function Primary({ tagName='button', children, ...props }) {
|
5 |
+
props.className = classNames(props.className, 'bg-extendify-main hover:bg-extendify-main-dark py-3 pl-5 pr-3 w-60 rounded no-underline text-base text-white flex justify-center items-center space-x-2')
|
6 |
+
return createElement(
|
7 |
+
tagName,
|
8 |
+
props,
|
9 |
+
children,
|
10 |
+
)
|
11 |
+
}
|
redux-core/extendify-sdk/src/components/icons/index.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export { default as alert } from './library/alert'
|
2 |
+
export { default as brandMark } from './library/brand-mark'
|
3 |
+
export { default as download } from './library/download'
|
4 |
+
export { default as user } from './library/user'
|
5 |
+
export { default as success } from './library/success'
|
6 |
+
|
redux-core/extendify-sdk/src/components/icons/library/alert.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { Path, SVG } from '@wordpress/primitives'
|
5 |
+
|
6 |
+
const alert = (
|
7 |
+
<SVG viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path d="M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z" stroke="currentColor" strokeWidth="1.25" fill="none"/>
|
9 |
+
<Path d="M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z" fill="currentColor" />
|
10 |
+
<Path d="M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z" fill="currentColor"/>
|
11 |
+
</SVG>
|
12 |
+
)
|
13 |
+
|
14 |
+
export default alert
|
redux-core/extendify-sdk/src/components/icons/library/brand-mark.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { Path, SVG } from '@wordpress/primitives'
|
5 |
+
|
6 |
+
const brandMark = (
|
7 |
+
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path d="m15.7919 7.73624h-11.67902v12.23516h11.67902z" fill="#1e1e1e"></Path>
|
9 |
+
<Path d="m20 4h-8v8h8z" fill="#37c2a2"></Path>
|
10 |
+
</SVG>
|
11 |
+
)
|
12 |
+
|
13 |
+
export default brandMark
|
redux-core/extendify-sdk/src/components/icons/library/download.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { Path, SVG } from '@wordpress/primitives'
|
5 |
+
|
6 |
+
const download = (
|
7 |
+
<SVG viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path d="M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z" stroke="white" strokeWidth="1.25"/>
|
9 |
+
<Path d="M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z" stroke="white" strokeWidth="1.25"/>
|
10 |
+
</SVG>
|
11 |
+
)
|
12 |
+
|
13 |
+
export default download
|
redux-core/extendify-sdk/src/components/icons/library/success.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import {
|
5 |
+
Path, SVG, G, Circle, Rect,
|
6 |
+
} from '@wordpress/primitives'
|
7 |
+
|
8 |
+
const download = (
|
9 |
+
<SVG fill="none" viewBox="0 0 151 148" width="151" xmlns="http://www.w3.org/2000/svg">
|
10 |
+
<Circle cx="65.6441" cy="66.6114" fill="#0b4a43" r="65.3897"/>
|
11 |
+
<G fill="#cbc3f5" stroke="#0b4a43">
|
12 |
+
<Path d="m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z" strokeWidth="1.5"/>
|
13 |
+
<Path d="m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z" strokeWidth="1.75"/>
|
14 |
+
<Rect height="45.5077" rx="9.13723" strokeWidth="1.75" transform="matrix(0 1 -1 0 191.5074 -96.0026)" width="18.2745" x="143.755" y="47.7524"/>
|
15 |
+
<Rect height="42.3038" rx="8.73674" strokeWidth="1.75" transform="matrix(0 1 -1 0 241.97 -50.348)" width="17.4735" x="146.159" y="95.811"/>
|
16 |
+
<Rect height="55.9204" rx="8.73674" strokeWidth="1.75" transform="matrix(0 1 -1 0 213.1347 -85.5913)" width="17.4735" x="149.363" y="63.7717"/>
|
17 |
+
<Rect height="51.1145" rx="8.73674" strokeWidth="1.75" transform="matrix(0 1 -1 0 229.1545 -69.5715)" width="17.4735" x="149.363" y="79.7915"/>
|
18 |
+
<Path d="m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z" strokeWidth="1.75"/>
|
19 |
+
<Path d="m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z" strokeWidth="1.75"/>
|
20 |
+
</G>
|
21 |
+
</SVG>
|
22 |
+
)
|
23 |
+
|
24 |
+
export default download
|
redux-core/extendify-sdk/src/components/icons/library/user.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { Path, SVG } from '@wordpress/primitives'
|
5 |
+
|
6 |
+
const user = (
|
7 |
+
<SVG fill="none" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path clipRule="evenodd" d="m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z" fill="currentColor" fillRule="evenodd"/>
|
9 |
+
</SVG>
|
10 |
+
)
|
11 |
+
|
12 |
+
export default user
|
redux-core/extendify-sdk/src/components/modals/Modal.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Dialog, Transition } from '@headlessui/react'
|
2 |
+
import {
|
3 |
+
Fragment, useRef, forwardRef,
|
4 |
+
} from '@wordpress/element'
|
5 |
+
import { __ } from '@wordpress/i18n'
|
6 |
+
import { close } from '@wordpress/icons'
|
7 |
+
import { Button } from '@wordpress/components'
|
8 |
+
|
9 |
+
const CloseButton = (props) => {
|
10 |
+
return <Button
|
11 |
+
{...props}
|
12 |
+
icon={ close }
|
13 |
+
className="text-extendify-black opacity-75 hover:opacity-100"
|
14 |
+
showTooltip={false}
|
15 |
+
label={__('Close dialog', 'extendify-sdk')}
|
16 |
+
/>
|
17 |
+
}
|
18 |
+
|
19 |
+
export const Modal = forwardRef(({ isOpen, heading, onRequestClose, children }, initialFocus) => {
|
20 |
+
const focusBackup = useRef(null)
|
21 |
+
|
22 |
+
return <Transition.Root appear show={isOpen} as={Fragment}>
|
23 |
+
<Dialog
|
24 |
+
as="div"
|
25 |
+
static
|
26 |
+
open={isOpen}
|
27 |
+
initialFocus={initialFocus ?? focusBackup}
|
28 |
+
className="extendify-sdk"
|
29 |
+
onClose={onRequestClose}>
|
30 |
+
<div className="fixed z-high inset-0 flex">
|
31 |
+
<Transition.Child
|
32 |
+
as={Fragment}
|
33 |
+
enter="ease-out duration-50 transition"
|
34 |
+
enterFrom="opacity-0"
|
35 |
+
enterTo="opacity-100">
|
36 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 transition-opacity" />
|
37 |
+
</Transition.Child>
|
38 |
+
<Transition.Child
|
39 |
+
as={Fragment}
|
40 |
+
enter="ease-out duration-300 translate transform"
|
41 |
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
42 |
+
enterTo="opacity-100 translate-y-0">
|
43 |
+
<div className="m-auto relative w-full">
|
44 |
+
<div className="bg-white shadow-modal items-center justify-center m-auto max-w-lg relative rounded-sm w-full">
|
45 |
+
{ heading ?
|
46 |
+
<div className='border-b flex justify-between items-center leading-none pl-6 py-2 pr-3'>
|
47 |
+
<span className="text-base text-extendify-black whitespace-nowrap">
|
48 |
+
{heading}
|
49 |
+
</span>
|
50 |
+
<CloseButton onClick={onRequestClose} />
|
51 |
+
</div> :
|
52 |
+
<div className='absolute block px-6 py-4 top-0 right-0 '>
|
53 |
+
<CloseButton ref={focusBackup} onClick={onRequestClose} />
|
54 |
+
</div>}
|
55 |
+
<div>{children}</div>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</Transition.Child>
|
59 |
+
</div>
|
60 |
+
</Dialog>
|
61 |
+
</Transition.Root>
|
62 |
+
})
|
redux-core/extendify-sdk/src/components/modals/SettingsModal.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useRef } from '@wordpress/element'
|
2 |
+
import { __ } from '@wordpress/i18n'
|
3 |
+
import LoginInterface from '../LoginInterface'
|
4 |
+
import { Modal } from './Modal'
|
5 |
+
|
6 |
+
export default function SettingsModal({ isOpen, onClose }) {
|
7 |
+
const initialFocus = useRef(null)
|
8 |
+
|
9 |
+
return <Modal
|
10 |
+
heading={__('Settings', 'extendify-sdk')}
|
11 |
+
isOpen={isOpen}
|
12 |
+
ref={initialFocus}
|
13 |
+
onRequestClose={onClose}>
|
14 |
+
<div className="flex p-6 justify-center">
|
15 |
+
<LoginInterface
|
16 |
+
initialFocus={initialFocus}
|
17 |
+
actionCallback={onClose}/>
|
18 |
+
</div>
|
19 |
+
</Modal>
|
20 |
+
}
|
redux-core/extendify-sdk/src/components/modals/SplitModal.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Icon, close } from '@wordpress/icons'
|
2 |
+
import { __ } from '@wordpress/i18n'
|
3 |
+
import { Dialog, Transition } from '@headlessui/react'
|
4 |
+
import { Fragment } from '@wordpress/element'
|
5 |
+
|
6 |
+
export default function SplitModal({ onRequestClose, isOpen, left, right }) {
|
7 |
+
|
8 |
+
return <Transition.Root show={true} as={Fragment}>
|
9 |
+
<Dialog
|
10 |
+
as="div"
|
11 |
+
static
|
12 |
+
open={isOpen}
|
13 |
+
className="extendify-sdk"
|
14 |
+
onClose={onRequestClose}
|
15 |
+
>
|
16 |
+
<div className="fixed z-high inset-0 flex">
|
17 |
+
<Transition.Child
|
18 |
+
as={Fragment}
|
19 |
+
enter="ease-out duration-300"
|
20 |
+
enterFrom="opacity-0"
|
21 |
+
enterTo="opacity-100"
|
22 |
+
>
|
23 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 transition-opacity" />
|
24 |
+
</Transition.Child>
|
25 |
+
<Transition.Child
|
26 |
+
as={Fragment}
|
27 |
+
enter="ease-out duration-300"
|
28 |
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
29 |
+
enterTo="opacity-100 translate-y-0"
|
30 |
+
>
|
31 |
+
<div className="m-auto">
|
32 |
+
<div className="relative m-8 md:m-0 max-w-md rounded-sm md:flex bg-gray-100 items-center justify-center md:max-w-2xl">
|
33 |
+
<button
|
34 |
+
onClick={onRequestClose}
|
35 |
+
className="absolute block p-4 top-0 right-0 rounded-md cursor-pointer text-gray-700 opacity-30 hover:opacity-100">
|
36 |
+
<span className="sr-only">{ __('Close', 'extendify-sdk') }</span>
|
37 |
+
<Icon icon={ close } />
|
38 |
+
</button>
|
39 |
+
<div className="rounded-md md:rounded-l-md md:rounded-tr-none bg-white p-12 text-center md:w-7/12 items-center">
|
40 |
+
{left}
|
41 |
+
</div>
|
42 |
+
<div className="justify-center md:justify-none md:w-6/12 p-10 text-black hidden md:block ">
|
43 |
+
{right}
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</Transition.Child>
|
48 |
+
</div>
|
49 |
+
</Dialog>
|
50 |
+
</Transition.Root>
|
51 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/config.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/hooks/helpers.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/hooks/useTaxonomies.js
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
import { useEffect, useCallback } from '@wordpress/element'
|
2 |
import { Taxonomies as TaxonomiesApi } from '../api/Taxonomies'
|
3 |
-
import { useTemplatesStore } from '../state/Templates'
|
4 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
|
|
5 |
|
6 |
-
export default function useTaxonomies(
|
7 |
const setupDefaultTaxonomies = useTemplatesStore(state => state.setupDefaultTaxonomies)
|
8 |
const setTaxonomies = useTaxonomyStore(state => state.setTaxonomies)
|
9 |
const fetchTaxonomies = useCallback(async () => {
|
@@ -15,11 +15,11 @@ export default function useTaxonomies(open) {
|
|
15 |
taxFiltered[key] = tax[key]
|
16 |
return taxFiltered
|
17 |
}, {})
|
18 |
-
setupDefaultTaxonomies(tax)
|
19 |
setTaxonomies(tax)
|
20 |
-
|
|
|
21 |
|
22 |
useEffect(() => {
|
23 |
-
|
24 |
-
}, [fetchTaxonomies,
|
25 |
}
|
1 |
import { useEffect, useCallback } from '@wordpress/element'
|
2 |
import { Taxonomies as TaxonomiesApi } from '../api/Taxonomies'
|
|
|
3 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
4 |
+
import { useTemplatesStore } from '../state/Templates'
|
5 |
|
6 |
+
export default function useTaxonomies(fetchImmediately=false) {
|
7 |
const setupDefaultTaxonomies = useTemplatesStore(state => state.setupDefaultTaxonomies)
|
8 |
const setTaxonomies = useTaxonomyStore(state => state.setTaxonomies)
|
9 |
const fetchTaxonomies = useCallback(async () => {
|
15 |
taxFiltered[key] = tax[key]
|
16 |
return taxFiltered
|
17 |
}, {})
|
|
|
18 |
setTaxonomies(tax)
|
19 |
+
setupDefaultTaxonomies()
|
20 |
+
}, [setTaxonomies, setupDefaultTaxonomies])
|
21 |
|
22 |
useEffect(() => {
|
23 |
+
fetchImmediately && fetchTaxonomies()
|
24 |
+
}, [fetchTaxonomies, fetchImmediately])
|
25 |
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/listeners/index.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/listeners/softerror-encountered.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/listeners/template-inserted.js
RENAMED
@@ -10,7 +10,7 @@ export const templateHandler = {
|
|
10 |
const increaseImports = useUserStore.getState().incrementImports
|
11 |
window.addEventListener('extendify-sdk::template-inserted', (event) => {
|
12 |
createNotice(
|
13 |
-
'info', __('
|
14 |
isDismissible: true,
|
15 |
type: 'snackbar',
|
16 |
},
|
10 |
const increaseImports = useUserStore.getState().incrementImports
|
11 |
window.addEventListener('extendify-sdk::template-inserted', (event) => {
|
12 |
createNotice(
|
13 |
+
'info', __('Page layout Added'), {
|
14 |
isDismissible: true,
|
15 |
type: 'snackbar',
|
16 |
},
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/NeedsPermissionModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/NeedsRegistrationModal.js
RENAMED
@@ -2,9 +2,7 @@ import { __ } from '@wordpress/i18n'
|
|
2 |
import {
|
3 |
Modal, Button, ButtonGroup,
|
4 |
} from '@wordpress/components'
|
5 |
-
import {
|
6 |
-
render, useEffect, useRef,
|
7 |
-
} from '@wordpress/element'
|
8 |
import { useUserStore } from '../state/User'
|
9 |
import { useState } from '@wordpress/element'
|
10 |
import { User as UserApi } from '../api/User'
|
@@ -22,12 +20,6 @@ export default function NeedsRegistrationModal({ finished }) {
|
|
22 |
finished()
|
23 |
}
|
24 |
|
25 |
-
useEffect(() => {
|
26 |
-
UserApi.getMeta('user_email')
|
27 |
-
.then((value) => setEmail(value ?? ''))
|
28 |
-
submitRef.current.focus()
|
29 |
-
}, [])
|
30 |
-
|
31 |
return <Modal
|
32 |
className="extendify-sdk"
|
33 |
title={__('One last step...', 'extendify-sdk')}
|
@@ -39,7 +31,6 @@ export default function NeedsRegistrationModal({ finished }) {
|
|
39 |
<div className="relative w-full max-w-xs">
|
40 |
<input
|
41 |
id="extendify-email-register"
|
42 |
-
value={email}
|
43 |
required
|
44 |
onChange={(event) => setEmail(event.target.value)}
|
45 |
type="text"
|
@@ -66,7 +57,7 @@ export default function NeedsRegistrationModal({ finished }) {
|
|
66 |
export function check() {
|
67 |
return {
|
68 |
id: 'NeedsRegistrationModal',
|
69 |
-
pass: (useUserStore.getState().registration?.email || useUserStore.getState().apiKey),
|
70 |
allow() {},
|
71 |
deny() {
|
72 |
return new Promise((finished) => {
|
2 |
import {
|
3 |
Modal, Button, ButtonGroup,
|
4 |
} from '@wordpress/components'
|
5 |
+
import { render, useRef } from '@wordpress/element'
|
|
|
|
|
6 |
import { useUserStore } from '../state/User'
|
7 |
import { useState } from '@wordpress/element'
|
8 |
import { User as UserApi } from '../api/User'
|
20 |
finished()
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
return <Modal
|
24 |
className="extendify-sdk"
|
25 |
title={__('One last step...', 'extendify-sdk')}
|
31 |
<div className="relative w-full max-w-xs">
|
32 |
<input
|
33 |
id="extendify-email-register"
|
|
|
34 |
required
|
35 |
onChange={(event) => setEmail(event.target.value)}
|
36 |
type="text"
|
57 |
export function check() {
|
58 |
return {
|
59 |
id: 'NeedsRegistrationModal',
|
60 |
+
pass: (Boolean(useUserStore.getState().registration?.email || useUserStore.getState().apiKey)),
|
61 |
allow() {},
|
62 |
deny() {
|
63 |
return new Promise((finished) => {
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/ReloadRequiredModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ActivatePluginsModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ActivatingModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/ErrorActivating.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasPluginsActivated/index.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/ErrorInstalling.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/InstallingModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/RequiredPluginsModal.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/hasRequiredPlugins/index.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/helpers.js
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/src/middleware/index.js
RENAMED
@@ -11,11 +11,9 @@ export const Middleware = (middleware = []) => {
|
|
11 |
async check(template) {
|
12 |
for (const m of middleware) {
|
13 |
const cb = await this[`${m}`](template)
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
: cb.deny)
|
18 |
-
}, 0)
|
19 |
}
|
20 |
},
|
21 |
reset() {
|
11 |
async check(template) {
|
12 |
for (const m of middleware) {
|
13 |
const cb = await this[`${m}`](template)
|
14 |
+
this.stack.push(cb.pass
|
15 |
+
? cb.allow
|
16 |
+
: cb.deny)
|
|
|
|
|
17 |
}
|
18 |
},
|
19 |
reset() {
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/GridView.js
RENAMED
@@ -3,23 +3,23 @@ import Grid from './parts/Grid'
|
|
3 |
import HasSidebar from './parts/HasSidebar'
|
4 |
import TypeSelect from '../components/TypeSelect'
|
5 |
import { __ } from '@wordpress/i18n'
|
6 |
-
import TaxonomyBreadcrumbs from '../components/TaxonomyBreadcrumbs'
|
7 |
import Toolbar from './parts/Toolbar'
|
8 |
|
9 |
export default function GridView() {
|
10 |
-
return <div className="bg-white h-full flex flex-col items-center relative
|
11 |
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
12 |
<div className="w-full flex-grow overflow-hidden">
|
13 |
-
<
|
|
|
|
|
14 |
{__('Skip to content', 'extendify-sdk')}
|
15 |
-
</
|
16 |
<div className="sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full">
|
17 |
<HasSidebar>
|
18 |
<SidebarMain/>
|
19 |
<>
|
20 |
<TypeSelect/>
|
21 |
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
22 |
-
<TaxonomyBreadcrumbs/>
|
23 |
<div className="relative h-full z-30 bg-white">
|
24 |
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
25 |
<Grid/>
|
3 |
import HasSidebar from './parts/HasSidebar'
|
4 |
import TypeSelect from '../components/TypeSelect'
|
5 |
import { __ } from '@wordpress/i18n'
|
|
|
6 |
import Toolbar from './parts/Toolbar'
|
7 |
|
8 |
export default function GridView() {
|
9 |
+
return <div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
10 |
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
11 |
<div className="w-full flex-grow overflow-hidden">
|
12 |
+
<button
|
13 |
+
onClick={() => document.getElementById('extendify-templates').querySelector('button').focus()}
|
14 |
+
className="sr-only focus:not-sr-only focus:text-blue-500">
|
15 |
{__('Skip to content', 'extendify-sdk')}
|
16 |
+
</button>
|
17 |
<div className="sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full">
|
18 |
<HasSidebar>
|
19 |
<SidebarMain/>
|
20 |
<>
|
21 |
<TypeSelect/>
|
22 |
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
|
|
23 |
<div className="relative h-full z-30 bg-white">
|
24 |
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
25 |
<Grid/>
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/MainContent.js
RENAMED
@@ -6,12 +6,11 @@ import HasSidebar from '../layout/HasSidebar'
|
|
6 |
import TypeSelect from '../components/TypeSelect'
|
7 |
import { __ } from '@wordpress/i18n'
|
8 |
import SidebarSingle from '../layout/sidebars/SidebarSingle'
|
9 |
-
import TaxonomyBreadcrumbs from '../components/TaxonomyBreadcrumbs'
|
10 |
import Toolbar from '../layout/Toolbar'
|
11 |
|
12 |
export default function MainContent({ setOpen }) {
|
13 |
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
14 |
-
return <div className="bg-white h-full flex flex-col items-center relative
|
15 |
<Toolbar
|
16 |
className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"
|
17 |
hideLibrary={() => setOpen(false)}/>
|
@@ -33,7 +32,6 @@ export default function MainContent({ setOpen }) {
|
|
33 |
<>
|
34 |
<TypeSelect/>
|
35 |
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
36 |
-
<TaxonomyBreadcrumbs/>
|
37 |
<div className="relative h-full z-30 bg-white">
|
38 |
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
39 |
<TemplatesList/>
|
6 |
import TypeSelect from '../components/TypeSelect'
|
7 |
import { __ } from '@wordpress/i18n'
|
8 |
import SidebarSingle from '../layout/sidebars/SidebarSingle'
|
|
|
9 |
import Toolbar from '../layout/Toolbar'
|
10 |
|
11 |
export default function MainContent({ setOpen }) {
|
12 |
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
13 |
+
return <div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
14 |
<Toolbar
|
15 |
className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"
|
16 |
hideLibrary={() => setOpen(false)}/>
|
32 |
<>
|
33 |
<TypeSelect/>
|
34 |
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
|
|
35 |
<div className="relative h-full z-30 bg-white">
|
36 |
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
37 |
<TemplatesList/>
|
redux-core/extendify-sdk/src/pages/Router.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import GridView from './GridView.js'
|
2 |
+
import SingleView from './SingleView.js'
|
3 |
+
|
4 |
+
// This used to be doing more so we may be able to
|
5 |
+
// refactor it out since it's barely being used now
|
6 |
+
export default function Router({ page }) {
|
7 |
+
|
8 |
+
switch (page) {
|
9 |
+
case 'main': return <GridView/>
|
10 |
+
case 'single': return <SingleView/>
|
11 |
+
}
|
12 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/SingleView.js
RENAMED
@@ -7,7 +7,7 @@ import Toolbar from './parts/Toolbar'
|
|
7 |
|
8 |
export default function SingleView() {
|
9 |
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
10 |
-
return <div className="bg-white h-full flex flex-col items-center relative
|
11 |
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
12 |
<div className="w-full flex-grow overflow-hidden">
|
13 |
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
7 |
|
8 |
export default function SingleView() {
|
9 |
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
10 |
+
return <div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
11 |
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
12 |
<div className="w-full flex-grow overflow-hidden">
|
13 |
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/Grid.js
RENAMED
@@ -8,10 +8,13 @@ import { Spinner, Button } from '@wordpress/components'
|
|
8 |
import { __, sprintf } from '@wordpress/i18n'
|
9 |
import { useIsMounted } from '../../hooks/helpers'
|
10 |
import TemplateButton from '../../components/TemplateButton'
|
|
|
|
|
11 |
|
12 |
export default function TemplatesList() {
|
13 |
const isMounted = useIsMounted()
|
14 |
const templates = useTemplatesStore(state => state.templates)
|
|
|
15 |
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
16 |
const appendTemplates = useTemplatesStore(state => state.appendTemplates)
|
17 |
const [serverError, setServerError] = useState('')
|
@@ -104,11 +107,6 @@ export default function TemplatesList() {
|
|
104 |
}
|
105 |
|
106 |
if (nothingFound) {
|
107 |
-
if (searchParamsRaw?.search.length) {
|
108 |
-
return <h2 className="text-left">
|
109 |
-
{sprintf(__('No results for %s.', 'extendify-sdk'), searchParamsRaw?.search)}
|
110 |
-
</h2>
|
111 |
-
}
|
112 |
return <h2 className="text-left">{__('No results found.', 'extendify-sdk')}</h2>
|
113 |
}
|
114 |
|
@@ -118,18 +116,34 @@ export default function TemplatesList() {
|
|
118 |
</div>
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
return <>
|
122 |
-
<
|
|
|
|
|
|
|
123 |
{templates.map((template) => {
|
124 |
-
|
125 |
-
<
|
|
|
126 |
template={template}
|
127 |
-
setActiveTemplate={() => setActiveTemplate(template)}
|
128 |
-
imageLoaded={() => {}}
|
129 |
/>
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
})}
|
132 |
-
</
|
133 |
{useTemplatesStore.getState().nextPage && <>
|
134 |
<div
|
135 |
className="-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text"
|
8 |
import { __, sprintf } from '@wordpress/i18n'
|
9 |
import { useIsMounted } from '../../hooks/helpers'
|
10 |
import TemplateButton from '../../components/TemplateButton'
|
11 |
+
import Masonry from 'react-masonry-css'
|
12 |
+
import { ImportTemplateBlock } from '../../components/ImportTemplateBlock'
|
13 |
|
14 |
export default function TemplatesList() {
|
15 |
const isMounted = useIsMounted()
|
16 |
const templates = useTemplatesStore(state => state.templates)
|
17 |
+
|
18 |
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
19 |
const appendTemplates = useTemplatesStore(state => state.appendTemplates)
|
20 |
const [serverError, setServerError] = useState('')
|
107 |
}
|
108 |
|
109 |
if (nothingFound) {
|
|
|
|
|
|
|
|
|
|
|
110 |
return <h2 className="text-left">{__('No results found.', 'extendify-sdk')}</h2>
|
111 |
}
|
112 |
|
116 |
</div>
|
117 |
}
|
118 |
|
119 |
+
const breakpointColumnsObj = {
|
120 |
+
default: 3,
|
121 |
+
1320: 2,
|
122 |
+
860: 1,
|
123 |
+
599: 2,
|
124 |
+
400: 1,
|
125 |
+
}
|
126 |
+
|
127 |
return <>
|
128 |
+
<Masonry
|
129 |
+
breakpointCols={breakpointColumnsObj}
|
130 |
+
className="flex -ml-8 w-auto pb-40"
|
131 |
+
columnClassName="pl-8 bg-clip-padding">
|
132 |
{templates.map((template) => {
|
133 |
+
if (searchParamsRaw.type === 'pattern') {
|
134 |
+
return <ImportTemplateBlock
|
135 |
+
key={template.id}
|
136 |
template={template}
|
|
|
|
|
137 |
/>
|
138 |
+
}
|
139 |
+
return <TemplateButton
|
140 |
+
key={template.id}
|
141 |
+
template={template}
|
142 |
+
setActiveTemplate={() => setActiveTemplate(template)}
|
143 |
+
imageLoaded={() => {}}
|
144 |
+
/>
|
145 |
})}
|
146 |
+
</Masonry>
|
147 |
{useTemplatesStore.getState().nextPage && <>
|
148 |
<div
|
149 |
className="-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text"
|
redux-core/extendify-sdk/src/pages/parts/HasSidebar.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useUserStore } from '../../state/User'
|
2 |
+
import ImportCounter from '../../components/ImportCounter'
|
3 |
+
|
4 |
+
export default function HasSidebar({ children }) {
|
5 |
+
const apiKey = useUserStore(state => state.apiKey)
|
6 |
+
return <>
|
7 |
+
<aside className="flex-shrink-0 sm:pl-6 py-0 sm:py-6 relative">
|
8 |
+
<div className="sm:w-56 lg:w-64 sticky flex flex-col lg:h-full">{children[0]}</div>
|
9 |
+
<div className="hidden sm:flex flex-col absolute bottom-0 mb-6 w-64 text-left space-y-4">
|
10 |
+
{ !apiKey.length && <ImportCounter /> }
|
11 |
+
</div>
|
12 |
+
</aside>
|
13 |
+
<main
|
14 |
+
id="extendify-templates"
|
15 |
+
className="w-full smp:l-12 sm:pt-6 h-full overflow-hidden">
|
16 |
+
{children[1]}
|
17 |
+
</main>
|
18 |
+
</>
|
19 |
+
}
|
redux-core/extendify-sdk/src/pages/parts/MainWindow.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Fragment, useRef } from '@wordpress/element'
|
2 |
+
import { Dialog, Transition } from '@headlessui/react'
|
3 |
+
import { useGlobalStore } from '../../state/GlobalState'
|
4 |
+
import Router from '../Router'
|
5 |
+
import WelcomeNotice from '../../components/WelcomeNotice'
|
6 |
+
|
7 |
+
export default function MainWindow() {
|
8 |
+
const containerRef = useRef(null)
|
9 |
+
const open = useGlobalStore(state => state.open)
|
10 |
+
const setOpen = useGlobalStore(state => state.setOpen)
|
11 |
+
const currentPage = useGlobalStore(state => state.currentPage)
|
12 |
+
|
13 |
+
return (
|
14 |
+
<Transition.Root show={open} as={Fragment}>
|
15 |
+
<Dialog
|
16 |
+
as="div"
|
17 |
+
static
|
18 |
+
className="extendify-sdk"
|
19 |
+
initialFocus={containerRef}
|
20 |
+
onClose={() => setOpen(false)}
|
21 |
+
>
|
22 |
+
<div className="h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto">
|
23 |
+
<div className="flex h-full overflow-hidden p-4 lg:p-20 text-center w-full">
|
24 |
+
<Transition.Child
|
25 |
+
as={Fragment}
|
26 |
+
enter="ease-out duration-50 transition"
|
27 |
+
enterFrom="opacity-0"
|
28 |
+
enterTo="opacity-100"
|
29 |
+
>
|
30 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 transition-opacity" />
|
31 |
+
</Transition.Child>
|
32 |
+
<Transition.Child
|
33 |
+
as={Fragment}
|
34 |
+
enter="ease-out duration-300 translate transform"
|
35 |
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
36 |
+
enterTo="opacity-100 translate-y-0"
|
37 |
+
>
|
38 |
+
<div
|
39 |
+
ref={containerRef}
|
40 |
+
tabIndex="0"
|
41 |
+
className="max-w-8xl mx-auto w-full">
|
42 |
+
<Router page={currentPage} />
|
43 |
+
<WelcomeNotice />
|
44 |
+
</div>
|
45 |
+
</Transition.Child>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</Dialog>
|
49 |
+
</Transition.Root>
|
50 |
+
)
|
51 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/Single.js
RENAMED
@@ -2,7 +2,6 @@ import { ImportButton } from '../../components/ImportButton'
|
|
2 |
import { __ } from '@wordpress/i18n'
|
3 |
import classNames from 'classnames'
|
4 |
import { useUserStore } from '../../state/User'
|
5 |
-
import { ExternalLink } from '@wordpress/components'
|
6 |
import {
|
7 |
useEffect, useState, useCallback,
|
8 |
} from '@wordpress/element'
|
@@ -58,9 +57,6 @@ export default function Single({ template }) {
|
|
58 |
<div className="lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300">
|
59 |
<div className="text-left m-0 h-full px-6 sm:p-0">
|
60 |
<h1 className="leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal">{template.fields.display_title}</h1>
|
61 |
-
<ExternalLink href={template.fields.url}>
|
62 |
-
{__('Demo', 'extendify-sdk')}
|
63 |
-
</ExternalLink>
|
64 |
</div>
|
65 |
<div className={classNames({
|
66 |
'inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3': true,
|
2 |
import { __ } from '@wordpress/i18n'
|
3 |
import classNames from 'classnames'
|
4 |
import { useUserStore } from '../../state/User'
|
|
|
5 |
import {
|
6 |
useEffect, useState, useCallback,
|
7 |
} from '@wordpress/element'
|
57 |
<div className="lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300">
|
58 |
<div className="text-left m-0 h-full px-6 sm:p-0">
|
59 |
<h1 className="leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal">{template.fields.display_title}</h1>
|
|
|
|
|
|
|
60 |
</div>
|
61 |
<div className={classNames({
|
62 |
'inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3': true,
|
redux-core/extendify-sdk/src/pages/parts/Toolbar.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { useState } from '@wordpress/element'
|
3 |
+
import { Icon, close } from '@wordpress/icons'
|
4 |
+
import { Button } from '@wordpress/components'
|
5 |
+
|
6 |
+
import { useGlobalStore } from '../../state/GlobalState'
|
7 |
+
import { user } from '../../components/icons/'
|
8 |
+
import SettingsModal from '../../components/modals/SettingsModal'
|
9 |
+
import { brandMark } from '../../components/icons/'
|
10 |
+
|
11 |
+
export default function Toolbar({ className }) {
|
12 |
+
const setOpen = useGlobalStore(state => state.setOpen)
|
13 |
+
const [openModal, setOpenModal] = useState(false)
|
14 |
+
|
15 |
+
return <div className={className}>
|
16 |
+
<div className="flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full">
|
17 |
+
<div className="flex space-x-12 h-full">
|
18 |
+
<div className="bg-transparent flex items-center space-x-1.5 lg:w-64 -ml-1">
|
19 |
+
<Icon icon={ brandMark } size={ 40 } />
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<div className="space-x-2 transform sm:translate-x-6">
|
23 |
+
|
24 |
+
<Button
|
25 |
+
onClick={() => setOpenModal(true)}
|
26 |
+
icon={<Icon icon={ user } size={ 24 } />}
|
27 |
+
label={__('Settings', 'extendify-sdk')}
|
28 |
+
/>
|
29 |
+
|
30 |
+
{ openModal &&
|
31 |
+
<SettingsModal
|
32 |
+
isOpen={openModal}
|
33 |
+
onClose={() => setOpenModal(false)}/>
|
34 |
+
}
|
35 |
+
|
36 |
+
<Button
|
37 |
+
onClick={() => setOpen(false) }
|
38 |
+
icon={<Icon icon={ close } size={ 24 } />}
|
39 |
+
label={__('Close library', 'extendify-sdk')}
|
40 |
+
/>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
}
|
redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarMain.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useTemplatesStore } from '../../../state/Templates'
|
2 |
+
import { Panel } from '@wordpress/components'
|
3 |
+
import TaxonomySection from '../../../components/TaxonomySection'
|
4 |
+
import { useTaxonomyStore } from '../../../state/Taxonomies'
|
5 |
+
import SiteTypeSelector from '../../../components/SiteTypeSelector'
|
6 |
+
import { useUserStore } from '../../../state/User'
|
7 |
+
|
8 |
+
export default function SidebarMain() {
|
9 |
+
const taxonomies = useTaxonomyStore(state => state.taxonomies)
|
10 |
+
const searchParams = useTemplatesStore(state => state.searchParams)
|
11 |
+
const updateSiteType = useUserStore(state => state.updateSiteType)
|
12 |
+
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
13 |
+
|
14 |
+
return <>
|
15 |
+
<div className="mt-px bg-white mb-8 mx-6 pt-6 lg:mx-0 lg:pt-0">
|
16 |
+
{Object.keys(taxonomies?.tax_categories ?? {}).length > 0 && <SiteTypeSelector
|
17 |
+
value={searchParams?.taxonomies?.tax_categories ?? ''}
|
18 |
+
setValue={(term) => {
|
19 |
+
updateSiteType(term)
|
20 |
+
updateTaxonomies({ tax_categories: term })
|
21 |
+
}}
|
22 |
+
terms={taxonomies.tax_categories} />}
|
23 |
+
</div>
|
24 |
+
<div className="mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block">
|
25 |
+
<Panel>
|
26 |
+
{Object.entries(taxonomies).map((taxonomy) => {
|
27 |
+
// Tax categories has been extracted to display above
|
28 |
+
if (taxonomy[0] === 'tax_categories') return null
|
29 |
+
return <TaxonomySection
|
30 |
+
key={taxonomy[0]}
|
31 |
+
taxonomy={taxonomy} />
|
32 |
+
})}
|
33 |
+
</Panel>
|
34 |
+
</div>
|
35 |
+
</>
|
36 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/pages/parts/sidebars/SidebarSingle.js
RENAMED
@@ -24,7 +24,7 @@ export default function SidebarSingle({ template }) {
|
|
24 |
<a
|
25 |
className="button-extendify-main"
|
26 |
target="_blank"
|
27 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.
|
28 |
rel="noreferrer">
|
29 |
{__('Sign up today to get unlimited access', 'extendify-sdk')}
|
30 |
</a>
|
24 |
<a
|
25 |
className="button-extendify-main"
|
26 |
target="_blank"
|
27 |
+
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign_up&utm_content=main`}
|
28 |
rel="noreferrer">
|
29 |
{__('Sign up today to get unlimited access', 'extendify-sdk')}
|
30 |
</a>
|
redux-core/extendify-sdk/src/state/GlobalState.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import create from 'zustand'
|
2 |
+
import { persist } from 'zustand/middleware'
|
3 |
+
import { useTemplatesStore } from './Templates'
|
4 |
+
import { templates as config } from '../config'
|
5 |
+
|
6 |
+
export const useGlobalStore = create(persist((set) => ({
|
7 |
+
open: false,
|
8 |
+
metaData: {},
|
9 |
+
currentPage: 'main',
|
10 |
+
currentTaxonomies: {},
|
11 |
+
currentType: config.defaultType,
|
12 |
+
settingsModal: false,
|
13 |
+
updateCurrentTaxonomies: (data) => set({
|
14 |
+
currentTaxonomies: Object.assign({}, data),
|
15 |
+
}),
|
16 |
+
updateCurrentType: (data) => set({ currentType: data }),
|
17 |
+
setOpen: (value) => {
|
18 |
+
set({ open: value })
|
19 |
+
// Reset the state if it's closed manualy
|
20 |
+
// value && useTemplatesStore.getState().setActive({}) - Not this though
|
21 |
+
value && useTemplatesStore.getState().removeTemplates()
|
22 |
+
// value && useTemplatesStore.getState().setActive({}) // This can be used to default to grid
|
23 |
+
},
|
24 |
+
}), {
|
25 |
+
name: 'extendify-global-state',
|
26 |
+
}))
|
{extendify-sdk → redux-core/extendify-sdk}/src/state/Importing.js
RENAMED
File without changes
|
redux-core/extendify-sdk/src/state/SiteSettings.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import create from 'zustand'
|
2 |
+
import { persist } from 'zustand/middleware'
|
3 |
+
import { SiteSettings } from '../api/SiteSettings'
|
4 |
+
|
5 |
+
const storage = {
|
6 |
+
getItem: async () => await SiteSettings.getData(),
|
7 |
+
setItem: async (_name, value) => await SiteSettings.setData(value),
|
8 |
+
}
|
9 |
+
|
10 |
+
export const useSiteSettingsStore = create(persist(() => ({
|
11 |
+
enabled: true,
|
12 |
+
}), {
|
13 |
+
name: 'extendify-sitesettings',
|
14 |
+
getStorage: () => storage,
|
15 |
+
}))
|
{extendify-sdk → redux-core/extendify-sdk}/src/state/Taxonomies.js
RENAMED
@@ -1,6 +1,7 @@
|
|
1 |
import create from 'zustand'
|
|
|
2 |
|
3 |
-
export const useTaxonomyStore = create((set, get) => ({
|
4 |
taxonomies: {},
|
5 |
openedTaxonomies: [],
|
6 |
setTaxonomies: (taxonomies) => set({
|
@@ -13,4 +14,6 @@ export const useTaxonomyStore = create((set, get) => ({
|
|
13 |
openedTaxonomies: add ? [...opened, tax] : [...opened.filter(t => t != tax)],
|
14 |
})
|
15 |
},
|
|
|
|
|
16 |
}))
|
1 |
import create from 'zustand'
|
2 |
+
import { persist } from 'zustand/middleware'
|
3 |
|
4 |
+
export const useTaxonomyStore = create(persist((set, get) => ({
|
5 |
taxonomies: {},
|
6 |
openedTaxonomies: [],
|
7 |
setTaxonomies: (taxonomies) => set({
|
14 |
openedTaxonomies: add ? [...opened, tax] : [...opened.filter(t => t != tax)],
|
15 |
})
|
16 |
},
|
17 |
+
}), {
|
18 |
+
name: 'extendify-taxonomies',
|
19 |
}))
|
{extendify-sdk → redux-core/extendify-sdk}/src/state/Templates.js
RENAMED
@@ -1,11 +1,13 @@
|
|
1 |
import create from 'zustand'
|
2 |
import { templates as config } from '../config'
|
3 |
-
import {
|
4 |
import { useGlobalStore } from './GlobalState'
|
|
|
|
|
5 |
|
6 |
-
const defaultCategoryForType = (
|
7 |
-
? '
|
8 |
-
:
|
9 |
|
10 |
export const useTemplatesStore = create((set, get) => ({
|
11 |
templates: [],
|
@@ -14,15 +16,18 @@ export const useTemplatesStore = create((set, get) => ({
|
|
14 |
activeTemplate: {},
|
15 |
activeTemplateBlocks: {},
|
16 |
taxonomyDefaultState: {},
|
|
|
17 |
searchParams: {
|
18 |
taxonomies: {},
|
19 |
type: config.defaultType,
|
20 |
-
search: '',
|
21 |
},
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
removeTemplates: () => set({
|
27 |
nextPage: '',
|
28 |
templates: [],
|
@@ -30,15 +35,25 @@ export const useTemplatesStore = create((set, get) => ({
|
|
30 |
appendTemplates: (templates) => set({
|
31 |
templates: [...new Map([...get().templates, ...templates].map(item => [item.id, item])).values()],
|
32 |
}),
|
33 |
-
setupDefaultTaxonomies: (
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
const tax = {}
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
)
|
41 |
|
|
|
|
|
42 |
set({
|
43 |
taxonomyDefaultState: taxonomyDefaultState,
|
44 |
searchParams: {
|
@@ -56,21 +71,25 @@ export const useTemplatesStore = create((set, get) => ({
|
|
56 |
|
57 |
// This will convert the template to blocks for quick(er) injection
|
58 |
if (template?.fields?.code) {
|
59 |
-
|
60 |
-
set({ activeTemplateBlocks: createBlocksFromInnerBlocksTemplate(parse(template.fields.code)) })
|
61 |
}
|
62 |
},
|
63 |
-
resetTaxonomy: (tax) => {
|
64 |
-
get().updateTaxonomies({
|
65 |
-
[tax]: get().taxonomyDefaultState[tax] ?? '',
|
66 |
-
})
|
67 |
-
},
|
68 |
updateTaxonomies: (params) => {
|
69 |
-
const
|
70 |
-
|
71 |
{}, get().searchParams.taxonomies, params,
|
72 |
)
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
},
|
75 |
updateSearchParams: (params) => {
|
76 |
// If taxonomies are set to {}, lets use the default
|
@@ -78,13 +97,6 @@ export const useTemplatesStore = create((set, get) => ({
|
|
78 |
params.taxonomies = get().taxonomyDefaultState
|
79 |
}
|
80 |
|
81 |
-
// If changing the type, change the hard coded tax cat label
|
82 |
-
if (params?.type && ['', 'Default'].includes(get().searchParams?.taxonomies?.tax_categories)) {
|
83 |
-
get().updateTaxonomies({
|
84 |
-
tax_categories: defaultCategoryForType(params.type, 'tax_categories'),
|
85 |
-
})
|
86 |
-
}
|
87 |
-
|
88 |
const searchParams = Object.assign(
|
89 |
{}, get().searchParams, params,
|
90 |
)
|
1 |
import create from 'zustand'
|
2 |
import { templates as config } from '../config'
|
3 |
+
import { rawHandler } from '@wordpress/blocks'
|
4 |
import { useGlobalStore } from './GlobalState'
|
5 |
+
import { useUserStore } from './User'
|
6 |
+
import { useTaxonomyStore } from './Taxonomies'
|
7 |
|
8 |
+
const defaultCategoryForType = (tax) => tax === 'tax_categories'
|
9 |
+
? 'Unknown'
|
10 |
+
: useTaxonomyStore.getState()?.taxonomies[tax][0]?.term ?? undefined
|
11 |
|
12 |
export const useTemplatesStore = create((set, get) => ({
|
13 |
templates: [],
|
16 |
activeTemplate: {},
|
17 |
activeTemplateBlocks: {},
|
18 |
taxonomyDefaultState: {},
|
19 |
+
nextPage: '',
|
20 |
searchParams: {
|
21 |
taxonomies: {},
|
22 |
type: config.defaultType,
|
|
|
23 |
},
|
24 |
+
initTemplateData() {
|
25 |
+
set({
|
26 |
+
activeTemplate: {},
|
27 |
+
})
|
28 |
+
get().setupDefaultTaxonomies()
|
29 |
+
get().updateType(useGlobalStore.getState().currentType)
|
30 |
+
},
|
31 |
removeTemplates: () => set({
|
32 |
nextPage: '',
|
33 |
templates: [],
|
35 |
appendTemplates: (templates) => set({
|
36 |
templates: [...new Map([...get().templates, ...templates].map(item => [item.id, item])).values()],
|
37 |
}),
|
38 |
+
setupDefaultTaxonomies: () => {
|
39 |
+
const taxonomies = useTaxonomyStore.getState().taxonomies
|
40 |
+
let taxonomyDefaultState = Object.entries(taxonomies).reduce((state, current) =>
|
41 |
+
(state[current[0]] = defaultCategoryForType(current[0]), state), {})
|
42 |
const tax = {}
|
43 |
+
|
44 |
+
taxonomyDefaultState = Object.assign(
|
45 |
+
{},
|
46 |
+
taxonomyDefaultState,
|
47 |
+
|
48 |
+
// Override with the user's preferred taxonomies - Currently only supported with tax_categories
|
49 |
+
useUserStore.getState().preferredOptions?.taxonomies ?? {},
|
50 |
+
|
51 |
+
// Override with the global state
|
52 |
+
useGlobalStore.getState()?.currentTaxonomies ?? {},
|
53 |
)
|
54 |
|
55 |
+
tax.taxonomies = Object.assign({}, taxonomyDefaultState)
|
56 |
+
|
57 |
set({
|
58 |
taxonomyDefaultState: taxonomyDefaultState,
|
59 |
searchParams: {
|
71 |
|
72 |
// This will convert the template to blocks for quick(er) injection
|
73 |
if (template?.fields?.code) {
|
74 |
+
set({ activeTemplateBlocks: rawHandler({ HTML: template.fields.code }) })
|
|
|
75 |
}
|
76 |
},
|
|
|
|
|
|
|
|
|
|
|
77 |
updateTaxonomies: (params) => {
|
78 |
+
const data = {}
|
79 |
+
data.taxonomies = Object.assign(
|
80 |
{}, get().searchParams.taxonomies, params,
|
81 |
)
|
82 |
+
if (data?.taxonomies?.tax_categories) {
|
83 |
+
// This is what the user "prefers", which may be used outside the library
|
84 |
+
// which is persisted to the database, where as the global library state is in local storage
|
85 |
+
useUserStore.getState().updatePreferredOption('tax_categories', data?.taxonomies?.tax_categories)
|
86 |
+
}
|
87 |
+
useGlobalStore.getState().updateCurrentTaxonomies(data?.taxonomies)
|
88 |
+
get().updateSearchParams(data)
|
89 |
+
},
|
90 |
+
updateType(type) {
|
91 |
+
useGlobalStore.getState().updateCurrentType(type)
|
92 |
+
get().updateSearchParams({ type })
|
93 |
},
|
94 |
updateSearchParams: (params) => {
|
95 |
// If taxonomies are set to {}, lets use the default
|
97 |
params.taxonomies = get().taxonomyDefaultState
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
const searchParams = Object.assign(
|
101 |
{}, get().searchParams, params,
|
102 |
)
|
{extendify-sdk → redux-core/extendify-sdk}/src/state/User.js
RENAMED
@@ -7,18 +7,23 @@ const storage = {
|
|
7 |
setItem: async (_name, value) => await User.setData(value),
|
8 |
}
|
9 |
|
|
|
|
|
10 |
export const useUserStore = create(persist((set, get) => ({
|
11 |
email: '',
|
12 |
apiKey: '',
|
13 |
imports: 0,
|
14 |
uuid: '',
|
|
|
15 |
registration: {
|
16 |
email: '',
|
17 |
},
|
|
|
|
|
|
|
18 |
allowedImports: 0,
|
19 |
entryPoint: 'not-set',
|
20 |
-
enabled:
|
21 |
-
hasClickedThroughWelcomePage: false,
|
22 |
canInstallPlugins: false,
|
23 |
canActivatePlugins: false,
|
24 |
preferredOptions: {
|
@@ -26,6 +31,9 @@ export const useUserStore = create(persist((set, get) => ({
|
|
26 |
type: '',
|
27 |
search: '',
|
28 |
},
|
|
|
|
|
|
|
29 |
incrementImports: () => set({ imports: get().imports + 1 }),
|
30 |
canImport: () => get().apiKey
|
31 |
? true
|
@@ -37,6 +45,19 @@ export const useUserStore = create(persist((set, get) => ({
|
|
37 |
const remaining = Number(get().allowedImports) - Number(get().imports)
|
38 |
return remaining > 0 ? remaining : 0
|
39 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
updatePreferredOption: (option, value) => {
|
41 |
// If the option doesn't exist, assume it's a taxonomy
|
42 |
if (!Object.prototype.hasOwnProperty.call(get().preferredOptions, option)) {
|
7 |
setItem: async (_name, value) => await User.setData(value),
|
8 |
}
|
9 |
|
10 |
+
const isGlobalLibraryEnabled = () => window.extendifySdkData.sitesettings === null || window.extendifySdkData?.sitesettings?.state?.enabled
|
11 |
+
|
12 |
export const useUserStore = create(persist((set, get) => ({
|
13 |
email: '',
|
14 |
apiKey: '',
|
15 |
imports: 0,
|
16 |
uuid: '',
|
17 |
+
sdkPartner: '',
|
18 |
registration: {
|
19 |
email: '',
|
20 |
},
|
21 |
+
noticesDismissedAt: {
|
22 |
+
welcome: '',
|
23 |
+
},
|
24 |
allowedImports: 0,
|
25 |
entryPoint: 'not-set',
|
26 |
+
enabled:isGlobalLibraryEnabled(),
|
|
|
27 |
canInstallPlugins: false,
|
28 |
canActivatePlugins: false,
|
29 |
preferredOptions: {
|
31 |
type: '',
|
32 |
search: '',
|
33 |
},
|
34 |
+
preferredOptionsHistory: {
|
35 |
+
siteType: [],
|
36 |
+
},
|
37 |
incrementImports: () => set({ imports: get().imports + 1 }),
|
38 |
canImport: () => get().apiKey
|
39 |
? true
|
45 |
const remaining = Number(get().allowedImports) - Number(get().imports)
|
46 |
return remaining > 0 ? remaining : 0
|
47 |
},
|
48 |
+
updateSiteType: (value) => {
|
49 |
+
get().updatePreferredOption('tax_categories', value)
|
50 |
+
if (!value || value === 'Unknown') return
|
51 |
+
|
52 |
+
const history = new Set([value, ...get().preferredOptionsHistory.siteType])
|
53 |
+
set({
|
54 |
+
preferredOptionsHistory: Object.assign(
|
55 |
+
{}, get().preferredOptionsHistory, {
|
56 |
+
siteType: [...history].slice(0, 3),
|
57 |
+
},
|
58 |
+
),
|
59 |
+
})
|
60 |
+
},
|
61 |
updatePreferredOption: (option, value) => {
|
62 |
// If the option doesn't exist, assume it's a taxonomy
|
63 |
if (!Object.prototype.hasOwnProperty.call(get().preferredOptions, option)) {
|
{extendify-sdk → redux-core/extendify-sdk}/src/util/general.js
RENAMED
@@ -43,3 +43,11 @@ export function getPluginDescription(plugin) {
|
|
43 |
}
|
44 |
return plugin
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
return plugin
|
45 |
}
|
46 |
+
|
47 |
+
export function getTaxonomyName(key) {
|
48 |
+
switch (key) {
|
49 |
+
case 'tax_categories': return 'Site Type'
|
50 |
+
case 'tax_pattern_types': return 'Content'
|
51 |
+
}
|
52 |
+
return key.replace('tax_', '').replace(/_/g , ' ').replace(/\b\w/g, l => l.toUpperCase())
|
53 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/src/util/templateInjection.js
RENAMED
@@ -1,17 +1,4 @@
|
|
1 |
import { dispatch } from '@wordpress/data'
|
2 |
-
import { get } from 'lodash'
|
3 |
-
|
4 |
-
import { createBlocksFromInnerBlocksTemplate } from './blocks'
|
5 |
-
|
6 |
-
export function injectTemplate(template) {
|
7 |
-
if (!template) {
|
8 |
-
throw Error('Template not found')
|
9 |
-
}
|
10 |
-
|
11 |
-
const { parse } = window.wp.blocks
|
12 |
-
const createdBlocks = createBlocksFromInnerBlocksTemplate(parse(get(template, 'fields.code')))
|
13 |
-
return injectTemplateBlocks(createdBlocks, template)
|
14 |
-
}
|
15 |
|
16 |
export function injectTemplateBlocks(blocks, templateRaw) {
|
17 |
const { insertBlocks } = dispatch('core/block-editor')
|
1 |
import { dispatch } from '@wordpress/data'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
export function injectTemplateBlocks(blocks, templateRaw) {
|
4 |
const { insertBlocks } = dispatch('core/block-editor')
|
redux-core/extendify-sdk/src/utility-control/index.js
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { InspectorAdvancedControls } from '@wordpress/block-editor'
|
3 |
+
import { createHigherOrderComponent } from '@wordpress/compose'
|
4 |
+
import { addFilter } from '@wordpress/hooks'
|
5 |
+
import { FormTokenField } from '@wordpress/components'
|
6 |
+
|
7 |
+
import suggestions from '../../utility-framework/suggestions.json'
|
8 |
+
|
9 |
+
function addAttributes(settings) {
|
10 |
+
// Add new extUtilities attribute to block settings.
|
11 |
+
return {
|
12 |
+
...settings,
|
13 |
+
attributes: {
|
14 |
+
...settings.attributes,
|
15 |
+
extUtilities: {
|
16 |
+
type: 'array',
|
17 |
+
default: [],
|
18 |
+
},
|
19 |
+
},
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
function addEditProps(settings) {
|
24 |
+
const existingGetEditWrapperProps = settings.getEditWrapperProps
|
25 |
+
settings.getEditWrapperProps = (attributes) => {
|
26 |
+
let props = {}
|
27 |
+
|
28 |
+
if (existingGetEditWrapperProps) {
|
29 |
+
props = existingGetEditWrapperProps(attributes)
|
30 |
+
}
|
31 |
+
|
32 |
+
return addSaveProps(
|
33 |
+
props, settings, attributes,
|
34 |
+
)
|
35 |
+
}
|
36 |
+
|
37 |
+
return settings
|
38 |
+
}
|
39 |
+
|
40 |
+
// Create HOC to add Extendify Utility to Advanced Panel of block.
|
41 |
+
const utilityClassEdit = createHigherOrderComponent((BlockEdit) => {
|
42 |
+
return function editPanel(props) {
|
43 |
+
const { extUtilities: classes } = props.attributes
|
44 |
+
const suggestionList = suggestions.suggestions.map((s) => {
|
45 |
+
// Remove all extra // and . from classnames
|
46 |
+
return s.replace('.', '').replace(new RegExp('\\\\', 'g'), '')
|
47 |
+
})
|
48 |
+
|
49 |
+
return <>
|
50 |
+
<BlockEdit {...props} />
|
51 |
+
{classes && (
|
52 |
+
<InspectorAdvancedControls>
|
53 |
+
<FormTokenField
|
54 |
+
label={__('Extendify Utilities', 'extendify-sdk')}
|
55 |
+
tokenizeOnSpace={true}
|
56 |
+
value={ classes }
|
57 |
+
suggestions={suggestionList}
|
58 |
+
onChange={(value) => {
|
59 |
+
props.setAttributes({
|
60 |
+
extUtilities: value,
|
61 |
+
})
|
62 |
+
}}
|
63 |
+
/>
|
64 |
+
</InspectorAdvancedControls>
|
65 |
+
)}
|
66 |
+
</>
|
67 |
+
|
68 |
+
}
|
69 |
+
}, 'utilityClassEdit')
|
70 |
+
|
71 |
+
function addSaveProps(
|
72 |
+
saveElementProps, blockType, attributes,
|
73 |
+
) {
|
74 |
+
let { className: generatedClasses } = saveElementProps
|
75 |
+
let {
|
76 |
+
extUtilities: classes,
|
77 |
+
className: additionalClasses,
|
78 |
+
} = attributes
|
79 |
+
|
80 |
+
if (!classes || !Object.keys(classes).length) {
|
81 |
+
return saveElementProps
|
82 |
+
}
|
83 |
+
|
84 |
+
// EK seems to be converting string values to objects in some situations
|
85 |
+
const normalizeAsArray = (item) => {
|
86 |
+
switch (Object.prototype.toString.call(item)) {
|
87 |
+
case '[object String]': return item.split(' ')
|
88 |
+
case '[object Array]': return item
|
89 |
+
default: return []
|
90 |
+
}
|
91 |
+
}
|
92 |
+
const classesCombined = new Set([
|
93 |
+
...normalizeAsArray(additionalClasses),
|
94 |
+
...normalizeAsArray(generatedClasses),
|
95 |
+
...normalizeAsArray(classes),
|
96 |
+
])
|
97 |
+
|
98 |
+
return Object.assign(
|
99 |
+
{},
|
100 |
+
saveElementProps,
|
101 |
+
{ className: [...classesCombined].join(' ') },
|
102 |
+
)
|
103 |
+
}
|
104 |
+
|
105 |
+
addFilter(
|
106 |
+
'blocks.registerBlockType',
|
107 |
+
'extendify/utilities/attributes',
|
108 |
+
addAttributes,
|
109 |
+
)
|
110 |
+
|
111 |
+
addFilter(
|
112 |
+
'blocks.registerBlockType',
|
113 |
+
'extendify/utilities/addEditProps',
|
114 |
+
addEditProps,
|
115 |
+
)
|
116 |
+
|
117 |
+
addFilter(
|
118 |
+
'editor.BlockEdit',
|
119 |
+
'extendify/utilities/advancedClassControls',
|
120 |
+
utilityClassEdit,
|
121 |
+
)
|
122 |
+
|
123 |
+
addFilter(
|
124 |
+
'blocks.getSaveContent.extraProps',
|
125 |
+
'extendify/utilities/extra-props',
|
126 |
+
addSaveProps,
|
127 |
+
)
|
{extendify-sdk → redux-core/extendify-sdk}/support/notices.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/tailwind.config.js
RENAMED
@@ -10,7 +10,7 @@
|
|
10 |
module.exports = {
|
11 |
// mode: 'jit',
|
12 |
purge: ['src/**/*'],
|
13 |
-
important: '.extendify-sdk',
|
14 |
darkMode: false,
|
15 |
theme: {
|
16 |
screens: {
|
@@ -25,12 +25,23 @@ module.exports = {
|
|
25 |
'3xl': '1600px',
|
26 |
'4xl': '1920px',
|
27 |
},
|
|
|
28 |
// Extend will add on to TW config, where the above will override and replace
|
29 |
extend: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
minWidth: {
|
31 |
md2: '960px',
|
32 |
},
|
33 |
minHeight: {
|
|
|
|
|
34 |
60: '15rem',
|
35 |
},
|
36 |
fontSize: {
|
@@ -41,8 +52,13 @@ module.exports = {
|
|
41 |
lightest: '#f8fffe',
|
42 |
light: '#e7f8f5',
|
43 |
main: '#008160',
|
|
|
44 |
link: '#299875',
|
45 |
bright: '#30a850',
|
|
|
|
|
|
|
|
|
46 |
},
|
47 |
'wp-theme': {
|
48 |
// It's a Tailwind convention for the base color to use 500 then build off that
|
@@ -74,6 +90,12 @@ module.exports = {
|
|
74 |
high: '99999',
|
75 |
max: '2147483647', // Highest the browser allows - don't block WP re-auth modal though
|
76 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
},
|
78 |
},
|
79 |
variants: {
|
@@ -83,11 +105,10 @@ module.exports = {
|
|
83 |
textColor: ['active'],
|
84 |
},
|
85 |
},
|
86 |
-
plugins: [
|
87 |
-
require('@tailwindcss/aspect-ratio'),
|
88 |
-
],
|
89 |
corePlugins: {
|
90 |
preflight: false,
|
|
|
91 |
container: false,
|
92 |
},
|
93 |
}
|
10 |
module.exports = {
|
11 |
// mode: 'jit',
|
12 |
purge: ['src/**/*'],
|
13 |
+
important: 'div.extendify-sdk',
|
14 |
darkMode: false,
|
15 |
theme: {
|
16 |
screens: {
|
25 |
'3xl': '1600px',
|
26 |
'4xl': '1920px',
|
27 |
},
|
28 |
+
order: {},
|
29 |
// Extend will add on to TW config, where the above will override and replace
|
30 |
extend: {
|
31 |
+
boxShadow:{
|
32 |
+
'inner-sm': 'inset 0 0 0 1px rgba(0,0,0,0.08),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)',
|
33 |
+
'inner-md': 'inset 0 0 0 1px rgba(0,0,0,0.16),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)',
|
34 |
+
modal: ' 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.035),0 0 1px rgba(0,0,0,.05)',
|
35 |
+
},
|
36 |
+
maxWidth: {
|
37 |
+
'8xl': '98rem',
|
38 |
+
},
|
39 |
minWidth: {
|
40 |
md2: '960px',
|
41 |
},
|
42 |
minHeight: {
|
43 |
+
20: '5rem',
|
44 |
+
40: '10rem',
|
45 |
60: '15rem',
|
46 |
},
|
47 |
fontSize: {
|
52 |
lightest: '#f8fffe',
|
53 |
light: '#e7f8f5',
|
54 |
main: '#008160',
|
55 |
+
'main-dark':'#05312C',
|
56 |
link: '#299875',
|
57 |
bright: '#30a850',
|
58 |
+
alert: '#841010',
|
59 |
+
gray: '#5F5F5F',
|
60 |
+
secondary: '#CBC3F5',
|
61 |
+
black: '#1e1e1e',
|
62 |
},
|
63 |
'wp-theme': {
|
64 |
// It's a Tailwind convention for the base color to use 500 then build off that
|
90 |
high: '99999',
|
91 |
max: '2147483647', // Highest the browser allows - don't block WP re-auth modal though
|
92 |
},
|
93 |
+
lineHeight: {
|
94 |
+
'extra-tight': '0.5',
|
95 |
+
},
|
96 |
+
ringWidth: {
|
97 |
+
wp: 'var(--wp-admin-border-width-focus)',
|
98 |
+
},
|
99 |
},
|
100 |
},
|
101 |
variants: {
|
105 |
textColor: ['active'],
|
106 |
},
|
107 |
},
|
108 |
+
plugins: [],
|
|
|
|
|
109 |
corePlugins: {
|
110 |
preflight: false,
|
111 |
+
animation: false,
|
112 |
container: false,
|
113 |
},
|
114 |
}
|
redux-core/extendify-sdk/utility-framework/block-styles/cover-angled.css
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.is-style-angled {
|
2 |
+
/* no suggestion */
|
3 |
+
@apply ext-items-center ext-justify-end;
|
4 |
+
}
|
5 |
+
|
6 |
+
.is-style-angled .wp-block-cover__image-background,
|
7 |
+
.is-style-angled .wp-block-cover__video-background {
|
8 |
+
/* no suggestion */
|
9 |
+
clip-path: polygon(0 0, 30% 0%, 50% 100%, 0% 100%);
|
10 |
+
z-index: 1;
|
11 |
+
}
|
12 |
+
|
13 |
+
@screen tablet {
|
14 |
+
.is-style-angled .wp-block-cover__image-background,
|
15 |
+
.is-style-angled .wp-block-cover__video-background {
|
16 |
+
/* no suggestion */
|
17 |
+
clip-path: polygon(0 0, 55% 0%, 65% 100%, 0% 100%);
|
18 |
+
}
|
19 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/clip-path.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.clip-path--rhombus img {
|
2 |
+
clip-path: polygon(15% 6%, 80% 29%, 84% 93%, 23% 69%);
|
3 |
+
}
|
4 |
+
|
5 |
+
.clip-path--diamond img {
|
6 |
+
clip-path: polygon(5% 29%, 60% 2%, 91% 64%, 36% 89%);
|
7 |
+
}
|
8 |
+
|
9 |
+
.clip-path--rhombus-alt img {
|
10 |
+
clip-path: polygon(14% 9%, 85% 24%, 91% 89%, 19% 76%);
|
11 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/columns.css
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
The .ext utility is a top-level class that we use to target contents within our patterns.
|
3 |
+
We use it here to ensure columns blocks display well across themes.
|
4 |
+
*/
|
5 |
+
.wp-block-columns[class*="fullwidth-cols"] {
|
6 |
+
/* no suggestion */
|
7 |
+
margin-bottom: unset;
|
8 |
+
}
|
9 |
+
|
10 |
+
/* Some popular themes use padding instead of core's margin for columns; remove it */
|
11 |
+
.ext .wp-block-columns .wp-block-column[style*="padding"] {
|
12 |
+
/* no suggestion */
|
13 |
+
@apply ext-px-0 !important;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* Some popular themes add double spacing between columns; remove it */
|
17 |
+
.ext .wp-block-columns + .wp-block-columns:not([class*="mt-"]):not([class*="my-"]) {
|
18 |
+
/* no suggestion */
|
19 |
+
@apply ext-mt-0 !important;
|
20 |
+
}
|
21 |
+
|
22 |
+
[class*="fullwidth-cols"] .wp-block-column:first-child,
|
23 |
+
[class*="fullwidth-cols"] .wp-block-group:first-child {
|
24 |
+
/* no suggestion */
|
25 |
+
@apply ext-mt-0
|
26 |
+
}
|
27 |
+
|
28 |
+
[class*="fullwidth-cols"] .wp-block-column:last-child,
|
29 |
+
[class*="fullwidth-cols"] .wp-block-group:last-child {
|
30 |
+
/* no suggestion */
|
31 |
+
@apply ext-mb-0;
|
32 |
+
}
|
33 |
+
|
34 |
+
[class*="fullwidth-cols"] .wp-block-column:first-child * {
|
35 |
+
/* no suggestion */
|
36 |
+
@apply ext-mt-0
|
37 |
+
}
|
38 |
+
|
39 |
+
[class*="fullwidth-cols"] .wp-block-column *:first-child {
|
40 |
+
/* no suggestion */
|
41 |
+
@apply ext-mt-0
|
42 |
+
}
|
43 |
+
|
44 |
+
[class*="fullwidth-cols"] .wp-block-column *:last-child {
|
45 |
+
/* no suggestion */
|
46 |
+
@apply ext-mb-0
|
47 |
+
}
|
48 |
+
|
49 |
+
.ext .is-not-stacked-on-mobile .wp-block-column {
|
50 |
+
/* no suggestion */
|
51 |
+
@apply ext-mb-0
|
52 |
+
}
|
53 |
+
|
54 |
+
/* Add base margin bottom to all columns */
|
55 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:last-child) {
|
56 |
+
/* no suggestion */
|
57 |
+
@apply ext-mb-base;
|
58 |
+
}
|
59 |
+
|
60 |
+
@screen tablet {
|
61 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:last-child) {
|
62 |
+
/* no suggestion */
|
63 |
+
@apply ext-mb-0;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/* Remove margin bottom from "not-stacked" columns */
|
68 |
+
.wp-block-columns[class*="fullwidth-cols"].is-not-stacked-on-mobile > .wp-block-column {
|
69 |
+
/* no suggestion */
|
70 |
+
@apply ext-mb-0 !important;
|
71 |
+
}
|
72 |
+
|
73 |
+
@media (min-width: 600px) and (max-width: 781px) {
|
74 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(even) {
|
75 |
+
/* no suggestion */
|
76 |
+
margin-left: var(--wp--style--block-gap, 2em);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
/*
|
81 |
+
The `tablet:fullwidth-cols` and `desktop:fullwidth-cols` utilities are used
|
82 |
+
to counter the core/columns responsive for at our breakpoints.
|
83 |
+
*/
|
84 |
+
@media (max-width: 781px) {
|
85 |
+
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) {
|
86 |
+
@apply ext-flex-wrap;
|
87 |
+
}
|
88 |
+
|
89 |
+
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
90 |
+
@apply ext-ml-0 !important;
|
91 |
+
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
@media (max-width: 1079px) {
|
96 |
+
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) {
|
97 |
+
@apply ext-flex-wrap;
|
98 |
+
}
|
99 |
+
|
100 |
+
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
101 |
+
@apply ext-ml-0 !important;
|
102 |
+
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
103 |
+
}
|
104 |
+
|
105 |
+
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:last-child) {
|
106 |
+
@apply ext-mb-base !important;
|
107 |
+
}
|
108 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/direction.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.direction-rtl {
|
2 |
+
direction: rtl;
|
3 |
+
}
|
4 |
+
|
5 |
+
.direction-ltr {
|
6 |
+
direction: ltr;
|
7 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-caption.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.editor\:no-caption .block-editor-rich-text__editable {
|
2 |
+
display: none !important
|
3 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-inserter.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.editor\:no-inserter > .block-list-appender,
|
2 |
+
.editor\:no-inserter .wp-block-group__inner-container > .block-list-appender {
|
3 |
+
display: none
|
4 |
+
}
|
5 |
+
.editor\:no-inserter .wp-block-cover__inner-container > .block-list-appender {
|
6 |
+
display: none
|
7 |
+
}
|
8 |
+
.editor\:no-inserter .wp-block-column:not(.is-selected) > .block-list-appender {
|
9 |
+
display: none
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-resize.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.editor\:no-resize .components-resizable-box__handle::after,
|
2 |
+
.editor\:no-resize .components-resizable-box__side-handle::before,
|
3 |
+
.editor\:no-resize .components-resizable-box__handle{
|
4 |
+
display: none;
|
5 |
+
pointer-events: none
|
6 |
+
}
|
7 |
+
|
8 |
+
.editor\:no-resize .components-resizable-box__container {
|
9 |
+
display: block
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/pointer-events.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.editor\:pointer-events-none {
|
2 |
+
pointer-events:none
|
3 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/fallback.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ensure image block display is standardized */
|
2 |
+
.ext .wp-block-image {
|
3 |
+
/* no suggestion */
|
4 |
+
@apply ext-relative ext-text-center;
|
5 |
+
}
|
6 |
+
|
7 |
+
.ext .wp-block-image img {
|
8 |
+
/* no suggestion */
|
9 |
+
@apply ext-inline-block ext-align-middle;
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/inline-list.css
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/* Use "is-style-" prefix to support adding this style to the core/list block */
|
3 |
+
.is-style-inline-list {
|
4 |
+
@apply ext-pl-0 !important;
|
5 |
+
}
|
6 |
+
|
7 |
+
.is-style-inline-list li {
|
8 |
+
/* no suggestion */
|
9 |
+
@apply ext-list-none tablet:ext-inline tablet:ext-mr-base !important;
|
10 |
+
}
|
11 |
+
|
12 |
+
.is-style-inline-list li:first-child {
|
13 |
+
/* no suggestion */
|
14 |
+
@apply tablet:ext-ml-0 !important;
|
15 |
+
}
|
16 |
+
|
17 |
+
.is-style-inline-list li:last-child {
|
18 |
+
/* no suggestion */
|
19 |
+
@apply tablet:ext-mr-0 !important;
|
20 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/misc.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.bring-to-front {
|
2 |
+
position: relative;
|
3 |
+
z-index: 10;
|
4 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/text-stroke.css
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.text-stroke {
|
2 |
+
-webkit-text-stroke-width: var(--wp--custom--typography--text-stroke-width, 2px );
|
3 |
+
-webkit-text-stroke-color: var(--wp--preset--color--background);
|
4 |
+
}
|
5 |
+
|
6 |
+
.text-stroke--primary {
|
7 |
+
-webkit-text-stroke-width: var(--wp--custom--typography--text-stroke-width, 2px );
|
8 |
+
-webkit-text-stroke-color: var(--wp--preset--color--primary);
|
9 |
+
}
|
10 |
+
|
11 |
+
.text-stroke--secondary {
|
12 |
+
-webkit-text-stroke-width: var(--wp--custom--typography--text-stroke-width, 2px );
|
13 |
+
-webkit-text-stroke-color: var(--wp--preset--color--secondary);
|
14 |
+
}
|
redux-core/extendify-sdk/utility-framework/extendify-utilities.css
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import 'tailwindcss/base';
|
2 |
+
@import 'tailwindcss/components';
|
3 |
+
@import 'tailwindcss/utilities';
|
4 |
+
|
5 |
+
@import './classes/clip-path';
|
6 |
+
@import './classes/columns';
|
7 |
+
@import './classes/direction';
|
8 |
+
@import './classes/inline-list';
|
9 |
+
@import './classes/misc';
|
10 |
+
@import './classes/text-stroke';
|
11 |
+
|
12 |
+
@import './classes/editor/no-caption';
|
13 |
+
@import './classes/editor/no-inserter';
|
14 |
+
@import './classes/editor/no-resize';
|
15 |
+
@import './classes/editor/pointer-events';
|
16 |
+
|
17 |
+
@import './block-styles/cover-angled';
|
18 |
+
|
19 |
+
@import './fallback/align';
|
20 |
+
@import './fallback/colors';
|
21 |
+
@import './fallback/font-sizes';
|
22 |
+
@import './fallback/grid';
|
23 |
+
@import './fallback/group';
|
24 |
+
@import './fallback/image';
|
25 |
+
|
26 |
+
|
27 |
+
body {
|
28 |
+
/* no suggestion */
|
29 |
+
/* We need to abstract this out of tailwind.config because clamp doesnt translate with negative margins */
|
30 |
+
--extendify--spacing--large: var(--wp--custom--spacing--large, clamp(2em, 8vw, 8em));
|
31 |
+
}
|
32 |
+
|
33 |
+
/* Astra */
|
34 |
+
.ast-separate-container .ext .block-editor-block-list__layout {
|
35 |
+
/* no suggestion */
|
36 |
+
@apply ext-p-0 !important;
|
37 |
+
}
|
38 |
+
|
39 |
+
/* Twenty Twenty One */
|
40 |
+
.ext [data-block].wp-block-buttons .wp-block-button {
|
41 |
+
@apply ext-my-0;
|
42 |
+
}
|
43 |
+
|
44 |
+
.ext [data-block].wp-block-buttons .wp-block-button:first-child {
|
45 |
+
/* no suggestion */
|
46 |
+
@apply ext-mt-0 ext-mb-base !important;
|
47 |
+
}
|
48 |
+
|
49 |
+
/* Twenty Twenty adds a lot of margin automatically to blocks. We only want our own margin added to our patterns. */
|
50 |
+
.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull {
|
51 |
+
/* no suggestion */
|
52 |
+
margin-top: unset;
|
53 |
+
margin-bottom: unset;
|
54 |
+
}
|
55 |
+
|
56 |
+
/* Ensure no funky business is assigned to alignwide */
|
57 |
+
.ext .alignwide {
|
58 |
+
/* no suggestion */
|
59 |
+
@apply ext-mx-auto !important;
|
60 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/align.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Remove odd spacing some themes may apply to inner blocks */
|
2 |
+
.ext .wp-block[data-align="wide"] {
|
3 |
+
/* no suggestion */
|
4 |
+
@apply ext-my-0 !important;
|
5 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/colors.css
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.has-foreground-color {
|
2 |
+
/* no suggestion */
|
3 |
+
color: var(--wp--preset--color--foreground, #000) !important;
|
4 |
+
}
|
5 |
+
|
6 |
+
.has-foreground-background-color {
|
7 |
+
/* no suggestion */
|
8 |
+
background-color: var(--wp--preset--color--foreground, #000) !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
.has-background-color {
|
12 |
+
/* no suggestion */
|
13 |
+
color: var(--wp--preset--color--background, #fff) !important;
|
14 |
+
}
|
15 |
+
|
16 |
+
.has-background-background-color {
|
17 |
+
/* no suggestion */
|
18 |
+
background-color: var(--wp--preset--color--background, #fff) !important;
|
19 |
+
}
|
20 |
+
|
21 |
+
.has-primary-color {
|
22 |
+
/* no suggestion */
|
23 |
+
color: var(--wp--preset--color--primary, #4B5563) !important;
|
24 |
+
}
|
25 |
+
|
26 |
+
.has-primary-background-color {
|
27 |
+
/* no suggestion */
|
28 |
+
background-color: var(--wp--preset--color--primary, #4B5563) !important;
|
29 |
+
}
|
30 |
+
|
31 |
+
.has-secondary-color {
|
32 |
+
/* no suggestion */
|
33 |
+
color: var(--wp--preset--color--secondary, #9CA3AF) !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
.has-secondary-background-color {
|
37 |
+
/* no suggestion */
|
38 |
+
background-color: var(--wp--preset--color--secondary, #9CA3AF) !important;
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Ensure themes that target specific elements use the right colors */
|
42 |
+
.ext.has-text-color p,
|
43 |
+
.ext.has-text-color h1,
|
44 |
+
.ext.has-text-color h2,
|
45 |
+
.ext.has-text-color h3,
|
46 |
+
.ext.has-text-color h4,
|
47 |
+
.ext.has-text-color h5,
|
48 |
+
.ext.has-text-color h6 {
|
49 |
+
/* no suggestion */
|
50 |
+
color: currentColor;
|
51 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/font-sizes.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.has-gigantic-font-size,
|
2 |
+
.editor-styles-wrapper .has-gigantic-font-size.wp-block {
|
3 |
+
/* no suggestion */
|
4 |
+
/* Have to be specific for how Neve targets headings */
|
5 |
+
--fallback-size: clamp(var(--wp--preset--font-size--huge, 22px), calc(1rem + var(--wp--custom--typography--gigantic--preferred, 5vw)), var(--wp--preset--font-size--huge, 42px) * 2 );
|
6 |
+
font-size: var( --wp--preset--font-size--gigantic, var(--fallback-size ) );
|
7 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/grid.css
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Classic themes use an inner [class*="_inner-container"] that our utilities cannot directly target, so we need to do so with a few */
|
2 |
+
.ext .ext-grid > [class*="_inner-container"] {
|
3 |
+
/* no suggestion */
|
4 |
+
display: grid;
|
5 |
+
}
|
6 |
+
|
7 |
+
/* Unhinge grid for container blocks in classic themes, and < 5.9 */
|
8 |
+
.ext > [class*="_inner-container"] > .ext-grid:not([class*="columns"]),
|
9 |
+
.ext > [class*="_inner-container"] > .wp-block > .ext-grid:not([class*="columns"]) {
|
10 |
+
/* no suggestion */
|
11 |
+
display: initial !important;
|
12 |
+
}
|
13 |
+
|
14 |
+
/* Grid Columns */
|
15 |
+
.ext .ext-grid-cols-1 > [class*="_inner-container"] {
|
16 |
+
/* no suggestion */
|
17 |
+
grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
|
18 |
+
}
|
19 |
+
|
20 |
+
.ext .ext-grid-cols-2 > [class*="_inner-container"] {
|
21 |
+
/* no suggestion */
|
22 |
+
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
23 |
+
}
|
24 |
+
|
25 |
+
.ext .ext-grid-cols-3 > [class*="_inner-container"] {
|
26 |
+
/* no suggestion */
|
27 |
+
grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
|
28 |
+
}
|
29 |
+
|
30 |
+
.ext .ext-grid-cols-4 > [class*="_inner-container"] {
|
31 |
+
/* no suggestion */
|
32 |
+
grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
|
33 |
+
}
|
34 |
+
|
35 |
+
.ext .ext-grid-cols-5 > [class*="_inner-container"] {
|
36 |
+
/* no suggestion */
|
37 |
+
grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
|
38 |
+
}
|
39 |
+
|
40 |
+
.ext .ext-grid-cols-6 > [class*="_inner-container"] {
|
41 |
+
/* no suggestion */
|
42 |
+
grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
|
43 |
+
}
|
44 |
+
|
45 |
+
.ext .ext-grid-cols-7 > [class*="_inner-container"] {
|
46 |
+
/* no suggestion */
|
47 |
+
grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
|
48 |
+
}
|
49 |
+
|
50 |
+
.ext .ext-grid-cols-8 > [class*="_inner-container"] {
|
51 |
+
/* no suggestion */
|
52 |
+
grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
|
53 |
+
}
|
54 |
+
|
55 |
+
.ext .ext-grid-cols-9 > [class*="_inner-container"] {
|
56 |
+
/* no suggestion */
|
57 |
+
grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
|
58 |
+
}
|
59 |
+
|
60 |
+
.ext .ext-grid-cols-10 > [class*="_inner-container"] {
|
61 |
+
/* no suggestion */
|
62 |
+
grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
.ext .ext-grid-cols-11 > [class*="_inner-container"] {
|
66 |
+
/* no suggestion */
|
67 |
+
grid-template-columns: repeat(11, minmax(0, 1fr)) !important;
|
68 |
+
}
|
69 |
+
|
70 |
+
.ext .ext-grid-cols-12 > [class*="_inner-container"] {
|
71 |
+
/* no suggestion */
|
72 |
+
grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
|
73 |
+
}
|
74 |
+
|
75 |
+
.ext .ext-grid-cols-13 > [class*="_inner-container"] {
|
76 |
+
/* no suggestion */
|
77 |
+
grid-template-columns: repeat(13, minmax(0, 1fr)) !important;
|
78 |
+
}
|
79 |
+
|
80 |
+
.ext .ext-grid-cols-none > [class*="_inner-container"] {
|
81 |
+
/* no suggestion */
|
82 |
+
grid-template-columns: none !important;
|
83 |
+
}
|
84 |
+
|
85 |
+
/* Grid Rows */
|
86 |
+
.ext .ext-grid-rows-1 > [class*="_inner-container"] {
|
87 |
+
/* no suggestion */
|
88 |
+
grid-template-rows: repeat(1, minmax(0, 1fr)) !important;
|
89 |
+
}
|
90 |
+
|
91 |
+
.ext .ext-grid-rows-2 > [class*="_inner-container"] {
|
92 |
+
/* no suggestion */
|
93 |
+
grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
|
94 |
+
}
|
95 |
+
|
96 |
+
.ext .ext-grid-rows-3 > [class*="_inner-container"] {
|
97 |
+
/* no suggestion */
|
98 |
+
grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
|
99 |
+
}
|
100 |
+
|
101 |
+
.ext .ext-grid-rows-4 > [class*="_inner-container"] {
|
102 |
+
/* no suggestion */
|
103 |
+
grid-template-rows: repeat(4, minmax(0, 1fr)) !important;
|
104 |
+
}
|
105 |
+
|
106 |
+
.ext .ext-grid-rows-5 > [class*="_inner-container"] {
|
107 |
+
/* no suggestion */
|
108 |
+
grid-template-rows: repeat(5, minmax(0, 1fr)) !important;
|
109 |
+
}
|
110 |
+
|
111 |
+
.ext .ext-grid-rows-6 > [class*="_inner-container"] {
|
112 |
+
/* no suggestion */
|
113 |
+
grid-template-rows: repeat(6, minmax(0, 1fr)) !important;
|
114 |
+
}
|
115 |
+
|
116 |
+
.ext .ext-grid-rows-none > [class*="_inner-container"] {
|
117 |
+
/* no suggestion */
|
118 |
+
grid-template-rows: none !important;
|
119 |
+
}
|
120 |
+
|
121 |
+
/* Align */
|
122 |
+
.ext .ext-items-start > [class*="_inner-container"] {
|
123 |
+
align-items: flex-start !important;
|
124 |
+
}
|
125 |
+
|
126 |
+
.ext .ext-items-end > [class*="_inner-container"] {
|
127 |
+
align-items: flex-end !important;
|
128 |
+
}
|
129 |
+
|
130 |
+
.ext .ext-items-center > [class*="_inner-container"] {
|
131 |
+
align-items: center !important;
|
132 |
+
}
|
133 |
+
|
134 |
+
.ext .ext-items-baseline > [class*="_inner-container"] {
|
135 |
+
align-items: baseline !important;
|
136 |
+
}
|
137 |
+
|
138 |
+
.ext .ext-items-stretch > [class*="_inner-container"] {
|
139 |
+
align-items: stretch !important;
|
140 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/group.css
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ext.wp-block-group > *:last-child {
|
2 |
+
/* no suggestion */
|
3 |
+
@apply ext-mb-0;
|
4 |
+
}
|
5 |
+
|
6 |
+
/* For <5.9 */
|
7 |
+
.ext .wp-block-group__inner-container {
|
8 |
+
/* no suggestion */
|
9 |
+
@apply ext-p-0 !important;
|
10 |
+
}
|
11 |
+
|
12 |
+
.ext.has-background {
|
13 |
+
/* no suggestion */
|
14 |
+
@apply ext-px-base;
|
15 |
+
}
|
16 |
+
|
17 |
+
/* Fallback for classic theme group blocks */
|
18 |
+
.ext *[class*=inner-container] > .alignwide *[class*=inner-container] {
|
19 |
+
/* no suggestion */
|
20 |
+
max-width: var(--responsive--alignwide-width, 120rem);
|
21 |
+
}
|
22 |
+
|
23 |
+
.ext *[class*=inner-container] > .alignwide *[class*=inner-container] > * {
|
24 |
+
/* no suggestion */
|
25 |
+
@apply ext-max-w-full !important;
|
26 |
+
}
|
27 |
+
|
28 |
+
.ext *[class*=inner-container] > .alignfull *[class*=inner-container] {
|
29 |
+
/* no suggestion */
|
30 |
+
@apply ext-max-w-full;
|
31 |
+
}
|
32 |
+
|
33 |
+
.ext *[class*=inner-container] > .alignfull *[class*=inner-container] > * {
|
34 |
+
/* no suggestion */
|
35 |
+
@apply ext-max-w-full !important;
|
36 |
+
}
|
redux-core/extendify-sdk/utility-framework/fallback/image.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ensure image block display is standardized */
|
2 |
+
.ext .wp-block-image {
|
3 |
+
/* no suggestion */
|
4 |
+
@apply ext-relative ext-text-center;
|
5 |
+
}
|
6 |
+
|
7 |
+
.ext .wp-block-image img {
|
8 |
+
/* no suggestion */
|
9 |
+
@apply ext-inline-block ext-align-middle;
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/suggestions.config.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const breakpoints = ['tablet', 'desktop']
|
2 |
+
const utilities = [
|
3 |
+
// Be careful with a prefix as it may affect breakpoints (so avoid `$`)
|
4 |
+
'-?p[a-z]?-.+',
|
5 |
+
'-?m[a-z]?-.+',
|
6 |
+
'absolute|relative',
|
7 |
+
'(block|inline-block|inline|hidden)$',
|
8 |
+
'(flex|inline-flex|items-.+|justify-.+|flex-.+)',
|
9 |
+
'(grid|inline-grid|grid-cols-.+|col-.+|row-.+|grid-rows-.+|gap-.+)',
|
10 |
+
'order-(1|2)$',
|
11 |
+
'rounded(-.{1,2})?-(full|none)',
|
12 |
+
'text-(left|center|right)',
|
13 |
+
'-?(top-|right-|bottom-|left-)(base|lg)',
|
14 |
+
'leading-[a-z]+',
|
15 |
+
'(max-)?w-(full|auto)',
|
16 |
+
'list-none',
|
17 |
+
'border(-.{1})?-0',
|
18 |
+
]
|
19 |
+
const withPrefix = (classes) => classes.map(c => `ext-${c}`)
|
20 |
+
const withBreakpoints = (classes) => classes.map(c => `(${[...breakpoints, ''].join(':|')})${c}`)
|
21 |
+
|
22 |
+
module.exports = {
|
23 |
+
suggestions: withBreakpoints(withPrefix(utilities)),
|
24 |
+
}
|
redux-core/extendify-sdk/utility-framework/suggestions.json
ADDED
@@ -0,0 +1,569 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"notes": "This file is generated in webpack.mix.js. Do not edit directly.",
|
3 |
+
"suggestions": [
|
4 |
+
"ext-absolute",
|
5 |
+
"ext-relative",
|
6 |
+
"ext-top-base",
|
7 |
+
"ext-top-lg",
|
8 |
+
"ext--top-base",
|
9 |
+
"ext--top-lg",
|
10 |
+
"ext-right-base",
|
11 |
+
"ext-right-lg",
|
12 |
+
"ext--right-base",
|
13 |
+
"ext--right-lg",
|
14 |
+
"ext-bottom-base",
|
15 |
+
"ext-bottom-lg",
|
16 |
+
"ext--bottom-base",
|
17 |
+
"ext--bottom-lg",
|
18 |
+
"ext-left-base",
|
19 |
+
"ext-left-lg",
|
20 |
+
"ext--left-base",
|
21 |
+
"ext--left-lg",
|
22 |
+
"ext-order-1",
|
23 |
+
"ext-order-2",
|
24 |
+
"ext-col-auto",
|
25 |
+
"ext-col-span-1",
|
26 |
+
"ext-col-span-2",
|
27 |
+
"ext-col-span-3",
|
28 |
+
"ext-col-span-4",
|
29 |
+
"ext-col-span-5",
|
30 |
+
"ext-col-span-6",
|
31 |
+
"ext-col-span-7",
|
32 |
+
"ext-col-span-8",
|
33 |
+
"ext-col-span-9",
|
34 |
+
"ext-col-span-10",
|
35 |
+
"ext-col-span-11",
|
36 |
+
"ext-col-span-12",
|
37 |
+
"ext-col-span-full",
|
38 |
+
"ext-col-start-1",
|
39 |
+
"ext-col-start-2",
|
40 |
+
"ext-col-start-3",
|
41 |
+
"ext-col-start-4",
|
42 |
+
"ext-col-start-5",
|
43 |
+
"ext-col-start-6",
|
44 |
+
"ext-col-start-7",
|
45 |
+
"ext-col-start-8",
|
46 |
+
"ext-col-start-9",
|
47 |
+
"ext-col-start-10",
|
48 |
+
"ext-col-start-11",
|
49 |
+
"ext-col-start-12",
|
50 |
+
"ext-col-start-13",
|
51 |
+
"ext-col-start-auto",
|
52 |
+
"ext-col-end-1",
|
53 |
+
"ext-col-end-2",
|
54 |
+
"ext-col-end-3",
|
55 |
+
"ext-col-end-4",
|
56 |
+
"ext-col-end-5",
|
57 |
+
"ext-col-end-6",
|
58 |
+
"ext-col-end-7",
|
59 |
+
"ext-col-end-8",
|
60 |
+
"ext-col-end-9",
|
61 |
+
"ext-col-end-10",
|
62 |
+
"ext-col-end-11",
|
63 |
+
"ext-col-end-12",
|
64 |
+
"ext-col-end-13",
|
65 |
+
"ext-col-end-auto",
|
66 |
+
"ext-row-auto",
|
67 |
+
"ext-row-span-1",
|
68 |
+
"ext-row-span-2",
|
69 |
+
"ext-row-span-3",
|
70 |
+
"ext-row-span-4",
|
71 |
+
"ext-row-span-5",
|
72 |
+
"ext-row-span-6",
|
73 |
+
"ext-row-span-full",
|
74 |
+
"ext-row-start-1",
|
75 |
+
"ext-row-start-2",
|
76 |
+
"ext-row-start-3",
|
77 |
+
"ext-row-start-4",
|
78 |
+
"ext-row-start-5",
|
79 |
+
"ext-row-start-6",
|
80 |
+
"ext-row-start-7",
|
81 |
+
"ext-row-start-auto",
|
82 |
+
"ext-row-end-1",
|
83 |
+
"ext-row-end-2",
|
84 |
+
"ext-row-end-3",
|
85 |
+
"ext-row-end-4",
|
86 |
+
"ext-row-end-5",
|
87 |
+
"ext-row-end-6",
|
88 |
+
"ext-row-end-7",
|
89 |
+
"ext-row-end-auto",
|
90 |
+
"ext-m-0",
|
91 |
+
"ext-m-auto",
|
92 |
+
"ext-m-base",
|
93 |
+
"ext-m-lg",
|
94 |
+
"ext--m-base",
|
95 |
+
"ext--m-lg",
|
96 |
+
"ext-mx-0",
|
97 |
+
"ext-mx-auto",
|
98 |
+
"ext-mx-base",
|
99 |
+
"ext-mx-lg",
|
100 |
+
"ext--mx-base",
|
101 |
+
"ext--mx-lg",
|
102 |
+
"ext-my-0",
|
103 |
+
"ext-my-auto",
|
104 |
+
"ext-my-base",
|
105 |
+
"ext-my-lg",
|
106 |
+
"ext--my-base",
|
107 |
+
"ext--my-lg",
|
108 |
+
"ext-mt-0",
|
109 |
+
"ext-mt-auto",
|
110 |
+
"ext-mt-base",
|
111 |
+
"ext-mt-lg",
|
112 |
+
"ext--mt-base",
|
113 |
+
"ext--mt-lg",
|
114 |
+
"ext-mr-0",
|
115 |
+
"ext-mr-auto",
|
116 |
+
"ext-mr-base",
|
117 |
+
"ext-mr-lg",
|
118 |
+
"ext--mr-base",
|
119 |
+
"ext--mr-lg",
|
120 |
+
"ext-mb-0",
|
121 |
+
"ext-mb-auto",
|
122 |
+
"ext-mb-base",
|
123 |
+
"ext-mb-lg",
|
124 |
+
"ext--mb-base",
|
125 |
+
"ext--mb-lg",
|
126 |
+
"ext-ml-0",
|
127 |
+
"ext-ml-auto",
|
128 |
+
"ext-ml-base",
|
129 |
+
"ext-ml-lg",
|
130 |
+
"ext--ml-base",
|
131 |
+
"ext--ml-lg",
|
132 |
+
"ext-block",
|
133 |
+
"ext-inline-block",
|
134 |
+
"ext-inline",
|
135 |
+
"ext-flex",
|
136 |
+
"ext-inline-flex",
|
137 |
+
"ext-grid",
|
138 |
+
"ext-inline-grid",
|
139 |
+
"ext-hidden",
|
140 |
+
"ext-w-auto",
|
141 |
+
"ext-w-full",
|
142 |
+
"ext-max-w-full",
|
143 |
+
"ext-flex-1",
|
144 |
+
"ext-flex-auto",
|
145 |
+
"ext-flex-initial",
|
146 |
+
"ext-flex-none",
|
147 |
+
"ext-flex-shrink-0",
|
148 |
+
"ext-flex-shrink",
|
149 |
+
"ext-flex-grow-0",
|
150 |
+
"ext-flex-grow",
|
151 |
+
"ext-list-none",
|
152 |
+
"ext-grid-cols-1",
|
153 |
+
"ext-grid-cols-2",
|
154 |
+
"ext-grid-cols-3",
|
155 |
+
"ext-grid-cols-4",
|
156 |
+
"ext-grid-cols-5",
|
157 |
+
"ext-grid-cols-6",
|
158 |
+
"ext-grid-cols-7",
|
159 |
+
"ext-grid-cols-8",
|
160 |
+
"ext-grid-cols-9",
|
161 |
+
"ext-grid-cols-10",
|
162 |
+
"ext-grid-cols-11",
|
163 |
+
"ext-grid-cols-12",
|
164 |
+
"ext-grid-cols-none",
|
165 |
+
"ext-grid-rows-1",
|
166 |
+
"ext-grid-rows-2",
|
167 |
+
"ext-grid-rows-3",
|
168 |
+
"ext-grid-rows-4",
|
169 |
+
"ext-grid-rows-5",
|
170 |
+
"ext-grid-rows-6",
|
171 |
+
"ext-grid-rows-none",
|
172 |
+
"ext-flex-row",
|
173 |
+
"ext-flex-row-reverse",
|
174 |
+
"ext-flex-col",
|
175 |
+
"ext-flex-col-reverse",
|
176 |
+
"ext-flex-wrap",
|
177 |
+
"ext-flex-wrap-reverse",
|
178 |
+
"ext-flex-nowrap",
|
179 |
+
"ext-items-start",
|
180 |
+
"ext-items-end",
|
181 |
+
"ext-items-center",
|
182 |
+
"ext-items-baseline",
|
183 |
+
"ext-items-stretch",
|
184 |
+
"ext-justify-start",
|
185 |
+
"ext-justify-end",
|
186 |
+
"ext-justify-center",
|
187 |
+
"ext-justify-between",
|
188 |
+
"ext-justify-around",
|
189 |
+
"ext-justify-evenly",
|
190 |
+
"ext-justify-items-start",
|
191 |
+
"ext-justify-items-end",
|
192 |
+
"ext-justify-items-center",
|
193 |
+
"ext-justify-items-stretch",
|
194 |
+
"ext-gap-0",
|
195 |
+
"ext-gap-base",
|
196 |
+
"ext-gap-lg",
|
197 |
+
"ext-gap-x-0",
|
198 |
+
"ext-gap-x-base",
|
199 |
+
"ext-gap-x-lg",
|
200 |
+
"ext-gap-y-0",
|
201 |
+
"ext-gap-y-base",
|
202 |
+
"ext-gap-y-lg",
|
203 |
+
"ext-justify-self-auto",
|
204 |
+
"ext-justify-self-start",
|
205 |
+
"ext-justify-self-end",
|
206 |
+
"ext-justify-self-center",
|
207 |
+
"ext-justify-self-stretch",
|
208 |
+
"ext-rounded-none",
|
209 |
+
"ext-rounded-full",
|
210 |
+
"ext-rounded-t-none",
|
211 |
+
"ext-rounded-t-full",
|
212 |
+
"ext-rounded-r-none",
|
213 |
+
"ext-rounded-r-full",
|
214 |
+
"ext-rounded-b-none",
|
215 |
+
"ext-rounded-b-full",
|
216 |
+
"ext-rounded-l-none",
|
217 |
+
"ext-rounded-l-full",
|
218 |
+
"ext-rounded-tl-none",
|
219 |
+
"ext-rounded-tl-full",
|
220 |
+
"ext-rounded-tr-none",
|
221 |
+
"ext-rounded-tr-full",
|
222 |
+
"ext-rounded-br-none",
|
223 |
+
"ext-rounded-br-full",
|
224 |
+
"ext-rounded-bl-none",
|
225 |
+
"ext-rounded-bl-full",
|
226 |
+
"ext-border-0",
|
227 |
+
"ext-border-t-0",
|
228 |
+
"ext-border-r-0",
|
229 |
+
"ext-border-b-0",
|
230 |
+
"ext-border-l-0",
|
231 |
+
"ext-p-0",
|
232 |
+
"ext-p-base",
|
233 |
+
"ext-p-lg",
|
234 |
+
"ext-px-0",
|
235 |
+
"ext-px-base",
|
236 |
+
"ext-px-lg",
|
237 |
+
"ext-py-0",
|
238 |
+
"ext-py-base",
|
239 |
+
"ext-py-lg",
|
240 |
+
"ext-pt-0",
|
241 |
+
"ext-pt-base",
|
242 |
+
"ext-pt-lg",
|
243 |
+
"ext-pr-0",
|
244 |
+
"ext-pr-base",
|
245 |
+
"ext-pr-lg",
|
246 |
+
"ext-pb-0",
|
247 |
+
"ext-pb-base",
|
248 |
+
"ext-pb-lg",
|
249 |
+
"ext-pl-0",
|
250 |
+
"ext-pl-base",
|
251 |
+
"ext-pl-lg",
|
252 |
+
"ext-text-left",
|
253 |
+
"ext-text-center",
|
254 |
+
"ext-text-right",
|
255 |
+
"ext-leading-none",
|
256 |
+
"ext-leading-tight",
|
257 |
+
"ext-leading-snug",
|
258 |
+
"ext-leading-normal",
|
259 |
+
"ext-leading-relaxed",
|
260 |
+
"ext-leading-loose",
|
261 |
+
"clip-path--rhombus",
|
262 |
+
"clip-path--diamond",
|
263 |
+
"clip-path--rhombus-alt",
|
264 |
+
"tablet\\:fullwidth-cols",
|
265 |
+
"desktop\\:fullwidth-cols",
|
266 |
+
"direction-rtl",
|
267 |
+
"direction-ltr",
|
268 |
+
"bring-to-front",
|
269 |
+
"text-stroke",
|
270 |
+
"text-stroke--primary",
|
271 |
+
"text-stroke--secondary",
|
272 |
+
"editor\\:no-caption",
|
273 |
+
"editor\\:no-inserter",
|
274 |
+
"editor\\:no-resize",
|
275 |
+
"editor\\:pointer-events-none",
|
276 |
+
"tablet\\:ext-absolute",
|
277 |
+
"tablet\\:ext-relative",
|
278 |
+
"tablet\\:ext-top-base",
|
279 |
+
"tablet\\:ext-top-lg",
|
280 |
+
"tablet\\:ext--top-base",
|
281 |
+
"tablet\\:ext--top-lg",
|
282 |
+
"tablet\\:ext-right-base",
|
283 |
+
"tablet\\:ext-right-lg",
|
284 |
+
"tablet\\:ext--right-base",
|
285 |
+
"tablet\\:ext--right-lg",
|
286 |
+
"tablet\\:ext-bottom-base",
|
287 |
+
"tablet\\:ext-bottom-lg",
|
288 |
+
"tablet\\:ext--bottom-base",
|
289 |
+
"tablet\\:ext--bottom-lg",
|
290 |
+
"tablet\\:ext-left-base",
|
291 |
+
"tablet\\:ext-left-lg",
|
292 |
+
"tablet\\:ext--left-base",
|
293 |
+
"tablet\\:ext--left-lg",
|
294 |
+
"tablet\\:ext-order-1",
|
295 |
+
"tablet\\:ext-order-2",
|
296 |
+
"tablet\\:ext-m-0",
|
297 |
+
"tablet\\:ext-m-auto",
|
298 |
+
"tablet\\:ext-m-base",
|
299 |
+
"tablet\\:ext-m-lg",
|
300 |
+
"tablet\\:ext--m-base",
|
301 |
+
"tablet\\:ext--m-lg",
|
302 |
+
"tablet\\:ext-mx-0",
|
303 |
+
"tablet\\:ext-mx-auto",
|
304 |
+
"tablet\\:ext-mx-base",
|
305 |
+
"tablet\\:ext-mx-lg",
|
306 |
+
"tablet\\:ext--mx-base",
|
307 |
+
"tablet\\:ext--mx-lg",
|
308 |
+
"tablet\\:ext-my-0",
|
309 |
+
"tablet\\:ext-my-auto",
|
310 |
+
"tablet\\:ext-my-base",
|
311 |
+
"tablet\\:ext-my-lg",
|
312 |
+
"tablet\\:ext--my-base",
|
313 |
+
"tablet\\:ext--my-lg",
|
314 |
+
"tablet\\:ext-mt-0",
|
315 |
+
"tablet\\:ext-mt-auto",
|
316 |
+
"tablet\\:ext-mt-base",
|
317 |
+
"tablet\\:ext-mt-lg",
|
318 |
+
"tablet\\:ext--mt-base",
|
319 |
+
"tablet\\:ext--mt-lg",
|
320 |
+
"tablet\\:ext-mr-0",
|
321 |
+
"tablet\\:ext-mr-auto",
|
322 |
+
"tablet\\:ext-mr-base",
|
323 |
+
"tablet\\:ext-mr-lg",
|
324 |
+
"tablet\\:ext--mr-base",
|
325 |
+
"tablet\\:ext--mr-lg",
|
326 |
+
"tablet\\:ext-mb-0",
|
327 |
+
"tablet\\:ext-mb-auto",
|
328 |
+
"tablet\\:ext-mb-base",
|
329 |
+
"tablet\\:ext-mb-lg",
|
330 |
+
"tablet\\:ext--mb-base",
|
331 |
+
"tablet\\:ext--mb-lg",
|
332 |
+
"tablet\\:ext-ml-0",
|
333 |
+
"tablet\\:ext-ml-auto",
|
334 |
+
"tablet\\:ext-ml-base",
|
335 |
+
"tablet\\:ext-ml-lg",
|
336 |
+
"tablet\\:ext--ml-base",
|
337 |
+
"tablet\\:ext--ml-lg",
|
338 |
+
"tablet\\:ext-block",
|
339 |
+
"tablet\\:ext-inline-block",
|
340 |
+
"tablet\\:ext-inline",
|
341 |
+
"tablet\\:ext-flex",
|
342 |
+
"tablet\\:ext-inline-flex",
|
343 |
+
"tablet\\:ext-grid",
|
344 |
+
"tablet\\:ext-inline-grid",
|
345 |
+
"tablet\\:ext-hidden",
|
346 |
+
"tablet\\:ext-w-auto",
|
347 |
+
"tablet\\:ext-w-full",
|
348 |
+
"tablet\\:ext-max-w-full",
|
349 |
+
"tablet\\:ext-flex-1",
|
350 |
+
"tablet\\:ext-flex-auto",
|
351 |
+
"tablet\\:ext-flex-initial",
|
352 |
+
"tablet\\:ext-flex-none",
|
353 |
+
"tablet\\:ext-flex-shrink-0",
|
354 |
+
"tablet\\:ext-flex-shrink",
|
355 |
+
"tablet\\:ext-flex-grow-0",
|
356 |
+
"tablet\\:ext-flex-grow",
|
357 |
+
"tablet\\:ext-list-none",
|
358 |
+
"tablet\\:ext-grid-cols-1",
|
359 |
+
"tablet\\:ext-grid-cols-2",
|
360 |
+
"tablet\\:ext-grid-cols-3",
|
361 |
+
"tablet\\:ext-grid-cols-4",
|
362 |
+
"tablet\\:ext-grid-cols-5",
|
363 |
+
"tablet\\:ext-grid-cols-6",
|
364 |
+
"tablet\\:ext-grid-cols-7",
|
365 |
+
"tablet\\:ext-grid-cols-8",
|
366 |
+
"tablet\\:ext-grid-cols-9",
|
367 |
+
"tablet\\:ext-grid-cols-10",
|
368 |
+
"tablet\\:ext-grid-cols-11",
|
369 |
+
"tablet\\:ext-grid-cols-12",
|
370 |
+
"tablet\\:ext-grid-cols-none",
|
371 |
+
"tablet\\:ext-flex-row",
|
372 |
+
"tablet\\:ext-flex-row-reverse",
|
373 |
+
"tablet\\:ext-flex-col",
|
374 |
+
"tablet\\:ext-flex-col-reverse",
|
375 |
+
"tablet\\:ext-flex-wrap",
|
376 |
+
"tablet\\:ext-flex-wrap-reverse",
|
377 |
+
"tablet\\:ext-flex-nowrap",
|
378 |
+
"tablet\\:ext-items-start",
|
379 |
+
"tablet\\:ext-items-end",
|
380 |
+
"tablet\\:ext-items-center",
|
381 |
+
"tablet\\:ext-items-baseline",
|
382 |
+
"tablet\\:ext-items-stretch",
|
383 |
+
"tablet\\:ext-justify-start",
|
384 |
+
"tablet\\:ext-justify-end",
|
385 |
+
"tablet\\:ext-justify-center",
|
386 |
+
"tablet\\:ext-justify-between",
|
387 |
+
"tablet\\:ext-justify-around",
|
388 |
+
"tablet\\:ext-justify-evenly",
|
389 |
+
"tablet\\:ext-justify-items-start",
|
390 |
+
"tablet\\:ext-justify-items-end",
|
391 |
+
"tablet\\:ext-justify-items-center",
|
392 |
+
"tablet\\:ext-justify-items-stretch",
|
393 |
+
"tablet\\:ext-justify-self-auto",
|
394 |
+
"tablet\\:ext-justify-self-start",
|
395 |
+
"tablet\\:ext-justify-self-end",
|
396 |
+
"tablet\\:ext-justify-self-center",
|
397 |
+
"tablet\\:ext-justify-self-stretch",
|
398 |
+
"tablet\\:ext-p-0",
|
399 |
+
"tablet\\:ext-p-base",
|
400 |
+
"tablet\\:ext-p-lg",
|
401 |
+
"tablet\\:ext-px-0",
|
402 |
+
"tablet\\:ext-px-base",
|
403 |
+
"tablet\\:ext-px-lg",
|
404 |
+
"tablet\\:ext-py-0",
|
405 |
+
"tablet\\:ext-py-base",
|
406 |
+
"tablet\\:ext-py-lg",
|
407 |
+
"tablet\\:ext-pt-0",
|
408 |
+
"tablet\\:ext-pt-base",
|
409 |
+
"tablet\\:ext-pt-lg",
|
410 |
+
"tablet\\:ext-pr-0",
|
411 |
+
"tablet\\:ext-pr-base",
|
412 |
+
"tablet\\:ext-pr-lg",
|
413 |
+
"tablet\\:ext-pb-0",
|
414 |
+
"tablet\\:ext-pb-base",
|
415 |
+
"tablet\\:ext-pb-lg",
|
416 |
+
"tablet\\:ext-pl-0",
|
417 |
+
"tablet\\:ext-pl-base",
|
418 |
+
"tablet\\:ext-pl-lg",
|
419 |
+
"tablet\\:ext-text-left",
|
420 |
+
"tablet\\:ext-text-center",
|
421 |
+
"tablet\\:ext-text-right",
|
422 |
+
"desktop\\:ext-absolute",
|
423 |
+
"desktop\\:ext-relative",
|
424 |
+
"desktop\\:ext-top-base",
|
425 |
+
"desktop\\:ext-top-lg",
|
426 |
+
"desktop\\:ext--top-base",
|
427 |
+
"desktop\\:ext--top-lg",
|
428 |
+
"desktop\\:ext-right-base",
|
429 |
+
"desktop\\:ext-right-lg",
|
430 |
+
"desktop\\:ext--right-base",
|
431 |
+
"desktop\\:ext--right-lg",
|
432 |
+
"desktop\\:ext-bottom-base",
|
433 |
+
"desktop\\:ext-bottom-lg",
|
434 |
+
"desktop\\:ext--bottom-base",
|
435 |
+
"desktop\\:ext--bottom-lg",
|
436 |
+
"desktop\\:ext-left-base",
|
437 |
+
"desktop\\:ext-left-lg",
|
438 |
+
"desktop\\:ext--left-base",
|
439 |
+
"desktop\\:ext--left-lg",
|
440 |
+
"desktop\\:ext-order-1",
|
441 |
+
"desktop\\:ext-order-2",
|
442 |
+
"desktop\\:ext-m-0",
|
443 |
+
"desktop\\:ext-m-auto",
|
444 |
+
"desktop\\:ext-m-base",
|
445 |
+
"desktop\\:ext-m-lg",
|
446 |
+
"desktop\\:ext--m-base",
|
447 |
+
"desktop\\:ext--m-lg",
|
448 |
+
"desktop\\:ext-mx-0",
|
449 |
+
"desktop\\:ext-mx-auto",
|
450 |
+
"desktop\\:ext-mx-base",
|
451 |
+
"desktop\\:ext-mx-lg",
|
452 |
+
"desktop\\:ext--mx-base",
|
453 |
+
"desktop\\:ext--mx-lg",
|
454 |
+
"desktop\\:ext-my-0",
|
455 |
+
"desktop\\:ext-my-auto",
|
456 |
+
"desktop\\:ext-my-base",
|
457 |
+
"desktop\\:ext-my-lg",
|
458 |
+
"desktop\\:ext--my-base",
|
459 |
+
"desktop\\:ext--my-lg",
|
460 |
+
"desktop\\:ext-mt-0",
|
461 |
+
"desktop\\:ext-mt-auto",
|
462 |
+
"desktop\\:ext-mt-base",
|
463 |
+
"desktop\\:ext-mt-lg",
|
464 |
+
"desktop\\:ext--mt-base",
|
465 |
+
"desktop\\:ext--mt-lg",
|
466 |
+
"desktop\\:ext-mr-0",
|
467 |
+
"desktop\\:ext-mr-auto",
|
468 |
+
"desktop\\:ext-mr-base",
|
469 |
+
"desktop\\:ext-mr-lg",
|
470 |
+
"desktop\\:ext--mr-base",
|
471 |
+
"desktop\\:ext--mr-lg",
|
472 |
+
"desktop\\:ext-mb-0",
|
473 |
+
"desktop\\:ext-mb-auto",
|
474 |
+
"desktop\\:ext-mb-base",
|
475 |
+
"desktop\\:ext-mb-lg",
|
476 |
+
"desktop\\:ext--mb-base",
|
477 |
+
"desktop\\:ext--mb-lg",
|
478 |
+
"desktop\\:ext-ml-0",
|
479 |
+
"desktop\\:ext-ml-auto",
|
480 |
+
"desktop\\:ext-ml-base",
|
481 |
+
"desktop\\:ext-ml-lg",
|
482 |
+
"desktop\\:ext--ml-base",
|
483 |
+
"desktop\\:ext--ml-lg",
|
484 |
+
"desktop\\:ext-block",
|
485 |
+
"desktop\\:ext-inline-block",
|
486 |
+
"desktop\\:ext-inline",
|
487 |
+
"desktop\\:ext-flex",
|
488 |
+
"desktop\\:ext-inline-flex",
|
489 |
+
"desktop\\:ext-grid",
|
490 |
+
"desktop\\:ext-inline-grid",
|
491 |
+
"desktop\\:ext-hidden",
|
492 |
+
"desktop\\:ext-w-auto",
|
493 |
+
"desktop\\:ext-w-full",
|
494 |
+
"desktop\\:ext-max-w-full",
|
495 |
+
"desktop\\:ext-flex-1",
|
496 |
+
"desktop\\:ext-flex-auto",
|
497 |
+
"desktop\\:ext-flex-initial",
|
498 |
+
"desktop\\:ext-flex-none",
|
499 |
+
"desktop\\:ext-flex-shrink-0",
|
500 |
+
"desktop\\:ext-flex-shrink",
|
501 |
+
"desktop\\:ext-flex-grow-0",
|
502 |
+
"desktop\\:ext-flex-grow",
|
503 |
+
"desktop\\:ext-list-none",
|
504 |
+
"desktop\\:ext-grid-cols-1",
|
505 |
+
"desktop\\:ext-grid-cols-2",
|
506 |
+
"desktop\\:ext-grid-cols-3",
|
507 |
+
"desktop\\:ext-grid-cols-4",
|
508 |
+
"desktop\\:ext-grid-cols-5",
|
509 |
+
"desktop\\:ext-grid-cols-6",
|
510 |
+
"desktop\\:ext-grid-cols-7",
|
511 |
+
"desktop\\:ext-grid-cols-8",
|
512 |
+
"desktop\\:ext-grid-cols-9",
|
513 |
+
"desktop\\:ext-grid-cols-10",
|
514 |
+
"desktop\\:ext-grid-cols-11",
|
515 |
+
"desktop\\:ext-grid-cols-12",
|
516 |
+
"desktop\\:ext-grid-cols-none",
|
517 |
+
"desktop\\:ext-flex-row",
|
518 |
+
"desktop\\:ext-flex-row-reverse",
|
519 |
+
"desktop\\:ext-flex-col",
|
520 |
+
"desktop\\:ext-flex-col-reverse",
|
521 |
+
"desktop\\:ext-flex-wrap",
|
522 |
+
"desktop\\:ext-flex-wrap-reverse",
|
523 |
+
"desktop\\:ext-flex-nowrap",
|
524 |
+
"desktop\\:ext-items-start",
|
525 |
+
"desktop\\:ext-items-end",
|
526 |
+
"desktop\\:ext-items-center",
|
527 |
+
"desktop\\:ext-items-baseline",
|
528 |
+
"desktop\\:ext-items-stretch",
|
529 |
+
"desktop\\:ext-justify-start",
|
530 |
+
"desktop\\:ext-justify-end",
|
531 |
+
"desktop\\:ext-justify-center",
|
532 |
+
"desktop\\:ext-justify-between",
|
533 |
+
"desktop\\:ext-justify-around",
|
534 |
+
"desktop\\:ext-justify-evenly",
|
535 |
+
"desktop\\:ext-justify-items-start",
|
536 |
+
"desktop\\:ext-justify-items-end",
|
537 |
+
"desktop\\:ext-justify-items-center",
|
538 |
+
"desktop\\:ext-justify-items-stretch",
|
539 |
+
"desktop\\:ext-justify-self-auto",
|
540 |
+
"desktop\\:ext-justify-self-start",
|
541 |
+
"desktop\\:ext-justify-self-end",
|
542 |
+
"desktop\\:ext-justify-self-center",
|
543 |
+
"desktop\\:ext-justify-self-stretch",
|
544 |
+
"desktop\\:ext-p-0",
|
545 |
+
"desktop\\:ext-p-base",
|
546 |
+
"desktop\\:ext-p-lg",
|
547 |
+
"desktop\\:ext-px-0",
|
548 |
+
"desktop\\:ext-px-base",
|
549 |
+
"desktop\\:ext-px-lg",
|
550 |
+
"desktop\\:ext-py-0",
|
551 |
+
"desktop\\:ext-py-base",
|
552 |
+
"desktop\\:ext-py-lg",
|
553 |
+
"desktop\\:ext-pt-0",
|
554 |
+
"desktop\\:ext-pt-base",
|
555 |
+
"desktop\\:ext-pt-lg",
|
556 |
+
"desktop\\:ext-pr-0",
|
557 |
+
"desktop\\:ext-pr-base",
|
558 |
+
"desktop\\:ext-pr-lg",
|
559 |
+
"desktop\\:ext-pb-0",
|
560 |
+
"desktop\\:ext-pb-base",
|
561 |
+
"desktop\\:ext-pb-lg",
|
562 |
+
"desktop\\:ext-pl-0",
|
563 |
+
"desktop\\:ext-pl-base",
|
564 |
+
"desktop\\:ext-pl-lg",
|
565 |
+
"desktop\\:ext-text-left",
|
566 |
+
"desktop\\:ext-text-center",
|
567 |
+
"desktop\\:ext-text-right"
|
568 |
+
]
|
569 |
+
}
|
redux-core/extendify-sdk/utility-framework/tailwind.config.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const suggestions = require('./suggestions.config').suggestions
|
2 |
+
|
3 |
+
module.exports = {
|
4 |
+
purge: {
|
5 |
+
enabled: true,
|
6 |
+
content: [],
|
7 |
+
safelist: {
|
8 |
+
greedy: suggestions?.map(s => new RegExp(`^${s}$`)) ?? [],
|
9 |
+
},
|
10 |
+
},
|
11 |
+
prefix: 'ext-',
|
12 |
+
important: true,
|
13 |
+
darkMode: false,
|
14 |
+
theme: {
|
15 |
+
screens: {
|
16 |
+
tablet: '782px',
|
17 |
+
desktop: '1080px',
|
18 |
+
},
|
19 |
+
spacing: {
|
20 |
+
0: '0',
|
21 |
+
base: 'var(--wp--style--block-gap, 2rem)',
|
22 |
+
lg: 'var(--extendify--spacing--large)',
|
23 |
+
},
|
24 |
+
},
|
25 |
+
variants: {
|
26 |
+
gap: [],
|
27 |
+
gridColumn: [],
|
28 |
+
gridColumnEnd: [],
|
29 |
+
gridColumnStart: [],
|
30 |
+
gridRow: [],
|
31 |
+
gridRowEnd: [],
|
32 |
+
gridRowStart: [],
|
33 |
+
gridTemplateRows: [],
|
34 |
+
lineHeight: [],
|
35 |
+
borderRadius: [],
|
36 |
+
borderWidth: [],
|
37 |
+
},
|
38 |
+
plugins: [],
|
39 |
+
corePlugins: {
|
40 |
+
preflight: false,
|
41 |
+
animation: false,
|
42 |
+
container: false,
|
43 |
+
},
|
44 |
+
}
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/autoload.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/ClassLoader.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/InstalledVersions.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/LICENSE
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_classmap.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_namespaces.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_psr4.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_real.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/autoload_static.php
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/installed.json
RENAMED
File without changes
|
{extendify-sdk → redux-core/extendify-sdk}/vendor/composer/installed.php
RENAMED
File without changes
|
redux-core/extendify-sdk/webpack.mix.js
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const path = require('path')
|
2 |
+
const camelCaseDash = (string) => string.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase())
|
3 |
+
const mix = require('laravel-mix')
|
4 |
+
const fs = require('fs')
|
5 |
+
const semver = require('semver')
|
6 |
+
const requiredNodeVersion = require('./package').engines.node
|
7 |
+
|
8 |
+
if (!semver.satisfies(process.version, requiredNodeVersion)) {
|
9 |
+
console.log(`Please switch to node version ${requiredNodeVersion} to build. You're currently on ${process.version}. Use FNM or NVM to manage node versions and auto switching.`)
|
10 |
+
process.exit(1)
|
11 |
+
}
|
12 |
+
|
13 |
+
mix.options({ manifest: false })
|
14 |
+
|
15 |
+
// If you add additional WP imports, include them here (could we generate these?)
|
16 |
+
const externals = [
|
17 |
+
'block-editor',
|
18 |
+
'blocks',
|
19 |
+
'components',
|
20 |
+
'compose',
|
21 |
+
'data',
|
22 |
+
'date',
|
23 |
+
'htmlEntities',
|
24 |
+
'hooks',
|
25 |
+
'edit-post',
|
26 |
+
'element',
|
27 |
+
'editor',
|
28 |
+
'i18n',
|
29 |
+
'plugins',
|
30 |
+
'viewport',
|
31 |
+
'ajax',
|
32 |
+
'codeEditor',
|
33 |
+
'rich-text',
|
34 |
+
]
|
35 |
+
const globals = externals.reduce((externals, name) => ({
|
36 |
+
...externals,
|
37 |
+
[`@wordpress/${name}`]: `wp.${camelCaseDash(name)}`,
|
38 |
+
}), {})
|
39 |
+
|
40 |
+
const webpackConfig = (context) => {
|
41 |
+
return {
|
42 |
+
context: context,
|
43 |
+
// Enable this if you need to see webpack warnings
|
44 |
+
// stats: {
|
45 |
+
// children: true,
|
46 |
+
// },
|
47 |
+
externals: {
|
48 |
+
wp: 'wp',
|
49 |
+
lodash: 'lodash',
|
50 |
+
fetch: 'fetch',
|
51 |
+
react: 'React',
|
52 |
+
'react-dom': 'ReactDOM',
|
53 |
+
...globals,
|
54 |
+
},
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
mix.browserSync({
|
59 |
+
proxy: 'wordpress.test',
|
60 |
+
open: false,
|
61 |
+
files: ['src/**/*', 'utility-framework/**/*'],
|
62 |
+
})
|
63 |
+
|
64 |
+
mix.js('src/app.js', 'public/build/extendify-sdk.js')
|
65 |
+
.webpackConfig(webpackConfig(path.resolve(__dirname, 'src')))
|
66 |
+
.react()
|
67 |
+
.postCss(
|
68 |
+
'src/app.css',
|
69 |
+
'public/build/extendify-sdk.css',
|
70 |
+
[
|
71 |
+
require('tailwindcss'),
|
72 |
+
css => css.walkRules(rule => { rule.selector.startsWith('*') && rule.remove() }),
|
73 |
+
require('postcss-safe-important'),
|
74 |
+
],
|
75 |
+
)
|
76 |
+
|
77 |
+
mix.js('editorplus/editorplus.js', 'public/editorplus/editorplus.min.js')
|
78 |
+
.webpackConfig(webpackConfig(path.resolve(__dirname, 'editorplus')))
|
79 |
+
.react()
|
80 |
+
|
81 |
+
// Utility specific processing
|
82 |
+
const blockList = new Set()
|
83 |
+
const buildBlockList = (css) => {
|
84 |
+
css.walkRules(rule => {
|
85 |
+
// Allows us to ignore some rules from being processed/purged
|
86 |
+
if (rule?.nodes.find(n => n.type === 'comment' && n.text === 'no suggestion')) {
|
87 |
+
blockList.add(rule.selector.replace('.', '').split(' ')[0])
|
88 |
+
}
|
89 |
+
})
|
90 |
+
}
|
91 |
+
|
92 |
+
const extractSuggestions = (css) => {
|
93 |
+
const classesToExclude = [...blockList]
|
94 |
+
const data = {
|
95 |
+
notes: 'This file is generated in webpack.mix.js. Do not edit directly.',
|
96 |
+
suggestions: [],
|
97 |
+
}
|
98 |
+
css.walkRules(rule => {
|
99 |
+
data.suggestions.push(rule.selector
|
100 |
+
.replace('.', '')
|
101 |
+
.replace(new RegExp(':not\\(([^\\)]*)\\)'), '')
|
102 |
+
.split(/ |.wp-/)[0])
|
103 |
+
})
|
104 |
+
try {
|
105 |
+
data.suggestions = [...new Set(data.suggestions)].filter(c => !classesToExclude.includes(c))
|
106 |
+
fs.writeFileSync(__dirname + '/utility-framework/suggestions.json',
|
107 |
+
JSON.stringify(
|
108 |
+
data, null, 4,
|
109 |
+
))
|
110 |
+
} catch(error) {
|
111 |
+
console.error(error)
|
112 |
+
}
|
113 |
+
return css
|
114 |
+
}
|
115 |
+
|
116 |
+
mix.postCss(
|
117 |
+
'utility-framework/extendify-utilities.css',
|
118 |
+
'public/build/extendify-utilities.css',
|
119 |
+
[
|
120 |
+
require('postcss-import'),
|
121 |
+
buildBlockList,
|
122 |
+
require('tailwindcss')({ config: 'utility-framework/tailwind.config.js' }),
|
123 |
+
css => css.walkRules(rule => {
|
124 |
+
// Removes top level TW styles like *::before {}
|
125 |
+
rule.selector.startsWith('*') && rule.remove()
|
126 |
+
// This appends the :not() exception to padding and margins
|
127 |
+
new RegExp('[:]?[^a-z]-?p[a-z]?-.+').test(rule) && (rule.selector += ':not([style*="padding"])') ||
|
128 |
+
new RegExp('[:]?[^a-z]-?m[a-z]?-.+').test(rule) && (rule.selector += ':not([style*="margin"])')
|
129 |
+
}),
|
130 |
+
extractSuggestions,
|
131 |
+
],
|
132 |
+
)
|
redux-core/framework.php
CHANGED
@@ -29,7 +29,7 @@ defined( 'ABSPATH' ) || exit;
|
|
29 |
|
30 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
31 |
|
32 |
-
Redux_Core::$version = '4.3.
|
33 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
34 |
Redux_Core::instance();
|
35 |
|
29 |
|
30 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
31 |
|
32 |
+
Redux_Core::$version = '4.3.3';
|
33 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
34 |
Redux_Core::instance();
|
35 |
|
{redux-templates → redux-core/redux-templates}/assets/css/admin.min.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/css/font-awesome.min.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/css/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.eot
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.ttf
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.woff
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-brands-400.woff2
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.eot
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.ttf
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.woff
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-regular-400.woff2
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.eot
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.ttf
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.woff
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/fa-solid-900.woff2
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/fonts/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/icon-color.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/icon-premium.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/icon.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/image-loader.gif
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/logo-color.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/logo.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/popup-congrats.png
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/popup-contact.png
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/reduxtemplates-medium.jpg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-1.png
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-2.gif
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/img/welcome-guide-3.png
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/redux-templates.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/redux-templates.js.map
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/redux-templates.min.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/redux-templates.min.js.map
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/vendor.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/vendor.js.map
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/vendor.min.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/assets/js/vendor.min.js.map
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/babel.config.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-api.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-gutenberg-custom-css.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-init.php
RENAMED
@@ -9,7 +9,14 @@
|
|
9 |
|
10 |
namespace ReduxTemplates;
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
use ReduxTemplates;
|
|
|
13 |
|
14 |
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
exit; // Exit if accessed directly.
|
@@ -47,7 +54,7 @@ class Init {
|
|
47 |
$this->load();
|
48 |
}
|
49 |
|
50 |
-
if ( false ===
|
51 |
return;
|
52 |
}
|
53 |
|
@@ -76,12 +83,13 @@ class Init {
|
|
76 |
* Get local contents of a file.
|
77 |
*
|
78 |
* @param string $file_path File path.
|
|
|
79 |
* @access public
|
80 |
-
* @since 4.0.0
|
81 |
* @return string
|
|
|
82 |
*/
|
83 |
-
public static function get_local_file_contents( $file_path ) {
|
84 |
-
$fs =
|
85 |
return $fs->get_contents( $file_path );
|
86 |
}
|
87 |
|
@@ -92,11 +100,11 @@ class Init {
|
|
92 |
* @since 4.0.0
|
93 |
*/
|
94 |
public function editor_assets() {
|
95 |
-
$fs =
|
96 |
-
$min =
|
97 |
|
98 |
// Little safety here for developers.
|
99 |
-
if ( ! $fs->file_exists( REDUXTEMPLATES_DIR_PATH . "assets/js/redux-templates
|
100 |
if ( '.min' === $min ) {
|
101 |
$min = '';
|
102 |
} else {
|
@@ -104,7 +112,7 @@ class Init {
|
|
104 |
}
|
105 |
}
|
106 |
$version = REDUXTEMPLATES_VERSION;
|
107 |
-
// When doing local dev work. Otherwise follow the check for dev_mode or not.
|
108 |
if ( defined( 'REDUX_PLUGIN_FILE' ) ) {
|
109 |
if ( $fs->file_exists( trailingslashit( dirname( REDUX_PLUGIN_FILE ) ) . 'local_developer.txt' ) ) {
|
110 |
$min = '';
|
@@ -115,7 +123,7 @@ class Init {
|
|
115 |
|
116 |
wp_enqueue_script(
|
117 |
'redux-templates-js',
|
118 |
-
plugins_url( "assets/js/redux-templates
|
119 |
array( 'code-editor', 'csslint', 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks' ),
|
120 |
$version,
|
121 |
true
|
@@ -126,7 +134,7 @@ class Init {
|
|
126 |
// Backend editor scripts: common vendor files.
|
127 |
wp_enqueue_script(
|
128 |
'redux-templates-js-vendor',
|
129 |
-
plugins_url( "assets/js/vendor
|
130 |
array(),
|
131 |
$version,
|
132 |
true
|
@@ -144,20 +152,20 @@ class Init {
|
|
144 |
$global_vars = array(
|
145 |
'i18n' => 'redux-framework',
|
146 |
'plugin' => REDUXTEMPLATES_DIR_URL,
|
147 |
-
'mokama' =>
|
148 |
-
'key' =>
|
149 |
-
'version' =>
|
150 |
'supported_plugins' => array(), // Load the supported plugins.
|
151 |
-
'tos' =>
|
152 |
);
|
153 |
if ( ! $global_vars['mokama'] ) {
|
154 |
// phpcs:disable Squiz.PHP.CommentedOutCode
|
155 |
// delete_user_meta( get_current_user_id(), '_redux_templates_counts'); // To test left.
|
156 |
-
$global_vars['left'] =
|
157 |
|
158 |
// phpcs:ignore
|
159 |
// delete_user_meta( get_current_user_id(), '_redux_welcome_guide' ); // For testing.
|
160 |
-
if (
|
161 |
// We don't want to show unless Gutenberg is running, and they haven't tried the library yet.
|
162 |
$launched = get_user_meta( get_current_user_id(), '_redux_welcome_guide', true );
|
163 |
if ( '1' !== $launched ) {
|
@@ -167,13 +175,9 @@ class Init {
|
|
167 |
}
|
168 |
|
169 |
if ( ! $global_vars['mokama'] ) {
|
170 |
-
$global_vars['u'] = rtrim(
|
171 |
}
|
172 |
|
173 |
-
// TODO - Only have this show up After 2 imports and Redux installed for a week. If they dismissed, then show up again in 30 days one last time.
|
174 |
-
// phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
|
175 |
-
// $global_vars['nps'] = __( 'Hey there. You\'ve been using Redux for a bit now, would you mind letting us know how likely you are to recommend Redux to a friend or colleague?', 'redux-framework' );
|
176 |
-
|
177 |
wp_localize_script(
|
178 |
'redux-templates-js',
|
179 |
'redux_templates',
|
@@ -215,7 +219,7 @@ class Init {
|
|
215 |
* @since 4.1.18
|
216 |
* @return int
|
217 |
*/
|
218 |
-
public static function left( $uid ) {
|
219 |
$count = get_user_meta( $uid, '_redux_templates_counts', true );
|
220 |
if ( empty( $count ) ) {
|
221 |
$count = self::$default_left;
|
9 |
|
10 |
namespace ReduxTemplates;
|
11 |
|
12 |
+
use Redux_Connection_Banner;
|
13 |
+
use Redux_Core;
|
14 |
+
use Redux_Filesystem;
|
15 |
+
use Redux_Functions;
|
16 |
+
use Redux_Functions_Ex;
|
17 |
+
use Redux_Helpers;
|
18 |
use ReduxTemplates;
|
19 |
+
use function base64_encode; // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
20 |
|
21 |
if ( ! defined( 'ABSPATH' ) ) {
|
22 |
exit; // Exit if accessed directly.
|
54 |
$this->load();
|
55 |
}
|
56 |
|
57 |
+
if ( false === Redux_Core::$redux_templates_enabled ) {
|
58 |
return;
|
59 |
}
|
60 |
|
83 |
* Get local contents of a file.
|
84 |
*
|
85 |
* @param string $file_path File path.
|
86 |
+
*
|
87 |
* @access public
|
|
|
88 |
* @return string
|
89 |
+
* @since 4.0.0
|
90 |
*/
|
91 |
+
public static function get_local_file_contents( string $file_path ): string {
|
92 |
+
$fs = Redux_Filesystem::get_instance();
|
93 |
return $fs->get_contents( $file_path );
|
94 |
}
|
95 |
|
100 |
* @since 4.0.0
|
101 |
*/
|
102 |
public function editor_assets() {
|
103 |
+
$fs = Redux_Filesystem::get_instance();
|
104 |
+
$min = Redux_Functions::is_min();
|
105 |
|
106 |
// Little safety here for developers.
|
107 |
+
if ( ! $fs->file_exists( REDUXTEMPLATES_DIR_PATH . "assets/js/redux-templates$min.js" ) ) {
|
108 |
if ( '.min' === $min ) {
|
109 |
$min = '';
|
110 |
} else {
|
112 |
}
|
113 |
}
|
114 |
$version = REDUXTEMPLATES_VERSION;
|
115 |
+
// When doing local dev work. Otherwise, follow the check for dev_mode or not.
|
116 |
if ( defined( 'REDUX_PLUGIN_FILE' ) ) {
|
117 |
if ( $fs->file_exists( trailingslashit( dirname( REDUX_PLUGIN_FILE ) ) . 'local_developer.txt' ) ) {
|
118 |
$min = '';
|
123 |
|
124 |
wp_enqueue_script(
|
125 |
'redux-templates-js',
|
126 |
+
plugins_url( "assets/js/redux-templates$min.js", REDUXTEMPLATES_FILE ),
|
127 |
array( 'code-editor', 'csslint', 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks' ),
|
128 |
$version,
|
129 |
true
|
134 |
// Backend editor scripts: common vendor files.
|
135 |
wp_enqueue_script(
|
136 |
'redux-templates-js-vendor',
|
137 |
+
plugins_url( "assets/js/vendor$min.js", REDUXTEMPLATES_FILE ),
|
138 |
array(),
|
139 |
$version,
|
140 |
true
|
152 |
$global_vars = array(
|
153 |
'i18n' => 'redux-framework',
|
154 |
'plugin' => REDUXTEMPLATES_DIR_URL,
|
155 |
+
'mokama' => Redux_Helpers::mokama(),
|
156 |
+
'key' => base64_encode( Redux_Functions::gs() ), // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
157 |
+
'version' => Redux_Core::$version,
|
158 |
'supported_plugins' => array(), // Load the supported plugins.
|
159 |
+
'tos' => Redux_Connection_Banner::tos_blurb( 'import_wizard' ),
|
160 |
);
|
161 |
if ( ! $global_vars['mokama'] ) {
|
162 |
// phpcs:disable Squiz.PHP.CommentedOutCode
|
163 |
// delete_user_meta( get_current_user_id(), '_redux_templates_counts'); // To test left.
|
164 |
+
$global_vars['left'] = self::left( get_current_user_id() );
|
165 |
|
166 |
// phpcs:ignore
|
167 |
// delete_user_meta( get_current_user_id(), '_redux_welcome_guide' ); // For testing.
|
168 |
+
if ( Redux_Helpers::is_gutenberg_page() && $global_vars['left'] === self::$default_left ) {
|
169 |
// We don't want to show unless Gutenberg is running, and they haven't tried the library yet.
|
170 |
$launched = get_user_meta( get_current_user_id(), '_redux_welcome_guide', true );
|
171 |
if ( '1' !== $launched ) {
|
175 |
}
|
176 |
|
177 |
if ( ! $global_vars['mokama'] ) {
|
178 |
+
$global_vars['u'] = rtrim( Redux_Functions_Ex::get_site_utm_url( '', 'library', true ), '1' );
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
181 |
wp_localize_script(
|
182 |
'redux-templates-js',
|
183 |
'redux_templates',
|
219 |
* @since 4.1.18
|
220 |
* @return int
|
221 |
*/
|
222 |
+
public static function left( int $uid ): int {
|
223 |
$count = get_user_meta( $uid, '_redux_templates_counts', true );
|
224 |
if ( empty( $count ) ) {
|
225 |
$count = self::$default_left;
|
{redux-templates → redux-core/redux-templates}/classes/class-installer-muter.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-installer.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-notice-overrides.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-notices.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-supported-plugins.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-template-overrides.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/class-templates.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/library/collections.json
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/library/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/library/library.json
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/library/pages.json
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/library/sections.json
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/templates/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/templates/template-canvas.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/templates/template-contained.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/classes/templates/template-full-width.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/jest.config.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/redux-templates.php
RENAMED
@@ -21,12 +21,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
exit; // Exit if accessed directly.
|
22 |
}
|
23 |
|
|
|
|
|
|
|
24 |
// Define Version.
|
25 |
define( 'REDUXTEMPLATES_VERSION', Redux_Core::$version );
|
26 |
|
27 |
-
// Define File DIR.
|
28 |
-
define( 'REDUXTEMPLATES_FILE', __FILE__ );
|
29 |
-
|
30 |
// Define Dir URL.
|
31 |
define( 'REDUXTEMPLATES_DIR_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
32 |
|
21 |
exit; // Exit if accessed directly.
|
22 |
}
|
23 |
|
24 |
+
// Define File DIR.
|
25 |
+
const REDUXTEMPLATES_FILE = __FILE__;
|
26 |
+
|
27 |
// Define Version.
|
28 |
define( 'REDUXTEMPLATES_VERSION', Redux_Core::$version );
|
29 |
|
|
|
|
|
|
|
30 |
// Define Dir URL.
|
31 |
define( 'REDUXTEMPLATES_DIR_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
32 |
|
{redux-templates → redux-core/redux-templates}/src/_variables.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/blocks.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/components/edit.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/icon.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/transforms.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/utils/file.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/utils/import.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/import/utils/insert.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/library/edit.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/library/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/library/insert-library-button.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/library/save.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/blocks/library/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/_variable.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/ChallengeStepItem.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/ProgressBar.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-list-block/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/challenge-timer/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/config.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/final-templates/congrats.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/final-templates/contact.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/final-templates/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/final-templates/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/final-templates/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/helper.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/tooltip/ChallengeDot.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/challenge/tooltip/TooltipBox.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/background-image/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/background-image/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/background-image/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/button-group/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/button-group/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/button-group/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/button-group/tests/__snapshots__/index.test.js.snap
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/button-group/tests/index.test.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/tests/__snapshots__/index.test.js.snap
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/dependent-plugins/tests/index.test.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/error-notice/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/error-notice/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/error-notice/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/error-notice/tests/__snapshots__/index.test.js.snap
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/error-notice/tests/index.test.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/config.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/styles.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/fab-wrapper/styles.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/multiple-item/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/multiple-item/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/pagination/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/pagination/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/pagination/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/preview-import-button/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/preview-import-button/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/preview-import-button/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/preview-import-button/tests/__snapshots__/index.test.js.snap
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/preview-import-button/tests/index.test.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/safe-image-load/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/single-item/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/single-item/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/single-item/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/tab-header/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/tab-header/tests/__snapshots__/index.test.js.snap
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/tab-header/tests/index.test.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-change/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-few.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-many.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/images/view-normal.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/template-list-subheader/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/welcome-guide/images.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/welcome-guide/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/welcome-guide/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/components/welcome-guide/test.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/custom-css/editor.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/custom-css/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/custom-css/inject-css.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/custom-css/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/editor.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/editor.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/editor.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/fontawesome.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/acf-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/advanced-custom-fields.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/advanced-gutenberg-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/atomic-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/block-options.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/block-slider.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/coblocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/creative-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/editorplus.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/elegant-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/enhanced-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/essential-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/forms-gutenberg.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/getwid.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/ghostkit.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/guteblock.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/gutentor.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/index.php
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/kadence-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/kioken-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/otter-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/qodeblock.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/qubely.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/snow-monkey-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/stackable-ultimate-gutenberg-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-addons-for-gutenberg.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-blocks.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/ultimate-post.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/images/wordpress.svg
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/icons/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-feedback/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-feedback/modal.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-feedback/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-feedback/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ImportingStep.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/InstallPluginStep.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/OptionStep.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ProPluginsStep.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesActivateBox.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesPremiumActivate.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/ReduxTemplatesPremiumBox.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/dependencyHelper.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-import-wizard/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/layout-with-sidebar/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/categoryFilter.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/dependencyFilter.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/dependencyFilterRow.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/priceFilter.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/sidebar/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-collection/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-saved/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-library/view-template-list/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-manager/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/FullyOverlayFooter.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/FullyOverlayHeader.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/SidebarContent.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/SitePreviewSidebar.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-preview/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-promotor-score/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modal-promotor-score/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modals.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/modals.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/export-page-menu-item/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/export/export-block-menu-item.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/export/file.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/export/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/export/reusable.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/library-context-menu-item/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/buttons.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/modal.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/style.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/share-block-btn/style.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/sidebar-share/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/plugins/sidebar-share/sidebar.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/preview-template/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/scss/admin.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/scss/admin.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/scss/common.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/scss/font-awesome.css
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/scss/font-awesome.scss
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/actionHelper.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/actions.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/dependencyHelper.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/filters.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/helper.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/index.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/stores/reducer.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/ajax-stub.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/file-transformer.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/image-stub.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/scss-stub.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/setup-test-framework.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/test/svgr-mock.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/util/collections.js
RENAMED
File without changes
|
{redux-templates → redux-core/redux-templates}/src/util/index.js
RENAMED
File without changes
|
redux-framework.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Plugin URI: http://wordpress.org/plugins/redux-framework
|
9 |
* GitHub URI: reduxframework/redux-framework
|
10 |
* Description: Build better sites in WordPress fast!
|
11 |
-
* Version: 4.3.
|
12 |
* Requires at least: 4.0
|
13 |
* Requires PHP: 7.1
|
14 |
* Author: Extendify
|
8 |
* Plugin URI: http://wordpress.org/plugins/redux-framework
|
9 |
* GitHub URI: reduxframework/redux-framework
|
10 |
* Description: Build better sites in WordPress fast!
|
11 |
+
* Version: 4.3.3
|
12 |
* Requires at least: 4.0
|
13 |
* Requires PHP: 7.1
|
14 |
* Author: Extendify
|