From 94bbac622dd7e0b5f2f3f81e81ce9ffd344e53cf Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 16 Jan 2024 14:29:30 +0000 Subject: [PATCH] Release 5.0.2 --- dist/css/autosuggest-styles.asset.php | 1 + dist/css/autosuggest-styles.css | 1 + dist/css/comments-styles.asset.php | 1 + dist/css/comments-styles.css | 1 + dist/css/dashboard-styles.asset.php | 1 + dist/css/dashboard-styles.css | 1 + dist/css/facets-styles.asset.php | 1 + dist/css/facets-styles.css | 1 + dist/css/features-script.css | 2 + dist/css/highlighting-styles.asset.php | 1 + dist/css/highlighting-styles.css | 1 + dist/css/instant-results-styles.asset.php | 1 + dist/css/instant-results-styles.css | 1 + dist/css/ordering-styles.asset.php | 1 + dist/css/ordering-styles.css | 1 + dist/css/related-posts-block-styles.asset.php | 1 + dist/css/related-posts-block-styles.css | 1 + dist/css/status-report-script.css | 2 + dist/css/sync-script.css | 2 + dist/css/synonyms-styles.asset.php | 1 + dist/css/synonyms-styles.css | 1 + dist/css/weighting-script.css | 2 + .../woocommerce-order-search-styles.asset.php | 1 + dist/css/woocommerce-order-search-styles.css | 1 + dist/js/admin-script.asset.php | 1 + dist/js/admin-script.js | 1 + dist/js/autosuggest-script.asset.php | 1 + dist/js/autosuggest-script.js | 1 + dist/js/blocks-script.asset.php | 1 + dist/js/blocks-script.js | 1 + dist/js/comments-block-script.asset.php | 1 + dist/js/comments-block-script.js | 1 + dist/js/comments-script.asset.php | 1 + dist/js/comments-script.js | 1 + dist/js/dashboard-script.asset.php | 1 + dist/js/dashboard-script.js | 1 + dist/js/facets-block-script.asset.php | 1 + dist/js/facets-block-script.js | 1 + dist/js/facets-date-block-script.asset.php | 1 + dist/js/facets-date-block-script.js | 1 + .../facets-date-block-view-script.asset.php | 1 + dist/js/facets-date-block-view-script.js | 1 + dist/js/facets-meta-block-script.asset.php | 1 + dist/js/facets-meta-block-script.js | 1 + .../facets-meta-range-block-script.asset.php | 1 + dist/js/facets-meta-range-block-script.js | 1 + ...ets-meta-range-block-view-script.asset.php | 1 + .../js/facets-meta-range-block-view-script.js | 1 + .../facets-post-type-block-script.asset.php | 1 + dist/js/facets-post-type-block-script.js | 1 + dist/js/facets-script.asset.php | 1 + dist/js/facets-script.js | 1 + dist/js/features-script.asset.php | 1 + dist/js/features-script.js | 1 + .../js/instant-results-admin-script.asset.php | 1 + dist/js/instant-results-admin-script.js | 1 + dist/js/instant-results-script.asset.php | 1 + dist/js/instant-results-script.js | 1 + dist/js/notice-script.asset.php | 1 + dist/js/notice-script.js | 1 + dist/js/ordering-script.asset.php | 1 + dist/js/ordering-script.js | 1 + dist/js/related-posts-block-script.asset.php | 1 + dist/js/related-posts-block-script.js | 1 + dist/js/search-editor-script.asset.php | 1 + dist/js/search-editor-script.js | 1 + dist/js/settings-script.asset.php | 1 + dist/js/settings-script.js | 1 + dist/js/sites-admin-script.asset.php | 1 + dist/js/sites-admin-script.js | 1 + dist/js/stats-script.asset.php | 1 + dist/js/stats-script.js | 1 + dist/js/status-report-script.asset.php | 1 + dist/js/status-report-script.js | 1 + dist/js/sync-script.asset.php | 1 + dist/js/sync-script.js | 1 + dist/js/synonyms-script.asset.php | 1 + dist/js/synonyms-script.js | 1 + dist/js/weighting-script.asset.php | 1 + dist/js/weighting-script.js | 1 + .../woocommerce-order-search-script.asset.php | 1 + dist/js/woocommerce-order-search-script.js | 1 + vendor-prefixed/autoload-classmap.php | 107 +++++++ vendor-prefixed/autoload.php | 20 ++ .../src/Composer/Installers/AglInstaller.php | 35 +++ .../Installers/AkauntingInstaller.php | 29 ++ .../Installers/AnnotateCmsInstaller.php | 19 ++ .../Composer/Installers/AsgardInstaller.php | 64 ++++ .../Composer/Installers/AttogramInstaller.php | 17 ++ .../src/Composer/Installers/BaseInstaller.php | 143 +++++++++ .../Composer/Installers/BitrixInstaller.php | 129 ++++++++ .../Composer/Installers/BonefishInstaller.php | 17 ++ .../Composer/Installers/CakePHPInstaller.php | 73 +++++ .../src/Composer/Installers/ChefInstaller.php | 18 ++ .../Composer/Installers/CiviCrmInstaller.php | 17 ++ .../Installers/ClanCatsFrameworkInstaller.php | 18 ++ .../Composer/Installers/CockpitInstaller.php | 42 +++ .../Installers/CodeIgniterInstaller.php | 19 ++ .../Installers/Concrete5Installer.php | 21 ++ .../Composer/Installers/CroogoInstaller.php | 29 ++ .../Composer/Installers/DecibelInstaller.php | 18 ++ .../Composer/Installers/DframeInstaller.php | 17 ++ .../Composer/Installers/DokuWikiInstaller.php | 63 ++++ .../Composer/Installers/DolibarrInstaller.php | 24 ++ .../Composer/Installers/DrupalInstaller.php | 30 ++ .../src/Composer/Installers/ElggInstaller.php | 17 ++ .../Composer/Installers/EliasisInstaller.php | 20 ++ .../Installers/ExpressionEngineInstaller.php | 37 +++ .../Installers/EzPlatformInstaller.php | 18 ++ .../src/Composer/Installers/FuelInstaller.php | 19 ++ .../Composer/Installers/FuelphpInstaller.php | 17 ++ .../src/Composer/Installers/GravInstaller.php | 35 +++ .../Composer/Installers/HuradInstaller.php | 33 ++ .../Composer/Installers/ImageCMSInstaller.php | 19 ++ .../src/Composer/Installers/Installer.php | 286 ++++++++++++++++++ .../src/Composer/Installers/ItopInstaller.php | 17 ++ .../Composer/Installers/KanboardInstaller.php | 26 ++ .../Composer/Installers/KnownInstaller.php | 19 ++ .../Composer/Installers/KodiCMSInstaller.php | 18 ++ .../Composer/Installers/KohanaInstaller.php | 17 ++ .../LanManagementSystemInstaller.php | 33 ++ .../Composer/Installers/LaravelInstaller.php | 17 ++ .../Composer/Installers/LavaLiteInstaller.php | 18 ++ .../Composer/Installers/LithiumInstaller.php | 18 ++ .../Installers/MODULEWorkInstaller.php | 17 ++ .../Composer/Installers/MODXEvoInstaller.php | 24 ++ .../Composer/Installers/MagentoInstaller.php | 19 ++ .../Composer/Installers/MajimaInstaller.php | 52 ++++ .../src/Composer/Installers/MakoInstaller.php | 17 ++ .../Composer/Installers/MantisBTInstaller.php | 31 ++ .../Composer/Installers/MatomoInstaller.php | 34 +++ .../Composer/Installers/MauticInstaller.php | 49 +++ .../src/Composer/Installers/MayaInstaller.php | 44 +++ .../Installers/MediaWikiInstaller.php | 64 ++++ .../Composer/Installers/MiaoxingInstaller.php | 17 ++ .../Installers/MicroweberInstaller.php | 151 +++++++++ .../src/Composer/Installers/ModxInstaller.php | 20 ++ .../Composer/Installers/MoodleInstaller.php | 73 +++++ .../Composer/Installers/OctoberInstaller.php | 63 ++++ .../Composer/Installers/OntoWikiInstaller.php | 32 ++ .../Composer/Installers/OsclassInstaller.php | 20 ++ .../src/Composer/Installers/OxidInstaller.php | 55 ++++ .../src/Composer/Installers/PPIInstaller.php | 17 ++ .../Composer/Installers/PantheonInstaller.php | 18 ++ .../Composer/Installers/PhiftyInstaller.php | 19 ++ .../Composer/Installers/PhpBBInstaller.php | 19 ++ .../Composer/Installers/PiwikInstaller.php | 34 +++ .../Installers/PlentymarketsInstaller.php | 34 +++ .../src/Composer/Installers/Plugin.php | 34 +++ .../Composer/Installers/PortoInstaller.php | 17 ++ .../Installers/PrestashopInstaller.php | 18 ++ .../Installers/ProcessWireInstaller.php | 29 ++ .../Composer/Installers/PuppetInstaller.php | 18 ++ .../Composer/Installers/PxcmsInstaller.php | 68 +++++ .../Composer/Installers/RadPHPInstaller.php | 32 ++ .../Composer/Installers/ReIndexInstaller.php | 18 ++ .../Composer/Installers/Redaxo5Installer.php | 18 ++ .../Composer/Installers/RedaxoInstaller.php | 18 ++ .../Installers/RoundcubeInstaller.php | 27 ++ .../src/Composer/Installers/SMFInstaller.php | 18 ++ .../Composer/Installers/ShopwareInstaller.php | 72 +++++ .../Installers/SilverStripeInstaller.php | 39 +++ .../Installers/SiteDirectInstaller.php | 40 +++ .../Composer/Installers/StarbugInstaller.php | 20 ++ .../Composer/Installers/SyDESInstaller.php | 61 ++++ .../Composer/Installers/SyliusInstaller.php | 17 ++ .../src/Composer/Installers/TaoInstaller.php | 38 +++ .../Installers/TastyIgniterInstaller.php | 91 ++++++ .../Composer/Installers/TheliaInstaller.php | 20 ++ .../src/Composer/Installers/TuskInstaller.php | 23 ++ .../Installers/UserFrostingInstaller.php | 17 ++ .../Composer/Installers/VanillaInstaller.php | 18 ++ .../Composer/Installers/VgmcpInstaller.php | 65 ++++ .../Composer/Installers/WHMCSInstaller.php | 28 ++ .../Composer/Installers/WinterInstaller.php | 77 +++++ .../Composer/Installers/WolfCMSInstaller.php | 17 ++ .../Installers/WordPressInstaller.php | 20 ++ .../Composer/Installers/YawikInstaller.php | 29 ++ .../src/Composer/Installers/ZendInstaller.php | 19 ++ .../Composer/Installers/ZikulaInstaller.php | 18 ++ .../src/ContainerExceptionInterface.php | 16 + .../psr/container/src/ContainerInterface.php | 40 +++ .../src/NotFoundExceptionInterface.php | 16 + 183 files changed, 3778 insertions(+) create mode 100644 dist/css/autosuggest-styles.asset.php create mode 100644 dist/css/autosuggest-styles.css create mode 100644 dist/css/comments-styles.asset.php create mode 100644 dist/css/comments-styles.css create mode 100644 dist/css/dashboard-styles.asset.php create mode 100644 dist/css/dashboard-styles.css create mode 100644 dist/css/facets-styles.asset.php create mode 100644 dist/css/facets-styles.css create mode 100644 dist/css/features-script.css create mode 100644 dist/css/highlighting-styles.asset.php create mode 100644 dist/css/highlighting-styles.css create mode 100644 dist/css/instant-results-styles.asset.php create mode 100644 dist/css/instant-results-styles.css create mode 100644 dist/css/ordering-styles.asset.php create mode 100644 dist/css/ordering-styles.css create mode 100644 dist/css/related-posts-block-styles.asset.php create mode 100644 dist/css/related-posts-block-styles.css create mode 100644 dist/css/status-report-script.css create mode 100644 dist/css/sync-script.css create mode 100644 dist/css/synonyms-styles.asset.php create mode 100644 dist/css/synonyms-styles.css create mode 100644 dist/css/weighting-script.css create mode 100644 dist/css/woocommerce-order-search-styles.asset.php create mode 100644 dist/css/woocommerce-order-search-styles.css create mode 100644 dist/js/admin-script.asset.php create mode 100644 dist/js/admin-script.js create mode 100644 dist/js/autosuggest-script.asset.php create mode 100644 dist/js/autosuggest-script.js create mode 100644 dist/js/blocks-script.asset.php create mode 100644 dist/js/blocks-script.js create mode 100644 dist/js/comments-block-script.asset.php create mode 100644 dist/js/comments-block-script.js create mode 100644 dist/js/comments-script.asset.php create mode 100644 dist/js/comments-script.js create mode 100644 dist/js/dashboard-script.asset.php create mode 100644 dist/js/dashboard-script.js create mode 100644 dist/js/facets-block-script.asset.php create mode 100644 dist/js/facets-block-script.js create mode 100644 dist/js/facets-date-block-script.asset.php create mode 100644 dist/js/facets-date-block-script.js create mode 100644 dist/js/facets-date-block-view-script.asset.php create mode 100644 dist/js/facets-date-block-view-script.js create mode 100644 dist/js/facets-meta-block-script.asset.php create mode 100644 dist/js/facets-meta-block-script.js create mode 100644 dist/js/facets-meta-range-block-script.asset.php create mode 100644 dist/js/facets-meta-range-block-script.js create mode 100644 dist/js/facets-meta-range-block-view-script.asset.php create mode 100644 dist/js/facets-meta-range-block-view-script.js create mode 100644 dist/js/facets-post-type-block-script.asset.php create mode 100644 dist/js/facets-post-type-block-script.js create mode 100644 dist/js/facets-script.asset.php create mode 100644 dist/js/facets-script.js create mode 100644 dist/js/features-script.asset.php create mode 100644 dist/js/features-script.js create mode 100644 dist/js/instant-results-admin-script.asset.php create mode 100644 dist/js/instant-results-admin-script.js create mode 100644 dist/js/instant-results-script.asset.php create mode 100644 dist/js/instant-results-script.js create mode 100644 dist/js/notice-script.asset.php create mode 100644 dist/js/notice-script.js create mode 100644 dist/js/ordering-script.asset.php create mode 100644 dist/js/ordering-script.js create mode 100644 dist/js/related-posts-block-script.asset.php create mode 100644 dist/js/related-posts-block-script.js create mode 100644 dist/js/search-editor-script.asset.php create mode 100644 dist/js/search-editor-script.js create mode 100644 dist/js/settings-script.asset.php create mode 100644 dist/js/settings-script.js create mode 100644 dist/js/sites-admin-script.asset.php create mode 100644 dist/js/sites-admin-script.js create mode 100644 dist/js/stats-script.asset.php create mode 100644 dist/js/stats-script.js create mode 100644 dist/js/status-report-script.asset.php create mode 100644 dist/js/status-report-script.js create mode 100644 dist/js/sync-script.asset.php create mode 100644 dist/js/sync-script.js create mode 100644 dist/js/synonyms-script.asset.php create mode 100644 dist/js/synonyms-script.js create mode 100644 dist/js/weighting-script.asset.php create mode 100644 dist/js/weighting-script.js create mode 100644 dist/js/woocommerce-order-search-script.asset.php create mode 100644 dist/js/woocommerce-order-search-script.js create mode 100644 vendor-prefixed/autoload-classmap.php create mode 100644 vendor-prefixed/autoload.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/AglInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/AkauntingInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/AsgardInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/AttogramInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/BaseInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/BitrixInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/BonefishInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/CakePHPInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ChefInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/CiviCrmInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/CockpitInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/Concrete5Installer.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/CroogoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/DecibelInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/DframeInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/DokuWikiInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/DolibarrInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/DrupalInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ElggInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/EliasisInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/EzPlatformInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/FuelInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/FuelphpInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/GravInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/HuradInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ImageCMSInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/Installer.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ItopInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/KanboardInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/KnownInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/KodiCMSInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/KohanaInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/LaravelInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/LavaLiteInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/LithiumInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MODXEvoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MagentoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MajimaInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MakoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MantisBTInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MatomoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MauticInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MayaInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MediaWikiInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MiaoxingInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MicroweberInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ModxInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/MoodleInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/OctoberInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/OntoWikiInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/OsclassInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/OxidInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PPIInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PantheonInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PhiftyInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PhpBBInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PiwikInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/Plugin.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PortoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PrestashopInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ProcessWireInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PuppetInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/PxcmsInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/RadPHPInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ReIndexInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/Redaxo5Installer.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/RedaxoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/RoundcubeInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/SMFInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ShopwareInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/SilverStripeInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/SiteDirectInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/StarbugInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/SyDESInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/SyliusInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/TaoInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/TheliaInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/TuskInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/UserFrostingInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/VanillaInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/VgmcpInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/WHMCSInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/WinterInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/WolfCMSInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/WordPressInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/YawikInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ZendInstaller.php create mode 100644 vendor-prefixed/composer/installers/src/Composer/Installers/ZikulaInstaller.php create mode 100644 vendor-prefixed/psr/container/src/ContainerExceptionInterface.php create mode 100644 vendor-prefixed/psr/container/src/ContainerInterface.php create mode 100644 vendor-prefixed/psr/container/src/NotFoundExceptionInterface.php diff --git a/dist/css/autosuggest-styles.asset.php b/dist/css/autosuggest-styles.asset.php new file mode 100644 index 0000000000..49a9f1762c --- /dev/null +++ b/dist/css/autosuggest-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'a6741e62380c47e371b4'); diff --git a/dist/css/autosuggest-styles.css b/dist/css/autosuggest-styles.css new file mode 100644 index 0000000000..d9f6c7c358 --- /dev/null +++ b/dist/css/autosuggest-styles.css @@ -0,0 +1 @@ +.ep-autosuggest-container{position:relative}.ep-autosuggest-container .ep-autosuggest{background:#fff;border:1px solid #ccc;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);box-shadow:0 2px 4px rgba(0,0,0,.2);display:none;position:absolute;width:100%;z-index:200}.ep-autosuggest-container .ep-autosuggest>ul{margin:0!important}.ep-autosuggest-container .ep-autosuggest>ul{list-style:none}.ep-autosuggest-container .ep-autosuggest>ul>li{font-family:sans-serif}.ep-autosuggest-container .ep-autosuggest>ul>li>a.autosuggest-link{color:#000;cursor:pointer;display:block;padding:2px 10px}.ep-autosuggest-container .ep-autosuggest>ul>li>a.autosuggest-link:active,.ep-autosuggest-container .ep-autosuggest>ul>li>a.autosuggest-link:hover{background-color:#eee;-webkit-text-decoration:none;text-decoration:none}.ep-autosuggest-container .selected{background-color:#eee;-webkit-text-decoration:none;text-decoration:none} diff --git a/dist/css/comments-styles.asset.php b/dist/css/comments-styles.asset.php new file mode 100644 index 0000000000..4673c32e9e --- /dev/null +++ b/dist/css/comments-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '96b3563542134e5e8a48'); diff --git a/dist/css/comments-styles.css b/dist/css/comments-styles.css new file mode 100644 index 0000000000..421ce00372 --- /dev/null +++ b/dist/css/comments-styles.css @@ -0,0 +1 @@ +.ep-widget-search-comments-results{list-style-type:none;margin-left:0}.ep-widget-search-comments-result-item,.ep-widget-search-comments-result-item-not-found{margin-left:0}.ep-widget-search-comments-result-item.selected a{border:2px dotted #171923} diff --git a/dist/css/dashboard-styles.asset.php b/dist/css/dashboard-styles.asset.php new file mode 100644 index 0000000000..c101866e98 --- /dev/null +++ b/dist/css/dashboard-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '331cad02ee28356dd133'); diff --git a/dist/css/dashboard-styles.css b/dist/css/dashboard-styles.css new file mode 100644 index 0000000000..f5fed82f1a --- /dev/null +++ b/dist/css/dashboard-styles.css @@ -0,0 +1 @@ +.a11y-tip{display:inline-block;position:relative}.a11y-tip__trigger[tabindex]{border-bottom:1px dotted #666}.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help,.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help:after,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help:after,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help:after{opacity:1;pointer-events:auto;-webkit-transform:translate(-50%);transform:translate(-50%);visibility:visible}@media screen and (min-width:40.625em){.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help--left,.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help--left:after,.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help--right,.a11y-tip__trigger[aria-describedby]:hover+.a11y-tip__help--right:after,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help--left,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help--left:after,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help--right,.a11y-tip__trigger[aria-describedby]:not(.a11y-tip__trigger--toggle):focus+.a11y-tip__help--right:after,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help--left,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help--left:after,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help--right,.a11y-tip__trigger[aria-describedby][aria-expanded=true] .a11y-tip__help--right:after{-webkit-transform:translateY(-50%);transform:translateY(-50%)}}.a11y-tip__trigger[aria-describedby].a11y-tip__trigger--toggle:hover+.a11y-tip__help,.a11y-tip__trigger[aria-describedby].a11y-tip__trigger--toggle:hover+.a11y-tip__help:after{opacity:0;pointer-events:none;visibility:hidden}.a11y-tip__trigger[aria-expanded=true].a11y-tip__trigger--toggle:hover+.a11y-tip__help,.a11y-tip__trigger[aria-expanded=true].a11y-tip__trigger--toggle:hover+.a11y-tip__help:after{opacity:1!important;pointer-events:auto!important;visibility:visible!important}.a11y-tip__trigger[aria-expanded=true].a11y-tip__trigger--toggle:hover+.a11y-tip__help,.a11y-tip__trigger[aria-expanded=true].a11y-tip__trigger--toggle:hover+.a11y-tip__help:after{-webkit-transition:opacity .18s ease-in-out,-webkit-transform .18s ease-in-out;transition:opacity .18s ease-in-out,-webkit-transform .18s ease-in-out;transition:opacity .18s ease-in-out,transform .18s ease-in-out;transition:opacity .18s ease-in-out,transform .18s ease-in-out,-webkit-transform .18s ease-in-out}.a11y-tip--no-delay .a11y-tip__help,.a11y-tip--no-delay .a11y-tip__help:after{-webkit-transition:opacity .18s ease-in-out,-webkit-transform .18s ease-in-out;transition:opacity .18s ease-in-out,-webkit-transform .18s ease-in-out;transition:opacity .18s ease-in-out,transform .18s ease-in-out;transition:opacity .18s ease-in-out,transform .18s ease-in-out,-webkit-transform .18s ease-in-out}[role=tooltip].a11y-tip__help{background:rgba(0,0,0,.9);border-radius:4px;color:#fff;font-size:14px;margin-top:9pt;max-width:25pc;min-width:220px;padding:.5em 1em;text-align:left;top:100%;width:100%}[role=tooltip].a11y-tip__help,[role=tooltip].a11y-tip__help:after{left:50%;opacity:0;pointer-events:none;position:absolute;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition:opacity .2s ease-in-out 1s;transition:opacity .2s ease-in-out 1s;visibility:hidden;z-index:10}[role=tooltip].a11y-tip__help:after{speak:none;border:6px inset transparent;border-bottom:6px solid rgba(0,0,0,.9);bottom:100%;content:"";display:inline-block;height:0;margin-top:6px;width:0}[role=tooltip].a11y-tip__help--top{bottom:100%;left:50%;margin-bottom:9pt;margin-top:0;top:auto;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:center top;transform-origin:center top}[role=tooltip].a11y-tip__help--top:after{speak:none;border:6px inset transparent;border-top:6px solid rgba(0,0,0,.9);content:"";display:inline-block;height:0;left:50%;margin-bottom:6px;margin-top:0;top:100%;-webkit-transform:translate(-50%,-10px);transform:translate(-50%,-10px);-webkit-transform-origin:center top;transform-origin:center top;width:0}@media screen and (min-width:40.625em){[role=tooltip].a11y-tip__help--left{left:auto;margin-right:11px;margin-top:0;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[role=tooltip].a11y-tip__help--left:after{speak:none;border:6px inset transparent;border-left:6px solid rgba(0,0,0,.9);content:"";display:inline-block;height:0;left:100%;margin-right:5px;margin-top:0;top:50%;-webkit-transform:translate(-10px,-50%);transform:translate(-10px,-50%);width:0}[role=tooltip].a11y-tip__help--right{left:100%;margin-left:11px;margin-top:0;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[role=tooltip].a11y-tip__help--right:after{speak:none;border:6px inset transparent;border-right:6px solid rgba(0,0,0,.9);bottom:auto;content:"";display:inline-block;height:0;left:auto;margin-left:5px;margin-top:0;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);width:0}}.a11y-tip--hide~.a11y-tip__help{display:none}.no-js .a11y-tip__help:not([role]){font-size:.85em}.no-js .a11y-tip__help:not([role]):before{content:"("}.no-js .a11y-tip__help:not([role]):after{content:")"}:root{--ep-dashboard-status-ok:#6aa000;--ep-dashboard-status-warning:#e3e600;--ep-dashboard-status-error:red}html.wp-toolbar{background:transparent}.wrap .notice,.wrap>h2{position:relative;z-index:2}h2.ep-list-features{display:none}#wpbody #update-nag,#wpbody .update-nag{display:block;margin:5px 15px 2px}.ep-header-menu{background-color:#fff;border-bottom:2px solid #ddd;margin-left:-20px;padding-bottom:5px;padding-left:20px;padding-right:20px;padding-top:5px;position:relative;z-index:2}.ep-header-menu:after{clear:both;content:" ";display:block}.ep-header-menu img{float:left}.ep-header-menu .icons{display:inline-block;float:right;height:30px;line-height:34px;padding-right:3px}.ep-header-menu .icons a{color:inherit;cursor:pointer;font-size:27px;margin-left:8px;position:relative;top:-3px;vertical-align:middle}.ep-header-menu .icons .dashicons-admin-generic,.ep-header-menu .icons .dashicons-controls-pause,.ep-header-menu .icons .dashicons-controls-play,.ep-header-menu .icons .dashicons-no,.ep-header-menu .icons .dashicons-update{font-size:30px;top:1px}.ep-header-menu .cancel-sync,.ep-header-menu .pause-sync,.ep-header-menu .resume-sync{display:none}.ep-header-menu .sync-status{bottom:-1px;color:#666;display:none;font-style:italic;margin-right:8px;position:relative;vertical-align:middle}.ep-header-menu .progress-bar{background-color:#d84440;bottom:0;height:5px;left:0;margin-bottom:-5px;position:absolute}.ep-header-menu .icons .dashicons-admin-generic,.ep-header-menu .icons .dashicons-update{display:inline}.ep-header-menu .icons .dashicons-update{top:2px}.ep-features{overflow:auto}.error-overlay.cant-connect,.error-overlay.syncing{background-color:#fff;bottom:0;content:" ";display:block;left:0;opacity:.6;position:fixed;right:0;top:46px;z-index:1}@media (min-width:880px){.error-overlay,.error-overlay.cant-connect,.error-overlay.syncing{left:10pc;top:2pc}}.ep-feature .postbox{margin-bottom:0}.ep-feature .postbox .hndle{cursor:inherit}.ep-feature .postbox .hndle .settings-button{background-color:#efefef;border:none;border-radius:4px;color:inherit;cursor:pointer;display:inline-block;float:right;font-size:13px;font-weight:400;line-height:inherit;margin-top:-4px;padding:4px 7px;padding-left:23px;position:relative}.ep-feature .settings-button:before{color:#72777c;content:"\f140";display:inline-block;font:400 19px/1 dashicons;left:1px;padding:0 5px 0 0;position:absolute;top:4px;vertical-align:middle}.ep-feature .settings-button:after{border-radius:50%;content:" ";display:inline-block;height:8px;margin-left:10px;margin-top:-2px;vertical-align:middle;width:8px}.feature-requirements-status-2.ep-feature .postbox .hndle .settings-button:after{background-color:transparent;border:1px solid red;border:1px solid var(--ep-dashboard-status-error)}.feature-requirements-status-2.ep-feature .settings .requirements-status-notice{border-color:red;border-color:var(--ep-dashboard-status-error)}.feature-requirements-status-1.ep-feature .postbox .hndle .settings-button:after{background-color:transparent;border:1px solid #e3e600;border:1px solid var(--ep-dashboard-status-warning)}.feature-requirements-status-1.ep-feature.feature-active .postbox .hndle .settings-button:after{background-color:#e3e600;background-color:var(--ep-dashboard-status-warning)}.feature-requirements-status-1.ep-feature .settings .requirements-status-notice{border-color:#e3e600;border-color:var(--ep-dashboard-status-warning)}.feature-requirements-status-0.ep-feature .postbox .hndle .settings-button:after{background-color:transparent;border:1px solid #6aa000;border:1px solid var(--ep-dashboard-status-ok)}.feature-requirements-status-0.ep-feature.feature-active .postbox .hndle .settings-button:after{background-color:#6aa000;background-color:var(--ep-dashboard-status-ok)}.feature-requirements-status-0.ep-feature .settings .requirements-status-notice{border-color:#6aa000;border-color:var(--ep-dashboard-status-ok)}.ep-feature{margin-bottom:20px;position:relative;vertical-align:top}.ep-feature.saving .action-wrap:before{-webkit-animation:load8 1.1s linear infinite;animation:load8 1.1s linear infinite;border-bottom:5px solid #ccc;border-left:5px solid #999;border-radius:50%;border-right:5px solid #ccc;border-top:5px solid #ccc;content:" ";display:inline-block;font-size:7px;height:8px;margin-right:1.4em;position:relative;text-indent:-9999em;top:4px;-webkit-transform:translateZ(0);transform:translateZ(0);vertical-align:middle;width:8px}.ep-feature .description,.ep-feature .settings{margin-bottom:0;text-align:left}.ep-feature .settings{display:none;overflow:auto}.ep-feature .settings h3{font-size:inherit;font-weight:700;margin-top:0}.ep-feature.show-settings .settings{display:block}.ep-feature.show-settings .description{display:none}.ep-feature.show-settings .settings-button:before{content:"\f142"}.ep-feature .settings .requirements-status-notice{background-color:#efefef;border-left:4px solid #6aa000;border-left:4px solid var(--ep-dashboard-status-ok);margin-bottom:10px;padding:8px 9pt}.ep-feature .settings .requirements-status-notice.requirements-status-notice--reindex{border-color:#e3e600;border-color:var(--ep-dashboard-status-warning);display:none}.ep-feature .settings .requirements-status-notice.requirements-status-notice--syncing{border-color:red;border-color:var(--ep-dashboard-status-error);display:none}.ep-feature .settings .action-wrap{clear:both;padding-top:15px;text-align:right;vertical-align:middle}.ep-feature .settings .action-wrap a{cursor:pointer;display:inline-block}.ep-feature .settings .action-wrap .no-dash-sync{color:#aaa;display:none;line-height:27px;padding-right:8px}.ep-feature .settings .action-wrap a.disabled{cursor:default}.ep-feature .settings .action-wrap .cancel{margin-right:6px;margin-top:4px}.ep-feature.dash-sync-disabled .settings .action-wrap .no-dash-sync{display:inline}.ep-feature .settings .field{clear:both;overflow:visible;overflow:initial;padding-top:15px}.ep-feature .settings .field:first-child{padding-top:0}.ep-feature .settings .field label{display:inline-block;margin:.25em 0 .5em}.ep-feature .settings .field .field-name,.ep-feature .settings .field>label{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;float:left;padding-right:1.5em;width:25%}.ep-feature .settings .field .input-wrap{display:block;float:right;padding-top:5px;width:75%}.ep-feature .settings .field .field-description{color:#666;font-style:italic;margin-bottom:0;margin-top:4px}.ep-feature .settings .field .disabled{color:#bbb}.ep-feature .settings .field .disabled input{cursor:default}.ep-feature .settings .field .components-form-token-field{padding-top:0}.ep-feature .settings .field .components-form-token-field__label{margin-top:0}.ep-feature .settings .field .components-form-token-field__input-container{border-color:#8c8f94}.ep-feature .long{display:none}.ep-feature .long p:last-child{margin-bottom:0}.ep-feature.show-full .long{display:block}.ep-feature.show-full .learn-more{display:none}.ep-feature .learn-more:after{content:"\f140";font-family:dashicons;font-size:1.5em;line-height:1;position:relative;top:-.07em;vertical-align:middle}.ep-feature .collapse:after{content:"\f142";font-family:dashicons;font-size:1.5em;line-height:1;position:relative;top:-.07em;vertical-align:middle}.intro h2{line-height:1.2;padding:9px 0 4px 0}.intro h1{color:#626262;font-weight:600;margin:.5em 0 2em;text-align:center}.intro-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;justify-content:center;position:relative;text-align:center}@media (min-width:880px){.intro-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media (min-width:1270px){.intro-container{margin-left:10%;margin-right:10%}}.intro-container h2{color:#626262;height:8%}.intro-container p{margin-left:auto;margin-right:auto;max-width:300px}.ep-feature-list{display:inline-block;margin:0;text-align:left;vertical-align:top}.ep-feature-list li{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin:4px 3px}.ep-feature-list .a11y-tip__help--top[role=tooltip]{font-size:inherit}.ep-feature-info{-webkit-text-decoration:none;text-decoration:none}.ep-feature-info .dashicons{font-size:14px;position:relative;top:2px}.intro-box{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2;margin-bottom:2em}.intro-container-success{-webkit-box-pack:center;-ms-flex-pack:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:center;text-align:center}.intro-container-success p{margin-top:23px;padding:0 35% 0 35%}@media (max-width:880px){.intro-container-success p{margin-top:23px;padding:0 26%}}.ep-config-success span{font-size:6em;padding-right:75px}.setup-complete{font-size:2em;margin-top:0;padding-top:0;width:100%}.setup-complete h2{margin-top:0;padding-top:0}@media (min-width:880px){.ep-copy-text{padding:0 9% 0 9%}}.ep-copy-text a{font-weight:700}.ep-circle{background:#fff;border-radius:50%;color:#626262;display:inline-block;font-size:1pc;font-weight:400;height:6em;line-height:2.8em;margin:0 1em;text-align:center;width:6em}.ep-circle p{border:0;font-size:50px;font-weight:700;line-height:.5em;margin:0}@media (min-width:880px){.ep-circle--first:after{background:#d4d4d4;content:"";height:.2em;left:50%;position:absolute;top:2.9em;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:75%;z-index:-1}}.ep-circle--active{background-color:#d73c38;color:#fff}.wrap.intro{margin-bottom:30px;margin-top:30px;overflow:auto}.wrap.intro .error,.wrap.intro .is-dismissible,.wrap.intro .notice,.wrap.intro .updated{display:none!important}.features-screenshot{display:none}.setup-message{clear:both;text-align:center}.setup-button{-webkit-appearance:none;background-color:#e63e3b;border:none;border-radius:10px;-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.25);box-shadow:1px 1px 3px 1px rgba(0,0,0,.25);color:#fff;display:inline-block;margin:0 .75em;padding:1em 1.5em;-webkit-text-decoration:none;text-decoration:none}.setup-button:hover{background-color:#b93431;color:#ffe8ed}.setup-message .setup-button-primary{background-color:#fff;color:#d84440}.ep-feature-search .wp-color-result.button{margin-bottom:10px}.ep-feature.ep-feature-search .settings .wp-picker-input-wrap>label{margin-right:10px;margin-top:0}.ep-feature.ep-feature-search .settings.wp-picker-input-wrap label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.ep-feature.ep-feature-search .settings .wp-picker-open+.wp-picker-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@media (min-width:880px){.intro .left{float:left;width:30%}.features-screenshot{display:block;float:right;height:auto;margin:0 auto;max-width:750pt;width:70%}.ep-features .left{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;float:left;padding-right:10px;width:50%}.ep-features .right{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;float:right;padding-left:10px;width:50%}.ep-feature .feature-message{display:inline-block;float:left;padding:0;padding-top:.5em;vertical-align:middle}}.wrap h2.nav-tab-wrapper.ep-credentials-tabs{border-bottom:1px solid #ccc}.ep-credentials input[type=text]{min-width:250px}h2 .nav-tab.ep-credentials-tab{cursor:pointer;margin-bottom:-1px}.ep-credentials-tab.nav-tab-active{border-bottom-color:#f1f1f1}.ep-credentials-tab img,.ep-credentials-tab span{display:inline-block;vertical-align:middle}.ep-credentials fieldset{border-bottom:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;margin:0;padding:0 1rem}.ep-credentials fieldset.predefined{border-top:1px solid #ccc}.ep-settings .ep-credentials-general{padding:0 1rem}.ep-settings .button-primary{margin:0 1rem}.ep-settings .description{font-size:.75rem;font-style:italic}@media (min-width:880px){.ep-credentials{display:inline-block}.ep-credentials .form-table{width:auto}.ep-credentials .form-table td,.ep-credentials-general .form-table td{padding-left:0}.ep-credentials .form-table td input,.ep-credentials .form-table td select,.ep-credentials-general .form-table td input,.ep-credentials-general .form-table td select{width:250px}}.ep-flex-container{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.ep-flex-container-nowrap{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.stats-list{margin-right:0;width:100%}@media (min-width:1270px){.stats-list{background-color:#fff;margin-right:28px;width:37%}}.stats-queries{background-color:#fff;width:100%}@media (min-width:1270px){.stats-queries{width:60%}}.stats-list-th span:last-of-type{border-radius:4px;color:inherit;cursor:pointer;display:inline-block;float:right;font-size:13px;margin-top:-4px;padding:4px 7px;padding-left:23px;position:relative}.status-circle{float:right;text-transform:capitalize}.status-circle:after{border-radius:50%;content:" ";display:inline-block;height:8px;margin-left:10px;margin-top:-2px;vertical-align:middle;width:8px}.green-status{color:#6aa000;color:var(--ep-dashboard-status-ok)}.yellow-status{color:#e3e600;color:var(--ep-dashboard-status-warning)}.red-status{color:red;color:var(--ep-dashboard-status-error)}.green-status:after{background-color:#6aa000;background-color:var(--ep-dashboard-status-ok)}.yellow-status:after{background-color:#e3e600;background-color:var(--ep-dashboard-status-warning)}.red-status:after{background-color:red;background-color:var(--ep-dashboard-status-error)}.doc-chart{margin-right:0;width:100%}@media (min-width:880px){.doc-chart{margin-right:24px;width:48%}}@media (min-width:1270px){.doc-chart{margin-right:28px;width:50%}}.ep-qchart-container{margin:0 auto;width:90%}@media (min-width:880px){.ep-qchart-container{width:48%}}@media (min-width:1270px){.ep-qchart-container{margin:0 auto;width:50%}}.inside-totals{padding:0 9pt 9pt}.ep-totals{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%}@media (min-width:880px){.ep-totals{width:48%}}@media (min-width:1270px){.ep-totals{width:47%}}.ep-totals .ep-flex-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;-ms-flex-direction:column;flex-direction:column;justify-content:center;margin-bottom:auto;margin-top:auto}@media (min-width:1270px){.ep-totals .ep-flex-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.ep-totals-column{-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;width:100%}@media (min-width:1270px){.ep-totals-column{width:50%}}p.ep-totals-title{font-weight:bolder;margin-top:28px}p.ep-totals-data{font-size:3em;margin-top:22px}.feature-epio-logo{margin-left:5px;vertical-align:middle} diff --git a/dist/css/facets-styles.asset.php b/dist/css/facets-styles.asset.php new file mode 100644 index 0000000000..a9b556de15 --- /dev/null +++ b/dist/css/facets-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '7d568203f3965dc85d8a'); diff --git a/dist/css/facets-styles.css b/dist/css/facets-styles.css new file mode 100644 index 0000000000..22126c9688 --- /dev/null +++ b/dist/css/facets-styles.css @@ -0,0 +1 @@ +:root{--ep-range-slider-background-color:#fff;--ep-range-slider-track-color:#eee}@media (min-width:768px){:root{--ep-range-slider-thumb-size:1.25em;--ep-range-slider-track-size:0.5em}}.widget_ep-facet input[type=search],.wp-block-elasticpress-facet input[type=search]{margin-bottom:1rem}.widget_ep-facet .searchable .inner,.wp-block-elasticpress-facet .searchable .inner{max-height:20em;overflow:scroll}.widget_ep-facet .term.hide,.wp-block-elasticpress-facet .term.hide{display:none}.widget_ep-facet .empty-term,.wp-block-elasticpress-facet .empty-term{opacity:.5;position:relative}.widget_ep-facet .empty-term:after,.wp-block-elasticpress-facet .empty-term:after{bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0;width:100%;z-index:2}.widget_ep-facet .level-1,.wp-block-elasticpress-facet .level-1{padding-left:20px}.widget_ep-facet .level-2,.wp-block-elasticpress-facet .level-2{padding-left:40px}.widget_ep-facet .level-3,.wp-block-elasticpress-facet .level-3{padding-left:60px}.widget_ep-facet .level-4,.wp-block-elasticpress-facet .level-4{padding-left:5pc}.widget_ep-facet .level-5,.wp-block-elasticpress-facet .level-5{padding-left:75pt}.widget_ep-facet input[disabled],.wp-block-elasticpress-facet input[disabled]{cursor:pointer;opacity:1}.widget_ep-facet .term a,.wp-block-elasticpress-facet .term a{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.widget_ep-facet .term a:hover .ep-checkbox,.wp-block-elasticpress-facet .term a:hover .ep-checkbox{background-color:#ccc}.ep-checkbox{-webkit-box-align:center;-ms-flex-align:center;-ms-flex-negative:0;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#eee;display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:1em;justify-content:center;margin-right:.25em;width:1em}.ep-checkbox:after{border:solid #fff;border-width:0 .125em .125em 0;content:"";display:none;height:.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:.25em}.ep-checkbox.checked{background-color:#5e5e5e}.ep-checkbox.checked:after{display:block}.ep-range-facet{-webkit-box-align:center;-ms-flex-align:center;-ms-grid-columns:1fr -webkit-max-content;-ms-grid-columns:1fr max-content;align-items:center;display:-ms-grid;display:grid;grid-template-columns:1fr -webkit-max-content;grid-template-columns:1fr max-content}.ep-range-facet__slider{grid-column:1/-1}.ep-range-facet__actions{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end}.ep-range-slider{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin:.5em 0;min-height:var(--ep-range-slider-thumb-size)}.ep-range-slider__track{background:#eee;background:var(--ep-range-slider-track-color);border-radius:calc(var(--ep-range-slider-track-size)/2);height:var(--ep-range-slider-track-size)}.ep-range-slider__track-1{background-color:currentcolor}.ep-range-slider__thumb{background-color:currentcolor;border-radius:calc(var(--ep-range-slider-thumb-size)/2);-webkit-box-shadow:inset 0 0 0 calc(var(--ep-range-slider-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-range-slider-thumb-size) - var(--ep-range-slider-track-size))/2) #fff;box-shadow:inset 0 0 0 calc(var(--ep-range-slider-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-range-slider-thumb-size) - var(--ep-range-slider-track-size))/2) #fff;-webkit-box-shadow:inset 0 0 0 calc(var(--ep-range-slider-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-range-slider-thumb-size) - var(--ep-range-slider-track-size))/2) var(--ep-range-slider-background-color);box-shadow:inset 0 0 0 calc(var(--ep-range-slider-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-range-slider-thumb-size) - var(--ep-range-slider-track-size))/2) var(--ep-range-slider-background-color);height:var(--ep-range-slider-thumb-size);width:var(--ep-range-slider-thumb-size)}.ep-facet-date-option label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.ep-facet-date-option label .ep-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #eee;border-radius:50%;height:1em;margin-right:.25em;outline:transparent;position:relative;width:1em}.ep-facet-date-option label .ep-radio:checked{background-color:transparent;border:5px solid #5e5e5e}.ep-facet-date-option label .ep-radio:checked:after{opacity:0}.ep-date-range-picker{grid-column-gap:1rem;-ms-grid-columns:1fr 1fr;-webkit-column-gap:1rem;-moz-column-gap:1rem;column-gap:1rem;display:-ms-grid;display:grid;grid-template-columns:1fr 1fr;margin-top:1rem}.ep-date-range-picker.is-hidden{display:none}.ep-date-range-picker label{margin-right:.5rem}.ep-date-range-picker__from,.ep-date-range-picker__to{-webkit-box-align:baseline;-ms-flex-align:baseline;-ms-grid-columns:-webkit-max-content 1fr;-ms-grid-columns:max-content 1fr;align-items:baseline;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr}.ep-date-range-picker__action{grid-column:1/-1;text-align:right}.ep-facet-date-form__action{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:1.5rem;margin-top:.75rem} diff --git a/dist/css/features-script.css b/dist/css/features-script.css new file mode 100644 index 0000000000..297bfba291 --- /dev/null +++ b/dist/css/features-script.css @@ -0,0 +1,2 @@ +.ep-settings-page__wrap{margin-left:auto;margin-right:auto;max-width:50pc}.ep-settings-page__snackbar-list{bottom:40px;left:0;padding:0 1pc;position:fixed}@media (min-width:600px){.ep-settings-page__snackbar-list{left:auto;padding:0}} +.ep-dashboard-panel{margin-bottom:1pc}.ep-dashboard-panel .components-notice{margin:0 0 1pc 0}.ep-dashboard-panel .components-notice__actions{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.ep-dashboard-panel .components-checkbox-control:has([disabled]) .components-checkbox-control__label,.ep-dashboard-panel .components-checkbox-control:has([disabled]) input[disabled]{opacity:.5}.ep-dashboard-tabs{grid-gap:40px;-ms-grid-columns:-webkit-max-content auto;-ms-grid-columns:max-content auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto}.ep-dashboard-tabs .components-tab-panel__tab-content{padding-top:14px}.ep-dashboard-tabs .components-tab-panel__tab-content .components-notice{margin:1pc 0}.ep-dashboard-tabs .components-tab-panel__tabs-item{-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:400;text-align:left}.ep-dashboard-tabs .components-tab-panel__tabs-item.is-active{background:#f0f0f0;font-weight:500}.ep-dashboard-tabs .components-tab-panel__tabs-item.is-active:after{content:none}.ep-dashboard-tabs .components-tab-panel__tabs-item:focus:not(:disabled){-webkit-box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:var(--wp-admin-border-width-focus) solid transparent}@media (max-width:782px){.ep-dashboard-tabs{-ms-grid-columns:1fr;gap:0;grid-template-columns:1fr}.ep-dashboard-tabs .components-tab-panel__tabs{margin-left:-1pc;margin-right:-1pc}}.ep-feature-tab{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-orient:vertical;-webkit-box-direction:normal;align-items:start;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px}.ep-feature-tab__status{color:#757575;display:block;font-size:9pt;font-weight:400;width:100%}.ep-dashboard-control{margin-bottom:24px;margin-top:24px}.ep-dashboard-control .components-base-control__help code{font-size:inherit}.ep-dashboard-heading{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;justify-content:space-between;min-height:20px} diff --git a/dist/css/highlighting-styles.asset.php b/dist/css/highlighting-styles.asset.php new file mode 100644 index 0000000000..02601f713f --- /dev/null +++ b/dist/css/highlighting-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '252562c4ed9241547293'); diff --git a/dist/css/highlighting-styles.css b/dist/css/highlighting-styles.css new file mode 100644 index 0000000000..9a18e84516 --- /dev/null +++ b/dist/css/highlighting-styles.css @@ -0,0 +1 @@ +.ep-highlight{background-color:transparent;font-style:italic;font-weight:700} diff --git a/dist/css/instant-results-styles.asset.php b/dist/css/instant-results-styles.asset.php new file mode 100644 index 0000000000..8767e4edec --- /dev/null +++ b/dist/css/instant-results-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'd4054d812d7f295f13b2'); diff --git a/dist/css/instant-results-styles.css b/dist/css/instant-results-styles.css new file mode 100644 index 0000000000..7b5c94cd55 --- /dev/null +++ b/dist/css/instant-results-styles.css @@ -0,0 +1 @@ +.ep-search-reset-button{font:inherit!important;height:auto!important;letter-spacing:inherit!important;line-height:1!important;margin:0!important;padding:0!important;text-align:inherit!important;text-transform:inherit!important;width:auto!important}.ep-search-reset-button,.ep-search-reset-button:focus,.ep-search-reset-button:hover{background:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;color:inherit!important;cursor:default!important}.ep-search-reset-button:focus{outline:medium auto Highlight!important;outline:medium auto -webkit-focus-ring-color!important;outline-offset:0!important}.ep-search-small-button{font-size:.875em!important;height:auto!important;line-height:1!important;padding:.5em!important}.ep-search-icon-button{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between}.ep-search-icon-button svg{fill:currentcolor;-ms-flex-negative:0;flex-shrink:0;height:1em;width:1em}.ep-search-checkbox__count:before{content:"("}.ep-search-checkbox__count:after{content:")"}.ep-search-input{margin:0!important}.ep-search-input{font-size:1.25em;width:100%}.has-ep-search-modal{overflow:hidden}.ep-search-modal{--ep-search-modal-focus-within:0;background-color:rgba(43,46,56,.9);bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;left:0;position:fixed;right:0;top:0;z-index:9999}.rtl .ep-search-modal{direction:rtl;text-align:right}.admin-bar .ep-search-modal{top:2pc}@media (max-width:782px){.admin-bar .ep-search-modal{top:46px}}.ep-search-modal[aria-hidden=true]{display:none}.ep-search-modal:focus-within{--ep-search-modal-focus-within:1}.ep-search-modal__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:#fff;background-color:var(--ep-search-background-color);bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:0;position:absolute;right:0;top:0}@media (min-width:768px){.ep-search-modal__content{bottom:1em;margin:0 auto;max-width:calc(100% - 2em);top:1em;width:80em}}.ep-search-modal__close{padding:1em!important}.ep-search-modal__close{-ms-flex-item-align:end;align-self:flex-end}.ep-search-options-list{list-style:none;margin:0;padding:0}.ep-search-options-list__item{margin:.5em 0}.ep-search-options-list__item:before{content:none}.ep-search-options-list__sub-menu{padding-left:1em}.ep-search-page{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:2;-ms-flex-positive:2;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:2;margin:0;overflow-y:auto;-webkit-transition:opacity .3s ease-out;transition:opacity .3s ease-out;width:100%}@media (min-width:768px){.ep-search-page{overflow:hidden}}.ep-search-page *,.ep-search-page :after,.ep-search-page :before{-webkit-box-sizing:border-box;box-sizing:border-box}.ep-search-page.is-loading{opacity:.5}.ep-search-page__body,.ep-search-page__header,.ep-search-page__tools{padding:0 1em}@media (min-width:768px){.ep-search-page__body{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-flex:2;-ms-flex-positive:2;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:2;overflow:hidden}}.ep-search-panel{border:1px solid #dfdfdf;border:1px solid var(--ep-search-border-color);margin:0;padding:0}.ep-search-panel+.ep-search-panel{border-top-width:0}.ep-search-panel__heading{font-size:inherit;margin:0}.ep-search-panel__button{padding:1em!important;width:100%!important}.ep-search-panel__content{padding:0 1em 1em 1em}.ep-search-panel__content[aria-hidden=true]{display:none}.ep-search-pagination{-webkit-box-align:center;-ms-flex-align:center;-ms-grid-columns:1fr 1fr 1fr;align-items:center;display:-ms-grid;display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:auto;text-align:center}.rtl .ep-search-pagination{direction:rtl}.ep-search-pagination__next{-ms-grid-column-align:end;justify-self:end}.ep-search-pagination__previous{-ms-grid-column-align:start;justify-self:start}.ep-search-pagination-button[disabled]{visibility:hidden}.ep-search-range-slider{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin:.5em 0;min-height:1.625em;min-height:var(--ep-search-range-thumb-size)}.ep-search-range-slider__track{background:#efefef;background:var(--ep-search-alternate-background-color);border-radius:.375em;border-radius:calc(var(--ep-search-range-track-size)/2);height:.75em;height:var(--ep-search-range-track-size)}.ep-search-range-slider__track-1{background-color:currentcolor}.ep-search-range-slider__thumb{background-color:currentcolor;border-radius:.8125em;border-radius:calc(var(--ep-search-range-thumb-size)/2);-webkit-box-shadow:inset 0 0 0 .1625em currentcolor,inset 0 0 0 .4375em #fff;box-shadow:inset 0 0 0 .1625em currentcolor,inset 0 0 0 .4375em #fff;-webkit-box-shadow:inset 0 0 0 calc(var(--ep-search-range-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-search-range-thumb-size) - var(--ep-search-range-track-size))/2) var(--ep-search-background-color);box-shadow:inset 0 0 0 calc(var(--ep-search-range-thumb-size)/10) currentcolor,inset 0 0 0 calc((var(--ep-search-range-thumb-size) - var(--ep-search-range-track-size))/2) var(--ep-search-background-color);height:1.625em;height:var(--ep-search-range-thumb-size);width:1.625em;width:var(--ep-search-range-thumb-size)}.ep-search-result{-webkit-box-align:start;-ms-flex-align:start;grid-gap:.5em;-ms-grid-rows:auto .5em 1fr;align-items:flex-start;display:-ms-grid;display:grid;grid-template-areas:"header" "footer";grid-template-rows:auto 1fr}@media (min-width:768px){.ep-search-result{grid-gap:1em;-ms-grid-rows:auto 1em auto 1em 1fr;grid-template-areas:"header" "description" "footer";grid-template-rows:auto auto 1fr}}.ep-search-result--has-thumbnail{-ms-grid-columns:min(300px,34%) auto;grid-template-areas:"thumbnail header" "thumbnail footer";grid-template-columns:min(300px,34%) auto}@media (min-width:768px){.ep-search-result--has-thumbnail{grid-template-areas:"thumbnail header" "thumbnail description" "thumbnail footer"}}.ep-search-result__thumbnail{-ms-grid-row-span:2;display:block;grid-area:thumbnail;-ms-grid-column:1;-ms-grid-row:1}.ep-search-result__thumbnail img{display:block;height:auto;margin:0;width:100%}.ep-search-result__header{grid-gap:.5em;-ms-grid-columns:auto;display:-ms-grid;display:grid;grid-area:header;-ms-grid-column:1;-ms-grid-row:1;grid-template-columns:auto;justify-items:start}.ep-search-result--has-thumbnail>.ep-search-result__header{-ms-grid-column:2;-ms-grid-row:1}.ep-search-result__title{font-size:1em;margin:0}@media (min-width:768px){.ep-search-result__title{font-size:1.25em}}.ep-search-result__type{background-color:#efefef;background-color:var(--ep-search-alternate-background-color);border-radius:.25em;display:inline-block;font-size:.875em;line-height:1.5;padding:0 .25em;vertical-align:text-bottom}.ep-search-result__description{display:none;font-size:.875em;grid-area:description;margin:0}@media (min-width:768px){.ep-search-result__description{display:block;font-size:1em}}.ep-search-result__footer{grid-gap:.5em;display:-ms-grid;display:grid;grid-area:footer;-ms-grid-column:1;-ms-grid-row:3;justify-items:start}.ep-search-result--has-thumbnail>.ep-search-result__footer{-ms-grid-column:2;-ms-grid-row:2}@media (min-width:768px){.ep-search-result__thumbnail{-ms-grid-row-span:3;-ms-grid-column:1;-ms-grid-row:1}.ep-search-result__header{-ms-grid-column:1;-ms-grid-row:1}.ep-search-result--has-thumbnail>.ep-search-result__header{-ms-grid-column:2;-ms-grid-row:1}.ep-search-result__description{-ms-grid-column:1;-ms-grid-row:3}.ep-search-result__description{-ms-grid-column:2;-ms-grid-row:2}.ep-search-result__footer{-ms-grid-column:1;-ms-grid-row:5}.ep-search-result--has-thumbnail>.ep-search-result__footer{-ms-grid-column:2;-ms-grid-row:3}}.ep-search-results{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:2em;padding:0 0 1em 0;width:100%}@media (min-width:768px){.ep-search-results{height:100%;overflow-y:auto;padding:0 1em 1em 1em}}.ep-search-results__header{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:1em;justify-content:space-between}.ep-search-results__title{margin:0!important}.ep-search-results__title{font-size:1.25em}@media (min-width:768px){.ep-search-results__title{font-size:1.5em}}.ep-search-sidebar{display:none;margin-bottom:2em}.ep-search-sidebar.is-open{display:block}@media (min-width:768px){.ep-search-sidebar{display:block;max-height:calc(100% - 1em);min-width:25%;overflow-y:auto}}.ep-search-sidebar-toggle{width:100%}@media (min-width:768px){.ep-search-sidebar-toggle{display:none}}.ep-search-sort{-ms-flex-negative:0;flex-shrink:0;gap:.5em;margin:0}.ep-search-results .ep-search-sort{display:none}@media (min-width:768px){.ep-search-results .ep-search-sort{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}}.ep-search-sidebar .ep-search-sort{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-bottom:1em}@media (min-width:768px){.ep-search-sidebar .ep-search-sort{display:none}}.ep-search-toolbar .ep-search-tokens{display:contents}.ep-search-toolbar{-webkit-box-align:start;-ms-flex-align:start;align-items:start;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:.25em;margin:1em 0}@media (min-width:768px){.ep-search-toolbar{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}:root{--ep-search-background-color:#fff;--ep-search-alternate-background-color:#efefef;--ep-search-border-color:#dfdfdf;--ep-search-range-thumb-size:1.625em;--ep-search-range-track-size:0.75em}@media (min-width:768px){:root{--ep-search-range-thumb-size:1.25em;--ep-search-range-track-size:0.5em}} diff --git a/dist/css/ordering-styles.asset.php b/dist/css/ordering-styles.asset.php new file mode 100644 index 0000000000..bd0a617ae6 --- /dev/null +++ b/dist/css/ordering-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '7003d0cf98f8859c7fbe'); diff --git a/dist/css/ordering-styles.css b/dist/css/ordering-styles.css new file mode 100644 index 0000000000..fa5543f4f0 --- /dev/null +++ b/dist/css/ordering-styles.css @@ -0,0 +1 @@ +#ep-ordering{border-left-width:0;border-right-width:0}#ep-ordering .inside{background-color:#f1f1f1;margin:0;padding:0}#ep-ordering .loading,#ep-ordering .pointer-search,#ep-ordering .pointers{background-color:#fff;border-left:1px solid #eee;border-right:1px solid #eee}#ep-ordering .new-post{background:#fff;padding:0 1em}#ep-ordering .loading{padding:1em}#ep-ordering .loading .spinner{float:left;margin-left:0;margin-top:0}#ep-ordering .pointer-type{border:2px solid #0073aa;border-radius:2px;color:#0073aa;display:inline-block;font-size:.75em;font-weight:700;margin-right:8px;padding:1px 2px}#ep-ordering .pointers .pointer,#ep-ordering .pointers .post{padding:1em}#ep-ordering .pointers .pointer:nth-child(odd),#ep-ordering .pointers .post:nth-child(odd){background-color:#f9f9f9}#ep-ordering .pointers .title{color:#0073aa}#ep-ordering .pointers .pointer-actions{float:right}#ep-ordering .pointers .pointer-actions .handle{cursor:move}#ep-ordering .pointers .pointer-actions .delete-pointer{margin-left:10px}#ep-ordering .pointers .next-page-notice{background-color:#fdeeca;padding:1em 0;text-align:center}#ep-ordering .legend{background:#fff;border-bottom:1px solid #eee;padding:1em 0;text-align:center}#ep-ordering .legend-item{display:inline-block;font-size:.875em;font-style:italic;margin:0 .5em}#ep-ordering .pointer-search{margin-top:2em}#ep-ordering .pointer-search .no-results{padding:1em}#ep-ordering .pointer-search .section-title{border-bottom:1px solid #eee;border-top:1px solid #eee;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-weight:700}#ep-ordering .pointer-search .search-wrapper{padding:1em 0}#ep-ordering .pointer-search .input-wrap{padding:0 1em}#ep-ordering .pointer-search .search-pointers{font-size:18px;height:1.7em;line-height:100%;padding:3px 8px}#ep-ordering .pointer-search .pointer-results{padding:1em 0 0}#ep-ordering .pointer-search .pointer-result{padding:10px 2em}#ep-ordering .pointer-search .pointer-result .dashicons{float:right}#ep-ordering .pointer-search .pointer-result:hover{background-color:#f9f9f9}#ep-ordering .add-pointer,#ep-ordering .delete-pointer{cursor:pointer} diff --git a/dist/css/related-posts-block-styles.asset.php b/dist/css/related-posts-block-styles.asset.php new file mode 100644 index 0000000000..6f7c2b9c7e --- /dev/null +++ b/dist/css/related-posts-block-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '19b2ed20dbc243869cf4'); diff --git a/dist/css/related-posts-block-styles.css b/dist/css/related-posts-block-styles.css new file mode 100644 index 0000000000..7addbc46ae --- /dev/null +++ b/dist/css/related-posts-block-styles.css @@ -0,0 +1 @@ +.editor-styles-wrapper .wp-block-elasticpress-related-posts ul,.wp-block-elasticpress-related-posts ul{list-style-type:none;padding:0}.editor-styles-wrapper .wp-block-elasticpress-related-posts ul li a>div{display:inline} diff --git a/dist/css/status-report-script.css b/dist/css/status-report-script.css new file mode 100644 index 0000000000..44b5d36ffe --- /dev/null +++ b/dist/css/status-report-script.css @@ -0,0 +1,2 @@ +.ep-settings-page__wrap{margin-left:auto;margin-right:auto;max-width:50pc}.ep-settings-page__snackbar-list{bottom:40px;left:0;padding:0 1pc;position:fixed}@media (min-width:600px){.ep-settings-page__snackbar-list{left:auto;padding:0}} +.ep-status-report{margin-bottom:1pc}.ep-status-report .components-panel__header h2{font-size:14px}.ep-status-report .components-notice{margin:0}.ep-status-report table{table-layout:fixed}.ep-status-report table col:first-of-type{width:40%}.ep-status-report table td,.ep-status-report table th{line-height:1.5}.ep-status-report table small{display:block}.ep-status-report table pre{margin:0;overflow-x:scroll} diff --git a/dist/css/sync-script.css b/dist/css/sync-script.css new file mode 100644 index 0000000000..c34db5d82e --- /dev/null +++ b/dist/css/sync-script.css @@ -0,0 +1,2 @@ +.ep-settings-page__wrap{margin-left:auto;margin-right:auto;max-width:50pc}.ep-settings-page__snackbar-list{bottom:40px;left:0;padding:0 1pc;position:fixed}@media (min-width:600px){.ep-settings-page__snackbar-list{left:auto;padding:0}} +.ep-sync-advanced-control{margin-bottom:24px}fieldset.ep-sync-advanced-control{margin-bottom:1pc}.ep-sync-advanced-control.components-flex .components-flex-item{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2}.ep-sync-advanced-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:8px;padding:0;text-transform:uppercase}.ep-sync-controls{grid-gap:8px;-ms-grid-columns:-webkit-max-content -webkit-max-content auto;-ms-grid-columns:max-content max-content auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content -webkit-max-content auto;grid-template-columns:max-content max-content auto;margin-bottom:1pc}.ep-sync-controls .is-link{-ms-grid-column-align:end;grid-column:-1;justify-self:end}.ep-sync-log{margin:0 0 1pc 0}.ep-sync-messages{-ms-flex-line-pack:start;grid-gap:0 8px;-ms-grid-columns:-webkit-max-content auto;-ms-grid-columns:max-content auto;align-content:start;background:#1a1e24;background:var(--ep-sync-color-black);color:#fff;color:var(--ep-sync-color-white);display:-ms-grid;display:grid;font-family:monospace;gap:0 8px;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;height:21em;line-height:2;overflow-y:auto;padding:8px 1pc;white-space:pre-wrap}.ep-sync-messages__line-number{-webkit-box-sizing:content-box;box-sizing:content-box;min-width:3ch;opacity:.5;text-align:right}.ep-sync-panel .components-notice{margin-bottom:9pt;margin-left:0;margin-right:0}.ep-sync-panel .components-checkbox-control:has([disabled]) .components-checkbox-control__label,.ep-sync-panel .components-checkbox-control:has([disabled]) input[disabled]{opacity:.5}.ep-sync-panel__controls.is-opened{padding-bottom:4px}.ep-sync-panel__advanced.is-opened{padding-bottom:0}.ep-previous-sync{-webkit-box-align:center;-ms-flex-align:center;grid-column-gap:8px;-ms-grid-columns:-webkit-max-content 8px auto;-ms-grid-columns:max-content 8px auto;-webkit-box-pack:start;-ms-flex-pack:start;align-items:center;display:-ms-grid;display:grid;grid-template-areas:"icon title" ". help";grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;justify-content:start}.ep-previous-sync svg{display:block;grid-area:icon;-ms-grid-column:1;-ms-grid-row:1}.ep-previous-sync.is-success svg{fill:#4ab866;fill:var(--ep-sync-color-success)}.ep-previous-sync.is-error svg{fill:#cc1818;fill:var(--ep-sync-color-error)}.ep-previous-sync__title{grid-area:title;-ms-grid-column:3;-ms-grid-row:1}.ep-previous-sync__help{color:#757575;font-size:9pt;font-style:normal;grid-area:help;-ms-grid-column:3;-ms-grid-row:2}.ep-sync-progress-bar{background:#f0f0f0;background:var(--ep-sync-color-light-grey);display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;text-align:center}.ep-sync-progress-bar,.ep-sync-progress-bar__progress{border-radius:4px}.ep-sync-progress-bar__progress{background:var(--wp-admin-theme-color);color:#fff;color:var(--ep-sync-color-white);height:8px;padding:0 8px;-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out;white-space:nowrap}.ep-sync-progress-bar--complete .ep-sync-progress-bar__progress{background:#4ab866;background:var(--ep-sync-color-success)}.ep-sync-progress-bar--paused .ep-sync-progress-bar__progress{opacity:.5}.ep-sync-progress-bar--failed .ep-sync-progress-bar__progress{background:#cc1818;background:var(--ep-sync-color-error)}@-webkit-keyframes epSyncRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes epSyncRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ep-sync-progress{-webkit-box-align:start;-ms-flex-align:start;grid-column-gap:4px;grid-row-gap:1pc;-ms-grid-columns:-webkit-min-content auto;-ms-grid-columns:min-content auto;align-items:start;display:-ms-grid;display:grid;grid-template-columns:-webkit-min-content auto;grid-template-columns:min-content auto;margin-bottom:1pc}.ep-sync-progress svg{-webkit-animation:epSyncRotation 1.5s linear infinite;animation:epSyncRotation 1.5s linear infinite;-webkit-animation-play-state:paused;animation-play-state:paused;height:24px;width:24px}.ep-sync-progress--syncing svg{-webkit-animation-play-state:running;animation-play-state:running}.ep-sync-progress__details strong{display:block;line-height:24px}.ep-sync-progress__progress-bar{grid-column:1/-1}.ep-sync-history{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:1pc;list-style:none;margin-left:0}.ep-sync-history li{margin:0}:root{--ep-sync-color-black:#1a1e24;--ep-sync-color-error:#cc1818;--ep-sync-color-light-grey:#f0f0f0;--ep-sync-color-success:#4ab866;--ep-sync-color-warning:#ffb359;--ep-sync-color-white:#fff} diff --git a/dist/css/synonyms-styles.asset.php b/dist/css/synonyms-styles.asset.php new file mode 100644 index 0000000000..ae3482984c --- /dev/null +++ b/dist/css/synonyms-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'fade9c482d926456c06b'); diff --git a/dist/css/synonyms-styles.css b/dist/css/synonyms-styles.css new file mode 100644 index 0000000000..0ad97e83fe --- /dev/null +++ b/dist/css/synonyms-styles.css @@ -0,0 +1 @@ +:root{--ep-synonyms-input-border-color:#ccc;--ep-synonyms-color-black:#1a1e24;--ep-synonyms-color-error:#b52727}html.wp-toolbar{background:transparent}#synonym-root .page-title-action{margin-left:10px}#synonym-root .postbox .hndle{cursor:default}#synonym-root h2{color:#1a1e24;color:var(--ep-synonyms-color-black)}.synonym-editor .postbox{width:100%}.synonym-editor .postbox>.hndle{display:-webkit-box;display:-ms-flexbox;display:flex}.synonym-alternative-editor,.synonym-set-editor{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex}.synonym-alternative-editor .components-form-token-field,.synonym-set-editor .components-form-token-field{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-bottom:.5em}.synonym-alternative-editor .components-form-token-field__label,.synonym-set-editor .components-form-token-field__label{display:none}.synonym-alternative-editor .components-form-token-field__input-container,.synonym-set-editor .components-form-token-field__input-container{border-color:#ccc;border-color:var(--ep-synonyms-input-border-color);-webkit-box-sizing:border-box;box-sizing:border-box}.synonym-alternative-editor .components-form-token-field__token-text,.synonym-set-editor .components-form-token-field__token-text{padding-bottom:1px;padding-top:1px}@media screen and (max-width:782px){.synonym-alternative-editor .components-form-token-field__token-text,.synonym-set-editor .components-form-token-field__token-text{padding-bottom:3px;padding-top:3px}}.synonym-alternative-editor input.components-form-token-field__input[type=text],.synonym-set-editor input.components-form-token-field__input[type=text]{margin-bottom:2px;margin-top:2px}@media screen and (max-width:782px){.synonym-alternative-editor input.components-form-token-field__input[type=text],.synonym-set-editor input.components-form-token-field__input[type=text]{min-height:30px}}.synonym-alternative-editor .components-form-token-field__help,.synonym-set-editor .components-form-token-field__help{margin-top:0}input[type=text].ep-synonyms__input{border:1px solid #ccc;border:1px solid var(--ep-synonyms-input-border-color);margin-bottom:.5em;margin-right:1em;min-height:36px;width:10em}@media screen and (max-width:782px){input[type=text].ep-synonyms__input{min-height:40px}}.synonym-alternatives__primary-heading{width:11em}.synonym-alternatives__input-heading{-webkit-box-flex:1;-ms-flex:1;flex:1}button.synonym__remove{background-color:transparent;border:none;color:#b52727;color:var(--ep-synonyms-color-error);cursor:pointer;margin:0 0 0 10px;min-height:36px;padding:0}@media screen and (max-width:782px){button.synonym__remove{min-height:40px}}button.synonym__remove .dashicons-dismiss{margin:-2px 2px 0 0}.synonym__validation:before{-ms-flex-preferred-size:100%;content:"";flex-basis:100%;height:0}.synonym-solr-editor__validation p,.synonym__validation{color:#b52727;color:var(--ep-synonyms-color-error);font-style:italic}.synonym__validation{margin:0 0 .625em .5em}.synonym-btn-group button.button{margin-right:.625em} diff --git a/dist/css/weighting-script.css b/dist/css/weighting-script.css new file mode 100644 index 0000000000..948d845ca3 --- /dev/null +++ b/dist/css/weighting-script.css @@ -0,0 +1,2 @@ +.ep-settings-page__wrap{margin-left:auto;margin-right:auto;max-width:50pc}.ep-settings-page__snackbar-list{bottom:40px;left:0;padding:0 1pc;position:fixed}@media (min-width:600px){.ep-settings-page__snackbar-list{left:auto;padding:0}} +.ep-weighting-action[disabled]{visibility:hidden}.ep-weighting-add-new{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:start;-ms-flex-pack:start;align-items:start;gap:4px;justify-content:start;margin-top:1pc;max-width:100%;width:50ch}.ep-weighting-add-new .components-base-control .components-text-control__input{min-height:36px}.ep-weighting-add-new .components-button{margin-top:23.4px}.ep-weighting-field{-webkit-box-align:center;-ms-flex-align:center;grid-gap:1em;-ms-grid-columns:min(20%,30ch) -webkit-max-content auto -webkit-max-content;-ms-grid-columns:min(20%,30ch) max-content auto max-content;align-items:center;display:-ms-grid;display:grid;grid-template-columns:min(20%,30ch) -webkit-max-content auto -webkit-max-content;grid-template-columns:min(20%,30ch) max-content auto max-content;width:100%}.ep-weighting-field .components-base-control__field{margin-bottom:0}.ep-weighting-field .components-checkbox-control .components-base-control__field{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.ep-weighting-field .components-range-control .components-base-control__field{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.ep-weighting-field .components-range-control .components-base-control__label{font-size:inherit;font-weight:inherit;margin-bottom:0;text-transform:inherit}@media (max-width:600px){.ep-weighting-field{-ms-grid-columns:1fr 1fr 1fr -webkit-max-content;-ms-grid-columns:1fr 1fr 1fr max-content;grid-template-columns:1fr 1fr 1fr -webkit-max-content;grid-template-columns:1fr 1fr 1fr max-content}.ep-weighting-field .ep-weighting-field__weighting{-webkit-box-pack:end;-ms-flex-pack:end;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:end}.ep-weighting-field .ep-weighting-field__weighting .components-range-control__wrapper{display:none}}.ep-weighting-field fieldset{display:contents}.ep-weighting-field__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-weighting-field__name h2{font-size:1rem}.ep-weighting-field__undo{-ms-grid-column-align:end;-ms-grid-column:4;grid-column-start:4;justify-self:end}.ep-weighting-post-type{margin-bottom:1pc}.ep-weighting-post-type .components-panel__header h2{font-size:14px}.ep-weighting-post-type .components-toggle-control__label{max-width:none}.ep-weighting-post-type .components-base-control__help{margin-bottom:0}.ep-weighting-post-type .components-notice{margin-left:0;margin-right:0}.ep-weighting-post-type .components-notice__dismiss{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.ep-weighting-post-type .components-button{vertical-align:top} diff --git a/dist/css/woocommerce-order-search-styles.asset.php b/dist/css/woocommerce-order-search-styles.asset.php new file mode 100644 index 0000000000..db47a3eccc --- /dev/null +++ b/dist/css/woocommerce-order-search-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '700d95b4d0f48780a6d4'); diff --git a/dist/css/woocommerce-order-search-styles.css b/dist/css/woocommerce-order-search-styles.css new file mode 100644 index 0000000000..f5557ab02a --- /dev/null +++ b/dist/css/woocommerce-order-search-styles.css @@ -0,0 +1 @@ +:root{--ep-combobox-list-background:#fff;--ep-combobox-list-background-selected:#f5f5f5;--ep-combobox-list-border:#8c8f94}.ep-combobox{display:contents}.ep-combobox__list{background-color:#fff;background-color:var(--ep-combobox-list-background);border:1px solid #8c8f94;border:1px solid var(--ep-combobox-list-border);border-radius:4px;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.05);box-shadow:0 2px 6px rgba(0,0,0,.05);-webkit-box-sizing:border-box;box-sizing:border-box;display:none;margin:4px 0 0;overflow:hidden;padding:4px;position:absolute;top:100%;width:100%;z-index:1}.ep-combobox__input[aria-expanded=true]~.ep-combobox__list{display:block}.ep-combobox__option{border:var(--wp-admin-border-width-focus) solid transparent;border-radius:4px;margin:0;padding:6px}.ep-combobox__option:hover{background-color:#f5f5f5;background-color:var(--ep-combobox-list-background-selected);cursor:pointer}.ep-combobox__option[aria-selected=true]{border-color:var(--wp-admin-theme-color)}.ep-suggestion{font-size:smaller}.ep-suggestion__header{margin-bottom:1ch}.ep-suggestion__title{display:block;font-size:small;font-weight:600}[aria-selected=true] .ep-suggestion__title{color:var(--wp-admin-theme-color)}.ep-suggestion__footer{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between}.ep-suggestion__footer .order-status{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0}#posts-filter .search-box,#wc-orders-filter .search-box{position:relative}#ep-woocommerce-order-search{display:contents} diff --git a/dist/js/admin-script.asset.php b/dist/js/admin-script.asset.php new file mode 100644 index 0000000000..51a6d81ca0 --- /dev/null +++ b/dist/js/admin-script.asset.php @@ -0,0 +1 @@ + array('wp-dom-ready'), 'version' => 'f0e65db25600e12c518a'); diff --git a/dist/js/admin-script.js b/dist/js/admin-script.js new file mode 100644 index 0000000000..25d99fa539 --- /dev/null +++ b/dist/js/admin-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}},n=window.wp.domReady;e.n(n)()((()=>{const e=document.getElementById("ep-wp-header-end"),n=document.querySelectorAll("div.update-nag");for(const t of n)e.after(t)}))}(); \ No newline at end of file diff --git a/dist/js/autosuggest-script.asset.php b/dist/js/autosuggest-script.asset.php new file mode 100644 index 0000000000..b5e4e32c74 --- /dev/null +++ b/dist/js/autosuggest-script.asset.php @@ -0,0 +1 @@ + array('wp-hooks'), 'version' => '7ee9db0afcd0a43ed4e1'); diff --git a/dist/js/autosuggest-script.js b/dist/js/autosuggest-script.js new file mode 100644 index 0000000000..96c573bf8f --- /dev/null +++ b/dist/js/autosuggest-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e=window.wp.hooks;window.addEventListener("load",(()=>{"undefined"!==typeof window.epDataFilter&&(0,e.addFilter)("ep.Autosuggest.data","ep/epDatafilter",window.epDatafilter),"undefined"!==typeof window.epAutosuggestItemHTMLFilter&&(0,e.addFilter)("ep.Autosuggest.itemHTML","ep/epAutosuggestItemHTMLFilter",window.epAutosuggestItemHTMLFilter),"undefined"!==typeof window.epAutosuggestListItemsHTMLFilter&&(0,e.addFilter)("ep.Autosuggest.listHTML","ep/epAutosuggestListItemsHTMLFilter",window.epAutosuggestListItemsHTMLFilter),"undefined"!==typeof window.epAutosuggestQueryFilter&&(0,e.addFilter)("ep.Autosuggest.query","ep/epAutosuggestQueryFilter",window.epAutosuggestQueryFilter),"undefined"!==typeof window.epAutosuggestElementFilter&&(0,e.addFilter)("ep.Autosuggest.element","ep/epAutosuggestElementFilter",window.epAutosuggestElementFilter)}));var t={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let s;const o=new Uint8Array(16);function n(){if(!s&&(s="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!s))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return s(o)}const r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));function i(e,t=0){return r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]}var a=function(e,s,o){if(t.randomUUID&&!s&&!e)return t.randomUUID();const r=(e=e||{}).random||(e.rng||n)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,s){o=o||0;for(let e=0;e<16;++e)s[o+e]=r[e];return s}return i(r)};const u=(e,t)=>{let s=null;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout((()=>{e.apply(n,o)}),t)}},c=(e,t,s)=>e.replace(new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t),"g"),s),l=e=>e.replace(/\\([\s\S])|(")/g,"""),d=(e,t)=>{for(;(e=e.parentElement)&&!e.classList.contains(t););return e},p=t=>{const s=a().replaceAll("-","");return(0,e.applyFilters)("ep.requestId",t+s)},{epas:g}=window;function f(e,t){t.setAttribute("aria-activedescendant",e)}function h(e,t){!function(e){const t=new CustomEvent("ep-autosuggest-click",{detail:e});if(window.dispatchEvent(t),e.searchTerm&&1===parseInt(g.triggerAnalytics,10)&&"function"===typeof gtag){const t=`click - ${e.searchTerm}`;gtag("event",t,{event_category:"EP :: Autosuggest",event_label:e.url,transport_type:"beacon"})}}({searchTerm:e,url:t}),window.location.href=t}function m(t,s){if("navigate"===g.action){return(0,e.applyFilters)("ep.Autosuggest.navigateCallback",h)(t.value,s.dataset.url)}return function(e,t){e.value=t}(t,s.innerText),function(e){e.closest("form").submit()}(t)}function y(e,t,{query:s}){return c(s,t,e)}async function w(t,s){const o={body:t,method:"POST",mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};g?.http_headers&&"object"===typeof g.http_headers&&Object.keys(g.http_headers).forEach((e=>{o.headers[e]=g.http_headers[e]})),g.addSearchTermHeader&&(o.headers["EP-Search-Term"]=encodeURI(s));const n=p(g?.requestIdBase||"");n&&(o.headers["X-ElasticPress-Request-ID"]=n);try{const t=await fetch(g.endpointUrl,(0,e.applyFilters)("ep.Autosuggest.fetchOptions",o));if(!t.ok)throw Error(t.statusText);const n=await t.json();return(0,e.applyFilters)("ep.Autosuggest.data",n,s)}catch(e){return console.error(e),e}}function A(t,s){let o="";const{value:n}=s,r=d(s,"ep-autosuggest-container").querySelector(".ep-autosuggest"),i=r.querySelector(".autosuggest-list");for(;i.firstChild;)i.removeChild(i.firstChild);t.length>0?r.style="display: block;":r.style="display: none;";const a=t.length;for(let s=0;a>s;++s){const r=t[s],i=r._source.post_title,a=r._source.permalink,u=l(i),c=n.trim().split(" ");let d=u;if(g.highlightingEnabled){const e=new RegExp(`\\b(${c.join("|")})`,"gi");d=d.replace(e,(e=>`<${g.highlightingTag} class="${g.highlightingClass} ep-autosuggest-highlight">${e}`))}let p=`
  • \n\t\t\t\t\n\t\t\t\t\t${d}\n\t\t\t\t\n\t\t\t
  • `;p=(0,e.applyFilters)("ep.Autosuggest.itemHTML",p,r,s,n),o+=p}return o=(0,e.applyFilters)("ep.Autosuggest.listHTML",o,t,s),i.innerHTML=o,i.addEventListener("click",(e=>{e.preventDefault();const t=e.target.closest(".autosuggest-link");i.contains(t)&&m(s,t)})),!0}function v(){const e=document.querySelectorAll(".autosuggest-list"),t=document.querySelectorAll(".ep-autosuggest");return e.forEach((e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})),t.forEach((e=>{e.style="display: none;"})),!0}function E(e,t){const s=t.closest("form");e?s.classList.add("is-loading"):s.classList.remove("is-loading")}g.endpointUrl&&""!==g.endpointUrl&&(!function(){const t=[g.defaultSelectors,g.selector].filter(Boolean).join(",");if(!t)return;let s,o;const n=[38,40,13],r=e=>{if(!n.includes(e.keyCode))return;const t=e.target,s=d(t,"ep-autosuggest-container").querySelector(".autosuggest-list").children,r=()=>Array.from(s).findIndex((e=>e.classList.contains("selected"))),i=()=>{Array.from(s).forEach((e=>{e.classList.remove("selected"),e.setAttribute("aria-selected","false")}))},a=()=>{if(o>=0){const e=s[o];e.classList.add("selected"),e.setAttribute("aria-selected","true"),f(e.id,t)}};switch(e.keyCode){case 38:o=o-1>=0?o-1:0,i();break;case 40:if("undefined"===typeof o)o=0;else{const e=r();s[e+1]&&(o=e+1,i())}break;case 13:s[o]?.classList.contains("selected")&&m(t,s[o].querySelector(".autosuggest-link"))}s[o]&&s[o].classList.contains("autosuggest-item")?a():i(),38===e.keyCode&&e.preventDefault()};function i(e){const t=new FormData(e);return t.has("post_type")?t.getAll("post_type").slice(-1):t.has("post_type[]")?t.getAll("post_type[]"):[]}const a=u((async t=>{const s=function(){if("undefined"===typeof window.epas){const e="No epas object defined";return console.warn(e),{error:e}}return window.epas}();if(s.error)return;const o=t.value,n="ep_autosuggest_placeholder",r=i(t.form);if(o.length>=2){E(!0,t);let i=y(o,n,s);i=JSON.parse(i),r.length>0&&"undefined"!==typeof i.post_filter.bool.must&&i.post_filter.bool.must.push({terms:{"post_type.raw":r}}),i=(0,e.applyFilters)("ep.Autosuggest.query",i,o,t),i=JSON.stringify(i);const a=await w(i,o);if(a&&a._shards&&a._shards.successful>0){const e=function(e,t){const s={},o="ep_custom_result",n=t.toLowerCase(),r=e.filter((e=>{let t=!0;return void 0!==e._source.terms&&void 0!==e._source.terms[o]&&e._source.terms[o].forEach((o=>{o.name.toLowerCase()===n&&(s[o.term_order]=e,t=!1)})),t})),i={};Object.keys(s).sort().forEach((e=>{i[e]=s[e]})),Object.keys(i).length>0&&Object.keys(i).forEach((e=>{const t=i[e];r.splice(e-1,0,t)}));return r}(a.hits.hits,o);0===e.length?v():A(e,t)}else v();E(!1,t)}else 0===o.length&&v()}),200),c=e=>{e.preventDefault();const{target:t,key:s,keyCode:o}=e;if("Escape"===s||"Esc"===s||27===o)return v(),function(e,t){t.setAttribute("aria-expanded",e)}(!1,t),void f("",t);if(n.includes(o)&&""!==t.value)return void r(e);const i=e.target;a(i)},l=e=>{const t=document.createElement("div");t.classList.add("ep-autosuggest-container"),e.insertAdjacentElement("afterend",t),t.appendChild(e)},p=t=>{if(!s){s=document.createElement("div"),s.classList.add("ep-autosuggest");const e=document.createElement("ul");e.classList.add("autosuggest-list"),e.setAttribute("role","listbox"),s.appendChild(e)}let o=s.cloneNode(!0);o=(0,e.applyFilters)("ep.Autosuggest.element",o,t),t.insertAdjacentElement("afterend",o)},h=e=>{if(["facet-search","ep-search-input"].some((t=>e.classList.contains(t))))return;e.setAttribute("autocomplete","off"),e.classList.contains("wp-block-search__input")?(e.form.classList.add("ep-autosuggest-container"),p(e.parentElement)):(l(e),p(e));const t=new CustomEvent("elasticpress.input.moved");e.dispatchEvent(t),e.addEventListener("keyup",c),e.addEventListener("blur",(function(){window.setTimeout(v,200)}))},b=e=>{const s=e.querySelectorAll(t);s&&Array.from(s).forEach(h)},L=()=>{const e=document.body,s={subtree:!0,childList:!0};new MutationObserver(((o,n)=>{o.forEach((o=>{Array.from(o.addedNodes).forEach((o=>{o.nodeType===Node.ELEMENT_NODE&&(n.disconnect(),"INPUT"===o.tagName?o.matches(t)&&h(o):b(o),n.observe(e,s))}))}))})).observe(e,s)};b(document.body),_=L,"undefined"!==typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_());var _}(),window.epasAPI={hideAutosuggestBox:v,updateAutosuggestBox:A,esSearch:w,buildSearchQuery:y})}(); \ No newline at end of file diff --git a/dist/js/blocks-script.asset.php b/dist/js/blocks-script.asset.php new file mode 100644 index 0000000000..c869f040a1 --- /dev/null +++ b/dist/js/blocks-script.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-data'), 'version' => 'de5592500fa72fc41466'); diff --git a/dist/js/blocks-script.js b/dist/js/blocks-script.js new file mode 100644 index 0000000000..93650a225d --- /dev/null +++ b/dist/js/blocks-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.data,a=window.wp.apiFetch,n=e.n(a);const r={setMetaKeys(e){return{type:"SET_META_KEYS",metaKeys:e}},getMetaKeys(){return{type:"GET_META_KEYS"}},setTaxonomies(e){return{type:"SET_TAXONOMIES",taxonomies:e}},getTaxonomies(){return{type:"GET_TAXONOMIES"}},setMetaRange(e,t){return{type:"SET_META_RANGE",key:e,metaRange:t}},getMetaRange(e){return{type:"GET_META_RANGE",key:e}}};var s={reducer:(e,t)=>{switch(t.type){case"SET_META_KEYS":return{...e,metaKeys:t.metaKeys};case"SET_TAXONOMIES":return{...e,taxonomies:t.taxonomies};case"SET_META_RANGE":return{...e,metaRanges:{...e.metaRanges,[t.key]:t.metaRange}};default:return e}},controls:{GET_META_KEYS(){return n()({path:"elasticpress/v1/meta-keys"})},GET_TAXONOMIES(){return n()({path:"elasticpress/v1/taxonomies"})},GET_META_RANGE({key:e}){const t=new URLSearchParams({facet:e});return n()({path:`/elasticpress/v1/meta-range?${t}`})}},selectors:{getMetaKeys(e){const{metaKeys:t}=e;return t},getTaxonomies(e){const{taxonomies:t}=e;return t},getMetaRange(e,t){const{metaRanges:{[t]:a}}=e;return a}},resolvers:{*getMetaKeys(){const e=yield r.getMetaKeys();return r.setMetaKeys(e)},*getTaxonomies(){const e=yield r.getTaxonomies();return r.setTaxonomies(e)},*getMetaRange(e){const{data:{min:t=!1,max:a=!1}={}}=yield r.getMetaRange(e);return r.setMetaRange(e,{min:t,max:a})}},actions:r,initialState:{metaKeys:[],metaRanges:{},taxonomies:{}}};if("function"===typeof t.createReduxStore){const e=(0,t.createReduxStore)("elasticpress",s);(0,t.register)(e)}else(0,t.registerStore)("elasticpress",s)}(); \ No newline at end of file diff --git a/dist/js/comments-block-script.asset.php b/dist/js/comments-block-script.asset.php new file mode 100644 index 0000000000..7e74e35ce4 --- /dev/null +++ b/dist/js/comments-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '1eedf0d4514282548879'); diff --git a/dist/js/comments-block-script.js b/dist/js/comments-block-script.js new file mode 100644 index 0000000000..94b0f4ead4 --- /dev/null +++ b/dist/js/comments-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,s){var o=s(9196),r=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var n=Symbol.for;r=n("react.element"),t.Fragment=n("react.fragment")}var c=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,s){var o,n={},l=null,p=null;for(o in void 0!==s&&(l=""+s),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(p=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===n[o]&&(n[o]=t[o]);return{$$typeof:r,type:e,key:l,ref:p,props:n,_owner:c.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,s){e.exports=s(5251)},9196:function(e){e.exports=window.React}},t={};function s(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,s),n.exports}!function(){var e=window.wp.blocks,t=window.wp.primitives,o=s(5893),r=window.wp.blockEditor,n=window.wp.components,c=window.wp.element,a=window.wp.i18n;const{searchablePostTypes:i}=window.epComments;var l=({attributes:e,setAttributes:t})=>{const{label:s,postTypes:l}=e,p=(0,r.useBlockProps)({className:"ep-widget-search-comments"}),C=(0,c.useMemo)((()=>0===l.length),[l]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{...p,children:[(0,o.jsx)(r.RichText,{"aria-label":(0,a.__)("Label text"),placeholder:(0,a.__)("Add label…"),withoutInteractiveFormatting:!0,value:s,onChange:e=>t({label:e})}),(0,o.jsx)("input",{autoComplete:"off",className:"ep-widget-search-comments-input",disabled:!0,type:"search"})]}),(0,o.jsx)(r.InspectorControls,{children:(0,o.jsxs)(n.PanelBody,{title:(0,a.__)("Search settings","elasticpress"),children:[(0,o.jsx)(n.CheckboxControl,{checked:C,label:(0,a.__)("Search all comments","elasticpress"),onChange:e=>{t(e?{postTypes:[]}:{postTypes:Object.keys(i)})}}),Object.entries(i).map((([e,s])=>{const r=(0,a.sprintf)((0,a.__)("Search comments on %s","elasticpress"),s);return(0,o.jsx)(n.CheckboxControl,{checked:l.includes(e),indeterminate:C,label:r,onChange:s=>((e,s)=>{const o=s?[...l,e]:l.filter((t=>t!==e));t({postTypes:o})})(e,s)},e)}))]})})]})},p=JSON.parse('{"u2":"elasticpress/comments"}'),C={from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e})=>"ep-comments"===e,transform:({instance:t})=>{const{title:s=null,post_type:o}=t.raw;return s?[(0,e.createBlock)("core/heading",{content:s}),(0,e.createBlock)("elasticpress/comments",{postTypes:o})]:(0,e.createBlock)("elasticpress/comments",{postTypes:o})}}]};(0,e.registerBlockType)(p.u2,{icon:()=>(0,o.jsxs)(t.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,o.jsx)(t.Path,{d:"M3.75 10C3.75 6.54822 6.54822 3.75 10 3.75C10.6096 3.75 11.1988 3.83727 11.7558 4H14.9057C13.5696 2.90625 11.8614 2.25 10 2.25C5.71979 2.25 2.25 5.71979 2.25 10C2.25 14.2802 5.71979 17.75 10 17.75C11.8474 17.75 13.5438 17.1036 14.8754 16.0247L18.4763 19.5369C18.7728 19.8261 19.2477 19.8202 19.5369 19.5237C19.8261 19.2272 19.8202 18.7523 19.5237 18.4631L15.9448 14.9724C16.2002 14.6673 16.4326 14.3423 16.6393 14H14.8025C14.7301 14.0869 14.6553 14.1718 14.5783 14.2547L14.3682 14.4701C13.2414 15.5713 11.7 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10Z"}),(0,o.jsx)(t.Path,{d:"M16.3018 6.1295C16.4109 6.04317 16.5132 6 16.6087 6C16.7178 6 16.8201 6.05036 16.9156 6.15108L17.2839 6.51799C17.393 6.63309 17.4476 6.73381 17.4476 6.82014C17.4476 6.92086 17.3794 7.02878 17.243 7.14388C16.6564 7.60432 16.3632 8.1223 16.3632 8.69784C16.4859 8.85612 16.6292 8.93525 16.7928 8.93525H17.5703C17.7067 8.93525 17.809 8.97842 17.8772 9.06475C17.9591 9.13669 18 9.24461 18 9.38849V11.5252C18 11.6691 17.9591 11.7842 17.8772 11.8705C17.809 11.9424 17.7067 11.9784 17.5703 11.9784H15.1969C14.9105 11.9784 14.7673 11.8345 14.7673 11.5468C14.74 11.0288 14.7263 10.5899 14.7263 10.2302C14.7263 9.28058 14.8218 8.4964 15.0128 7.8777C15.2174 7.25899 15.6471 6.67626 16.3018 6.1295ZM11.5754 6.15108C11.6846 6.06475 11.7869 6.02158 11.8824 6.02158C11.9915 6.02158 12.0938 6.07194 12.1893 6.17266L12.5575 6.53957C12.6667 6.65468 12.7212 6.7554 12.7212 6.84173C12.7212 6.94245 12.653 7.05036 12.5166 7.16547C11.9301 7.6259 11.6368 8.14389 11.6368 8.71943C11.7596 8.8777 11.9028 8.95683 12.0665 8.95683H12.844C12.9804 8.95683 13.0827 9 13.1509 9.08633C13.2327 9.15827 13.2737 9.26619 13.2737 9.41007V11.5468C13.2737 11.6906 13.2327 11.8058 13.1509 11.8921C13.0827 11.964 12.9804 12 12.844 12H10.4706C10.1841 12 10.0409 11.8561 10.0409 11.5683C10.0136 11.0504 10 10.6115 10 10.2518C10 9.30216 10.0955 8.51799 10.2864 7.89928C10.491 7.28058 10.9207 6.69784 11.5754 6.15108Z"})]}),edit:e=>(0,o.jsx)(l,{...e}),save:()=>{},transforms:C})}()}(); \ No newline at end of file diff --git a/dist/js/comments-script.asset.php b/dist/js/comments-script.asset.php new file mode 100644 index 0000000000..b12043065a --- /dev/null +++ b/dist/js/comments-script.asset.php @@ -0,0 +1 @@ + array('wp-hooks'), 'version' => '23fa268b57e0fa1e9c1a'); diff --git a/dist/js/comments-script.js b/dist/js/comments-script.js new file mode 100644 index 0000000000..828ba21eae --- /dev/null +++ b/dist/js/comments-script.js @@ -0,0 +1 @@ +!function(){"use strict";window.wp.hooks;const e=(e,t)=>{for(;(e=e.parentElement)&&!e.classList.contains(t););return e},t=document.querySelectorAll(".ep-widget-search-comments");let n;t.forEach((e=>{const{id:t}=e,n=document.createElement("input");n.setAttribute("autocomplete","off"),n.setAttribute("type","search"),n.setAttribute("class","ep-widget-search-comments-input"),n.setAttribute("id",`${t}-s`);const s=document.createElement("ul");s.setAttribute("class","ep-widget-search-comments-results"),e.appendChild(n),e.appendChild(s)}));const s=[38,40,13];function i(t){n=void 0;const s=e(t,"ep-widget-search-comments").querySelector(".ep-widget-search-comments-results");for(;s.firstChild;)s.removeChild(s.firstChild)}function o(e){const t=window.epc.minimumLengthToSearch||2;return e?.value?.trim().length>=t}function c(t,n){const s=e(n,"ep-widget-search-comments");t?s.classList.add("ep-widget-search-comments-is-loading"):s.classList.remove("ep-widget-search-comments-is-loading")}const r=((e,t)=>{let n=null;return function(...s){const i=this;window.clearTimeout(n),n=window.setTimeout((()=>{e.apply(i,s)}),t)}})((function(t){if(o(t)){const n=e(t,"ep-widget-search-comments").querySelector(".ep-widget-search-comments-post-type"),s=n?.value?`&post_type=${n.value.trim()}`:"";return c(!0,t),fetch(`${window.epc.restApiEndpoint}?s=${t.value.trim()}${s}`).then((e=>{if(!e.ok)throw e;return e.json()})).then((n=>{0===Object.keys(n).length?t.value.trim()?(t=>{const n=e(t,"ep-widget-search-comments").querySelector(".ep-widget-search-comments-results");let s=`
  • ${window.epc.noResultsFoundText}
  • `;"undefined"!==typeof window.epCommentWidgetItemNotFoundHTMLFilter&&(s=window.epCommentWidgetItemNotFoundHTMLFilter(s,window.epc.noResultsFoundText,t.value)),n.innerHTML=s})(t):i(t):((t,n)=>{let s="",i="";Object.keys(t).forEach(((e,o)=>{t[e]?.content&&t[e]?.link&&(i=`\n\t\t\t\t
  • \n\t\t\t\t\t\n\t\t\t\t\t\t${t[e].content}\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t`,"undefined"!==typeof window.epCommentWidgetItemHTMLFilter&&(i=window.epCommentWidgetItemHTMLFilter(i,t[e],o,n.value)),s+=i)}));const o=e(n,"ep-widget-search-comments").querySelector(".ep-widget-search-comments-results");"undefined"!==typeof window.epCommentWidgetItemsHTMLFilter&&(s=window.epCommentWidgetItemsHTMLFilter(s,n.value)),o.innerHTML=s})(n,t)})).catch((()=>{i(t)})).finally((()=>{c(!1,t)}))}return!1}),500),d=t=>{t.preventDefault();const{target:c,key:d,keyCode:l}=t;if("Escape"===d||"Esc"===d||27===l)return i(c),void c.setAttribute("aria-expanded",!1);s.includes(l)&&""!==c.value?(t=>{if(!s.includes(t.keyCode))return;const i=e(t.target,"ep-widget-search-comments").querySelector(".ep-widget-search-comments-results"),o=i.querySelectorAll(".ep-widget-search-comments-result-item").length,c=i.children,r=n;switch(t.keyCode){case 38:n=n-1<0||"undefined"===typeof n?o-1:n-1;break;case 40:"undefined"===typeof n||n+1>o-1?n=0:n+=1;break;case 13:if(c[n]?.classList.contains("selected")||1===o){const e=n||0;if(c[e]){const t=c[e].querySelector("a")?.getAttribute("href");window.location.href=t}}}"number"===typeof r&&(c[r].classList.remove("selected"),c[r].setAttribute("aria-selected","false")),c[n]?.classList.add("selected"),c[n]?.setAttribute("aria-selected","true")})(t):o(c)?r(c):i(c)};t.forEach((e=>{const t=e.querySelector(".ep-widget-search-comments-input");t.addEventListener("keyup",d),t.addEventListener("keydown",(e=>{38===e.keyCode&&e.preventDefault()})),t.addEventListener("blur",(function(){setTimeout((()=>i(t)),200)}))}))}(); \ No newline at end of file diff --git a/dist/js/dashboard-script.asset.php b/dist/js/dashboard-script.asset.php new file mode 100644 index 0000000000..cf29413fe6 --- /dev/null +++ b/dist/js/dashboard-script.asset.php @@ -0,0 +1 @@ + array('wp-i18n'), 'version' => '2c08414c4d31cdc24c5c'); diff --git a/dist/js/dashboard-script.js b/dist/js/dashboard-script.js new file mode 100644 index 0000000000..9672c2f68f --- /dev/null +++ b/dist/js/dashboard-script.js @@ -0,0 +1 @@ +!function(){"use strict";var t={3462:function(t,e,n){n(6699);var r=n(2649);t.exports=r("Array","includes")},9116:function(t,e,n){n(9601);var r=n(857);t.exports=r.Object.assign},9662:function(t,e,n){var r=n(614),o=n(6330),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},6077:function(t,e,n){var r=n(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},1223:function(t,e,n){var r=n(5112),o=n(30),i=n(3070).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},9670:function(t,e,n){var r=n(111),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},8533:function(t,e,n){var r=n(2092).forEach,o=n(9341)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1318:function(t,e,n){var r=n(5656),o=n(1400),i=n(6244),a=function(t){return function(e,n,a){var s,c=r(e),u=i(c),f=o(a,u);if(t&&n!==n){for(;u>f;)if((s=c[f++])!==s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:function(t,e,n){var r=n(9974),o=n(1702),i=n(8361),a=n(7908),s=n(6244),c=n(5417),u=o([].push),f=function(t){var e=1===t,n=2===t,o=3===t,f=4===t,l=6===t,p=7===t,v=5===t||l;return function(d,g,y,h){for(var b,m,x=a(d),w=i(x),O=r(g,y),S=s(w),L=0,j=h||c,E=e?j(d,S):n||p?j(d,0):void 0;S>L;L++)if((v||L in w)&&(m=O(b=w[L],L,x),t))if(e)E[L]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return L;case 2:u(E,b)}else switch(t){case 4:return!1;case 7:u(E,b)}return l?-1:o||f?f:E}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},9341:function(t,e,n){var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},7475:function(t,e,n){var r=n(3157),o=n(4411),i=n(111),a=n(5112)("species"),s=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===s||r(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},5417:function(t,e,n){var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},4326:function(t,e,n){var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:function(t,e,n){var r=n(1694),o=n(614),i=n(4326),a=n(5112)("toStringTag"),s=Object,c="Arguments"===i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},9920:function(t,e,n){var r=n(2597),o=n(3887),i=n(1236),a=n(3070);t.exports=function(t,e,n){for(var s=o(e),c=a.f,u=i.f,f=0;f0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},2649:function(t,e,n){var r=n(7854),o=n(1702);t.exports=function(t,e){return o(r[t].prototype[e])}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),o=n(1236).f,i=n(8880),a=n(8052),s=n(3072),c=n(9920),u=n(4705);t.exports=function(t,e){var n,f,l,p,v,d=t.target,g=t.global,y=t.stat;if(n=g?r:y?r[d]||s(d,{}):(r[d]||{}).prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(v=o(n,f))&&v.value:n[f],!u(g?f:d+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9974:function(t,e,n){var r=n(1470),o=n(9662),i=n(4374),a=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},4374:function(t,e,n){var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:function(t,e,n){var r=n(4374),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:function(t,e,n){var r=n(9781),o=n(2597),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},5668:function(t,e,n){var r=n(1702),o=n(9662);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},1470:function(t,e,n){var r=n(4326),o=n(1702);t.exports=function(t){if("Function"===r(t))return o(t)}},1702:function(t,e,n){var r=n(4374),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);t.exports=r?a:function(t){return function(){return i.apply(t,arguments)}}},5005:function(t,e,n){var r=n(7854),o=n(614);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},8173:function(t,e,n){var r=n(9662),o=n(8554);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},7854:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:function(t,e,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var r=n(1702),o=n(7293),i=n(4326),a=Object,s=r("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):a(t)}:a},2788:function(t,e,n){var r=n(1702),o=n(614),i=n(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},9909:function(t,e,n){var r,o,i,a=n(4811),s=n(7854),c=n(111),u=n(8880),f=n(2597),l=n(5465),p=n(6200),v=n(3501),d="Object already initialized",g=s.TypeError,y=s.WeakMap;if(a||l.state){var h=l.state||(l.state=new y);h.get=h.get,h.has=h.has,h.set=h.set,r=function(t,e){if(h.has(t))throw new g(d);return e.facade=t,h.set(t,e),e},o=function(t){return h.get(t)||{}},i=function(t){return h.has(t)}}else{var b=p("state");v[b]=!0,r=function(t,e){if(f(t,b))throw new g(d);return e.facade=t,u(t,b,e),e},o=function(t){return f(t,b)?t[b]:{}},i=function(t){return f(t,b)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return n}}}},3157:function(t,e,n){var r=n(4326);t.exports=Array.isArray||function(t){return"Array"===r(t)}},614:function(t,e,n){var r=n(4154),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4411:function(t,e,n){var r=n(1702),o=n(7293),i=n(614),a=n(648),s=n(5005),c=n(2788),u=function(){},f=[],l=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,v=r(p.exec),d=!p.test(u),g=function(t){if(!i(t))return!1;try{return l(u,f,t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!v(p,c(t))}catch(t){return!0}};y.sham=!0,t.exports=!l||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?y:g},4705:function(t,e,n){var r=n(7293),o=n(614),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===f||n!==u&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},8554:function(t){t.exports=function(t){return null===t||void 0===t}},111:function(t,e,n){var r=n(614),o=n(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var r=n(5005),o=n(614),i=n(7976),a=n(3307),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},3061:function(t,e,n){var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),a=n(8003),s=n(7497),c=function(){return this};t.exports=function(t,e,n,u){var f=e+" Iterator";return t.prototype=o(r,{next:i(+!u,n)}),a(t,f,!1,!0),s[f]=c,t}},1656:function(t,e,n){var r=n(2109),o=n(6916),i=n(1913),a=n(6530),s=n(614),c=n(3061),u=n(9518),f=n(7674),l=n(8003),p=n(8880),v=n(8052),d=n(5112),g=n(7497),y=n(3383),h=a.PROPER,b=a.CONFIGURABLE,m=y.IteratorPrototype,x=y.BUGGY_SAFARI_ITERATORS,w=d("iterator"),O="keys",S="values",L="entries",j=function(){return this};t.exports=function(t,e,n,a,d,y,E){c(n,e,a);var A,T,_,C=function(t){if(t===d&&D)return D;if(!x&&t&&t in I)return I[t];switch(t){case O:case S:case L:return function(){return new n(this,t)}}return function(){return new n(this)}},P=e+" Iterator",k=!1,I=t.prototype,M=I[w]||I["@@iterator"]||d&&I[d],D=!x&&M||C(d),F="Array"===e&&I.entries||M;if(F&&(A=u(F.call(new t)))!==Object.prototype&&A.next&&(i||u(A)===m||(f?f(A,m):s(A[w])||v(A,w,j)),l(A,P,!0,!0),i&&(g[P]=j)),h&&d===S&&M&&M.name!==S&&(!i&&b?p(I,"name",S):(k=!0,D=function(){return o(M,this)})),d)if(T={values:C(S),keys:y?D:C(O),entries:C(L)},E)for(_ in T)(x||k||!(_ in I))&&v(I,_,T[_]);else r({target:e,proto:!0,forced:x||k},T);return i&&!E||I[w]===D||v(I,w,D,{name:d}),g[e]=D,T}},3383:function(t,e,n){var r,o,i,a=n(7293),s=n(614),c=n(111),u=n(30),f=n(9518),l=n(8052),p=n(5112),v=n(1913),d=p("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(r=o):g=!0),!c(r)||a((function(){var t={};return r[d].call(t)!==t}))?r={}:v&&(r=u(r)),s(r[d])||l(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},7497:function(t){t.exports={}},6244:function(t,e,n){var r=n(7466);t.exports=function(t){return r(t.length)}},6339:function(t,e,n){var r=n(1702),o=n(7293),i=n(614),a=n(2597),s=n(9781),c=n(6530).CONFIGURABLE,u=n(2788),f=n(9909),l=f.enforce,p=f.get,v=String,d=Object.defineProperty,g=r("".slice),y=r("".replace),h=r([].join),b=s&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===g(v(e),0,7)&&(e="["+y(v(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&a(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return a(r,"source")||(r.source=h(m,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return i(this)&&p(this).source||u(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},1574:function(t,e,n){var r=n(9781),o=n(1702),i=n(6916),a=n(7293),s=n(1956),c=n(5181),u=n(5296),f=n(7908),l=n(8361),p=Object.assign,v=Object.defineProperty,d=o([].concat);t.exports=!p||a((function(){if(r&&1!==p({b:1},p(v({},"a",{enumerable:!0,get:function(){v(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==p({},t)[n]||s(p({},e)).join("")!==o}))?function(t,e){for(var n=f(t),o=arguments.length,a=1,p=c.f,v=u.f;o>a;)for(var g,y=l(arguments[a++]),h=p?d(s(y),p(y)):s(y),b=h.length,m=0;b>m;)g=h[m++],r&&!i(v,y,g)||(n[g]=y[g]);return n}:p},30:function(t,e,n){var r,o=n(9670),i=n(6048),a=n(748),s=n(3501),c=n(490),u=n(317),f=n(6200),l="prototype",p="script",v=f("IE_PROTO"),d=function(){},g=function(t){return"<"+p+">"+t+""},y=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}h="undefined"!=typeof document?document.domain&&r?y(r):function(){var t,e=u("iframe"),n="java"+p+":";return e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F}():y(r);for(var t=a.length;t--;)delete h[l][a[t]];return h()};s[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[l]=o(t),n=new d,d[l]=null,n[v]=t):n=h(),void 0===e?n:i.f(n,e)}},6048:function(t,e,n){var r=n(9781),o=n(3353),i=n(3070),a=n(9670),s=n(5656),c=n(1956);e.f=r&&!o?Object.defineProperties:function(t,e){a(t);for(var n,r=s(e),o=c(e),u=o.length,f=0;u>f;)i.f(t,n=o[f++],r[n]);return t}},3070:function(t,e,n){var r=n(9781),o=n(4664),i=n(3353),a=n(9670),s=n(4948),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",v="writable";e.f=r?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&v in n&&!n[v]){var r=f(t,e);r&&r[v]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:l in n?n[l]:r[l],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),o=n(6916),i=n(5296),a=n(9114),s=n(5656),c=n(4948),u=n(2597),f=n(4664),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=c(e),f)try{return l(t,e)}catch(t){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},8006:function(t,e,n){var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},9518:function(t,e,n){var r=n(2597),o=n(614),i=n(7908),a=n(6200),s=n(8544),c=a("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof u?f:null}},7976:function(t,e,n){var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:function(t,e,n){var r=n(1702),o=n(2597),i=n(5656),a=n(1318).indexOf,s=n(3501),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,f=[];for(n in r)!o(s,n)&&o(r,n)&&c(f,n);for(;e.length>u;)o(r,n=e[u++])&&(~a(f,n)||c(f,n));return f}},1956:function(t,e,n){var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:function(t,e,n){var r=n(5668),o=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},2140:function(t,e,n){var r=n(6916),o=n(614),i=n(111),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},3887:function(t,e,n){var r=n(5005),o=n(1702),i=n(8006),a=n(5181),s=n(9670),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?c(e,n(t)):e}},857:function(t,e,n){var r=n(7854);t.exports=r},4488:function(t,e,n){var r=n(8554),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},8003:function(t,e,n){var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},6200:function(t,e,n){var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:function(t,e,n){var r=n(7854),o=n(3072),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},2309:function(t,e,n){var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,n){var r=n(7392),o=n(7293),i=n(7854).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1400:function(t,e,n){var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:function(t,e,n){var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:function(t,e,n){var r=n(4758);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},7466:function(t,e,n){var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488),o=Object;t.exports=function(t){return o(r(t))}},7593:function(t,e,n){var r=n(6916),o=n(111),i=n(2190),a=n(8173),s=n(2140),c=n(5112),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=a(t,f);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:function(t,e,n){var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},1694:function(t,e,n){var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:function(t,e,n){var r=n(1702),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3307:function(t,e,n){var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var r=n(9781),o=n(7293);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,n){var r=n(7854),o=n(614),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},5112:function(t,e,n){var r=n(7854),o=n(2309),i=n(2597),a=n(9711),s=n(6293),c=n(3307),u=r.Symbol,f=o("wks"),l=c?u.for||u:u&&u.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(u,t)?u[t]:l("Symbol."+t)),f[t]}},6699:function(t,e,n){var r=n(2109),o=n(1318).includes,i=n(7293),a=n(1223);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},6992:function(t,e,n){var r=n(5656),o=n(1223),i=n(7497),a=n(9909),s=n(3070).f,c=n(1656),u=n(6178),f=n(1913),l=n(9781),p="Array Iterator",v=a.set,d=a.getterFor(p);t.exports=c(Array,"Array",(function(t,e){v(this,{type:p,target:r(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,n=t.kind,r=t.index++;if(!e||r>=e.length)return t.target=void 0,u(void 0,!0);switch(n){case"keys":return u(r,!1);case"values":return u(e[r],!1)}return u([r,e[r]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(t){}},9601:function(t,e,n){var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},4747:function(t,e,n){var r=n(7854),o=n(8324),i=n(8509),a=n(8533),s=n(8880),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in o)o[u]&&c(r[u]&&r[u].prototype);c(i)},3948:function(t,e,n){var r=n(7854),o=n(8324),i=n(8509),a=n(6992),s=n(8880),c=n(5112),u=c("iterator"),f=c("toStringTag"),l=a.values,p=function(t,e){if(t){if(t[u]!==l)try{s(t,u,l)}catch(e){t[u]=l}if(t[f]||s(t,f,e),o[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var v in o)p(r[v]&&r[v].prototype,v);p(i,"DOMTokenList")},6143:function(t,e,n){n(4747),n(3948);var r=n(857);t.exports=r}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}(),function(){n(9116),n(6143),n(3462);function t(){return t=Object.assign||function(t){for(var e=1;e{const e="1"===t.get("settings[active]"),n=t.get("setting_requires_reindex");if(n){const r=t.get(`settings[${n}]`),o=t.get("setting_requires_reindex_was");if(e&&1==r&&r!==o)return!0}const r="1"===t.get("requires_reindex"),o="1"===t.get("was_active");return r&&e&&!o},s=async t=>{t.preventDefault();const n=t.target,o=new FormData(n);if(a(o)){if(!window.confirm((0,e.__)("Enabling this feature will begin re-syncing your content. Do you wish to proceed?","elasticpress")))return}const s=n.closest(".ep-feature"),c=s.querySelector(".requirements-status-notice--syncing");s.classList.add("saving"),n.submit.disabled=!0,c.style.display=null;const u=await fetch(r,{method:"POST",body:o}),f=await u.json();if(!1===f.success){const{data:t=[]}=f;if(t)for(const{code:e=""}of t)"is_indexing"===e&&(c.style.display="block");return n.submit.disabled=!1,void s.classList.remove("saving")}s.classList.toggle("feature-active",f.data.active),"undefined"!==typeof f.data.setting&&(n.setting_requires_reindex_was.value=f.data.setting),f.data.reindex?window.location=i:(s.classList.remove("saving"),n.submit.disabled=!1,n.was_active.value=f.data.active?"1":"0")},c=t=>{const{form:e}=t.target,n=new FormData(e),r=e.querySelector(".requirements-status-notice--reindex"),o=a(n);r&&(r.style.display=o?"block":null)},u=t=>{const{target:e}=t;if(e.classList.contains("settings-button")){const t=e.closest(".ep-feature");t.classList.toggle("show-settings"),e.setAttribute("aria-expanded",t.classList.contains("show-settings"))}(e.classList.contains("learn-more")||e.classList.contains("collapse"))&&e.closest(".ep-feature").classList.toggle("show-full")},f=t=>{if(new FormData(t.target).getAll("features[]").length>0)return;t.preventDefault();window.confirm((0,e.__)("It looks like you’re trying to use ElasticPress’s advanced features only. If you’d like to activate basic search, please select Cancel and activate the Post Search Feature. Otherwise, please click Ok to configure advanced features.","elasticpress"))&&(window.location=o)},l=document.querySelector(".ep-features");l&&(l.addEventListener("change",c),l.addEventListener("submit",s),l.addEventListener("click",u));const p=document.querySelector("button.setup-button");p&&p.form.addEventListener("submit",f),new class{constructor(e,n={}){const r={onCreate:null,onOpen:null,onClose:null};this.evtCallbacks={},this.$tooltips=document.querySelectorAll(e),e||0!==this.$tooltips.length?(document.documentElement.classList.add("js"),this.settings=t({},r,n),this.manageBoundTrigger=t=>this.manageTrigger(t),this.boundManageTT=t=>this.manageTT(t),this.boundManageEsc=t=>this.manageEsc(t),this.$tooltips.forEach(((t,e)=>{this.setupTooltip(t,e)})),this.settings=t({},r,n),this.settings.onCreate&&"function"==typeof this.settings.onCreate&&this.settings.onCreate.call()):console.error("10up Tooltip: Target not found. A valid target (tooltip container) must be used.")}destroy(){this.removeAllEventListeners()}addEventListener(t,e,n){void 0===this.evtCallbacks[e]&&(this.evtCallbacks[e]=[]),this.evtCallbacks[e].push({element:t,callback:n}),t.addEventListener(e,n)}removeAllEventListeners(){Object.keys(this.evtCallbacks).forEach((t=>{this.evtCallbacks[t].forEach((({element:e,callback:n})=>{e.removeEventListener(t,n)}))}))}setupTooltip(t,e){const n="a11y-tip--toggle",r=".a11y-tip__trigger",o=".a11y-tip__help";let i,a,s;const c=t,u=c.querySelector(r),f=c.querySelector(o);["a","button","input","textarea","select"].includes(u.nodeName.toLowerCase())||u.setAttribute("tabindex","0"),f.getAttribute("id")||f.setAttribute("id",`tool_tip_${e}`),u.getAttribute("aria-describedby")||u.setAttribute("aria-describedby",f.getAttribute("id")),f.getAttribute("role")||f.setAttribute("role","tooltip"),c.classList.contains(n)&&(a=c.querySelector(r).innerHTML,a=a.replace(/^\s+|\s+$/g,""),s=c.querySelector(o).getAttribute("id"),i=document.createElement("button"),i.setAttribute("type","button"),i.classList.add("a11y-tip__trigger"),i.classList.add("a11y-tip__trigger--toggle"),i.setAttribute("aria-describedby",s),i.setAttribute("aria-expanded","false"),i.textContent=a,c.removeChild(c.querySelector(r)),c.insertBefore(i,c.firstChild),this.addEventListener(i,"click",this.manageBoundTrigger)),!1===c.classList.contains(n)&&this.addEventListener(f,"transitionend",this.boundManageTT),this.addEventListener(u,"keyup",this.boundManageEsc)}manageTT(t){const{target:e}=t;t.pseudoElement||(e.classList.contains("a11y-tip--hide")&&e.classList.remove("a11y-tip--hide"),"0"===window.getComputedStyle(t.target).opacity?this.settings.onClose&&"function"==typeof this.settings.onClose&&this.settings.onClose.call():this.settings.onOpen&&"function"==typeof this.settings.onOpen&&this.settings.onOpen.call())}manageEsc(t){const{target:e}=t;27===t.keyCode&&(t.preventDefault(),e.classList.add("a11y-tip--hide"),this.settings.onClose&&"function"==typeof this.settings.onClose&&this.settings.onClose.call())}manageTrigger(t){const e=t.target;"true"===e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded","false"),this.settings.onClose&&"function"==typeof this.settings.onClose&&this.settings.onClose.call()):"false"===e.getAttribute("aria-expanded")&&(e.setAttribute("aria-expanded","true"),this.settings.onOpen&&"function"==typeof this.settings.onOpen&&this.settings.onOpen.call())}}(".a11y-tip")}()}(); \ No newline at end of file diff --git a/dist/js/facets-block-script.asset.php b/dist/js/facets-block-script.asset.php new file mode 100644 index 0000000000..fa8db11394 --- /dev/null +++ b/dist/js/facets-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '77667be614091df245da'); diff --git a/dist/js/facets-block-script.js b/dist/js/facets-block-script.js new file mode 100644 index 0000000000..e2b0c1e189 --- /dev/null +++ b/dist/js/facets-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,r){var o=r(9196),s=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var n=Symbol.for;s=n("react.element"),n("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,n={},c=null,d=null;for(o in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)l.call(t,o)&&!i.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===n[o]&&(n[o]=t[o]);return{$$typeof:s,type:e,key:c,ref:d,props:n,_owner:a.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,r){e.exports=r(5251)},9196:function(e){e.exports=window.React}},t={};function r(o){var s=t[o];if(void 0!==s)return s.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.blocks,t=window.wp.primitives,o=r(5893),s=()=>(0,o.jsx)(t.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M5 6V5.25C4.69933 5.25 4.42772 5.42957 4.30994 5.70621C4.19216 5.98285 4.25098 6.3031 4.45938 6.51983L5 6ZM10.1012 11.3053H10.8512V11.0032L10.6418 10.7854L10.1012 11.3053ZM10.1012 17.141H9.35121C9.35121 17.3638 9.45026 17.5751 9.62153 17.7176L10.1012 17.141ZM12.6518 19.2632L12.1721 19.8397C12.3891 20.0202 12.6891 20.0636 12.9483 19.9521C13.2076 19.8405 13.3822 19.5928 13.4003 19.3111L12.6518 19.2632ZM13.1619 11.3053L12.6213 10.7854L12.431 10.9833L12.4135 11.2573L13.1619 11.3053ZM18.2632 6L18.8038 6.51983C19.0122 6.3031 19.071 5.98285 18.9532 5.70621C18.8354 5.42957 18.5638 5.25 18.2632 5.25V6ZM4.45938 6.51983L9.56059 11.8251L10.6418 10.7854L5.54062 5.48017L4.45938 6.51983ZM9.35121 11.3053V17.141H10.8512V11.3053H9.35121ZM9.62153 17.7176L12.1721 19.8397L13.1315 18.6866L10.5809 16.5645L9.62153 17.7176ZM13.4003 19.3111L13.9104 11.3532L12.4135 11.2573L11.9034 19.2152L13.4003 19.3111ZM13.7026 11.8251L18.8038 6.51983L17.7225 5.48017L12.6213 10.7854L13.7026 11.8251ZM5 6.75H18.2632V5.25H5V6.75Z"})}),n=window.wp.blockEditor,a=window.wp.components,l=window.wp.element,i=window.wp.i18n,c=window.wp.serverSideRender,d=r.n(c),p=({attributes:e})=>{const{type:t}=e;return(0,o.jsx)(n.Warning,{children:"taxonomy"===t?(0,i.__)("Preview unavailable. The selected taxonomy has no terms assigned to searchable content.","elasticpress"):(0,i.__)("Preview unavailable. There is no searchable content available with the selected metadata.","elasticpress")})},u=({onChange:e,checked:t})=>(0,o.jsx)(a.ToggleControl,{checked:t,label:(0,i.__)("Display count","elasticpress"),onChange:e}),h=window.wp.data,b=({onChange:e,value:t})=>{const r=(0,h.useSelect)((e=>e("elasticpress").getMetaKeys())),s=(0,l.useMemo)((()=>[{label:(0,i.__)("Select key","elasticpress"),value:""},...r.map((e=>({label:e,value:e})))]),[r]);return(0,o.jsx)(a.SelectControl,{disabled:s.length<=1,help:(0,l.createInterpolateElement)((0,i.__)("This is the list of metadata fields indexed in Elasticsearch. If your desired field does not appear in this list please try to sync your content","elasticpress"),{a:(0,o.jsx)("a",{href:window.epBlocks.syncUrl})}),label:(0,i.__)("Filter by","elasticpress"),onChange:e,options:s,value:t})},f=({onChange:e,orderby:t,order:r})=>{const s=[{label:(0,i.__)("Highest to lowest count"),value:"count/desc"},{label:(0,i.__)("Lowest to highest count"),value:"count/asc"},{label:(0,i._x)("A → Z","label for ordering posts by title in ascending order","elasticpress"),value:"name/asc"},{label:(0,i._x)("Z → A","label for ordering posts by title in descending order","elasticpress"),value:"name/desc"}];return(0,o.jsx)(a.SelectControl,{label:(0,i.__)("Order by","elasticpress"),onChange:t=>{const[r,o]=t.split("/");e({order:o,orderby:r})},options:s,value:`${t}/${r}`})},y=({onChange:e,value:t})=>(0,o.jsx)(a.TextControl,{label:(0,i.__)("Search field placeholder","elasticpress"),value:t,onChange:e}),w=({onChange:e,value:t})=>{const r=(0,h.useSelect)((e=>e("elasticpress").getTaxonomies())),s=(0,l.useMemo)((()=>[{label:(0,i.__)("Select taxonomy","elasticpress"),value:""},...Object.entries(r).map((([e,t])=>({label:`${t.label} (${e})`,value:e})))]),[r]);return(0,o.jsx)(a.SelectControl,{disabled:s.length<=1,help:"",label:(0,i.__)("Filter by","elasticpress"),onChange:e,options:s,value:t})},v=()=>(0,o.jsx)(a.Placeholder,{children:(0,o.jsx)(a.Spinner,{})}),_=JSON.parse('{"u2":"elasticpress/facet"}'),g={from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e})=>"ep-facet"===e,transform:({instance:t})=>{const{title:r=null,...o}=t.raw;return r?[(0,e.createBlock)("core/heading",{content:r}),(0,e.createBlock)("elasticpress/facet",o)]:(0,e.createBlock)("elasticpress/facet",o)}}]};(0,e.registerBlockType)(_.u2,{icon:s,edit:({attributes:t,name:r,setAttributes:c})=>{const{displayCount:h,facet:_,orderby:g,order:x,searchPlaceholder:C,type:m}=t,{title:L}=(0,e.getBlockType)(r),j=(0,n.useBlockProps)(),k="meta"===m?b:w,S=e=>{c({facet:e})};return(0,o.jsxs)(l.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsxs)(a.PanelBody,{title:(0,i.__)("Settings","elasticpress"),children:[(0,o.jsx)(k,{onChange:S,value:_}),"meta"===m?(0,o.jsx)(y,{onChange:e=>{c({searchPlaceholder:e})},value:C}):null,(0,o.jsx)(u,{checked:h,onChange:e=>{c({displayCount:e})}}),(0,o.jsx)(f,{onChange:({orderby:e,order:t})=>{c({orderby:e,order:t})},orderby:g,order:x})]})}),(0,o.jsx)("div",{...j,children:_?(0,o.jsx)(a.Disabled,{children:(0,o.jsx)(d(),{attributes:{displayCount:h,facet:_,isPreview:!0,orderby:g,order:x,searchPlaceholder:C,type:m},block:r,EmptyResponsePlaceholder:p,LoadingResponsePlaceholder:v,skipBlockSupportAttributes:!0})}):(0,o.jsx)(a.Placeholder,{icon:s,label:L,children:(0,o.jsx)(k,{onChange:S,value:_})})})]})},save:()=>{},transforms:g})}()}(); \ No newline at end of file diff --git a/dist/js/facets-date-block-script.asset.php b/dist/js/facets-date-block-script.asset.php new file mode 100644 index 0000000000..4f16b028f3 --- /dev/null +++ b/dist/js/facets-date-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '8695209298871b5969f9'); diff --git a/dist/js/facets-date-block-script.js b/dist/js/facets-date-block-script.js new file mode 100644 index 0000000000..0775a50d52 --- /dev/null +++ b/dist/js/facets-date-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,r){var n=r(9196),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var s=Symbol.for;o=s("react.element"),t.Fragment=s("react.fragment")}var i=n.__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,r){var n,s={},c=null,p=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(p=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:p,props:s,_owner:i.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,r){e.exports=r(5251)},9196:function(e){e.exports=window.React}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.blocks,t=window.wp.primitives,n=r(5893),o=window.wp.blockEditor,s=window.wp.components,i=window.wp.i18n,a=window.wp.serverSideRender,l=r.n(a),c=({attributes:e})=>{const{type:t}=e;return(0,n.jsx)(o.Warning,{children:"taxonomy"===t?(0,i.__)("Preview unavailable. The selected taxonomy has no terms assigned to searchable content.","elasticpress"):(0,i.__)("Preview unavailable. There is no searchable content available with the selected metadata.","elasticpress")})},p=()=>(0,n.jsx)(s.Placeholder,{children:(0,n.jsx)(s.Spinner,{})});var d=e=>{const t=(0,o.useBlockProps)(),{attributes:r,name:a,setAttributes:d}=e,{displayCustomDate:u}=r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.InspectorControls,{children:(0,n.jsx)(s.PanelBody,{title:(0,i.__)("Settings","elasticpress"),children:(0,n.jsx)(s.ToggleControl,{label:(0,i.__)("Display custom date option","elasticpress"),checked:u,onChange:e=>d({displayCustomDate:e})})})}),(0,n.jsx)("div",{...t,children:(0,n.jsx)(s.Disabled,{children:(0,n.jsx)(l(),{attributes:{...r,isPreview:!0},block:a,EmptyResponsePlaceholder:c,LoadingResponsePlaceholder:p,skipBlockSupportAttributes:!0})})})]})},u=JSON.parse('{"u2":"elasticpress/facet-date"}');(0,e.registerBlockType)(u.u2,{icon:()=>(0,n.jsx)(t.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)(t.Path,{d:"M5 6V5.25C4.69933 5.25 4.42772 5.42957 4.30994 5.70621C4.19216 5.98285 4.25098 6.3031 4.45938 6.51983L5 6ZM10.1012 11.3053H10.8512V11.0032L10.6418 10.7854L10.1012 11.3053ZM10.1012 17.141H9.35121C9.35121 17.3638 9.45026 17.5751 9.62153 17.7176L10.1012 17.141ZM12.6518 19.2632L12.1721 19.8397C12.3891 20.0202 12.6891 20.0636 12.9483 19.9521C13.2076 19.8405 13.3822 19.5928 13.4003 19.3111L12.6518 19.2632ZM13.1619 11.3053L12.6213 10.7854L12.431 10.9833L12.4135 11.2573L13.1619 11.3053ZM18.2632 6L18.8038 6.51983C19.0122 6.3031 19.071 5.98285 18.9532 5.70621C18.8354 5.42957 18.5638 5.25 18.2632 5.25V6ZM4.45938 6.51983L9.56059 11.8251L10.6418 10.7854L5.54062 5.48017L4.45938 6.51983ZM9.35121 11.3053V17.141H10.8512V11.3053H9.35121ZM9.62153 17.7176L12.1721 19.8397L13.1315 18.6866L10.5809 16.5645L9.62153 17.7176ZM13.4003 19.3111L13.9104 11.3532L12.4135 11.2573L11.9034 19.2152L13.4003 19.3111ZM13.7026 11.8251L18.8038 6.51983L17.7225 5.48017L12.6213 10.7854L13.7026 11.8251ZM5 6.75H18.2632V5.25H5V6.75Z"})}),edit:d,save:()=>{}})}()}(); \ No newline at end of file diff --git a/dist/js/facets-date-block-view-script.asset.php b/dist/js/facets-date-block-view-script.asset.php new file mode 100644 index 0000000000..de9980fe8d --- /dev/null +++ b/dist/js/facets-date-block-view-script.asset.php @@ -0,0 +1 @@ + array('wp-dom-ready'), 'version' => '60b2b2b09e8922908d41'); diff --git a/dist/js/facets-date-block-view-script.js b/dist/js/facets-date-block-view-script.js new file mode 100644 index 0000000000..ffa0d09ad5 --- /dev/null +++ b/dist/js/facets-date-block-view-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.domReady;e.n(t)()((()=>{const e=document.querySelectorAll(".ep-facet-date-form"),t=epFacetDate.dateFilterName;e.forEach((function(e){e.addEventListener("submit",(function(e){e.preventDefault();const{value:r}=this.querySelector(`[name="${t}"]:checked`),{value:n}=this.querySelector(".ep-date-range-picker")?.querySelector(`[name="${t}_from"]`)||"",{value:o}=this.querySelector(".ep-date-range-picker")?.querySelector(`[name="${t}_to"]`)||"",a=window.location.href,c=new URL(a);"custom"!==r?c.searchParams.set(t,r):c.searchParams.set(t,`${n},${o}`),window.location.href=decodeURIComponent(c)}));e.querySelectorAll(".ep-radio").forEach((function(e){e.addEventListener("change",(function(){const t=e.closest(".ep-facet-date-form").querySelector(".ep-date-range-picker");"custom"===e.value?t?.classList.remove("is-hidden"):t?.classList.add("is-hidden")}))}))}))}))}(); \ No newline at end of file diff --git a/dist/js/facets-meta-block-script.asset.php b/dist/js/facets-meta-block-script.asset.php new file mode 100644 index 0000000000..29658a851e --- /dev/null +++ b/dist/js/facets-meta-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '4833511f6a5eda545ccc'); diff --git a/dist/js/facets-meta-block-script.js b/dist/js/facets-meta-block-script.js new file mode 100644 index 0000000000..062e9ef711 --- /dev/null +++ b/dist/js/facets-meta-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,r){var o=r(9196),s=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var n=Symbol.for;s=n("react.element"),n("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,n={},c=null,d=null;for(o in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)l.call(t,o)&&!i.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===n[o]&&(n[o]=t[o]);return{$$typeof:s,type:e,key:c,ref:d,props:n,_owner:a.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,r){e.exports=r(5251)},9196:function(e){e.exports=window.React}},t={};function r(o){var s=t[o];if(void 0!==s)return s.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.blocks,t=window.wp.primitives,o=r(5893),s=()=>(0,o.jsx)(t.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M5 6V5.25C4.69933 5.25 4.42772 5.42957 4.30994 5.70621C4.19216 5.98285 4.25098 6.3031 4.45938 6.51983L5 6ZM10.1012 11.3053H10.8512V11.0032L10.6418 10.7854L10.1012 11.3053ZM10.1012 17.141H9.35121C9.35121 17.3638 9.45026 17.5751 9.62153 17.7176L10.1012 17.141ZM12.6518 19.2632L12.1721 19.8397C12.3891 20.0202 12.6891 20.0636 12.9483 19.9521C13.2076 19.8405 13.3822 19.5928 13.4003 19.3111L12.6518 19.2632ZM13.1619 11.3053L12.6213 10.7854L12.431 10.9833L12.4135 11.2573L13.1619 11.3053ZM18.2632 6L18.8038 6.51983C19.0122 6.3031 19.071 5.98285 18.9532 5.70621C18.8354 5.42957 18.5638 5.25 18.2632 5.25V6ZM4.45938 6.51983L9.56059 11.8251L10.6418 10.7854L5.54062 5.48017L4.45938 6.51983ZM9.35121 11.3053V17.141H10.8512V11.3053H9.35121ZM9.62153 17.7176L12.1721 19.8397L13.1315 18.6866L10.5809 16.5645L9.62153 17.7176ZM13.4003 19.3111L13.9104 11.3532L12.4135 11.2573L11.9034 19.2152L13.4003 19.3111ZM13.7026 11.8251L18.8038 6.51983L17.7225 5.48017L12.6213 10.7854L13.7026 11.8251ZM5 6.75H18.2632V5.25H5V6.75Z"})}),n=window.wp.blockEditor,a=window.wp.components,l=window.wp.element,i=window.wp.i18n,c=window.wp.serverSideRender,d=r.n(c),p=({attributes:e})=>{const{type:t}=e;return(0,o.jsx)(n.Warning,{children:"taxonomy"===t?(0,i.__)("Preview unavailable. The selected taxonomy has no terms assigned to searchable content.","elasticpress"):(0,i.__)("Preview unavailable. There is no searchable content available with the selected metadata.","elasticpress")})},u=({onChange:e,checked:t})=>(0,o.jsx)(a.ToggleControl,{checked:t,label:(0,i.__)("Display count","elasticpress"),onChange:e}),h=window.wp.data,b=({onChange:e,value:t})=>{const r=(0,h.useSelect)((e=>e("elasticpress").getMetaKeys())),s=(0,l.useMemo)((()=>[{label:(0,i.__)("Select key","elasticpress"),value:""},...r.map((e=>({label:e,value:e})))]),[r]);return(0,o.jsx)(a.SelectControl,{disabled:s.length<=1,help:(0,l.createInterpolateElement)((0,i.__)("This is the list of metadata fields indexed in Elasticsearch. If your desired field does not appear in this list please try to sync your content","elasticpress"),{a:(0,o.jsx)("a",{href:window.epBlocks.syncUrl})}),label:(0,i.__)("Filter by","elasticpress"),onChange:e,options:s,value:t})},f=({onChange:e,orderby:t,order:r})=>{const s=[{label:(0,i.__)("Highest to lowest count"),value:"count/desc"},{label:(0,i.__)("Lowest to highest count"),value:"count/asc"},{label:(0,i._x)("A → Z","label for ordering posts by title in ascending order","elasticpress"),value:"name/asc"},{label:(0,i._x)("Z → A","label for ordering posts by title in descending order","elasticpress"),value:"name/desc"}];return(0,o.jsx)(a.SelectControl,{label:(0,i.__)("Order by","elasticpress"),onChange:t=>{const[r,o]=t.split("/");e({order:o,orderby:r})},options:s,value:`${t}/${r}`})},y=({onChange:e,value:t})=>(0,o.jsx)(a.TextControl,{label:(0,i.__)("Search field placeholder","elasticpress"),value:t,onChange:e}),v=({onChange:e,value:t})=>{const r=(0,h.useSelect)((e=>e("elasticpress").getTaxonomies())),s=(0,l.useMemo)((()=>[{label:(0,i.__)("Select taxonomy","elasticpress"),value:""},...Object.entries(r).map((([e,t])=>({label:`${t.label} (${e})`,value:e})))]),[r]);return(0,o.jsx)(a.SelectControl,{disabled:s.length<=1,help:"",label:(0,i.__)("Filter by","elasticpress"),onChange:e,options:s,value:t})},_=()=>(0,o.jsx)(a.Placeholder,{children:(0,o.jsx)(a.Spinner,{})}),w=JSON.parse('{"u2":"elasticpress/facet-meta"}'),x={from:[{type:"block",blocks:["elasticpress/facet-meta-range"],transform:t=>(0,e.createBlock)("elasticpress/facet-meta",t)}]};(0,e.registerBlockType)(w.u2,{icon:s,edit:({attributes:t,name:r,setAttributes:c})=>{const{displayCount:h,facet:w,orderby:x,order:g,searchPlaceholder:m,type:C}=t,{title:L}=(0,e.getBlockType)(r),j=(0,n.useBlockProps)(),k="meta"===C?b:v,S=e=>{c({facet:e})};return(0,o.jsxs)(l.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsxs)(a.PanelBody,{title:(0,i.__)("Settings","elasticpress"),children:[(0,o.jsx)(k,{onChange:S,value:w}),"meta"===C?(0,o.jsx)(y,{onChange:e=>{c({searchPlaceholder:e})},value:m}):null,(0,o.jsx)(u,{checked:h,onChange:e=>{c({displayCount:e})}}),(0,o.jsx)(f,{onChange:({orderby:e,order:t})=>{c({orderby:e,order:t})},orderby:x,order:g})]})}),(0,o.jsx)("div",{...j,children:w?(0,o.jsx)(a.Disabled,{children:(0,o.jsx)(d(),{attributes:{displayCount:h,facet:w,isPreview:!0,orderby:x,order:g,searchPlaceholder:m,type:C},block:r,EmptyResponsePlaceholder:p,LoadingResponsePlaceholder:_,skipBlockSupportAttributes:!0})}):(0,o.jsx)(a.Placeholder,{icon:s,label:L,children:(0,o.jsx)(k,{onChange:S,value:w})})})]})},save:()=>{},transforms:x})}()}(); \ No newline at end of file diff --git a/dist/js/facets-meta-range-block-script.asset.php b/dist/js/facets-meta-range-block-script.asset.php new file mode 100644 index 0000000000..378b510d54 --- /dev/null +++ b/dist/js/facets-meta-range-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '453d1e35e5d83a4ac2e8'); diff --git a/dist/js/facets-meta-range-block-script.js b/dist/js/facets-meta-range-block-script.js new file mode 100644 index 0000000000..c6c5d9531e --- /dev/null +++ b/dist/js/facets-meta-range-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,s){var n=s(9196),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 r=n.__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 p(e,t,s){var n,o={},p=null,u=null;for(n in void 0!==s&&(p=""+s),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:p,ref:u,props:o,_owner:r.current}}t.jsx=p,t.jsxs=p},5893:function(e,t,s){e.exports=s(5251)},9196:function(e){e.exports=window.React}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}!function(){var e=window.wp.blocks,t=window.wp.primitives,n=s(5893),i=()=>(0,n.jsxs)(t.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,n.jsx)(t.Path,{d:"M 9 11 L 15 11 L 15 13 L 9 13 Z"}),(0,n.jsx)(t.Path,{d:"M18.5 11H17.5V13H18.5V11ZM20 13C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11V13ZM16.5 9C16.5 8.44772 16.0523 8 15.5 8C14.9477 8 14.5 8.44772 14.5 9H16.5ZM8 9C8 8.44772 7.55228 8 7 8C6.44772 8 6 8.44772 6 9H8ZM6 15C6 15.5523 6.44772 16 7 16C7.55228 16 8 15.5523 8 15H6ZM14.5 15C14.5 15.5523 14.9477 16 15.5 16C16.0523 16 16.5 15.5523 16.5 15H14.5ZM18.5 13H20V11H18.5V13ZM6 9V15H8V9H6ZM14.5 9V15H16.5V9H14.5Z"}),(0,n.jsx)(t.Path,{d:"M4 11C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13V11ZM4 13H7V11H4V13Z"})]}),o=JSON.parse('{"u2":"elasticpress/facet-meta-range"}'),r=window.wp.blockEditor,a=window.wp.components,l=window.wp.data,p=window.wp.i18n,u=()=>(0,n.jsx)(a.Placeholder,{children:(0,n.jsx)(a.Spinner,{})}),c=window.wp.element,h=({onChange:e,value:t})=>{const s=(0,l.useSelect)((e=>e("elasticpress").getMetaKeys())),i=(0,c.useMemo)((()=>[{label:(0,p.__)("Select key","elasticpress"),value:""},...s.map((e=>({label:e,value:e})))]),[s]);return(0,n.jsx)(a.SelectControl,{disabled:i.length<=1,help:(0,c.createInterpolateElement)((0,p.__)("This is the list of metadata fields indexed in Elasticsearch. If your desired field does not appear in this list please try to sync your content","elasticpress"),{a:(0,n.jsx)("a",{href:window.epBlocks.syncUrl})}),label:(0,p.__)("Filter by","elasticpress"),onChange:e,options:i,value:t})};function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var f=s(9196);function m(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function v(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function g(e){return null!==e&&1===e.length?e[0]:e.slice()}function b(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function y(e,t){return x(function(e,t){let s=e;return s<=t.min&&(s=t.min),s>=t.max&&(s=t.max),s}(e,t),t)}function x(e,t){const s=(e-t.min)%t.step;let n=e-s;return 2*Math.abs(s)>=t.step&&(n+=s>0?t.step:-t.step),parseFloat(n.toFixed(5))}let w=function(e){function t(t){var s;(s=e.call(this,t)||this).onKeyUp=()=>{s.onEnd()},s.onMouseUp=()=>{s.onEnd(s.getMouseEventMap())},s.onTouchEnd=e=>{e.preventDefault(),s.onEnd(s.getTouchEventMap())},s.onBlur=()=>{s.setState({index:-1},s.onEnd(s.getKeyDownEventMap()))},s.onMouseMove=e=>{s.setState({pending:!0});const t=s.getMousePosition(e),n=s.getDiffPosition(t[0]),i=s.getValueFromPosition(n);s.move(i)},s.onTouchMove=e=>{if(e.touches.length>1)return;s.setState({pending:!0});const t=s.getTouchPosition(e);if(void 0===s.isScrolling){const e=t[0]-s.startPosition[0],n=t[1]-s.startPosition[1];s.isScrolling=Math.abs(n)>Math.abs(e)}if(s.isScrolling)return void s.setState({index:-1});const n=s.getDiffPosition(t[0]),i=s.getValueFromPosition(n);s.move(i)},s.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(s.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),s.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),s.moveUpByStep();break;case"Home":e.preventDefault(),s.move(s.props.min);break;case"End":e.preventDefault(),s.move(s.props.max);break;case"PageDown":e.preventDefault(),s.moveDownByStep(s.props.pageFn(s.props.step));break;case"PageUp":e.preventDefault(),s.moveUpByStep(s.props.pageFn(s.props.step))}},s.onSliderMouseDown=e=>{if(!s.props.disabled&&2!==e.button){if(s.setState({pending:!0}),!s.props.snapDragDisabled){const t=s.getMousePosition(e);s.forceValueFromPosition(t[0],(e=>{s.start(e,t[0]),b(s.getMouseEventMap())}))}m(e)}},s.onSliderClick=e=>{if(!s.props.disabled&&s.props.onSliderClick&&!s.hasMoved){const t=s.getMousePosition(e),n=y(s.calcValue(s.calcOffsetFromPosition(t[0])),s.props);s.props.onSliderClick(n)}},s.createOnKeyDown=e=>t=>{s.props.disabled||(s.start(e),b(s.getKeyDownEventMap()),m(t))},s.createOnMouseDown=e=>t=>{if(s.props.disabled||2===t.button)return;s.setState({pending:!0});const n=s.getMousePosition(t);s.start(e,n[0]),b(s.getMouseEventMap()),m(t)},s.createOnTouchStart=e=>t=>{if(s.props.disabled||t.touches.length>1)return;s.setState({pending:!0});const n=s.getTouchPosition(t);s.startPosition=n,s.isScrolling=void 0,s.start(e,n[0]),b(s.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},s.handleResize=()=>{const e=window.setTimeout((()=>{s.pendingResizeTimeouts.shift(),s.resize()}),0);s.pendingResizeTimeouts.push(e)},s.renderThumb=(e,t)=>{const n=s.props.thumbClassName+" "+s.props.thumbClassName+"-"+t+" "+(s.state.index===t?s.props.thumbActiveClassName:""),i={ref:e=>{s["thumb"+t]=e},key:s.props.thumbClassName+"-"+t,className:n,style:e,onMouseDown:s.createOnMouseDown(t),onTouchStart:s.createOnTouchStart(t),onFocus:s.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":s.props.orientation,"aria-valuenow":s.state.value[t],"aria-valuemin":s.props.min,"aria-valuemax":s.props.max,"aria-label":Array.isArray(s.props.ariaLabel)?s.props.ariaLabel[t]:s.props.ariaLabel,"aria-labelledby":Array.isArray(s.props.ariaLabelledby)?s.props.ariaLabelledby[t]:s.props.ariaLabelledby,"aria-disabled":s.props.disabled},o={index:t,value:g(s.state.value),valueNow:s.state.value[t]};return s.props.ariaValuetext&&(i["aria-valuetext"]="string"==typeof s.props.ariaValuetext?s.props.ariaValuetext:s.props.ariaValuetext(o)),s.props.renderThumb(i,o)},s.renderTrack=(e,t,n)=>{const i={key:s.props.trackClassName+"-"+e,className:s.props.trackClassName+" "+s.props.trackClassName+"-"+e,style:s.buildTrackStyle(t,s.state.upperBound-n)},o={index:e,value:g(s.state.value)};return s.props.renderTrack(i,o)};let n=v(t.value);n.length||(n=v(t.defaultValue)),s.pendingResizeTimeouts=[];const i=[];for(let e=0;ey(t,e)))}:null},i.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},i.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},i.onEnd=function(e){e&&function(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},i.getValue=function(){return g(this.state.value)},i.getClosestIndex=function(e){let t=Number.MAX_VALUE,s=-1;const{value:n}=this.state,i=n.length;for(let o=0;o{t(n),this.fireChangeEvent("onChange")}))},i.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},i.start=function(e,t){const s=this["thumb"+e];s&&s.focus();const{zIndices:n}=this.state;n.splice(n.indexOf(e),1),n.push(e),this.setState((s=>({startValue:s.value[e],startPosition:void 0!==t?t:s.startPosition,index:e,zIndices:n})))},i.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],s=y(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);this.move(Math.min(s,this.props.max))},i.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],s=y(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(s,this.props.min))},i.move=function(e){const t=this.state.value.slice(),{index:s}=this.state,{length:n}=t,i=t[s];if(e===i)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:o,max:r,min:a,minDistance:l}=this.props;if(!o){if(s>0){const n=t[s-1];en-l&&(e=n-l)}}t[s]=e,o&&n>1&&(e>i?(this.pushSucceeding(t,l,s),function(e,t,s,n){for(let i=0;io&&(t[e-1-i]=o)}}(n,t,l,r)):ee[n+1];n+=1,i=e[n]+t)e[n+1]=x(i,this.props)},i.pushPreceding=function(e,t,s){for(let n=s,i=e[n]-t;null!==e[n-1]&&i=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return s[this.posMinKey()]=e+"px",s},i.buildTrackStyle=function(e,t){const s={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return s[this.posMinKey()]=e,s[this.posMaxKey()]=t,s},i.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},i.renderThumbs=function(e){const{length:t}=e,s=[];for(let n=0;nt)):"number"==typeof e&&(e=Array.from({length:t}).map(((e,t)=>t)).filter((t=>t%e==0))),e.map(parseFloat).sort(((e,t)=>e-t)).map((e=>{const t=this.calcOffset(e),s={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(s)}))},i.render=function(){const e=[],{value:t}=this.state,s=t.length;for(let n=0;n{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},n,i,o)},t}(f.Component);w.displayName="ReactSlider",w.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>f.createElement("div",e),renderTrack:e=>f.createElement("div",e),renderMark:e=>f.createElement("span",e)};var M=w,C=({clearUrl:e,min:t,max:s,prefix:i,suffix:o,value:r,...a})=>(window.Cypress&&(window.app={sliderChange:a.onChange}),(0,n.jsxs)("div",{className:"ep-range-facet",children:[(0,n.jsx)("div",{className:"ep-range-facet__slider",children:(0,n.jsx)(M,{className:"ep-range-slider",minDistance:1,thumbActiveClassName:"ep-range-slider__thumb--active",thumbClassName:"ep-range-slider__thumb",trackClassName:"ep-range-slider__track",min:t,max:s,value:r,...a})}),(0,n.jsxs)("div",{className:"ep-range-facet__values",children:[i,r[0],o," — ",i,r[1],o]}),(0,n.jsxs)("div",{className:"ep-range-facet__action",children:[e?(0,n.jsx)("a",{href:e,children:(0,p.__)("Clear","elasticpress")}):null," ",(0,n.jsx)("button",{className:"wp-element-button",type:"submit",children:(0,p.__)("Filter","elasticpress")})]})]})),k={from:[{type:"block",blocks:["elasticpress/facet-meta"],transform:t=>(0,e.createBlock)("elasticpress/facet-meta-range",t)}]};(0,e.registerBlockType)(o.u2,{icon:i,edit:({attributes:t,name:s,setAttributes:o})=>{const{facet:c,prefix:d,suffix:f}=t,{title:m}=(0,e.getBlockType)(s),v=(0,r.useBlockProps)(),{min:g=!1,max:b=!1,isLoading:y=!1}=(0,l.useSelect)((e=>e("elasticpress").getMetaRange(c)||{isLoading:!0}),[c]),x=e=>{o({facet:e})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.InspectorControls,{children:(0,n.jsxs)(a.PanelBody,{title:(0,p.__)("Settings","elasticpress"),children:[(0,n.jsx)(h,{onChange:x,value:c}),(0,n.jsxs)(a.Flex,{children:[(0,n.jsx)(a.FlexItem,{children:(0,n.jsx)(a.TextControl,{label:(0,p.__)("Value prefix","elasticpress"),onChange:e=>{o({prefix:e})},value:d})}),(0,n.jsx)(a.FlexItem,{children:(0,n.jsx)(a.TextControl,{label:(0,p.__)("Value suffix","elasticpress"),onChange:e=>{o({suffix:e})},value:f})})]})]})}),(0,n.jsx)("div",{...v,children:c?y?(0,n.jsx)(u,{}):!1!==g&&!1!==b?(0,n.jsx)(a.Disabled,{children:(0,n.jsx)(C,{min:g,max:b,prefix:d,suffix:f,value:[g,b]})}):(0,n.jsx)(r.Warning,{children:(0,p.sprintf)((0,p.__)('Preview unavailable. The "%s" field does not appear to contain numeric values. Select a new meta field key or populate the field with numeric values to enable filtering by range.',"elasticpress"),c)}):(0,n.jsx)(a.Placeholder,{icon:i,label:m,children:(0,n.jsx)(h,{onChange:x,value:c})})})]})},save:()=>{},transforms:k})}()}(); \ No newline at end of file diff --git a/dist/js/facets-meta-range-block-view-script.asset.php b/dist/js/facets-meta-range-block-view-script.asset.php new file mode 100644 index 0000000000..1209cbc39f --- /dev/null +++ b/dist/js/facets-meta-range-block-view-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '5e7225d2683ff432129a'); diff --git a/dist/js/facets-meta-range-block-view-script.js b/dist/js/facets-meta-range-block-view-script.js new file mode 100644 index 0000000000..ade2c5978b --- /dev/null +++ b/dist/js/facets-meta-range-block-view-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,s){var n=s(9196),i=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,s){var n,o={},u=null,l=null;for(n in void 0!==s&&(u=""+s),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,n)&&!p.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:u,ref:l,props:o,_owner:r.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,s){e.exports=s(5251)},9196:function(e){e.exports=window.React}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.element,t=window.wp.domReady,n=s.n(t);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var o=s(9196);function r(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function a(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function p(e){return null!==e&&1===e.length?e[0]:e.slice()}function u(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function l(e,t){return c(function(e,t){let s=e;return s<=t.min&&(s=t.min),s>=t.max&&(s=t.max),s}(e,t),t)}function c(e,t){const s=(e-t.min)%t.step;let n=e-s;return 2*Math.abs(s)>=t.step&&(n+=s>0?t.step:-t.step),parseFloat(n.toFixed(5))}let h=function(e){function t(t){var s;(s=e.call(this,t)||this).onKeyUp=()=>{s.onEnd()},s.onMouseUp=()=>{s.onEnd(s.getMouseEventMap())},s.onTouchEnd=e=>{e.preventDefault(),s.onEnd(s.getTouchEventMap())},s.onBlur=()=>{s.setState({index:-1},s.onEnd(s.getKeyDownEventMap()))},s.onMouseMove=e=>{s.setState({pending:!0});const t=s.getMousePosition(e),n=s.getDiffPosition(t[0]),i=s.getValueFromPosition(n);s.move(i)},s.onTouchMove=e=>{if(e.touches.length>1)return;s.setState({pending:!0});const t=s.getTouchPosition(e);if(void 0===s.isScrolling){const e=t[0]-s.startPosition[0],n=t[1]-s.startPosition[1];s.isScrolling=Math.abs(n)>Math.abs(e)}if(s.isScrolling)return void s.setState({index:-1});const n=s.getDiffPosition(t[0]),i=s.getValueFromPosition(n);s.move(i)},s.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(s.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),s.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),s.moveUpByStep();break;case"Home":e.preventDefault(),s.move(s.props.min);break;case"End":e.preventDefault(),s.move(s.props.max);break;case"PageDown":e.preventDefault(),s.moveDownByStep(s.props.pageFn(s.props.step));break;case"PageUp":e.preventDefault(),s.moveUpByStep(s.props.pageFn(s.props.step))}},s.onSliderMouseDown=e=>{if(!s.props.disabled&&2!==e.button){if(s.setState({pending:!0}),!s.props.snapDragDisabled){const t=s.getMousePosition(e);s.forceValueFromPosition(t[0],(e=>{s.start(e,t[0]),u(s.getMouseEventMap())}))}r(e)}},s.onSliderClick=e=>{if(!s.props.disabled&&s.props.onSliderClick&&!s.hasMoved){const t=s.getMousePosition(e),n=l(s.calcValue(s.calcOffsetFromPosition(t[0])),s.props);s.props.onSliderClick(n)}},s.createOnKeyDown=e=>t=>{s.props.disabled||(s.start(e),u(s.getKeyDownEventMap()),r(t))},s.createOnMouseDown=e=>t=>{if(s.props.disabled||2===t.button)return;s.setState({pending:!0});const n=s.getMousePosition(t);s.start(e,n[0]),u(s.getMouseEventMap()),r(t)},s.createOnTouchStart=e=>t=>{if(s.props.disabled||t.touches.length>1)return;s.setState({pending:!0});const n=s.getTouchPosition(t);s.startPosition=n,s.isScrolling=void 0,s.start(e,n[0]),u(s.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},s.handleResize=()=>{const e=window.setTimeout((()=>{s.pendingResizeTimeouts.shift(),s.resize()}),0);s.pendingResizeTimeouts.push(e)},s.renderThumb=(e,t)=>{const n=s.props.thumbClassName+" "+s.props.thumbClassName+"-"+t+" "+(s.state.index===t?s.props.thumbActiveClassName:""),i={ref:e=>{s["thumb"+t]=e},key:s.props.thumbClassName+"-"+t,className:n,style:e,onMouseDown:s.createOnMouseDown(t),onTouchStart:s.createOnTouchStart(t),onFocus:s.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":s.props.orientation,"aria-valuenow":s.state.value[t],"aria-valuemin":s.props.min,"aria-valuemax":s.props.max,"aria-label":Array.isArray(s.props.ariaLabel)?s.props.ariaLabel[t]:s.props.ariaLabel,"aria-labelledby":Array.isArray(s.props.ariaLabelledby)?s.props.ariaLabelledby[t]:s.props.ariaLabelledby,"aria-disabled":s.props.disabled},o={index:t,value:p(s.state.value),valueNow:s.state.value[t]};return s.props.ariaValuetext&&(i["aria-valuetext"]="string"==typeof s.props.ariaValuetext?s.props.ariaValuetext:s.props.ariaValuetext(o)),s.props.renderThumb(i,o)},s.renderTrack=(e,t,n)=>{const i={key:s.props.trackClassName+"-"+e,className:s.props.trackClassName+" "+s.props.trackClassName+"-"+e,style:s.buildTrackStyle(t,s.state.upperBound-n)},o={index:e,value:p(s.state.value)};return s.props.renderTrack(i,o)};let n=a(t.value);n.length||(n=a(t.defaultValue)),s.pendingResizeTimeouts=[];const i=[];for(let e=0;el(t,e)))}:null},h.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},h.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},h.onEnd=function(e){e&&function(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},h.getValue=function(){return p(this.state.value)},h.getClosestIndex=function(e){let t=Number.MAX_VALUE,s=-1;const{value:n}=this.state,i=n.length;for(let o=0;o{t(n),this.fireChangeEvent("onChange")}))},h.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},h.start=function(e,t){const s=this["thumb"+e];s&&s.focus();const{zIndices:n}=this.state;n.splice(n.indexOf(e),1),n.push(e),this.setState((s=>({startValue:s.value[e],startPosition:void 0!==t?t:s.startPosition,index:e,zIndices:n})))},h.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],s=l(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);this.move(Math.min(s,this.props.max))},h.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],s=l(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(s,this.props.min))},h.move=function(e){const t=this.state.value.slice(),{index:s}=this.state,{length:n}=t,i=t[s];if(e===i)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:o,max:r,min:a,minDistance:p}=this.props;if(!o){if(s>0){const n=t[s-1];en-p&&(e=n-p)}}t[s]=e,o&&n>1&&(e>i?(this.pushSucceeding(t,p,s),function(e,t,s,n){for(let i=0;io&&(t[e-1-i]=o)}}(n,t,p,r)):ee[n+1];n+=1,i=e[n]+t)e[n+1]=c(i,this.props)},h.pushPreceding=function(e,t,s){for(let n=s,i=e[n]-t;null!==e[n-1]&&i=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return s[this.posMinKey()]=e+"px",s},h.buildTrackStyle=function(e,t){const s={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return s[this.posMinKey()]=e,s[this.posMaxKey()]=t,s},h.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},h.renderThumbs=function(e){const{length:t}=e,s=[];for(let n=0;nt)):"number"==typeof e&&(e=Array.from({length:t}).map(((e,t)=>t)).filter((t=>t%e==0))),e.map(parseFloat).sort(((e,t)=>e-t)).map((e=>{const t=this.calcOffset(e),s={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(s)}))},h.render=function(){const e=[],{value:t}=this.state,s=t.length;for(let n=0;n{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},n,i,r)},t}(o.Component);h.displayName="ReactSlider",h.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>o.createElement("div",e),renderTrack:e=>o.createElement("div",e),renderMark:e=>o.createElement("span",e)};var d=h,f=window.wp.i18n,m=s(5893),v=({clearUrl:e,min:t,max:s,prefix:n,suffix:i,value:o,...r})=>(window.Cypress&&(window.app={sliderChange:r.onChange}),(0,m.jsxs)("div",{className:"ep-range-facet",children:[(0,m.jsx)("div",{className:"ep-range-facet__slider",children:(0,m.jsx)(d,{className:"ep-range-slider",minDistance:1,thumbActiveClassName:"ep-range-slider__thumb--active",thumbClassName:"ep-range-slider__thumb",trackClassName:"ep-range-slider__track",min:t,max:s,value:o,...r})}),(0,m.jsxs)("div",{className:"ep-range-facet__values",children:[n,o[0],i," — ",n,o[1],i]}),(0,m.jsxs)("div",{className:"ep-range-facet__action",children:[e?(0,m.jsx)("a",{href:e,children:(0,f.__)("Clear","elasticpress")}):null," ",(0,m.jsx)("button",{className:"wp-element-button",type:"submit",children:(0,f.__)("Filter","elasticpress")})]})]}));const g=({max:t,min:s})=>{const n=Math.ceil(t.max),i=Math.floor(s.min),o=t.value?parseInt(t.value,10):n,r=s.value?parseInt(s.value,10):i,[a,p]=(0,e.useState)(o),[u,l]=(0,e.useState)(r),c=(0,e.useMemo)((()=>s.dataset.prefix),[s]),h=(0,e.useMemo)((()=>s.dataset.suffix),[s]),d=(0,e.useMemo)((()=>""!==s.value?s.form.action:null),[s]);return(0,e.useLayoutEffect)((()=>{t.value=Math.min(n,a),s.value=Math.max(i,u)}),[u,a,s,t,i,n]),(0,m.jsx)(v,{clearUrl:d,max:n,min:i,prefix:c,suffix:h,onChange:([e,t])=>{p(t),l(e)},value:[u,a]})};n()((()=>{document.querySelectorAll(".ep-facet-meta-range").forEach((t=>{const[s,n]=t.querySelectorAll('input[type="hidden"]'),i=document.createElement("div");if(t.insertAdjacentElement("afterbegin",i),"function"===typeof e.createRoot){(0,e.createRoot)(i).render((0,m.jsx)(g,{min:s,max:n}))}else(0,e.render)((0,m.jsx)(g,{min:s,max:n}),i)}))}))}()}(); \ No newline at end of file diff --git a/dist/js/facets-post-type-block-script.asset.php b/dist/js/facets-post-type-block-script.asset.php new file mode 100644 index 0000000000..5f76d74374 --- /dev/null +++ b/dist/js/facets-post-type-block-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'defef2edf612b27ea48f'); diff --git a/dist/js/facets-post-type-block-script.js b/dist/js/facets-post-type-block-script.js new file mode 100644 index 0000000000..f9d2ad91fa --- /dev/null +++ b/dist/js/facets-post-type-block-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,r,t){var o=t(9196),n=60103;if(r.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var s=Symbol.for;n=s("react.element"),r.Fragment=s("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var o,s={},c=null,d=null;for(o in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(d=r.ref),r)l.call(r,o)&&!i.hasOwnProperty(o)&&(s[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===s[o]&&(s[o]=r[o]);return{$$typeof:n,type:e,key:c,ref:d,props:s,_owner:a.current}}r.jsx=c,r.jsxs=c},5893:function(e,r,t){e.exports=t(5251)},9196:function(e){e.exports=window.React}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var s=r[o]={exports:{}};return e[o](s,s.exports,t),s.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},function(){var e=window.wp.blocks,r=window.wp.primitives,o=t(5893),n=window.wp.blockEditor,s=window.wp.components,a=window.wp.i18n,l=window.wp.serverSideRender,i=t.n(l),c=({attributes:e})=>{const{type:r}=e;return(0,o.jsx)(n.Warning,{children:"taxonomy"===r?(0,a.__)("Preview unavailable. The selected taxonomy has no terms assigned to searchable content.","elasticpress"):(0,a.__)("Preview unavailable. There is no searchable content available with the selected metadata.","elasticpress")})},d=({onChange:e,checked:r})=>(0,o.jsx)(s.ToggleControl,{checked:r,label:(0,a.__)("Display count","elasticpress"),onChange:e}),p=({onChange:e,orderby:r,order:t})=>{const n=[{label:(0,a.__)("Highest to lowest count"),value:"count/desc"},{label:(0,a.__)("Lowest to highest count"),value:"count/asc"},{label:(0,a._x)("A → Z","label for ordering posts by title in ascending order","elasticpress"),value:"name/asc"},{label:(0,a._x)("Z → A","label for ordering posts by title in descending order","elasticpress"),value:"name/desc"}];return(0,o.jsx)(s.SelectControl,{label:(0,a.__)("Order by","elasticpress"),onChange:r=>{const[t,o]=r.split("/");e({order:o,orderby:t})},options:n,value:`${r}/${t}`})},u=({onChange:e,value:r})=>(0,o.jsx)(s.TextControl,{label:(0,a.__)("Search field placeholder","elasticpress"),value:r,onChange:e}),h=()=>(0,o.jsx)(s.Placeholder,{children:(0,o.jsx)(s.Spinner,{})});var b=e=>{const{attributes:r,name:t,setAttributes:l}=e,{searchPlaceholder:b,displayCount:f,orderby:v,order:w}=r,_=(0,n.useBlockProps)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsxs)(s.PanelBody,{title:(0,a.__)("Settings","elasticpress"),children:[(0,o.jsx)(u,{onChange:e=>{l({searchPlaceholder:e})},value:b}),(0,o.jsx)(d,{checked:f,onChange:e=>{l({displayCount:e})}}),(0,o.jsx)(p,{onChange:({orderby:e,order:r})=>{l({orderby:e,order:r})},orderby:v,order:w})]})}),(0,o.jsx)("div",{..._,children:(0,o.jsx)(s.Disabled,{children:(0,o.jsx)(i(),{attributes:{...r,isPreview:!0},block:t,EmptyResponsePlaceholder:c,LoadingResponsePlaceholder:h,skipBlockSupportAttributes:!0})})})]})},f=JSON.parse('{"u2":"elasticpress/facet-post-type"}');(0,e.registerBlockType)(f.u2,{edit:b,save:()=>{},icon:()=>(0,o.jsx)(r.SVG,{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M5 6V5.25C4.69933 5.25 4.42772 5.42957 4.30994 5.70621C4.19216 5.98285 4.25098 6.3031 4.45938 6.51983L5 6ZM10.1012 11.3053H10.8512V11.0032L10.6418 10.7854L10.1012 11.3053ZM10.1012 17.141H9.35121C9.35121 17.3638 9.45026 17.5751 9.62153 17.7176L10.1012 17.141ZM12.6518 19.2632L12.1721 19.8397C12.3891 20.0202 12.6891 20.0636 12.9483 19.9521C13.2076 19.8405 13.3822 19.5928 13.4003 19.3111L12.6518 19.2632ZM13.1619 11.3053L12.6213 10.7854L12.431 10.9833L12.4135 11.2573L13.1619 11.3053ZM18.2632 6L18.8038 6.51983C19.0122 6.3031 19.071 5.98285 18.9532 5.70621C18.8354 5.42957 18.5638 5.25 18.2632 5.25V6ZM4.45938 6.51983L9.56059 11.8251L10.6418 10.7854L5.54062 5.48017L4.45938 6.51983ZM9.35121 11.3053V17.141H10.8512V11.3053H9.35121ZM9.62153 17.7176L12.1721 19.8397L13.1315 18.6866L10.5809 16.5645L9.62153 17.7176ZM13.4003 19.3111L13.9104 11.3532L12.4135 11.2573L11.9034 19.2152L13.4003 19.3111ZM13.7026 11.8251L18.8038 6.51983L17.7225 5.48017L12.6213 10.7854L13.7026 11.8251ZM5 6.75H18.2632V5.25H5V6.75Z"})})})}()}(); \ No newline at end of file diff --git a/dist/js/facets-script.asset.php b/dist/js/facets-script.asset.php new file mode 100644 index 0000000000..20a08cba87 --- /dev/null +++ b/dist/js/facets-script.asset.php @@ -0,0 +1 @@ + array('wp-hooks'), 'version' => 'd4abbb898a84170fea32'); diff --git a/dist/js/facets-script.js b/dist/js/facets-script.js new file mode 100644 index 0000000000..f6f164242f --- /dev/null +++ b/dist/js/facets-script.js @@ -0,0 +1 @@ +!function(){"use strict";window.wp.hooks;const e=(e,t)=>{let r=null;return function(...c){const o=this;window.clearTimeout(r),r=window.setTimeout((()=>{e.apply(o,c)}),t)}};document.querySelectorAll(".widget_ep-facet, .wp-block-elasticpress-facet").forEach((t=>{if(!t.querySelector(".facet-search"))return;const r=t.querySelector(".terms");t.querySelector(".facet-search").addEventListener("keyup",e((e=>{13!==e.keyCode&&((e,t)=>{const{target:r}=e,c=r.value.toLowerCase();t.querySelectorAll(".term").forEach((e=>{const t=e.getAttribute("data-term-slug");e.getAttribute("data-term-name").includes(c)||t.includes(c)?e.classList.remove("hide"):e.classList.add("hide")}))})(e,r)}),200))}))}(); \ No newline at end of file diff --git a/dist/js/features-script.asset.php b/dist/js/features-script.asset.php new file mode 100644 index 0000000000..e698921ab0 --- /dev/null +++ b/dist/js/features-script.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '8430613a21d873d78fb1'); diff --git a/dist/js/features-script.js b/dist/js/features-script.js new file mode 100644 index 0000000000..d51cc38451 --- /dev/null +++ b/dist/js/features-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,s,t){var n=t(9196),a=60103;if(s.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var r=Symbol.for;a=r("react.element"),s.Fragment=r("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,s,t){var n,r={},c=null,u=null;for(n in void 0!==t&&(c=""+t),void 0!==s.key&&(c=""+s.key),void 0!==s.ref&&(u=s.ref),s)l.call(s,n)&&!o.hasOwnProperty(n)&&(r[n]=s[n]);if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===r[n]&&(r[n]=s[n]);return{$$typeof:a,type:e,key:c,ref:u,props:r,_owner:i.current}}s.jsx=c,s.jsxs=c},5893:function(e,s,t){e.exports=t(5251)},9196:function(e){e.exports=window.React}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var r=s[n]={exports:{}};return e[n](r,r.exports,t),r.exports}t.n=function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,{a:s}),s},t.d=function(e,s){for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},t.o=function(e,s){return Object.prototype.hasOwnProperty.call(e,s)},function(){var e=window.wp.element,s=window.wp.i18n,n=window.wp.components,a=window.wp.data,r=window.wp.notices,i=t(5893);const l=(0,e.createContext)(),o=({children:s,title:t})=>{const{createNotice:o,removeNotice:c}=(0,a.useDispatch)(r.store),{notices:u}=(0,a.useSelect)((e=>({notices:e(r.store).getNotices()})),[]),d=(0,e.useMemo)((()=>({createNotice:o,removeNotice:c})),[o,c]);return(0,i.jsx)(l.Provider,{value:d,children:(0,i.jsxs)("div",{className:"ep-settings-page",children:[(0,i.jsxs)("div",{className:"ep-settings-page__wrap",children:[(0,i.jsx)("h1",{className:"ep-settings-page__title",children:t}),s]}),(0,i.jsx)(n.SnackbarList,{className:"ep-settings-page__snackbar-list",notices:u,onRemove:e=>c(e)})]})})},{apiUrl:c,epioLogoUrl:u,features:d,indexMeta:p,settings:g,settingsDraft:h,syncUrl:f}=window.epDashboard;var y=window.wp.apiFetch,m=t.n(y),_=window.lodash;const x=(0,e.createContext)(),b=({apiUrl:s,children:t,defaultSettings:n,epioLogoUrl:a,features:r,indexMeta:l,syncedSettings:o})=>{const[c,u]=(0,e.useState)(!1),[d,p]=(0,e.useState)(!!l),[g,h]=(0,e.useState)({...n}),[f,y]=(0,e.useState)({...o}),b=(0,e.useCallback)((e=>r.find((s=>s.slug===e))),[r]),v=(0,e.useMemo)((()=>!(0,_.isEqual)(g,f)),[g,f]),S=(0,e.useCallback)(((e,s,t)=>t&&e&&"0"!==e&&e!==s),[]),w=(0,e.useCallback)((e=>{const{slug:s,settingsSchema:t}=e;return t.some((e=>{if(!0!==g?.[s]?.active)return!1;const t=e.requires_sync,n=g?.[s]?.[e.key],a=o?.[s]?.[e.key];return S(n,a,t)}))}),[g,o,S]),j=(0,e.useMemo)((()=>r.reduce(((e,s)=>(w(s)&&e.push(s.slug),e)),[])),[r,w]),C=(0,e.useMemo)((()=>!!j.length),[j]),F={epioLogoUrl:a,features:r,featuresRequiringSync:j,getFeature:b,isBusy:c,isModified:v,isSyncing:d,setIsSyncing:p,isSyncRequired:C,resetSettings:()=>{h({...f})},saveSettings:async()=>{try{u(!0);const e=await m()({body:JSON.stringify(g),headers:{"Content-Type":"application/json"},method:"PUT",url:s});y(e.data)}finally{u(!1)}},savedSettings:f,syncedSettings:o,settings:g,setSettings:h,willSettingRequireSync:S};return(0,i.jsx)(x.Provider,{value:F,children:t})},v=()=>(0,e.useContext)(x);var S=window.wp.dom,w=({disabled:t,help:a,label:r,name:l,onChange:o,options:c,requiresFeature:u,requiresSync:d,syncedValue:p,type:g,value:h})=>{const{getFeature:f,isBusy:y,settings:m,willSettingRequireSync:_}=v(),x=a?(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,S.safeHTML)(a)}}):null,b=c?c.map((e=>({value:e.value,label:(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,S.safeHTML)(e.label)}})}))):[],w=!(!u||!0===m[u]?.active)&&f(u),j="active"===l?(0,s.__)("The %s feature must be enabled to use this feature.","elasticpress"):(0,s.__)("The %s feature must be enabled to use the following setting.","elasticpress"),C="active"===l?(0,s.__)("Enabling this feature requires re-syncing your content.","elasticpress"):(0,s.__)("A change to following setting requires re-syncing your content.","elasticpress"),F=y||t||w,T=_(h,p,d),M=e=>{o(e?"1":"0")},N=e=>{const s=e.map((e=>c.find((s=>s.label===e))?.value)).filter(Boolean).join(",");o(s)};return(0,i.jsxs)(i.Fragment,{children:[w?(0,i.jsx)(n.Notice,{isDismissible:!1,status:"active"===l?"error":"warning",children:(0,s.sprintf)(j,w.shortTitle)}):null,T?(0,i.jsx)(n.Notice,{isDismissible:!1,status:"warning",children:C}):null,(0,i.jsx)("div",{className:"ep-dashboard-control",children:(()=>{switch(g){case"checkbox":return(0,i.jsx)(n.CheckboxControl,{checked:"1"===h,help:x,label:r,onChange:M,disabled:F});case"hidden":return null;case"markup":return(0,i.jsx)(e.RawHTML,{children:(0,S.safeHTML)(r)});case"multiple":{const e=c.map((e=>e.label)),s=h.split(",").map((e=>c.find((s=>s.value===e))?.label)).filter(Boolean);return(0,i.jsx)(n.FormTokenField,{__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,label:r,onChange:N,disabled:F,suggestions:e,value:s})}case"radio":return(0,i.jsx)(n.RadioControl,{help:x,label:r,onChange:o,options:b,disabled:F,selected:h});case"select":return(0,i.jsx)(n.SelectControl,{help:x,label:r,onChange:o,options:c,disabled:F,value:h});case"toggle":return(0,i.jsx)(n.ToggleControl,{checked:h,help:x,label:r,onChange:o,disabled:F});case"textarea":return(0,i.jsx)(n.TextareaControl,{help:x,label:r,onChange:o,disabled:F,value:h});default:return(0,i.jsx)(n.TextControl,{help:x,label:r,onChange:o,disabled:F,value:h,type:g})}})()})]})},j=({feature:e,settingsSchema:s})=>{const{getFeature:t,settings:n,setSettings:a,syncedSettings:r}=v(),{isAvailable:l}=t(e);return s.map((s=>{const{default:t,disabled:o,help:c,key:u,label:d,options:p,requires_feature:g,requires_sync:h,type:f}=s;let y="undefined"!==typeof n[e]?.[u]?n[e][u]:t;return"active"!==u||l||(y=!1),(0,i.jsx)(w,{disabled:o||!l,help:c,label:d,name:u,onChange:s=>((s,t)=>{a({...n,[e]:{...n[e],[s]:t}})})(u,s),options:p,syncedValue:r?.[e]?.[u],requiresFeature:g,requiresSync:h,type:f,value:y},u)}))},C=({feature:t})=>{const{epioLogoUrl:a,getFeature:r}=v(),{isPoweredByEpio:l,reqStatusCode:o,reqStatusMessages:c,settingsSchema:u,summary:d,title:p}=r(t);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("h3",{className:"ep-dashboard-heading",children:[(0,i.jsx)(e.RawHTML,{children:(0,S.safeHTML)(p)}),l?(0,i.jsx)("img",{alt:(0,s.__)("ElasticPress.io logo"),height:"20",src:a,width:"110"}):null]}),(0,i.jsx)("p",{dangerouslySetInnerHTML:{__html:(0,S.safeHTML)(d)}}),c.map(((e,s)=>(0,i.jsx)(n.Notice,{isDismissible:!1,status:2===o?"error":"warning",children:(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,S.safeHTML)(e)}})},s))),(0,i.jsx)(j,{feature:t,settingsSchema:u})]})},F=({feature:e})=>{const{getFeature:t,featuresRequiringSync:n}=v(),{shortTitle:a,isAvailable:r}=t(e),l=r?"":(0,s.__)("Unavailable","elasticpress"),o=n.includes(e)?(0,s.__)("Sync required","elasticpress"):l;return(0,i.jsxs)("div",{className:"ep-feature-tab",children:[a,o?(0,i.jsx)("small",{className:"ep-feature-tab__status",children:o}):null]})},T=()=>{const{createNotice:t}=(0,e.useContext)(l),{features:a,isBusy:r,isModified:o,isSyncing:c,isSyncRequired:u,resetSettings:d,saveSettings:p,setIsSyncing:g}=v(),h=(0,e.useMemo)((()=>{const e=new URL(f);return e.searchParams.append("do_sync","features"),e.toString()}),[]),y=(0,s.__)("Could not save feature settings. Please try again.","elasticpress"),m=[{url:f,label:(0,s.__)("View sync status","elasticpress")}],_=(0,s.__)("Cannot save settings while a sync is in progress.","elasticpress"),x=(0,s.__)("Changes to feature settings discarded.","elasticpress"),b=[{url:h,label:(0,s.__)("Sync","elasticpress")}],S=(0,s.__)("If you choose to sync later some settings changes may not take effect until the sync is performed. Save and sync later?","elasticpress"),w=(0,s.__)("Saving these settings will begin re-syncing your content. Save and sync now?","elasticpress"),j=(0,s.__)("Feature settings saved. Starting sync…","elasticpress"),T=(0,s.__)("Feature settings saved.","elasticpress"),[M,N]=(0,e.useState)(!1),k=a.filter((e=>e.isVisible)).map((e=>({name:e.slug,title:(0,i.jsx)(F,{feature:e.slug})}))),L=e=>{if("is_syncing"===e.data)return t("error",_,{actions:m}),void g(!0);const n=`${(0,s.__)("ElasticPress: Could not save feature settings.","elasticpress")}\n${e.message}`;console.error(n),t("error",y)};return(0,i.jsxs)("form",{onReset:e=>{e.preventDefault(),d(),t("success",x)},onSubmit:async e=>{if(e.preventDefault(),!u||window.confirm(w)){N(!1);try{await p(),u?(t("success",j),window.location=h):t("success",T)}catch(e){L(e)}}},children:[(0,i.jsx)(n.Panel,{className:"ep-dashboard-panel",children:(0,i.jsxs)(n.PanelBody,{children:[c?(0,i.jsx)(n.Notice,{actions:m,isDismissible:!1,status:"warning",children:_}):null,(0,i.jsx)(n.TabPanel,{className:"ep-dashboard-tabs",orientation:"vertical",tabs:k,children:({name:e})=>(0,i.jsx)(C,{feature:e},e)})]})}),(0,i.jsxs)(n.Flex,{justify:"start",children:[(0,i.jsx)(n.FlexItem,{children:(0,i.jsx)(n.Button,{disabled:r||c,isBusy:r&&!M,type:"submit",variant:"primary",children:u?(0,s.__)("Save and sync now","elasticpress"):(0,s.__)("Save changes","elasticpress")})}),u?(0,i.jsx)(n.FlexItem,{children:(0,i.jsx)(n.Button,{disabled:r||c,isBusy:r&&M,onClick:async()=>{if(window.confirm(S)){N(!0);try{await p(!1),t("success",T,{actions:b})}catch(e){L(e)}}},type:"button",variant:"secondary",children:(0,s.__)("Save and sync later","elasticpress")})}):null,o?(0,i.jsx)(n.FlexItem,{children:(0,i.jsx)(n.Button,{disabled:r,type:"reset",variant:"tertiary",children:(0,s.__)("Discard changes","elasticpress")})}):null]})]})};const M=()=>(0,i.jsx)(o,{title:(0,s.__)("Features","elasticpress"),children:(0,i.jsxs)(b,{apiUrl:c,defaultSettings:h||g,epioLogoUrl:u,features:d,indexMeta:p,syncedSettings:g,syncUrl:f,children:[(0,i.jsx)("p",{children:(0,e.createInterpolateElement)((0,s.__)("ElasticPress Features add functionality to enhance search and queries on your site. You may choose to activate some or all of these Features depending on your needs. You can learn more about each Feature here.","elasticpress"),{a:(0,i.jsx)("a",{target:"_blank",href:"https://elasticpress.zendesk.com/hc/en-us/articles/16671825423501-Features",rel:"noreferrer"})})}),(0,i.jsx)(T,{})]})});if("function"===typeof e.createRoot){(0,e.createRoot)(document.getElementById("ep-dashboard")).render((0,i.jsx)(M,{}))}else(0,e.render)((0,i.jsx)(M,{}),document.getElementById("ep-dashboard"))}()}(); \ No newline at end of file diff --git a/dist/js/instant-results-admin-script.asset.php b/dist/js/instant-results-admin-script.asset.php new file mode 100644 index 0000000000..136c25fc7c --- /dev/null +++ b/dist/js/instant-results-admin-script.asset.php @@ -0,0 +1 @@ + array('react', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'faccfec234d7edd65807'); diff --git a/dist/js/instant-results-admin-script.js b/dist/js/instant-results-admin-script.js new file mode 100644 index 0000000000..96bda4a90c --- /dev/null +++ b/dist/js/instant-results-admin-script.js @@ -0,0 +1 @@ +!function(){"use strict";var e={5251:function(e,t,n){var a=n(9196),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var s=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function f(e,t,n){var a,r={},f=null,u=null;for(a in void 0!==n&&(f=""+n),void 0!==t.key&&(f=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,a)&&!i.hasOwnProperty(a)&&(r[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===r[a]&&(r[a]=t[a]);return{$$typeof:o,type:e,key:f,ref:u,props:r,_owner:s.current}}t.jsx=f,t.jsxs=f},5893:function(e,t,n){e.exports=n(5251)},9196:function(e){e.exports=window.React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}!function(){var e=window.wp.element,t=window.wp.components,a=window.wp.i18n;const{facets:o}=window.epInstantResultsAdmin;var r=n(5893),s=({defaultValue:n,...s})=>{const l=n.split(","),[i,f]=(0,e.useState)(l),u=e=>o[e]?.label,d=e=>Object.keys(o).find((t=>e===o[t].label)),c=(0,e.useMemo)((()=>Object.keys(o).map(u).filter(Boolean)),[]),p=(0,e.useMemo)((()=>i.map(u).filter(Boolean)),[i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.FormTokenField,{__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,label:(0,a.__)("Select filters","elasticpress"),onChange:e=>{f(e.map(d).filter(Boolean))},suggestions:c,value:p}),(0,r.jsx)("input",{type:"hidden",value:i.join(","),...s})]})};document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("feature_instant_results_facets");if(!t)return;const{className:n,dataset:{fieldName:a},id:o,name:l,value:i}=t;if("function"===typeof e.createRoot){(0,e.createRoot)(t.parentElement).render((0,r.jsx)(s,{className:n,"data-field-name":a,defaultValue:i,id:o,name:l}))}else(0,e.render)((0,r.jsx)(s,{className:n,"data-field-name":a,defaultValue:i,id:o,name:l}),t.parentElement)}))}()}(); \ No newline at end of file diff --git a/dist/js/instant-results-script.asset.php b/dist/js/instant-results-script.asset.php new file mode 100644 index 0000000000..067f2dcb89 --- /dev/null +++ b/dist/js/instant-results-script.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-primitives'), 'version' => 'ff98e3609d98b243c04d'); diff --git a/dist/js/instant-results-script.js b/dist/js/instant-results-script.js new file mode 100644 index 0000000000..545e1eae1b --- /dev/null +++ b/dist/js/instant-results-script.js @@ -0,0 +1 @@ +!function(){var e={4483:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n element.");return c.cloneElement(t,{ref:function(n){var r=e.props.containerElements;t&&("function"===typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=r||[n]}})}return null}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(c.Component),h="undefined"===typeof Element?Function:Element;d.propTypes={active:u.bool,paused:u.bool,focusTrapOptions:u.shape({document:u.object,onActivate:u.func,onPostActivate:u.func,checkCanFocusTrap:u.func,onDeactivate:u.func,onPostDeactivate:u.func,checkCanReturnFocus:u.func,initialFocus:u.oneOfType([u.instanceOf(h),u.string,u.func,u.bool]),fallbackFocus:u.oneOfType([u.instanceOf(h),u.string,u.func]),escapeDeactivates:u.oneOfType([u.bool,u.func]),clickOutsideDeactivates:u.oneOfType([u.bool,u.func]),returnFocusOnDeactivate:u.bool,setReturnFocus:u.oneOfType([u.instanceOf(h),u.string,u.func]),allowOutsideClick:u.oneOfType([u.bool,u.func]),preventScroll:u.bool}),containerElements:u.arrayOf(u.instanceOf(h)),children:u.oneOfType([u.element,u.instanceOf(h)])},d.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:p},e.exports=d},4291:function(e,t,n){"use strict";n.r(t),n.d(t,{createFocusTrap:function(){return O}});var r=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],s=r.join(","),a="undefined"===typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(s));return t&&a.call(e,s)&&r.unshift(e),r=r.filter(n)},i=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:"AUDIO"!==e.nodeName&&"VIDEO"!==e.nodeName&&"DETAILS"!==e.nodeName||null!==e.getAttribute("tabindex")?e.tabIndex:0:t},c=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},l=function(e){return"INPUT"===e.tagName},u=function(e){return function(e){return l(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||e.ownerDocument,r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!==typeof window&&"undefined"!==typeof window.CSS&&"function"===typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var s=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(a.call(n,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var r=e.getBoundingClientRect(),s=r.width,o=r.height;return 0===s&&0===o}}else for(;e;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(t,e.displayCheck)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(l(e)||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||"BUTTON"===e.tagName)for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},deactivateTrap:function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}}}(),y=function(e){return setTimeout(e,0)},x=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},_=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?n-1:0),o=1;o0)return{container:e,firstTabbableNode:n[0],lastTabbableNode:n[n.length-1],nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=r.findIndex((function(t){return t===e}));return t?r.slice(n+1).find((function(e){return h(e)})):r.slice(0,n).reverse().find((function(e){return h(e)}))}}})).filter((function(e){return!!e})),a.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},T=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!s.preventScroll}),a.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"===typeof e.select}(t)&&t.select()):e(O()))},S=function(e){var t=f("setReturnFocus",e);return t||!1!==t&&e},k=function(e){var t=w(e);u(t)||(_(s.clickOutsideDeactivates,e)?n.deactivate({returnFocus:s.returnFocusOnDeactivate&&!m(t)}):_(s.allowOutsideClick,e)||e.preventDefault())},j=function(e){var t=w(e),n=u(t);n||t instanceof Document?n&&(a.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),T(a.mostRecentlyFocusedNode||O()))},C=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==_(s.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=w(e);E();var n=null;if(a.tabbableGroups.length>0){var r=x(a.tabbableGroups,(function(e){return e.container.contains(t)})),s=r>=0?a.tabbableGroups[r]:void 0;if(r<0)n=e.shiftKey?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var o=x(a.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(o<0&&(s.container===t||m(t)&&!h(t)&&!s.nextTabbableNode(t,!1))&&(o=r),o>=0){var i=0===o?a.tabbableGroups.length-1:o-1;n=a.tabbableGroups[i].lastTabbableNode}}else{var c=x(a.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(c<0&&(s.container===t||m(t)&&!h(t)&&!s.nextTabbableNode(t))&&(c=r),c>=0){var l=c===a.tabbableGroups.length-1?0:c+1;n=a.tabbableGroups[l].firstTabbableNode}}}else n=f("fallbackFocus");n&&(e.preventDefault(),T(n))}(e)},P=function(e){if(!_(s.clickOutsideDeactivates,e)){var t=w(e);u(t)||_(s.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}},N=function(){if(a.active)return b.activateTrap(n),a.delayInitialFocusTimer=s.delayInitialFocus?y((function(){T(O())})):T(O()),r.addEventListener("focusin",j,!0),r.addEventListener("mousedown",k,{capture:!0,passive:!1}),r.addEventListener("touchstart",k,{capture:!0,passive:!1}),r.addEventListener("click",P,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),n},R=function(){if(a.active)return r.removeEventListener("focusin",j,!0),r.removeEventListener("mousedown",k,!0),r.removeEventListener("touchstart",k,!0),r.removeEventListener("click",P,!0),r.removeEventListener("keydown",C,!0),n};return(n={activate:function(e){if(a.active)return this;var t=l(e,"onActivate"),n=l(e,"onPostActivate"),s=l(e,"checkCanFocusTrap");s||E(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,t&&t();var o=function(){s&&E(),N(),n&&n()};return s?(s(a.containers.concat()).then(o,o),this):(o(),this)},deactivate:function(e){if(!a.active)return this;clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,R(),a.active=!1,a.paused=!1,b.deactivateTrap(n);var t=l(e,"onDeactivate"),r=l(e,"onPostDeactivate"),s=l(e,"checkCanReturnFocus");t&&t();var o=l(e,"returnFocus","returnFocusOnDeactivate"),i=function(){y((function(){o&&T(S(a.nodeFocusedBeforeActivation)),r&&r()}))};return o&&s?(s(S(a.nodeFocusedBeforeActivation)).then(i,i),this):(i(),this)},pause:function(){return a.paused||!a.active||(a.paused=!0,R()),this},unpause:function(){return a.paused&&a.active?(a.paused=!1,E(),N(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return a.containers=t.map((function(e){return"string"===typeof e?r.querySelector(e):e})),a.active&&E(),this}}).updateContainerElements(e),n}},2703:function(e,t,n){"use strict";var r=n(414);function s(){}function a(){}a.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,a,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:s};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5251:function(e,t,n){"use strict";var r=n(9196),s=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;s=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!c.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:s,type:e,key:l,ref:u,props:a,_owner:o.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,n){"use strict";e.exports=n(5251)},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=window.wp.element,t=window.wp.i18n,r=window.wp.hooks;var s={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let a;const o=new Uint8Array(16);function i(){if(!a&&(a="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(o)}const c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function l(e,t=0){return c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]}var u=function(e,t,n){if(s.randomUUID&&!t&&!e)return s.randomUUID();const r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return l(r)};const p=(n,s,a,o,i="")=>{const c=(0,e.useRef)(new AbortController),l=(0,e.useRef)(null),p=(0,e.useRef)(o);return(0,e.useCallback)((async e=>{const o=`${n}${s}?${e.toString()}`;c.current.abort(),c.current=new AbortController;const d={Accept:"application/json",Authorization:a},h=(e=>{const t=u().replaceAll("-","");return(0,r.applyFilters)("ep.requestId",e+t)})(i);return h&&(d["X-ElasticPress-Request-ID"]=h),l.current=fetch(o,{signal:c.current.signal,headers:d}).then((e=>{if(!e.ok){if(401===e.status&&p.current)return p.current(),"";throw new Error((0,t.sprintf)((0,t.__)("HTTP %d.","elasticpress"),e.status))}return e.json()})).catch((e=>{if("AbortError"!==e?.name)throw e})).finally((()=>{l.current=null})),l.current}),[n,s,a,i])},d=(e,t,n="")=>{const r=new URLSearchParams;return Object.entries(t).forEach((([t,s])=>{const a=n+t,o="undefined"!==typeof e[t]?((e,t,n=!0)=>{let r=null;switch(e&&t.type){case"number":case"string":r=e;break;case"numbers":case"strings":r=e.join(",")}return t.allowedValues&&(r=t.allowedValues.includes(r)?r:null),n&&null===r&&"undefined"!==typeof t.default&&(r=t.default),r})(e[t],s):null;null!==o&&r.set(a,o)})),r},h=(e,t="")=>{const n=new URLSearchParams(window.location.search);return Object.entries(e).reduce(((e,[r,s])=>{const a=n.get(t+r),o="undefined"!==typeof a?((e,t,n=!0)=>{let r=null;switch(e&&t.type){case"number":r=parseFloat(e,10)||null;break;case"numbers":r=decodeURIComponent(e).split(",").map((e=>parseFloat(e,10))).filter(Boolean);break;case"string":r=e.toString();break;case"strings":r=decodeURIComponent(e).split(",").map((e=>e.toString().trim()))}return t.allowedValues&&(r=t.allowedValues.includes(r)?r:null),n&&null===r&&"undefined"!==typeof t.default&&(r=t.default),r})(a,s,!1):null;return null!==o&&(e[r]=o),e}),{})},f=(e,t)=>{const n=new URL(window.location.href),r=Array.from(n.searchParams.keys());for(const t of r)t.startsWith(e)&&n.searchParams.delete(t);return t&&t.forEach(((e,t)=>{n.searchParams.set(t,e)})),n.toString()},m=(e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{Object.hasOwnProperty.call(t,"default")||delete n[e]})),n};var v=(e,t)=>{const n={...e,isPoppingState:!1};switch(t.type){case"CLEAR_CONSTRAINTS":{const e=m(n.args,n.argsSchema);n.args=e,n.args.offset=0;break}case"CLEAR_RESULTS":n.aggregations={},n.searchResults=[],n.totalResults=0;break;case"SEARCH":n.args={...n.args,...t.args,offset:0},n.isOn=!0;break;case"SEARCH_FOR":{const e=m(n.args,n.argsSchema);n.args=e,n.args.search=t.searchTerm,n.args.offset=0,n.isOn=!0;break}case"SET_IS_LOADING":n.isLoading=t.isLoading;break;case"TURN_OFF":n.args={...n.args},n.isOn=!1;break;case"SET_RESULTS":{const{hits:{hits:e,total:r},aggregations:s,suggest:a}=t.response;n.isFirstSearch=!1;const o="number"===typeof r?r:r.value;n.aggregations=s,n.searchResults=e,n.searchTerm=n.args.search,n.totalResults=o,n.suggestedTerms=a?.ep_suggestion?.[0]?.options||[];break}case"NEXT_PAGE":n.args.offset+=n.args.per_page;break;case"PREVIOUS_PAGE":n.args.offset=Math.max(n.args.offset-n.args.per_page,0);break;case"POP_STATE":{const{isOn:e,args:r}=t.args;n.args=r,n.isOn=e,n.isPoppingState=!0;break}}return n},g=n(5893);const b=(0,e.createContext)(),y=({apiEndpoint:n,apiHost:r,authorization:s,requestIdBase:a,argsSchema:o,children:i,paramPrefix:c,onAuthError:l})=>{const u=(0,e.useMemo)((()=>c?h(o,c):{}),[o,c]),m=(0,e.useMemo)((()=>{const e=(e=>Object.entries(e).reduce(((e,[t,n])=>(Object.hasOwnProperty.call(n,"default")&&(e[t]=n.default),e)),{}))(o);return{...e,...u}}),[o,u]),y=(0,e.useMemo)((()=>Object.keys(u).length>0),[u]),x=p(r,n,s,l,a),[_,w]=(0,e.useReducer)(v,{aggregations:{},args:m,argsSchema:o,isLoading:!1,isOn:y,isPoppingState:!1,searchResults:[],totalResults:0,suggestedTerms:[],isFirstSearch:!0,searchTerm:""}),O=(0,e.useRef)(_);O.current=_;const E=(0,e.useCallback)((()=>{w({type:"CLEAR_CONSTRAINTS"})}),[]),T=(0,e.useCallback)((()=>{w({type:"CLEAR_RESULTS"})}),[]),S=(0,e.useCallback)((e=>{w({type:"SEARCH",args:e})}),[]),k=e=>{w({type:"SET_IS_LOADING",isLoading:e})},j=e=>{w({type:"SET_RESULTS",response:e})},C=(0,e.useCallback)((()=>{if("undefined"===typeof c)return;const{args:e,isOn:t}=O.current,n={args:e,isOn:t};if(window.history.state)if(t){const t=d(e,o,c),r=f(c,t);window.history.pushState(n,document.title,r)}else{const e=f(c);window.history.pushState(n,document.title,e)}else window.history.replaceState(n,document.title,window.location.href)}),[o,c]),P=(0,e.useCallback)((e=>{if("undefined"===typeof c)return;e.state&&Object.keys(e.state).length>0&&(e=>{w({type:"POP_STATE",args:e})})(e.state)}),[c]),N=(0,e.useCallback)((()=>(window.addEventListener("popstate",P),()=>{window.removeEventListener("popstate",P)})),[P]),R=(0,e.useCallback)((()=>{(async()=>{const{args:e,isOn:n,isPoppingState:r}=O.current;if(r||C(),!n)return;const s=d(e,o);k(!0);try{const e=await x(s);if(!e)return;j(e)}catch(e){const n=(0,t.sprintf)((0,t.__)("ElasticPress: Unable to fetch results. %s","elasticpress"),e.message);console.error(n)}k(!1)})()}),[o,x,C]);(0,e.useEffect)(N,[N]),(0,e.useEffect)(R,[R,_.args,_.args.orderby,_.args.order,_.args.offset,_.args.search]);const{aggregations:F,args:D,isLoading:M,isOn:L,searchResults:I,searchTerm:A,totalResults:U,suggestedTerms:B,isFirstSearch:z}=O.current,K={aggregations:F,args:D,clearConstraints:E,clearResults:T,getUrlParamsFromArgs:d,getUrlWithParams:f,isLoading:M,isOn:L,searchResults:I,searchTerm:A,search:S,searchFor:e=>{w({type:"SEARCH_FOR",searchTerm:e})},setResults:j,nextPage:()=>{w({type:"NEXT_PAGE"})},previousPage:()=>{w({type:"PREVIOUS_PAGE"})},totalResults:U,turnOff:()=>{w({type:"TURN_OFF"})},suggestedTerms:B,isFirstSearch:z};return(0,g.jsx)(b.Provider,{value:K,children:i})},x=()=>(0,e.useContext)(b),{apiEndpoint:_,apiHost:w,argsSchema:O,currencyCode:E,facets:T,isWooCommerce:S,locale:k,matchType:j,paramPrefix:C,postTypeLabels:P,taxonomyLabels:N,termCount:R,requestIdBase:F,showSuggestions:D,suggestionsBehavior:M}=window.epInstantResults,L={relevance_desc:{name:(0,t.__)("Most relevant","elasticpress"),orderby:"relevance",order:"desc",currencyCode:E},date_desc:{name:(0,t.__)("Date, newest to oldest","elasticpress"),orderby:"date",order:"desc"},date_asc:{name:(0,t.__)("Date, oldest to newest","elasticpress"),orderby:"date",order:"asc"}};S&&(L.price_desc={name:(0,t.__)("Price, highest to lowest","elasticpress"),orderby:"price",order:"desc"},L.price_asc={name:(0,t.__)("Price, lowest to highest","elasticpress"),orderby:"price",order:"asc"});const I=(e,t)=>new Intl.NumberFormat(navigator.language,{style:"currency",currencyDisplay:"narrowSymbol",...t}).format(e);var A=n(4483),U=n.n(A);var B=(0,e.forwardRef)((function({icon:t,size:n=24,...r},s){return(0,e.cloneElement)(t,{width:n,height:n,...r,ref:s})})),z=n(9196),K=window.wp.primitives;var V=(0,z.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,z.createElement)(K.Path,{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"})),G=({children:n,isOpen:r,onClose:s,...a})=>{const o=(0,e.useRef)(null),i=(0,e.useCallback)((e=>{"Escape"!==e.key&&"Esc"!==e.key||s()}),[s]);return(0,e.useEffect)((()=>(document.body.addEventListener("keydown",i),()=>{document.body.removeEventListener("keydown",i)})),[i]),(0,e.useEffect)((()=>{r?(document.body.classList.add("has-ep-search-modal"),o.current.focus()):document.body.classList.remove("has-ep-search-modal")}),[r]),(0,g.jsx)("div",{"aria-hidden":!r,"aria-modal":"true",className:"ep-search-modal",role:"dialog",...a,children:r&&(0,g.jsx)(U(),{focusTrapOptions:{allowOutsideClick:!0},children:(0,g.jsxs)("div",{className:"ep-search-modal__content",children:[(0,g.jsxs)("button",{className:"ep-search-modal__close ep-search-reset-button ep-search-icon-button",type:"button",onClick:s,ref:o,children:[(0,g.jsx)(B,{icon:V}),(0,t.__)("Close","elasticpress")]}),n]})})})},$=({count:e,disabled:t,id:n,label:r,onChange:s,...a})=>(0,g.jsxs)("div",{className:"ep-search-checkbox",children:[(0,g.jsx)("input",{"aria-disabled":t,className:"ep-search-checkbox__input",id:n,onChange:e=>{t||s(e)},type:"checkbox",...a})," ",(0,g.jsxs)("label",{className:"ep-search-checkbox__label",htmlFor:n,children:[r," ",e&&(0,g.jsx)("span",{className:"ep-search-checkbox__count",children:e})]})]}),H=({children:e,className:t,...n})=>(0,g.jsx)("button",{className:`ep-search-small-button ${t}`,type:"button",...n,children:e}),q=({disabled:n,label:r,locale:s,options:a,onChange:o,selected:i,sortBy:c})=>{const l=(0,e.useRef)(null),[u,p]=(0,e.useState)(!1),d=a.reduce(((e,{parent:t,...n})=>(0!=t&&(e[t]=e[t]||[],e[t].push(n)),e)),{}),h=a.reduce(((e,{parent:t,...n})=>(0!=t&&"0"!==t||e.push(n),e)),[]),f=a.length>8?5:8;let m=0;const v=e=>{const{checked:t,value:n}=e.target;let r=t?[...i,n]:i.filter((e=>e!==n));r=r.filter((e=>a.some((t=>t.value===e)))),o(r)},b=({count:t,id:r,label:s,value:a})=>{const o=d[a],c="1"===R?t:"";if(!u&&m>=f)return(0,g.jsx)(e.Fragment,{},a);const l=(0,g.jsxs)("li",{className:"ep-search-options-list__item",children:[(0,g.jsx)($,{checked:i.includes(a),count:c,disabled:n,id:r,label:s,onChange:v,value:a}),o&&(u||m{let n=0;return"count"===c&&(n=t.count-e.count),"name"!==c&&0!==n||(n=e.label.localeCompare(t.label,s)),n},x=e=>e.splice(0).sort(y).map(b);return(0,g.jsxs)(g.Fragment,{children:[a.length>0&&(0,g.jsxs)("ul",{"aria-label":r,className:"ep-search-options-list",ref:l,tabIndex:"-1",children:[x(h),Object.values(d).map(x)]}),a.length>f&&(0,g.jsx)(H,{"aria-expanded":u,disabled:n,onClick:()=>{p(!u),l.current.focus()},children:u?(0,t.__)("Show fewer options","elasticpress"):(0,t.sprintf)((0,t._n)("Show %d more option","Show %d more options",a.length-f,"elasticpress"),a.length-f)})]})};var W=(0,z.createElement)(K.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,z.createElement)(K.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var X=(0,z.createElement)(K.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,z.createElement)(K.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Y=({children:t,defaultIsOpen:n,label:r})=>{const[s,a]=(0,e.useState)(n);return(0,g.jsxs)("div",{className:"ep-search-panel",children:[(0,g.jsx)("h3",{className:"ep-search-panel__heading",children:(0,g.jsxs)("button",{"aria-expanded":s,className:"ep-search-panel__button ep-search-reset-button ep-search-icon-button",onClick:()=>{a(!s)},type:"button",children:[r,(0,g.jsx)(B,{icon:s?W:X})]})}),(0,g.jsx)("div",{"aria-hidden":!s,className:"ep-search-panel__content",children:t(s)})]})};const J=(0,e.createRef)(),Q=({label:n,onClick:r})=>J.current?(0,e.createPortal)((0,g.jsxs)(H,{"aria-label":(0,t.sprintf)((0,t.__)("Remove filter: %s","elasticpress"),n),className:"ep-search-icon-button",onClick:r,children:[(0,g.jsx)(B,{icon:V}),n]}),J.current):null;var Z=()=>(0,g.jsx)("div",{className:"ep-search-tokens",ref:J}),ee=({defaultIsOpen:n,label:r})=>{const{aggregations:{post_type:{post_type:{buckets:s=[]}={}}={}},args:{post_type:a=[]},isLoading:o,search:i}=x(),c=(0,e.useCallback)(((e,{doc_count:t,key:n},r)=>Object.prototype.hasOwnProperty.call(P,n)?(e.push({checked:a.includes(n),count:t,id:`ep-search-post-type-${n}`,label:P[n].singular,order:r,value:n}),e):e),[a]),l=(0,e.useMemo)((()=>s.reduce(c,[])),[s,c]),u=e=>{i({post_type:e})};return l.length>0&&(0,g.jsx)(Y,{defaultIsOpen:n,label:r,children:()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(q,{disabled:o,label:(0,t.__)("Select content type","elasticpress"),options:l,onChange:u,selected:a}),a.map((e=>(0,g.jsx)(Q,{label:P[e].singular,onClick:()=>(e=>{const t=[...a],n=t.indexOf(e);t.splice(n,1),i({post_type:t})})(e)},e)))]})})};function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}function ne(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function re(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function se(e){return null!==e&&1===e.length?e[0]:e.slice()}function ae(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function oe(e,t){return ie(function(e,t){let n=e;return n<=t.min&&(n=t.min),n>=t.max&&(n=t.max),n}(e,t),t)}function ie(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let ce=function(e){function t(t){var n;(n=e.call(this,t)||this).onKeyUp=()=>{n.onEnd()},n.onMouseUp=()=>{n.onEnd(n.getMouseEventMap())},n.onTouchEnd=e=>{e.preventDefault(),n.onEnd(n.getTouchEventMap())},n.onBlur=()=>{n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=e=>{n.setState({pending:!0});const t=n.getMousePosition(e),r=n.getDiffPosition(t[0]),s=n.getValueFromPosition(r);n.move(s)},n.onTouchMove=e=>{if(e.touches.length>1)return;n.setState({pending:!0});const t=n.getTouchPosition(e);if(void 0===n.isScrolling){const e=t[0]-n.startPosition[0],r=t[1]-n.startPosition[1];n.isScrolling=Math.abs(r)>Math.abs(e)}if(n.isScrolling)return void n.setState({index:-1});const r=n.getDiffPosition(t[0]),s=n.getValueFromPosition(r);n.move(s)},n.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(n.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),n.moveUpByStep();break;case"Home":e.preventDefault(),n.move(n.props.min);break;case"End":e.preventDefault(),n.move(n.props.max);break;case"PageDown":e.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":e.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=e=>{if(!n.props.disabled&&2!==e.button){if(n.setState({pending:!0}),!n.props.snapDragDisabled){const t=n.getMousePosition(e);n.forceValueFromPosition(t[0],(e=>{n.start(e,t[0]),ae(n.getMouseEventMap())}))}ne(e)}},n.onSliderClick=e=>{if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){const t=n.getMousePosition(e),r=oe(n.calcValue(n.calcOffsetFromPosition(t[0])),n.props);n.props.onSliderClick(r)}},n.createOnKeyDown=e=>t=>{n.props.disabled||(n.start(e),ae(n.getKeyDownEventMap()),ne(t))},n.createOnMouseDown=e=>t=>{if(n.props.disabled||2===t.button)return;n.setState({pending:!0});const r=n.getMousePosition(t);n.start(e,r[0]),ae(n.getMouseEventMap()),ne(t)},n.createOnTouchStart=e=>t=>{if(n.props.disabled||t.touches.length>1)return;n.setState({pending:!0});const r=n.getTouchPosition(t);n.startPosition=r,n.isScrolling=void 0,n.start(e,r[0]),ae(n.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},n.handleResize=()=>{const e=window.setTimeout((()=>{n.pendingResizeTimeouts.shift(),n.resize()}),0);n.pendingResizeTimeouts.push(e)},n.renderThumb=(e,t)=>{const r=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+t+" "+(n.state.index===t?n.props.thumbActiveClassName:""),s={ref:e=>{n["thumb"+t]=e},key:n.props.thumbClassName+"-"+t,className:r,style:e,onMouseDown:n.createOnMouseDown(t),onTouchStart:n.createOnTouchStart(t),onFocus:n.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[t],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[t]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[t]:n.props.ariaLabelledby,"aria-disabled":n.props.disabled},a={index:t,value:se(n.state.value),valueNow:n.state.value[t]};return n.props.ariaValuetext&&(s["aria-valuetext"]="string"==typeof n.props.ariaValuetext?n.props.ariaValuetext:n.props.ariaValuetext(a)),n.props.renderThumb(s,a)},n.renderTrack=(e,t,r)=>{const s={key:n.props.trackClassName+"-"+e,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+e,style:n.buildTrackStyle(t,n.state.upperBound-r)},a={index:e,value:se(n.state.value)};return n.props.renderTrack(s,a)};let r=re(t.value);r.length||(r=re(t.defaultValue)),n.pendingResizeTimeouts=[];const s=[];for(let e=0;eoe(t,e)))}:null},s.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},s.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},s.onEnd=function(e){e&&function(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},s.getValue=function(){return se(this.state.value)},s.getClosestIndex=function(e){let t=Number.MAX_VALUE,n=-1;const{value:r}=this.state,s=r.length;for(let a=0;a{t(r),this.fireChangeEvent("onChange")}))},s.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},s.start=function(e,t){const n=this["thumb"+e];n&&n.focus();const{zIndices:r}=this.state;r.splice(r.indexOf(e),1),r.push(e),this.setState((n=>({startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:r})))},s.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=oe(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);this.move(Math.min(n,this.props.max))},s.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=oe(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(n,this.props.min))},s.move=function(e){const t=this.state.value.slice(),{index:n}=this.state,{length:r}=t,s=t[n];if(e===s)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:a,max:o,min:i,minDistance:c}=this.props;if(!a){if(n>0){const r=t[n-1];er-c&&(e=r-c)}}t[n]=e,a&&r>1&&(e>s?(this.pushSucceeding(t,c,n),function(e,t,n,r){for(let s=0;sa&&(t[e-1-s]=a)}}(r,t,c,o)):ee[r+1];r+=1,s=e[r]+t)e[r+1]=ie(s,this.props)},s.pushPreceding=function(e,t,n){for(let r=n,s=e[r]-t;null!==e[r-1]&&s=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},s.buildTrackStyle=function(e,t){const n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},s.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},s.renderThumbs=function(e){const{length:t}=e,n=[];for(let r=0;rt)):"number"==typeof e&&(e=Array.from({length:t}).map(((e,t)=>t)).filter((t=>t%e==0))),e.map(parseFloat).sort(((e,t)=>e-t)).map((e=>{const t=this.calcOffset(e),n={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(n)}))},s.render=function(){const e=[],{value:t}=this.state,n=t.length;for(let r=0;r{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},r,s,a)},t}(z.Component);ce.displayName="ReactSlider",ce.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>z.createElement("div",e),renderTrack:e=>z.createElement("div",e),renderMark:e=>z.createElement("span",e)};var le=ce,ue=({...e})=>(0,g.jsx)(le,{className:"ep-search-range-slider",minDistance:1,thumbActiveClassName:"ep-search-range-slider__thumb--active",thumbClassName:"ep-search-range-slider__thumb",trackClassName:"ep-search-range-slider__track",...e}),pe=({defaultIsOpen:n,label:r})=>{const{aggregations:{price_range:{max_price:{value:s=null}={},min_price:{value:a=null}={}}={}},args:{max_price:o=null,min_price:i=null},isLoading:c,search:l}=x(),u=Math.ceil(s),p=Math.floor(a),[d,h]=(0,e.useState)(0),[f,m]=(0,e.useState)(0),v=I(d,{maximumFractionDigits:0,currency:E}),b=I(f,{maximumFractionDigits:0,currency:E}),y=o||u,_=i||p,w=I(y,{maximumFractionDigits:0,currency:E}),O=I(_,{maximumFractionDigits:0,currency:E}),T=e=>{const[t,n]=e;l({min_price:t,max_price:n})},S=([e,t])=>{m(e),h(t)},k=()=>{l({max_price:null,min_price:null})};return(0,e.useLayoutEffect)((()=>{const e=Math.min(u,y),t=Math.max(p,_);h(e),m(t)}),[p,u,_,y]),null!==s&&null!==a&&(0,g.jsx)(Y,{defaultIsOpen:n,label:r,children:e=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"ep-search-price-facet",children:[(0,g.jsx)("div",{className:"ep-search-price-facet__slider",children:e&&(0,g.jsx)(ue,{disabled:c,max:u,min:p,onAfterChange:T,onChange:S,value:[f,d]})}),(0,g.jsxs)("div",{className:"ep-search-price-facet__values",children:[b," — ",v]})]}),null!==o&&null!==i&&(0,g.jsx)(Q,{label:(0,t.sprintf)((0,t._x)("%1$s — %2$s","Price range","elasticpress"),O,w),onClick:k})]})})},de=window.wp.htmlEntities,he=({defaultIsOpen:n,label:r,postTypes:s,name:a})=>{const{aggregations:{[a]:{[a]:{buckets:o=[]}={}}={}}={},args:{[a]:i=[]},isLoading:c,search:l}=x(),u=(0,e.useMemo)((()=>{const e=T.some((e=>e.label===r&&e.name!==a)),n=s.map((e=>P[e].plural)),o=(0,t.__)(", ","elasticpress");return e?(0,t.sprintf)((0,t.__)("%1$s (%2$s)","elasticpress"),r,n.join(o)):r}),[r,s,a]),p=(0,e.useCallback)(((e,{doc_count:t,key:n})=>{const{name:r,parent:s,term_id:o,term_order:c}=JSON.parse(n);return e.push({checked:i.includes(o),count:t,id:`ep-search-${a}-${o}`,label:(0,de.decodeEntities)(r),parent:s.toString(),order:c,value:o.toString()}),e}),[i,a]),d=(0,e.useMemo)((()=>o.reduce(p,[])),[o,p]),h=(0,e.useCallback)(((e,{label:t,value:n})=>(e[n]=t,e)),[]),f=d.reduce(h,{}),m=e=>{l({[a]:e})};return d.length>0&&(0,g.jsx)(Y,{defaultIsOpen:n,label:u,children:e=>(0,g.jsxs)(g.Fragment,{children:[e&&(0,g.jsx)(q,{disabled:c,label:(0,t.sprintf)((0,t.__)("Select %s","elasticpress"),r),options:d,onChange:m,selected:i}),i.map((e=>f?.[e]&&(0,g.jsx)(Q,{label:f[e],onClick:()=>(e=>{const t=[...i];t.splice(t.indexOf(e),1),l({[a]:t})})(e)},e)))]})})},fe=({index:e,label:t,name:n,postTypes:r,type:s})=>{const a=e<2;switch(s){case"post_type":return(0,g.jsx)(ee,{defaultIsOpen:a,label:t});case"price_range":return(0,g.jsx)(pe,{defaultIsOpen:a,label:t});case"taxonomy":return(0,g.jsx)(he,{defaultIsOpen:a,label:t,name:n,postTypes:r});default:return null}};var me=()=>{const{args:n,searchFor:r,searchTerm:s}=x(),[a,o]=(0,e.useState)(n.search),i=((t,n)=>{const r=(0,e.useRef)(null);return(0,e.useCallback)(((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout((()=>{t(...e)}),n)}),[t,n])})((e=>{r(e)}),300);return(0,e.useEffect)((()=>{o(n.search)}),[n.search]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("input",{className:"ep-search-input",placeholder:(0,t.__)("Search…","elasticpress"),type:"search",value:a,onChange:e=>{o(e.target.value),i(e.target.value)}}),s&&(0,g.jsx)(Q,{label:(0,t.sprintf)((0,t.__)("“%s”","elasticpress"),s),onClick:()=>{r("")}})]})},ve=({offset:e,onNext:n,onPrevious:r,perPage:s,total:a})=>{const o=(e+s)/s,i=a>e+s,c=e>0,l=Math.ceil(a/s);return(0,g.jsxs)("nav",{className:"ep-search-pagination",children:[(0,g.jsx)("div",{className:"ep-search-pagination__previous",children:(0,g.jsx)("button",{className:"ep-search-pagination-button ep-search-pagination-button--previous",disabled:!c,onClick:r,type:"button",children:(0,t.__)("Previous","elasticpress")})}),(0,g.jsx)("div",{className:"ep-search-pagination__count",role:"status",children:a>0&&(0,t.sprintf)((0,t.__)("Page %1$d of %2$d","elasticpress"),o,l)}),(0,g.jsx)("div",{className:"ep-search-pagination__next",children:(0,g.jsx)("button",{className:"ep-search-pagination-button ep-search-pagination-button--next",disabled:!i,onClick:n,type:"button",children:(0,t.__)("Next","elasticpress")})})]})},ge=({rating:e})=>{const n=(0,t.sprintf)((0,t.__)("Rated %1$f out of %2$d","elasticpress"),e,5);return(0,g.jsx)("div",{className:"woocommerce",children:(0,g.jsx)("div",{"aria-label":n,className:"star-rating",role:"img",children:(0,g.jsx)("span",{style:{width:e/5*100+"%"},children:n})})})},be=({alt:e,height:t,ID:n,src:r,width:s,...a})=>(0,g.jsx)("img",{alt:e,src:r,width:s,height:t,...a});var ye=(0,r.applyFilters)("ep.InstantResults.Result",(({averageRating:e=0,date:t,excerpt:n,priceHtml:r,thumbnail:s,title:a,type:o,url:i})=>(0,g.jsxs)("article",{className:`ep-search-result ${s?"ep-search-result--has-thumbnail":null}`,children:[s&&(0,g.jsx)("a",{className:"ep-search-result__thumbnail",href:i,children:(0,g.jsx)(be,{...s})}),(0,g.jsxs)("header",{className:"ep-search-result__header",children:[o?(0,g.jsx)("span",{className:"ep-search-result__type",children:o}):null,(0,g.jsx)("h2",{className:"ep-search-result__title",children:(0,g.jsx)("a",{href:i,dangerouslySetInnerHTML:{__html:a}})}),r?(0,g.jsx)("p",{className:"price",dangerouslySetInnerHTML:{__html:r}}):null]}),n.length>0?(0,g.jsx)("p",{className:"ep-search-result__description",dangerouslySetInnerHTML:{__html:n}}):null,(0,g.jsxs)("footer",{className:"ep-search-result__footer",children:[e>0?(0,g.jsx)(ge,{rating:e}):null,t]})]}))),xe=({hit:e,searchTerm:t,highlightTag:n})=>{const{highlight:{post_content_plain:r=[]},_source:{meta:{_wc_average_rating:[{value:s}={}]=[]},permalink:a,post_date:o,post_id:i,post_type:c,price_html:l,thumbnail:u}}=e,p=new RegExp(`\\b(${t})`,"gi");let d;d=""===n||void 0===n?e._source.post_title:e._source.post_title.replace(p,(e=>`<${n}>${e}`));const h="post"===c?((e,t)=>new Date(e).toLocaleString(t,{dateStyle:"long"}))(o):null,f=r.join("…"),m=P[c]?.singular;return(0,g.jsx)(ye,{averageRating:s,date:h,hit:e,excerpt:f,id:i,priceHtml:l,thumbnail:u,title:d,type:m,url:a})},_e=()=>{const{args:{orderby:n,order:r},search:s}=x(),a=(0,e.useMemo)((()=>Object.keys(L).find((e=>L[e].orderby===n&&L[e].order===r))),[n,r]);return(0,g.jsxs)("label",{className:"ep-search-sort",htmlFor:"ep-sort",children:[(0,g.jsx)("span",{className:"ep-search-sort__label",children:(0,t.__)("Sort by","elasticpress")})," ",(0,g.jsx)("select",{className:"ep-search-sort__options",id:"ep-sort",onChange:e=>{const{orderby:t,order:n}=L[e.target.value];s({orderby:t,order:n})},value:a,children:Object.entries(L).map((([e,{name:t}])=>(0,g.jsx)("option",{value:e,children:t},e)))})]})},we=n=>{const{suggestedTerms:r,searchFor:s,totalResults:a}=n,o=e=>{s(e)},i=r.slice(1);return(0,g.jsxs)(g.Fragment,{children:[D&&r&&r?.[0]?.text&&(0,g.jsx)("div",{className:"ep-search-suggestion",children:(0,g.jsx)("p",{children:(0,e.createInterpolateElement)((0,t.sprintf)((0,t.__)("Did you mean: %s","elasticpress"),r?.[0]?.text),{a:(0,g.jsx)("a",{href:"#",onClick:()=>o(r?.[0]?.text)})})})}),D&&"list"===M&&0===a&&i.length>0&&(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{children:(0,t.__)("Other suggestions","elasticpress")}),(0,g.jsx)("ul",{children:i.map((e=>(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"#",onClick:()=>o(e.text),children:e.text})},e.text)))})]})]})},Oe=()=>{const{args:{offset:n,per_page:r,highlight:s},nextPage:a,previousPage:o,searchResults:i,searchTerm:c,totalResults:l,searchFor:u,suggestedTerms:p,isFirstSearch:d}=x(),h=(0,e.useRef)();(0,e.useEffect)((()=>{h.current.scrollIntoView({behavior:"smooth"})}),[n]);return(0,g.jsxs)("div",{className:"ep-search-results",children:[(0,g.jsxs)("header",{className:"ep-search-results__header",children:[(0,g.jsx)("h1",{className:"ep-search-results__title",ref:h,role:"status",children:d?(0,t.sprintf)((0,t.__)("Loading results","elasticpress")):c?(0,t.sprintf)((0,t._n)("%1$d result for “%2$s“","%1$d results for “%2$s“",l,"elasticpress"),l,c):(0,t.sprintf)((0,t._n)("%d result","%d results",l,"elasticpress"),l)}),(0,g.jsx)(_e,{})]}),(0,g.jsx)(we,{searchFor:u,suggestedTerms:p,totalResults:l}),i.map((e=>(0,g.jsx)(xe,{hit:e,searchTerm:c,highlightTag:s},e._id))),(0,g.jsx)(ve,{offset:n,onNext:()=>{a()},onPrevious:()=>{o()},perPage:r,total:l})]})},Ee=({children:e,isOpen:t})=>(0,g.jsx)("aside",{className:"ep-search-sidebar "+(t?"is-open":""),children:e}),Te=({children:e})=>(0,g.jsx)("div",{className:"ep-search-toolbar",children:e}),Se=()=>{const{args:n,clearConstraints:r}=x();return(0,e.useMemo)((()=>T.some((({name:e,type:t})=>{switch(t){case"post_type":case"taxonomy":return n[e]?.length>0;case"price_range":return n.max_price||n.min_price;default:return n[e]}}))),[n])&&(0,g.jsx)(H,{onClick:()=>{r()},children:(0,t.__)("Clear filters","elasticpress")})},ke=({isOpen:e,onClick:n})=>(0,g.jsxs)("button",{"aria-expanded":e,className:"ep-search-sidebar-toggle ep-search-icon-button",onClick:n,type:"button",children:[e?(0,t.__)("Close filters","elasticpress"):(0,t.__)("All filters","elasticoress"),(0,g.jsx)(B,{icon:e?W:X})]}),je=()=>{const{isLoading:t}=x(),[n,r]=(0,e.useState)(!1);return(0,g.jsxs)("div",{className:"ep-search-page "+(t?"is-loading":""),children:[(0,g.jsxs)("div",{className:"ep-search-page__header",children:[(0,g.jsx)(me,{}),(0,g.jsxs)(Te,{children:[(0,g.jsx)(Z,{}),(0,g.jsx)(Se,{}),(0,g.jsx)(ke,{isOpen:n,onClick:()=>{r(!n)}})]})]}),(0,g.jsxs)("div",{className:"ep-search-page__body",children:[(0,g.jsxs)(Ee,{isOpen:n,children:[(0,g.jsx)(_e,{}),T.map((({label:e,name:t,postTypes:n,type:r},s)=>(0,g.jsx)(fe,{index:s,label:e,name:t,postTypes:n,type:r},t)))]}),(0,g.jsx)(Oe,{})]})]})},Ce=()=>{const{turnOff:n,isOn:r,search:s}=x(),a=(0,e.useRef)(),o=(0,e.useCallback)((()=>{n(),a.current&&a.current.focus()}),[n]),i=(0,e.useCallback)((e=>{e.preventDefault(),a.current=e.target.s;const{value:t}=a.current,n=(e=>{const t=new FormData(e);return t.has("post_type")?t.getAll("post_type").slice(-1):t.has("post_type[]")?t.getAll("post_type[]"):[]})(a.current.form);s({post_type:n,search:t})}),[a,s]);return(0,e.useEffect)((()=>{const e=document.querySelectorAll('form input[name="s"]');return e.forEach((e=>{e.form.addEventListener("submit",i)})),window.epInstantResults.openModal=s,()=>{e.forEach((e=>{e.form.removeEventListener("submit",i)})),delete window.epInstantResults.openModal}}),[i,s]),(0,g.jsx)(G,{"aria-label":(0,t.__)("Search results","elasticpress"),isOpen:r,onClose:o,children:(0,g.jsx)(je,{})})};window.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("ep-instant-results");if("function"===typeof e.createRoot){(0,e.createRoot)(t).render((0,g.jsx)(y,{apiEndpoint:_,apiHost:w,argsSchema:O,paramPrefix:C,requestIdBase:F,children:(0,g.jsx)(Ce,{})}))}else(0,e.render)((0,g.jsx)(y,{apiEndpoint:_,apiHost:w,argsSchema:O,paramPrefix:C,requestIdBase:F,children:(0,g.jsx)(Ce,{})}),t)}))}()}(); \ No newline at end of file diff --git a/dist/js/notice-script.asset.php b/dist/js/notice-script.asset.php new file mode 100644 index 0000000000..83eb43de50 --- /dev/null +++ b/dist/js/notice-script.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-dom-ready'), 'version' => '64de0348615d51bed814'); diff --git a/dist/js/notice-script.js b/dist/js/notice-script.js new file mode 100644 index 0000000000..5c92b7c110 --- /dev/null +++ b/dist/js/notice-script.js @@ -0,0 +1 @@ +!function(){"use strict";var n={n:function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},d:function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},o:function(n,e){return Object.prototype.hasOwnProperty.call(n,e)}},e=window.wp.apiFetch,t=n.n(e),o=window.wp.domReady,r=n.n(o);const{epAdmin:c,ajaxurl:i}=window;r()((()=>{const n=document.querySelectorAll(".notice[data-ep-notice]"),e=n=>{if(!n.target.classList.contains("notice-dismiss"))return;const e=new FormData;e.append("action","ep_notice_dismiss"),e.append("notice",n.currentTarget.dataset.epNotice),e.append("nonce",c.nonce),t()({method:"POST",url:i,body:e})};for(const t of n)t.addEventListener("click",e)}))}(); \ No newline at end of file diff --git a/dist/js/ordering-script.asset.php b/dist/js/ordering-script.asset.php new file mode 100644 index 0000000000..c8c4c711a0 --- /dev/null +++ b/dist/js/ordering-script.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '6df2d3c8c8b1f60cd9fe'); diff --git a/dist/js/ordering-script.js b/dist/js/ordering-script.js new file mode 100644 index 0000000000..ec908c9236 --- /dev/null +++ b/dist/js/ordering-script.js @@ -0,0 +1 @@ +!function(){var e={6216:function(e,r,t){t(8175),e.exports=t(3093).Date.now},6337:function(e,r,t){t(4211),t(3093).Number.isInteger},8207:function(e,r,t){t(2464),e.exports=t(3093).Object.assign},5380:function(e,r,t){t(7660);var n=t(3093).Object;e.exports=function(e,r){return n.create(e,r)}},5297:function(e,r,t){t(5338),e.exports=t(3093).Object.keys},1900:function(e,r,t){t(9269),e.exports=t(3093).Object.setPrototypeOf},2837:function(e,r,t){t(3625),e.exports=t(3093).Object.values},8679:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},9226:function(e,r,t){var n=t(4425);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},3206:function(e,r,t){var n=t(6303),o=t(5321),i=t(139);e.exports=function(e){return function(r,t,a){var u,c=n(r),l=o(c.length),s=i(a,l);if(e&&t!=t){for(;l>s;)if((u=c[s++])!=u)return!0}else for(;l>s;s++)if((e||s in c)&&c[s]===t)return e||s||0;return!e&&-1}}},7489:function(e){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},3093:function(e){var r=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},1133:function(e,r,t){var n=t(8679);e.exports=function(e,r,t){if(n(e),void 0===r)return e;switch(t){case 1:return function(t){return e.call(r,t)};case 2:return function(t,n){return e.call(r,t,n)};case 3:return function(t,n,o){return e.call(r,t,n,o)}}return function(){return e.apply(r,arguments)}}},9359:function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},7305:function(e,r,t){e.exports=!t(4930)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},3299:function(e,r,t){var n=t(4425),o=t(3220).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},5834:function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},4518:function(e,r,t){var n=t(3220),o=t(3093),i=t(1133),a=t(4379),u=t(3920),c="prototype",l=function(e,r,t){var s,d,p,f=e&l.F,g=e&l.G,m=e&l.S,v=e&l.P,b=e&l.B,h=e&l.W,y=g?o:o[r]||(o[r]={}),x=y[c],w=g?n:m?n[r]:(n[r]||{})[c];for(s in g&&(t=r),t)(d=!f&&w&&void 0!==w[s])&&u(y,s)||(p=d?w[s]:t[s],y[s]=g&&"function"!=typeof w[s]?t[s]:b&&d?i(p,n):h&&w[s]==p?function(e){var r=function(r,t,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,t)}return new e(r,t,n)}return e.apply(this,arguments)};return r[c]=e[c],r}(p):v&&"function"==typeof p?i(Function.call,p):p,v&&((y.virtual||(y.virtual={}))[s]=p,e&l.R&&x&&!x[s]&&a(x,s,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},4930:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},3220:function(e){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},3920:function(e){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},4379:function(e,r,t){var n=t(6007),o=t(5831);e.exports=t(7305)?function(e,r,t){return n.f(e,r,o(1,t))}:function(e,r,t){return e[r]=t,e}},588:function(e,r,t){var n=t(3220).document;e.exports=n&&n.documentElement},7209:function(e,r,t){e.exports=!t(7305)&&!t(4930)((function(){return 7!=Object.defineProperty(t(3299)("div"),"a",{get:function(){return 7}}).a}))},5474:function(e,r,t){var n=t(7489);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},8015:function(e,r,t){var n=t(4425),o=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},4425:function(e){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},4436:function(e){e.exports=!0},7382:function(e,r,t){"use strict";var n=t(7305),o=t(1304),i=t(8382),a=t(5066),u=t(4922),c=t(5474),l=Object.assign;e.exports=!l||t(4930)((function(){var e={},r={},t=Symbol(),n="abcdefghijklmnopqrst";return e[t]=7,n.split("").forEach((function(e){r[e]=e})),7!=l({},e)[t]||Object.keys(l({},r)).join("")!=n}))?function(e,r){for(var t=u(e),l=arguments.length,s=1,d=i.f,p=a.f;l>s;)for(var f,g=c(arguments[s++]),m=d?o(g).concat(d(g)):o(g),v=m.length,b=0;v>b;)f=m[b++],n&&!p.call(g,f)||(t[f]=g[f]);return t}:l},9270:function(e,r,t){var n=t(9226),o=t(6287),i=t(5834),a=t(2596)("IE_PROTO"),u=function(){},c="prototype",l=function(){var e,r=t(3299)("iframe"),n=i.length;for(r.style.display="none",t(588).appendChild(r),r.src="javascript:",(e=r.contentWindow.document).open(),e.write("