From 8285ef0907bf7c0333c7b3c315a9afc3382177f1 Mon Sep 17 00:00:00 2001 From: WP Git Updater Bot Date: Sat, 3 Apr 2021 13:36:46 +0000 Subject: [PATCH] chore(plugins): Update woocommerce-admin from 1.8.3 to 2.2.1 --- plugins/woocommerce-admin/dist/app/index.js | 35608 +++++----- .../dist/app/index.min.asset.php | 1 + .../woocommerce-admin/dist/app/index.min.js | 2 +- plugins/woocommerce-admin/dist/app/style.css | 2 +- .../woocommerce-admin/dist/app/style.rtl.css | 2 +- .../beta-features-tracking-modal/style.css | 1 + .../style.rtl.css | 1 + plugins/woocommerce-admin/dist/chunks/0.js | 1101 +- .../woocommerce-admin/dist/chunks/0.min.js | 2 +- .../woocommerce-admin/dist/chunks/0.style.css | 2 +- .../dist/chunks/0.style.rtl.css | 2 +- plugins/woocommerce-admin/dist/chunks/1.js | 2826 +- .../woocommerce-admin/dist/chunks/1.min.js | 3 +- .../dist/chunks/10.style.css | 2 +- .../dist/chunks/10.style.rtl.css | 2 +- .../chunks/{17.style.css => 14.style.css} | 0 .../{17.style.rtl.css => 14.style.rtl.css} | 0 .../dist/chunks/{6.style.css => 15.style.css} | 0 .../{6.style.rtl.css => 15.style.rtl.css} | 0 plugins/woocommerce-admin/dist/chunks/2.js | 1733 +- .../woocommerce-admin/dist/chunks/2.min.js | 2 +- .../chunks/{23.style.css => 20.style.css} | 0 .../{23.style.rtl.css => 20.style.rtl.css} | 0 .../chunks/{30.style.css => 28.style.css} | 2 +- .../{30.style.rtl.css => 28.style.rtl.css} | 2 +- .../dist/chunks/29.style.css | 1 + .../dist/chunks/29.style.rtl.css | 1 + plugins/woocommerce-admin/dist/chunks/3.js | 1928 +- .../woocommerce-admin/dist/chunks/3.min.js | 3 +- .../woocommerce-admin/dist/chunks/3.style.css | 1 + .../dist/chunks/3.style.rtl.css | 1 + .../dist/chunks/31.style.css | 1 - .../dist/chunks/31.style.rtl.css | 1 - .../dist/chunks/32.style.css | 1 + .../dist/chunks/32.style.rtl.css | 1 + .../dist/chunks/34.style.css | 2 +- .../dist/chunks/34.style.rtl.css | 2 +- .../dist/chunks/36.style.css | 2 +- .../dist/chunks/36.style.rtl.css | 2 +- .../dist/chunks/38.style.css | 1 - .../dist/chunks/38.style.rtl.css | 1 - plugins/woocommerce-admin/dist/chunks/4.js | 1913 +- .../woocommerce-admin/dist/chunks/4.min.js | 2 +- .../dist/chunks/{11.style.css => 4.style.css} | 2 +- .../{11.style.rtl.css => 4.style.rtl.css} | 2 +- .../dist/chunks/46.style.css | 1 + .../dist/chunks/46.style.rtl.css | 1 + .../dist/chunks/47.style.css | 2 +- .../dist/chunks/47.style.rtl.css | 2 +- .../dist/chunks/48.style.css | 2 +- .../dist/chunks/48.style.rtl.css | 2 +- .../dist/chunks/49.style.css | 2 +- .../dist/chunks/49.style.rtl.css | 2 +- plugins/woocommerce-admin/dist/chunks/5.js | 1792 +- .../woocommerce-admin/dist/chunks/5.min.js | 2 +- plugins/woocommerce-admin/dist/chunks/52.js | 1625 + .../woocommerce-admin/dist/chunks/52.min.js | 1 + plugins/woocommerce-admin/dist/chunks/53.js | 1986 +- .../woocommerce-admin/dist/chunks/53.min.js | 2 +- plugins/woocommerce-admin/dist/chunks/54.js | 2553 +- .../woocommerce-admin/dist/chunks/54.min.js | 2 +- plugins/woocommerce-admin/dist/chunks/6.js | 4530 +- .../woocommerce-admin/dist/chunks/6.min.js | 2 +- plugins/woocommerce-admin/dist/chunks/7.js | 1194 - .../woocommerce-admin/dist/chunks/7.min.js | 1 - .../woocommerce-admin/dist/chunks/7.style.css | 1 + .../dist/chunks/7.style.rtl.css | 1 + plugins/woocommerce-admin/dist/chunks/8.js | 968 - .../woocommerce-admin/dist/chunks/8.min.js | 1 - plugins/woocommerce-admin/dist/chunks/9.js | 2788 - .../woocommerce-admin/dist/chunks/9.min.js | 1 - .../dist/chunks/{12.style.css => 9.style.css} | 2 +- .../{12.style.rtl.css => 9.style.rtl.css} | 2 +- .../dist/chunks/activity-panels-help.js | 275 +- .../dist/chunks/activity-panels-help.min.js | 2 +- .../dist/chunks/activity-panels-inbox.js | 1554 +- .../dist/chunks/activity-panels-inbox.min.js | 2 +- .../chunks/analytics-report-categories.js | 726 +- .../chunks/analytics-report-categories.min.js | 2 +- .../dist/chunks/analytics-report-coupons.js | 660 +- .../chunks/analytics-report-coupons.min.js | 2 +- .../dist/chunks/analytics-report-customers.js | 520 +- .../chunks/analytics-report-customers.min.js | 2 +- .../dist/chunks/analytics-report-downloads.js | 740 +- .../chunks/analytics-report-downloads.min.js | 2 +- .../dist/chunks/analytics-report-orders.js | 345 +- .../chunks/analytics-report-orders.min.js | 2 +- .../dist/chunks/analytics-report-products.js | 890 +- .../chunks/analytics-report-products.min.js | 2 +- .../dist/chunks/analytics-report-revenue.js | 580 +- .../chunks/analytics-report-revenue.min.js | 2 +- .../dist/chunks/analytics-report-stock.js | 145 +- .../dist/chunks/analytics-report-stock.min.js | 2 +- .../dist/chunks/analytics-report-taxes.js | 808 +- .../dist/chunks/analytics-report-taxes.min.js | 2 +- .../chunks/analytics-report-variations.js | 1361 +- .../chunks/analytics-report-variations.min.js | 2 +- .../dist/chunks/analytics-report.js | 218 +- .../dist/chunks/analytics-report.min.js | 2 +- .../dist/chunks/analytics-settings.js | 1198 +- .../dist/chunks/analytics-settings.min.js | 2 +- .../dist/chunks/customizable-dashboard.js | 737 +- .../dist/chunks/customizable-dashboard.min.js | 2 +- .../dist/chunks/dashboard-charts.js | 564 +- .../dist/chunks/dashboard-charts.min.js | 2 +- .../dist/chunks/dashboard.js | 74 +- .../dist/chunks/dashboard.min.js | 2 +- .../dist/chunks/homescreen.js | 9189 +-- .../dist/chunks/homescreen.min.js | 2 +- .../dist/chunks/leaderboards.js | 243 +- .../dist/chunks/leaderboards.min.js | 2 +- .../dist/chunks/marketing-overview.js | 1766 +- .../dist/chunks/marketing-overview.min.js | 2 +- .../dist/chunks/profile-wizard.js | 4282 +- .../dist/chunks/profile-wizard.min.js | 2 +- .../dist/chunks/store-alerts.js | 843 +- .../dist/chunks/store-alerts.min.js | 2 +- .../dist/chunks/store-performance.js | 249 +- .../dist/chunks/store-performance.min.js | 2 +- .../dist/chunks/task-list.js | 2458 +- .../dist/chunks/task-list.min.js | 2 +- .../dist/chunks/wcpay-usage-modal.js | 1104 +- .../dist/chunks/wcpay-usage-modal.min.js | 2 +- .../dist/components/ie-rtl.css | 16 +- .../woocommerce-admin/dist/components/ie.css | 16 +- .../dist/components/index.js | 56016 +++++++--------- .../dist/components/index.min.asset.php | 1 + .../dist/components/index.min.js | 2 +- .../dist/components/style-rtl.css | 360 +- .../dist/components/style.css | 360 +- .../dist/csv-export/index.js | 2929 +- .../dist/csv-export/index.min.asset.php | 1 + .../dist/csv-export/index.min.js | 2 +- .../woocommerce-admin/dist/currency/index.js | 3068 +- .../dist/currency/index.min.asset.php | 1 + .../dist/currency/index.min.js | 2 +- .../dist/customer-effort-score/index.js | 11615 +--- .../customer-effort-score/index.min.asset.php | 1 + .../dist/customer-effort-score/index.min.js | 3 +- .../dist/customer-effort-score/style-rtl.css | 22 +- .../dist/customer-effort-score/style.css | 22 +- plugins/woocommerce-admin/dist/data/index.js | 12883 +++- .../dist/data/index.min.asset.php | 1 + .../woocommerce-admin/dist/data/index.min.js | 2 +- plugins/woocommerce-admin/dist/date/index.js | 2754 +- .../dist/date/index.min.asset.php | 1 + .../woocommerce-admin/dist/date/index.min.js | 2 +- .../dist/ie/index.min.asset.php | 1 + plugins/woocommerce-admin/dist/ie/style.css | 2 +- .../woocommerce-admin/dist/ie/style.rtl.css | 2 +- .../dist/navigation-opt-out/style.css | 1 + .../dist/navigation-opt-out/style.rtl.css | 1 + .../dist/navigation/index.js | 7854 ++- .../dist/navigation/index.min.asset.php | 1 + .../dist/navigation/index.min.js | 2 +- .../dist/navigation/style-rtl.css | 123 - .../dist/navigation/style.css | 123 - .../woocommerce-admin/dist/notices/index.js | 2848 +- .../dist/notices/index.min.asset.php | 1 + .../dist/notices/index.min.js | 2 +- .../woocommerce-admin/dist/number/index.js | 3401 +- .../dist/number/index.min.asset.php | 1 + .../dist/number/index.min.js | 2 +- .../woocommerce-admin/dist/tracks/index.js | 5175 +- .../dist/tracks/index.min.asset.php | 1 + .../dist/tracks/index.min.js | 2 +- .../beta-features-tracking-modal.js | 523 + ...beta-features-tracking-modal.min.asset.php | 1 + .../beta-features-tracking-modal.min.js | 1 + .../wp-admin-scripts/marketing-coupons.js | 16182 ++--- .../marketing-coupons.min.asset.php | 1 + .../wp-admin-scripts/marketing-coupons.min.js | 2 +- .../wp-admin-scripts/navigation-opt-out.js | 1532 + .../navigation-opt-out.min.asset.php | 1 + .../navigation-opt-out.min.js | 1 + .../onboarding-homepage-notice.js | 2565 +- .../onboarding-homepage-notice.min.asset.php | 1 + .../onboarding-homepage-notice.min.js | 2 +- .../onboarding-product-import-notice.js | 1360 +- ...arding-product-import-notice.min.asset.php | 1 + .../onboarding-product-import-notice.min.js | 2 +- .../onboarding-product-notice.js | 1366 +- .../onboarding-product-notice.min.asset.php | 1 + .../onboarding-product-notice.min.js | 2 +- .../wp-admin-scripts/onboarding-tax-notice.js | 2505 +- .../onboarding-tax-notice.min.asset.php | 1 + .../onboarding-tax-notice.min.js | 2 +- .../print-shipping-label-banner.js | 14886 ++-- .../print-shipping-label-banner.min.asset.php | 1 + .../print-shipping-label-banner.min.js | 3 +- .../admin_notes/dashboard-widget-setup.png | Bin 0 -> 5430 bytes .../images/admin_notes/openbox+purple.png | Bin 0 -> 15847 bytes .../images/onboarding/mailpoet.png | Bin 0 -> 11836 bytes .../images/onboarding/mercadopago.png | Bin 0 -> 6507 bytes .../images/onboarding/paystack.png | Bin 0 -> 55073 bytes .../includes/connect-existing-pages.php | 6 +- .../emails/html-merchant-notification.php | 69 + .../emails/plain-merchant-notification.php | 23 + .../includes/feature-config.php | 4 +- .../languages/woocommerce-admin.pot | 2560 +- plugins/woocommerce-admin/readme.txt | 217 +- plugins/woocommerce-admin/src/API/Init.php | 3 + .../src/API/NavigationFavorites.php | 327 + .../woocommerce-admin/src/API/NoteActions.php | 84 +- plugins/woocommerce-admin/src/API/Notes.php | 27 + .../src/API/OnboardingProfile.php | 35 +- .../src/API/OnboardingTasks.php | 89 +- plugins/woocommerce-admin/src/API/Options.php | 15 +- plugins/woocommerce-admin/src/API/Plugins.php | 46 +- .../src/API/ProductAttributeTerms.php | 151 + .../src/API/ProductAttributes.php | 243 + .../woocommerce-admin/src/API/Products.php | 4 +- .../src/API/Reports/Controller.php | 2 +- .../src/API/Reports/Customers/DataStore.php | 32 +- .../src/API/Reports/DataStore.php | 48 +- .../src/API/Reports/Orders/Controller.php | 14 +- .../src/API/Reports/Orders/DataStore.php | 27 +- .../API/Reports/Revenue/Stats/Controller.php | 2 + .../src/API/Templates/digital_product.csv | 2 + .../src/API/Templates/physical_product.csv | 2 + .../src/API/Templates/variable_product.csv | 2 + .../src/Composer/Package.php | 50 +- plugins/woocommerce-admin/src/Events.php | 61 +- .../woocommerce-admin/src/FeaturePlugin.php | 23 +- .../src/Features/Coupons.php | 8 +- .../src/Features/CouponsMovedTrait.php | 4 +- .../Features/CustomerEffortScoreTracks.php | 319 +- .../src/Features/Features.php | 330 + .../src/Features/Homescreen.php | 29 +- .../src/Features/Marketing.php | 3 +- .../src/Features/Navigation/CoreMenu.php | 260 +- .../src/Features/Navigation/Favorites.php | 131 + .../src/Features/Navigation/Init.php | 148 +- .../src/Features/Navigation/Menu.php | 270 +- .../src/Features/Navigation/Screen.php | 19 +- .../src/Features/Onboarding.php | 212 +- .../src/Features/OnboardingSetUpShipping.php | 139 - .../src/Features/OnboardingTasks.php | 101 +- .../src/Features/Settings.php | 179 + .../src/Features/ShippingLabelBanner.php | 16 +- plugins/woocommerce-admin/src/Install.php | 35 +- plugins/woocommerce-admin/src/Loader.php | 364 +- .../src/Notes/AddFirstProduct.php | 89 + .../src/Notes/AddingAndManangingProducts.php | 77 + .../src/Notes/ChooseNiche.php | 6 +- .../src/Notes/ChoosingTheme.php | 52 + .../src/Notes/CouponPageMoved.php | 4 +- .../src/Notes/CustomizingProductCatalog.php | 80 + .../woocommerce-admin/src/Notes/DataStore.php | 1 + .../src/Notes/DeprecatedNotes.php | 64 +- .../src/Notes/DrawAttention.php | 37 +- .../src/Notes/FirstDownlaodableProduct.php | 68 + .../GettingStartedInEcommerceWebinar.php | 82 + .../src/Notes/GivingFeedbackNotes.php | 6 +- .../src/Notes/HistoricalData.php | 92 - .../src/Notes/HomeScreenFeedback.php | 82 - .../Notes/InsightFirstProductAndPayment.php | 66 + .../Notes/LearnMoreAboutVariableProducts.php | 83 + .../ManageStoreActivityFromHomeScreen.php | 66 + .../woocommerce-admin/src/Notes/Marketing.php | 5 + .../MerchantEmailNotifications.php | 140 + .../NotificationEmail.php | 207 + .../src/Notes/NavigationFeedback.php | 7 +- .../src/Notes/NavigationFeedbackFollowUp.php | 7 +- .../src/Notes/NavigationNudge.php | 86 + .../src/Notes/NeedSomeInspiration.php | 8 +- plugins/woocommerce-admin/src/Notes/Note.php | 4 + plugins/woocommerce-admin/src/Notes/Notes.php | 100 + .../src/Notes/OnboardingEmailMarketing.php | 2 +- .../src/Notes/OnboardingTraits.php | 61 + .../src/Notes/ReviewShippingSettings.php | 60 - .../WelcomeToWooCommerceForStoreUsers.php | 58 + .../src/Notes/WooCommercePayments.php | 2 + .../ComparisonOperation.php | 4 + .../GetRuleProcessor.php | 2 + .../OptionRuleProcessor.php | 5 +- .../ProductCountRuleProcessor.php | 7 +- .../src/RemoteInboxNotifications/README.md | 43 + .../RemoteInboxNotificationsEngine.php | 22 +- .../StoredStateSetupForProducts.php | 10 + .../WooCommerceAdminUpdatedRuleProcessor.php | 36 + .../src/Schedulers/CustomersScheduler.php | 1 + plugins/woocommerce-admin/src/Survey.php | 38 + plugins/woocommerce-admin/vendor/autoload.php | 2 +- .../vendor/autoload_packages.php | 7 +- .../automattic/jetpack-autoloader/README.md | 2 +- .../jetpack-autoloader/composer.json | 18 +- .../src/AutoloadFileWriter.php | 105 + .../src/AutoloadGenerator.php | 185 +- .../src/AutoloadProcessor.php | 2 - .../src/CustomAutoloaderPlugin.php | 88 +- .../jetpack-autoloader/src/autoload.php | 5 +- .../src/class-autoloader-handler.php | 189 +- .../src/class-autoloader-locator.php | 2 +- .../src/class-autoloader.php | 115 + .../src/class-container.php | 141 + .../src/class-hook-manager.php | 68 + .../src/class-latest-autoloader-guard.php | 78 + ...-handler.php => class-manifest-reader.php} | 24 +- .../src/class-path-processor.php | 186 + .../src/class-php-autoloader.php | 82 + .../src/class-plugin-locator.php | 145 + .../src/class-plugins-handler.php | 201 +- .../src/class-version-selector.php | 10 +- .../jetpack-autoloader/src/functions.php | 66 - .../vendor/composer/InstalledVersions.php | 316 + .../vendor/composer/autoload_real.php | 8 +- .../vendor/composer/autoload_static.php | 8 +- .../vendor/composer/installed.json | 55 +- .../vendor/composer/installed.php | 56 + .../workflows/continuous-integration.yml | 70 + .../installers/.github/workflows/lint.yml | 30 + .../installers/.github/workflows/phpstan.yml | 51 + .../vendor/composer/installers/composer.json | 21 +- .../composer/installers/phpstan.neon.dist | 10 + .../src/Composer/Installers/BaseInstaller.php | 12 +- .../Composer/Installers/CakePHPInstaller.php | 11 +- .../Composer/Installers/CockpitInstaller.php | 4 +- .../src/Composer/Installers/Installer.php | 32 +- .../Composer/Installers/MoodleInstaller.php | 1 + .../src/Composer/Installers/OxidInstaller.php | 2 +- .../Installers/ProcessWireInstaller.php | 22 + .../Composer/Installers/StarbugInstaller.php | 12 + .../Composer/Installers/SyDESInstaller.php | 4 +- .../src/Composer/Installers/TaoInstaller.php | 18 + .../composer/jetpack_autoload_classmap.php | 2 +- .../vendor/composer/jetpack_autoload_psr4.php | 6 +- .../vendor/composer/platform_check.php | 26 + .../jetpack-autoloader/autoload_functions.php | 74 - .../class-autoloader-handler.php | 191 +- .../class-autoloader-locator.php | 4 +- .../jetpack-autoloader/class-autoloader.php | 123 + .../jetpack-autoloader/class-container.php | 149 + .../jetpack-autoloader/class-hook-manager.php | 76 + .../class-latest-autoloader-guard.php | 86 + ...-handler.php => class-manifest-reader.php} | 26 +- .../class-path-processor.php | 194 + .../class-php-autoloader.php | 90 + .../class-plugin-locator.php | 153 + .../class-plugins-handler.php | 203 +- .../class-version-loader.php | 2 +- .../class-version-selector.php | 12 +- .../woocommerce-admin/woocommerce-admin.php | 15 +- 343 files changed, 128898 insertions(+), 128379 deletions(-) create mode 100644 plugins/woocommerce-admin/dist/app/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/beta-features-tracking-modal/style.css create mode 100644 plugins/woocommerce-admin/dist/beta-features-tracking-modal/style.rtl.css rename plugins/woocommerce-admin/dist/chunks/{17.style.css => 14.style.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{17.style.rtl.css => 14.style.rtl.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{6.style.css => 15.style.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{6.style.rtl.css => 15.style.rtl.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{23.style.css => 20.style.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{23.style.rtl.css => 20.style.rtl.css} (100%) rename plugins/woocommerce-admin/dist/chunks/{30.style.css => 28.style.css} (95%) rename plugins/woocommerce-admin/dist/chunks/{30.style.rtl.css => 28.style.rtl.css} (95%) create mode 100644 plugins/woocommerce-admin/dist/chunks/29.style.css create mode 100644 plugins/woocommerce-admin/dist/chunks/29.style.rtl.css create mode 100644 plugins/woocommerce-admin/dist/chunks/3.style.css create mode 100644 plugins/woocommerce-admin/dist/chunks/3.style.rtl.css delete mode 100644 plugins/woocommerce-admin/dist/chunks/31.style.css delete mode 100644 plugins/woocommerce-admin/dist/chunks/31.style.rtl.css create mode 100644 plugins/woocommerce-admin/dist/chunks/32.style.css create mode 100644 plugins/woocommerce-admin/dist/chunks/32.style.rtl.css delete mode 100644 plugins/woocommerce-admin/dist/chunks/38.style.css delete mode 100644 plugins/woocommerce-admin/dist/chunks/38.style.rtl.css rename plugins/woocommerce-admin/dist/chunks/{11.style.css => 4.style.css} (67%) rename plugins/woocommerce-admin/dist/chunks/{11.style.rtl.css => 4.style.rtl.css} (68%) create mode 100644 plugins/woocommerce-admin/dist/chunks/46.style.css create mode 100644 plugins/woocommerce-admin/dist/chunks/46.style.rtl.css create mode 100644 plugins/woocommerce-admin/dist/chunks/52.js create mode 100644 plugins/woocommerce-admin/dist/chunks/52.min.js delete mode 100644 plugins/woocommerce-admin/dist/chunks/7.js delete mode 100644 plugins/woocommerce-admin/dist/chunks/7.min.js create mode 100644 plugins/woocommerce-admin/dist/chunks/7.style.css create mode 100644 plugins/woocommerce-admin/dist/chunks/7.style.rtl.css delete mode 100644 plugins/woocommerce-admin/dist/chunks/8.js delete mode 100644 plugins/woocommerce-admin/dist/chunks/8.min.js delete mode 100644 plugins/woocommerce-admin/dist/chunks/9.js delete mode 100644 plugins/woocommerce-admin/dist/chunks/9.min.js rename plugins/woocommerce-admin/dist/chunks/{12.style.css => 9.style.css} (71%) rename plugins/woocommerce-admin/dist/chunks/{12.style.rtl.css => 9.style.rtl.css} (71%) create mode 100644 plugins/woocommerce-admin/dist/components/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/csv-export/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/currency/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/customer-effort-score/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/data/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/date/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/ie/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/navigation-opt-out/style.css create mode 100644 plugins/woocommerce-admin/dist/navigation-opt-out/style.rtl.css create mode 100644 plugins/woocommerce-admin/dist/navigation/index.min.asset.php delete mode 100644 plugins/woocommerce-admin/dist/navigation/style-rtl.css delete mode 100644 plugins/woocommerce-admin/dist/navigation/style.css create mode 100644 plugins/woocommerce-admin/dist/notices/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/number/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/tracks/index.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/beta-features-tracking-modal.js create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/beta-features-tracking-modal.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/beta-features-tracking-modal.min.js create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/marketing-coupons.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/navigation-opt-out.js create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/navigation-opt-out.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/navigation-opt-out.min.js create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/onboarding-homepage-notice.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/onboarding-product-import-notice.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/onboarding-product-notice.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/onboarding-tax-notice.min.asset.php create mode 100644 plugins/woocommerce-admin/dist/wp-admin-scripts/print-shipping-label-banner.min.asset.php create mode 100644 plugins/woocommerce-admin/images/admin_notes/dashboard-widget-setup.png create mode 100644 plugins/woocommerce-admin/images/admin_notes/openbox+purple.png create mode 100644 plugins/woocommerce-admin/images/onboarding/mailpoet.png create mode 100644 plugins/woocommerce-admin/images/onboarding/mercadopago.png create mode 100644 plugins/woocommerce-admin/images/onboarding/paystack.png create mode 100644 plugins/woocommerce-admin/includes/emails/html-merchant-notification.php create mode 100644 plugins/woocommerce-admin/includes/emails/plain-merchant-notification.php create mode 100644 plugins/woocommerce-admin/src/API/NavigationFavorites.php create mode 100644 plugins/woocommerce-admin/src/API/ProductAttributeTerms.php create mode 100644 plugins/woocommerce-admin/src/API/ProductAttributes.php create mode 100644 plugins/woocommerce-admin/src/API/Templates/digital_product.csv create mode 100644 plugins/woocommerce-admin/src/API/Templates/physical_product.csv create mode 100644 plugins/woocommerce-admin/src/API/Templates/variable_product.csv create mode 100644 plugins/woocommerce-admin/src/Features/Features.php create mode 100644 plugins/woocommerce-admin/src/Features/Navigation/Favorites.php delete mode 100644 plugins/woocommerce-admin/src/Features/OnboardingSetUpShipping.php create mode 100644 plugins/woocommerce-admin/src/Features/Settings.php create mode 100644 plugins/woocommerce-admin/src/Notes/AddFirstProduct.php create mode 100644 plugins/woocommerce-admin/src/Notes/AddingAndManangingProducts.php create mode 100644 plugins/woocommerce-admin/src/Notes/ChoosingTheme.php create mode 100644 plugins/woocommerce-admin/src/Notes/CustomizingProductCatalog.php create mode 100644 plugins/woocommerce-admin/src/Notes/FirstDownlaodableProduct.php create mode 100644 plugins/woocommerce-admin/src/Notes/GettingStartedInEcommerceWebinar.php delete mode 100644 plugins/woocommerce-admin/src/Notes/HistoricalData.php delete mode 100644 plugins/woocommerce-admin/src/Notes/HomeScreenFeedback.php create mode 100644 plugins/woocommerce-admin/src/Notes/InsightFirstProductAndPayment.php create mode 100644 plugins/woocommerce-admin/src/Notes/LearnMoreAboutVariableProducts.php create mode 100644 plugins/woocommerce-admin/src/Notes/ManageStoreActivityFromHomeScreen.php create mode 100644 plugins/woocommerce-admin/src/Notes/MerchantEmailNotifications/MerchantEmailNotifications.php create mode 100644 plugins/woocommerce-admin/src/Notes/MerchantEmailNotifications/NotificationEmail.php create mode 100644 plugins/woocommerce-admin/src/Notes/NavigationNudge.php create mode 100644 plugins/woocommerce-admin/src/Notes/OnboardingTraits.php delete mode 100644 plugins/woocommerce-admin/src/Notes/ReviewShippingSettings.php create mode 100644 plugins/woocommerce-admin/src/Notes/WelcomeToWooCommerceForStoreUsers.php create mode 100644 plugins/woocommerce-admin/src/RemoteInboxNotifications/WooCommerceAdminUpdatedRuleProcessor.php create mode 100644 plugins/woocommerce-admin/src/Survey.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-autoloader.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-container.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-hook-manager.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php rename plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/{class-manifest-handler.php => class-manifest-reader.php} (76%) create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-path-processor.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php create mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php delete mode 100644 plugins/woocommerce-admin/vendor/automattic/jetpack-autoloader/src/functions.php create mode 100644 plugins/woocommerce-admin/vendor/composer/InstalledVersions.php create mode 100644 plugins/woocommerce-admin/vendor/composer/installed.php create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/.github/workflows/continuous-integration.yml create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/.github/workflows/lint.yml create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/.github/workflows/phpstan.yml create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/phpstan.neon.dist create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php create mode 100644 plugins/woocommerce-admin/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php create mode 100644 plugins/woocommerce-admin/vendor/composer/platform_check.php delete mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/autoload_functions.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-autoloader.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-container.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-hook-manager.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-latest-autoloader-guard.php rename plugins/woocommerce-admin/vendor/jetpack-autoloader/{class-manifest-handler.php => class-manifest-reader.php} (75%) create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-path-processor.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-php-autoloader.php create mode 100644 plugins/woocommerce-admin/vendor/jetpack-autoloader/class-plugin-locator.php diff --git a/plugins/woocommerce-admin/dist/app/index.js b/plugins/woocommerce-admin/dist/app/index.js index 3452aa55..51a94ab8 100644 --- a/plugins/woocommerce-admin/dist/app/index.js +++ b/plugins/woocommerce-admin/dist/app/index.js @@ -35,7 +35,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] = /******/ /******/ // object to store loaded CSS chunks /******/ var installedCssChunks = { -/******/ 24: 0 +/******/ 21: 0 /******/ } /******/ var isCssRtlEnabled = function() { /******/ return document.dir === 'rtl'; @@ -45,14 +45,14 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] = /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 24: 0 +/******/ 21: 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function webpackJsonpScriptSrc(chunkId) { -/******/ return __webpack_require__.p + "chunks/" + ({"10":"activity-panels-help","11":"activity-panels-inbox","12":"analytics-report","13":"analytics-report-categories","14":"analytics-report-coupons","15":"analytics-report-customers","16":"analytics-report-downloads","17":"analytics-report-orders","18":"analytics-report-products","19":"analytics-report-revenue","20":"analytics-report-stock","21":"analytics-report-taxes","22":"analytics-report-variations","23":"analytics-settings","29":"customizable-dashboard","30":"dashboard","31":"dashboard-charts","34":"homescreen","36":"leaderboards","38":"marketing-overview","47":"profile-wizard","48":"store-alerts","49":"store-performance","50":"task-list","52":"wcpay-usage-modal"}[chunkId]||chunkId) + ".js" +/******/ return __webpack_require__.p + "chunks/" + ({"7":"activity-panels-help","8":"activity-panels-inbox","9":"analytics-report","10":"analytics-report-categories","11":"analytics-report-coupons","12":"analytics-report-customers","13":"analytics-report-downloads","14":"analytics-report-orders","15":"analytics-report-products","16":"analytics-report-revenue","17":"analytics-report-stock","18":"analytics-report-taxes","19":"analytics-report-variations","20":"analytics-settings","27":"customizable-dashboard","28":"dashboard","29":"dashboard-charts","32":"homescreen","34":"leaderboards","36":"marketing-overview","46":"profile-wizard","47":"store-alerts","48":"store-performance","49":"task-list","51":"wcpay-usage-modal"}[chunkId]||chunkId) + ".js" /******/ } /******/ /******/ function jsonpScriptSrc(chunkId) { @@ -95,7 +95,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] = /******/ /******/ /******/ // mini-css-extract-plugin CSS loading -/******/ var cssChunks = {"0":1,"6":1,"10":1,"11":1,"12":1,"17":1,"23":1,"30":1,"31":1,"34":1,"36":1,"38":1,"47":1,"48":1,"49":1}; +/******/ var cssChunks = {"0":1,"4":1,"7":1,"9":1,"10":1,"14":1,"15":1,"20":1,"28":1,"29":1,"32":1,"34":1,"36":1,"46":1,"47":1,"48":1,"49":1}; /******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); /******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { /******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) { @@ -259,14 +259,14 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 367); +/******/ return __webpack_require__(__webpack_require__.s = 418); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["element"]; }()); +(function() { module.exports = window["wp"]["element"]; }()); /***/ }), /* 1 */ @@ -282,7 +282,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] = if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(120)(); + module.exports = __webpack_require__(215)(); } @@ -290,16 +290,220 @@ if (false) { var throwOnDirectAccess, ReactIs; } else { /* 2 */ /***/ (function(module, exports) { -(function() { module.exports = this["lodash"]; }()); +(function() { module.exports = window["wp"]["i18n"]; }()); /***/ }), /* 3 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) { + return it && it.Math == Math && it; +}; -(function() { module.exports = this["wp"]["i18n"]; }()); +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +module.exports = + /* global globalThis -- safe */ + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof global == 'object' && global) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(96))) /***/ }), /* 4 */ +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["components"]; }()); + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +(function() { module.exports = window["lodash"]; }()); + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(3); +var shared = __webpack_require__(58); +var has = __webpack_require__(11); +var uid = __webpack_require__(55); +var NATIVE_SYMBOL = __webpack_require__(62); +var USE_SYMBOL_AS_UID = __webpack_require__(93); + +var WellKnownSymbolsStore = shared('wks'); +var Symbol = global.Symbol; +var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; + +module.exports = function (name) { + if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { + if (NATIVE_SYMBOL && has(Symbol, name)) { + WellKnownSymbolsStore[name] = Symbol[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } return WellKnownSymbolsStore[name]; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(10); + +module.exports = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; + +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(3); +var getOwnPropertyDescriptor = __webpack_require__(33).f; +var createNonEnumerableProperty = __webpack_require__(19); +var redefine = __webpack_require__(27); +var setGlobal = __webpack_require__(46); +var copyConstructorProperties = __webpack_require__(103); +var isForced = __webpack_require__(74); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__(6); + +// Detect IE8's incomplete defineProperty implementation +module.exports = !fails(function () { + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; +}); + + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +module.exports = _getPrototypeOf; + +/***/ }), +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -357,9854 +561,9868 @@ if (false) { var throwOnDirectAccess, ReactIs; } else { /***/ }), -/* 5 */ +/* 16 */ /***/ (function(module, exports) { -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } +(function() { module.exports = window["regeneratorRuntime"]; }()); - return obj; -} +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(13); +var IE8_DOM_DEFINE = __webpack_require__(72); +var anObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(40); + +var nativeDefineProperty = Object.defineProperty; + +// `Object.defineProperty` method +// https://tc39.es/ecma262/#sec-object.defineproperty +exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; -module.exports = _defineProperty; /***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 18 */ +/***/ (function(module, exports) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } - return obj; + return self; } -/***/ }), -/* 7 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +module.exports = _assertThisInitialized; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); -function _extends() { - _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } +var DESCRIPTORS = __webpack_require__(13); +var definePropertyModule = __webpack_require__(17); +var createPropertyDescriptor = __webpack_require__(39); - return target; - }; +module.exports = DESCRIPTORS ? function (object, key, value) { + return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; - return _extends.apply(this, arguments); -} /***/ }), -/* 8 */ +/* 20 */ /***/ (function(module, exports) { -(function() { module.exports = this["React"]; }()); +(function() { module.exports = window["React"]; }()); /***/ }), -/* 9 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +// toObject with fallback for non-array-like ES3 strings +var IndexedObject = __webpack_require__(71); +var requireObjectCoercible = __webpack_require__(32); + +module.exports = function (it) { + return IndexedObject(requireObjectCoercible(it)); +}; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); -function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); -} /***/ }), -/* 10 */ +/* 22 */ /***/ (function(module, exports) { -function _getPrototypeOf(o) { - module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } } -module.exports = _getPrototypeOf; +module.exports = _classCallCheck; /***/ }), -/* 11 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54); - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); +/* 23 */ +/***/ (function(module, exports) { - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); } +} - return target; +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; } +module.exports = _createClass; + /***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); +var setPrototypeOf = __webpack_require__(204); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); } - return self; + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); } +module.exports = _inherits; + /***/ }), -/* 13 */ -/***/ (function(module, exports) { +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); +var _typeof = __webpack_require__(108); + +var assertThisInitialized = __webpack_require__(18); + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; } - return self; + return assertThisInitialized(self); } -module.exports = _assertThisInitialized; +module.exports = _possibleConstructorReturn; /***/ }), -/* 14 */ +/* 26 */ +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["data"]; }()); + +/***/ }), +/* 27 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(119); +var global = __webpack_require__(3); +var createNonEnumerableProperty = __webpack_require__(19); +var has = __webpack_require__(11); +var setGlobal = __webpack_require__(46); +var inspectSource = __webpack_require__(68); +var InternalStateModule = __webpack_require__(45); + +var getInternalState = InternalStateModule.get; +var enforceInternalState = InternalStateModule.enforce; +var TEMPLATE = String(String).split('String'); + +(module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); +}); /***/ }), -/* 15 */ +/* 28 */ /***/ (function(module, exports) { -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} +(function() { module.exports = window["wp"]["primitives"]; }()); -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} +/***/ }), +/* 29 */ +/***/ (function(module, exports) { -module.exports = _createClass; +(function() { module.exports = window["moment"]; }()); /***/ }), -/* 16 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 30 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} /***/ }), -/* 17 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} +var path = __webpack_require__(81); +var global = __webpack_require__(3); + +var aFunction = function (variable) { + return typeof variable == 'function' ? variable : undefined; +}; + +module.exports = function (namespace, method) { + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) + : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; +}; -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} /***/ }), -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 32 */ +/***/ (function(module, exports) { -"use strict"; +// `RequireObjectCoercible` abstract operation +// https://tc39.es/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; }); -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { - return _setPrototypeOf(o, p); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js +var DESCRIPTORS = __webpack_require__(13); +var propertyIsEnumerableModule = __webpack_require__(76); +var createPropertyDescriptor = __webpack_require__(39); +var toIndexedObject = __webpack_require__(21); +var toPrimitive = __webpack_require__(40); +var has = __webpack_require__(11); +var IE8_DOM_DEFINE = __webpack_require__(72); + +var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); +}; -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); -} +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(42); + +var min = Math.min; + +// `ToLength` abstract operation +// https://tc39.es/ecma262/#sec-tolength +module.exports = function (argument) { + return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 +}; + /***/ }), -/* 19 */ +/* 35 */ /***/ (function(module, exports) { -(function() { module.exports = this["moment"]; }()); +(function() { module.exports = window["wp"]["dataControls"]; }()); /***/ }), -/* 20 */ +/* 36 */ /***/ (function(module, exports) { -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} +module.exports = {}; -module.exports = _classCallCheck; /***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); -/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); -/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); +var $ = __webpack_require__(12); +var toObject = __webpack_require__(38); +var nativeKeys = __webpack_require__(54); +var fails = __webpack_require__(6); +var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); }); -function _possibleConstructorReturn(self, call) { - if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { - return call; +// `Object.keys` method +// https://tc39.es/ecma262/#sec-object.keys +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { + keys: function keys(it) { + return nativeKeys(toObject(it)); } +}); - return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); -} /***/ }), -/* 22 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { -var setPrototypeOf = __webpack_require__(135); - -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } +var requireObjectCoercible = __webpack_require__(32); - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) setPrototypeOf(subClass, superClass); -} +// `ToObject` abstract operation +// https://tc39.es/ecma262/#sec-toobject +module.exports = function (argument) { + return Object(requireObjectCoercible(argument)); +}; -module.exports = _inherits; /***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { +/* 39 */ +/***/ (function(module, exports) { -var _typeof = __webpack_require__(52); +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; -var assertThisInitialized = __webpack_require__(13); -function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === "object" || typeof call === "function")) { - return call; - } +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { - return assertThisInitialized(self); -} +var isObject = __webpack_require__(10); + +// `ToPrimitive` abstract operation +// https://tc39.es/ecma262/#sec-toprimitive +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + throw TypeError("Can't convert object to primitive value"); +}; -module.exports = _possibleConstructorReturn; /***/ }), -/* 24 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; +var $ = __webpack_require__(12); +var $filter = __webpack_require__(75).filter; +var arrayMethodHasSpeciesSupport = __webpack_require__(89); - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } +// `Array.prototype.filter` method +// https://tc39.es/ecma262/#sec-array.prototype.filter +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } +}); - return _arr; -} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js -var unsupportedIterableToArray = __webpack_require__(59); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js +/***/ }), +/* 42 */ +/***/ (function(module, exports) { +var ceil = Math.ceil; +var floor = Math.floor; +// `ToInteger` abstract operation +// https://tc39.es/ecma262/#sec-tointeger +module.exports = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); +}; -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest(); -} /***/ }), -/* 25 */ -/***/ (function(module, exports) { +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { -(function() { module.exports = this["wp"]["data"]; }()); +var arrayWithHoles = __webpack_require__(182); -/***/ }), -/* 26 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var iterableToArrayLimit = __webpack_require__(183); -"use strict"; +var unsupportedIterableToArray = __webpack_require__(131); -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); +var nonIterableRest = __webpack_require__(184); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js -var arrayLikeToArray = __webpack_require__(49); +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +module.exports = _slicedToArray; -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js -var unsupportedIterableToArray = __webpack_require__(59); +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +var arrayWithoutHoles = __webpack_require__(179); +var iterableToArray = __webpack_require__(180); +var unsupportedIterableToArray = __webpack_require__(131); +var nonIterableSpread = __webpack_require__(181); function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); } -/***/ }), -/* 27 */ -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["dataControls"]; }()); +module.exports = _toConsumableArray; /***/ }), -/* 28 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithoutHoles = __webpack_require__(93); +var NATIVE_WEAK_MAP = __webpack_require__(106); +var global = __webpack_require__(3); +var isObject = __webpack_require__(10); +var createNonEnumerableProperty = __webpack_require__(19); +var objectHas = __webpack_require__(11); +var shared = __webpack_require__(47); +var sharedKey = __webpack_require__(52); +var hiddenKeys = __webpack_require__(36); -var iterableToArray = __webpack_require__(94); +var WeakMap = global.WeakMap; +var set, get, has; -var unsupportedIterableToArray = __webpack_require__(63); +var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); +}; -var nonIterableSpread = __webpack_require__(95); +var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; +}; -function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +if (NATIVE_WEAK_MAP) { + var store = shared.state || (shared.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; +} else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return objectHas(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return objectHas(it, STATE); + }; } -module.exports = _toConsumableArray; - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { +module.exports = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor +}; -(function() { module.exports = this["wc"]["navigation"]; }()); /***/ }), -/* 30 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return rgba; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return color; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(106); -/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tinycolor2__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _colors_values__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86); -/** - * External dependencies - */ +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { +var global = __webpack_require__(3); +var createNonEnumerableProperty = __webpack_require__(19); -/** - * Internal dependencies - */ +module.exports = function (key, value) { + try { + createNonEnumerableProperty(global, key, value); + } catch (error) { + global[key] = value; + } return value; +}; -/** - * Generating a CSS complient rgba() color value. - * - * @param {string} hexValue The hex value to convert to rgba(). - * @param {number} alpha The alpha value for opacity. - * @return {string} The converted rgba() color value. - * - * @example - * rgba( '#000000', 0.5 ) - * // rgba(0, 0, 0, 0.5) - */ +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { -function rgba() { - var hexValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; +var global = __webpack_require__(3); +var setGlobal = __webpack_require__(46); - var _tinycolor$toRgb = tinycolor2__WEBPACK_IMPORTED_MODULE_1___default()(hexValue).toRgb(), - r = _tinycolor$toRgb.r, - g = _tinycolor$toRgb.g, - b = _tinycolor$toRgb.b; +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || setGlobal(SHARED, {}); - return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")"); -} -/** - * Retrieves a color from the color palette. - * - * @param {string} value The value to retrieve. - * @return {string} The color (or fallback, if not found). - * - * @example - * color( 'blue.wordpress.700' ) - * // #00669b - */ +module.exports = store; -function color(value) { - var fallbackColor = '#000'; - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(_colors_values__WEBPACK_IMPORTED_MODULE_2__[/* COLORS */ "a"], value, fallbackColor); -} -//# sourceMappingURL=colors.js.map /***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayWithHoles = __webpack_require__(100); +/* 48 */ +/***/ (function(module, exports) { -var iterableToArrayLimit = __webpack_require__(101); +// IE8- don't enum bug keys +module.exports = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; -var unsupportedIterableToArray = __webpack_require__(63); -var nonIterableRest = __webpack_require__(102); +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { -function _slicedToArray(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +var global = __webpack_require__(3); +var DOMIterables = __webpack_require__(127); +var forEach = __webpack_require__(149); +var createNonEnumerableProperty = __webpack_require__(19); + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } } -module.exports = _slicedToArray; /***/ }), -/* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 50 */ +/***/ (function(module, exports) { -"use strict"; +(function() { module.exports = window["wc"]["navigation"]; }()); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js -var defineProperty = __webpack_require__(5); -var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(8); +"use strict"; -// EXTERNAL MODULE: ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js -var memoize_browser_esm = __webpack_require__(73); +var $ = __webpack_require__(12); +var $map = __webpack_require__(75).map; +var arrayMethodHasSpeciesSupport = __webpack_require__(89); -// CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); +// `Array.prototype.map` method +// https://tc39.es/ecma262/#sec-array.prototype.map +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); -var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 -var index = Object(memoize_browser_esm["a" /* default */])(function (prop) { - return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 - /* o */ - && prop.charCodeAt(1) === 110 - /* n */ - && prop.charCodeAt(2) < 91; -} -/* Z+1 */ -); +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ var is_prop_valid_browser_esm = (index); +var shared = __webpack_require__(58); +var uid = __webpack_require__(55); -// EXTERNAL MODULE: ./node_modules/@emotion/core/dist/core.browser.esm.js + 6 modules -var core_browser_esm = __webpack_require__(48); +var keys = shared('keys'); -// EXTERNAL MODULE: ./node_modules/@emotion/utils/dist/utils.browser.esm.js -var utils_browser_esm = __webpack_require__(38); +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; -// EXTERNAL MODULE: ./node_modules/@emotion/serialize/dist/serialize.browser.esm.js + 2 modules -var serialize_browser_esm = __webpack_require__(37); -// CONCATENATED MODULE: ./node_modules/@emotion/styled-base/dist/styled-base.browser.esm.js +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +var $ = __webpack_require__(12); +var global = __webpack_require__(3); +var getBuiltIn = __webpack_require__(31); +var IS_PURE = __webpack_require__(57); +var DESCRIPTORS = __webpack_require__(13); +var NATIVE_SYMBOL = __webpack_require__(62); +var USE_SYMBOL_AS_UID = __webpack_require__(93); +var fails = __webpack_require__(6); +var has = __webpack_require__(11); +var isArray = __webpack_require__(84); +var isObject = __webpack_require__(10); +var anObject = __webpack_require__(9); +var toObject = __webpack_require__(38); +var toIndexedObject = __webpack_require__(21); +var toPrimitive = __webpack_require__(40); +var createPropertyDescriptor = __webpack_require__(39); +var nativeObjectCreate = __webpack_require__(69); +var objectKeys = __webpack_require__(54); +var getOwnPropertyNamesModule = __webpack_require__(56); +var getOwnPropertyNamesExternal = __webpack_require__(147); +var getOwnPropertySymbolsModule = __webpack_require__(79); +var getOwnPropertyDescriptorModule = __webpack_require__(33); +var definePropertyModule = __webpack_require__(17); +var propertyIsEnumerableModule = __webpack_require__(76); +var createNonEnumerableProperty = __webpack_require__(19); +var redefine = __webpack_require__(27); +var shared = __webpack_require__(58); +var sharedKey = __webpack_require__(52); +var hiddenKeys = __webpack_require__(36); +var uid = __webpack_require__(55); +var wellKnownSymbol = __webpack_require__(8); +var wrappedWellKnownSymbolModule = __webpack_require__(119); +var defineWellKnownSymbol = __webpack_require__(148); +var setToStringTag = __webpack_require__(90); +var InternalStateModule = __webpack_require__(45); +var $forEach = __webpack_require__(75).forEach; + +var HIDDEN = sharedKey('hidden'); +var SYMBOL = 'Symbol'; +var PROTOTYPE = 'prototype'; +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(SYMBOL); +var ObjectPrototype = Object[PROTOTYPE]; +var $Symbol = global.Symbol; +var $stringify = getBuiltIn('JSON', 'stringify'); +var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; +var nativeDefineProperty = definePropertyModule.f; +var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; +var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; +var AllSymbols = shared('symbols'); +var ObjectPrototypeSymbols = shared('op-symbols'); +var StringToSymbolRegistry = shared('string-to-symbol-registry'); +var SymbolToStringRegistry = shared('symbol-to-string-registry'); +var WellKnownSymbolsStore = shared('wks'); +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDescriptor = DESCRIPTORS && fails(function () { + return nativeObjectCreate(nativeDefineProperty({}, 'a', { + get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (O, P, Attributes) { + var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); + if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; + nativeDefineProperty(O, P, Attributes); + if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { + nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); + } +} : nativeDefineProperty; + +var wrap = function (tag, description) { + var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]); + setInternalState(symbol, { + type: SYMBOL, + tag: tag, + description: description + }); + if (!DESCRIPTORS) symbol.description = description; + return symbol; +}; +var isSymbol = USE_SYMBOL_AS_UID ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return Object(it) instanceof $Symbol; +}; +var $defineProperty = function defineProperty(O, P, Attributes) { + if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); + anObject(O); + var key = toPrimitive(P, true); + anObject(Attributes); + if (has(AllSymbols, key)) { + if (!Attributes.enumerable) { + if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {})); + O[HIDDEN][key] = true; + } else { + if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; + Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); + } return setSymbolDescriptor(O, key, Attributes); + } return nativeDefineProperty(O, key, Attributes); +}; +var $defineProperties = function defineProperties(O, Properties) { + anObject(O); + var properties = toIndexedObject(Properties); + var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); + $forEach(keys, function (key) { + if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]); + }); + return O; +}; +var $create = function create(O, Properties) { + return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); +}; -var testOmitPropsOnStringTag = is_prop_valid_browser_esm; +var $propertyIsEnumerable = function propertyIsEnumerable(V) { + var P = toPrimitive(V, true); + var enumerable = nativePropertyIsEnumerable.call(this, P); + if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false; + return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; +}; -var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) { - return key !== 'theme' && key !== 'innerRef'; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { + var it = toIndexedObject(O); + var key = toPrimitive(P, true); + if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return; + var descriptor = nativeGetOwnPropertyDescriptor(it, key); + if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) { + descriptor.enumerable = true; + } + return descriptor; }; -var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) { - return typeof tag === 'string' && // 96 is one less than the char code - // for "a" so this is checking that - // it's a lowercase character - tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent; +var $getOwnPropertyNames = function getOwnPropertyNames(O) { + var names = nativeGetOwnPropertyNames(toIndexedObject(O)); + var result = []; + $forEach(names, function (key) { + if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key); + }); + return result; }; -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } +var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { + var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; + var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); + var result = []; + $forEach(names, function (key) { + if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) { + result.push(AllSymbols[key]); + } + }); + return result; +}; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; +// `Symbol` constructor +// https://tc39.es/ecma262/#sec-symbol-constructor +if (!NATIVE_SYMBOL) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor'); + var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]); + var tag = uid(description); + var setter = function (value) { + if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); + }; + if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); + return wrap(tag, description); + }; -var styled_base_browser_esm_createStyled = function createStyled(tag, options) { - if (false) {} + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return getInternalState(this).tag; + }); - var identifierName; - var shouldForwardProp; - var targetClassName; + redefine($Symbol, 'withoutSetter', function (description) { + return wrap(uid(description), description); + }); - if (options !== undefined) { - identifierName = options.label; - targetClassName = options.target; - shouldForwardProp = tag.__emotion_forwardProp && options.shouldForwardProp ? function (propName) { - return tag.__emotion_forwardProp(propName) && // $FlowFixMe - options.shouldForwardProp(propName); - } : options.shouldForwardProp; - } + propertyIsEnumerableModule.f = $propertyIsEnumerable; + definePropertyModule.f = $defineProperty; + getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; + getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; + getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; - var isReal = tag.__emotion_real === tag; - var baseTag = isReal && tag.__emotion_base || tag; + wrappedWellKnownSymbolModule.f = function (name) { + return wrap(wellKnownSymbol(name), name); + }; - if (typeof shouldForwardProp !== 'function' && isReal) { - shouldForwardProp = tag.__emotion_forwardProp; + if (DESCRIPTORS) { + // https://github.com/tc39/proposal-Symbol-description + nativeDefineProperty($Symbol[PROTOTYPE], 'description', { + configurable: true, + get: function description() { + return getInternalState(this).description; + } + }); + if (!IS_PURE) { + redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); + } } +} - var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag); - var shouldUseAs = !defaultShouldForwardProp('as'); - return function () { - var args = arguments; - var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : []; +$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { + Symbol: $Symbol +}); - if (identifierName !== undefined) { - styles.push("label:" + identifierName + ";"); - } +$forEach(objectKeys(WellKnownSymbolsStore), function (name) { + defineWellKnownSymbol(name); +}); - if (args[0] == null || args[0].raw === undefined) { - styles.push.apply(styles, args); - } else { - if (false) {} +$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { + // `Symbol.for` method + // https://tc39.es/ecma262/#sec-symbol.for + 'for': function (key) { + var string = String(key); + if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; + var symbol = $Symbol(string); + StringToSymbolRegistry[string] = symbol; + SymbolToStringRegistry[symbol] = string; + return symbol; + }, + // `Symbol.keyFor` method + // https://tc39.es/ecma262/#sec-symbol.keyfor + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); + if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; + }, + useSetter: function () { USE_SETTER = true; }, + useSimple: function () { USE_SETTER = false; } +}); - styles.push(args[0][0]); - var len = args.length; - var i = 1; +$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + create: $create, + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + defineProperty: $defineProperty, + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + defineProperties: $defineProperties, + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors + getOwnPropertyDescriptor: $getOwnPropertyDescriptor +}); - for (; i < len; i++) { - if (false) {} +$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + getOwnPropertyNames: $getOwnPropertyNames, + // `Object.getOwnPropertySymbols` method + // https://tc39.es/ecma262/#sec-object.getownpropertysymbols + getOwnPropertySymbols: $getOwnPropertySymbols +}); - styles.push(args[i], args[0][i]); - } - } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return getOwnPropertySymbolsModule.f(toObject(it)); + } +}); +// `JSON.stringify` method behavior with symbols +// https://tc39.es/ecma262/#sec-json.stringify +if ($stringify) { + var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () { + var symbol = $Symbol(); + // MS Edge converts symbol values to JSON as {} + return $stringify([symbol]) != '[null]' + // WebKit converts symbol values to JSON as null + || $stringify({ a: symbol }) != '{}' + // V8 throws on boxed symbols + || $stringify(Object(symbol)) != '{}'; + }); - var Styled = Object(core_browser_esm["c" /* withEmotionCache */])(function (props, context, ref) { - return Object(external_React_["createElement"])(core_browser_esm["a" /* ThemeContext */].Consumer, null, function (theme) { - var finalTag = shouldUseAs && props.as || baseTag; - var className = ''; - var classInterpolations = []; - var mergedProps = props; + $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + stringify: function stringify(it, replacer, space) { + var args = [it]; + var index = 1; + var $replacer; + while (arguments.length > index) args.push(arguments[index++]); + $replacer = replacer; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return $stringify.apply(null, args); + } + }); +} - if (props.theme == null) { - mergedProps = {}; +// `Symbol.prototype[@@toPrimitive]` method +// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive +if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) { + createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +} +// `Symbol.prototype[@@toStringTag]` property +// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag +setToStringTag($Symbol, SYMBOL); - for (var key in props) { - mergedProps[key] = props[key]; - } +hiddenKeys[HIDDEN] = true; - mergedProps.theme = theme; - } - if (typeof props.className === 'string') { - className = Object(utils_browser_esm["a" /* getRegisteredStyles */])(context.registered, classInterpolations, props.className); - } else if (props.className != null) { - className = props.className + " "; - } +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { - var serialized = Object(serialize_browser_esm["a" /* serializeStyles */])(styles.concat(classInterpolations), context.registered, mergedProps); - var rules = Object(utils_browser_esm["b" /* insertStyles */])(context, serialized, typeof finalTag === 'string'); - className += context.key + "-" + serialized.name; +var internalObjectKeys = __webpack_require__(73); +var enumBugKeys = __webpack_require__(48); - if (targetClassName !== undefined) { - className += " " + targetClassName; - } +// `Object.keys` method +// https://tc39.es/ecma262/#sec-object.keys +module.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); +}; - var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp; - var newProps = {}; - for (var _key in props) { - if (shouldUseAs && _key === 'as') continue; +/***/ }), +/* 55 */ +/***/ (function(module, exports) { - if ( // $FlowFixMe - finalShouldForwardProp(_key)) { - newProps[_key] = props[_key]; - } - } +var id = 0; +var postfix = Math.random(); - newProps.className = className; - newProps.ref = ref || props.innerRef; +module.exports = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); +}; - if (false) {} - var ele = Object(external_React_["createElement"])(finalTag, newProps); +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { - return ele; - }); - }); - Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")"; - Styled.defaultProps = tag.defaultProps; - Styled.__emotion_real = Styled; - Styled.__emotion_base = baseTag; - Styled.__emotion_styles = styles; - Styled.__emotion_forwardProp = shouldForwardProp; - Object.defineProperty(Styled, 'toString', { - value: function value() { - if (targetClassName === undefined && "production" !== 'production') { - return 'NO_COMPONENT_SELECTOR'; - } // $FlowFixMe: coerce undefined to string - - - return "." + targetClassName; - } - }); +var internalObjectKeys = __webpack_require__(73); +var enumBugKeys = __webpack_require__(48); - Styled.withComponent = function (nextTag, nextOptions) { - return createStyled(nextTag, nextOptions !== undefined ? _objectSpread({}, options || {}, {}, nextOptions) : options).apply(void 0, styles); - }; +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); - return Styled; - }; +// `Object.getOwnPropertyNames` method +// https://tc39.es/ecma262/#sec-object.getownpropertynames +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); }; -/* harmony default export */ var styled_base_browser_esm = __webpack_exports__["a"] = (styled_base_browser_esm_createStyled); - /***/ }), -/* 33 */ +/* 57 */ /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["url"]; }()); +module.exports = false; + /***/ }), -/* 34 */ -/***/ (function(module, exports) { +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var IS_PURE = __webpack_require__(57); +var store = __webpack_require__(47); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: '3.9.1', + mode: IS_PURE ? 'pure' : 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' +}); -(function() { module.exports = this["wc"]["data"]; }()); /***/ }), -/* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 59 */ +/***/ (function(module, exports) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ADMIN_URL; }); -/* unused harmony export COUNTRIES */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOCALE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ORDER_STATUSES; }); -/* unused harmony export SITE_TITLE */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WC_ASSET_URL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getSetting; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setSetting; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAdminLink; }); -/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52); -/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +(function() { module.exports = window["wc"]["data"]; }()); +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * External dependencies - */ - // Remove mutable data from settings object to prevent access. Data stores should be used instead. +var $ = __webpack_require__(12); +var fails = __webpack_require__(6); +var toIndexedObject = __webpack_require__(21); +var nativeGetOwnPropertyDescriptor = __webpack_require__(33).f; +var DESCRIPTORS = __webpack_require__(13); -var mutableSources = ['wcAdminSettings', 'preloadSettings']; -var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {}; -var SOURCE = Object.keys(settings).reduce(function (source, key) { - if (!mutableSources.includes(key)) { - source[key] = settings[key]; +var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); }); +var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor +$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { + return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); } +}); - return source; -}, {}); -var ADMIN_URL = SOURCE.adminUrl; -var COUNTRIES = SOURCE.countries; -var CURRENCY = SOURCE.currency; -var LOCALE = SOURCE.locale; -var ORDER_STATUSES = SOURCE.orderStatuses; -var SITE_TITLE = SOURCE.siteTitle; -var WC_ASSET_URL = SOURCE.wcAssetUrl; -/** - * Retrieves a setting value from the setting state. - * - * @param {string} name The identifier for the setting. - * @param {*} [fallback=false] The value to use as a fallback - * if the setting is not in the - * state. - * @param {Function} [filter=( val ) => val] A callback for filtering the - * value before it's returned. - * Receives both the found value - * (if it exists for the key) and - * the provided fallback arg. - * - * @return {*} The value present in the settings state for the given - * name. - */ -function getSetting(name) { - var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) { - return val; - }; +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { - if (mutableSources.includes(name)) { - throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be accessed via data store.')); +var $ = __webpack_require__(12); +var DESCRIPTORS = __webpack_require__(13); +var ownKeys = __webpack_require__(86); +var toIndexedObject = __webpack_require__(21); +var getOwnPropertyDescriptorModule = __webpack_require__(33); +var createProperty = __webpack_require__(102); + +// `Object.getOwnPropertyDescriptors` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors +$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIndexedObject(object); + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + var keys = ownKeys(O); + var result = {}; + var index = 0; + var key, descriptor; + while (keys.length > index) { + descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); + if (descriptor !== undefined) createProperty(result, key, descriptor); + } + return result; } +}); - var value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback; - return filter(value, fallback); -} -/** - * Sets a value to a property on the settings state. - * - * NOTE: This feature is to be removed in favour of data stores when a full migration - * is complete. - * - * @deprecated - * - * @param {string} name The setting property key for the - * setting being mutated. - * @param {*} value The value to set. - * @param {Function} [filter=( val ) => val] Allows for providing a callback - * to sanitize the setting (eg. - * ensure it's a number) - */ -function setSetting(name, value) { - var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) { - return val; - }; +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { - if (mutableSources.includes(name)) { - throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be mutated via data store.')); - } +var IS_NODE = __webpack_require__(77); +var V8_VERSION = __webpack_require__(63); +var fails = __webpack_require__(6); - SOURCE[name] = filter(value); -} -/** - * Returns a string with the site's wp-admin URL appended. JS version of `admin_url`. - * - * @param {string} path Relative path. - * @return {string} Full admin URL. - */ +module.exports = !!Object.getOwnPropertySymbols && !fails(function () { + /* global Symbol -- required for testing */ + return !Symbol.sham && + // Chrome 38 Symbol has incorrect toString conversion + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41); +}); -function getAdminLink(path) { - return (ADMIN_URL || '') + path; -} /***/ }), -/* 36 */ -/***/ (function(module, exports) { - -function _extends() { - module.exports = _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } +var global = __webpack_require__(3); +var userAgent = __webpack_require__(87); - return target; - }; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; - return _extends.apply(this, arguments); +if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; +} else if (userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } } -module.exports = _extends; - -/***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; +module.exports = version && +version; -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ serialize_browser_esm_serializeStyles; }); - -// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/hash.browser.esm.js -/* eslint-disable */ -// Inspired by https://github.com/garycourt/murmurhash-js -// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 -function murmur2(str) { - // 'm' and 'r' are mixing constants generated offline. - // They're not really 'magic', they just happen to work well. - // const m = 0x5bd1e995; - // const r = 24; - // Initialize the hash - var h = 0; // Mix 4 bytes at a time into the hash - - var k, - i = 0, - len = str.length; - - for (; len >= 4; ++i, len -= 4) { - k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; - k = - /* Math.imul(k, m): */ - (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); - k ^= - /* k >>> r: */ - k >>> 24; - h = - /* Math.imul(k, m): */ - (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ - /* Math.imul(h, m): */ - (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); - } // Handle the last few bytes of the input array - - - switch (len) { - case 3: - h ^= (str.charCodeAt(i + 2) & 0xff) << 16; - - case 2: - h ^= (str.charCodeAt(i + 1) & 0xff) << 8; - - case 1: - h ^= str.charCodeAt(i) & 0xff; - h = - /* Math.imul(h, m): */ - (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); - } // Do a few final mixes of the hash to ensure the last few - // bytes are well-incorporated. - - - h ^= h >>> 13; - h = - /* Math.imul(h, m): */ - (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); - return ((h ^ h >>> 15) >>> 0).toString(36); -} -/* harmony default export */ var hash_browser_esm = (murmur2); - -// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js -var unitlessKeys = { - animationIterationCount: 1, - borderImageOutset: 1, - borderImageSlice: 1, - borderImageWidth: 1, - boxFlex: 1, - boxFlexGroup: 1, - boxOrdinalGroup: 1, - columnCount: 1, - columns: 1, - flex: 1, - flexGrow: 1, - flexPositive: 1, - flexShrink: 1, - flexNegative: 1, - flexOrder: 1, - gridRow: 1, - gridRowEnd: 1, - gridRowSpan: 1, - gridRowStart: 1, - gridColumn: 1, - gridColumnEnd: 1, - gridColumnSpan: 1, - gridColumnStart: 1, - msGridRow: 1, - msGridRowSpan: 1, - msGridColumn: 1, - msGridColumnSpan: 1, - fontWeight: 1, - lineHeight: 1, - opacity: 1, - order: 1, - orphans: 1, - tabSize: 1, - widows: 1, - zIndex: 1, - zoom: 1, - WebkitLineClamp: 1, - // SVG-related properties - fillOpacity: 1, - floodOpacity: 1, - stopOpacity: 1, - strokeDasharray: 1, - strokeDashoffset: 1, - strokeMiterlimit: 1, - strokeOpacity: 1, - strokeWidth: 1 -}; +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ var unitless_browser_esm = (unitlessKeys); +var $ = __webpack_require__(12); +var getBuiltIn = __webpack_require__(31); +var aFunction = __webpack_require__(70); +var anObject = __webpack_require__(9); +var isObject = __webpack_require__(10); +var create = __webpack_require__(69); +var bind = __webpack_require__(212); +var fails = __webpack_require__(6); + +var nativeConstruct = getBuiltIn('Reflect', 'construct'); + +// `Reflect.construct` method +// https://tc39.es/ecma262/#sec-reflect.construct +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + nativeConstruct(function () { /* empty */ }); +}); +var FORCED = NEW_TARGET_BUG || ARGS_BUG; + +$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); -// EXTERNAL MODULE: ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js -var memoize_browser_esm = __webpack_require__(73); -// CONCATENATED MODULE: ./node_modules/@emotion/serialize/dist/serialize.browser.esm.js +/***/ }), +/* 65 */ +/***/ (function(module, exports) { +(function() { module.exports = window["wp"]["compose"]; }()); +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; -var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."; -var hyphenateRegex = /[A-Z]|^ms/g; -var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; +var $ = __webpack_require__(12); +var fails = __webpack_require__(6); +var isArray = __webpack_require__(84); +var isObject = __webpack_require__(10); +var toObject = __webpack_require__(38); +var toLength = __webpack_require__(34); +var createProperty = __webpack_require__(102); +var arraySpeciesCreate = __webpack_require__(109); +var arrayMethodHasSpeciesSupport = __webpack_require__(89); +var wellKnownSymbol = __webpack_require__(8); +var V8_VERSION = __webpack_require__(63); + +var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); +var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; +var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + +// We can't use this feature detection in V8 since it causes +// deoptimization and serious performance degradation +// https://github.com/zloirock/core-js/issues/679 +var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; +}); -var isCustomProperty = function isCustomProperty(property) { - return property.charCodeAt(1) === 45; -}; +var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); -var isProcessableValue = function isProcessableValue(value) { - return value != null && typeof value !== 'boolean'; +var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); }; -var processStyleName = Object(memoize_browser_esm["a" /* default */])(function (styleName) { - return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); -}); - -var serialize_browser_esm_processStyleValue = function processStyleValue(key, value) { - switch (key) { - case 'animation': - case 'animationName': - { - if (typeof value === 'string') { - return value.replace(animationRegex, function (match, p1, p2) { - cursor = { - name: p1, - styles: p2, - next: cursor - }; - return p1; - }); - } +var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + +// `Array.prototype.concat` method +// https://tc39.es/ecma262/#sec-array.prototype.concat +// with adding support of @@isConcatSpreadable and @@species +$({ target: 'Array', proto: true, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); } + } + A.length = n; + return A; } +}); - if (unitless_browser_esm[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { - return value + 'px'; - } - return value; -}; +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { -if (false) { var hyphenatedCache, hyphenPattern, msPattern, oldProcessStyleValue, contentValues, contentValuePattern; } +var global = __webpack_require__(3); +var isObject = __webpack_require__(10); -var shouldWarnAboutInterpolatingClassNameFromCss = true; +var document = global.document; +// typeof document.createElement is 'object' in old IE +var EXISTS = isObject(document) && isObject(document.createElement); -function handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) { - if (interpolation == null) { - return ''; - } +module.exports = function (it) { + return EXISTS ? document.createElement(it) : {}; +}; - if (interpolation.__emotion_styles !== undefined) { - if (false) {} - return interpolation; - } +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { - switch (typeof interpolation) { - case 'boolean': - { - return ''; - } +var store = __webpack_require__(47); - case 'object': - { - if (interpolation.anim === 1) { - cursor = { - name: interpolation.name, - styles: interpolation.styles, - next: cursor - }; - return interpolation.name; - } +var functionToString = Function.toString; - if (interpolation.styles !== undefined) { - var next = interpolation.next; - - if (next !== undefined) { - // not the most efficient thing ever but this is a pretty rare case - // and there will be very few iterations of this generally - while (next !== undefined) { - cursor = { - name: next.name, - styles: next.styles, - next: cursor - }; - next = next.next; - } - } +// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper +if (typeof store.inspectSource != 'function') { + store.inspectSource = function (it) { + return functionToString.call(it); + }; +} - var styles = interpolation.styles + ";"; +module.exports = store.inspectSource; - if (false) {} - return styles; - } +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { - return createStringFromObject(mergedProps, registered, interpolation); - } +var anObject = __webpack_require__(9); +var defineProperties = __webpack_require__(104); +var enumBugKeys = __webpack_require__(48); +var hiddenKeys = __webpack_require__(36); +var html = __webpack_require__(98); +var documentCreateElement = __webpack_require__(67); +var sharedKey = __webpack_require__(52); - case 'function': - { - if (mergedProps !== undefined) { - var previousCursor = cursor; - var result = interpolation(mergedProps); - cursor = previousCursor; - return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation); - } else if (false) {} +var GT = '>'; +var LT = '<'; +var PROTOTYPE = 'prototype'; +var SCRIPT = 'script'; +var IE_PROTO = sharedKey('IE_PROTO'); - break; - } +var EmptyConstructor = function () { /* empty */ }; - case 'string': - if (false) { var replaced, matched; } +var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; +}; - break; - } // finalize string values (regular strings and functions interpolated into css calls) +// Create object with fake `null` prototype: use ActiveX Object with cleared prototype +var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; +}; +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; +}; - if (registered == null) { - return interpolation; - } +// Check for document.domain and active x support +// No need to use active x approach when document.domain is not set +// see https://github.com/es-shims/es5-shim/issues/150 +// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 +// avoid IE GC bug +var activeXDocument; +var NullProtoObject = function () { + try { + /* global ActiveXObject -- old IE */ + activeXDocument = document.domain && new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); +}; - var cached = registered[interpolation]; +hiddenKeys[IE_PROTO] = true; + +// `Object.create` method +// https://tc39.es/ecma262/#sec-object.create +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : defineProperties(result, Properties); +}; - if (false) {} - return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation; -} +/***/ }), +/* 70 */ +/***/ (function(module, exports) { -function createStringFromObject(mergedProps, registered, obj) { - var string = ''; +module.exports = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; +}; - if (Array.isArray(obj)) { - for (var i = 0; i < obj.length; i++) { - string += handleInterpolation(mergedProps, registered, obj[i], false); - } - } else { - for (var _key in obj) { - var value = obj[_key]; - - if (typeof value !== 'object') { - if (registered != null && registered[value] !== undefined) { - string += _key + "{" + registered[value] + "}"; - } else if (isProcessableValue(value)) { - string += processStyleName(_key) + ":" + serialize_browser_esm_processStyleValue(_key, value) + ";"; - } - } else { - if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') { - throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); - } - if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) { - for (var _i = 0; _i < value.length; _i++) { - if (isProcessableValue(value[_i])) { - string += processStyleName(_key) + ":" + serialize_browser_esm_processStyleValue(_key, value[_i]) + ";"; - } - } - } else { - var interpolated = handleInterpolation(mergedProps, registered, value, false); - - switch (_key) { - case 'animation': - case 'animationName': - { - string += processStyleName(_key) + ":" + interpolated + ";"; - break; - } +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { - default: - { - if (false) {} +var fails = __webpack_require__(6); +var classof = __webpack_require__(30); - string += _key + "{" + interpolated + "}"; - } - } - } - } - } - } +var split = ''.split; - return string; -} +// fallback for non-array-like ES3 and non-enumerable old V8 strings +module.exports = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); +}) ? function (it) { + return classof(it) == 'String' ? split.call(it, '') : Object(it); +} : Object; -var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g; -var sourceMapPattern; -if (false) {} // this is the cursor for keyframes -// keyframes are stored on the SerializedStyles object as a linked list +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { +var DESCRIPTORS = __webpack_require__(13); +var fails = __webpack_require__(6); +var createElement = __webpack_require__(67); -var cursor; -var serialize_browser_esm_serializeStyles = function serializeStyles(args, registered, mergedProps) { - if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) { - return args[0]; - } +// Thank's IE8 for his funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); - var stringMode = true; - var styles = ''; - cursor = undefined; - var strings = args[0]; - if (strings == null || strings.raw === undefined) { - stringMode = false; - styles += handleInterpolation(mergedProps, registered, strings, false); - } else { - if (false) {} +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { - styles += strings[0]; - } // we start at 1 since we've already handled the first arg +var has = __webpack_require__(11); +var toIndexedObject = __webpack_require__(21); +var indexOf = __webpack_require__(83).indexOf; +var hiddenKeys = __webpack_require__(36); +module.exports = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; +}; - for (var i = 1; i < args.length; i++) { - styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46); - if (stringMode) { - if (false) {} +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { - styles += strings[i]; - } - } +var fails = __webpack_require__(6); - var sourceMap; +var replacement = /#|\.prototype\./; - if (false) {} // using a global regex with .exec is stateful so lastIndex has to be reset each time +var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; +}; +var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); +}; - labelPattern.lastIndex = 0; - var identifierName = ''; - var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5 +var data = isForced.data = {}; +var NATIVE = isForced.NATIVE = 'N'; +var POLYFILL = isForced.POLYFILL = 'P'; - while ((match = labelPattern.exec(styles)) !== null) { - identifierName += '-' + // $FlowFixMe we know it's not null - match[1]; - } +module.exports = isForced; - var name = hash_browser_esm(styles) + identifierName; - if (false) {} +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { - return { - name: name, - styles: styles, - next: cursor +var bind = __webpack_require__(94); +var IndexedObject = __webpack_require__(71); +var toObject = __webpack_require__(38); +var toLength = __webpack_require__(34); +var arraySpeciesCreate = __webpack_require__(109); + +var push = [].push; + +// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation +var createMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var IS_FILTER_OUT = TYPE == 7; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = IndexedObject(O); + var boundFunction = bind(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push.call(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push.call(target, value); // filterOut + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; - +module.exports = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod(6), + // `Array.prototype.filterOut` method + // https://github.com/tc39/proposal-array-filtering + filterOut: createMethod(7) +}; /***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getRegisteredStyles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return insertStyles; }); -var isBrowser = "object" !== 'undefined'; -function getRegisteredStyles(registered, registeredStyles, classNames) { - var rawClassName = ''; - classNames.split(' ').forEach(function (className) { - if (registered[className] !== undefined) { - registeredStyles.push(registered[className]); - } else { - rawClassName += className + " "; - } - }); - return rawClassName; -} -var insertStyles = function insertStyles(cache, serialized, isStringTag) { - var className = cache.key + "-" + serialized.name; - - if ( // we only need to add the styles to the registered cache if the - // class name could be used further down - // the tree but if it's a string tag, we know it won't - // so we don't have to add it to registered cache. - // this improves memory usage since we can avoid storing the whole style string - (isStringTag === false || // we need to always store it if we're in compat mode and - // in node since emotion-server relies on whether a style is in - // the registered cache to know whether a style is global or not - // also, note that this check will be dead code eliminated in the browser - isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) { - cache.registered[className] = serialized.styles; - } - if (cache.inserted[serialized.name] === undefined) { - var current = serialized; - - do { - var maybeStyles = cache.insert("." + className, current, cache.sheet, true); - - current = current.next; - } while (current !== undefined); - } -}; +var nativePropertyIsEnumerable = {}.propertyIsEnumerable; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +// Nashorn ~ JDK8 bug +var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); +// `Object.prototype.propertyIsEnumerable` method implementation +// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable +exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : nativePropertyIsEnumerable; /***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _taggedTemplateLiteral; }); -function _taggedTemplateLiteral(strings, raw) { - if (!raw) { - raw = strings.slice(0); - } +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); -} +var classof = __webpack_require__(30); +var global = __webpack_require__(3); -/***/ }), -/* 40 */, -/* 41 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +module.exports = classof(global.process) == 'process'; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); -function _typeof(obj) { - "@babel/helpers - typeof"; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } +/***/ }), +/* 78 */ +/***/ (function(module, exports) { - return _typeof(obj); -} +(function() { module.exports = window["wp"]["url"]; }()); /***/ }), -/* 42 */ +/* 79 */ /***/ (function(module, exports) { -(function() { module.exports = this["wc"]["date"]; }()); +exports.f = Object.getOwnPropertySymbols; + /***/ }), -/* 43 */, -/* 44 */ +/* 80 */ /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["apiFetch"]; }()); +function _extends() { + module.exports = _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; -/***/ }), -/* 45 */, -/* 46 */, -/* 47 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } -"use strict"; -/* unused harmony export logged */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return deprecated; }); -/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51); -/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); -/** - * WordPress dependencies - */ + return target; + }; -/** - * Object map tracking messages which have been logged, for use in ensuring a - * message is only logged once. - * - * @type {Object} - */ + return _extends.apply(this, arguments); +} -var logged = Object.create(null); -/** - * Logs a message to notify developers about a deprecated feature. - * - * @param {string} feature Name of the deprecated feature. - * @param {?Object} options Personalisation options - * @param {?string} options.version Version in which the feature will be removed. - * @param {?string} options.alternative Feature to use instead - * @param {?string} options.plugin Plugin name if it's a plugin feature - * @param {?string} options.link Link to documentation - * @param {?string} options.hint Additional message to help transition away from the deprecated feature. - * - * @example - * ```js - * import deprecated from '@wordpress/deprecated'; - * - * deprecated( 'Eating meat', { - * version: 'the future', - * alternative: 'vegetables', - * plugin: 'the earth', - * hint: 'You may find it beneficial to transition gradually.', - * } ); - * - * // Logs: 'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead. Note: You may find it beneficial to transition gradually.' - * ``` - */ +module.exports = _extends; -function deprecated(feature) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var version = options.version, - alternative = options.alternative, - plugin = options.plugin, - link = options.link, - hint = options.hint; - var pluginMessage = plugin ? " from ".concat(plugin) : ''; - var versionMessage = version ? " and will be removed".concat(pluginMessage, " in version ").concat(version) : ''; - var useInsteadMessage = alternative ? " Please use ".concat(alternative, " instead.") : ''; - var linkMessage = link ? " See: ".concat(link) : ''; - var hintMessage = hint ? " Note: ".concat(hint) : ''; - var message = "".concat(feature, " is deprecated").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged. - - if (message in logged) { - return; - } - /** - * Fires whenever a deprecated feature is encountered - * - * @param {string} feature Name of the deprecated feature. - * @param {?Object} options Personalisation options - * @param {?string} options.version Version in which the feature will be removed. - * @param {?string} options.alternative Feature to use instead - * @param {?string} options.plugin Plugin name if it's a plugin feature - * @param {?string} options.link Link to documentation - * @param {?string} options.hint Additional message to help transition away from the deprecated feature. - * @param {?string} message Message sent to console.warn - */ +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { +var global = __webpack_require__(3); - Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__["doAction"])('deprecated', feature, options, message); // eslint-disable-next-line no-console +module.exports = global; - console.warn(message); - logged[message] = true; -} -//# sourceMappingURL=index.js.map /***/ }), -/* 48 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; +var wellKnownSymbol = __webpack_require__(8); -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ ThemeContext; }); -__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ emotion_element_57a3a7a3_browser_esm_withEmotionCache; }); -__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ css_browser_esm; }); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; -// UNUSED EXPORTS: CacheProvider, ClassNames, Global, createElement, jsx, keyframes +test[TO_STRING_TAG] = 'z'; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js -var inheritsLoose = __webpack_require__(53); +module.exports = String(test) === '[object z]'; -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(8); -// CONCATENATED MODULE: ./node_modules/@emotion/sheet/dist/sheet.browser.esm.js -/* +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { -Based off glamor's StyleSheet, thanks Sunil ❤️ +var toIndexedObject = __webpack_require__(21); +var toLength = __webpack_require__(34); +var toAbsoluteIndex = __webpack_require__(97); + +// `Array.prototype.{ indexOf, includes }` methods implementation +var createMethod = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; -high performance StyleSheet for css-in-js systems +module.exports = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod(false) +}; -- uses multiple style tags behind the scenes for millions of rules -- uses `insertRule` for appending in production for *much* faster performance -// usage +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { -import { StyleSheet } from '@emotion/sheet' +var classof = __webpack_require__(30); -let styleSheet = new StyleSheet({ key: '', container: document.head }) +// `IsArray` abstract operation +// https://tc39.es/ecma262/#sec-isarray +module.exports = Array.isArray || function isArray(arg) { + return classof(arg) == 'Array'; +}; -styleSheet.insert('#box { border: 1px solid red; }') -- appends a css rule into the stylesheet -styleSheet.flush() -- empties the stylesheet of all its contents +/***/ }), +/* 85 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -*/ -// $FlowFixMe -function sheetForTag(tag) { - if (tag.sheet) { - // $FlowFixMe - return tag.sheet; - } // this weirdness brought to you by firefox +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ADMIN_URL; }); +/* unused harmony export COUNTRIES */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOCALE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ORDER_STATUSES; }); +/* unused harmony export SITE_TITLE */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WC_ASSET_URL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getSetting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setSetting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAdminLink; }); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37); +/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(107); +/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); - /* istanbul ignore next */ - for (var i = 0; i < document.styleSheets.length; i++) { - if (document.styleSheets[i].ownerNode === tag) { - // $FlowFixMe - return document.styleSheets[i]; - } - } -} -function createStyleElement(options) { - var tag = document.createElement('style'); - tag.setAttribute('data-emotion', options.key); +/** + * External dependencies + */ + // Remove mutable data from settings object to prevent access. Data stores should be used instead. - if (options.nonce !== undefined) { - tag.setAttribute('nonce', options.nonce); +var mutableSources = ['wcAdminSettings', 'preloadSettings']; +var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {}; +var SOURCE = Object.keys(settings).reduce(function (source, key) { + if (!mutableSources.includes(key)) { + source[key] = settings[key]; } - tag.appendChild(document.createTextNode('')); - return tag; -} + return source; +}, {}); +var ADMIN_URL = SOURCE.adminUrl; +var COUNTRIES = SOURCE.countries; +var CURRENCY = SOURCE.currency; +var LOCALE = SOURCE.locale; +var ORDER_STATUSES = SOURCE.orderStatuses; +var SITE_TITLE = SOURCE.siteTitle; +var WC_ASSET_URL = SOURCE.wcAssetUrl; +/** + * Retrieves a setting value from the setting state. + * + * @param {string} name The identifier for the setting. + * @param {*} [fallback=false] The value to use as a fallback + * if the setting is not in the + * state. + * @param {Function} [filter=( val ) => val] A callback for filtering the + * value before it's returned. + * Receives both the found value + * (if it exists for the key) and + * the provided fallback arg. + * + * @return {*} The value present in the settings state for the given + * name. + */ -var StyleSheet = -/*#__PURE__*/ -function () { - function StyleSheet(options) { - this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy; - this.tags = []; - this.ctr = 0; - this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets +function getSetting(name) { + var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) { + return val; + }; - this.key = options.key; - this.container = options.container; - this.before = null; + if (mutableSources.includes(name)) { + throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Mutable settings should be accessed via data store.')); } - var _proto = StyleSheet.prototype; + var value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback; + return filter(value, fallback); +} +/** + * Sets a value to a property on the settings state. + * + * NOTE: This feature is to be removed in favour of data stores when a full migration + * is complete. + * + * @deprecated + * + * @param {string} name The setting property key for the + * setting being mutated. + * @param {*} value The value to set. + * @param {Function} [filter=( val ) => val] Allows for providing a callback + * to sanitize the setting (eg. + * ensure it's a number) + */ - _proto.insert = function insert(rule) { - // the max length is how many rules we have per style tag, it's 65000 in speedy mode - // it's 1 in dev because we insert source maps that map a single rule to a location - // and you can only have one source map per style tag - if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) { - var _tag = createStyleElement(this); +function setSetting(name, value) { + var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) { + return val; + }; - var before; + if (mutableSources.includes(name)) { + throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Mutable settings should be mutated via data store.')); + } - if (this.tags.length === 0) { - before = this.before; - } else { - before = this.tags[this.tags.length - 1].nextSibling; - } + SOURCE[name] = filter(value); +} +/** + * Returns a string with the site's wp-admin URL appended. JS version of `admin_url`. + * + * @param {string} path Relative path. + * @return {string} Full admin URL. + */ - this.container.insertBefore(_tag, before); - this.tags.push(_tag); - } +function getAdminLink(path) { + return (ADMIN_URL || '') + path; +} - var tag = this.tags[this.tags.length - 1]; +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { - if (this.isSpeedy) { - var sheet = sheetForTag(tag); +var getBuiltIn = __webpack_require__(31); +var getOwnPropertyNamesModule = __webpack_require__(56); +var getOwnPropertySymbolsModule = __webpack_require__(79); +var anObject = __webpack_require__(9); - try { - // this is a really hot path - // we check the second character first because having "i" - // as the second character will happen less often than - // having "@" as the first character - var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers - // the big drawback is that the css won't be editable in devtools - - sheet.insertRule(rule, // we need to insert @import rules before anything else - // otherwise there will be an error - // technically this means that the @import rules will - // _usually_(not always since there could be multiple style tags) - // be the first ones in prod and generally later in dev - // this shouldn't really matter in the real world though - // @import is generally only used for font faces from google fonts and etc. - // so while this could be technically correct then it would be slower and larger - // for a tiny bit of correctness that won't matter in the real world - isImportRule ? 0 : sheet.cssRules.length); - } catch (e) { - if (false) {} - } - } else { - tag.appendChild(document.createTextNode(rule)); - } +// all object keys, includes non-enumerable and symbols +module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; +}; - this.ctr++; - }; - _proto.flush = function flush() { - // $FlowFixMe - this.tags.forEach(function (tag) { - return tag.parentNode.removeChild(tag); - }); - this.tags = []; - this.ctr = 0; - }; +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { - return StyleSheet; -}(); +var getBuiltIn = __webpack_require__(31); +module.exports = getBuiltIn('navigator', 'userAgent') || ''; -// CONCATENATED MODULE: ./node_modules/@emotion/stylis/dist/stylis.browser.esm.js -function stylis_min (W) { - function M(d, c, e, h, a) { - for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { - g = e.charCodeAt(l); - l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { - if (0 === b + n + v + m) { - if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { - switch (g) { - case 32: - case 9: - case 59: - case 13: - case 10: - break; +"use strict"; - default: - f += e.charAt(l); - } +var $ = __webpack_require__(12); +var exec = __webpack_require__(91); - g = 59; - } +// `RegExp.prototype.exec` method +// https://tc39.es/ecma262/#sec-regexp.prototype.exec +$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { + exec: exec +}); - switch (g) { - case 123: - f = f.trim(); - q = f.charCodeAt(0); - k = 1; - for (t = ++l; l < B;) { - switch (g = e.charCodeAt(l)) { - case 123: - k++; - break; +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { - case 125: - k--; - break; +var fails = __webpack_require__(6); +var wellKnownSymbol = __webpack_require__(8); +var V8_VERSION = __webpack_require__(63); - case 47: - switch (g = e.charCodeAt(l + 1)) { - case 42: - case 47: - a: { - for (u = l + 1; u < J; ++u) { - switch (e.charCodeAt(u)) { - case 47: - if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { - l = u + 1; - break a; - } +var SPECIES = wellKnownSymbol('species'); - break; +module.exports = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; - case 10: - if (47 === g) { - l = u + 1; - break a; - } - } - } +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { - l = u; - } +var defineProperty = __webpack_require__(17).f; +var has = __webpack_require__(11); +var wellKnownSymbol = __webpack_require__(8); - } +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - break; +module.exports = function (it, TAG, STATIC) { + if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { + defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); + } +}; - case 91: - g++; - case 40: - g++; +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { - case 34: - case 39: - for (; l++ < J && e.charCodeAt(l) !== g;) { - } +"use strict"; - } +var regexpFlags = __webpack_require__(114); +var stickyHelpers = __webpack_require__(137); - if (0 === k) break; - l++; - } +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; - k = e.substring(t, l); - 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); +var patchedExec = nativeExec; - switch (q) { - case 64: - 0 < r && (f = f.replace(N, '')); - g = f.charCodeAt(1); +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; +})(); - switch (g) { - case 100: - case 109: - case 115: - case 45: - r = c; - break; +var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; - default: - r = O; - } +// nonparticipating capturing group, copied from es5-shim's String#split patch. +// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - k = M(c, r, k, g, a + 1); - t = k.length; - 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); - if (0 < t) switch (g) { - case 115: - f = f.replace(da, ea); - - case 100: - case 109: - case 45: - k = f + '{' + k + '}'; - break; - - case 107: - f = f.replace(fa, '$1 $2'); - k = f + '{' + k + '}'; - k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; - break; - - default: - k = f + k, 112 === h && (k = (p += k, '')); - } else k = ''; - break; - - default: - k = M(c, X(c, f, I), k, h, a + 1); - } +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; - F += k; - k = I = r = u = q = 0; - f = ''; - g = e.charCodeAt(++l); - break; +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + var sticky = UNSUPPORTED_Y && re.sticky; + var flags = regexpFlags.call(re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; - case 125: - case 59: - f = (0 < r ? f.replace(N, '') : f).trim(); - if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { - case 0: - break; - - case 64: - if (105 === g || 99 === g) { - G += f + e.charAt(l); - break; - } + if (sticky) { + flags = flags.replace('y', ''); + if (flags.indexOf('g') === -1) { + flags += 'g'; + } - default: - 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); - } - I = r = u = q = 0; - f = ''; - g = e.charCodeAt(++l); - } + strCopy = String(str).slice(re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = nativeExec.call(sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = match.input.slice(charsAdded); + match[0] = match[0].slice(charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } - switch (g) { - case 13: - case 10: - 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); - 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); - z = 1; - D++; - break; + return match; + }; +} - case 59: - case 125: - if (0 === b + n + v + m) { - z++; - break; - } +module.exports = patchedExec; - default: - z++; - y = e.charAt(l); - - switch (g) { - case 9: - case 32: - if (0 === n + m + b) switch (x) { - case 44: - case 58: - case 9: - case 32: - y = ''; - break; - - default: - 32 !== g && (y = ' '); - } - break; - case 0: - y = '\\0'; - break; +/***/ }), +/* 92 */ +/***/ (function(module, exports) { - case 12: - y = '\\f'; - break; +(function() { module.exports = window["wc"]["tracks"]; }()); - case 11: - y = '\\v'; - break; +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { - case 38: - 0 === n + b + m && (r = I = 1, y = '\f' + y); - break; +var NATIVE_SYMBOL = __webpack_require__(62); - case 108: - if (0 === n + b + m + E && 0 < u) switch (l - u) { - case 2: - 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); +module.exports = NATIVE_SYMBOL + /* global Symbol -- safe */ + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; - case 8: - 111 === K && (E = K); - } - break; - case 58: - 0 === n + b + m && (u = l); - break; +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { - case 44: - 0 === b + v + n + m && (r = 1, y += '\r'); - break; +var aFunction = __webpack_require__(70); - case 34: - case 39: - 0 === b && (n = n === g ? 0 : 0 === n ? g : n); - break; +// optional / simple context binding +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; - case 91: - 0 === n + b + v && m++; - break; - case 93: - 0 === n + b + v && m--; - break; +/***/ }), +/* 95 */ +/***/ (function(module, exports) { - case 41: - 0 === n + b + m && v--; - break; +(function() { module.exports = window["wp"]["apiFetch"]; }()); - case 40: - if (0 === n + b + m) { - if (0 === q) switch (2 * x + 3 * K) { - case 533: - break; +/***/ }), +/* 96 */ +/***/ (function(module, exports) { - default: - q = 1; - } - v++; - } +var g; - break; +// This works in non-strict mode +g = (function() { + return this; +})(); - case 64: - 0 === b + v + n + m + u + k && (k = 1); - break; +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} - case 42: - case 47: - if (!(0 < n + m + v)) switch (b) { - case 0: - switch (2 * g + 3 * e.charCodeAt(l + 1)) { - case 235: - b = 47; - break; +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} - case 220: - t = l, b = 42; - } +module.exports = g; - break; - case 42: - 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); - } - } +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { - 0 === b && (f += y); - } +var toInteger = __webpack_require__(42); - K = x; - x = g; - l++; - } +var max = Math.max; +var min = Math.min; - t = p.length; +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; - if (0 < t) { - r = c; - if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; - p = r.join(',') + '{' + p + '}'; - if (0 !== w * E) { - 2 !== w || L(p, 2) || (E = 0); +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { - switch (E) { - case 111: - p = p.replace(ha, ':-moz-$1') + p; - break; +var getBuiltIn = __webpack_require__(31); - case 112: - p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; - } +module.exports = getBuiltIn('document', 'documentElement'); - E = 0; - } - } - return G + p + F; - } +/***/ }), +/* 99 */, +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { - function X(d, c, e) { - var h = c.trim().split(ia); - c = h; - var a = h.length, - m = d.length; +var TO_STRING_TAG_SUPPORT = __webpack_require__(82); +var redefine = __webpack_require__(27); +var toString = __webpack_require__(130); - switch (m) { - case 0: - case 1: - var b = 0; +// `Object.prototype.toString` method +// https://tc39.es/ecma262/#sec-object.prototype.tostring +if (!TO_STRING_TAG_SUPPORT) { + redefine(Object.prototype, 'toString', toString, { unsafe: true }); +} - for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { - c[b] = Z(d, c[b], e).trim(); - } - break; +/***/ }), +/* 101 */ +/***/ (function(module, exports) { - default: - var v = b = 0; +(function() { module.exports = window["wc"]["date"]; }()); - for (c = []; b < a; ++b) { - for (var n = 0; n < m; ++n) { - c[v++] = Z(d[n] + ' ', h[b], e).trim(); - } - } +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { - } +"use strict"; - return c; - } +var toPrimitive = __webpack_require__(40); +var definePropertyModule = __webpack_require__(17); +var createPropertyDescriptor = __webpack_require__(39); - function Z(d, c, e) { - var h = c.charCodeAt(0); - 33 > h && (h = (c = c.trim()).charCodeAt(0)); +module.exports = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; +}; - switch (h) { - case 38: - return c.replace(F, '$1' + d.trim()); - case 58: - return d.trim() + c.replace(F, '$1' + d.trim()); +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { - default: - if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); - } +var has = __webpack_require__(11); +var ownKeys = __webpack_require__(86); +var getOwnPropertyDescriptorModule = __webpack_require__(33); +var definePropertyModule = __webpack_require__(17); - return d + c; +module.exports = function (target, source) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } +}; - function P(d, c, e, h) { - var a = d + ';', - m = 2 * c + 3 * e + 4 * h; - - if (944 === m) { - d = a.indexOf(':', 9) + 1; - var b = a.substring(d, a.length - 1).trim(); - b = a.substring(0, d).trim() + b + ';'; - return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; - } - if (0 === w || 2 === w && !L(a, 1)) return a; +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { - switch (m) { - case 1015: - return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; +var DESCRIPTORS = __webpack_require__(13); +var definePropertyModule = __webpack_require__(17); +var anObject = __webpack_require__(9); +var objectKeys = __webpack_require__(54); + +// `Object.defineProperties` method +// https://tc39.es/ecma262/#sec-object.defineproperties +module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); + return O; +}; - case 951: - return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; - case 963: - return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; +/***/ }), +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - case 1009: - if (100 !== a.charCodeAt(4)) break; - - case 969: - case 942: - return '-webkit-' + a + a; +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Navigation; }); +/* unused harmony export NavigationBackButton */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavigationGroup; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NavigationMenu; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NavigationItem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Text; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return useSlot; }); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); +/** + * External dependencies + */ - case 978: - return '-webkit-' + a + '-moz-' + a + a; +/** + * Prioritize exports of non-experimental components over experimental. + */ - case 1019: - case 983: - return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; +var Navigation = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["Navigation"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigation"]; +var NavigationBackButton = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationBackButton"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationBackButton"]; +var NavigationGroup = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationGroup"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationGroup"]; +var NavigationMenu = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationMenu"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationMenu"]; +var NavigationItem = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationItem"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationItem"]; +var Text = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["Text"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalText"]; +var useSlot = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["useSlot"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalUseSlot"]; - case 883: - if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; - if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; - break; +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { - case 932: - if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { - case 103: - return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; +var global = __webpack_require__(3); +var inspectSource = __webpack_require__(68); - case 115: - return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; +var WeakMap = global.WeakMap; - case 98: - return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; - } - return '-webkit-' + a + '-ms-' + a + a; +module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - case 964: - return '-webkit-' + a + '-ms-flex-' + a + a; - case 1023: - if (99 !== a.charCodeAt(8)) break; - b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); - return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { - case 1005: - return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; +"use strict"; - case 1e3: - b = a.substring(13).trim(); - c = b.indexOf('-') + 1; +var $ = __webpack_require__(12); +var $includes = __webpack_require__(83).includes; +var addToUnscopables = __webpack_require__(118); - switch (b.charCodeAt(0) + b.charCodeAt(c)) { - case 226: - b = a.replace(G, 'tb'); - break; +// `Array.prototype.includes` method +// https://tc39.es/ecma262/#sec-array.prototype.includes +$({ target: 'Array', proto: true }, { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); - case 232: - b = a.replace(G, 'tb-rl'); - break; +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('includes'); - case 220: - b = a.replace(G, 'lr'); - break; - default: - return a; - } +/***/ }), +/* 108 */ +/***/ (function(module, exports) { - return '-webkit-' + a + '-ms-' + b + a; +function _typeof(obj) { + "@babel/helpers - typeof"; - case 1017: - if (-1 === a.indexOf('sticky', 9)) break; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } - case 975: - c = (a = d).length - 10; - b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); + return _typeof(obj); +} - switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { - case 203: - if (111 > b.charCodeAt(8)) break; +module.exports = _typeof; - case 115: - a = a.replace(b, '-webkit-' + b) + ';' + a; - break; +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { - case 207: - case 102: - a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; - } +var isObject = __webpack_require__(10); +var isArray = __webpack_require__(84); +var wellKnownSymbol = __webpack_require__(8); + +var SPECIES = wellKnownSymbol('species'); + +// `ArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#sec-arrayspeciescreate +module.exports = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); +}; - return a + ';'; - case 938: - if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { - case 105: - return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; +/***/ }), +/* 110 */ +/***/ (function(module, exports) { - case 115: - return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; +module.exports = {}; - default: - return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; - } - break; - case 973: - case 989: - if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { - case 931: - case 953: - if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; - break; +"use strict"; - case 962: - if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; - } +// TODO: Remove from `core-js@4` since it's moved to entry points +__webpack_require__(88); +var redefine = __webpack_require__(27); +var fails = __webpack_require__(6); +var wellKnownSymbol = __webpack_require__(8); +var regexpExec = __webpack_require__(91); +var createNonEnumerableProperty = __webpack_require__(19); + +var SPECIES = wellKnownSymbol('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); - return a; - } +// IE <= 11 replaces $0 with the whole match, as if it was $& +// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 +var REPLACE_KEEPS_$0 = (function () { + return 'a'.replace(/./, '$0') === '$0'; +})(); - function L(d, c) { - var e = d.indexOf(1 === c ? ':' : '{'), - h = d.substring(0, 3 !== c ? e : 10); - e = d.substring(e + 1, d.length - 1); - return R(2 !== c ? h : h.replace(na, '$1'), e, c); +var REPLACE = wellKnownSymbol('replace'); +// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string +var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; } + return false; +})(); - function ea(d, c) { - var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); - return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; - } +// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec +// Weex JS has frozen built-in prototypes, so use try / catch wrapper +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + // eslint-disable-next-line regexp/no-empty-group -- required for testing + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; +}); - function H(d, c, e, h, a, m, b, v, n, q) { - for (var g = 0, x = c, w; g < A; ++g) { - switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { - case void 0: - case !1: - case !0: - case null: - break; +module.exports = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); - default: - x = w; - } - } + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); - if (x !== c) return x; - } + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; - function T(d) { - switch (d) { - case void 0: - case null: - A = S.length = 0; - break; + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } - default: - if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) { - T(d[c]); - } else Y = !!d | 0; - } - - return T; - } - - function U(d) { - d = d.prefix; - void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); - return U; - } - - function B(d, c) { - var e = d; - 33 > e.charCodeAt(0) && (e = e.trim()); - V = e; - e = [V]; - - if (0 < A) { - var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); - void 0 !== h && 'string' === typeof h && (c = h); - } - - var a = M(O, e, c, 0, 0); - 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); - V = ''; - E = 0; - z = D = 1; - return a; - } - - var ca = /^\0+/g, - N = /[\0\r\f]/g, - aa = /: */g, - ka = /zoo|gra/, - ma = /([,: ])(transform)/g, - ia = /,\r+?/g, - F = /([\t\r\n ])*\f?&/g, - fa = /@(k\w+)\s*(\S*)\s*/, - Q = /::(place)/g, - ha = /:(read-only)/g, - G = /[svh]\w+-[tblr]{2}/, - da = /\(\s*(.*)\s*\)/g, - oa = /([\s\S]*?);/g, - ba = /-self|flex-/g, - na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, - la = /stretch|:\s*\w+\-(?:conte|avail)/, - ja = /([^-])(image-set\()/, - z = 1, - D = 1, - E = 0, - w = 1, - O = [], - S = [], - A = 0, - R = null, - Y = 0, - V = ''; - B.use = T; - B.set = U; - void 0 !== W && U(W); - return B; -} + re.exec = function () { execCalled = true; return null; }; -/* harmony default export */ var stylis_browser_esm = (stylis_min); + re[SYMBOL](''); + return !execCalled; + }); -// CONCATENATED MODULE: ./node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js -var weakMemoize = function weakMemoize(func) { - // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps - var cache = new WeakMap(); - return function (arg) { - if (cache.has(arg)) { - // $FlowFixMe - return cache.get(arg); - } + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !( + REPLACE_SUPPORTS_NAMED_GROUPS && + REPLACE_KEEPS_$0 && + !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + )) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, { + REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; + + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + } - var ret = func(arg); - cache.set(arg, ret); - return ret; - }; + if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); }; -/* harmony default export */ var weak_memoize_browser_esm = (weakMemoize); -// CONCATENATED MODULE: ./node_modules/@emotion/cache/dist/cache.browser.esm.js +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { +var classof = __webpack_require__(30); +var regexpExec = __webpack_require__(91); +// `RegExpExec` abstract operation +// https://tc39.es/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } -// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet -// inlined to avoid umd wrapper and peerDep warnings/installing stylis -// since we use stylis after closure compiler -var delimiter = '/*|*/'; -var needle = delimiter + '}'; + return regexpExec.call(R, S); +}; -function toSheet(block) { - if (block) { - Sheet.current.insert(block + '}'); - } -} -var Sheet = { - current: null -}; -var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) { - switch (context) { - // property - case 1: - { - switch (content.charCodeAt(0)) { - case 64: - { - // @import - Sheet.current.insert(content + ';'); - return ''; - } - // charcode for l - - case 108: - { - // charcode for b - // this ignores label - if (content.charCodeAt(2) === 98) { - return ''; - } - } - } - break; - } - // selector +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { - case 2: - { - if (ns === 0) return content + delimiter; - break; - } - // at-rule - - case 3: - { - switch (ns) { - // @font-face, @page - case 102: - case 112: - { - Sheet.current.insert(selectors[0] + content); - return ''; - } +var TO_STRING_TAG_SUPPORT = __webpack_require__(82); +var classofRaw = __webpack_require__(30); +var wellKnownSymbol = __webpack_require__(8); - default: - { - return content + (at === 0 ? delimiter : ''); - } - } - } +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +// ES3 wrong here +var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - case -2: - { - content.split(needle).forEach(toSheet); - } - } +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } }; -var cache_browser_esm_createCache = function createCache(options) { - if (options === undefined) options = {}; - var key = options.key || 'css'; - var stylisOptions; +// getting tag from ES6+ `Object.prototype.toString` +module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw(O) + // ES3 arguments fallback + : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; +}; - if (options.prefix !== undefined) { - stylisOptions = { - prefix: options.prefix - }; - } - var stylis = new stylis_browser_esm(stylisOptions); +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { - if (false) {} +"use strict"; - var inserted = {}; // $FlowFixMe +var anObject = __webpack_require__(9); + +// `RegExp.prototype.flags` getter implementation +// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; - var container; - { - container = options.container || document.head; - var nodes = document.querySelectorAll("style[data-emotion-" + key + "]"); - Array.prototype.forEach.call(nodes, function (node) { - var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe +/***/ }), +/* 115 */, +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { - attrib.split(' ').forEach(function (id) { - inserted[id] = true; - }); +var objectWithoutPropertiesLoose = __webpack_require__(233); - if (node.parentNode !== container) { - container.appendChild(node); - } - }); - } +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - var _insert; + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } - { - stylis.use(options.stylisPlugins)(ruleSheet); + return target; +} - _insert = function insert(selector, serialized, sheet, shouldCache) { - var name = serialized.name; - Sheet.current = sheet; +module.exports = _objectWithoutProperties; - if (false) { var map; } +/***/ }), +/* 117 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - stylis(selector, serialized.styles); +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - if (shouldCache) { - cache.inserted[name] = true; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } } - }; - } - - if (false) { var commentEnd, commentStart; } + } - var cache = { - key: key, - sheet: new StyleSheet({ - key: key, - container: container, - nonce: options.nonce, - speedy: options.speedy - }), - nonce: options.nonce, - inserted: inserted, - registered: {}, - insert: _insert + return target; }; - return cache; -}; -/* harmony default export */ var cache_browser_esm = (cache_browser_esm_createCache); + return _extends.apply(this, arguments); +} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inheritsLoose.js -var helpers_inheritsLoose = __webpack_require__(130); +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: ./node_modules/@emotion/utils/dist/utils.browser.esm.js -var utils_browser_esm = __webpack_require__(38); +var wellKnownSymbol = __webpack_require__(8); +var create = __webpack_require__(69); +var definePropertyModule = __webpack_require__(17); -// EXTERNAL MODULE: ./node_modules/@emotion/serialize/dist/serialize.browser.esm.js + 2 modules -var serialize_browser_esm = __webpack_require__(37); +var UNSCOPABLES = wellKnownSymbol('unscopables'); +var ArrayPrototype = Array.prototype; -// CONCATENATED MODULE: ./node_modules/@emotion/core/dist/emotion-element-57a3a7a3.browser.esm.js +// Array.prototype[@@unscopables] +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +if (ArrayPrototype[UNSCOPABLES] == undefined) { + definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: create(null) + }); +} +// add a key to Array.prototype[@@unscopables] +module.exports = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; +}; +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { +var wellKnownSymbol = __webpack_require__(8); +exports.f = wellKnownSymbol; -var emotion_element_57a3a7a3_browser_esm_hasOwnProperty = Object.prototype.hasOwnProperty; -var EmotionCacheContext = /*#__PURE__*/Object(external_React_["createContext"])( // we're doing this to avoid preconstruct's dead code elimination in this one case -// because this module is primarily intended for the browser and node -// but it's also required in react native and similar environments sometimes -// and we could have a special build just for that -// but this is much easier and the native packages -// might use a different theme context in the future anyway -typeof HTMLElement !== 'undefined' ? cache_browser_esm() : null); -var ThemeContext = /*#__PURE__*/Object(external_React_["createContext"])({}); -var CacheProvider = EmotionCacheContext.Provider; +/***/ }), +/* 120 */, +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { -var emotion_element_57a3a7a3_browser_esm_withEmotionCache = function withEmotionCache(func) { - var render = function render(props, ref) { - return /*#__PURE__*/Object(external_React_["createElement"])(EmotionCacheContext.Consumer, null, function (cache) { - return func(props, cache, ref); - }); - }; // $FlowFixMe +"use strict"; +var fails = __webpack_require__(6); - return /*#__PURE__*/Object(external_React_["forwardRef"])(render); +module.exports = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing + method.call(null, argument || function () { throw 1; }, 1); + }); }; -// thus we only need to replace what is a valid character for JS, but not for CSS - -var sanitizeIdentifier = function sanitizeIdentifier(identifier) { - return identifier.replace(/\$/g, '-'); -}; -var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'; -var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__'; -var createEmotionProps = function createEmotionProps(type, props) { - if (false) {} +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { - var newProps = {}; +"use strict"; - for (var key in props) { - if (emotion_element_57a3a7a3_browser_esm_hasOwnProperty.call(props, key)) { - newProps[key] = props[key]; - } - } +var charAt = __webpack_require__(125).charAt; - newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions +// `AdvanceStringIndex` abstract operation +// https://tc39.es/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? charAt(S, index).length : 1); +}; - if (false) { var match, error; } - return newProps; -}; +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { -var emotion_element_57a3a7a3_browser_esm_render = function render(cache, props, theme, ref) { - var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works - // not passing the registered cache to serializeStyles because it would - // make certain babel optimisations not possible +"use strict"; - if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) { - cssProp = cache.registered[cssProp]; +var toIndexedObject = __webpack_require__(21); +var addToUnscopables = __webpack_require__(118); +var Iterators = __webpack_require__(110); +var InternalStateModule = __webpack_require__(45); +var defineIterator = __webpack_require__(166); + +var ARRAY_ITERATOR = 'Array Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); + +// `Array.prototype.entries` method +// https://tc39.es/ecma262/#sec-array.prototype.entries +// `Array.prototype.keys` method +// https://tc39.es/ecma262/#sec-array.prototype.keys +// `Array.prototype.values` method +// https://tc39.es/ecma262/#sec-array.prototype.values +// `Array.prototype[@@iterator]` method +// https://tc39.es/ecma262/#sec-array.prototype-@@iterator +// `CreateArrayIterator` internal method +// https://tc39.es/ecma262/#sec-createarrayiterator +module.exports = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), // target + index: 0, // next index + kind: kind // kind + }); +// `%ArrayIteratorPrototype%.next` method +// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next +}, function () { + var state = getInternalState(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { value: undefined, done: true }; } + if (kind == 'keys') return { value: index, done: false }; + if (kind == 'values') return { value: target[index], done: false }; + return { value: [index, target[index]], done: false }; +}, 'values'); - var type = props[typePropName]; - var registeredStyles = [cssProp]; - var className = ''; +// argumentsList[@@iterator] is %ArrayProto_values% +// https://tc39.es/ecma262/#sec-createunmappedargumentsobject +// https://tc39.es/ecma262/#sec-createmappedargumentsobject +Iterators.Arguments = Iterators.Array; - if (typeof props.className === 'string') { - className = Object(utils_browser_esm["a" /* getRegisteredStyles */])(cache.registered, registeredStyles, props.className); - } else if (props.className != null) { - className = props.className + " "; - } +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); - var serialized = Object(serialize_browser_esm["a" /* serializeStyles */])(registeredStyles); - if (false) { var labelFromStack; } +/***/ }), +/* 124 */ +/***/ (function(module, exports) { - var rules = Object(utils_browser_esm["b" /* insertStyles */])(cache, serialized, typeof type === 'string'); - className += cache.key + "-" + serialized.name; - var newProps = {}; +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; - for (var key in props) { - if (emotion_element_57a3a7a3_browser_esm_hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( true || false)) { - newProps[key] = props[key]; - } + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; } - newProps.ref = ref; - newProps.className = className; - var ele = /*#__PURE__*/Object(external_React_["createElement"])(type, newProps); + return arr2; +} - return ele; -}; // eslint-disable-next-line no-undef +module.exports = _arrayLikeToArray; +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { -var Emotion = /* #__PURE__ */emotion_element_57a3a7a3_browser_esm_withEmotionCache(function (props, cache, ref) { - if (typeof props.css === 'function') { - return /*#__PURE__*/Object(external_React_["createElement"])(ThemeContext.Consumer, null, function (theme) { - return emotion_element_57a3a7a3_browser_esm_render(cache, props, theme, ref); - }); - } +var toInteger = __webpack_require__(42); +var requireObjectCoercible = __webpack_require__(32); + +// `String.prototype.{ codePointAt, at }` methods implementation +var createMethod = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = String(requireObjectCoercible($this)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; +}; - return emotion_element_57a3a7a3_browser_esm_render(cache, props, null, ref); -}); +module.exports = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod(true) +}; -if (false) {} +/***/ }), +/* 126 */ +/***/ (function(module, exports) { +(function() { module.exports = window["wp"]["keycodes"]; }()); -// CONCATENATED MODULE: ./node_modules/@emotion/css/dist/css.browser.esm.js +/***/ }), +/* 127 */ +/***/ (function(module, exports) { +// iterable DOM collections +// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods +module.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 +}; -function css_browser_esm_css() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - return Object(serialize_browser_esm["a" /* serializeStyles */])(args); -} +/***/ }), +/* 128 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ var css_browser_esm = (css_browser_esm_css); +"use strict"; -// CONCATENATED MODULE: ./node_modules/@emotion/core/dist/core.browser.esm.js +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inheritsLoose; }); +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + _setPrototypeOf(subClass, superClass); +} +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { +var DESCRIPTORS = __webpack_require__(13); +var defineProperty = __webpack_require__(17).f; +var FunctionPrototype = Function.prototype; +var FunctionPrototypeToString = FunctionPrototype.toString; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; +// Function instances `.name` property +// https://tc39.es/ecma262/#sec-function-instances-name +if (DESCRIPTORS && !(NAME in FunctionPrototype)) { + defineProperty(FunctionPrototype, NAME, { + configurable: true, + get: function () { + try { + return FunctionPrototypeToString.call(this).match(nameRE)[1]; + } catch (error) { + return ''; + } + } + }); +} +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -var core_browser_esm_jsx = function jsx(type, props) { - var args = arguments; +var TO_STRING_TAG_SUPPORT = __webpack_require__(82); +var classof = __webpack_require__(113); - if (props == null || !emotion_element_57a3a7a3_browser_esm_hasOwnProperty.call(props, 'css')) { - // $FlowFixMe - return external_React_["createElement"].apply(undefined, args); - } +// `Object.prototype.toString` method implementation +// https://tc39.es/ecma262/#sec-object.prototype.tostring +module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { + return '[object ' + classof(this) + ']'; +}; - var argsLength = args.length; - var createElementArgArray = new Array(argsLength); - createElementArgArray[0] = Emotion; - createElementArgArray[1] = createEmotionProps(type, props); - for (var i = 2; i < argsLength; i++) { - createElementArgArray[i] = args[i]; - } // $FlowFixMe +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { +var arrayLikeToArray = __webpack_require__(124); - return external_React_["createElement"].apply(null, createElementArgArray); -}; +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} -var warnedAboutCssPropForGlobal = false; -var Global = /* #__PURE__ */emotion_element_57a3a7a3_browser_esm_withEmotionCache(function (props, cache) { - if (false) {} +module.exports = _unsupportedIterableToArray; - var styles = props.styles; +/***/ }), +/* 132 */ +/***/ (function(module, exports) { - if (typeof styles === 'function') { - return /*#__PURE__*/Object(external_React_["createElement"])(ThemeContext.Consumer, null, function (theme) { - var serialized = Object(serialize_browser_esm["a" /* serializeStyles */])([styles(theme)]); - return /*#__PURE__*/Object(external_React_["createElement"])(core_browser_esm_InnerGlobal, { - serialized: serialized, - cache: cache - }); - }); - } +(function() { module.exports = window["wp"]["htmlEntities"]; }()); - var serialized = Object(serialize_browser_esm["a" /* serializeStyles */])([styles]); - return /*#__PURE__*/Object(external_React_["createElement"])(core_browser_esm_InnerGlobal, { - serialized: serialized, - cache: cache - }); -}); +/***/ }), +/* 133 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -// maintain place over rerenders. -// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild -// initial client-side render from SSR, use place of hydrating tag -var core_browser_esm_InnerGlobal = /*#__PURE__*/function (_React$Component) { - Object(inheritsLoose["a" /* default */])(InnerGlobal, _React$Component); +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; - function InnerGlobal(props, context, updater) { - return _React$Component.call(this, props, context, updater) || this; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; } - var _proto = InnerGlobal.prototype; - - _proto.componentDidMount = function componentDidMount() { - this.sheet = new StyleSheet({ - key: this.props.cache.key + "-global", - nonce: this.props.cache.sheet.nonce, - container: this.props.cache.sheet.container - }); // $FlowFixMe - - var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]"); + return target; +} - if (node !== null) { - this.sheet.tags.push(node); - } +/***/ }), +/* 134 */ +/***/ (function(module, exports) { - if (this.props.cache.sheet.tags.length) { - this.sheet.before = this.props.cache.sheet.tags[0]; - } +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } - this.insertStyles(); - }; + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} - _proto.componentDidUpdate = function componentDidUpdate(prevProps) { - if (prevProps.serialized.name !== this.props.serialized.name) { - this.insertStyles(); - } - }; +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); - _proto.insertStyles = function insertStyles$1() { - if (this.props.serialized.next !== undefined) { - // insert keyframes - Object(utils_browser_esm["b" /* insertStyles */])(this.props.cache, this.props.serialized.next, true); - } + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } - if (this.sheet.tags.length) { - // if this doesn't exist then it will be null so the style element will be appended - var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling; - this.sheet.before = element; - this.sheet.flush(); - } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } - this.props.cache.insert("", this.props.serialized, this.sheet, false); + _next(undefined); + }); }; +} - _proto.componentWillUnmount = function componentWillUnmount() { - this.sheet.flush(); - }; +module.exports = _asyncToGenerator; - _proto.render = function render() { +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { - return null; - }; +"use strict"; - return InnerGlobal; -}(external_React_["Component"]); +var fixRegExpWellKnownSymbolLogic = __webpack_require__(111); +var anObject = __webpack_require__(9); +var toLength = __webpack_require__(34); +var toInteger = __webpack_require__(42); +var requireObjectCoercible = __webpack_require__(32); +var advanceStringIndex = __webpack_require__(122); +var getSubstitution = __webpack_require__(168); +var regExpExec = __webpack_require__(112); -var core_browser_esm_keyframes = function keyframes() { - var insertable = css_browser_esm.apply(void 0, arguments); - var name = "animation-" + insertable.name; // $FlowFixMe +var max = Math.max; +var min = Math.min; - return { - name: name, - styles: "@keyframes " + name + "{" + insertable.styles + "}", - anim: 1, - toString: function toString() { - return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; - } - }; +var maybeToString = function (it) { + return it === undefined ? it : String(it); }; -var classnames = function classnames(args) { - var len = args.length; - var i = 0; - var cls = ''; +// @@replace logic +fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; + var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; + var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; + + return [ + // `String.prototype.replace` method + // https://tc39.es/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; + return replacer !== undefined + ? replacer.call(searchValue, O, replaceValue) + : nativeReplace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + if ( + (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || + (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) + ) { + var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); + if (res.done) return res.value; + } - for (; i < len; i++) { - var arg = args[i]; - if (arg == null) continue; - var toAdd = void 0; + var rx = anObject(regexp); + var S = String(this); - switch (typeof arg) { - case 'boolean': - break; + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); - case 'object': - { - if (Array.isArray(arg)) { - toAdd = classnames(arg); - } else { - toAdd = ''; + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; - for (var k in arg) { - if (arg[k] && k) { - toAdd && (toAdd += ' '); - toAdd += k; - } - } - } + results.push(result); + if (!global) break; - break; - } + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } - default: - { - toAdd = arg; + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); } + ]; +}); - if (toAdd) { - cls && (cls += ' '); - cls += toAdd; - } - } - return cls; -}; +/***/ }), +/* 136 */ +/***/ (function(module, exports) { -function merge(registered, css, className) { - var registeredStyles = []; - var rawClassName = Object(utils_browser_esm["a" /* getRegisteredStyles */])(registered, registeredStyles, className); +module.exports = function (it, Constructor, name) { + if (!(it instanceof Constructor)) { + throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); + } return it; +}; - if (registeredStyles.length < 2) { - return className; - } - return rawClassName + css(registeredStyles); -} +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { -var ClassNames = emotion_element_57a3a7a3_browser_esm_withEmotionCache(function (props, context) { - return /*#__PURE__*/Object(external_React_["createElement"])(ThemeContext.Consumer, null, function (theme) { - var hasRendered = false; +"use strict"; - var css = function css() { - if (hasRendered && "production" !== 'production') { - throw new Error('css can only be used during render'); - } - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var fails = __webpack_require__(6); - var serialized = Object(serialize_browser_esm["a" /* serializeStyles */])(args, context.registered); +// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, +// so we use an intermediate function. +function RE(s, f) { + return RegExp(s, f); +} - { - Object(utils_browser_esm["b" /* insertStyles */])(context, serialized, false); - } +exports.UNSUPPORTED_Y = fails(function () { + // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError + var re = RE('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') != null; +}); - return context.key + "-" + serialized.name; - }; +exports.BROKEN_CARET = fails(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = RE('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') != null; +}); - var cx = function cx() { - if (hasRendered && "production" !== 'production') { - throw new Error('cx can only be used during render'); - } - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } +/***/ }), +/* 138 */, +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { - return merge(context.registered, css, classnames(args)); - }; +"use strict"; - var content = { - css: css, - cx: cx, - theme: theme - }; - var ele = props.children(content); - hasRendered = true; +var $ = __webpack_require__(12); +var IndexedObject = __webpack_require__(71); +var toIndexedObject = __webpack_require__(21); +var arrayMethodIsStrict = __webpack_require__(121); - return ele; - }); -}); +var nativeJoin = [].join; +var ES3_STRINGS = IndexedObject != Object; +var STRICT_METHOD = arrayMethodIsStrict('join', ','); +// `Array.prototype.join` method +// https://tc39.es/ecma262/#sec-array.prototype.join +$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, { + join: function join(separator) { + return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); + } +}); /***/ }), -/* 49 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; +var $ = __webpack_require__(12); +var notARegExp = __webpack_require__(207); +var requireObjectCoercible = __webpack_require__(32); +var correctIsRegExpLogic = __webpack_require__(208); + +// `String.prototype.includes` method +// https://tc39.es/ecma262/#sec-string.prototype.includes +$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined); } +}); - return arr2; -} /***/ }), -/* 50 */ +/* 141 */ /***/ (function(module, exports) { -(function() { module.exports = this["wc"]["tracks"]; }()); +(function() { module.exports = window["wp"]["hooks"]; }()); /***/ }), -/* 51 */ -/***/ (function(module, exports) { +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { -(function() { module.exports = this["wp"]["hooks"]; }()); +"use strict"; -/***/ }), -/* 52 */ -/***/ (function(module, exports) { +var redefine = __webpack_require__(27); +var anObject = __webpack_require__(9); +var fails = __webpack_require__(6); +var flags = __webpack_require__(114); -function _typeof(obj) { - "@babel/helpers - typeof"; +var TO_STRING = 'toString'; +var RegExpPrototype = RegExp.prototype; +var nativeToString = RegExpPrototype[TO_STRING]; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } +var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); +// FF44- RegExp#toString has a wrong name +var INCORRECT_NAME = nativeToString.name != TO_STRING; - return _typeof(obj); +// `RegExp.prototype.toString` method +// https://tc39.es/ecma262/#sec-regexp.prototype.tostring +if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); } -module.exports = _typeof; /***/ }), -/* 53 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +/* eslint-disable no-proto -- safe */ +var anObject = __webpack_require__(9); +var aPossiblePrototype = __webpack_require__(160); + +// `Object.setPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.setprototypeof +// Works with __proto__ only. Old v8 can't work with null proto objects. +module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); + else O.__proto__ = proto; + return O; + }; +}() : undefined); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inheritsLoose; }); -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} /***/ }), -/* 54 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; +var isObject = __webpack_require__(10); +var classof = __webpack_require__(30); +var wellKnownSymbol = __webpack_require__(8); - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } +var MATCH = wellKnownSymbol('match'); + +// `IsRegExp` abstract operation +// https://tc39.es/ecma262/#sec-isregexp +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); +}; - return target; -} /***/ }), -/* 55 */, -/* 56 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 145 */ +/***/ (function(module, exports) { -"use strict"; +(function() { module.exports = window["wc"]["components"]; }()); -// EXPORTS -__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ context_useSlot; }); -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ Consumer; }); +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules -var slicedToArray = __webpack_require__(24); +var global = __webpack_require__(3); +var DOMIterables = __webpack_require__(127); +var ArrayIteratorMethods = __webpack_require__(123); +var createNonEnumerableProperty = __webpack_require__(19); +var wellKnownSymbol = __webpack_require__(8); + +var ITERATOR = wellKnownSymbol('iterator'); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var ArrayValues = ArrayIteratorMethods.values; + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + if (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[ITERATOR] !== ArrayValues) try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR] = ArrayValues; + } + if (!CollectionPrototype[TO_STRING_TAG]) { + createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); + } + if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; + } + } + } +} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules -var toConsumableArray = __webpack_require__(26); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js -var classCallCheck = __webpack_require__(16); +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js -var createClass = __webpack_require__(17); +var toIndexedObject = __webpack_require__(21); +var nativeGetOwnPropertyNames = __webpack_require__(56).f; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -var assertThisInitialized = __webpack_require__(12); +var toString = {}.toString; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules -var inherits = __webpack_require__(18); +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js -var possibleConstructorReturn = __webpack_require__(21); +var getWindowNames = function (it) { + try { + return nativeGetOwnPropertyNames(it); + } catch (error) { + return windowNames.slice(); + } +}; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js -var getPrototypeOf = __webpack_require__(9); +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : nativeGetOwnPropertyNames(toIndexedObject(it)); +}; -// EXTERNAL MODULE: external {"this":["wp","element"]} -var external_this_wp_element_ = __webpack_require__(0); -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js -var esm_typeof = __webpack_require__(41); +var path = __webpack_require__(81); +var has = __webpack_require__(11); +var wrappedWellKnownSymbolModule = __webpack_require__(119); +var defineProperty = __webpack_require__(17).f; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(11); +module.exports = function (NAME) { + var Symbol = path.Symbol || (path.Symbol = {}); + if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, { + value: wrappedWellKnownSymbolModule.f(NAME) + }); +}; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(6); -// EXTERNAL MODULE: ./node_modules/@wordpress/is-shallow-equal/lib/index.js -var lib = __webpack_require__(66); -var lib_default = /*#__PURE__*/__webpack_require__.n(lib); +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/slot-fill-context.js -var slot_fill_context = __webpack_require__(61); +"use strict"; -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +var $forEach = __webpack_require__(75).forEach; +var arrayMethodIsStrict = __webpack_require__(121); +var STRICT_METHOD = arrayMethodIsStrict('forEach'); +// `Array.prototype.forEach` method implementation +// https://tc39.es/ecma262/#sec-array.prototype.foreach +module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); +} : [].forEach; +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { +var anObject = __webpack_require__(9); +var aFunction = __webpack_require__(70); +var wellKnownSymbol = __webpack_require__(8); +var SPECIES = wellKnownSymbol('species'); -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return Object(esm_typeof["a" /* default */])(key) === "symbol" ? key : String(key); } +// `SpeciesConstructor` abstract operation +// https://tc39.es/ecma262/#sec-speciesconstructor +module.exports = function (O, defaultConstructor) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); +}; -function _toPrimitive(input, hint) { if (Object(esm_typeof["a" /* default */])(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (Object(esm_typeof["a" /* default */])(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +"use strict"; -/** - * WordPress dependencies - */ - - -/** - * Internal dependencies - */ +var charAt = __webpack_require__(125).charAt; +var InternalStateModule = __webpack_require__(45); +var defineIterator = __webpack_require__(166); + +var STRING_ITERATOR = 'String Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); + +// `String.prototype[@@iterator]` method +// https://tc39.es/ecma262/#sec-string.prototype-@@iterator +defineIterator(String, 'String', function (iterated) { + setInternalState(this, { + type: STRING_ITERATOR, + string: String(iterated), + index: 0 + }); +// `%StringIteratorPrototype%.next` method +// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next +}, function next() { + var state = getInternalState(this); + var string = state.string; + var index = state.index; + var point; + if (index >= string.length) return { value: undefined, done: true }; + point = charAt(string, index); + state.index += point.length; + return { value: point, done: false }; +}); +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { -function useSlotRegistry() { - var _useState = Object(external_this_wp_element_["useState"])({}), - _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), - slots = _useState2[0], - setSlots = _useState2[1]; +var redefine = __webpack_require__(27); - var _useState3 = Object(external_this_wp_element_["useState"])({}), - _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), - fills = _useState4[0], - setFills = _useState4[1]; +module.exports = function (target, src, options) { + for (var key in src) redefine(target, key, src[key], options); + return target; +}; - var registerSlot = Object(external_this_wp_element_["useCallback"])(function (name, ref, fillProps) { - setSlots(function (prevSlots) { - var slot = prevSlots[name] || {}; - return _objectSpread(_objectSpread({}, prevSlots), {}, Object(defineProperty["a" /* default */])({}, name, _objectSpread(_objectSpread({}, slot), {}, { - ref: ref || slot.ref, - fillProps: fillProps || slot.fillProps || {} - }))); - }); - }, []); - var unregisterSlot = Object(external_this_wp_element_["useCallback"])(function (name, ref) { - setSlots(function (prevSlots) { - var slot = prevSlots[name], - nextSlots = Object(objectWithoutProperties["a" /* default */])(prevSlots, [name].map(_toPropertyKey)); // Make sure we're not unregistering a slot registered by another element - // See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412 +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { - if ((slot === null || slot === void 0 ? void 0 : slot.ref) === ref) { - return nextSlots; - } +"use strict"; - return prevSlots; - }); - }, []); - var updateSlot = Object(external_this_wp_element_["useCallback"])(function (name, fillProps) { - var slot = slots[name]; +var getBuiltIn = __webpack_require__(31); +var definePropertyModule = __webpack_require__(17); +var wellKnownSymbol = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(13); - if (!slot) { - return; - } +var SPECIES = wellKnownSymbol('species'); - if (!lib_default()(slot.fillProps, fillProps)) { - slot.fillProps = fillProps; - var slotFills = fills[name]; +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; - if (slotFills) { - // Force update fills - slotFills.map(function (fill) { - return fill.current.rerender(); - }); - } - } - }, [slots, fills]); - var registerFill = Object(external_this_wp_element_["useCallback"])(function (name, ref) { - setFills(function (prevFills) { - return _objectSpread(_objectSpread({}, prevFills), {}, Object(defineProperty["a" /* default */])({}, name, [].concat(Object(toConsumableArray["a" /* default */])(prevFills[name] || []), [ref]))); + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } }); - }, []); - var unregisterFill = Object(external_this_wp_element_["useCallback"])(function (name, ref) { - setFills(function (prevFills) { - if (prevFills[name]) { - return _objectSpread(_objectSpread({}, prevFills), {}, Object(defineProperty["a" /* default */])({}, name, prevFills[name].filter(function (fillRef) { - return fillRef !== ref; - }))); - } + } +}; - return prevFills; - }); - }, []); // Memoizing the return value so it can be directly passed to Provider value - var registry = Object(external_this_wp_element_["useMemo"])(function () { - return { - slots: slots, - fills: fills, - registerSlot: registerSlot, - updateSlot: updateSlot, - unregisterSlot: unregisterSlot, - registerFill: registerFill, - unregisterFill: unregisterFill - }; - }, [slots, fills, registerSlot, updateSlot, unregisterSlot, registerFill, unregisterFill]); - return registry; -} +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { -function slot_fill_provider_SlotFillProvider(_ref) { - var children = _ref.children; - var registry = useSlotRegistry(); - return Object(external_this_wp_element_["createElement"])(slot_fill_context["a" /* default */].Provider, { - value: registry - }, children); -} -//# sourceMappingURL=slot-fill-provider.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/context.js +var anObject = __webpack_require__(9); +var isArrayIteratorMethod = __webpack_require__(171); +var toLength = __webpack_require__(34); +var bind = __webpack_require__(94); +var getIteratorMethod = __webpack_require__(155); +var iteratorClose = __webpack_require__(172); +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; +module.exports = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); + var iterator, iterFn, index, length, result, next, step; + + var stop = function (condition) { + if (iterator) iteratorClose(iterator); + return new Result(true, condition); + }; + var callFn = function (value) { + if (AS_ENTRIES) { + anObject(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } return INTERRUPTED ? fn(value, stop) : fn(value); + }; + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = toLength(iterable.length); length > index; index++) { + result = callFn(iterable[index]); + if (result && result instanceof Result) return result; + } return new Result(false); + } + iterator = iterFn.call(iterable); + } + next = iterator.next; + while (!(step = next.call(iterator)).done) { + try { + result = callFn(step.value); + } catch (error) { + iteratorClose(iterator); + throw error; + } + if (typeof result == 'object' && result && result instanceof Result) return result; + } return new Result(false); +}; +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { +var classof = __webpack_require__(113); +var Iterators = __webpack_require__(110); +var wellKnownSymbol = __webpack_require__(8); +var ITERATOR = wellKnownSymbol('iterator'); -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } +module.exports = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } -/** - * External dependencies - */ +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * WordPress dependencies - */ +var isObject = __webpack_require__(10); +var setPrototypeOf = __webpack_require__(143); +// makes subclassing work correct for wrapped built-ins +module.exports = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + setPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + typeof (NewTarget = dummy.constructor) == 'function' && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) setPrototypeOf($this, NewTargetPrototype); + return $this; +}; -/** - * Internal dependencies - */ +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { -var SlotFillContext = Object(external_this_wp_element_["createContext"])({ - registerSlot: function registerSlot() {}, - unregisterSlot: function unregisterSlot() {}, - registerFill: function registerFill() {}, - unregisterFill: function unregisterFill() {}, - getSlot: function getSlot() {}, - getFills: function getFills() {}, - subscribe: function subscribe() {} -}); -var Provider = SlotFillContext.Provider, - Consumer = SlotFillContext.Consumer; +var global = __webpack_require__(3); +var fails = __webpack_require__(6); +var bind = __webpack_require__(94); +var html = __webpack_require__(98); +var createElement = __webpack_require__(67); +var IS_IOS = __webpack_require__(158); +var IS_NODE = __webpack_require__(77); + +var location = global.location; +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; + +var run = function (id) { + // eslint-disable-next-line no-prototype-builtins -- safe + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; -var context_SlotFillProvider = /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(SlotFillProvider, _Component); +var runner = function (id) { + return function () { + run(id); + }; +}; - var _super = _createSuper(SlotFillProvider); +var listener = function (event) { + run(event.data); +}; - function SlotFillProvider() { - var _this; +var post = function (id) { + // old engines have not location.origin + global.postMessage(id + '', location.protocol + '//' + location.host); +}; - Object(classCallCheck["a" /* default */])(this, SlotFillProvider); - - _this = _super.apply(this, arguments); - _this.registerSlot = _this.registerSlot.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.registerFill = _this.registerFill.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.unregisterSlot = _this.unregisterSlot.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.unregisterFill = _this.unregisterFill.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.getSlot = _this.getSlot.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.getFills = _this.getFills.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.hasFills = _this.hasFills.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.subscribe = _this.subscribe.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.slots = {}; - _this.fills = {}; - _this.listeners = []; - _this.contextValue = { - registerSlot: _this.registerSlot, - unregisterSlot: _this.unregisterSlot, - registerFill: _this.registerFill, - unregisterFill: _this.unregisterFill, - getSlot: _this.getSlot, - getFills: _this.getFills, - hasFills: _this.hasFills, - subscribe: _this.subscribe +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!set || !clear) { + set = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func -- spec requirement + (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (IS_NODE) { + defer = function (id) { + process.nextTick(runner(id)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + // Browsers with MessageChannel, includes WebWorkers + // except iOS - https://github.com/zloirock/core-js/issues/624 + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if ( + global.addEventListener && + typeof postMessage == 'function' && + !global.importScripts && + location && location.protocol !== 'file:' && + !fails(post) + ) { + defer = post; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(runner(id), 0); }; - return _this; } +} - Object(createClass["a" /* default */])(SlotFillProvider, [{ - key: "registerSlot", - value: function registerSlot(name, slot) { - var previousSlot = this.slots[name]; - this.slots[name] = slot; - this.triggerListeners(); // Sometimes the fills are registered after the initial render of slot - // But before the registerSlot call, we need to rerender the slot +module.exports = { + set: set, + clear: clear +}; - this.forceUpdateSlot(name); // If a new instance of a slot is being mounted while another with the - // same name exists, force its update _after_ the new slot has been - // assigned into the instance, such that its own rendering of children - // will be empty (the new Slot will subsume all fills for this name). - if (previousSlot) { - previousSlot.forceUpdate(); - } - } - }, { - key: "registerFill", - value: function registerFill(name, instance) { - this.fills[name] = [].concat(Object(toConsumableArray["a" /* default */])(this.fills[name] || []), [instance]); - this.forceUpdateSlot(name); - } - }, { - key: "unregisterSlot", - value: function unregisterSlot(name, instance) { - // If a previous instance of a Slot by this name unmounts, do nothing, - // as the slot and its fills should only be removed for the current - // known instance. - if (this.slots[name] !== instance) { - return; - } +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { - delete this.slots[name]; - this.triggerListeners(); - } - }, { - key: "unregisterFill", - value: function unregisterFill(name, instance) { - this.fills[name] = Object(external_lodash_["without"])(this.fills[name], instance); - this.resetFillOccurrence(name); - this.forceUpdateSlot(name); - } - }, { - key: "getSlot", - value: function getSlot(name) { - return this.slots[name]; - } - }, { - key: "getFills", - value: function getFills(name, slotInstance) { - // Fills should only be returned for the current instance of the slot - // in which they occupy. - if (this.slots[name] !== slotInstance) { - return []; - } +var userAgent = __webpack_require__(87); - return Object(external_lodash_["sortBy"])(this.fills[name], 'occurrence'); - } - }, { - key: "hasFills", - value: function hasFills(name) { - return this.fills[name] && !!this.fills[name].length; - } - }, { - key: "resetFillOccurrence", - value: function resetFillOccurrence(name) { - Object(external_lodash_["forEach"])(this.fills[name], function (instance) { - instance.occurrence = undefined; - }); - } - }, { - key: "forceUpdateSlot", - value: function forceUpdateSlot(name) { - var slot = this.getSlot(name); +module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); - if (slot) { - slot.forceUpdate(); - } - } - }, { - key: "triggerListeners", - value: function triggerListeners() { - this.listeners.forEach(function (listener) { - return listener(); - }); - } - }, { - key: "subscribe", - value: function subscribe(listener) { - var _this2 = this; - this.listeners.push(listener); - return function () { - _this2.listeners = Object(external_lodash_["without"])(_this2.listeners, listener); - }; - } - }, { - key: "render", - value: function render() { - return Object(external_this_wp_element_["createElement"])(Provider, { - value: this.contextValue - }, Object(external_this_wp_element_["createElement"])(slot_fill_provider_SlotFillProvider, null, this.props.children)); - } - }]); +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { - return SlotFillProvider; -}(external_this_wp_element_["Component"]); -/** - * React hook returning the active slot given a name. - * - * @param {string} name Slot name. - * @return {Object} Slot object. - */ +"use strict"; +var aFunction = __webpack_require__(70); -var context_useSlot = function useSlot(name) { - var _useContext = Object(external_this_wp_element_["useContext"])(SlotFillContext), - getSlot = _useContext.getSlot, - subscribe = _useContext.subscribe; +var PromiseCapability = function (C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; - var _useState = Object(external_this_wp_element_["useState"])(getSlot(name)), - _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), - slot = _useState2[0], - setSlot = _useState2[1]; +// 25.4.1.5 NewPromiseCapability(C) +module.exports.f = function (C) { + return new PromiseCapability(C); +}; - Object(external_this_wp_element_["useEffect"])(function () { - setSlot(getSlot(name)); - var unsubscribe = subscribe(function () { - setSlot(getSlot(name)); - }); - return unsubscribe; - }, [name]); - return slot; + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(10); + +module.exports = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } return it; }; -/* harmony default export */ var context = __webpack_exports__["b"] = (context_SlotFillProvider); -//# sourceMappingURL=context.js.map /***/ }), -/* 57 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 161 */, +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -// EXPORTS -__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ TAB; }); -__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ ESCAPE; }); -__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ LEFT; }); -__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ UP; }); -__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ RIGHT; }); -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DOWN; }); -// UNUSED EXPORTS: BACKSPACE, ENTER, SPACE, DELETE, F10, ALT, CTRL, COMMAND, SHIFT, ZERO, modifiers, rawShortcut, displayShortcutList, displayShortcut, shortcutAriaLabel, isKeyboardEvent +var stringify = __webpack_require__(227); +var parse = __webpack_require__(228); +var formats = __webpack_require__(169); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(6); +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules -var toConsumableArray = __webpack_require__(26); -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); +/***/ }), +/* 163 */ +/***/ (function(module, exports) { -// EXTERNAL MODULE: external {"this":["wp","i18n"]} -var external_this_wp_i18n_ = __webpack_require__(3); +(function() { module.exports = window["ReactDOM"]; }()); -// CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/platform.js -/** - * External dependencies - */ +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Return true if platform is MacOS. - * - * @param {Object} _window window object by default; used for DI testing. - * - * @return {boolean} True if MacOS; false otherwise. - */ +"use strict"; -function isAppleOS() { - var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; +var $ = __webpack_require__(12); +var IS_PURE = __webpack_require__(57); +var global = __webpack_require__(3); +var getBuiltIn = __webpack_require__(31); +var NativePromise = __webpack_require__(193); +var redefine = __webpack_require__(27); +var redefineAll = __webpack_require__(152); +var setToStringTag = __webpack_require__(90); +var setSpecies = __webpack_require__(153); +var isObject = __webpack_require__(10); +var aFunction = __webpack_require__(70); +var anInstance = __webpack_require__(136); +var inspectSource = __webpack_require__(68); +var iterate = __webpack_require__(154); +var checkCorrectnessOfIteration = __webpack_require__(165); +var speciesConstructor = __webpack_require__(150); +var task = __webpack_require__(157).set; +var microtask = __webpack_require__(194); +var promiseResolve = __webpack_require__(196); +var hostReportErrors = __webpack_require__(197); +var newPromiseCapabilityModule = __webpack_require__(159); +var perform = __webpack_require__(198); +var InternalStateModule = __webpack_require__(45); +var isForced = __webpack_require__(74); +var wellKnownSymbol = __webpack_require__(8); +var IS_NODE = __webpack_require__(77); +var V8_VERSION = __webpack_require__(63); + +var SPECIES = wellKnownSymbol('species'); +var PROMISE = 'Promise'; +var getInternalState = InternalStateModule.get; +var setInternalState = InternalStateModule.set; +var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); +var PromiseConstructor = NativePromise; +var TypeError = global.TypeError; +var document = global.document; +var process = global.process; +var $fetch = getBuiltIn('fetch'); +var newPromiseCapability = newPromiseCapabilityModule.f; +var newGenericPromiseCapability = newPromiseCapability; +var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); +var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function'; +var UNHANDLED_REJECTION = 'unhandledrejection'; +var REJECTION_HANDLED = 'rejectionhandled'; +var PENDING = 0; +var FULFILLED = 1; +var REJECTED = 2; +var HANDLED = 1; +var UNHANDLED = 2; +var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; + +var FORCED = isForced(PROMISE, function () { + var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor); + if (!GLOBAL_CORE_JS_PROMISE) { + // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // We can't detect it synchronously, so just check versions + if (V8_VERSION === 66) return true; + // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test + if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true; + } + // We need Promise#finally in the pure version for preventing prototype pollution + if (IS_PURE && !PromiseConstructor.prototype['finally']) return true; + // We can't use @@species feature detection in V8 since it causes + // deoptimization and performance degradation + // https://github.com/zloirock/core-js/issues/679 + if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false; + // Detect correctness of subclassing with @@species support + var promise = PromiseConstructor.resolve(1); + var FakePromise = function (exec) { + exec(function () { /* empty */ }, function () { /* empty */ }); + }; + var constructor = promise.constructor = {}; + constructor[SPECIES] = FakePromise; + return !(promise.then(function () { /* empty */ }) instanceof FakePromise); +}); - var platform = _window.navigator.platform; - return platform.indexOf('Mac') !== -1 || Object(external_lodash_["includes"])(['iPad', 'iPhone'], platform); -} -//# sourceMappingURL=platform.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/index.js +var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { + PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); +}); +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (state, isReject) { + if (state.notified) return; + state.notified = true; + var chain = state.reactions; + microtask(function () { + var value = state.value; + var ok = state.state == FULFILLED; + var index = 0; + // variable length - can't use forEach + while (chain.length > index) { + var reaction = chain[index++]; + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (state.rejection === UNHANDLED) onHandleUnhandled(state); + state.rejection = HANDLED; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // can throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (error) { + if (domain && !exited) domain.exit(); + reject(error); + } + } + state.reactions = []; + state.notified = false; + if (isReject && !state.rejection) onUnhandled(state); + }); +}; -/** - * Note: The order of the modifier keys in many of the [foo]Shortcut() - * functions in this file are intentional and should not be changed. They're - * designed to fit with the standard menu keyboard shortcuts shown in the - * user's platform. - * - * For example, on MacOS menu shortcuts will place Shift before Command, but - * on Windows Control will usually come first. So don't provide your own - * shortcut combos directly to keyboardShortcut(). - */ +var dispatchEvent = function (name, promise, reason) { + var event, handler; + if (DISPATCH_EVENT) { + event = document.createEvent('Event'); + event.promise = promise; + event.reason = reason; + event.initEvent(name, false, true); + global.dispatchEvent(event); + } else event = { promise: promise, reason: reason }; + if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event); + else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); +}; -/** - * External dependencies - */ +var onUnhandled = function (state) { + task.call(global, function () { + var promise = state.facade; + var value = state.value; + var IS_UNHANDLED = isUnhandled(state); + var result; + if (IS_UNHANDLED) { + result = perform(function () { + if (IS_NODE) { + process.emit('unhandledRejection', value, promise); + } else dispatchEvent(UNHANDLED_REJECTION, promise, value); + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; + if (result.error) throw result.value; + } + }); +}; -/** - * WordPress dependencies - */ +var isUnhandled = function (state) { + return state.rejection !== HANDLED && !state.parent; +}; +var onHandleUnhandled = function (state) { + task.call(global, function () { + var promise = state.facade; + if (IS_NODE) { + process.emit('rejectionHandled', promise); + } else dispatchEvent(REJECTION_HANDLED, promise, state.value); + }); +}; -/** - * Internal dependencies - */ +var bind = function (fn, state, unwrap) { + return function (value) { + fn(state, value, unwrap); + }; +}; +var internalReject = function (state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + state.value = value; + state.state = REJECTED; + notify(state, true); +}; -/** - * @typedef {'primary'|'primaryShift'|'primaryAlt'|'secondary'|'access'|'ctrl'|'alt'|'ctrlShift'|'shift'|'shiftAlt'} WPKeycodeModifier - */ +var internalResolve = function (state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + try { + if (state.facade === value) throw TypeError("Promise can't be resolved itself"); + var then = isThenable(value); + if (then) { + microtask(function () { + var wrapper = { done: false }; + try { + then.call(value, + bind(internalResolve, wrapper, state), + bind(internalReject, wrapper, state) + ); + } catch (error) { + internalReject(wrapper, error, state); + } + }); + } else { + state.value = value; + state.state = FULFILLED; + notify(state, false); + } + } catch (error) { + internalReject({ done: false }, error, state); + } +}; -/** - * An object of handler functions for each of the possible modifier - * combinations. A handler will return a value for a given key. - * - * @typedef {Recordany>} WPKeycodeHandlerByModifier - */ +// constructor polyfill +if (FORCED) { + // 25.4.3.1 Promise(executor) + PromiseConstructor = function Promise(executor) { + anInstance(this, PromiseConstructor, PROMISE); + aFunction(executor); + Internal.call(this); + var state = getInternalState(this); + try { + executor(bind(internalResolve, state), bind(internalReject, state)); + } catch (error) { + internalReject(state, error); + } + }; + // eslint-disable-next-line no-unused-vars -- required for `.length` + Internal = function Promise(executor) { + setInternalState(this, { + type: PROMISE, + done: false, + notified: false, + parent: false, + reactions: [], + rejection: false, + state: PENDING, + value: undefined + }); + }; + Internal.prototype = redefineAll(PromiseConstructor.prototype, { + // `Promise.prototype.then` method + // https://tc39.es/ecma262/#sec-promise.prototype.then + then: function then(onFulfilled, onRejected) { + var state = getInternalPromiseState(this); + var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = IS_NODE ? process.domain : undefined; + state.parent = true; + state.reactions.push(reaction); + if (state.state != PENDING) notify(state, false); + return reaction.promise; + }, + // `Promise.prototype.catch` method + // https://tc39.es/ecma262/#sec-promise.prototype.catch + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + var state = getInternalState(promise); + this.promise = promise; + this.resolve = bind(internalResolve, state); + this.reject = bind(internalReject, state); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === PromiseConstructor || C === PromiseWrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; -/** - * Keycode for BACKSPACE key. - */ + if (!IS_PURE && typeof NativePromise == 'function') { + nativeThen = NativePromise.prototype.then; + + // wrap native Promise#then for native async functions + redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) { + var that = this; + return new PromiseConstructor(function (resolve, reject) { + nativeThen.call(that, resolve, reject); + }).then(onFulfilled, onRejected); + // https://github.com/zloirock/core-js/issues/640 + }, { unsafe: true }); + + // wrap fetch result + if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + fetch: function fetch(input /* , init */) { + return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments)); + } + }); + } +} -var BACKSPACE = 8; -/** - * Keycode for TAB key. - */ +$({ global: true, wrap: true, forced: FORCED }, { + Promise: PromiseConstructor +}); -var TAB = 9; -/** - * Keycode for ENTER key. - */ +setToStringTag(PromiseConstructor, PROMISE, false, true); +setSpecies(PROMISE); -var ENTER = 13; -/** - * Keycode for ESCAPE key. - */ +PromiseWrapper = getBuiltIn(PROMISE); -var ESCAPE = 27; -/** - * Keycode for SPACE key. - */ +// statics +$({ target: PROMISE, stat: true, forced: FORCED }, { + // `Promise.reject` method + // https://tc39.es/ecma262/#sec-promise.reject + reject: function reject(r) { + var capability = newPromiseCapability(this); + capability.reject.call(undefined, r); + return capability.promise; + } +}); -var SPACE = 32; -/** - * Keycode for LEFT key. - */ +$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { + // `Promise.resolve` method + // https://tc39.es/ecma262/#sec-promise.resolve + resolve: function resolve(x) { + return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); + } +}); -var LEFT = 37; -/** - * Keycode for UP key. - */ +$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { + // `Promise.all` method + // https://tc39.es/ecma262/#sec-promise.all + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + $promiseResolve.call(C, promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.error) reject(result.value); + return capability.promise; + }, + // `Promise.race` method + // https://tc39.es/ecma262/#sec-promise.race + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + iterate(iterable, function (promise) { + $promiseResolve.call(C, promise).then(capability.resolve, reject); + }); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); -var UP = 38; -/** - * Keycode for RIGHT key. - */ -var RIGHT = 39; -/** - * Keycode for DOWN key. - */ +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { -var DOWN = 40; -/** - * Keycode for DELETE key. - */ +var wellKnownSymbol = __webpack_require__(8); -var DELETE = 46; -/** - * Keycode for F10 key. - */ +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; -var F10 = 121; -/** - * Keycode for ALT key. - */ +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line no-throw-literal -- required for testing + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } -var ALT = 'alt'; -/** - * Keycode for CTRL key. - */ +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; -var CTRL = 'ctrl'; -/** - * Keycode for COMMAND/META key. - */ -var COMMAND = 'meta'; -/** - * Keycode for SHIFT key. - */ +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { -var SHIFT = 'shift'; -/** - * Keycode for ZERO key. - */ +"use strict"; -var ZERO = 48; -/** - * Object that contains functions that return the available modifier - * depending on platform. - * - * - `primary`: takes a isApple function as a parameter. - * - `primaryShift`: takes a isApple function as a parameter. - * - `primaryAlt`: takes a isApple function as a parameter. - * - `secondary`: takes a isApple function as a parameter. - * - `access`: takes a isApple function as a parameter. - * - `ctrl` - * - `alt` - * - `ctrlShift` - * - `shift` - * - `shiftAlt` - */ +var $ = __webpack_require__(12); +var createIteratorConstructor = __webpack_require__(199); +var getPrototypeOf = __webpack_require__(174); +var setPrototypeOf = __webpack_require__(143); +var setToStringTag = __webpack_require__(90); +var createNonEnumerableProperty = __webpack_require__(19); +var redefine = __webpack_require__(27); +var wellKnownSymbol = __webpack_require__(8); +var IS_PURE = __webpack_require__(57); +var Iterators = __webpack_require__(110); +var IteratorsCore = __webpack_require__(173); + +var IteratorPrototype = IteratorsCore.IteratorPrototype; +var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; +var ITERATOR = wellKnownSymbol('iterator'); +var KEYS = 'keys'; +var VALUES = 'values'; +var ENTRIES = 'entries'; + +var returnThis = function () { return this; }; + +module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } return function () { return new IteratorConstructor(this); }; + }; -var modifiers = { - primary: function primary(_isApple) { - return _isApple() ? [COMMAND] : [CTRL]; - }, - primaryShift: function primaryShift(_isApple) { - return _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT]; - }, - primaryAlt: function primaryAlt(_isApple) { - return _isApple() ? [ALT, COMMAND] : [CTRL, ALT]; - }, - secondary: function secondary(_isApple) { - return _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT]; - }, - access: function access(_isApple) { - return _isApple() ? [CTRL, ALT] : [SHIFT, ALT]; - }, - ctrl: function ctrl() { - return [CTRL]; - }, - alt: function alt() { - return [ALT]; - }, - ctrlShift: function ctrlShift() { - return [CTRL, SHIFT]; - }, - shift: function shift() { - return [SHIFT]; - }, - shiftAlt: function shiftAlt() { - return [SHIFT, ALT]; + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { + createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); + if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; + } + } + + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return nativeIterator.call(this); }; + } + + // define iterator + if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { + createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); + } + Iterators[NAME] = defaultIterator; + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } + + return methods; }; -/** - * An object that contains functions to get raw shortcuts. - * E.g. rawShortcut.primary( 'm' ) will return 'meta+m' on Mac. - * These are intended for user with the KeyboardShortcuts component or TinyMCE. - * - * @type {WPKeycodeHandlerByModifier} Keyed map of functions to raw shortcuts. - */ -var rawShortcut = Object(external_lodash_["mapValues"])(modifiers, function (modifier) { - return function (character) { - var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS; - return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character.toLowerCase()]).join('+'); - }; -}); -/** - * Return an array of the parts of a keyboard shortcut chord for display - * E.g displayShortcutList.primary( 'm' ) will return [ '⌘', 'M' ] on Mac. - * - * @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut - * sequences. - */ +/***/ }), +/* 167 */, +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { -var displayShortcutList = Object(external_lodash_["mapValues"])(modifiers, function (modifier) { - return function (character) { - var _replacementKeyMap; +var toObject = __webpack_require__(38); + +var floor = Math.floor; +var replace = ''.replace; +var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; + +// https://tc39.es/ecma262/#sec-getsubstitution +module.exports = function (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); +}; - var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS; - var isApple = _isApple(); +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { - var replacementKeyMap = (_replacementKeyMap = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap, ALT, isApple ? '⌥' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap, CTRL, isApple ? '⌃' : 'Ctrl'), Object(defineProperty["a" /* default */])(_replacementKeyMap, COMMAND, '⌘'), Object(defineProperty["a" /* default */])(_replacementKeyMap, SHIFT, isApple ? '⇧' : 'Shift'), _replacementKeyMap); - var modifierKeys = modifier(_isApple).reduce(function (accumulator, key) { - var replacementKey = Object(external_lodash_["get"])(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys. +"use strict"; - if (isApple) { - return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey]); - } - return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey, '+']); - }, []); - var capitalizedCharacter = Object(external_lodash_["capitalize"])(character); - return [].concat(Object(toConsumableArray["a" /* default */])(modifierKeys), [capitalizedCharacter]); - }; -}); -/** - * An object that contains functions to display shortcuts. - * E.g. displayShortcut.primary( 'm' ) will return '⌘M' on Mac. - * - * @type {WPKeycodeHandlerByModifier} Keyed map of functions to display - * shortcuts. - */ +var replace = String.prototype.replace; +var percentTwenties = /%20/g; -var displayShortcut = Object(external_lodash_["mapValues"])(displayShortcutList, function (shortcutList) { - return function (character) { - var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS; +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; - return shortcutList(character, _isApple).join(''); - }; -}); -/** - * An object that contains functions to return an aria label for a keyboard shortcut. - * E.g. shortcutAriaLabel.primary( '.' ) will return 'Command + Period' on Mac. - * - * @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut ARIA - * labels. - */ +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; -var shortcutAriaLabel = Object(external_lodash_["mapValues"])(modifiers, function (modifier) { - return function (character) { - var _replacementKeyMap2; - var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS; +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { - var isApple = _isApple(); +"use strict"; - var replacementKeyMap = (_replacementKeyMap2 = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap2, SHIFT, 'Shift'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, COMMAND, isApple ? 'Command' : 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, CTRL, 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ALT, isApple ? 'Option' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ',', Object(external_this_wp_i18n_["__"])('Comma')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '.', Object(external_this_wp_i18n_["__"])('Period')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '`', Object(external_this_wp_i18n_["__"])('Backtick')), _replacementKeyMap2); - return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character]).map(function (key) { - return Object(external_lodash_["capitalize"])(Object(external_lodash_["get"])(replacementKeyMap, key, key)); - }).join(isApple ? ' ' : ' + '); - }; +var fixRegExpWellKnownSymbolLogic = __webpack_require__(111); +var anObject = __webpack_require__(9); +var requireObjectCoercible = __webpack_require__(32); +var sameValue = __webpack_require__(214); +var regExpExec = __webpack_require__(112); + +// @@search logic +fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.es/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = requireObjectCoercible(this); + var searcher = regexp == undefined ? undefined : regexp[SEARCH]; + return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative(nativeSearch, regexp, this); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; }); -/** - * From a given KeyboardEvent, returns an array of active modifier constants for - * the event. - * - * @param {KeyboardEvent} event Keyboard event. - * - * @return {Array} Active modifier constants. - */ -function getEventModifiers(event) { - return [ALT, CTRL, COMMAND, SHIFT].filter(function (key) { - return event["".concat(key, "Key")]; - }); -} -/** - * An object that contains functions to check if a keyboard event matches a - * predefined shortcut combination. - * E.g. isKeyboardEvent.primary( event, 'm' ) will return true if the event - * signals pressing ⌘M. - * - * @type {WPKeycodeHandlerByModifier} Keyed map of functions to match events. - */ +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { -var isKeyboardEvent = Object(external_lodash_["mapValues"])(modifiers, function (getModifiers) { - return function (event, character) { - var _isApple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isAppleOS; +var wellKnownSymbol = __webpack_require__(8); +var Iterators = __webpack_require__(110); - var mods = getModifiers(_isApple); - var eventMods = getEventModifiers(event); +var ITERATOR = wellKnownSymbol('iterator'); +var ArrayPrototype = Array.prototype; - if (Object(external_lodash_["xor"])(mods, eventMods).length) { - return false; - } +// check on default Array iterator +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); +}; - if (!character) { - return Object(external_lodash_["includes"])(mods, event.key.toLowerCase()); - } - return event.key === character; - }; -}); -//# sourceMappingURL=index.js.map +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(9); + +module.exports = function (iterator) { + var returnMethod = iterator['return']; + if (returnMethod !== undefined) { + return anObject(returnMethod.call(iterator)).value; + } +}; + /***/ }), -/* 58 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { -var objectWithoutPropertiesLoose = __webpack_require__(150); +"use strict"; -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = objectWithoutPropertiesLoose(source, excluded); - var key, i; +var fails = __webpack_require__(6); +var getPrototypeOf = __webpack_require__(174); +var createNonEnumerableProperty = __webpack_require__(19); +var has = __webpack_require__(11); +var wellKnownSymbol = __webpack_require__(8); +var IS_PURE = __webpack_require__(57); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); +var ITERATOR = wellKnownSymbol('iterator'); +var BUGGY_SAFARI_ITERATORS = false; - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } +var returnThis = function () { return this; }; + +// `%IteratorPrototype%` object +// https://tc39.es/ecma262/#sec-%iteratorprototype%-object +var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; + +if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } +} - return target; +var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { + var test = {}; + // FF44- legacy iterators case + return IteratorPrototype[ITERATOR].call(test) !== test; +}); + +if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { + createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); } -module.exports = _objectWithoutProperties; +module.exports = { + IteratorPrototype: IteratorPrototype, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS +}; + /***/ }), -/* 59 */ +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(11); +var toObject = __webpack_require__(38); +var sharedKey = __webpack_require__(52); +var CORRECT_PROTOTYPE_GETTER = __webpack_require__(213); + +var IE_PROTO = sharedKey('IE_PROTO'); +var ObjectPrototype = Object.prototype; + +// `Object.getPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.getprototypeof +module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectPrototype : null; +}; + + +/***/ }), +/* 175 */, +/* 176 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); -/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49); - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); +var isProduction = "production" === 'production'; +var prefix = 'Invariant failed'; +function invariant(condition, message) { + if (condition) { + return; + } + if (isProduction) { + throw new Error(prefix); + } + throw new Error(prefix + ": " + (message || '')); } +/* harmony default export */ __webpack_exports__["a"] = (invariant); + + /***/ }), -/* 60 */, -/* 61 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72); -/** - * WordPress dependencies - */ +var fixRegExpWellKnownSymbolLogic = __webpack_require__(111); +var isRegExp = __webpack_require__(144); +var anObject = __webpack_require__(9); +var requireObjectCoercible = __webpack_require__(32); +var speciesConstructor = __webpack_require__(150); +var advanceStringIndex = __webpack_require__(122); +var toLength = __webpack_require__(34); +var callRegExpExec = __webpack_require__(112); +var regexpExec = __webpack_require__(91); +var fails = __webpack_require__(6); + +var arrayPush = [].push; +var min = Math.min; +var MAX_UINT32 = 0xFFFFFFFF; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + // eslint-disable-next-line regexp/no-empty-group -- required for testing + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) { + return nativeSplit.call(string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output.length > lim ? output.slice(0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.es/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}, !SUPPORTS_Y); -var SlotFillContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])({ - slots: {}, - fills: {}, - registerSlot: function registerSlot() { - typeof process !== "undefined" && process.env && "production" !== "production" ? Object(_wordpress_warning__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('Components must be wrapped within `SlotFillProvider`. ' + 'See https://developer.wordpress.org/block-editor/components/slot-fill/') : void 0; - }, - updateSlot: function updateSlot() {}, - unregisterSlot: function unregisterSlot() {}, - registerFill: function registerFill() {}, - unregisterFill: function unregisterFill() {} -}); -/* harmony default export */ __webpack_exports__["a"] = (SlotFillContext); -//# sourceMappingURL=slot-fill-context.js.map -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64))) /***/ }), -/* 62 */ -/***/ (function(module, exports) { +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; +"use strict"; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } +var DESCRIPTORS = __webpack_require__(13); +var global = __webpack_require__(3); +var isForced = __webpack_require__(74); +var redefine = __webpack_require__(27); +var has = __webpack_require__(11); +var classof = __webpack_require__(30); +var inheritIfRequired = __webpack_require__(156); +var toPrimitive = __webpack_require__(40); +var fails = __webpack_require__(6); +var create = __webpack_require__(69); +var getOwnPropertyNames = __webpack_require__(56).f; +var getOwnPropertyDescriptor = __webpack_require__(33).f; +var defineProperty = __webpack_require__(17).f; +var trim = __webpack_require__(188).trim; + +var NUMBER = 'Number'; +var NativeNumber = global[NUMBER]; +var NumberPrototype = NativeNumber.prototype; + +// Opera ~12 has broken Object#toString +var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER; + +// `ToNumber` abstract operation +// https://tc39.es/ecma262/#sec-tonumber +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + var first, third, radix, maxCode, digits, length, index, code; + if (typeof it == 'string' && it.length > 2) { + it = trim(it); + first = it.charCodeAt(0); + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i + default: return +it; + } + digits = it.slice(2); + length = digits.length; + for (index = 0; index < length; index++) { + code = digits.charCodeAt(index); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; - return arr2; +// `Number` constructor +// https://tc39.es/ecma262/#sec-number-constructor +if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { + var NumberWrapper = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var dummy = this; + return dummy instanceof NumberWrapper + // check on 1..constructor(foo) case + && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER) + ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); + }; + for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES2015 (in case, if modules with ES2015 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' + + // ESNext + 'fromString,range' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) { + defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key)); + } + } + NumberWrapper.prototype = NumberPrototype; + NumberPrototype.constructor = NumberWrapper; + redefine(global, NUMBER, NumberWrapper); } -module.exports = _arrayLikeToArray; /***/ }), -/* 63 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { -var arrayLikeToArray = __webpack_require__(62); +var arrayLikeToArray = __webpack_require__(124); -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); } -module.exports = _unsupportedIterableToArray; +module.exports = _arrayWithoutHoles; /***/ }), -/* 64 */ +/* 180 */ /***/ (function(module, exports) { -// shim for using process in browser -var process = module.exports = {}; +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. +module.exports = _iterableToArray; -var cachedSetTimeout; -var cachedClearTimeout; +/***/ }), +/* 181 */ +/***/ (function(module, exports) { -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } +module.exports = _nonIterableSpread; +/***/ }), +/* 182 */ +/***/ (function(module, exports) { +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; } -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} +module.exports = _arrayWithHoles; -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; +/***/ }), +/* 183 */ +/***/ (function(module, exports) { - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; } -}; + } -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; + return _arr; } -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; -process.listeners = function (name) { return [] } +module.exports = _iterableToArrayLimit; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; +/***/ }), +/* 184 */ +/***/ (function(module, exports) { -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +module.exports = _nonIterableRest; /***/ }), -/* 65 */, -/* 66 */ +/* 185 */, +/* 186 */, +/* 187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var $ = __webpack_require__(12); +var isObject = __webpack_require__(10); +var isArray = __webpack_require__(84); +var toAbsoluteIndex = __webpack_require__(97); +var toLength = __webpack_require__(34); +var toIndexedObject = __webpack_require__(21); +var createProperty = __webpack_require__(102); +var wellKnownSymbol = __webpack_require__(8); +var arrayMethodHasSpeciesSupport = __webpack_require__(89); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); + +var SPECIES = wellKnownSymbol('species'); +var nativeSlice = [].slice; +var max = Math.max; + +// `Array.prototype.slice` method +// https://tc39.es/ecma262/#sec-array.prototype.slice +// fallback for not array-like ES3 strings and DOM objects +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + slice: function slice(start, end) { + var O = toIndexedObject(this); + var length = toLength(O.length); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject(Constructor)) { + Constructor = Constructor[SPECIES]; + if (Constructor === null) Constructor = undefined; + } + if (Constructor === Array || Constructor === undefined) { + return nativeSlice.call(O, k, fin); + } + } + result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); + result.length = n; + return result; + } +}); -/** - * Internal dependencies; - */ -var isShallowEqualObjects = __webpack_require__( 103 ); -var isShallowEqualArrays = __webpack_require__( 104 ); -var isArray = Array.isArray; +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * @typedef {Record} ComparableObject - */ +var requireObjectCoercible = __webpack_require__(32); +var whitespaces = __webpack_require__(189); -/** - * Returns true if the two arrays or objects are shallow equal, or false - * otherwise. - * - * @param {any[]|ComparableObject} a First object or array to compare. - * @param {any[]|ComparableObject} b Second object or array to compare. - * - * @return {boolean} Whether the two values are shallow equal. - */ -function isShallowEqual( a, b ) { - if ( a && b ) { - if ( a.constructor === Object && b.constructor === Object ) { - return isShallowEqualObjects( a, b ); - } else if ( isArray( a ) && isArray( b ) ) { - return isShallowEqualArrays( a, b ); - } - } +var whitespace = '[' + whitespaces + ']'; +var ltrim = RegExp('^' + whitespace + whitespace + '*'); +var rtrim = RegExp(whitespace + whitespace + '*$'); - return a === b; -} +// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation +var createMethod = function (TYPE) { + return function ($this) { + var string = String(requireObjectCoercible($this)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }; +}; -module.exports = isShallowEqual; -module.exports.isShallowEqualObjects = isShallowEqualObjects; -module.exports.isShallowEqualArrays = isShallowEqualArrays; +module.exports = { + // `String.prototype.{ trimLeft, trimStart }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimstart + start: createMethod(1), + // `String.prototype.{ trimRight, trimEnd }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimend + end: createMethod(2), + // `String.prototype.trim` method + // https://tc39.es/ecma262/#sec-string.prototype.trim + trim: createMethod(3) +}; /***/ }), -/* 67 */, -/* 68 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 189 */ +/***/ (function(module, exports) { -"use strict"; -/* unused harmony export Button */ -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47); -/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(133); -/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(114); +// a string of all valid unicode whitespaces +module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; +/***/ }), +/* 190 */, +/* 191 */, +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } +var $ = __webpack_require__(12); +var $find = __webpack_require__(75).find; +var addToUnscopables = __webpack_require__(118); -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +var FIND = 'find'; +var SKIPS_HOLES = true; -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } +// Shouldn't skip holes +if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); -/** - * External dependencies - */ +// `Array.prototype.find` method +// https://tc39.es/ecma262/#sec-array.prototype.find +$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables(FIND); -/** - * WordPress dependencies - */ +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { +var global = __webpack_require__(3); -/** - * Internal dependencies - */ +module.exports = global.Promise; +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { -var disabledEventsOnDisabledButton = ['onMouseDown', 'onClick']; -function Button(props, ref) { - var href = props.href, - target = props.target, - isPrimary = props.isPrimary, - isSmall = props.isSmall, - isTertiary = props.isTertiary, - isPressed = props.isPressed, - isBusy = props.isBusy, - isDefault = props.isDefault, - isSecondary = props.isSecondary, - isLink = props.isLink, - isDestructive = props.isDestructive, - className = props.className, - disabled = props.disabled, - icon = props.icon, - iconSize = props.iconSize, - showTooltip = props.showTooltip, - tooltipPosition = props.tooltipPosition, - shortcut = props.shortcut, - label = props.label, - children = props.children, - isFocusable = props.__experimentalIsFocusable, - additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["href", "target", "isPrimary", "isSmall", "isTertiary", "isPressed", "isBusy", "isDefault", "isSecondary", "isLink", "isDestructive", "className", "disabled", "icon", "iconSize", "showTooltip", "tooltipPosition", "shortcut", "label", "children", "__experimentalIsFocusable"]); +var global = __webpack_require__(3); +var getOwnPropertyDescriptor = __webpack_require__(33).f; +var macrotask = __webpack_require__(157).set; +var IS_IOS = __webpack_require__(158); +var IS_WEBOS_WEBKIT = __webpack_require__(195); +var IS_NODE = __webpack_require__(77); + +var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; +var document = global.document; +var process = global.process; +var Promise = global.Promise; +// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` +var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask'); +var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; + +var flush, head, last, notify, toggle, node, promise, then; + +// modern engines have queueMicrotask method +if (!queueMicrotask) { + flush = function () { + var parent, fn; + if (IS_NODE && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (error) { + if (head) notify(); + else last = undefined; + throw error; + } + } last = undefined; + if (parent) parent.enter(); + }; - if (isDefault) { - Object(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])('Button isDefault prop', { - alternative: 'isSecondary' - }); + // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 + // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 + if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { + toggle = true; + node = document.createTextNode(''); + new MutationObserver(flush).observe(node, { characterData: true }); + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + promise = Promise.resolve(undefined); + then = promise.then; + notify = function () { + then.call(promise, flush); + }; + // Node.js without promises + } else if (IS_NODE) { + notify = function () { + process.nextTick(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; } +} - var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button', className, { - 'is-secondary': isDefault || isSecondary, - 'is-primary': isPrimary, - 'is-small': isSmall, - 'is-tertiary': isTertiary, - 'is-pressed': isPressed, - 'is-busy': isBusy, - 'is-link': isLink, - 'is-destructive': isDestructive, - 'has-text': !!icon && !!children, - 'has-icon': !!icon - }); - var trulyDisabled = disabled && !isFocusable; - var Tag = href !== undefined && !trulyDisabled ? 'a' : 'button'; - var tagProps = Tag === 'a' ? { - href: href, - target: target - } : { - type: 'button', - disabled: trulyDisabled, - 'aria-pressed': isPressed - }; +module.exports = queueMicrotask || function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; +}; - if (disabled && isFocusable) { - // In this case, the button will be disabled, but still focusable and - // perceivable by screen reader users. - tagProps['aria-disabled'] = true; - var _iterator = _createForOfIteratorHelper(disabledEventsOnDisabledButton), - _step; +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var disabledEvent = _step.value; +var userAgent = __webpack_require__(87); - additionalProps[disabledEvent] = function (event) { - event.stopPropagation(); - event.preventDefault(); - }; - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } // Should show the tooltip if... +module.exports = /web0s(?!.*chrome)/i.test(userAgent); - var shouldShowTooltip = !trulyDisabled && ( // an explicit tooltip is passed or... - showTooltip && label || // there's a shortcut or... - shortcut || // there's a label and... - !!label && ( // the children are empty and... - !children || Object(lodash__WEBPACK_IMPORTED_MODULE_4__["isArray"])(children) && !children.length) && // the tooltip is not explicitly disabled. - false !== showTooltip); - var element = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, tagProps, additionalProps, { - className: classes, - "aria-label": additionalProps['aria-label'] || label, - ref: ref - }), icon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_icon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { - icon: icon, - size: iconSize - }), children); - - if (!shouldShowTooltip) { - return element; - } - - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { - text: label, - shortcut: shortcut, - position: tooltipPosition - }, element); -} -/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["forwardRef"])(Button)); -//# sourceMappingURL=index.js.map - /***/ }), -/* 69 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ build_module_focus; }); +var anObject = __webpack_require__(9); +var isObject = __webpack_require__(10); +var newPromiseCapability = __webpack_require__(159); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; -// UNUSED EXPORTS: isHorizontalEdge, isVerticalEdge, getRectangleFromRange, computeCaretRect, placeCaretAtHorizontalEdge, placeCaretAtVerticalEdge, isTextField, isNumberInput, documentHasTextSelection, documentHasUncollapsedSelection, documentHasSelection, isEntirelySelected, getScrollContainer, getOffsetParent, replace, remove, insertAfter, unwrap, replaceTag, wrap, __unstableStripHTML, isEmpty, removeInvalidHTML, getPhrasingContentSchema, isPhrasingContent, isTextContent -// NAMESPACE OBJECT: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/focusable.js -var focusable_namespaceObject = {}; -__webpack_require__.r(focusable_namespaceObject); -__webpack_require__.d(focusable_namespaceObject, "find", function() { return find; }); +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { -// NAMESPACE OBJECT: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/tabbable.js -var tabbable_namespaceObject = {}; -__webpack_require__.r(tabbable_namespaceObject); -__webpack_require__.d(tabbable_namespaceObject, "isTabbableIndex", function() { return isTabbableIndex; }); -__webpack_require__.d(tabbable_namespaceObject, "find", function() { return tabbable_find; }); -__webpack_require__.d(tabbable_namespaceObject, "findPrevious", function() { return findPrevious; }); -__webpack_require__.d(tabbable_namespaceObject, "findNext", function() { return findNext; }); +var global = __webpack_require__(3); -// CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/focusable.js -/** - * References: - * - * Focusable: - * - https://www.w3.org/TR/html5/editing.html#focus-management - * - * Sequential focus navigation: - * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute - * - * Disabled elements: - * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements - * - * getClientRects algorithm (requiring layout box): - * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface - * - * AREA elements associated with an IMG: - * - https://w3c.github.io/html/editing.html#data-model - */ -var SELECTOR = ['[tabindex]', 'a[href]', 'button:not([disabled])', 'input:not([type="hidden"]):not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'iframe', 'object', 'embed', 'area[href]', '[contenteditable]:not([contenteditable=false])'].join(','); -/** - * Returns true if the specified element is visible (i.e. neither display: none - * nor visibility: hidden). - * - * @param {Element} element DOM element to test. - * - * @return {boolean} Whether element is visible. - */ +module.exports = function (a, b) { + var console = global.console; + if (console && console.error) { + arguments.length === 1 ? console.error(a) : console.error(a, b); + } +}; -function isVisible(element) { - return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0; -} -/** - * Returns true if the specified element should be skipped from focusable elements. - * For now it rather specific for `iframes` and if tabindex attribute is set to -1. - * - * @param {Element} element DOM element to test. - * - * @return {boolean} Whether element should be skipped from focusable elements. - */ +/***/ }), +/* 198 */ +/***/ (function(module, exports) { -function skipFocus(element) { - return element.nodeName.toLowerCase() === 'iframe' && element.getAttribute('tabindex') === '-1'; -} -/** - * Returns true if the specified area element is a valid focusable element, or - * false otherwise. Area is only focusable if within a map where a named map - * referenced by an image somewhere in the document. - * - * @param {Element} element DOM area element to test. - * - * @return {boolean} Whether area element is valid for focus. - */ +module.exports = function (exec) { + try { + return { error: false, value: exec() }; + } catch (error) { + return { error: true, value: error }; + } +}; -function isValidFocusableArea(element) { - var map = element.closest('map[name]'); +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { - if (!map) { - return false; - } +"use strict"; - var img = element.ownerDocument.querySelector('img[usemap="#' + map.name + '"]'); - return !!img && isVisible(img); -} -/** - * Returns all focusable elements within a given context. - * - * @param {Element} context Element in which to search. - * - * @return {Element[]} Focusable elements. - */ +var IteratorPrototype = __webpack_require__(173).IteratorPrototype; +var create = __webpack_require__(69); +var createPropertyDescriptor = __webpack_require__(39); +var setToStringTag = __webpack_require__(90); +var Iterators = __webpack_require__(110); +var returnThis = function () { return this; }; -function find(context) { - var elements = context.querySelectorAll(SELECTOR); - return Array.from(elements).filter(function (element) { - if (!isVisible(element) || skipFocus(element)) { - return false; - } +module.exports = function (IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); + Iterators[TO_STRING_TAG] = returnThis; + return IteratorConstructor; +}; - var nodeName = element.nodeName; - if ('AREA' === nodeName) { - return isValidFocusableArea(element); - } +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { - return true; - }); -} -//# sourceMappingURL=focusable.js.map -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); +"use strict"; -// CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/tabbable.js -/** - * External dependencies - */ -/** - * Internal dependencies - */ +var formats = __webpack_require__(169); +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; -/** - * Returns the tab index of the given element. In contrast with the tabIndex - * property, this normalizes the default (0) to avoid browser inconsistencies, - * operating under the assumption that this function is only ever called with a - * focusable node. - * - * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261 - * - * @param {Element} element Element from which to retrieve. - * - * @return {?number} Tab index of element (default 0). - */ +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } -function getTabIndex(element) { - var tabIndex = element.getAttribute('tabindex'); - return tabIndex === null ? 0 : parseInt(tabIndex, 10); -} -/** - * Returns true if the specified element is tabbable, or false otherwise. - * - * @param {Element} element Element to test. - * - * @return {boolean} Whether element is tabbable. - */ + return array; +}()); +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; -function isTabbableIndex(element) { - return getTabIndex(element) !== -1; -} -/** - * Returns a stateful reducer function which constructs a filtered array of - * tabbable elements, where at most one radio input is selected for a given - * name, giving priority to checked input, falling back to the first - * encountered. - * - * @return {Function} Radio group collapse reducer. - */ + if (isArray(obj)) { + var compacted = []; -function createStatefulCollapseRadioGroup() { - var CHOSEN_RADIO_BY_NAME = {}; - return function collapseRadioGroup(result, element) { - var nodeName = element.nodeName, - type = element.type, - checked = element.checked, - name = element.name; // For all non-radio tabbables, construct to array by concatenating. + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } - if (nodeName !== 'INPUT' || type !== 'radio' || !name) { - return result.concat(element); + item.obj[item.prop] = compacted; + } } +}; - var hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty(name); // Omit by skipping concatenation if the radio element is not chosen. +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } - var isChosen = checked || !hasChosen; + return obj; +}; - if (!isChosen) { - return result; - } // At this point, if there had been a chosen element, the current - // element is checked and should take priority. Retroactively remove - // the element which had previously been considered the chosen one. +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } - if (hasChosen) { - var hadChosenElement = CHOSEN_RADIO_BY_NAME[name]; - result = Object(external_lodash_["without"])(result, hadChosenElement); + return target; } - CHOSEN_RADIO_BY_NAME[name] = element; - return result.concat(element); - }; -} -/** - * An array map callback, returning an object with the element value and its - * array index location as properties. This is used to emulate a proper stable - * sort where equal tabIndex should be left in order of their occurrence in the - * document. - * - * @param {Element} element Element. - * @param {number} index Array index of element. - * - * @return {Object} Mapped object with element, index. - */ + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } -function mapElementToObjectTabbable(element, index) { - return { - element: element, - index: index - }; -} -/** - * An array map callback, returning an element of the given mapped object's - * element value. - * - * @param {Object} object Mapped object with index. - * - * @return {Element} Mapped object element. - */ + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; -function mapObjectTabbableToElement(object) { - return object.element; -} -/** - * A sort comparator function used in comparing two objects of mapped elements. - * - * @see mapElementToObjectTabbable - * - * @param {Object} a First object to compare. - * @param {Object} b Second object to compare. - * - * @return {number} Comparator result. - */ + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; -function compareObjectTabbables(a, b) { - var aTabIndex = getTabIndex(a.element); - var bTabIndex = getTabIndex(b.element); +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; - if (aTabIndex === bTabIndex) { - return a.index - b.index; - } +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } - return aTabIndex - bTabIndex; -} -/** - * Givin focusable elements, filters out tabbable element. - * - * @param {Array} focusables Focusable elements to filter. - * - * @return {Array} Tabbable elements. - */ + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } -function filterTabbable(focusables) { - return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []); -} + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); -function tabbable_find(context) { - return filterTabbable(find(context)); -} -/** - * Given a focusable element, find the preceding tabbable element. - * - * @param {Element} element The focusable element before which to look. Defaults - * to the active element. - */ + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; + } -function findPrevious(element) { - var focusables = find(element.ownerDocument.body); - var index = focusables.indexOf(element); // Remove all focusables after and including `element`. + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } - focusables.length = index; - return Object(external_lodash_["last"])(filterTabbable(focusables)); -} -/** - * Given a focusable element, find the next tabbable element. - * - * @param {Element} element The focusable element after which to look. Defaults - * to the active element. - */ - -function findNext(element) { - var focusables = find(element.ownerDocument.body); - var index = focusables.indexOf(element); // Remove all focusables before and inside `element`. - - var remaining = focusables.slice(index + 1).filter(function (node) { - return !element.contains(node); - }); - return Object(external_lodash_["first"])(filterTabbable(remaining)); -} -//# sourceMappingURL=tabbable.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/index.js -/** - * Internal dependencies - */ + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } -/** - * Object grouping `focusable` and `tabbable` utils - * under the keys with the same name. - */ + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } -var build_module_focus = { - focusable: focusable_namespaceObject, - tabbable: tabbable_namespaceObject + return out; }; +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; -//# sourceMappingURL=index.js.map - -/***/ }), -/* 70 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export getPhrasingContentSchema */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPhrasingContent; }); -/* unused harmony export isTextContent */ -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } -/** - * External dependencies - */ + compactQueue(queue); -/** - * All phrasing content elements. - * - * @see https://www.w3.org/TR/2011/WD-html5-20110525/content-models.html#phrasing-content-0 - */ + return value; +}; -/** - * All text-level semantic elements. - * - * @see https://html.spec.whatwg.org/multipage/text-level-semantics.html - */ +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; -var textContentSchema = { - strong: {}, - em: {}, - s: {}, - del: {}, - ins: {}, - a: { - attributes: ['href', 'target', 'rel'] - }, - code: {}, - abbr: { - attributes: ['title'] - }, - sub: {}, - sup: {}, - br: {}, - small: {}, - // To do: fix blockquote. - // cite: {}, - q: { - attributes: ['cite'] - }, - dfn: { - attributes: ['title'] - }, - data: { - attributes: ['value'] - }, - time: { - attributes: ['datetime'] - }, - var: {}, - samp: {}, - kbd: {}, - i: {}, - b: {}, - u: {}, - mark: {}, - ruby: {}, - rt: {}, - rp: {}, - bdi: { - attributes: ['dir'] - }, - bdo: { - attributes: ['dir'] - }, - wbr: {}, - '#text': {} -}; // Recursion is needed. -// Possible: strong > em > strong. -// Impossible: strong > strong. - -Object(lodash__WEBPACK_IMPORTED_MODULE_1__["without"])(Object.keys(textContentSchema), '#text', 'br').forEach(function (tag) { - textContentSchema[tag].children = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["omit"])(textContentSchema, tag); -}); -/** - * Embedded content elements. - * - * @see https://www.w3.org/TR/2011/WD-html5-20110525/content-models.html#embedded-content-0 - */ +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } -var embeddedContentSchema = { - audio: { - attributes: ['src', 'preload', 'autoplay', 'mediagroup', 'loop', 'muted'] - }, - canvas: { - attributes: ['width', 'height'] - }, - embed: { - attributes: ['src', 'type', 'width', 'height'] - }, - img: { - attributes: ['alt', 'src', 'srcset', 'usemap', 'ismap', 'width', 'height'] - }, - object: { - attributes: ['data', 'type', 'name', 'usemap', 'form', 'width', 'height'] - }, - video: { - attributes: ['src', 'poster', 'preload', 'autoplay', 'mediagroup', 'loop', 'muted', 'controls', 'width', 'height'] - } + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; -/** - * Phrasing content elements. - * - * @see https://www.w3.org/TR/2011/WD-html5-20110525/content-models.html#phrasing-content-0 - */ - -var phrasingContentSchema = _objectSpread(_objectSpread({}, textContentSchema), embeddedContentSchema); -/** - * Get schema of possible paths for phrasing content. - * - * @see https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content - * - * @param {string} context Set to "paste" to exclude invisible elements and - * sensitive data. - * - * @return {Object} Schema. - */ +var combine = function combine(a, b) { + return [].concat(a, b); +}; -function getPhrasingContentSchema(context) { - if (context !== 'paste') { - return phrasingContentSchema; - } +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; - return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["omit"])(_objectSpread(_objectSpread({}, phrasingContentSchema), {}, { - // We shouldn't paste potentially sensitive information which is not - // visible to the user when pasted, so strip the attributes. - ins: { - children: phrasingContentSchema.ins.children - }, - del: { - children: phrasingContentSchema.del.children - } - }), ['u', // Used to mark misspelling. Shouldn't be pasted. - 'abbr', // Invisible. - 'data', // Invisible. - 'time', // Invisible. - 'wbr', // Invisible. - 'bdi', // Invisible. - 'bdo' // Invisible. - ]); -} -/** - * Find out whether or not the given node is phrasing content. - * - * @see https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content - * - * @param {Element} node The node to test. - * - * @return {boolean} True if phrasing content, false if not. - */ +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; -function isPhrasingContent(node) { - var tag = node.nodeName.toLowerCase(); - return getPhrasingContentSchema().hasOwnProperty(tag) || tag === 'span'; -} -function isTextContent(node) { - var tag = node.nodeName.toLowerCase(); - return textContentSchema.hasOwnProperty(tag) || tag === 'span'; -} -//# sourceMappingURL=phrasing-content.js.map /***/ }), -/* 71 */ +/* 201 */, +/* 202 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSlot; }); -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _slot_fill_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61); - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -/** - * WordPress dependencies - */ +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createBrowserHistory; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createMemoryHistory; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ createLocation; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ locationsAreEqual; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ createPath; }); -/** - * Internal dependencies - */ +// UNUSED EXPORTS: createHashHistory, parsePath +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(117); -function useSlot(name) { - var registry = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useContext"])(_slot_fill_context__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]); - var slot = registry.slots[name] || {}; - var slotFills = registry.fills[name]; - var fills = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(function () { - return slotFills || []; - }, [slotFills]); - var updateSlot = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(function (fillProps) { - registry.updateSlot(name, fillProps); - }, [name, registry.updateSlot]); - var unregisterSlot = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(function (slotRef) { - registry.unregisterSlot(name, slotRef); - }, [name, registry.unregisterSlot]); - var registerFill = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(function (fillRef) { - registry.registerFill(name, fillRef); - }, [name, registry.registerFill]); - var unregisterFill = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(function (fillRef) { - registry.unregisterFill(name, fillRef); - }, [name, registry.unregisterFill]); - return _objectSpread(_objectSpread({}, slot), {}, { - updateSlot: updateSlot, - unregisterSlot: unregisterSlot, - fills: fills, - registerFill: registerFill, - unregisterFill: unregisterFill - }); +// CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js +function isAbsolute(pathname) { + return pathname.charAt(0) === '/'; } -//# sourceMappingURL=use-slot.js.map -/***/ }), -/* 72 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// About 1.5x faster than the two-arg version of Array#splice() +function spliceOne(list, index) { + for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { + list[i] = list[k]; + } -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return warning; }); -function isDev() { - return typeof process !== 'undefined' && process.env && "production" !== 'production'; + list.pop(); } -/** - * Shows a warning with `message` if environment is not `production`. - * - * @param {string} message Message to show in the warning. - * - * @example - * ```js - * import warning from '@wordpress/warning'; - * - * function MyComponent( props ) { - * if ( ! props.title ) { - * warning( '`props.title` was not passed' ); - * } - * ... - * } - * ``` - */ +// This implementation is based heavily on node's url.parse +function resolvePathname(to, from) { + if (from === undefined) from = ''; -function warning(message) { - if (!isDev()) { - return; - } // eslint-disable-next-line no-console - + var toParts = (to && to.split('/')) || []; + var fromParts = (from && from.split('/')) || []; - console.warn(message); // Throwing an error and catching it immediately to improve debugging - // A consumer can use 'pause on caught exceptions' - // https://github.com/facebook/react/issues/4216 + var isToAbs = to && isAbsolute(to); + var isFromAbs = from && isAbsolute(from); + var mustEndAbs = isToAbs || isFromAbs; - try { - throw Error(message); - } catch (x) {// do nothing + if (to && isAbsolute(to)) { + // to is absolute + fromParts = toParts; + } else if (toParts.length) { + // to is relative, drop the filename + fromParts.pop(); + fromParts = fromParts.concat(toParts); } -} -//# sourceMappingURL=index.js.map -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64))) -/***/ }), -/* 73 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!fromParts.length) return '/'; -"use strict"; -function memoize(fn) { - var cache = {}; - return function (arg) { - if (cache[arg] === undefined) cache[arg] = fn(arg); - return cache[arg]; - }; -} + var hasTrailingSlash; + if (fromParts.length) { + var last = fromParts[fromParts.length - 1]; + hasTrailingSlash = last === '.' || last === '..' || last === ''; + } else { + hasTrailingSlash = false; + } -/* harmony default export */ __webpack_exports__["a"] = (memoize); + var up = 0; + for (var i = fromParts.length; i >= 0; i--) { + var part = fromParts[i]; + if (part === '.') { + spliceOne(fromParts, i); + } else if (part === '..') { + spliceOne(fromParts, i); + up++; + } else if (up) { + spliceOne(fromParts, i); + up--; + } + } -/***/ }), -/* 74 */ -/***/ (function(module, exports) { + if (!mustEndAbs) for (; up--; up) fromParts.unshift('..'); -(function() { module.exports = this["wc"]["components"]; }()); + if ( + mustEndAbs && + fromParts[0] !== '' && + (!fromParts[0] || !isAbsolute(fromParts[0])) + ) + fromParts.unshift(''); -/***/ }), -/* 75 */ -/***/ (function(module, exports) { + var result = fromParts.join('/'); -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } + if (hasTrailingSlash && result.substr(-1) !== '/') result += '/'; - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } + return result; } -function _asyncToGenerator(fn) { - return function () { - var self = this, - args = arguments; - return new Promise(function (resolve, reject) { - var gen = fn.apply(self, args); - - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } +/* harmony default export */ var resolve_pathname = (resolvePathname); - _next(undefined); - }); - }; +// CONCATENATED MODULE: ./node_modules/value-equal/esm/value-equal.js +function value_equal_valueOf(obj) { + return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj); } -module.exports = _asyncToGenerator; +function valueEqual(a, b) { + // Test for strict equality first. + if (a === b) return true; -/***/ }), -/* 76 */ -/***/ (function(module, exports) { + // Otherwise, if either of them == null they are not equal. + if (a == null || b == null) return false; -(function() { module.exports = this["wp"]["htmlEntities"]; }()); + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function(item, index) { + return valueEqual(item, b[index]); + }) + ); + } -/***/ }), -/* 77 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (typeof a === 'object' || typeof b === 'object') { + var aValue = value_equal_valueOf(a); + var bValue = value_equal_valueOf(b); -"use strict"; -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/** - * External dependencies - */ + if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue); -/** - * Given a function mapping a component to an enhanced component and modifier - * name, returns the enhanced component augmented with a generated displayName. - * - * @param {Function} mapComponentToEnhancedComponent Function mapping component - * to enhanced component. - * @param {string} modifierName Seed name from which to - * generated display name. - * - * @return {WPComponent} Component class with generated display name assigned. - */ + return Object.keys(Object.assign({}, a, b)).every(function(key) { + return valueEqual(a[key], b[key]); + }); + } -function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) { - return function (OriginalComponent) { - var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent); - var _OriginalComponent$di = OriginalComponent.displayName, - displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di; - EnhancedComponent.displayName = "".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["upperFirst"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["camelCase"])(modifierName)), "(").concat(displayName, ")"); - return EnhancedComponent; - }; + return false; } -/* harmony default export */ __webpack_exports__["a"] = (createHigherOrderComponent); -//# sourceMappingURL=index.js.map +/* harmony default export */ var value_equal = (valueEqual); -/***/ }), -/* 78 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js +var tiny_invariant_esm = __webpack_require__(176); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Circle; }); -/* unused harmony export G */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Path; }); -/* unused harmony export Polygon */ -/* unused harmony export Rect */ -/* unused harmony export Defs */ -/* unused harmony export RadialGradient */ -/* unused harmony export LinearGradient */ -/* unused harmony export Stop */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SVG; }); -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); +// CONCATENATED MODULE: ./node_modules/history/esm/history.js -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -/** - * External dependencies - */ -/** - * WordPress dependencies - */ +function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +} +function stripLeadingSlash(path) { + return path.charAt(0) === '/' ? path.substr(1) : path; +} +function hasBasename(path, prefix) { + return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1; +} +function stripBasename(path, prefix) { + return hasBasename(path, prefix) ? path.substr(prefix.length) : path; +} +function stripTrailingSlash(path) { + return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; +} +function parsePath(path) { + var pathname = path || '/'; + var search = ''; + var hash = ''; + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substr(hashIndex); + pathname = pathname.substr(0, hashIndex); + } -/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */ + var searchIndex = pathname.indexOf('?'); -/** - * @param {import('react').ComponentPropsWithoutRef<'circle'>} props - * - * @return {JSX.Element} Circle component - */ + if (searchIndex !== -1) { + search = pathname.substr(searchIndex); + pathname = pathname.substr(0, searchIndex); + } -var Circle = function Circle(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('circle', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'g'>} props - * - * @return {JSX.Element} G component - */ + return { + pathname: pathname, + search: search === '?' ? '' : search, + hash: hash === '#' ? '' : hash + }; +} +function createPath(location) { + var pathname = location.pathname, + search = location.search, + hash = location.hash; + var path = pathname || '/'; + if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search; + if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash; + return path; +} -var G = function G(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('g', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'path'>} props - * - * @return {JSX.Element} Path component - */ +function createLocation(path, state, key, currentLocation) { + var location; -var Path = function Path(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('path', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props - * - * @return {JSX.Element} Polygon component - */ + if (typeof path === 'string') { + // Two-arg form: push(path, state) + location = parsePath(path); + location.state = state; + } else { + // One-arg form: push(location) + location = Object(esm_extends["a" /* default */])({}, path); + if (location.pathname === undefined) location.pathname = ''; -var Polygon = function Polygon(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('polygon', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'rect'>} props - * - * @return {JSX.Element} Rect component - */ + if (location.search) { + if (location.search.charAt(0) !== '?') location.search = '?' + location.search; + } else { + location.search = ''; + } -var Rect = function Rect(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('rect', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'defs'>} props - * - * @return {JSX.Element} Defs component - */ + if (location.hash) { + if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; + } else { + location.hash = ''; + } -var Defs = function Defs(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('defs', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props - * - * @return {JSX.Element} RadialGradient component - */ + if (state !== undefined && location.state === undefined) location.state = state; + } -var RadialGradient = function RadialGradient(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('radialGradient', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props - * - * @return {JSX.Element} LinearGradient component - */ + try { + location.pathname = decodeURI(location.pathname); + } catch (e) { + if (e instanceof URIError) { + throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); + } else { + throw e; + } + } -var LinearGradient = function LinearGradient(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('linearGradient', props); -}; -/** - * @param {import('react').ComponentPropsWithoutRef<'stop'>} props - * - * @return {JSX.Element} Stop component - */ + if (key) location.key = key; -var Stop = function Stop(props) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('stop', props); -}; -/** - * - * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed. - * Other props will be passed through to svg component. - * - * @return {JSX.Element} Stop component - */ + if (currentLocation) { + // Resolve incomplete/relative pathname relative to current location. + if (!location.pathname) { + location.pathname = currentLocation.pathname; + } else if (location.pathname.charAt(0) !== '/') { + location.pathname = resolve_pathname(location.pathname, currentLocation.pathname); + } + } else { + // When there is no prior location and pathname is empty, set it to / + if (!location.pathname) { + location.pathname = '/'; + } + } -var SVG = function SVG(_ref) { - var className = _ref.className, - isPressed = _ref.isPressed, - props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["className", "isPressed"]); + return location; +} +function locationsAreEqual(a, b) { + return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state); +} - var appliedProps = _objectSpread(_objectSpread({}, props), {}, { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, { - 'is-pressed': isPressed - }) || undefined, - role: 'img', - 'aria-hidden': true, - focusable: false - }); // Disable reason: We need to have a way to render HTML tag for web. - // eslint-disable-next-line react/forbid-elements +function createTransitionManager() { + var prompt = null; + function setPrompt(nextPrompt) { + false ? undefined : void 0; + prompt = nextPrompt; + return function () { + if (prompt === nextPrompt) prompt = null; + }; + } - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])("svg", appliedProps); -}; -//# sourceMappingURL=index.js.map + function confirmTransitionTo(location, action, getUserConfirmation, callback) { + // TODO: If another transition starts while we're still confirming + // the previous one, we may end up in a weird state. Figure out the + // best way to handle this. + if (prompt != null) { + var result = typeof prompt === 'function' ? prompt(location, action) : prompt; -/***/ }), -/* 79 */, -/* 80 */, -/* 81 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (typeof result === 'string') { + if (typeof getUserConfirmation === 'function') { + getUserConfirmation(result, callback); + } else { + false ? undefined : void 0; + callback(true); + } + } else { + // Return false from a transition hook to cancel the transition. + callback(result !== false); + } + } else { + callback(true); + } + } -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return domReady; }); -/** - * @typedef {() => void} Callback - * - * TODO: Remove this typedef and inline `() => void` type. - * - * This typedef is used so that a descriptive type is provided in our - * automatically generated documentation. - * - * An in-line type `() => void` would be preferable, but the generated - * documentation is `null` in that case. - * - * @see https://github.com/WordPress/gutenberg/issues/18045 - */ + var listeners = []; -/** - * Specify a function to execute when the DOM is fully loaded. - * - * @param {Callback} callback A function to execute after the DOM is ready. - * - * @example - * ```js - * import domReady from '@wordpress/dom-ready'; - * - * domReady( function() { - * //do something after DOM loads. - * } ); - * ``` - * - * @return {void} - */ -function domReady(callback) { - if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly. - document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly. - ) { - return void callback(); - } // DOMContentLoaded has not fired yet, delay callback until then. - - - document.addEventListener('DOMContentLoaded', callback); -} -//# sourceMappingURL=index.js.map - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var stringify = __webpack_require__(136); -var parse = __webpack_require__(137); -var formats = __webpack_require__(99); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), -/* 83 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ get_get; }); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js -var getPrototypeOf = __webpack_require__(9); + function appendListener(fn) { + var isActive = true; -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/superPropBase.js + function listener() { + if (isActive) fn.apply(void 0, arguments); + } -function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = Object(getPrototypeOf["a" /* default */])(object); - if (object === null) break; + listeners.push(listener); + return function () { + isActive = false; + listeners = listeners.filter(function (item) { + return item !== listener; + }); + }; } - return object; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/get.js - -function get_get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - get_get = Reflect.get; - } else { - get_get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } + function notifyListeners() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - return desc.value; - }; + listeners.forEach(function (listener) { + return listener.apply(void 0, args); + }); } - return get_get(target, property, receiver || target); + return { + setPrompt: setPrompt, + confirmTransitionTo: confirmTransitionTo, + appendListener: appendListener, + notifyListeners: notifyListeners + }; } -/***/ }), -/* 84 */, -/* 85 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMediaQuery; }); -/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); - - +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +function getConfirmation(message, callback) { + callback(window.confirm(message)); // eslint-disable-line no-alert +} /** - * WordPress dependencies + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 */ +function supportsHistory() { + var ua = window.navigator.userAgent; + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; + return window.history && 'pushState' in window.history; +} /** - * Runs a media query and returns its value when it changes. - * - * @param {string} [query] Media Query. - * @return {boolean} return value of the media query. + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. */ -function useMediaQuery(query) { - var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(query && window.matchMedia(query).matches), - _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2), - match = _useState2[0], - setMatch = _useState2[1]; - - Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { - if (!query) { - return; - } - - var updateMatch = function updateMatch() { - return setMatch(window.matchMedia(query).matches); - }; - - updateMatch(); - var list = window.matchMedia(query); - list.addListener(updateMatch); - return function () { - list.removeListener(updateMatch); - }; - }, [query]); - return query && match; +function supportsPopStateOnHashChange() { + return window.navigator.userAgent.indexOf('Trident') === -1; } -//# sourceMappingURL=index.js.map - -/***/ }), -/* 86 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export BASE */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return G2; }); -/* unused harmony export DARK_GRAY */ -/* unused harmony export DARK_OPACITY */ -/* unused harmony export DARK_OPACITY_LIGHT */ -/* unused harmony export LIGHT_GRAY */ -/* unused harmony export LIGHT_OPACITY_LIGHT */ -/* unused harmony export BLUE */ -/* unused harmony export ALERT */ -/* unused harmony export ADMIN */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return UI; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return COLORS; }); -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30); - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - /** - * External dependencies + * Returns false if using go(n) with hash history causes a full page reload. */ +function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; +} /** - * Internal dependencies + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. */ +function isExtraneousPopstateEvent(event) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; +} + +var PopStateEvent = 'popstate'; +var HashChangeEvent = 'hashchange'; -var BASE = { - black: '#000', - white: '#fff' -}; +function getHistoryState() { + try { + return window.history.state || {}; + } catch (e) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + return {}; + } +} /** - * TODO: Continue to update values as "G2" design evolves. - * - * "G2" refers to the movement to advance the interface of the block editor. - * https://github.com/WordPress/gutenberg/issues/18667 + * Creates a history object that uses the HTML5 history API including + * pushState, replaceState, and the popstate event. */ -var G2 = { - blue: { - medium: { - focus: '#007cba', - focusDark: '#fff' - } - }, - gray: { - 900: '#1e1e1e', - 700: '#757575', - // Meets 4.6:1 text contrast against white. - 600: '#949494', - // Meets 3:1 UI or large text contrast against white. - 400: '#ccc', - 200: '#ddd', - // Used for most borders. - 100: '#f0f0f0' - }, - darkGray: { - primary: '#1e1e1e' - }, - mediumGray: { - text: '#757575' - }, - lightGray: { - ui: '#949494', - secondary: '#ccc', - tertiary: '#e7e8e9' - } -}; -var DARK_GRAY = { - 900: '#191e23', - 800: '#23282d', - 700: '#32373c', - 600: '#40464d', - 500: '#555d66', - // Use this most of the time for dark items. - 400: '#606a73', - 300: '#6c7781', - // Lightest gray that can be used for AA text contrast. - 200: '#7e8993', - 150: '#8d96a0', - // Lightest gray that can be used for AA non-text contrast. - 100: '#8f98a1' -}; -var DARK_OPACITY = { - 900: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#000510', 0.9), - 800: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#00000a', 0.85), - 700: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#06060b', 0.8), - 600: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#000913', 0.75), - 500: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#0a1829', 0.7), - 400: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#0a1829', 0.65), - 300: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#0e1c2e', 0.62), - 200: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#162435', 0.55), - 100: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#223443', 0.5), - backgroundFill: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(DARK_GRAY[700], 0.7) -}; -var DARK_OPACITY_LIGHT = { - 900: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#304455', 0.45), - 800: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#425863', 0.4), - 700: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#667886', 0.35), - 600: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#7b86a2', 0.3), - 500: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#9197a2', 0.25), - 400: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#95959c', 0.2), - 300: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#829493', 0.15), - 200: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#8b8b96', 0.1), - 100: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])('#747474', 0.05) -}; -var LIGHT_GRAY = { - 900: '#a2aab2', - 800: '#b5bcc2', - 700: '#ccd0d4', - 600: '#d7dade', - 500: '#e2e4e7', - // Good for "grayed" items and borders. - 400: '#e8eaeb', - // Good for "readonly" input fields and special text selection. - 300: '#edeff0', - 200: '#f3f4f5', - 100: '#f8f9f9' -}; -var LIGHT_OPACITY_LIGHT = { - 900: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.5), - 800: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.45), - 700: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.4), - 600: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.35), - 500: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.3), - 400: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.25), - 300: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.2), - 200: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.15), - 100: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(BASE.white, 0.1), - backgroundFill: Object(_colors__WEBPACK_IMPORTED_MODULE_2__[/* rgba */ "b"])(LIGHT_GRAY[300], 0.8) -}; // Additional colors. -// Some are from https://make.wordpress.org/design/handbook/foundations/colors/. - -var BLUE = { - wordpress: { - 700: '#00669b' - }, - dark: { - 900: '#0071a1' - }, - medium: { - 900: '#006589', - 800: '#00739c', - 700: '#007fac', - 600: '#008dbe', - 500: '#00a0d2', - 400: '#33b3db', - 300: '#66c6e4', - 200: '#bfe7f3', - 100: '#e5f5fa', - highlight: '#b3e7fe', - focus: '#007cba' - } -}; -var ALERT = { - yellow: '#f0b849', - red: '#d94f4f', - green: '#4ab866' -}; -var ADMIN = { - theme: "var( --wp-admin-theme-color, ".concat(BLUE.wordpress[700], ")"), - themeDark10: "var( --wp-admin-theme-color-darker-10, ".concat(BLUE.medium.focus, ")") -}; // Namespaced values for raw colors hex codes - -var UI = { - theme: ADMIN.theme, - background: BASE.white, - backgroundDisabled: LIGHT_GRAY[200], - border: G2.gray[700], - borderFocus: ADMIN.themeDark10, - borderDisabled: G2.gray[400], - borderLight: G2.gray[200], - label: DARK_GRAY[500], - textDisabled: DARK_GRAY[150], - textDark: BASE.white, - textLight: BASE.black -}; -var COLORS = _objectSpread(_objectSpread({}, BASE), {}, { - darkGray: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["merge"])({}, DARK_GRAY, G2.darkGray), - darkOpacity: DARK_OPACITY, - darkOpacityLight: DARK_OPACITY_LIGHT, - mediumGray: G2.mediumGray, - lightGray: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["merge"])({}, LIGHT_GRAY, G2.lightGray), - lightGrayLight: LIGHT_OPACITY_LIGHT, - blue: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["merge"])({}, BLUE, G2.blue), - alert: ALERT, - admin: ADMIN, - ui: UI -}); -/* unused harmony default export */ var _unused_webpack_default_export = (COLORS); -//# sourceMappingURL=colors-values.js.map -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { +function createBrowserHistory(props) { + if (props === void 0) { + props = {}; + } -"use strict"; + !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + var globalHistory = window.history; + var canUseHistory = supportsHistory(); + var needsHashChangeListener = !supportsPopStateOnHashChange(); + var _props = props, + _props$forceRefresh = _props.forceRefresh, + forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh, + _props$getUserConfirm = _props.getUserConfirmation, + getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, + _props$keyLength = _props.keyLength, + keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; + var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; + function getDOMLocation(historyState) { + var _ref = historyState || {}, + key = _ref.key, + state = _ref.state; -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; + var _window$location = window.location, + pathname = _window$location.pathname, + search = _window$location.search, + hash = _window$location.hash; + var path = pathname + search + hash; + false ? undefined : void 0; + if (basename) path = stripBasename(path, basename); + return createLocation(path, state, key); + } -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } + function createKey() { + return Math.random().toString(36).substr(2, keyLength); + } - return array; -}()); + var transitionManager = createTransitionManager(); -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; + function setState(nextState) { + Object(esm_extends["a" /* default */])(history, nextState); - if (isArray(obj)) { - var compacted = []; + history.length = globalHistory.length; + transitionManager.notifyListeners(history.location, history.action); + } - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } + function handlePopState(event) { + // Ignore extraneous popstate events in WebKit. + if (isExtraneousPopstateEvent(event)) return; + handlePop(getDOMLocation(event.state)); + } - item.obj[item.prop] = compacted; - } - } -}; + function handleHashChange() { + handlePop(getDOMLocation(getHistoryState())); + } -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; + var forceNextPop = false; + + function handlePop(location) { + if (forceNextPop) { + forceNextPop = false; + setState(); + } else { + var action = 'POP'; + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ + action: action, + location: location + }); + } else { + revertPop(location); } + }); } + } - return obj; -}; + function revertPop(fromLocation) { + var toLocation = history.location; // TODO: We could probably make this more reliable by + // keeping a list of keys we've seen in sessionStorage. + // Instead, we just default to 0 for keys we don't know. -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } + var toIndex = allKeys.indexOf(toLocation.key); + if (toIndex === -1) toIndex = 0; + var fromIndex = allKeys.indexOf(fromLocation.key); + if (fromIndex === -1) fromIndex = 0; + var delta = toIndex - fromIndex; - return target; + if (delta) { + forceNextPop = true; + go(delta); } + } - if (!target || typeof target !== 'object') { - return [target].concat(source); - } + var initialLocation = getDOMLocation(getHistoryState()); + var allKeys = [initialLocation.key]; // Public interface - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } + function createHref(location) { + return basename + createPath(location); + } - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } + function push(path, state) { + false ? undefined : void 0; + var action = 'PUSH'; + var location = createLocation(path, state, createKey(), history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var href = createHref(location); + var key = location.key, + state = location.state; - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; + if (canUseHistory) { + globalHistory.pushState({ + key: key, + state: state + }, null, href); - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); + if (forceRefresh) { + window.location.href = href; } else { - acc[key] = value; + var prevIndex = allKeys.indexOf(history.location.key); + var nextKeys = allKeys.slice(0, prevIndex + 1); + nextKeys.push(location.key); + allKeys = nextKeys; + setState({ + action: action, + location: location + }); } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var encode = function encode(str, defaultEncoder, charset) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); + } else { + false ? undefined : void 0; + window.location.href = href; + } + }); + } - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } + function replace(path, state) { + false ? undefined : void 0; + var action = 'REPLACE'; + var location = createLocation(path, state, createKey(), history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var href = createHref(location); + var key = location.key, + state = location.state; - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } + if (canUseHistory) { + globalHistory.replaceState({ + key: key, + state: state + }, null, href); - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; + if (forceRefresh) { + window.location.replace(href); + } else { + var prevIndex = allKeys.indexOf(history.location.key); + if (prevIndex !== -1) allKeys[prevIndex] = location.key; + setState({ + action: action, + location: location + }); } + } else { + false ? undefined : void 0; + window.location.replace(href); + } + }); + } - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } + function go(n) { + globalHistory.go(n); + } - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } + function goBack() { + go(-1); + } - return out; -}; + function goForward() { + go(1); + } -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; + var listenerCount = 0; - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; + function checkDOMListeners(delta) { + listenerCount += delta; - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } + if (listenerCount === 1 && delta === 1) { + window.addEventListener(PopStateEvent, handlePopState); + if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange); + } else if (listenerCount === 0) { + window.removeEventListener(PopStateEvent, handlePopState); + if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange); } + } - compactQueue(queue); + var isBlocked = false; - return value; -}; + function block(prompt) { + if (prompt === void 0) { + prompt = false; + } -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; + var unblock = transitionManager.setPrompt(prompt); -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; + if (!isBlocked) { + checkDOMListeners(1); + isBlocked = true; } - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b) { - return [].concat(a, b); -}; - -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); - } - return mapped; - } - return fn(val); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - maybeMap: maybeMap, - merge: merge -}; - - -/***/ }), -/* 88 */, -/* 89 */, -/* 90 */ -/***/ (function(module, exports) { - -(function() { module.exports = this["ReactDOM"]; }()); - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -var e=__webpack_require__(8),n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},t=function(t){var r=t.onResize,u=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function u(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?u():n.current&&n.current.addEventListener&&n.current.addEventListener("load",u),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(u,(function(){return r(u)})),e.createElement("iframe",{style:n,src:"about:blank",ref:u,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};module.exports=function(n){void 0===n&&(n=r);var u=e.useState(n(null)),o=u[0],i=u[1],c=e.useCallback((function(e){return i(n(e.current))}),[n]);return[e.useMemo((function(){return e.createElement(t,{onResize:c})}),[c]),o]}; -//# sourceMappingURL=index.js.map + return function () { + if (isBlocked) { + isBlocked = false; + checkDOMListeners(-1); + } + return unblock(); + }; + } -/***/ }), -/* 92 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function listen(listener) { + var unlisten = transitionManager.appendListener(listener); + checkDOMListeners(1); + return function () { + checkDOMListeners(-1); + unlisten(); + }; + } -"use strict"; -var isProduction = "production" === 'production'; -var prefix = 'Invariant failed'; -function invariant(condition, message) { - if (condition) { - return; - } - if (isProduction) { - throw new Error(prefix); - } - throw new Error(prefix + ": " + (message || '')); + var history = { + length: globalHistory.length, + action: 'POP', + location: initialLocation, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + block: block, + listen: listen + }; + return history; } -/* harmony default export */ __webpack_exports__["a"] = (invariant); - - -/***/ }), -/* 93 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayLikeToArray = __webpack_require__(62); +var HashChangeEvent$1 = 'hashchange'; +var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path); + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substr(1) : path; + } + }, + noslash: { + encodePath: stripLeadingSlash, + decodePath: addLeadingSlash + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash + } +}; -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return arrayLikeToArray(arr); +function stripHash(url) { + var hashIndex = url.indexOf('#'); + return hashIndex === -1 ? url : url.slice(0, hashIndex); } -module.exports = _arrayWithoutHoles; - -/***/ }), -/* 94 */ -/***/ (function(module, exports) { - -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); } -module.exports = _iterableToArray; - -/***/ }), -/* 95 */ -/***/ (function(module, exports) { - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function pushHashPath(path) { + window.location.hash = path; } -module.exports = _nonIterableSpread; - -/***/ }), -/* 96 */, -/* 97 */, -/* 98 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ slot_fill_Slot; }); -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ slot_fill_Fill; }); - -// UNUSED EXPORTS: createSlotFill, useSlot, Provider - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(7); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(11); - -// EXTERNAL MODULE: external {"this":["wp","element"]} -var external_this_wp_element_ = __webpack_require__(0); +function replaceHashPath(path) { + window.location.replace(stripHash(window.location.href) + '#' + path); +} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js -var classCallCheck = __webpack_require__(16); +function createHashHistory(props) { + if (props === void 0) { + props = {}; + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js -var createClass = __webpack_require__(17); + !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + var globalHistory = window.history; + var canGoWithoutReload = supportsGoWithoutReloadUsingHash(); + var _props = props, + _props$getUserConfirm = _props.getUserConfirmation, + getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, + _props$hashType = _props.hashType, + hashType = _props$hashType === void 0 ? 'slash' : _props$hashType; + var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; + var _HashPathCoders$hashT = HashPathCoders[hashType], + encodePath = _HashPathCoders$hashT.encodePath, + decodePath = _HashPathCoders$hashT.decodePath; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -var assertThisInitialized = __webpack_require__(12); + function getDOMLocation() { + var path = decodePath(getHashPath()); + false ? undefined : void 0; + if (basename) path = stripBasename(path, basename); + return createLocation(path); + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/get.js + 1 modules -var get = __webpack_require__(83); + var transitionManager = createTransitionManager(); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules -var inherits = __webpack_require__(18); + function setState(nextState) { + Object(esm_extends["a" /* default */])(history, nextState); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js -var possibleConstructorReturn = __webpack_require__(21); + history.length = globalHistory.length; + transitionManager.notifyListeners(history.location, history.action); + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js -var getPrototypeOf = __webpack_require__(9); + var forceNextPop = false; + var ignorePath = null; -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); + function locationsAreEqual$$1(a, b) { + return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash; + } -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/context.js + 1 modules -var context = __webpack_require__(56); + function handleHashChange() { + var path = getHashPath(); + var encodedPath = encodePath(path); -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/slot.js + if (path !== encodedPath) { + // Ensure we always have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var location = getDOMLocation(); + var prevLocation = history.location; + if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change. + if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace. + ignorePath = null; + handlePop(location); + } + } + function handlePop(location) { + if (forceNextPop) { + forceNextPop = false; + setState(); + } else { + var action = 'POP'; + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ + action: action, + location: location + }); + } else { + revertPop(location); + } + }); + } + } + function revertPop(fromLocation) { + var toLocation = history.location; // TODO: We could probably make this more reliable by + // keeping a list of paths we've seen in sessionStorage. + // Instead, we just default to 0 for paths we don't know. + var toIndex = allPaths.lastIndexOf(createPath(toLocation)); + if (toIndex === -1) toIndex = 0; + var fromIndex = allPaths.lastIndexOf(createPath(fromLocation)); + if (fromIndex === -1) fromIndex = 0; + var delta = toIndex - fromIndex; + if (delta) { + forceNextPop = true; + go(delta); + } + } // Ensure the hash is encoded properly before doing anything else. + var path = getHashPath(); + var encodedPath = encodePath(path); + if (path !== encodedPath) replaceHashPath(encodedPath); + var initialLocation = getDOMLocation(); + var allPaths = [createPath(initialLocation)]; // Public interface + function createHref(location) { + var baseTag = document.querySelector('base'); + var href = ''; -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } + if (baseTag && baseTag.getAttribute('href')) { + href = stripHash(window.location.href); + } -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + return href + '#' + encodePath(basename + createPath(location)); + } -/** - * External dependencies - */ + function push(path, state) { + false ? undefined : void 0; + var action = 'PUSH'; + var location = createLocation(path, undefined, undefined, history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var path = createPath(location); + var encodedPath = encodePath(basename + path); + var hashChanged = getHashPath() !== encodedPath; -/** - * WordPress dependencies - */ + if (hashChanged) { + // We cannot tell if a hashchange was caused by a PUSH, so we'd + // rather setState here and ignore the hashchange. The caveat here + // is that other hash histories in the page will consider it a POP. + ignorePath = path; + pushHashPath(encodedPath); + var prevIndex = allPaths.lastIndexOf(createPath(history.location)); + var nextPaths = allPaths.slice(0, prevIndex + 1); + nextPaths.push(path); + allPaths = nextPaths; + setState({ + action: action, + location: location + }); + } else { + false ? undefined : void 0; + setState(); + } + }); + } + function replace(path, state) { + false ? undefined : void 0; + var action = 'REPLACE'; + var location = createLocation(path, undefined, undefined, history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var path = createPath(location); + var encodedPath = encodePath(basename + path); + var hashChanged = getHashPath() !== encodedPath; -/** - * Internal dependencies - */ + if (hashChanged) { + // We cannot tell if a hashchange was caused by a REPLACE, so we'd + // rather setState here and ignore the hashchange. The caveat here + // is that other hash histories in the page will consider it a POP. + ignorePath = path; + replaceHashPath(encodedPath); + } + var prevIndex = allPaths.indexOf(createPath(history.location)); + if (prevIndex !== -1) allPaths[prevIndex] = path; + setState({ + action: action, + location: location + }); + }); + } + function go(n) { + false ? undefined : void 0; + globalHistory.go(n); + } -var slot_SlotComponent = /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(SlotComponent, _Component); + function goBack() { + go(-1); + } - var _super = _createSuper(SlotComponent); + function goForward() { + go(1); + } - function SlotComponent() { - var _this; + var listenerCount = 0; - Object(classCallCheck["a" /* default */])(this, SlotComponent); + function checkDOMListeners(delta) { + listenerCount += delta; - _this = _super.apply(this, arguments); - _this.isUnmounted = false; - _this.bindNode = _this.bindNode.bind(Object(assertThisInitialized["a" /* default */])(_this)); - return _this; + if (listenerCount === 1 && delta === 1) { + window.addEventListener(HashChangeEvent$1, handleHashChange); + } else if (listenerCount === 0) { + window.removeEventListener(HashChangeEvent$1, handleHashChange); + } } - Object(createClass["a" /* default */])(SlotComponent, [{ - key: "componentDidMount", - value: function componentDidMount() { - var registerSlot = this.props.registerSlot; - registerSlot(this.props.name, this); - } - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - var unregisterSlot = this.props.unregisterSlot; - this.isUnmounted = true; - unregisterSlot(this.props.name, this); - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate(prevProps) { - var _this$props = this.props, - name = _this$props.name, - unregisterSlot = _this$props.unregisterSlot, - registerSlot = _this$props.registerSlot; + var isBlocked = false; - if (prevProps.name !== name) { - unregisterSlot(prevProps.name); - registerSlot(name, this); - } - } - }, { - key: "bindNode", - value: function bindNode(node) { - this.node = node; + function block(prompt) { + if (prompt === void 0) { + prompt = false; } - }, { - key: "forceUpdate", - value: function forceUpdate() { - if (this.isUnmounted) { - return; - } - Object(get["a" /* default */])(Object(getPrototypeOf["a" /* default */])(SlotComponent.prototype), "forceUpdate", this).call(this); - } - }, { - key: "render", - value: function render() { - var _this$props2 = this.props, - children = _this$props2.children, - name = _this$props2.name, - _this$props2$fillProp = _this$props2.fillProps, - fillProps = _this$props2$fillProp === void 0 ? {} : _this$props2$fillProp, - getFills = _this$props2.getFills; - var fills = Object(external_lodash_["map"])(getFills(name, this), function (fill) { - var fillKey = fill.occurrence; - var fillChildren = Object(external_lodash_["isFunction"])(fill.children) ? fill.children(fillProps) : fill.children; - return external_this_wp_element_["Children"].map(fillChildren, function (child, childIndex) { - if (!child || Object(external_lodash_["isString"])(child)) { - return child; - } + var unblock = transitionManager.setPrompt(prompt); - var childKey = "".concat(fillKey, "---").concat(child.key || childIndex); - return Object(external_this_wp_element_["cloneElement"])(child, { - key: childKey - }); - }); - }).filter( // In some cases fills are rendered only when some conditions apply. - // This ensures that we only use non-empty fills when rendering, i.e., - // it allows us to render wrappers only when the fills are actually present. - Object(external_lodash_["negate"])(external_this_wp_element_["isEmptyElement"])); - return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_lodash_["isFunction"])(children) ? children(fills) : fills); + if (!isBlocked) { + checkDOMListeners(1); + isBlocked = true; } - }]); - - return SlotComponent; -}(external_this_wp_element_["Component"]); - -var slot_Slot = function Slot(props) { - return Object(external_this_wp_element_["createElement"])(context["a" /* Consumer */], null, function (_ref) { - var registerSlot = _ref.registerSlot, - unregisterSlot = _ref.unregisterSlot, - getFills = _ref.getFills; - return Object(external_this_wp_element_["createElement"])(slot_SlotComponent, Object(esm_extends["a" /* default */])({}, props, { - registerSlot: registerSlot, - unregisterSlot: unregisterSlot, - getFills: getFills - })); - }); -}; -/* harmony default export */ var slot_fill_slot = (slot_Slot); -//# sourceMappingURL=slot.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/fill.js + return function () { + if (isBlocked) { + isBlocked = false; + checkDOMListeners(-1); + } + return unblock(); + }; + } + function listen(listener) { + var unlisten = transitionManager.appendListener(listener); + checkDOMListeners(1); + return function () { + checkDOMListeners(-1); + unlisten(); + }; + } -/** - * External dependencies - */ + var history = { + length: globalHistory.length, + action: 'POP', + location: initialLocation, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + block: block, + listen: listen + }; + return history; +} +function clamp(n, lowerBound, upperBound) { + return Math.min(Math.max(n, lowerBound), upperBound); +} /** - * WordPress dependencies + * Creates a history object that stores locations in memory. */ -/** - * Internal dependencies - */ - +function createMemoryHistory(props) { + if (props === void 0) { + props = {}; + } -var occurrences = 0; + var _props = props, + getUserConfirmation = _props.getUserConfirmation, + _props$initialEntries = _props.initialEntries, + initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries, + _props$initialIndex = _props.initialIndex, + initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, + _props$keyLength = _props.keyLength, + keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; + var transitionManager = createTransitionManager(); -function fill_FillComponent(_ref) { - var name = _ref.name, - children = _ref.children, - registerFill = _ref.registerFill, - unregisterFill = _ref.unregisterFill; - var slot = Object(context["c" /* useSlot */])(name); - var ref = Object(external_this_wp_element_["useRef"])({ - name: name, - children: children - }); + function setState(nextState) { + Object(esm_extends["a" /* default */])(history, nextState); - if (!ref.current.occurrence) { - ref.current.occurrence = ++occurrences; + history.length = history.entries.length; + transitionManager.notifyListeners(history.location, history.action); } - Object(external_this_wp_element_["useLayoutEffect"])(function () { - registerFill(name, ref.current); - return function () { - return unregisterFill(name, ref.current); - }; - }, []); - Object(external_this_wp_element_["useLayoutEffect"])(function () { - ref.current.children = children; + function createKey() { + return Math.random().toString(36).substr(2, keyLength); + } - if (slot) { - slot.forceUpdate(); - } - }, [children]); - Object(external_this_wp_element_["useLayoutEffect"])(function () { - if (name === ref.current.name) { - // ignore initial effect - return; - } + var index = clamp(initialIndex, 0, initialEntries.length - 1); + var entries = initialEntries.map(function (entry) { + return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey()); + }); // Public interface - unregisterFill(ref.current.name, ref.current); - ref.current.name = name; - registerFill(name, ref.current); - }, [name]); + var createHref = createPath; - if (!slot || !slot.node) { - return null; - } // If a function is passed as a child, provide it with the fillProps. + function push(path, state) { + false ? undefined : void 0; + var action = 'PUSH'; + var location = createLocation(path, state, createKey(), history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var prevIndex = history.index; + var nextIndex = prevIndex + 1; + var nextEntries = history.entries.slice(0); + if (nextEntries.length > nextIndex) { + nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); + } else { + nextEntries.push(location); + } - if (Object(external_lodash_["isFunction"])(children)) { - children = children(slot.props.fillProps); + setState({ + action: action, + location: location, + index: nextIndex, + entries: nextEntries + }); + }); } - return Object(external_this_wp_element_["createPortal"])(children, slot.node); -} + function replace(path, state) { + false ? undefined : void 0; + var action = 'REPLACE'; + var location = createLocation(path, state, createKey(), history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + history.entries[history.index] = location; + setState({ + action: action, + location: location + }); + }); + } -var fill_Fill = function Fill(props) { - return Object(external_this_wp_element_["createElement"])(context["a" /* Consumer */], null, function (_ref2) { - var registerFill = _ref2.registerFill, - unregisterFill = _ref2.unregisterFill; - return Object(external_this_wp_element_["createElement"])(fill_FillComponent, Object(esm_extends["a" /* default */])({}, props, { - registerFill: registerFill, - unregisterFill: unregisterFill - })); - }); -}; + function go(n) { + var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); + var action = 'POP'; + var location = history.entries[nextIndex]; + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ + action: action, + location: location, + index: nextIndex + }); + } else { + // Mimic the behavior of DOM histories by + // causing a render after a cancelled POP. + setState(); + } + }); + } -/* harmony default export */ var slot_fill_fill = (fill_Fill); -//# sourceMappingURL=fill.js.map -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/slot-fill-context.js -var slot_fill_context = __webpack_require__(61); + function goBack() { + go(-1); + } -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/slot.js + function goForward() { + go(1); + } + function canGo(n) { + var nextIndex = history.index + n; + return nextIndex >= 0 && nextIndex < history.entries.length; + } + function block(prompt) { + if (prompt === void 0) { + prompt = false; + } + return transitionManager.setPrompt(prompt); + } -/** - * WordPress dependencies - */ - -/** - * Internal dependencies - */ - - -function bubbles_virtually_slot_Slot(_ref) { - var name = _ref.name, - _ref$fillProps = _ref.fillProps, - fillProps = _ref$fillProps === void 0 ? {} : _ref$fillProps, - _ref$as = _ref.as, - Component = _ref$as === void 0 ? 'div' : _ref$as, - props = Object(objectWithoutProperties["a" /* default */])(_ref, ["name", "fillProps", "as"]); + function listen(listener) { + return transitionManager.appendListener(listener); + } - var registry = Object(external_this_wp_element_["useContext"])(slot_fill_context["a" /* default */]); - var ref = Object(external_this_wp_element_["useRef"])(); - Object(external_this_wp_element_["useLayoutEffect"])(function () { - registry.registerSlot(name, ref, fillProps); - return function () { - registry.unregisterSlot(name, ref); - }; // We are not including fillProps in the deps because we don't want to - // unregister and register the slot whenever fillProps change, which would - // cause the fill to be re-mounted. We are only considering the initial value - // of fillProps. - }, [registry.registerSlot, registry.unregisterSlot, name]); // fillProps may be an update that interacts with the layout, so we - // useLayoutEffect - - Object(external_this_wp_element_["useLayoutEffect"])(function () { - registry.updateSlot(name, fillProps); - }); - return Object(external_this_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({ - ref: ref - }, props)); + var history = { + length: entries.length, + action: 'POP', + location: entries[index], + index: index, + entries: entries, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + canGo: canGo, + block: block, + listen: listen + }; + return history; } -//# sourceMappingURL=slot.js.map -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules -var slicedToArray = __webpack_require__(24); -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/use-slot.js -var use_slot = __webpack_require__(71); -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/fill.js -/** - * WordPress dependencies - */ +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Internal dependencies - */ +"use strict"; +var fixRegExpWellKnownSymbolLogic = __webpack_require__(111); +var anObject = __webpack_require__(9); +var toLength = __webpack_require__(34); +var requireObjectCoercible = __webpack_require__(32); +var advanceStringIndex = __webpack_require__(122); +var regExpExec = __webpack_require__(112); + +// @@match logic +fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.es/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = requireObjectCoercible(this); + var matcher = regexp == undefined ? undefined : regexp[MATCH]; + return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative(nativeMatch, regexp, this); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + if (!rx.global) return regExpExec(rx, S); + + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); -function useForceUpdate() { - var _useState = Object(external_this_wp_element_["useState"])({}), - _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), - setState = _useState2[1]; +/***/ }), +/* 204 */ +/***/ (function(module, exports) { - return function () { - return setState({}); +function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; }; + + return _setPrototypeOf(o, p); } -function bubbles_virtually_fill_Fill(_ref) { - var name = _ref.name, - children = _ref.children; - var slot = Object(use_slot["a" /* default */])(name); - var ref = Object(external_this_wp_element_["useRef"])({ - rerender: useForceUpdate() - }); - Object(external_this_wp_element_["useEffect"])(function () { - // We register fills so we can keep track of their existance. - // Some Slot implementations need to know if there're already fills - // registered so they can choose to render themselves or not. - slot.registerFill(ref); - return function () { - slot.unregisterFill(ref); - }; - }, [slot.registerFill, slot.unregisterFill]); +module.exports = _setPrototypeOf; - if (!slot.ref || !slot.ref.current) { - return null; - } +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { - if (typeof children === 'function') { - children = children(slot.fillProps); - } +var hiddenKeys = __webpack_require__(36); +var isObject = __webpack_require__(10); +var has = __webpack_require__(11); +var defineProperty = __webpack_require__(17).f; +var uid = __webpack_require__(55); +var FREEZING = __webpack_require__(253); - return Object(external_this_wp_element_["createPortal"])(children, slot.ref.current); -} -//# sourceMappingURL=fill.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/index.js +var METADATA = uid('meta'); +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var setMetadata = function (it) { + defineProperty(it, METADATA, { value: { + objectID: 'O' + ++id, // object ID + weakData: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return a primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMetadata(it); + // return object ID + } return it[METADATA].objectID; +}; -/** - * Internal dependencies - */ +var getWeakData = function (it, create) { + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMetadata(it); + // return the store of weak collections IDs + } return it[METADATA].weakData; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); + return it; +}; +var meta = module.exports = { + REQUIRED: false, + fastKey: fastKey, + getWeakData: getWeakData, + onFreeze: onFreeze +}; +hiddenKeys[METADATA] = true; +/***/ }), +/* 206 */, +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { -function slot_fill_Slot(_ref) { - var bubblesVirtually = _ref.bubblesVirtually, - props = Object(objectWithoutProperties["a" /* default */])(_ref, ["bubblesVirtually"]); +var isRegExp = __webpack_require__(144); - if (bubblesVirtually) { - return Object(external_this_wp_element_["createElement"])(bubbles_virtually_slot_Slot, props); - } +module.exports = function (it) { + if (isRegExp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; +}; - return Object(external_this_wp_element_["createElement"])(slot_fill_slot, props); -} -function slot_fill_Fill(props) { - // We're adding both Fills here so they can register themselves before - // their respective slot has been registered. Only the Fill that has a slot - // will render. The other one will return null. - return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(slot_fill_fill, props), Object(external_this_wp_element_["createElement"])(bubbles_virtually_fill_Fill, props)); -} -function createSlotFill(name) { - var FillComponent = function FillComponent(props) { - return Object(external_this_wp_element_["createElement"])(slot_fill_Fill, Object(esm_extends["a" /* default */])({ - name: name - }, props)); - }; - FillComponent.displayName = name + 'Fill'; +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { - var SlotComponent = function SlotComponent(props) { - return Object(external_this_wp_element_["createElement"])(slot_fill_Slot, Object(esm_extends["a" /* default */])({ - name: name - }, props)); - }; +var wellKnownSymbol = __webpack_require__(8); - SlotComponent.displayName = name + 'Slot'; - return { - Fill: FillComponent, - Slot: SlotComponent - }; -} +var MATCH = wellKnownSymbol('match'); + +module.exports = function (METHOD_NAME) { + var regexp = /./; + try { + '/./'[METHOD_NAME](regexp); + } catch (error1) { + try { + regexp[MATCH] = false; + return '/./'[METHOD_NAME](regexp); + } catch (error2) { /* empty */ } + } return false; +}; -//# sourceMappingURL=index.js.map /***/ }), -/* 99 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var DESCRIPTORS = __webpack_require__(13); +var global = __webpack_require__(3); +var isForced = __webpack_require__(74); +var inheritIfRequired = __webpack_require__(156); +var defineProperty = __webpack_require__(17).f; +var getOwnPropertyNames = __webpack_require__(56).f; +var isRegExp = __webpack_require__(144); +var getFlags = __webpack_require__(114); +var stickyHelpers = __webpack_require__(137); +var redefine = __webpack_require__(27); +var fails = __webpack_require__(6); +var setInternalState = __webpack_require__(45).set; +var setSpecies = __webpack_require__(153); +var wellKnownSymbol = __webpack_require__(8); + +var MATCH = wellKnownSymbol('match'); +var NativeRegExp = global.RegExp; +var RegExpPrototype = NativeRegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; + +// "new" should create a new object, old webkit bug +var CORRECT_NEW = new NativeRegExp(re1) !== re1; + +var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; + +var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () { + re2[MATCH] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; +}))); + +// `RegExp` constructor +// https://tc39.es/ecma262/#sec-regexp-constructor +if (FORCED) { + var RegExpWrapper = function RegExp(pattern, flags) { + var thisIsRegExp = this instanceof RegExpWrapper; + var patternIsRegExp = isRegExp(pattern); + var flagsAreUndefined = flags === undefined; + var sticky; + + if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) { + return pattern; + } + + if (CORRECT_NEW) { + if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source; + } else if (pattern instanceof RegExpWrapper) { + if (flagsAreUndefined) flags = getFlags.call(pattern); + pattern = pattern.source; + } + + if (UNSUPPORTED_Y) { + sticky = !!flags && flags.indexOf('y') > -1; + if (sticky) flags = flags.replace(/y/g, ''); + } + + var result = inheritIfRequired( + CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags), + thisIsRegExp ? this : RegExpPrototype, + RegExpWrapper + ); + if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky }); -var replace = String.prototype.replace; -var percentTwenties = /%20/g; + return result; + }; + var proxy = function (key) { + key in RegExpWrapper || defineProperty(RegExpWrapper, key, { + configurable: true, + get: function () { return NativeRegExp[key]; }, + set: function (it) { NativeRegExp[key] = it; } + }); + }; + var keys = getOwnPropertyNames(NativeRegExp); + var index = 0; + while (keys.length > index) proxy(keys[index++]); + RegExpPrototype.constructor = RegExpWrapper; + RegExpWrapper.prototype = RegExpPrototype; + redefine(global, 'RegExp', RegExpWrapper); +} -var util = __webpack_require__(87); +// https://tc39.es/ecma262/#sec-get-regexp-@@species +setSpecies('RegExp'); -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; -module.exports = util.assign( - { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - } - }, - Format -); +/***/ }), +/* 210 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STORE_KEY; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_NAMESPACE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return QUEUE_OPTION_NAME; }); +var STORE_KEY = 'wc/customer-effort-score'; +var API_NAMESPACE = '/wc-admin'; +var QUEUE_OPTION_NAME = 'woocommerce_ces_tracks_queue'; /***/ }), -/* 100 */ +/* 211 */ /***/ (function(module, exports) { -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -module.exports = _arrayWithHoles; +(function() { module.exports = window["wp"]["date"]; }()); /***/ }), -/* 101 */ -/***/ (function(module, exports) { +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; +"use strict"; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); +var aFunction = __webpack_require__(70); +var isObject = __webpack_require__(10); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } +var slice = [].slice; +var factories = {}; - return _arr; -} +var construct = function (C, argsLength, args) { + if (!(argsLength in factories)) { + for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only + factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); + } return factories[argsLength](C, args); +}; + +// `Function.prototype.bind` method implementation +// https://tc39.es/ecma262/#sec-function.prototype.bind +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = slice.call(arguments, 1); + var boundFunction = function bound(/* args... */) { + var args = partArgs.concat(slice.call(arguments)); + return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); + }; + if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; + return boundFunction; +}; -module.exports = _iterableToArrayLimit; /***/ }), -/* 102 */ -/***/ (function(module, exports) { +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} +var fails = __webpack_require__(6); + +module.exports = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; +}); -module.exports = _nonIterableRest; /***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { +/* 214 */ +/***/ (function(module, exports) { -"use strict"; +// `SameValue` abstract operation +// https://tc39.es/ecma262/#sec-samevalue +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare -- NaN check + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; -var keys = Object.keys; +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Returns true if the two objects are shallow equal, or false otherwise. - * - * @param {import('.').ComparableObject} a First object to compare. - * @param {import('.').ComparableObject} b Second object to compare. + * Copyright (c) 2013-present, Facebook, Inc. * - * @return {boolean} Whether the two objects are shallow equal. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function isShallowEqualObjects( a, b ) { - var aKeys, bKeys, i, key, aValue; - if ( a === b ) { - return true; - } - aKeys = keys( a ); - bKeys = keys( b ); - if ( aKeys.length !== bKeys.length ) { - return false; - } +var ReactPropTypesSecret = __webpack_require__(216); - i = 0; - - while ( i < aKeys.length ) { - key = aKeys[ i ]; - aValue = a[ key ]; - - if ( - // In iterating only the keys of the first object after verifying - // equal lengths, account for the case that an explicit `undefined` - // value in the first is implicitly undefined in the second. - // - // Example: isShallowEqualObjects( { a: undefined }, { b: 5 } ) - ( aValue === undefined && ! b.hasOwnProperty( key ) ) || - aValue !== b[ key ] - ) { - return false; - } +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; - i++; - } +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = 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' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, - return true; -} + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; -module.exports = isShallowEqualObjects; + return ReactPropTypes; +}; /***/ }), -/* 104 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - /** - * Returns true if the two arrays are shallow equal, or false otherwise. - * - * @param {any[]} a First array to compare. - * @param {any[]} b Second array to compare. + * Copyright (c) 2013-present, Facebook, Inc. * - * @return {boolean} Whether the two arrays are shallow equal. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function isShallowEqualArrays( a, b ) { - var i; - - if ( a === b ) { - return true; - } - if ( a.length !== b.length ) { - return false; - } - for ( i = 0; i < a.length; i++ ) { - if ( a[ i ] !== b[ i ] ) { - return false; - } - } - return true; -} +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -module.exports = isShallowEqualArrays; +module.exports = ReactPropTypesSecret; /***/ }), -/* 105 */, -/* 106 */ +/* 217 */, +/* 218 */, +/* 219 */, +/* 220 */, +/* 221 */ /***/ (function(module, exports, __webpack_require__) { -// TinyColor v1.4.2 -// https://github.com/bgrins/TinyColor -// Brian Grinstead, MIT License - -(function(Math) { - -var trimLeft = /^\s+/, - trimRight = /\s+$/, - tinyCounter = 0, - mathRound = Math.round, - mathMin = Math.min, - mathMax = Math.max, - mathRandom = Math.random; - -function tinycolor (color, opts) { - - color = (color) ? color : ''; - opts = opts || { }; - - // If input is already a tinycolor, return itself - if (color instanceof tinycolor) { - return color; - } - // If we are called as a function, call using new instead - if (!(this instanceof tinycolor)) { - return new tinycolor(color, opts); - } - - var rgb = inputToRGB(color); - this._originalInput = color, - this._r = rgb.r, - this._g = rgb.g, - this._b = rgb.b, - this._a = rgb.a, - this._roundA = mathRound(100*this._a) / 100, - this._format = opts.format || rgb.format; - this._gradientType = opts.gradientType; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (this._r < 1) { this._r = mathRound(this._r); } - if (this._g < 1) { this._g = mathRound(this._g); } - if (this._b < 1) { this._b = mathRound(this._b); } - - this._ok = rgb.ok; - this._tc_id = tinyCounter++; -} +"use strict"; -tinycolor.prototype = { - isDark: function() { - return this.getBrightness() < 128; - }, - isLight: function() { - return !this.isDark(); - }, - isValid: function() { - return this._ok; - }, - getOriginalInput: function() { - return this._originalInput; - }, - getFormat: function() { - return this._format; - }, - getAlpha: function() { - return this._a; - }, - getBrightness: function() { - //http://www.w3.org/TR/AERT#color-contrast - var rgb = this.toRgb(); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; - }, - getLuminance: function() { - //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef - var rgb = this.toRgb(); - var RsRGB, GsRGB, BsRGB, R, G, B; - RsRGB = rgb.r/255; - GsRGB = rgb.g/255; - BsRGB = rgb.b/255; - - if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);} - if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);} - if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);} - return (0.2126 * R) + (0.7152 * G) + (0.0722 * B); - }, - setAlpha: function(value) { - this._a = boundAlpha(value); - this._roundA = mathRound(100*this._a) / 100; - return this; - }, - toHsv: function() { - var hsv = rgbToHsv(this._r, this._g, this._b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; - }, - toHsvString: function() { - var hsv = rgbToHsv(this._r, this._g, this._b); - var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); - return (this._a == 1) ? - "hsv(" + h + ", " + s + "%, " + v + "%)" : - "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")"; - }, - toHsl: function() { - var hsl = rgbToHsl(this._r, this._g, this._b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; - }, - toHslString: function() { - var hsl = rgbToHsl(this._r, this._g, this._b); - var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); - return (this._a == 1) ? - "hsl(" + h + ", " + s + "%, " + l + "%)" : - "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")"; - }, - toHex: function(allow3Char) { - return rgbToHex(this._r, this._g, this._b, allow3Char); - }, - toHexString: function(allow3Char) { - return '#' + this.toHex(allow3Char); - }, - toHex8: function(allow4Char) { - return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); - }, - toHex8String: function(allow4Char) { - return '#' + this.toHex8(allow4Char); - }, - toRgb: function() { - return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; - }, - toRgbString: function() { - return (this._a == 1) ? - "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : - "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; - }, - toPercentageRgb: function() { - return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; - }, - toPercentageRgbString: function() { - return (this._a == 1) ? - "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : - "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; - }, - toName: function() { - if (this._a === 0) { - return "transparent"; - } - - if (this._a < 1) { - return false; - } - - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; - }, - toFilter: function(secondColor) { - var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a); - var secondHex8String = hex8String; - var gradientType = this._gradientType ? "GradientType = 1, " : ""; - - if (secondColor) { - var s = tinycolor(secondColor); - secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a); - } - - return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; - }, - toString: function(format) { - var formatSet = !!format; - format = format || this._format; - - var formattedString = false; - var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); - - if (needsAlphaFormat) { - // Special case for "transparent", all other non-alpha formats - // will return rgba when there is transparency. - if (format === "name" && this._a === 0) { - return this.toName(); - } - return this.toRgbString(); - } - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "hex4") { - formattedString = this.toHex8String(true); - } - if (format === "hex8") { - formattedString = this.toHex8String(); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - - return formattedString || this.toHexString(); - }, - clone: function() { - return tinycolor(this.toString()); - }, - - _applyModification: function(fn, args) { - var color = fn.apply(null, [this].concat([].slice.call(args))); - this._r = color._r; - this._g = color._g; - this._b = color._b; - this.setAlpha(color._a); - return this; - }, - lighten: function() { - return this._applyModification(lighten, arguments); - }, - brighten: function() { - return this._applyModification(brighten, arguments); - }, - darken: function() { - return this._applyModification(darken, arguments); - }, - desaturate: function() { - return this._applyModification(desaturate, arguments); - }, - saturate: function() { - return this._applyModification(saturate, arguments); - }, - greyscale: function() { - return this._applyModification(greyscale, arguments); - }, - spin: function() { - return this._applyModification(spin, arguments); - }, - - _applyCombination: function(fn, args) { - return fn.apply(null, [this].concat([].slice.call(args))); - }, - analogous: function() { - return this._applyCombination(analogous, arguments); - }, - complement: function() { - return this._applyCombination(complement, arguments); - }, - monochromatic: function() { - return this._applyCombination(monochromatic, arguments); - }, - splitcomplement: function() { - return this._applyCombination(splitcomplement, arguments); - }, - triad: function() { - return this._applyCombination(triad, arguments); - }, - tetrad: function() { - return this._applyCombination(tetrad, arguments); - } -}; +var DESCRIPTORS = __webpack_require__(13); +var fails = __webpack_require__(6); +var objectKeys = __webpack_require__(54); +var getOwnPropertySymbolsModule = __webpack_require__(79); +var propertyIsEnumerableModule = __webpack_require__(76); +var toObject = __webpack_require__(38); +var IndexedObject = __webpack_require__(71); -// If input is an object, force 1 into "1.0" to handle ratios properly -// String input requires "1.0" as input, so 1 will be treated as 1 -tinycolor.fromRatio = function(color, opts) { - if (typeof color == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } - else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - - return tinycolor(color, opts); -}; - -// Given a string or object, convert that input to RGB -// Possible string inputs: -// -// "red" -// "#f00" or "f00" -// "#ff0000" or "ff0000" -// "#ff000000" or "ff000000" -// "rgb 255 0 0" or "rgb (255, 0, 0)" -// "rgb 1.0 0 0" or "rgb (1, 0, 0)" -// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" -// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" -// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" -// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" -// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" -// -function inputToRGB(color) { - - var rgb = { r: 0, g: 0, b: 0 }; - var a = 1; - var s = null; - var v = null; - var l = null; - var ok = false; - var format = false; - - if (typeof color == "string") { - color = stringInputToObject(color); - } - - if (typeof color == "object") { - if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } - else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { - s = convertToPercentage(color.s); - v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, s, v); - ok = true; - format = "hsv"; - } - else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { - s = convertToPercentage(color.s); - l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, s, l); - ok = true; - format = "hsl"; - } +var nativeAssign = Object.assign; +var defineProperty = Object.defineProperty; - if (color.hasOwnProperty("a")) { - a = color.a; - } +// `Object.assign` method +// https://tc39.es/ecma262/#sec-object.assign +module.exports = !nativeAssign || fails(function () { + // should have correct order of operations (Edge bug) + if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { + enumerable: true, + get: function () { + defineProperty(this, 'b', { + value: 3, + enumerable: false + }); } - - a = boundAlpha(a); - - return { - ok: ok, - format: color.format || format, - r: mathMin(255, mathMax(rgb.r, 0)), - g: mathMin(255, mathMax(rgb.g, 0)), - b: mathMin(255, mathMax(rgb.b, 0)), - a: a - }; -} + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + /* global Symbol -- required for testing */ + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + var propertyIsEnumerable = propertyIsEnumerableModule.f; + while (argumentsLength > index) { + var S = IndexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key]; + } + } return T; +} : nativeAssign; -// Conversion Functions -// -------------------- +/***/ }), +/* 222 */, +/* 223 */, +/* 224 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: -// +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } -// `rgbToRgb` -// Handle bounds / percentage checking to conform to CSS color spec -// -// *Assumes:* r, g, b in [0, 255] or [0, 1] -// *Returns:* { r, g, b } in [0, 255] -function rgbToRgb(r, g, b){ - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; + return obj; } -// `rgbToHsl` -// Converts an RGB color value to HSL. -// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] -// *Returns:* { h, s, l } in [0,1] -function rgbToHsl(r, g, b) { +/***/ }), +/* 225 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(133); - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, l = (max + min) / 2; +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); + var key, i; - if(max == min) { - h = s = 0; // achromatic - } - else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - h /= 6; + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; } + } - return { h: h, s: s, l: l }; + return target; } -// `hslToRgb` -// Converts an HSL color value to RGB. -// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] -// *Returns:* { r, g, b } in the set [0, 255] -function hslToRgb(h, s, l) { - var r, g, b; +/***/ }), +/* 226 */, +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); +"use strict"; - function hue2rgb(p, q, t) { - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - if(s === 0) { - r = g = b = l; // achromatic - } - else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } +var utils = __webpack_require__(200); +var formats = __webpack_require__(169); +var has = Object.prototype.hasOwnProperty; - return { r: r * 255, g: g * 255, b: b * 255 }; -} +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; -// `rgbToHsv` -// Converts an RGB color value to HSV -// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] -// *Returns:* { h, s, v } in [0,1] -function rgbToHsv(r, g, b) { +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); +var toISO = Date.prototype.toISOString; - var max = mathMax(r, g, b), min = mathMin(r, g, b); - var h, s, v = max; +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; - var d = max - min; - s = max === 0 ? 0 : d / max; +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; - if(max == min) { - h = 0; // achromatic - } - else { - switch(max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset +) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); } - return { h: h, s: s, v: v }; -} - -// `hsvToRgb` -// Converts an HSV color value to RGB. -// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] -// *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - - var i = Math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - - return { r: r * 255, g: g * 255, b: b * 255 }; -} - -// `rgbToHex` -// Converts an RGB color to hex -// Assumes r, g, and b are contained in the set [0, 255] -// Returns a 3 or 6 character hex -function rgbToHex(r, g, b, allow3Char) { - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); + obj = ''; } - return hex.join(""); -} + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } -// `rgbaToHex` -// Converts an RGBA color plus alpha transparency to hex -// Assumes r, g, b are contained in the set [0, 255] and -// a in [0, 1]. Returns a 4 or 8 character rgba hex -function rgbaToHex(r, g, b, a, allow4Char) { + var values = []; - var hex = [ - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)), - pad2(convertDecimalToHex(a)) - ]; + if (typeof obj === 'undefined') { + return values; + } - // Return a 4 character hex if possible - if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; } - return hex.join(""); -} + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key]; -// `rgbaToArgbHex` -// Converts an RGBA color to an ARGB Hex8 string -// Rarely used, but required for "toFilter()" -function rgbaToArgbHex(r, g, b, a) { + if (skipNulls && value === null) { + continue; + } - var hex = [ - pad2(convertDecimalToHex(a)), - pad2(mathRound(r).toString(16)), - pad2(mathRound(g).toString(16)), - pad2(mathRound(b).toString(16)) - ]; + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix + : prefix + (allowDots ? '.' + key : '[' + key + ']'); - return hex.join(""); -} + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset + )); + } -// `equals` -// Can be called with any tinycolor input -tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) { return false; } - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); -}; - -tinycolor.random = function() { - return tinycolor.fromRatio({ - r: mathRandom(), - g: mathRandom(), - b: mathRandom() - }); + return values; }; +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } -// Modification Functions -// ---------------------- -// Thanks to less.js for some of the basics here -// + if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } -function desaturate(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); -} + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } -function saturate(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); -} + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; -function greyscale(color) { - return tinycolor(color).desaturate(100); -} + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } -function lighten (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); -} + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; -function brighten(color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var rgb = tinycolor(color).toRgb(); - rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); - rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); - rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); - return tinycolor(rgb); -} +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); -function darken (color, amount) { - amount = (amount === 0) ? 0 : (amount || 10); - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); -} + var objKeys; + var filter; -// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. -// Values outside of this range will be wrapped into this range. -function spin(color, amount) { - var hsl = tinycolor(color).toHsl(); - var hue = (hsl.h + amount) % 360; - hsl.h = hue < 0 ? 360 + hue : hue; - return tinycolor(hsl); -} + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } -// Combination Functions -// --------------------- -// Thanks to jQuery xColor for some of the ideas behind these -// + var keys = []; -function complement(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); -} + if (typeof obj !== 'object' || obj === null) { + return ''; + } -function triad(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) - ]; -} + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } -function tetrad(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), - tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) - ]; -} + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; -function splitcomplement(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [ - tinycolor(color), - tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), - tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) - ]; -} + if (!objKeys) { + objKeys = Object.keys(obj); + } -function analogous(color, results, slices) { - results = results || 6; - slices = slices || 30; + if (options.sort) { + objKeys.sort(options.sort); + } - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; - for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset + )); } - return ret; -} -function monochromatic(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, s = hsv.s, v = hsv.v; - var ret = []; - var modification = 1 / results; + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; - while (results--) { - ret.push(tinycolor({ h: h, s: s, v: v})); - v = (v + modification) % 1; + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } } - return ret; -} + return joined.length > 0 ? prefix + joined : ''; +}; + -// Utility Functions -// --------------------- +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { -tinycolor.mix = function(color1, color2, amount) { - amount = (amount === 0) ? 0 : (amount || 50); +"use strict"; - var rgb1 = tinycolor(color1).toRgb(); - var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; +var utils = __webpack_require__(200); - var rgba = { - r: ((rgb2.r - rgb1.r) * p) + rgb1.r, - g: ((rgb2.g - rgb1.g) * p) + rgb1.g, - b: ((rgb2.b - rgb1.b) * p) + rgb1.b, - a: ((rgb2.a - rgb1.a) * p) + rgb1.a - }; +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; - return tinycolor(rgba); +var defaults = { + allowDots: false, + allowPrototypes: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictNullHandling: false }; +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; -// Readability Functions -// --------------------- -// -1) { + return val.split(','); + } -// `contrast` -// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2) -tinycolor.readability = function(color1, color2) { - var c1 = tinycolor(color1); - var c2 = tinycolor(color2); - return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05); + return val; }; -// `isReadable` -// Ensure that foreground and background color combinations meet WCAG2 guidelines. -// The third argument is an optional Object. -// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA'; -// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'. -// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}. +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') -// *Example* -// tinycolor.isReadable("#000", "#111") => false -// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false -tinycolor.isReadable = function(color1, color2, wcag2) { - var readability = tinycolor.readability(color1, color2); - var wcag2Parms, out; +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - out = false; +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; - wcag2Parms = validateWCAG2Parms(wcag2); - switch (wcag2Parms.level + wcag2Parms.size) { - case "AAsmall": - case "AAAlarge": - out = readability >= 4.5; - break; - case "AAlarge": - out = readability >= 3; - break; - case "AAAsmall": - out = readability >= 7; - break; + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } } - return out; -}; + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; -// `mostReadable` -// Given a base color and a list of possible foreground or background -// colors for that base, returns the most readable color. -// Optionally returns Black or White if the most readable color is unreadable. -// *Example* -// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" -// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" -// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" -// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" -tinycolor.mostReadable = function(baseColor, colorList, args) { - var bestColor = null; - var bestScore = 0; - var readability; - var includeFallbackColors, level, size ; - args = args || {}; - includeFallbackColors = args.includeFallbackColors ; - level = args.level; - size = args.size; - - for (var i= 0; i < colorList.length ; i++) { - readability = tinycolor.readability(baseColor, colorList[i]); - if (readability > bestScore) { - bestScore = readability; - bestColor = tinycolor(colorList[i]); + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); } - } - if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { - return bestColor; - } - else { - args.includeFallbackColors=false; - return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); - } -}; - - -// Big List of Colors -// ------------------ -// -var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - rebeccapurple: "663399", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" -}; - -// Make it easy to access colors via `hexNames[hex]` -var hexNames = tinycolor.hexNames = flip(names); - - -// Utilities -// --------- - -// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` -function flip(o) { - var flipped = { }; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); } - } - return flipped; -} -// Return a valid alpha value [0,1] with all invalid values being set to 1 -function boundAlpha(a) { - a = parseFloat(a); + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } - if (isNaN(a) || a < 0 || a > 1) { - a = 1; + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } } - return a; -} + return obj; +}; -// Take input from [0, n] and return it as [0, 1] -function bound01(n, max) { - if (isOnePointZero(n)) { n = "100%"; } +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); - var processPercent = isPercentage(n); - n = mathMin(max, mathMax(0, parseFloat(n))); + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else { + obj[cleanRoot] = leaf; + } + } - // Handle floating point rounding errors - if ((Math.abs(n - max) < 0.000001)) { - return 1; + leaf = obj; } - // Convert into [0, 1] range if it isn't already - return (n % max) / parseFloat(max); -} + return leaf; +}; -// Force a number between 0 and 1 -function clamp01(val) { - return mathMin(1, mathMax(0, val)); -} +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } -// Parse a base-16 hex value into a base-10 integer -function parseIntFromHex(val) { - return parseInt(val, 16); -} + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; -// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 -// -function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; -} + // The regex chunks -// Check to see if string passed in is a percentage -function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; -} + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; -// Force a hex value to have 2 characters -function pad2(c) { - return c.length == 1 ? '0' + c : '' + c; -} + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } -// Replace a decimal with it's percentage value -function convertToPercentage(n) { - if (n <= 1) { - n = (n * 100) + "%"; + keys.push(parent); } - return n; -} + // Loop through children appending to the array until we hit depth -// Converts a decimal to a hex value -function convertDecimalToHex(d) { - return Math.round(parseFloat(d) * 255).toString(16); -} -// Converts a hex value to a decimal -function convertHexToDecimal(h) { - return (parseIntFromHex(h) / 255); -} + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left -var matchers = (function() { + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; + return parseObject(keys, val, options, valuesParsed); +}; - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; return { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; -})(); - -// `isValidCSSUnit` -// Take in a single string / number and check to see if it looks like a CSS unit -// (see `matchers` above for definition). -function isValidCSSUnit(color) { - return !!matchers.CSS_UNIT.exec(color); -} +}; -// `stringInputToObject` -// Permissive string parsing. Take in a number of formats, and output an object -// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` -function stringInputToObject(color) { +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); - color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } - else if (color == 'transparent') { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; } - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if ((match = matchers.rgb.exec(color))) { - return { r: match[1], g: match[2], b: match[3] }; - } - if ((match = matchers.rgba.exec(color))) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if ((match = matchers.hsl.exec(color))) { - return { h: match[1], s: match[2], l: match[3] }; - } - if ((match = matchers.hsla.exec(color))) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if ((match = matchers.hsv.exec(color))) { - return { h: match[1], s: match[2], v: match[3] }; - } - if ((match = matchers.hsva.exec(color))) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; - } - if ((match = matchers.hex8.exec(color))) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8" - }; - } - if ((match = matchers.hex6.exec(color))) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - format: named ? "name" : "hex" - }; - } - if ((match = matchers.hex4.exec(color))) { - return { - r: parseIntFromHex(match[1] + '' + match[1]), - g: parseIntFromHex(match[2] + '' + match[2]), - b: parseIntFromHex(match[3] + '' + match[3]), - a: convertHexToDecimal(match[4] + '' + match[4]), - format: named ? "name" : "hex8" - }; - } - if ((match = matchers.hex3.exec(color))) { - return { - r: parseIntFromHex(match[1] + '' + match[1]), - g: parseIntFromHex(match[2] + '' + match[2]), - b: parseIntFromHex(match[3] + '' + match[3]), - format: named ? "name" : "hex" - }; - } + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; - return false; -} + // Iterate over the keys and setup the new object -function validateWCAG2Parms(parms) { - // return valid WCAG2 parms for isReadable. - // If input parms are invalid, return {"level":"AA", "size":"small"} - var level, size; - parms = parms || {"level":"AA", "size":"small"}; - level = (parms.level || "AA").toUpperCase(); - size = (parms.size || "small").toLowerCase(); - if (level !== "AA" && level !== "AAA") { - level = "AA"; - } - if (size !== "small" && size !== "large") { - size = "small"; + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); } - return {"level":level, "size":size}; -} - -// Node: Export function -if ( true && module.exports) { - module.exports = tinycolor; -} -// AMD/requirejs: Define the module -else if (typeof define === 'function' && define.amd) { - define(function () {return tinycolor;}); -} -// Browser: Expose to window -else { - window.tinycolor = tinycolor; -} -})(Math); + return utils.compact(obj); +}; /***/ }), -/* 107 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); +var $ = __webpack_require__(12); +var global = __webpack_require__(3); +var isForced = __webpack_require__(74); +var redefine = __webpack_require__(27); +var InternalMetadataModule = __webpack_require__(205); +var iterate = __webpack_require__(154); +var anInstance = __webpack_require__(136); +var isObject = __webpack_require__(10); +var fails = __webpack_require__(6); +var checkCorrectnessOfIteration = __webpack_require__(165); +var setToStringTag = __webpack_require__(90); +var inheritIfRequired = __webpack_require__(156); + +module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { + var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; + var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; + var ADDER = IS_MAP ? 'set' : 'add'; + var NativeConstructor = global[CONSTRUCTOR_NAME]; + var NativePrototype = NativeConstructor && NativeConstructor.prototype; + var Constructor = NativeConstructor; + var exported = {}; + + var fixMethod = function (KEY) { + var nativeMethod = NativePrototype[KEY]; + redefine(NativePrototype, KEY, + KEY == 'add' ? function add(value) { + nativeMethod.call(this, value === 0 ? 0 : value); + return this; + } : KEY == 'delete' ? function (key) { + return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key); + } : KEY == 'get' ? function get(key) { + return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key); + } : KEY == 'has' ? function has(key) { + return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key); + } : function set(key, value) { + nativeMethod.call(this, key === 0 ? 0 : key, value); + return this; + } + ); + }; + var REPLACE = isForced( + CONSTRUCTOR_NAME, + typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () { + new NativeConstructor().entries().next(); + })) + ); + if (REPLACE) { + // create collection constructor + Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); + InternalMetadataModule.REQUIRED = true; + } else if (isForced(CONSTRUCTOR_NAME, true)) { + var instance = new Constructor(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + // eslint-disable-next-line no-new -- required for testing + var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new NativeConstructor(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); -function Dashicon(_ref) { - var icon = _ref.icon, - _ref$size = _ref.size, - size = _ref$size === void 0 ? 20 : _ref$size, - className = _ref.className, - extraProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size", "className"]); + if (!ACCEPT_ITERABLES) { + Constructor = wrapper(function (dummy, iterable) { + anInstance(dummy, Constructor, CONSTRUCTOR_NAME); + var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + return that; + }); + Constructor.prototype = NativePrototype; + NativePrototype.constructor = Constructor; + } - var iconClass = ['dashicon', 'dashicons', 'dashicons-' + icon, className].filter(Boolean).join(' '); - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ - className: iconClass, - width: size, - height: size - }, extraProps)); -} + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } -/* harmony default export */ __webpack_exports__["a"] = (Dashicon); -//# sourceMappingURL=index.js.map + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); -/***/ }), -/* 108 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // weak collections should not contains .clear method + if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; + } -"use strict"; + exported[CONSTRUCTOR_NAME] = Constructor; + $({ global: true, forced: Constructor != NativeConstructor }, exported); -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createBrowserHistory; }); -__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createMemoryHistory; }); -__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ createLocation; }); -__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ locationsAreEqual; }); -__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ createPath; }); + setToStringTag(Constructor, CONSTRUCTOR_NAME); -// UNUSED EXPORTS: createHashHistory, parsePath + if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(7); + return Constructor; +}; -// CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js -function isAbsolute(pathname) { - return pathname.charAt(0) === '/'; -} -// About 1.5x faster than the two-arg version of Array#splice() -function spliceOne(list, index) { - for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { - list[i] = list[k]; - } +/***/ }), +/* 230 */, +/* 231 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - list.pop(); -} +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCountryCode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCurrencyRegion; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getProductIdsForCart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategorizedOnboardingProducts; }); +/* unused harmony export getProductList */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPriceValue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWCAdmin; }); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177); +/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88); +/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107); +/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140); +/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(51); +/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(248); +/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(100); +/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(151); +/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(123); +/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(146); +/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66); +/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(49); +/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(192); +/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(178); +/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(135); +/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(132); +/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__); +/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(85); -// This implementation is based heavily on node's url.parse -function resolvePathname(to, from) { - if (from === undefined) from = ''; - var toParts = (to && to.split('/')) || []; - var fromParts = (from && from.split('/')) || []; - var isToAbs = to && isAbsolute(to); - var isFromAbs = from && isAbsolute(from); - var mustEndAbs = isToAbs || isFromAbs; - if (to && isAbsolute(to)) { - // to is absolute - fromParts = toParts; - } else if (toParts.length) { - // to is relative, drop the filename - fromParts.pop(); - fromParts = fromParts.concat(toParts); - } - if (!fromParts.length) return '/'; - var hasTrailingSlash; - if (fromParts.length) { - var last = fromParts[fromParts.length - 1]; - hasTrailingSlash = last === '.' || last === '..' || last === ''; - } else { - hasTrailingSlash = false; - } - var up = 0; - for (var i = fromParts.length; i >= 0; i--) { - var part = fromParts[i]; - if (part === '.') { - spliceOne(fromParts, i); - } else if (part === '..') { - spliceOne(fromParts, i); - up++; - } else if (up) { - spliceOne(fromParts, i); - up--; - } - } - if (!mustEndAbs) for (; up--; up) fromParts.unshift('..'); - if ( - mustEndAbs && - fromParts[0] !== '' && - (!fromParts[0] || !isAbsolute(fromParts[0])) - ) - fromParts.unshift(''); - var result = fromParts.join('/'); - if (hasTrailingSlash && result.substr(-1) !== '/') result += '/'; - return result; -} -/* harmony default export */ var resolve_pathname = (resolvePathname); -// CONCATENATED MODULE: ./node_modules/value-equal/esm/value-equal.js -function value_equal_valueOf(obj) { - return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj); -} -function valueEqual(a, b) { - // Test for strict equality first. - if (a === b) return true; - // Otherwise, if either of them == null they are not equal. - if (a == null || b == null) return false; +/** + * External dependencies + */ - if (Array.isArray(a)) { - return ( - Array.isArray(b) && - a.length === b.length && - a.every(function(item, index) { - return valueEqual(item, b[index]); - }) - ); - } - if (typeof a === 'object' || typeof b === 'object') { - var aValue = value_equal_valueOf(a); - var bValue = value_equal_valueOf(b); - if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue); +/** + * Gets the country code from a country:state value string. + * + * @param {string} countryState Country state string, e.g. US:GA. + * @return {string} Country string. + */ - return Object.keys(Object.assign({}, a, b)).every(function(key) { - return valueEqual(a[key], b[key]); - }); +function getCountryCode(countryState) { + if (!countryState) { + return null; } - return false; + return countryState.split(':')[0]; } +function getCurrencyRegion(countryState) { + var region = getCountryCode(countryState); + var euCountries = Object(lodash__WEBPACK_IMPORTED_MODULE_17__["without"])(Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__[/* getSetting */ "g"])('onboarding', { + euCountries: [] + }).euCountries, 'GB'); -/* harmony default export */ var value_equal = (valueEqual); - -// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js -var tiny_invariant_esm = __webpack_require__(92); + if (euCountries.includes(region)) { + region = 'EU'; + } -// CONCATENATED MODULE: ./node_modules/history/esm/history.js + return region; +} +/** + * Gets the product IDs for items based on the product types and theme selected in the onboarding profiler. + * + * @param {Object} profileItems Onboarding profile. + * @param {boolean} includeInstalledItems Include installed items in returned product IDs. + * @param {Array} installedPlugins Installed plugins. + * @return {Array} Product Ids. + */ +function getProductIdsForCart(profileItems) { + var includeInstalledItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var installedPlugins = arguments.length > 2 ? arguments[2] : undefined; + var productList = getProductList(profileItems, includeInstalledItems, installedPlugins); + var productIds = productList.map(function (product) { + return product.id || product.product; + }); + return productIds; +} +/** + * Gets the labeled/categorized product names and types for items based on the product types and theme selected in the onboarding profiler. + * + * @param {Object} profileItems Onboarding profile. + * @param {Array} installedPlugins Installed plugins. + * @return {Array} Objects with labeled/categorized product names and types. + */ +function getCategorizedOnboardingProducts(profileItems, installedPlugins) { + var productList = {}; + productList.products = getProductList(profileItems, true, installedPlugins); + productList.remainingProducts = getProductList(profileItems, false, installedPlugins); + var uniqueItemsList = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Set([].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(productList.products), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(productList.remainingProducts)))); + productList.uniqueItemsList = uniqueItemsList.map(function (product) { + var cleanedProduct; + if (product.label) { + cleanedProduct = { + type: 'extension', + name: product.label + }; + } else { + cleanedProduct = { + type: 'theme', + name: product.title + }; + } -function addLeadingSlash(path) { - return path.charAt(0) === '/' ? path : '/' + path; -} -function stripLeadingSlash(path) { - return path.charAt(0) === '/' ? path.substr(1) : path; -} -function hasBasename(path, prefix) { - return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1; -} -function stripBasename(path, prefix) { - return hasBasename(path, prefix) ? path.substr(prefix.length) : path; -} -function stripTrailingSlash(path) { - return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; + return cleanedProduct; + }); + return productList; } -function parsePath(path) { - var pathname = path || '/'; - var search = ''; - var hash = ''; - var hashIndex = pathname.indexOf('#'); +/** + * Gets a product list for items based on the product types and theme selected in the onboarding profiler. + * + * @param {Object} profileItems Onboarding profile. + * @param {boolean} includeInstalledItems Include installed items in returned product list. + * @param {Array} installedPlugins Installed plugins. + * @return {Array} Products. + */ - if (hashIndex !== -1) { - hash = pathname.substr(hashIndex); - pathname = pathname.substr(0, hashIndex); +function getProductList(profileItems) { + var includeInstalledItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var installedPlugins = arguments.length > 2 ? arguments[2] : undefined; + var onboarding = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__[/* getSetting */ "g"])('onboarding', {}); + var productList = []; // The population of onboarding.productTypes only happens if the task list should be shown + // so bail early if it isn't present. + + if (!onboarding.productTypes) { + return productList; } - var searchIndex = pathname.indexOf('?'); + var productTypes = profileItems.product_types || []; + productTypes.forEach(function (productType) { + if (onboarding.productTypes[productType] && onboarding.productTypes[productType].product && (includeInstalledItems || !installedPlugins.includes(onboarding.productTypes[productType].slug))) { + productList.push(onboarding.productTypes[productType]); + } + }); + var theme = onboarding.themes.find(function (themeData) { + return themeData.slug === profileItems.theme; + }); - if (searchIndex !== -1) { - search = pathname.substr(searchIndex); - pathname = pathname.substr(0, searchIndex); + if (theme && theme.id && getPriceValue(theme.price) > 0 && (includeInstalledItems || !theme.is_installed)) { + productList.push(theme); } - return { - pathname: pathname, - search: search === '?' ? '' : search, - hash: hash === '#' ? '' : hash - }; -} -function createPath(location) { - var pathname = location.pathname, - search = location.search, - hash = location.hash; - var path = pathname || '/'; - if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search; - if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash; - return path; + return productList; } +/** + * Get the value of a price from a string, removing any non-numeric characters. + * + * @param {string} string Price string. + * @return {number} Number value. + */ -function createLocation(path, state, key, currentLocation) { - var location; +function getPriceValue(string) { + return Number(Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__["decodeEntities"])(string).replace(/[^0-9.-]+/g, '')); +} +/** + * Determines if a URL is a WC admin url. + * + * @param {*} url - the url to test + * @return {boolean} true if the url is a wc-admin URL + */ - if (typeof path === 'string') { - // Two-arg form: push(path, state) - location = parsePath(path); - location.state = state; - } else { - // One-arg form: push(location) - location = Object(esm_extends["a" /* default */])({}, path); - if (location.pathname === undefined) location.pathname = ''; +function isWCAdmin(url) { + return /admin.php\?page=wc-admin/.test(url); +} - if (location.search) { - if (location.search.charAt(0) !== '?') location.search = '?' + location.search; - } else { - location.search = ''; - } +/***/ }), +/* 232 */, +/* 233 */ +/***/ (function(module, exports) { - if (location.hash) { - if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; - } else { - location.hash = ''; - } +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; - if (state !== undefined && location.state === undefined) location.state = state; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; } - try { - location.pathname = decodeURI(location.pathname); - } catch (e) { - if (e instanceof URIError) { - throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); - } else { - throw e; - } - } + return target; +} - if (key) location.key = key; +module.exports = _objectWithoutPropertiesLoose; - if (currentLocation) { - // Resolve incomplete/relative pathname relative to current location. - if (!location.pathname) { - location.pathname = currentLocation.pathname; - } else if (location.pathname.charAt(0) !== '/') { - location.pathname = resolve_pathname(location.pathname, currentLocation.pathname); +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var bind = __webpack_require__(94); +var toObject = __webpack_require__(38); +var callWithSafeIterationClosing = __webpack_require__(252); +var isArrayIteratorMethod = __webpack_require__(171); +var toLength = __webpack_require__(34); +var createProperty = __webpack_require__(102); +var getIteratorMethod = __webpack_require__(155); + +// `Array.from` method implementation +// https://tc39.es/ecma262/#sec-array.from +module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iteratorMethod = getIteratorMethod(O); + var index = 0; + var length, result, step, iterator, next, value; + if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); + // if the target is not iterable or it's an array with the default iterator - use a simple case + if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { + iterator = iteratorMethod.call(O); + next = iterator.next; + result = new C(); + for (;!(step = next.call(iterator)).done; index++) { + value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; + createProperty(result, index, value); } } else { - // When there is no prior location and pathname is empty, set it to / - if (!location.pathname) { - location.pathname = '/'; + length = toLength(O.length); + result = new C(length); + for (;length > index; index++) { + value = mapping ? mapfn(O[index], index) : O[index]; + createProperty(result, index, value); } } + result.length = index; + return result; +}; - return location; -} -function locationsAreEqual(a, b) { - return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state); -} - -function createTransitionManager() { - var prompt = null; - function setPrompt(nextPrompt) { - false ? undefined : void 0; - prompt = nextPrompt; - return function () { - if (prompt === nextPrompt) prompt = null; - }; - } +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { - function confirmTransitionTo(location, action, getUserConfirmation, callback) { - // TODO: If another transition starts while we're still confirming - // the previous one, we may end up in a weird state. Figure out the - // best way to handle this. - if (prompt != null) { - var result = typeof prompt === 'function' ? prompt(location, action) : prompt; +"use strict"; - if (typeof result === 'string') { - if (typeof getUserConfirmation === 'function') { - getUserConfirmation(result, callback); - } else { - false ? undefined : void 0; - callback(true); - } - } else { - // Return false from a transition hook to cancel the transition. - callback(result !== false); - } - } else { - callback(true); - } - } +var defineProperty = __webpack_require__(17).f; +var create = __webpack_require__(69); +var redefineAll = __webpack_require__(152); +var bind = __webpack_require__(94); +var anInstance = __webpack_require__(136); +var iterate = __webpack_require__(154); +var defineIterator = __webpack_require__(166); +var setSpecies = __webpack_require__(153); +var DESCRIPTORS = __webpack_require__(13); +var fastKey = __webpack_require__(205).fastKey; +var InternalStateModule = __webpack_require__(45); + +var setInternalState = InternalStateModule.set; +var internalStateGetterFor = InternalStateModule.getterFor; - var listeners = []; +module.exports = { + getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, CONSTRUCTOR_NAME); + setInternalState(that, { + type: CONSTRUCTOR_NAME, + index: create(null), + first: undefined, + last: undefined, + size: 0 + }); + if (!DESCRIPTORS) that.size = 0; + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + }); - function appendListener(fn) { - var isActive = true; + var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); - function listener() { - if (isActive) fn.apply(void 0, arguments); - } + var define = function (that, key, value) { + var state = getInternalState(that); + var entry = getEntry(that, key); + var previous, index; + // change existing entry + if (entry) { + entry.value = value; + // create new entry + } else { + state.last = entry = { + index: index = fastKey(key, true), + key: key, + value: value, + previous: previous = state.last, + next: undefined, + removed: false + }; + if (!state.first) state.first = entry; + if (previous) previous.next = entry; + if (DESCRIPTORS) state.size++; + else that.size++; + // add to index + if (index !== 'F') state.index[index] = entry; + } return that; + }; - listeners.push(listener); - return function () { - isActive = false; - listeners = listeners.filter(function (item) { - return item !== listener; - }); + var getEntry = function (that, key) { + var state = getInternalState(that); + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return state.index[index]; + // frozen object case + for (entry = state.first; entry; entry = entry.next) { + if (entry.key == key) return entry; + } }; - } - function notifyListeners() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + var that = this; + var state = getInternalState(that); + var data = state.index; + var entry = state.first; + while (entry) { + entry.removed = true; + if (entry.previous) entry.previous = entry.previous.next = undefined; + delete data[entry.index]; + entry = entry.next; + } + state.first = state.last = undefined; + if (DESCRIPTORS) state.size = 0; + else that.size = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = this; + var state = getInternalState(that); + var entry = getEntry(that, key); + if (entry) { + var next = entry.next; + var prev = entry.previous; + delete state.index[entry.index]; + entry.removed = true; + if (prev) prev.next = next; + if (next) next.previous = prev; + if (state.first == entry) state.first = next; + if (state.last == entry) state.last = prev; + if (DESCRIPTORS) state.size--; + else that.size--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + var state = getInternalState(this); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.next : state.first) { + boundFunction(entry.value, entry.key, this); + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(this, key); + } + }); - listeners.forEach(function (listener) { - return listener.apply(void 0, args); + redefineAll(C.prototype, IS_MAP ? { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = getEntry(this, key); + return entry && entry.value; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return define(this, key === 0 ? 0 : key, value); + } + } : { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return define(this, value = value === 0 ? 0 : value, value); + } + }); + if (DESCRIPTORS) defineProperty(C.prototype, 'size', { + get: function () { + return getInternalState(this).size; + } }); + return C; + }, + setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) { + var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; + var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); + var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) { + setInternalState(this, { + type: ITERATOR_NAME, + target: iterated, + state: getInternalCollectionState(iterated), + kind: kind, + last: undefined + }); + }, function () { + var state = getInternalIteratorState(this); + var kind = state.kind; + var entry = state.last; + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + // get next entry + if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { + // or finish the iteration + state.target = undefined; + return { value: undefined, done: true }; + } + // return step by kind + if (kind == 'keys') return { value: entry.key, done: false }; + if (kind == 'values') return { value: entry.value, done: false }; + return { value: [entry.key, entry.value], done: false }; + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(CONSTRUCTOR_NAME); } +}; - return { - setPrompt: setPrompt, - confirmTransitionTo: confirmTransitionTo, - appendListener: appendListener, - notifyListeners: notifyListeners - }; -} -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -function getConfirmation(message, callback) { - callback(window.confirm(message)); // eslint-disable-line no-alert -} -/** - * Returns true if the HTML5 history API is supported. Taken from Modernizr. - * - * https://github.com/Modernizr/Modernizr/blob/master/LICENSE - * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js - * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 - */ +/***/ }), +/* 236 */, +/* 237 */, +/* 238 */, +/* 239 */, +/* 240 */, +/* 241 */, +/* 242 */, +/* 243 */, +/* 244 */, +/* 245 */, +/* 246 */, +/* 247 */ +/***/ (function(module, exports) { -function supportsHistory() { - var ua = window.navigator.userAgent; - if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; - return window.history && 'pushState' in window.history; -} -/** - * Returns true if browser fires popstate on hash change. - * IE10 and IE11 do not. - */ +(function() { module.exports = window["wc"]["currency"]; }()); -function supportsPopStateOnHashChange() { - return window.navigator.userAgent.indexOf('Trident') === -1; -} -/** - * Returns false if using go(n) with hash history causes a full page reload. - */ +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { -function supportsGoWithoutReloadUsingHash() { - return window.navigator.userAgent.indexOf('Firefox') === -1; -} -/** - * Returns true if a given popstate event is an extraneous WebKit event. - * Accounts for the fact that Chrome on iOS fires real popstate events - * containing undefined state when pressing the back button. - */ +"use strict"; -function isExtraneousPopstateEvent(event) { - return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; -} +var collection = __webpack_require__(229); +var collectionStrong = __webpack_require__(235); -var PopStateEvent = 'popstate'; -var HashChangeEvent = 'hashchange'; +// `Set` constructor +// https://tc39.es/ecma262/#sec-set-objects +module.exports = collection('Set', function (init) { + return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; +}, collectionStrong); -function getHistoryState() { - try { - return window.history.state || {}; - } catch (e) { - // IE 11 sometimes throws when accessing window.history.state - // See https://github.com/ReactTraining/history/pull/289 - return {}; - } -} -/** - * Creates a history object that uses the HTML5 history API including - * pushState, replaceState, and the popstate event. - */ +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { -function createBrowserHistory(props) { - if (props === void 0) { - props = {}; - } +var DESCRIPTORS = __webpack_require__(13); +var objectKeys = __webpack_require__(54); +var toIndexedObject = __webpack_require__(21); +var propertyIsEnumerable = __webpack_require__(76).f; + +// `Object.{ entries, values }` methods implementation +var createMethod = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) { + result.push(TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; - !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; - var globalHistory = window.history; - var canUseHistory = supportsHistory(); - var needsHashChangeListener = !supportsPopStateOnHashChange(); - var _props = props, - _props$forceRefresh = _props.forceRefresh, - forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh, - _props$getUserConfirm = _props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, - _props$keyLength = _props.keyLength, - keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; - var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; +module.exports = { + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + entries: createMethod(true), + // `Object.values` method + // https://tc39.es/ecma262/#sec-object.values + values: createMethod(false) +}; - function getDOMLocation(historyState) { - var _ref = historyState || {}, - key = _ref.key, - state = _ref.state; - var _window$location = window.location, - pathname = _window$location.pathname, - search = _window$location.search, - hash = _window$location.hash; - var path = pathname + search + hash; - false ? undefined : void 0; - if (basename) path = stripBasename(path, basename); - return createLocation(path, state, key); - } +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { - function createKey() { - return Math.random().toString(36).substr(2, keyLength); - } +var $ = __webpack_require__(12); +var assign = __webpack_require__(221); - var transitionManager = createTransitionManager(); +// `Object.assign` method +// https://tc39.es/ecma262/#sec-object.assign +$({ target: 'Object', stat: true, forced: Object.assign !== assign }, { + assign: assign +}); - function setState(nextState) { - Object(esm_extends["a" /* default */])(history, nextState); - history.length = globalHistory.length; - transitionManager.notifyListeners(history.location, history.action); - } +/***/ }), +/* 251 */, +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { - function handlePopState(event) { - // Ignore extraneous popstate events in WebKit. - if (isExtraneousPopstateEvent(event)) return; - handlePop(getDOMLocation(event.state)); - } +var anObject = __webpack_require__(9); +var iteratorClose = __webpack_require__(172); - function handleHashChange() { - handlePop(getDOMLocation(getHistoryState())); +// call something on iterator step with safe closing on error +module.exports = function (iterator, fn, value, ENTRIES) { + try { + return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (error) { + iteratorClose(iterator); + throw error; } +}; - var forceNextPop = false; - function handlePop(location) { - if (forceNextPop) { - forceNextPop = false; - setState(); - } else { - var action = 'POP'; - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ - action: action, - location: location - }); - } else { - revertPop(location); - } - }); - } - } +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { - function revertPop(fromLocation) { - var toLocation = history.location; // TODO: We could probably make this more reliable by - // keeping a list of keys we've seen in sessionStorage. - // Instead, we just default to 0 for keys we don't know. +var fails = __webpack_require__(6); - var toIndex = allKeys.indexOf(toLocation.key); - if (toIndex === -1) toIndex = 0; - var fromIndex = allKeys.indexOf(fromLocation.key); - if (fromIndex === -1) fromIndex = 0; - var delta = toIndex - fromIndex; +module.exports = !fails(function () { + return Object.isExtensible(Object.preventExtensions({})); +}); - if (delta) { - forceNextPop = true; - go(delta); - } - } - var initialLocation = getDOMLocation(getHistoryState()); - var allKeys = [initialLocation.key]; // Public interface +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { - function createHref(location) { - return basename + createPath(location); - } +var fails = __webpack_require__(6); +var wellKnownSymbol = __webpack_require__(8); +var IS_PURE = __webpack_require__(57); - function push(path, state) { - false ? undefined : void 0; - var action = 'PUSH'; - var location = createLocation(path, state, createKey(), history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - var href = createHref(location); - var key = location.key, - state = location.state; +var ITERATOR = wellKnownSymbol('iterator'); - if (canUseHistory) { - globalHistory.pushState({ - key: key, - state: state - }, null, href); +module.exports = !fails(function () { + var url = new URL('b?a=1&b=2&c=3', 'http://a'); + var searchParams = url.searchParams; + var result = ''; + url.pathname = 'c%20d'; + searchParams.forEach(function (value, key) { + searchParams['delete']('b'); + result += key + value; + }); + return (IS_PURE && !url.toJSON) + || !searchParams.sort + || url.href !== 'http://a/c%20d?a=1&c=3' + || searchParams.get('c') !== '3' + || String(new URLSearchParams('?a=1')) !== 'a=1' + || !searchParams[ITERATOR] + // throws in Edge + || new URL('https://a@b').username !== 'a' + || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' + // not punycoded in Edge + || new URL('http://тест').host !== 'xn--e1aybc' + // not escaped in Chrome 62- + || new URL('http://a#б').hash !== '#%D0%B1' + // fails in Chrome 66- + || result !== 'a1c3' + // throws in Safari + || new URL('http://x', undefined).host !== 'x'; +}); - if (forceRefresh) { - window.location.href = href; - } else { - var prevIndex = allKeys.indexOf(history.location.key); - var nextKeys = allKeys.slice(0, prevIndex + 1); - nextKeys.push(location.key); - allKeys = nextKeys; - setState({ - action: action, - location: location - }); - } - } else { - false ? undefined : void 0; - window.location.href = href; - } - }); - } - function replace(path, state) { - false ? undefined : void 0; - var action = 'REPLACE'; - var location = createLocation(path, state, createKey(), history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - var href = createHref(location); - var key = location.key, - state = location.state; - - if (canUseHistory) { - globalHistory.replaceState({ - key: key, - state: state - }, null, href); +/***/ }), +/* 255 */, +/* 256 */, +/* 257 */, +/* 258 */, +/* 259 */, +/* 260 */, +/* 261 */, +/* 262 */ +/***/ (function(module, exports) { - if (forceRefresh) { - window.location.replace(href); - } else { - var prevIndex = allKeys.indexOf(history.location.key); - if (prevIndex !== -1) allKeys[prevIndex] = location.key; - setState({ - action: action, - location: location - }); - } - } else { - false ? undefined : void 0; - window.location.replace(href); - } - }); - } +(function() { module.exports = window["wp"]["dom"]; }()); - function go(n) { - globalHistory.go(n); - } +/***/ }), +/* 263 */, +/* 264 */, +/* 265 */, +/* 266 */, +/* 267 */, +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { - function goBack() { - go(-1); - } +"use strict"; - function goForward() { - go(1); - } - var listenerCount = 0; +if (true) { + module.exports = __webpack_require__(298); +} else {} - function checkDOMListeners(delta) { - listenerCount += delta; - if (listenerCount === 1 && delta === 1) { - window.addEventListener(PopStateEvent, handlePopState); - if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange); - } else if (listenerCount === 0) { - window.removeEventListener(PopStateEvent, handlePopState); - if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange); - } - } +/***/ }), +/* 269 */, +/* 270 */, +/* 271 */, +/* 272 */, +/* 273 */, +/* 274 */, +/* 275 */, +/* 276 */, +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var isBlocked = false; +"use strict"; +/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(164); +/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100); +/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151); +/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(123); +/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(146); +/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41); +/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(141); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(85); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__); - function block(prompt) { - if (prompt === void 0) { - prompt = false; - } - var unblock = transitionManager.setPrompt(prompt); - if (!isBlocked) { - checkDOMListeners(1); - isBlocked = true; - } - return function () { - if (isBlocked) { - isBlocked = false; - checkDOMListeners(-1); - } - return unblock(); - }; - } - function listen(listener) { - var unlisten = transitionManager.appendListener(listener); - checkDOMListeners(1); - return function () { - checkDOMListeners(-1); - unlisten(); - }; - } - var history = { - length: globalHistory.length, - action: 'POP', - location: initialLocation, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - block: block, - listen: listen - }; - return history; -} +/** + * External dependencies + */ -var HashChangeEvent$1 = 'hashchange'; -var HashPathCoders = { - hashbang: { - encodePath: function encodePath(path) { - return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path); - }, - decodePath: function decodePath(path) { - return path.charAt(0) === '!' ? path.substr(1) : path; - } - }, - noslash: { - encodePath: stripLeadingSlash, - decodePath: addLeadingSlash - }, - slash: { - encodePath: addLeadingSlash, - decodePath: addLeadingSlash - } -}; -function stripHash(url) { - var hashIndex = url.indexOf('#'); - return hashIndex === -1 ? url : url.slice(0, hashIndex); -} -function getHashPath() { - // We can't use window.location.hash here because it's not - // consistent across browsers - Firefox will pre-decode it! - var href = window.location.href; - var hashIndex = href.indexOf('#'); - return hashIndex === -1 ? '' : href.substring(hashIndex + 1); -} -function pushHashPath(path) { - window.location.hash = path; -} +var manageStock = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_8__[/* getSetting */ "g"])('manageStock', 'no'); +var REPORTS_FILTER = 'woocommerce_admin_reports_list'; +/** + * Internal dependencies + */ -function replaceHashPath(path) { - window.location.replace(stripHash(window.location.href) + '#' + path); -} +var RevenueReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-revenue */[__webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, 584)); +}); +var ProductsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-products */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 580)); +}); +var VariationsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, 585)); +}); +var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(5), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 586)); +}); +var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 582)); +}); +var CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 587)); +}); +var TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(0), __webpack_require__.e(18)]).then(__webpack_require__.bind(null, 588)); +}); +var DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 589)); +}); +var StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-stock */[__webpack_require__.e(0), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, 581)); +}); +var CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () { + return Promise.all(/* import() | analytics-report-customers */[__webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 583)); +}); +/* harmony default export */ __webpack_exports__["a"] = (function () { + var reports = [{ + report: 'revenue', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Revenue', 'woocommerce-admin'), + component: RevenueReport, + navArgs: { + id: 'woocommerce-analytics-revenue' + } + }, { + report: 'products', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Products', 'woocommerce-admin'), + component: ProductsReport, + navArgs: { + id: 'woocommerce-analytics-products' + } + }, { + report: 'variations', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Variations', 'woocommerce-admin'), + component: VariationsReport, + navArgs: { + id: 'woocommerce-analytics-variations' + } + }, { + report: 'orders', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Orders', 'woocommerce-admin'), + component: OrdersReport, + navArgs: { + id: 'woocommerce-analytics-orders' + } + }, { + report: 'categories', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Categories', 'woocommerce-admin'), + component: CategoriesReport, + navArgs: { + id: 'woocommerce-analytics-categories' + } + }, { + report: 'coupons', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Coupons', 'woocommerce-admin'), + component: CouponsReport, + navArgs: { + id: 'woocommerce-analytics-coupons' + } + }, { + report: 'taxes', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Taxes', 'woocommerce-admin'), + component: TaxesReport, + navArgs: { + id: 'woocommerce-analytics-taxes' + } + }, manageStock === 'yes' ? { + report: 'stock', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Stock', 'woocommerce-admin'), + component: StockReport, + navArgs: { + id: 'woocommerce-analytics-stock' + } + } : null, { + report: 'customers', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Customers', 'woocommerce-admin'), + component: CustomersReport + }, { + report: 'downloads', + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Downloads', 'woocommerce-admin'), + component: DownloadsReport, + navArgs: { + id: 'woocommerce-analytics-downloads' + } + }].filter(Boolean); + return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__["applyFilters"])(REPORTS_FILTER, reports); +}); -function createHashHistory(props) { - if (props === void 0) { - props = {}; - } +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { - !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; - var globalHistory = window.history; - var canGoWithoutReload = supportsGoWithoutReloadUsingHash(); - var _props = props, - _props$getUserConfirm = _props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, - _props$hashType = _props.hashType, - hashType = _props$hashType === void 0 ? 'slash' : _props$hashType; - var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; - var _HashPathCoders$hashT = HashPathCoders[hashType], - encodePath = _HashPathCoders$hashT.encodePath, - decodePath = _HashPathCoders$hashT.decodePath; +"use strict"; - function getDOMLocation() { - var path = decodePath(getHashPath()); - false ? undefined : void 0; - if (basename) path = stripBasename(path, basename); - return createLocation(path); - } - var transitionManager = createTransitionManager(); +var reactIs = __webpack_require__(268); - function setState(nextState) { - Object(esm_extends["a" /* default */])(history, nextState); +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true +}; +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true +}; +var FORWARD_REF_STATICS = { + '$$typeof': true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true +}; +var MEMO_STATICS = { + '$$typeof': true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true +}; +var TYPE_STATICS = {}; +TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; +TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; - history.length = globalHistory.length; - transitionManager.notifyListeners(history.location, history.action); - } +function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above - var forceNextPop = false; - var ignorePath = null; - function locationsAreEqual$$1(a, b) { - return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash; - } + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; +} - function handleHashChange() { - var path = getHashPath(); - var encodedPath = encodePath(path); +var defineProperty = Object.defineProperty; +var getOwnPropertyNames = Object.getOwnPropertyNames; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var getPrototypeOf = Object.getPrototypeOf; +var objectPrototype = Object.prototype; +function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); - if (path !== encodedPath) { - // Ensure we always have a properly-encoded hash. - replaceHashPath(encodedPath); - } else { - var location = getDOMLocation(); - var prevLocation = history.location; - if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change. + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } - if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace. + var keys = getOwnPropertyNames(sourceComponent); - ignorePath = null; - handlePop(location); + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } - } - function handlePop(location) { - if (forceNextPop) { - forceNextPop = false; - setState(); - } else { - var action = 'POP'; - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ - action: action, - location: location - }); - } else { - revertPop(location); - } - }); - } - } + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); - function revertPop(fromLocation) { - var toLocation = history.location; // TODO: We could probably make this more reliable by - // keeping a list of paths we've seen in sessionStorage. - // Instead, we just default to 0 for paths we don't know. + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; - var toIndex = allPaths.lastIndexOf(createPath(toLocation)); - if (toIndex === -1) toIndex = 0; - var fromIndex = allPaths.lastIndexOf(createPath(fromLocation)); - if (fromIndex === -1) fromIndex = 0; - var delta = toIndex - fromIndex; + if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); - if (delta) { - forceNextPop = true; - go(delta); + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } } - } // Ensure the hash is encoded properly before doing anything else. + } + return targetComponent; +} - var path = getHashPath(); - var encodedPath = encodePath(path); - if (path !== encodedPath) replaceHashPath(encodedPath); - var initialLocation = getDOMLocation(); - var allPaths = [createPath(initialLocation)]; // Public interface +module.exports = hoistNonReactStatics; - function createHref(location) { - var baseTag = document.querySelector('base'); - var href = ''; - if (baseTag && baseTag.getAttribute('href')) { - href = stripHash(window.location.href); - } +/***/ }), +/* 279 */ +/***/ (function(module, exports) { - return href + '#' + encodePath(basename + createPath(location)); - } +(function() { module.exports = window["wp"]["plugins"]; }()); - function push(path, state) { - false ? undefined : void 0; - var action = 'PUSH'; - var location = createLocation(path, undefined, undefined, history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - var path = createPath(location); - var encodedPath = encodePath(basename + path); - var hashChanged = getHashPath() !== encodedPath; +/***/ }), +/* 280 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (hashChanged) { - // We cannot tell if a hashchange was caused by a PUSH, so we'd - // rather setState here and ignore the hashchange. The caveat here - // is that other hash histories in the page will consider it a POP. - ignorePath = path; - pushHashPath(encodedPath); - var prevIndex = allPaths.lastIndexOf(createPath(history.location)); - var nextPaths = allPaths.slice(0, prevIndex + 1); - nextPaths.push(path); - allPaths = nextPaths; - setState({ - action: action, - location: location - }); - } else { - false ? undefined : void 0; - setState(); - } - }); - } +"use strict"; - function replace(path, state) { - false ? undefined : void 0; - var action = 'REPLACE'; - var location = createLocation(path, undefined, undefined, history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - var path = createPath(location); - var encodedPath = encodePath(basename + path); - var hashChanged = getHashPath() !== encodedPath; +// EXPORTS +__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ EmbedLayout; }); - if (hashChanged) { - // We cannot tell if a hashchange was caused by a REPLACE, so we'd - // rather setState here and ignore the hashchange. The caveat here - // is that other hash histories in the page will consider it a POP. - ignorePath = path; - replaceHashPath(encodedPath); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.construct.js +var es_reflect_construct = __webpack_require__(64); - var prevIndex = allPaths.indexOf(createPath(history.location)); - if (prevIndex !== -1) allPaths[prevIndex] = path; - setState({ - action: action, - location: location - }); - }); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js +var es_object_keys = __webpack_require__(37); - function go(n) { - false ? undefined : void 0; - globalHistory.go(n); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js +var es_symbol = __webpack_require__(53); - function goBack() { - go(-1); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js +var es_object_get_own_property_descriptor = __webpack_require__(60); - function goForward() { - go(1); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js +var web_dom_collections_for_each = __webpack_require__(49); - var listenerCount = 0; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js +var es_object_get_own_property_descriptors = __webpack_require__(61); - function checkDOMListeners(delta) { - listenerCount += delta; +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__(80); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); - if (listenerCount === 1 && delta === 1) { - window.addEventListener(HashChangeEvent$1, handleHashChange); - } else if (listenerCount === 0) { - window.removeEventListener(HashChangeEvent$1, handleHashChange); - } - } +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__(116); +var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); - var isBlocked = false; +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__(7); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); - function block(prompt) { - if (prompt === void 0) { - prompt = false; - } +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js +var classCallCheck = __webpack_require__(22); +var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); - var unblock = transitionManager.setPrompt(prompt); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js +var createClass = __webpack_require__(23); +var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); - if (!isBlocked) { - checkDOMListeners(1); - isBlocked = true; - } +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js +var inherits = __webpack_require__(24); +var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); - return function () { - if (isBlocked) { - isBlocked = false; - checkDOMListeners(-1); - } - - return unblock(); - }; - } - - function listen(listener) { - var unlisten = transitionManager.appendListener(listener); - checkDOMListeners(1); - return function () { - checkDOMListeners(-1); - unlisten(); - }; - } - - var history = { - length: globalHistory.length, - action: 'POP', - location: initialLocation, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - block: block, - listen: listen - }; - return history; -} - -function clamp(n, lowerBound, upperBound) { - return Math.min(Math.max(n, lowerBound), upperBound); -} -/** - * Creates a history object that stores locations in memory. - */ +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +var possibleConstructorReturn = __webpack_require__(25); +var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js +var getPrototypeOf = __webpack_require__(14); +var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf); -function createMemoryHistory(props) { - if (props === void 0) { - props = {}; - } +// EXTERNAL MODULE: external ["wp","element"] +var external_wp_element_ = __webpack_require__(0); - var _props = props, - getUserConfirmation = _props.getUserConfirmation, - _props$initialEntries = _props.initialEntries, - initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries, - _props$initialIndex = _props.initialIndex, - initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, - _props$keyLength = _props.keyLength, - keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; - var transitionManager = createTransitionManager(); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js +var es_promise = __webpack_require__(164); - function setState(nextState) { - Object(esm_extends["a" /* default */])(history, nextState); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js +var es_object_to_string = __webpack_require__(100); - history.length = history.entries.length; - transitionManager.notifyListeners(history.location, history.action); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js +var es_string_iterator = __webpack_require__(151); - function createKey() { - return Math.random().toString(36).substr(2, keyLength); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js +var es_array_iterator = __webpack_require__(123); - var index = clamp(initialIndex, 0, initialEntries.length - 1); - var entries = initialEntries.map(function (entry) { - return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey()); - }); // Public interface +// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js +var web_dom_collections_iterator = __webpack_require__(146); - var createHref = createPath; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js +var es_string_search = __webpack_require__(170); - function push(path, state) { - false ? undefined : void 0; - var action = 'PUSH'; - var location = createLocation(path, state, createKey(), history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - var prevIndex = history.index; - var nextIndex = prevIndex + 1; - var nextEntries = history.entries.slice(0); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js +var es_regexp_exec = __webpack_require__(88); - if (nextEntries.length > nextIndex) { - nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); - } else { - nextEntries.push(location); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js +var es_string_replace = __webpack_require__(135); - setState({ - action: action, - location: location, - index: nextIndex, - entries: nextEntries - }); - }); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js +var es_array_includes = __webpack_require__(107); - function replace(path, state) { - false ? undefined : void 0; - var action = 'REPLACE'; - var location = createLocation(path, state, createKey(), history.location); - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; - history.entries[history.index] = location; - setState({ - action: action, - location: location - }); - }); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js +var es_string_includes = __webpack_require__(140); - function go(n) { - var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); - var action = 'POP'; - var location = history.entries[nextIndex]; - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ - action: action, - location: location, - index: nextIndex - }); - } else { - // Mimic the behavior of DOM histories by - // causing a render after a cancelled POP. - setState(); - } - }); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js +var es_array_map = __webpack_require__(51); - function goBack() { - go(-1); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js +var es_array_filter = __webpack_require__(41); - function goForward() { - go(1); - } +// EXTERNAL MODULE: external ["wp","compose"] +var external_wp_compose_ = __webpack_require__(65); - function canGo(n) { - var nextIndex = history.index + n; - return nextIndex >= 0 && nextIndex < history.entries.length; - } +// EXTERNAL MODULE: external ["wp","data"] +var external_wp_data_ = __webpack_require__(26); - function block(prompt) { - if (prompt === void 0) { - prompt = false; - } +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules +var inheritsLoose = __webpack_require__(128); - return transitionManager.setPrompt(prompt); - } +// EXTERNAL MODULE: external "React" +var external_React_ = __webpack_require__(20); +var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); - function listen(listener) { - return transitionManager.appendListener(listener); - } +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__(1); +var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); - var history = { - length: entries.length, - action: 'POP', - location: entries[index], - index: index, - entries: entries, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - canGo: canGo, - block: block, - listen: listen - }; - return history; -} +// EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules +var esm_history = __webpack_require__(202); +// EXTERNAL MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js +var esm = __webpack_require__(316); +// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js +var tiny_invariant_esm = __webpack_require__(176); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(117); -/***/ }), -/* 109 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// EXTERNAL MODULE: ./node_modules/path-to-regexp/index.js +var path_to_regexp = __webpack_require__(317); +var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp); -"use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); -/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17); -/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12); -/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18); -/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21); -/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(77); -/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(57); -/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69); +// EXTERNAL MODULE: ./node_modules/react-is/index.js +var react_is = __webpack_require__(268); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +var objectWithoutPropertiesLoose = __webpack_require__(133); +// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +var hoist_non_react_statics_cjs = __webpack_require__(278); +var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); +// CONCATENATED MODULE: ./node_modules/react-router/esm/react-router.js -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, result); }; } -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } -/** - * WordPress dependencies - */ -var withConstrainedTabbing = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(function (WrappedComponent) { - return /*#__PURE__*/function (_Component) { - Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class, _Component); - var _super = _createSuper(_class); - function _class() { - var _this; +// TODO: Replace with React.createContext once we can assume React 16+ - Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, _class); +var react_router_createNamedContext = function createNamedContext(name) { + var context = Object(esm["a" /* default */])(); + context.displayName = name; + return context; +}; - _this = _super.apply(this, arguments); - _this.focusContainRef = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createRef"])(); - _this.handleTabBehaviour = _this.handleTabBehaviour.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this)); - return _this; - } +var historyContext = +/*#__PURE__*/ +react_router_createNamedContext("Router-History"); - Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class, [{ - key: "handleTabBehaviour", - value: function handleTabBehaviour(event) { - if (event.keyCode !== _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__[/* TAB */ "e"]) { - return; - } +// TODO: Replace with React.createContext once we can assume React 16+ - var tabbables = _wordpress_dom__WEBPACK_IMPORTED_MODULE_9__[/* focus */ "a"].tabbable.find(this.focusContainRef.current); +var createNamedContext$1 = function createNamedContext(name) { + var context = Object(esm["a" /* default */])(); + context.displayName = name; + return context; +}; - if (!tabbables.length) { - return; - } +var react_router_context = +/*#__PURE__*/ +createNamedContext$1("Router"); - var firstTabbable = tabbables[0]; - var lastTabbable = tabbables[tabbables.length - 1]; - - if (event.shiftKey && event.target === firstTabbable) { - event.preventDefault(); - lastTabbable.focus(); - } else if (!event.shiftKey && event.target === lastTabbable) { - event.preventDefault(); - firstTabbable.focus(); - /* - * When pressing Tab and none of the tabbables has focus, the keydown - * event happens on the wrapper div: move focus on the first tabbable. - */ - } else if (!tabbables.includes(event.target)) { - event.preventDefault(); - firstTabbable.focus(); - } - } - }, { - key: "render", - value: function render() { - // Disable reason: this component is non-interactive, but must capture - // events from the wrapped component to determine when the Tab key is used. - - /* eslint-disable jsx-a11y/no-static-element-interactions */ - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { - onKeyDown: this.handleTabBehaviour, - ref: this.focusContainRef, - tabIndex: "-1" - }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(WrappedComponent, this.props)); - /* eslint-enable jsx-a11y/no-static-element-interactions */ - } - }]); +/** + * The public API for putting history on context. + */ - return _class; - }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); -}, 'withConstrainedTabbing'); -/* harmony default export */ __webpack_exports__["a"] = (withConstrainedTabbing); -//# sourceMappingURL=index.js.map +var react_router_Router = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(Router, _React$Component); -/***/ }), -/* 110 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + Router.computeRootMatch = function computeRootMatch(pathname) { + return { + path: "/", + url: "/", + params: {}, + isExact: pathname === "/" + }; + }; -"use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); -/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); -/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17); -/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); -/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18); -/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21); -/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(77); + function Router(props) { + var _this; + _this = _React$Component.call(this, props) || this; + _this.state = { + location: props.history.location + }; // This is a bit of a hack. We have to start listening for location + // changes here in the constructor in case there are any s + // on the initial render. If there are, they will replace/push when + // they mount and since cDM fires in children before parents, we may + // get a new location before the is mounted. + _this._isMounted = false; + _this._pendingLocation = null; + if (!props.staticContext) { + _this.unlisten = props.history.listen(function (location) { + if (_this._isMounted) { + _this.setState({ + location: location + }); + } else { + _this._pendingLocation = location; + } + }); + } + return _this; + } + var _proto = Router.prototype; + _proto.componentDidMount = function componentDidMount() { + this._isMounted = true; + if (this._pendingLocation) { + this.setState({ + location: this._pendingLocation + }); + } + }; + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.unlisten) this.unlisten(); + }; -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, result); }; } + _proto.render = function render() { + return external_React_default.a.createElement(react_router_context.Provider, { + value: { + history: this.props.history, + location: this.state.location, + match: Router.computeRootMatch(this.state.location.pathname), + staticContext: this.props.staticContext + } + }, external_React_default.a.createElement(historyContext.Provider, { + children: this.props.children || null, + value: this.props.history + })); + }; -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + return Router; +}(external_React_default.a.Component); -/** - * External dependencies - */ +if (false) {} /** - * WordPress dependencies + * The public API for a that stores location in memory. */ +var react_router_MemoryRouter = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component); + function MemoryRouter() { + var _this; -/** - * Input types which are classified as button types, for use in considering - * whether element is a (focus-normalized) button. - * - * @type {string[]} - */ - -var INPUT_BUTTON_TYPES = ['button', 'submit']; -/** - * Returns true if the given element is a button element subject to focus - * normalization, or false otherwise. - * - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus - * - * @param {Element} element Element to test. - * - * @return {boolean} Whether element is a button. - */ - -function isFocusNormalizedButton(element) { - switch (element.nodeName) { - case 'A': - case 'BUTTON': - return true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - case 'INPUT': - return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])(INPUT_BUTTON_TYPES, element.type); + _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; + _this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props); + return _this; } - return false; -} - -/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(function (WrappedComponent) { - return /*#__PURE__*/function (_Component) { - Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_class, _Component); - - var _super = _createSuper(_class); - - function _class() { - var _this; - - Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, _class); - - _this = _super.apply(this, arguments); - _this.bindNode = _this.bindNode.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this)); - _this.cancelBlurCheck = _this.cancelBlurCheck.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this)); - _this.queueBlurCheck = _this.queueBlurCheck.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this)); - _this.normalizeButtonFocus = _this.normalizeButtonFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this)); - return _this; - } - - Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class, [{ - key: "componentWillUnmount", - value: function componentWillUnmount() { - this.cancelBlurCheck(); - } - }, { - key: "bindNode", - value: function bindNode(node) { - if (node) { - this.node = node; - } else { - delete this.node; - this.cancelBlurCheck(); - } - } - }, { - key: "queueBlurCheck", - value: function queueBlurCheck(event) { - var _this2 = this; + var _proto = MemoryRouter.prototype; - // React does not allow using an event reference asynchronously - // due to recycling behavior, except when explicitly persisted. - event.persist(); // Skip blur check if clicking button. See `normalizeButtonFocus`. + _proto.render = function render() { + return external_React_default.a.createElement(react_router_Router, { + history: this.history, + children: this.props.children + }); + }; - if (this.preventBlurCheck) { - return; - } + return MemoryRouter; +}(external_React_default.a.Component); - this.blurCheckTimeout = setTimeout(function () { - // If document is not focused then focus should remain - // inside the wrapped component and therefore we cancel - // this blur event thereby leaving focus in place. - // https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus. - if (!document.hasFocus()) { - event.preventDefault(); - return; - } +if (false) {} - if ('function' === typeof _this2.node.handleFocusOutside) { - _this2.node.handleFocusOutside(event); - } - }, 0); - } - }, { - key: "cancelBlurCheck", - value: function cancelBlurCheck() { - clearTimeout(this.blurCheckTimeout); - } - /** - * Handles a mousedown or mouseup event to respectively assign and - * unassign a flag for preventing blur check on button elements. Some - * browsers, namely Firefox and Safari, do not emit a focus event on - * button elements when clicked, while others do. The logic here - * intends to normalize this as treating click on buttons as focus. - * - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus - * - * @param {MouseEvent} event Event for mousedown or mouseup. - */ +var react_router_Lifecycle = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(Lifecycle, _React$Component); - }, { - key: "normalizeButtonFocus", - value: function normalizeButtonFocus(event) { - var type = event.type, - target = event.target; - var isInteractionEnd = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])(['mouseup', 'touchend'], type); - - if (isInteractionEnd) { - this.preventBlurCheck = false; - } else if (isFocusNormalizedButton(target)) { - this.preventBlurCheck = true; - } - } - }, { - key: "render", - value: function render() { - // Disable reason: See `normalizeButtonFocus` for browser-specific - // focus event normalization. - - /* eslint-disable jsx-a11y/no-static-element-interactions */ - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { - onFocus: this.cancelBlurCheck, - onMouseDown: this.normalizeButtonFocus, - onMouseUp: this.normalizeButtonFocus, - onTouchStart: this.normalizeButtonFocus, - onTouchEnd: this.normalizeButtonFocus, - onBlur: this.queueBlurCheck - }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ - ref: this.bindNode - }, this.props))); - /* eslint-enable jsx-a11y/no-static-element-interactions */ - } - }]); + function Lifecycle() { + return _React$Component.apply(this, arguments) || this; + } - return _class; - }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); -}, 'withFocusOutside')); -//# sourceMappingURL=index.js.map + var _proto = Lifecycle.prototype; -/***/ }), -/* 111 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _proto.componentDidMount = function componentDidMount() { + if (this.props.onMount) this.props.onMount.call(this, this); + }; -"use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps); + }; + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.props.onUnmount) this.props.onUnmount.call(this, this); + }; + _proto.render = function render() { + return null; + }; + return Lifecycle; +}(external_React_default.a.Component); /** - * WordPress dependencies + * The public API for prompting the user before navigating away from a screen. */ - -function stopPropagation(event) { - event.stopPropagation(); +function Prompt(_ref) { + var message = _ref.message, + _ref$when = _ref.when, + when = _ref$when === void 0 ? true : _ref$when; + return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + if (!when || context.staticContext) return null; + var method = context.history.block; + return external_React_default.a.createElement(react_router_Lifecycle, { + onMount: function onMount(self) { + self.release = method(message); + }, + onUpdate: function onUpdate(self, prevProps) { + if (prevProps.message !== message) { + self.release(); + self.release = method(message); + } + }, + onUnmount: function onUnmount(self) { + self.release(); + }, + message: message + }); + }); } -/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["forwardRef"])(function (_ref, ref) { - var children = _ref.children, - props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["children"]); +if (false) { var messageType; } - // Disable reason: this stops certain events from propagating outside of the component. - // - onMouseDown is disabled as this can cause interactions with other DOM elements +var cache = {}; +var cacheLimit = 10000; +var cacheCount = 0; - /* eslint-disable jsx-a11y/no-static-element-interactions */ - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { - ref: ref, - onMouseDown: stopPropagation - }), children); - /* eslint-enable jsx-a11y/no-static-element-interactions */ -})); -//# sourceMappingURL=index.js.map +function compilePath(path) { + if (cache[path]) return cache[path]; + var generator = path_to_regexp_default.a.compile(path); -/***/ }), -/* 112 */, -/* 113 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (cacheCount < cacheLimit) { + cache[path] = generator; + cacheCount++; + } -"use strict"; + return generator; +} +/** + * Public API for generating a URL pathname from a path and parameters. + */ -// UNUSED EXPORTS: Provider -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules -var toConsumableArray = __webpack_require__(26); +function generatePath(path, params) { + if (path === void 0) { + path = "/"; + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js -var classCallCheck = __webpack_require__(16); + if (params === void 0) { + params = {}; + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js -var createClass = __webpack_require__(17); + return path === "/" ? path : compilePath(path)(params, { + pretty: true + }); +} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules -var inherits = __webpack_require__(18); +/** + * The public API for navigating programmatically with a component. + */ -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js -var possibleConstructorReturn = __webpack_require__(21); +function Redirect(_ref) { + var computedMatch = _ref.computedMatch, + to = _ref.to, + _ref$push = _ref.push, + push = _ref$push === void 0 ? false : _ref$push; + return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + var history = context.history, + staticContext = context.staticContext; + var method = push ? history.push : history.replace; + var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, { + pathname: generatePath(to.pathname, computedMatch.params) + }) : to); // When rendering in a static context, + // set the new location immediately. -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js -var getPrototypeOf = __webpack_require__(9); + if (staticContext) { + method(location); + return null; + } -// EXTERNAL MODULE: external {"this":["wp","element"]} -var external_this_wp_element_ = __webpack_require__(0); + return external_React_default.a.createElement(react_router_Lifecycle, { + onMount: function onMount() { + method(location); + }, + onUpdate: function onUpdate(self, prevProps) { + var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to); -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); + if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, { + key: prevLocation.key + }))) { + method(location); + } + }, + to: to + }); + }); +} -// EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js -var create_higher_order_component = __webpack_require__(77); +if (false) {} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -var assertThisInitialized = __webpack_require__(12); +var cache$1 = {}; +var cacheLimit$1 = 10000; +var cacheCount$1 = 0; -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-return/context.js +function compilePath$1(path, options) { + var cacheKey = "" + options.end + options.strict + options.sensitive; + var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {}); + if (pathCache[path]) return pathCache[path]; + var keys = []; + var regexp = path_to_regexp_default()(path, keys, options); + var result = { + regexp: regexp, + keys: keys + }; + if (cacheCount$1 < cacheLimit$1) { + pathCache[path] = result; + cacheCount$1++; + } + return result; +} +/** + * Public API for matching a URL pathname to a path. + */ +function matchPath(pathname, options) { + if (options === void 0) { + options = {}; + } + if (typeof options === "string" || Array.isArray(options)) { + options = { + path: options + }; + } + var _options = options, + path = _options.path, + _options$exact = _options.exact, + exact = _options$exact === void 0 ? false : _options$exact, + _options$strict = _options.strict, + strict = _options$strict === void 0 ? false : _options$strict, + _options$sensitive = _options.sensitive, + sensitive = _options$sensitive === void 0 ? false : _options$sensitive; + var paths = [].concat(path); + return paths.reduce(function (matched, path) { + if (!path && path !== "") return null; + if (matched) return matched; + var _compilePath = compilePath$1(path, { + end: exact, + strict: strict, + sensitive: sensitive + }), + regexp = _compilePath.regexp, + keys = _compilePath.keys; + var match = regexp.exec(pathname); + if (!match) return null; + var url = match[0], + values = match.slice(1); + var isExact = pathname === url; + if (exact && !isExact) return null; + return { + path: path, + // the path used to match + url: path === "/" && url === "" ? "/" : url, + // the matched portion of the URL + isExact: isExact, + // whether or not we matched exactly + params: keys.reduce(function (memo, key, index) { + memo[key.name] = values[index]; + return memo; + }, {}) + }; + }, null); +} -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -/** - * External dependencies - */ - -/** - * WordPress dependencies - */ - - - -var _createContext = Object(external_this_wp_element_["createContext"])({ - focusHistory: [] -}), - Provider = _createContext.Provider, - Consumer = _createContext.Consumer; +function isEmptyChildren(children) { + return external_React_default.a.Children.count(children) === 0; +} -Provider.displayName = 'FocusReturnProvider'; -Consumer.displayName = 'FocusReturnConsumer'; +function evalChildrenDev(children, props, path) { + var value = children(props); + false ? undefined : void 0; + return value || null; +} /** - * The maximum history length to capture for the focus stack. When exceeded, - * items should be shifted from the stack for each consecutive push. - * - * @type {number} + * The public API for matching a single path and rendering. */ -var MAX_STACK_LENGTH = 100; - -var context_FocusReturnProvider = /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(FocusReturnProvider, _Component); - - var _super = _createSuper(FocusReturnProvider); - function FocusReturnProvider() { - var _this; - - Object(classCallCheck["a" /* default */])(this, FocusReturnProvider); +var react_router_Route = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(Route, _React$Component); - _this = _super.apply(this, arguments); - _this.onFocus = _this.onFocus.bind(Object(assertThisInitialized["a" /* default */])(_this)); - _this.state = { - focusHistory: [] - }; - return _this; + function Route() { + return _React$Component.apply(this, arguments) || this; } - Object(createClass["a" /* default */])(FocusReturnProvider, [{ - key: "onFocus", - value: function onFocus(event) { - var focusHistory = this.state.focusHistory; // Push the focused element to the history stack, keeping only unique - // members but preferring the _last_ occurrence of any duplicates. - // Lodash's `uniq` behavior favors the first occurrence, so the array - // is temporarily reversed prior to it being called upon. Uniqueness - // helps avoid situations where, such as in a constrained tabbing area, - // the user changes focus enough within a transient element that the - // stack may otherwise only consist of members pending destruction, at - // which point focus might have been lost. + var _proto = Route.prototype; - var nextFocusHistory = Object(external_lodash_["uniq"])([].concat(Object(toConsumableArray["a" /* default */])(focusHistory), [event.target]).slice(-1 * MAX_STACK_LENGTH).reverse()).reverse(); - this.setState({ - focusHistory: nextFocusHistory - }); - } - }, { - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - className = _this$props.className; - return Object(external_this_wp_element_["createElement"])(Provider, { - value: this.state - }, Object(external_this_wp_element_["createElement"])("div", { - onFocus: this.onFocus, - className: className - }, children)); - } - }]); + _proto.render = function render() { + var _this = this; - return FocusReturnProvider; -}(external_this_wp_element_["Component"]); + return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) { + !context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + var location = _this.props.location || context$1.location; + var match = _this.props.computedMatch ? _this.props.computedMatch // already computed the match for us + : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match; -/* harmony default export */ var with_focus_return_context = (context_FocusReturnProvider); + var props = Object(esm_extends["a" /* default */])({}, context$1, { + location: location, + match: match + }); -//# sourceMappingURL=context.js.map -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-return/index.js + var _this$props = _this.props, + children = _this$props.children, + component = _this$props.component, + render = _this$props.render; // Preact uses an empty array as children by + // default, so use null if that's the case. + if (Array.isArray(children) && children.length === 0) { + children = null; + } + return external_React_default.a.createElement(react_router_context.Provider, { + value: props + }, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null); + }); + }; + return Route; +}(external_React_default.a.Component); +if (false) {} +function addLeadingSlash(path) { + return path.charAt(0) === "/" ? path : "/" + path; +} +function addBasename(basename, location) { + if (!basename) return location; + return Object(esm_extends["a" /* default */])({}, location, { + pathname: addLeadingSlash(basename) + location.pathname + }); +} +function stripBasename(basename, location) { + if (!basename) return location; + var base = addLeadingSlash(basename); + if (location.pathname.indexOf(base) !== 0) return location; + return Object(esm_extends["a" /* default */])({}, location, { + pathname: location.pathname.substr(base.length) + }); +} -function with_focus_return_createSuper(Derived) { var hasNativeReflectConstruct = with_focus_return_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } +function createURL(location) { + return typeof location === "string" ? location : Object(esm_history["d" /* createPath */])(location); +} -function with_focus_return_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } +function staticHandler(methodName) { + return function () { + false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ; + }; +} +function noop() {} /** - * External dependencies + * The public top-level API for a "static" , so-called because it + * can't actually change the current location. Instead, it just records + * location changes in a context object. Useful mainly in testing and + * server-rendering scenarios. */ -/** - * WordPress dependencies - */ +var react_router_StaticRouter = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component); + function StaticRouter() { + var _this; -/** - * Internal dependencies - */ + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; -/** - * Returns true if the given object is component-like. An object is component- - * like if it is an instance of wp.element.Component, or is a function. - * - * @param {*} object Object to test. - * - * @return {boolean} Whether object is component-like. - */ + _this.handlePush = function (location) { + return _this.navigateTo(location, "PUSH"); + }; -function isComponentLike(object) { - return object instanceof external_this_wp_element_["Component"] || typeof object === 'function'; -} -/** - * Higher Order Component used to be used to wrap disposable elements like - * sidebars, modals, dropdowns. When mounting the wrapped component, we track a - * reference to the current active element so we know where to restore focus - * when the component is unmounted. - * - * @param {(WPComponent|Object)} options The component to be enhanced with - * focus return behavior, or an object - * describing the component and the - * focus return characteristics. - * - * @return {WPComponent} Component with the focus restauration behaviour. - */ + _this.handleReplace = function (location) { + return _this.navigateTo(location, "REPLACE"); + }; + _this.handleListen = function () { + return noop; + }; -function withFocusReturn(options) { - // Normalize as overloaded form `withFocusReturn( options )( Component )` - // or as `withFocusReturn( Component )`. - if (isComponentLike(options)) { - var WrappedComponent = options; - return withFocusReturn({})(WrappedComponent); - } + _this.handleBlock = function () { + return noop; + }; - var _options$onFocusRetur = options.onFocusReturn, - onFocusReturn = _options$onFocusRetur === void 0 ? external_lodash_["stubTrue"] : _options$onFocusRetur; - return function (WrappedComponent) { - var FocusReturn = /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(FocusReturn, _Component); + return _this; + } - var _super = with_focus_return_createSuper(FocusReturn); + var _proto = StaticRouter.prototype; - function FocusReturn() { - var _this; + _proto.navigateTo = function navigateTo(location, action) { + var _this$props = this.props, + _this$props$basename = _this$props.basename, + basename = _this$props$basename === void 0 ? "" : _this$props$basename, + _this$props$context = _this$props.context, + context = _this$props$context === void 0 ? {} : _this$props$context; + context.action = action; + context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location)); + context.url = createURL(context.location); + }; - Object(classCallCheck["a" /* default */])(this, FocusReturn); + _proto.render = function render() { + var _this$props2 = this.props, + _this$props2$basename = _this$props2.basename, + basename = _this$props2$basename === void 0 ? "" : _this$props2$basename, + _this$props2$context = _this$props2.context, + context = _this$props2$context === void 0 ? {} : _this$props2$context, + _this$props2$location = _this$props2.location, + location = _this$props2$location === void 0 ? "/" : _this$props2$location, + rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]); - _this = _super.apply(this, arguments); - _this.ownFocusedElements = new Set(); - _this.activeElementOnMount = document.activeElement; + var history = { + createHref: function createHref(path) { + return addLeadingSlash(basename + createURL(path)); + }, + action: "POP", + location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)), + push: this.handlePush, + replace: this.handleReplace, + go: staticHandler("go"), + goBack: staticHandler("goBack"), + goForward: staticHandler("goForward"), + listen: this.handleListen, + block: this.handleBlock + }; + return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, { + history: history, + staticContext: context + })); + }; - _this.setIsFocusedFalse = function () { - return _this.isFocused = false; - }; + return StaticRouter; +}(external_React_default.a.Component); - _this.setIsFocusedTrue = function (event) { - _this.ownFocusedElements.add(event.target); +if (false) {} - _this.isFocused = true; - }; +/** + * The public API for rendering the first that matches. + */ - return _this; - } +var react_router_Switch = +/*#__PURE__*/ +function (_React$Component) { + Object(inheritsLoose["a" /* default */])(Switch, _React$Component); - Object(createClass["a" /* default */])(FocusReturn, [{ - key: "componentWillUnmount", - value: function componentWillUnmount() { - var activeElementOnMount = this.activeElementOnMount, - isFocused = this.isFocused, - ownFocusedElements = this.ownFocusedElements; + function Switch() { + return _React$Component.apply(this, arguments) || this; + } - if (!isFocused) { - return; - } // Defer to the component's own explicit focus return behavior, - // if specified. The function should return `false` to prevent - // the default behavior otherwise occurring here. This allows - // for support that the `onFocusReturn` decides to allow the - // default behavior to occur under some conditions. + var _proto = Switch.prototype; + _proto.render = function render() { + var _this = this; - if (onFocusReturn() === false) { - return; - } + return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + var location = _this.props.location || context.location; + var element, match; // We use React.Children.forEach instead of React.Children.toArray().find() + // here because toArray adds keys to all child elements and we do not want + // to trigger an unmount/remount for two s that render the same + // component at different URLs. - var stack = [].concat(Object(toConsumableArray["a" /* default */])(external_lodash_["without"].apply(void 0, [this.props.focus.focusHistory].concat(Object(toConsumableArray["a" /* default */])(ownFocusedElements)))), [activeElementOnMount]); - var candidate; - - while (candidate = stack.pop()) { - if (document.body.contains(candidate)) { - candidate.focus(); - return; - } - } - } - }, { - key: "render", - value: function render() { - return Object(external_this_wp_element_["createElement"])("div", { - onFocus: this.setIsFocusedTrue, - onBlur: this.setIsFocusedFalse - }, Object(external_this_wp_element_["createElement"])(WrappedComponent, this.props.childProps)); + external_React_default.a.Children.forEach(_this.props.children, function (child) { + if (match == null && external_React_default.a.isValidElement(child)) { + element = child; + var path = child.props.path || child.props.from; + match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, { + path: path + })) : context.match; } - }]); - - return FocusReturn; - }(external_this_wp_element_["Component"]); - - return function (props) { - return Object(external_this_wp_element_["createElement"])(Consumer, null, function (context) { - return Object(external_this_wp_element_["createElement"])(FocusReturn, { - childProps: props, - focus: context - }); }); - }; + return match ? external_React_default.a.cloneElement(element, { + location: location, + computedMatch: match + }) : null; + }); }; -} - -/* harmony default export */ var with_focus_return = __webpack_exports__["a"] = (Object(create_higher_order_component["a" /* default */])(withFocusReturn, 'withFocusReturn')); - -//# sourceMappingURL=index.js.map - -/***/ }), -/* 114 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78); -/* harmony import */ var _dashicon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(107); - + return Switch; +}(external_React_default.a.Component); - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +if (false) {} /** - * WordPress dependencies + * A public higher-order component to access the imperative API */ +function withRouter(Component) { + var displayName = "withRouter(" + (Component.displayName || Component.name) + ")"; -/** - * Internal dependencies - */ - + var C = function C(props) { + var wrappedComponentRef = props.wrappedComponentRef, + remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]); + return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0; + return external_React_default.a.createElement(Component, Object(esm_extends["a" /* default */])({}, remainingProps, context, { + ref: wrappedComponentRef + })); + }); + }; -function Icon(_ref) { - var _ref$icon = _ref.icon, - icon = _ref$icon === void 0 ? null : _ref$icon, - size = _ref.size, - additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["icon", "size"]); + C.displayName = displayName; + C.WrappedComponent = Component; - // Dashicons should be 20x20 by default. - var dashiconSize = size || 20; + if (false) {} - if ('string' === typeof icon) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ - icon: icon, - size: dashiconSize - }, additionalProps)); - } + return hoist_non_react_statics_cjs_default()(C, Component); +} - if (icon && _dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] === icon.type) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({ - size: dashiconSize - }, additionalProps)); - } // Icons should be 24x24 by default. +var useContext = external_React_default.a.useContext; +function useHistory() { + if (false) {} + return useContext(historyContext); +} +function useLocation() { + if (false) {} - var iconSize = size || 24; + return useContext(react_router_context).location; +} +function useParams() { + if (false) {} - if ('function' === typeof icon) { - if (icon.prototype instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_3__["Component"]) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(icon, _objectSpread({ - size: iconSize - }, additionalProps)); - } + var match = useContext(react_router_context).match; + return match ? match.params : {}; +} +function useRouteMatch(path) { + if (false) {} - return icon(_objectSpread({ - size: iconSize - }, additionalProps)); - } + var location = useLocation(); + var match = useContext(react_router_context).match; + return path ? matchPath(location.pathname, path) : match; +} - if (icon && (icon.type === 'svg' || icon.type === _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__[/* SVG */ "c"])) { - var appliedProps = _objectSpread(_objectSpread({ - width: iconSize, - height: iconSize - }, icon.props), additionalProps); +if (false) { var secondaryBuildName, initialBuildName, buildNames, react_router_key, global; } - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__[/* SVG */ "c"], appliedProps); - } - if (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["isValidElement"])(icon)) { - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({ - size: iconSize - }, additionalProps)); - } +//# sourceMappingURL=react-router.js.map - return icon; -} +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__(5); -/* harmony default export */ __webpack_exports__["a"] = (Icon); -//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./node_modules/qs/lib/index.js +var lib = __webpack_require__(162); -/***/ }), -/* 115 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// EXTERNAL MODULE: external ["wc","components"] +var external_wc_components_ = __webpack_require__(145); -"use strict"; -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); -/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); +// EXTERNAL MODULE: external ["wc","navigation"] +var external_wc_navigation_ = __webpack_require__(50); +// EXTERNAL MODULE: ./client/wc-admin-settings/index.js +var wc_admin_settings = __webpack_require__(85); +// EXTERNAL MODULE: external ["wc","data"] +var external_wc_data_ = __webpack_require__(59); -/** - * External dependencies - */ +// EXTERNAL MODULE: external ["wc","tracks"] +var external_wc_tracks_ = __webpack_require__(92); +// EXTERNAL MODULE: external ["wc","notices"] +var external_wc_notices_ = __webpack_require__(421); -function Animate(_ref) { - var type = _ref.type, - _ref$options = _ref.options, - options = _ref$options === void 0 ? {} : _ref$options, - children = _ref.children; +// EXTERNAL MODULE: ./client/layout/style.scss +var layout_style = __webpack_require__(422); - if (type === 'appear') { - var _classnames; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js +var es_array_concat = __webpack_require__(66); - var _options$origin = options.origin, - origin = _options$origin === void 0 ? 'top' : _options$origin; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js +var es_string_match = __webpack_require__(203); - var _origin$split = origin.split(' '), - _origin$split2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_origin$split, 2), - yAxis = _origin$split2[0], - _origin$split2$ = _origin$split2[1], - xAxis = _origin$split2$ === void 0 ? 'center' : _origin$split2$; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js +var es_string_split = __webpack_require__(177); - return children({ - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__appear', (_classnames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classnames, 'is-from-' + xAxis, xAxis !== 'center'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classnames, 'is-from-' + yAxis, yAxis !== 'middle'), _classnames)) - }); - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js +var es_object_assign = __webpack_require__(250); - if (type === 'slide-in') { - var _options$origin2 = options.origin, - _origin = _options$origin2 === void 0 ? 'left' : _options$origin2; +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js +var es_array_from = __webpack_require__(283); - return children({ - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__slide-in', 'is-from-' + _origin) - }); - } +// EXTERNAL MODULE: external ["wp","hooks"] +var external_wp_hooks_ = __webpack_require__(141); - if (type === 'loading') { - return children({ - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__loading') - }); - } +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__(2); - return children({}); -} +// EXTERNAL MODULE: ./client/analytics/report/get-reports.js +var get_reports = __webpack_require__(277); -/* harmony default export */ __webpack_exports__["a"] = (Animate); -//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./client/dashboard/utils.js +var utils = __webpack_require__(231); -/***/ }), -/* 116 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// CONCATENATED MODULE: ./client/layout/controller.js -"use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/** - * External dependencies - */ -function Shortcut(_ref) { - var shortcut = _ref.shortcut, - className = _ref.className; - if (!shortcut) { - return null; - } - var displayText; - var ariaLabel; - if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isString"])(shortcut)) { - displayText = shortcut; - } +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; } - if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isObject"])(shortcut)) { - displayText = shortcut.display; - ariaLabel = shortcut.ariaLabel; - } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { - className: className, - "aria-label": ariaLabel - }, displayText); -} -/* harmony default export */ __webpack_exports__["a"] = (Shortcut); -//# sourceMappingURL=index.js.map -/***/ }), -/* 117 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(7); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules -var slicedToArray = __webpack_require__(24); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(11); -// EXTERNAL MODULE: external {"this":["wp","element"]} -var external_this_wp_element_ = __webpack_require__(0); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/dom.js -var dom = __webpack_require__(129); -// EXTERNAL MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/dom/build-module/index.js + 2 modules -var build_module = __webpack_require__(69); -// EXTERNAL MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/index.js + 1 modules -var keycodes_build_module = __webpack_require__(57); -// EXTERNAL MODULE: ./node_modules/@wordpress/deprecated/build-module/index.js -var deprecated_build_module = __webpack_require__(47); -// EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js -var use_viewport_match = __webpack_require__(180); -// EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-resize-observer/index.js -var use_resize_observer = __webpack_require__(207); -// EXTERNAL MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/icons/build-module/library/close.js -var library_close = __webpack_require__(257); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(6); -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/utils.js +/** + * External dependencies + */ -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -/** - * WordPress dependencies - */ -/** - * Module constants - */ -var HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space /** - * Utility used to compute the popover position over the xAxis - * - * @param {Object} anchorRect Anchor Rect. - * @param {Object} contentSize Content Size. - * @param {string} xAxis Desired xAxis. - * @param {string} corner Desired corner. - * @param {boolean} sticky Whether or not to stick the popover to the - * scroll container edge when part of the anchor - * leaves view. - * @param {string} chosenYAxis yAxis to be used. - * @param {Element} boundaryElement Boundary element. - * - * @return {Object} Popover xAxis position and constraints. + * Internal dependencies */ -function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, sticky, chosenYAxis, boundaryElement) { - var width = contentSize.width; - var isRTL = document.documentElement.dir === 'rtl'; // Correct xAxis for RTL support - if (xAxis === 'left' && isRTL) { - xAxis = 'right'; - } else if (xAxis === 'right' && isRTL) { - xAxis = 'left'; - } - if (corner === 'left' && isRTL) { - corner = 'right'; - } else if (corner === 'right' && isRTL) { - corner = 'left'; - } // x axis alignment choices +var AnalyticsReport = Object(external_wp_element_["lazy"])(function () { + return __webpack_require__.e(/* import() | analytics-report */ 9).then(__webpack_require__.bind(null, 691)); +}); +var AnalyticsSettings = Object(external_wp_element_["lazy"])(function () { + return __webpack_require__.e(/* import() | analytics-settings */ 20).then(__webpack_require__.bind(null, 711)); +}); +var Dashboard = Object(external_wp_element_["lazy"])(function () { + return __webpack_require__.e(/* import() | dashboard */ 28).then(__webpack_require__.bind(null, 692)); +}); +var Homescreen = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(52), __webpack_require__.e(4), __webpack_require__.e(32)]).then(__webpack_require__.bind(null, 708)); +}); +var MarketingOverview = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | marketing-overview */[__webpack_require__.e(3), __webpack_require__.e(36)]).then(__webpack_require__.bind(null, 712)); +}); +var ProfileWizard = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 709)); +}); +var SettingsGroup = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 704)); +}); +var PAGES_FILTER = 'woocommerce_admin_pages_list'; +var controller_getPages = function getPages() { + var pages = []; + var initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]]; + pages.push({ + container: Homescreen, + path: '/', + breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Home', 'woocommerce-admin')]), + wpOpenMenu: 'toplevel_page_woocommerce', + navArgs: { + id: 'woocommerce-home' + }, + capability: 'manage_woocommerce' + }); + if (window.wcAdminFeatures.analytics) { + pages.push({ + container: Dashboard, + path: '/analytics/overview', + breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/overview', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')]), + wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview', + navArgs: { + id: 'woocommerce-analytics-overview' + }, + capability: 'view_woocommerce_reports' + }); + pages.push({ + container: AnalyticsSettings, + path: '/analytics/settings', + breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')]), + wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview', + navArgs: { + id: 'woocommerce-analytics-settings' + }, + capability: 'view_woocommerce_reports' + }); + pages.push({ + container: AnalyticsReport, + path: '/customers', + breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Customers', 'woocommerce-admin')]), + wpOpenMenu: 'toplevel_page_woocommerce', + navArgs: { + id: 'woocommerce-analytics-customers' + }, + capability: 'view_woocommerce_reports' + }); + pages.push({ + container: AnalyticsReport, + path: '/analytics/:report', + breadcrumbs: function breadcrumbs(_ref) { + var match = _ref.match; + var report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), { + report: match.params.report + }); - var anchorMidPoint = Math.round(anchorRect.left + anchorRect.width / 2); - var centerAlignment = { - popoverLeft: anchorMidPoint, - contentWidth: (anchorMidPoint - width / 2 > 0 ? width / 2 : anchorMidPoint) + (anchorMidPoint + width / 2 > window.innerWidth ? window.innerWidth - anchorMidPoint : width / 2) - }; - var leftAlignmentX = anchorRect.left; + if (!report) { + return []; + } - if (corner === 'right') { - leftAlignmentX = anchorRect.right; - } else if (chosenYAxis !== 'middle') { - leftAlignmentX = anchorMidPoint; + return [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title]); + }, + wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview', + capability: 'view_woocommerce_reports' + }); } - var rightAlignmentX = anchorRect.right; - - if (corner === 'left') { - rightAlignmentX = anchorRect.left; - } else if (chosenYAxis !== 'middle') { - rightAlignmentX = anchorMidPoint; + if (window.wcAdminFeatures.marketing) { + pages.push({ + container: MarketingOverview, + path: '/marketing', + breadcrumbs: [].concat(initialBreadcrumbs, [['/marketing', Object(external_wp_i18n_["__"])('Marketing', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')]), + wpOpenMenu: 'toplevel_page_woocommerce-marketing', + navArgs: { + id: 'woocommerce-marketing-overview' + }, + capability: 'view_woocommerce_reports' + }); } - var leftAlignment = { - popoverLeft: leftAlignmentX, - contentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX - }; - var rightAlignment = { - popoverLeft: rightAlignmentX, - contentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width - }; // Choosing the x axis - - var chosenXAxis = xAxis; - var contentWidth = null; - - if (!sticky) { - if (xAxis === 'center' && centerAlignment.contentWidth === width) { - chosenXAxis = 'center'; - } else if (xAxis === 'left' && leftAlignment.contentWidth === width) { - chosenXAxis = 'left'; - } else if (xAxis === 'right' && rightAlignment.contentWidth === width) { - chosenXAxis = 'right'; - } else { - chosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right'; - var chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth; - contentWidth = chosenWidth !== width ? chosenWidth : null; - } + if (window.wcAdminFeatures.onboarding) { + pages.push({ + container: ProfileWizard, + path: '/setup-wizard', + breadcrumbs: [].concat(initialBreadcrumbs, [['/setup-wizard', Object(external_wp_i18n_["__"])('Setup Wizard', 'woocommerce-admin')]]), + capability: 'manage_woocommerce' + }); } - var popoverLeft; - - if (chosenXAxis === 'center') { - popoverLeft = centerAlignment.popoverLeft; - } else if (chosenXAxis === 'left') { - popoverLeft = leftAlignment.popoverLeft; - } else { - popoverLeft = rightAlignment.popoverLeft; - } + if (window.wcAdminFeatures.settings) { + pages.push({ + container: SettingsGroup, + path: '/settings/:page', + breadcrumbs: function breadcrumbs(_ref2) { + var match = _ref2.match; + // @todo This might need to be refactored to retreive groups via data store. + var settingsPages = Object(wc_admin_settings["g" /* getSetting */])('settingsPages'); + var page = settingsPages[match.params.page]; + + if (!page) { + return []; + } - if (boundaryElement) { - var boundaryRect = boundaryElement.getBoundingClientRect(); - popoverLeft = Math.min(popoverLeft, boundaryRect.right - width); + return [].concat(initialBreadcrumbs, [[settingsPages.general ? '/settings/general' : "/settings/".concat(Object.keys(settingsPages)[0]), Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')], page]); + }, + wpOpenMenu: 'toplevel_page_woocommerce', + capability: 'manage_woocommerce' + }); } - return { - xAxis: chosenXAxis, - popoverLeft: popoverLeft, - contentWidth: contentWidth - }; -} -/** - * Utility used to compute the popover position over the yAxis - * - * @param {Object} anchorRect Anchor Rect. - * @param {Object} contentSize Content Size. - * @param {string} yAxis Desired yAxis. - * @param {string} corner Desired corner. - * @param {boolean} sticky Whether or not to stick the popover to the - * scroll container edge when part of the - * anchor leaves view. - * @param {Element} anchorRef The anchor element. - * @param {Element} relativeOffsetTop If applicable, top offset of the relative - * positioned parent container. - * - * @return {Object} Popover xAxis position and constraints. - */ - -function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, sticky, anchorRef, relativeOffsetTop) { - var height = contentSize.height; - - if (sticky) { - var scrollContainerEl = Object(dom["b" /* getScrollContainer */])(anchorRef) || document.body; - var scrollRect = scrollContainerEl.getBoundingClientRect(); - var stickyPosition = scrollRect.top + height - relativeOffsetTop; - - if (anchorRect.top <= stickyPosition) { - return { - yAxis: yAxis, - popoverTop: Math.min(anchorRect.bottom, stickyPosition) - }; - } - } // y axis alignment choices + return Object(external_wp_hooks_["applyFilters"])(PAGES_FILTER, pages); +}; +var controller_Controller = /*#__PURE__*/function (_Component) { + inherits_default()(Controller, _Component); + var _super = _createSuper(Controller); - var anchorMidPoint = anchorRect.top + anchorRect.height / 2; + function Controller() { + classCallCheck_default()(this, Controller); - if (corner === 'bottom') { - anchorMidPoint = anchorRect.bottom; - } else if (corner === 'top') { - anchorMidPoint = anchorRect.top; + return _super.apply(this, arguments); } - var middleAlignment = { - popoverTop: anchorMidPoint, - contentHeight: (anchorMidPoint - height / 2 > 0 ? height / 2 : anchorMidPoint) + (anchorMidPoint + height / 2 > window.innerHeight ? window.innerHeight - anchorMidPoint : height / 2) - }; - var topAlignment = { - popoverTop: anchorRect.top, - contentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET - }; - var bottomAlignment = { - popoverTop: anchorRect.bottom, - contentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height - }; // Choosing the y axis - - var chosenYAxis = yAxis; - var contentHeight = null; - - if (!sticky) { - if (yAxis === 'middle' && middleAlignment.contentHeight === height) { - chosenYAxis = 'middle'; - } else if (yAxis === 'top' && topAlignment.contentHeight === height) { - chosenYAxis = 'top'; - } else if (yAxis === 'bottom' && bottomAlignment.contentHeight === height) { - chosenYAxis = 'bottom'; - } else { - chosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom'; - var chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight; - contentHeight = chosenHeight !== height ? chosenHeight : null; + createClass_default()(Controller, [{ + key: "componentDidMount", + value: function componentDidMount() { + window.document.documentElement.scrollTop = 0; + window.document.body.classList.remove('woocommerce-admin-is-loading'); } - } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + var prevBaseQuery = Object(external_lodash_["omit"])(prevProps.query, 'chartType', 'filter', 'paged'); + var baseQuery = Object(external_lodash_["omit"])(this.props.query, 'chartType', 'filter', 'paged'); - var popoverTop; + if (prevProps.query.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) { + Object(external_wc_navigation_["getHistory"])().replace(Object(external_wc_navigation_["getNewPath"])({ + paged: 1 + })); + } - if (chosenYAxis === 'middle') { - popoverTop = middleAlignment.popoverTop; - } else if (chosenYAxis === 'top') { - popoverTop = topAlignment.popoverTop; - } else { - popoverTop = bottomAlignment.popoverTop; - } + if (prevProps.match.url !== this.props.match.url) { + window.document.documentElement.scrollTop = 0; + } + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + page = _this$props.page, + match = _this$props.match, + query = _this$props.query; + var url = match.url, + params = match.params; + window.wpNavMenuUrlUpdate(query); + window.wpNavMenuClassChange(page, url); + return Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], { + fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null) + }, Object(external_wp_element_["createElement"])(page.container, { + params: params, + path: url, + pathMatch: page.path, + query: query + })); + } + }]); - return { - yAxis: chosenYAxis, - popoverTop: popoverTop, - contentHeight: contentHeight - }; -} + return Controller; +}(external_wp_element_["Component"]); /** - * Utility used to compute the popover position and the content max width/height - * for a popover given its anchor rect and its content size. - * - * @param {Object} anchorRect Anchor Rect. - * @param {Object} contentSize Content Size. - * @param {string} position Position. - * @param {boolean} sticky Whether or not to stick the popover to the - * scroll container edge when part of the - * anchor leaves view. - * @param {Element} anchorRef The anchor element. - * @param {number} relativeOffsetTop If applicable, top offset of the relative - * positioned parent container. - * @param {Element} boundaryElement Boundary element. + * Update an anchor's link in sidebar to include persisted queries. Leave excluded screens + * as is. * - * @return {Object} Popover position and constraints. + * @param {HTMLElement} item - Sidebar anchor link. + * @param {Object} nextQuery - A query object to be added to updated hrefs. + * @param {Array} excludedScreens - wc-admin screens to avoid updating. */ -function computePopoverPosition(anchorRect, contentSize) { - var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'top'; - var sticky = arguments.length > 3 ? arguments[3] : undefined; - var anchorRef = arguments.length > 4 ? arguments[4] : undefined; - var relativeOffsetTop = arguments.length > 5 ? arguments[5] : undefined; - var boundaryElement = arguments.length > 6 ? arguments[6] : undefined; - - var _position$split = position.split(' '), - _position$split2 = Object(slicedToArray["a" /* default */])(_position$split, 3), - yAxis = _position$split2[0], - _position$split2$ = _position$split2[1], - xAxis = _position$split2$ === void 0 ? 'center' : _position$split2$, - corner = _position$split2[2]; - - var yAxisPosition = computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, sticky, anchorRef, relativeOffsetTop); - var xAxisPosition = computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, sticky, yAxisPosition.yAxis, boundaryElement); - return _objectSpread(_objectSpread({}, xAxisPosition), yAxisPosition); -} -//# sourceMappingURL=utils.js.map -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-return/index.js + 1 modules -var with_focus_return = __webpack_require__(113); - -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-constrained-tabbing/index.js -var with_constrained_tabbing = __webpack_require__(109); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js -var classCallCheck = __webpack_require__(16); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js -var createClass = __webpack_require__(17); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules -var inherits = __webpack_require__(18); +function updateLinkHref(item, nextQuery, excludedScreens) { + if (Object(utils["f" /* isWCAdmin */])(item.href)) { + var search = Object(external_lodash_["last"])(item.href.split('?')); + var query = Object(lib["parse"])(search); + var path = query.path || 'homescreen'; + var screen = Object(external_wc_navigation_["getScreenFromPath"])(path); + var isExcludedScreen = excludedScreens.includes(screen); + var href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover. -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js -var possibleConstructorReturn = __webpack_require__(21); + item.href = href; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js -var getPrototypeOf = __webpack_require__(9); + item.onclick = function (e) { + e.preventDefault(); + Object(external_wc_navigation_["getHistory"])().push(href); + }; + } +} // Update's wc-admin links in wp-admin menu -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-outside/index.js -var with_focus_outside = __webpack_require__(110); +window.wpNavMenuUrlUpdate = function (query) { + var nextQuery = Object(external_wc_navigation_["getPersistedQuery"])(query); + var excludedScreens = Object(external_wc_navigation_["getQueryExcludedScreens"])(); + Array.from(document.querySelectorAll('#adminmenu a')).forEach(function (item) { + return updateLinkHref(item, nextQuery, excludedScreens); + }); +}; // When the route changes, we need to update wp-admin's menu with the correct section & current link -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/detect-outside.js +window.wpNavMenuClassChange = function (page, url) { + Array.from(document.getElementsByClassName('current')).forEach(function (item) { + item.classList.remove('current'); + }); + var submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu')); + submenu.forEach(function (element) { + element.classList.remove('wp-has-current-submenu'); + element.classList.remove('wp-menu-open'); + element.classList.remove('selected'); + element.classList.add('wp-not-current-submenu'); + element.classList.add('menu-top'); + }); + var pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url); + var currentItemsSelector = url === '/' ? "li > a[href$=\"".concat(pageUrl, "\"], li > a[href*=\"").concat(pageUrl, "?\"]") : "li > a[href*=\"".concat(pageUrl, "\"]"); + var currentItems = document.querySelectorAll(currentItemsSelector); + Array.from(currentItems).forEach(function (item) { + item.parentElement.classList.add('current'); + }); + if (page.wpOpenMenu) { + var currentMenu = document.querySelector('#' + page.wpOpenMenu); + if (currentMenu) { + currentMenu.classList.remove('wp-not-current-submenu'); + currentMenu.classList.add('wp-has-current-submenu'); + currentMenu.classList.add('wp-menu-open'); + currentMenu.classList.add('current'); + } + } + var wpWrap = document.querySelector('#wpwrap'); + wpWrap.classList.remove('wp-responsive-open'); +}; +// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js +var web_url = __webpack_require__(287); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js +var es_array_slice = __webpack_require__(187); -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js +var es_array_join = __webpack_require__(139); -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } +// EXTERNAL MODULE: external ["wp","components"] +var external_wp_components_ = __webpack_require__(4); -/** - * WordPress dependencies - */ +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__(15); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -/** - * Internal dependencies - */ +// EXTERNAL MODULE: external ["wp","htmlEntities"] +var external_wp_htmlEntities_ = __webpack_require__(132); +// EXTERNAL MODULE: ./packages/experimental/build-module/index.js +var build_module = __webpack_require__(105); +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js +var build_module_icon = __webpack_require__(426); -var detect_outside_PopoverDetectOutside = /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(PopoverDetectOutside, _Component); +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js +var chevron_left = __webpack_require__(597); - var _super = _createSuper(PopoverDetectOutside); +// EXTERNAL MODULE: external ["wp","keycodes"] +var external_wp_keycodes_ = __webpack_require__(126); - function PopoverDetectOutside() { - Object(classCallCheck["a" /* default */])(this, PopoverDetectOutside); +// EXTERNAL MODULE: ./client/header/style.scss +var header_style = __webpack_require__(423); - return _super.apply(this, arguments); - } +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(43); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); - Object(createClass["a" /* default */])(PopoverDetectOutside, [{ - key: "handleFocusOutside", - value: function handleFocusOutside(event) { - this.props.onFocusOutside(event); - } - }, { - key: "render", - value: function render() { - return this.props.children; - } - }]); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js +var es_function_name = __webpack_require__(129); - return PopoverDetectOutside; -}(external_this_wp_element_["Component"]); +// EXTERNAL MODULE: external ["wp","primitives"] +var external_wp_primitives_ = __webpack_require__(28); -/* harmony default export */ var detect_outside = (Object(with_focus_outside["a" /* default */])(detect_outside_PopoverDetectOutside)); -//# sourceMappingURL=detect-outside.js.map -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/button/index.js -var build_module_button = __webpack_require__(68); +// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/inbox.js -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/scroll-lock/index.js +/** + * WordPress dependencies + */ +var inbox_inbox = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { + fillRule: "evenodd", + d: "M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z", + clipRule: "evenodd" +})); +/* harmony default export */ var library_inbox = (inbox_inbox); +//# sourceMappingURL=inbox.js.map +// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js +/** + * WordPress dependencies + */ +var help_help = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { + d: "M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z" +})); +/* harmony default export */ var library_help = (help_help); +//# sourceMappingURL=help.js.map +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js +var external = __webpack_require__(596); -function scroll_lock_createSuper(Derived) { var hasNativeReflectConstruct = scroll_lock_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } +// EXTERNAL MODULE: ./client/header/activity-panel/style.scss +var activity_panel_style = __webpack_require__(424); -function scroll_lock_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } +// EXTERNAL MODULE: ./client/inbox-panel/utils.js +var inbox_panel_utils = __webpack_require__(332); +// CONCATENATED MODULE: ./client/header/activity-panel/unread-indicators.js /** - * WordPress dependencies + * External dependencies */ + /** - * Creates a ScrollLock component bound to the specified document. - * - * This function creates a ScrollLock component for the specified document - * and is exposed so we can create an isolated component for unit testing. - * - * @param {Object} args Keyword args. - * @param {HTMLDocument} args.htmlDocument The document to lock the scroll for. - * @param {string} args.className The name of the class used to lock scrolling. - * @return {WPComponent} The bound ScrollLock component. + * Internal dependencies */ -function createScrollLockComponent() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$htmlDocument = _ref.htmlDocument, - htmlDocument = _ref$htmlDocument === void 0 ? document : _ref$htmlDocument, - _ref$className = _ref.className, - className = _ref$className === void 0 ? 'lockscroll' : _ref$className; - - var lockCounter = 0; - /* - * Setting `overflow: hidden` on html and body elements resets body scroll in iOS. - * Save scroll top so we can restore it after locking scroll. - * - * NOTE: It would be cleaner and possibly safer to find a localized solution such - * as preventing default on certain touchmove events. - */ - - var previousScrollTop = 0; - /** - * Locks and unlocks scroll depending on the boolean argument. - * - * @param {boolean} locked Whether or not scroll should be locked. - */ - - function setLocked(locked) { - var scrollingElement = htmlDocument.scrollingElement || htmlDocument.body; - if (locked) { - previousScrollTop = scrollingElement.scrollTop; - } +var UNREAD_NOTES_QUERY = { + page: 1, + per_page: external_wc_data_["QUERY_DEFAULTS"].pageSize, + status: 'unactioned', + type: external_wc_data_["QUERY_DEFAULTS"].noteTypes, + orderby: 'date', + order: 'desc' +}; +function getUnreadNotes(select) { + var _select = select(external_wc_data_["NOTES_STORE_NAME"]), + getNotes = _select.getNotes, + getNotesError = _select.getNotesError, + isResolving = _select.isResolving; - var methodName = locked ? 'add' : 'remove'; - scrollingElement.classList[methodName](className); // Adding the class to the document element seems to be necessary in iOS. + var _select2 = select(external_wc_data_["USER_STORE_NAME"]), + getCurrentUser = _select2.getCurrentUser; - htmlDocument.documentElement.classList[methodName](className); + var userData = getCurrentUser(); + var lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10); - if (!locked) { - scrollingElement.scrollTop = previousScrollTop; - } + if (!lastRead) { + return null; } - /** - * Requests scroll lock. - * - * This function tracks requests for scroll lock. It locks scroll on the first - * request and counts each request so `releaseLock` can unlock scroll when - * all requests have been released. - */ - - function requestLock() { - if (lockCounter === 0) { - setLocked(true); - } + getNotes(UNREAD_NOTES_QUERY); + var isError = Boolean(getNotesError('getNotes', [UNREAD_NOTES_QUERY])); + var isRequesting = isResolving('getNotes', [UNREAD_NOTES_QUERY]); - ++lockCounter; + if (isError || isRequesting) { + return null; } - /** - * Releases a request for scroll lock. - * - * This function tracks released requests for scroll lock. When all requests - * have been released, it unlocks scroll. - */ + var latestNotes = getNotes(UNREAD_NOTES_QUERY); + var unreadNotesCount = Object(inbox_panel_utils["a" /* getUnreadNotesCount */])(latestNotes, lastRead); + return unreadNotesCount > 0; +} +function getLowStockCount() { + return Object(wc_admin_settings["g" /* getSetting */])('lowStockCount', 0); +} +// CONCATENATED MODULE: ./client/header/activity-panel/tab/index.js - function releaseLock() { - if (lockCounter === 1) { - setLocked(false); - } - --lockCounter; - } - return /*#__PURE__*/function (_Component) { - Object(inherits["a" /* default */])(ScrollLock, _Component); +/** + * External dependencies + */ - var _super = scroll_lock_createSuper(ScrollLock); - function ScrollLock() { - Object(classCallCheck["a" /* default */])(this, ScrollLock); - return _super.apply(this, arguments); +var tab_Tab = function Tab(_ref) { + var icon = _ref.icon, + title = _ref.title, + name = _ref.name, + unread = _ref.unread, + selected = _ref.selected, + isPanelOpen = _ref.isPanelOpen, + onTabClick = _ref.onTabClick; + var className = classnames_default()('woocommerce-layout__activity-panel-tab', { + 'is-active': isPanelOpen && selected, + 'has-unread': unread + }); + var tabKey = "activity-panel-tab-".concat(name); + return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + role: "tab", + className: className, + "aria-selected": selected, + "aria-controls": "activity-panel-".concat(name), + key: tabKey, + id: tabKey, + onClick: function onClick() { + onTabClick(name); } + }, icon, title, ' ', unread && Object(external_wp_element_["createElement"])("span", { + className: "screen-reader-text" + }, Object(external_wp_i18n_["__"])('unread activity', 'woocommerce-admin'))); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/tabs/index.js - Object(createClass["a" /* default */])(ScrollLock, [{ - key: "componentDidMount", - - /** - * Requests scroll lock on mount. - */ - value: function componentDidMount() { - requestLock(); - } - /** - * Releases scroll lock before unmount. - */ - - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - releaseLock(); - } - /** - * Render nothing as this component is merely a way to declare scroll lock. - * - * @return {null} Render nothing by returning `null`. - */ - - }, { - key: "render", - value: function render() { - return null; - } - }]); - - return ScrollLock; - }(external_this_wp_element_["Component"]); -} -/* harmony default export */ var scroll_lock = (createScrollLockComponent()); -//# sourceMappingURL=index.js.map -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/isolated-event-container/index.js -var isolated_event_container = __webpack_require__(111); - -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/use-slot.js -var use_slot = __webpack_require__(71); - -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/index.js + 4 modules -var slot_fill = __webpack_require__(98); - -// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/animate/index.js -var build_module_animate = __webpack_require__(115); - -// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/index.js @@ -10214,14 +10432,6 @@ var build_module_animate = __webpack_require__(115); * External dependencies */ -/** - * WordPress dependencies - */ - - - - - /** @@ -10229,2381 +10439,1757 @@ var build_module_animate = __webpack_require__(115); */ +var tabs_Tabs = function Tabs(_ref) { + var tabs = _ref.tabs, + _onTabClick = _ref.onTabClick, + selectedTabName = _ref.selectedTab, + _ref$tabOpen = _ref.tabOpen, + tabOpen = _ref$tabOpen === void 0 ? false : _ref$tabOpen; + var _useState = Object(external_wp_element_["useState"])({ + tabOpen: tabOpen, + currentTab: selectedTabName + }), + _useState2 = slicedToArray_default()(_useState, 2), + _useState2$ = _useState2[0], + tabIsOpenState = _useState2$.tabOpen, + currentTab = _useState2$.currentTab, + setTabState = _useState2[1]; // Keep state synced with props - - - - - -var FocusManaged = Object(with_constrained_tabbing["a" /* default */])(Object(with_focus_return["a" /* default */])(function (_ref) { - var children = _ref.children; - return children; -})); -/** - * Name of slot in which popover should fill. - * - * @type {string} - */ - -var SLOT_NAME = 'Popover'; - -function computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect) { - var anchorRef = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - var shouldAnchorIncludePadding = arguments.length > 4 ? arguments[4] : undefined; - - if (anchorRect) { - return anchorRect; - } - - if (getAnchorRect) { - if (!anchorRefFallback.current) { - return; + Object(external_wp_element_["useEffect"])(function () { + setTabState({ + tabOpen: tabOpen, + currentTab: selectedTabName + }); + }, [tabOpen, selectedTabName]); + return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], { + role: "tablist", + orientation: "horizontal", + className: "woocommerce-layout__activity-panel-tabs" + }, tabs && tabs.map(function (tab, i) { + if (tab.component) { + var Comp = tab.component, + options = tab.options; + return Object(external_wp_element_["createElement"])(Comp, extends_default()({ + key: i + }, options)); } - return getAnchorRect(anchorRefFallback.current); - } - - if (anchorRef !== false) { - if (!anchorRef || !window.Range || !window.Element || !window.DOMRect) { - return; - } + return Object(external_wp_element_["createElement"])(tab_Tab, extends_default()({ + key: i, + index: i, + isPanelOpen: tabIsOpenState, + selected: currentTab === tab.name + }, tab, { + onTabClick: function onTabClick() { + var isTabOpen = currentTab === tab.name || currentTab === '' ? !tabIsOpenState : true; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track. - if (anchorRef instanceof window.Range) { - return Object(dom["a" /* getRectangleFromRange */])(anchorRef); - } + if (!isTabOpen || currentTab !== tab.name) { + Object(external_wc_tracks_["recordEvent"])('activity_panel_open', { + tab: tab.name + }); + } - if (anchorRef instanceof window.Element) { - var _rect2 = anchorRef.getBoundingClientRect(); + setTabState({ + tabOpen: isTabOpen, + currentTab: tab.name + }); - if (shouldAnchorIncludePadding) { - return _rect2; + _onTabClick(tab, isTabOpen); } + })); + })); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/setup-progress.js - return withoutPadding(_rect2, anchorRef); - } +var setup_progress_SetupProgress = function SetupProgress() { + return Object(external_wp_element_["createElement"])("svg", { + className: "woocommerce-layout__activity-panel-tab-icon setup-progress", + width: "18", + height: "18", + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, Object(external_wp_element_["createElement"])("path", { + d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z", + stroke: "#DCDCDE", + strokeWidth: "2" + }), Object(external_wp_element_["createElement"])("path", { + d: "M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4", + strokeWidth: "2", + strokeLinecap: "round" + })); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/display.js - var top = anchorRef.top, - bottom = anchorRef.bottom; - var topRect = top.getBoundingClientRect(); - var bottomRect = bottom.getBoundingClientRect(); - var _rect = new window.DOMRect(topRect.left, topRect.top, topRect.width, bottomRect.bottom - topRect.top); +/** + * External dependencies + */ - if (shouldAnchorIncludePadding) { - return _rect; - } +var display_DisplayIcon = function DisplayIcon() { + return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("svg", { + className: "woocommerce-layout__activity-panel-tab-icon", + width: "24", + height: "24", + viewBox: "3 3 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, Object(external_wp_element_["createElement"])("path", { + d: "M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z", + strokeWidth: "1.5", + strokeLinecap: "round", + strokeLinejoin: "round" + }), Object(external_wp_element_["createElement"])("path", { + d: "M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z", + strokeWidth: "1.5", + strokeLinecap: "round", + strokeLinejoin: "round" + }), Object(external_wp_element_["createElement"])("path", { + d: "M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z", + strokeWidth: "1.5", + strokeLinecap: "round", + strokeLinejoin: "round" + }), Object(external_wp_element_["createElement"])("path", { + d: "M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z", + strokeWidth: "1.5", + strokeLinecap: "round", + strokeLinejoin: "round" + })), Object(external_wp_i18n_["__"])('Display', 'woocommerce-admin')); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/single-column.js - return withoutPadding(_rect, anchorRef); - } +var single_column_SingleColumnIcon = function SingleColumnIcon() { + return Object(external_wp_element_["createElement"])("svg", { + className: "woocommerce-layout__activity-panel-tab-icon", + width: "12", + height: "14", + viewBox: "0 0 12 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, Object(external_wp_element_["createElement"])("rect", { + x: "0.5", + y: "0.5", + width: "11", + height: "13", + strokeWidth: "1" + })); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/two-columns.js - if (!anchorRefFallback.current) { - return; - } +var two_columns_TwoColumnsIcon = function TwoColumnsIcon() { + return Object(external_wp_element_["createElement"])("svg", { + className: "woocommerce-layout__activity-panel-tab-icon", + width: "18", + height: "14", + viewBox: "0 0 18 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, Object(external_wp_element_["createElement"])("rect", { + x: "0.5", + y: "0.5", + width: "7", + height: "13", + strokeWidth: "1" + }), Object(external_wp_element_["createElement"])("rect", { + x: "9.5", + y: "0.5", + width: "7", + height: "13", + strokeWidth: "1" + })); +}; +// CONCATENATED MODULE: ./client/header/activity-panel/display-options/index.js + + +/** + * External dependencies + */ - var parentNode = anchorRefFallback.current.parentNode; - var rect = parentNode.getBoundingClientRect(); - if (shouldAnchorIncludePadding) { - return rect; - } - return withoutPadding(rect, parentNode); -} -function getComputedStyle(node) { - return node.ownerDocument.defaultView.getComputedStyle(node); -} -function withoutPadding(rect, element) { - var _getComputedStyle = getComputedStyle(element), - paddingTop = _getComputedStyle.paddingTop, - paddingBottom = _getComputedStyle.paddingBottom, - paddingLeft = _getComputedStyle.paddingLeft, - paddingRight = _getComputedStyle.paddingRight; - - var top = paddingTop ? parseInt(paddingTop, 10) : 0; - var bottom = paddingBottom ? parseInt(paddingBottom, 10) : 0; - var left = paddingLeft ? parseInt(paddingLeft, 10) : 0; - var right = paddingRight ? parseInt(paddingRight, 10) : 0; - return { - x: rect.left + left, - y: rect.top + top, - width: rect.width - left - right, - height: rect.height - top - bottom, - left: rect.left + left, - right: rect.right - right, - top: rect.top + top, - bottom: rect.bottom - bottom - }; -} /** - * Hook used to focus the first tabbable element on mount. - * - * @param {boolean|string} focusOnMount Focus on mount mode. - * @param {Object} contentRef Reference to the popover content element. + * Internal dependencies */ -function useFocusContentOnMount(focusOnMount, contentRef) { - // Focus handling - Object(external_this_wp_element_["useEffect"])(function () { - /* - * Without the setTimeout, the dom node is not being focused. Related: - * https://stackoverflow.com/questions/35522220/react-ref-with-focus-doesnt-work-without-settimeout-my-example - * - * TODO: Treat the cause, not the symptom. - */ - var focusTimeout = setTimeout(function () { - if (!focusOnMount || !contentRef.current) { - return; - } - if (focusOnMount === 'firstElement') { - // Find first tabbable node within content and shift focus, falling - // back to the popover panel itself. - var firstTabbable = build_module["a" /* focus */].tabbable.find(contentRef.current)[0]; - if (firstTabbable) { - firstTabbable.focus(); - } else { - contentRef.current.focus(); - } +var LAYOUTS = [{ + value: 'single_column', + label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(single_column_SingleColumnIcon, null), Object(external_wp_i18n_["__"])('Single column', 'woocommerce-admin')) +}, { + value: 'two_columns', + label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(two_columns_TwoColumnsIcon, null), Object(external_wp_i18n_["__"])('Two columns', 'woocommerce-admin')) +}]; +var display_options_DisplayOptions = function DisplayOptions() { + var defaultHomescreenLayout = Object(external_wp_data_["useSelect"])(function (select) { + var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]), + getOption = _select.getOption; - return; - } + return getOption('woocommerce_default_homepage_layout') || 'single_column'; + }); + + var _useUserPreferences = Object(external_wc_data_["useUserPreferences"])(), + updateUserPreferences = _useUserPreferences.updateUserPreferences, + layout = _useUserPreferences.homepage_layout; - if (focusOnMount === 'container') { - // Focus the popover panel itself so items in the popover are easily - // accessed via keyboard navigation. - contentRef.current.focus(); + return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { + icon: Object(external_wp_element_["createElement"])(display_DisplayIcon, null) + /* translators: button label text should, if possible, be under 16 characters. */ + , + label: Object(external_wp_i18n_["__"])('Display options', 'woocommerce-admin'), + toggleProps: { + className: 'woocommerce-layout__activity-panel-tab display-options', + onClick: function onClick() { + return Object(external_wc_tracks_["recordEvent"])('homescreen_display_click'); } - }, 0); - return function () { - return clearTimeout(focusTimeout); - }; - }, []); -} -/** - * Sets or removes an element attribute. - * - * @param {Element} element The element to modify. - * @param {string} name The attribute name to set or remove. - * @param {?string} value The value to set. A falsy value will remove the - * attribute. - */ + }, + popoverProps: { + className: 'woocommerce-layout__activity-panel-popover' + } + }, function (_ref) { + var onClose = _ref.onClose; + return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { + className: "woocommerce-layout__homescreen-display-options", + label: Object(external_wp_i18n_["__"])('Layout', 'woocommerce-admin') + }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], { + choices: LAYOUTS, + onSelect: function onSelect(newLayout) { + updateUserPreferences({ + homepage_layout: newLayout + }); + onClose(); + Object(external_wc_tracks_["recordEvent"])('homescreen_display_option', { + display_option: newLayout + }); + }, + value: layout || defaultHomescreenLayout + })); + }); +}; +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js +var library_close = __webpack_require__(595); +// EXTERNAL MODULE: ./client/header/activity-panel/highlight-tooltip/style.scss +var highlight_tooltip_style = __webpack_require__(425); -function setAttribute(element, name, value) { - if (!value) { - if (element.hasAttribute(name)) { - element.removeAttribute(name); - } - } else if (element.getAttribute(name) !== value) { - element.setAttribute(name, value); - } -} -/** - * Sets or removes an element style property. - * - * @param {Element} element The element to modify. - * @param {string} property The property to set or remove. - * @param {?string} value The value to set. A falsy value will remove the - * property. - */ +// CONCATENATED MODULE: ./client/header/activity-panel/highlight-tooltip/index.js -function setStyle(element, property) { - var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - if (element.style[property] !== value) { - element.style[property] = value; - } -} /** - * Sets or removes an element class. - * - * @param {Element} element The element to modify. - * @param {string} name The class to set or remove. - * @param {boolean} toggle True to set the class, false to remove. + * External dependencies */ -function setClass(element, name, toggle) { - if (toggle) { - if (!element.classList.contains(name)) { - element.classList.add(name); - } - } else if (element.classList.contains(name)) { - element.classList.remove(name); - } -} -var popover_Popover = function Popover(_ref2) { - var headerTitle = _ref2.headerTitle, - onClose = _ref2.onClose, - onKeyDown = _ref2.onKeyDown, - children = _ref2.children, - className = _ref2.className, - _ref2$noArrow = _ref2.noArrow, - noArrow = _ref2$noArrow === void 0 ? true : _ref2$noArrow, - isAlternate = _ref2.isAlternate, - _ref2$position = _ref2.position, - position = _ref2$position === void 0 ? 'bottom right' : _ref2$position, - range = _ref2.range, - _ref2$focusOnMount = _ref2.focusOnMount, - focusOnMount = _ref2$focusOnMount === void 0 ? 'firstElement' : _ref2$focusOnMount, - anchorRef = _ref2.anchorRef, - shouldAnchorIncludePadding = _ref2.shouldAnchorIncludePadding, - anchorRect = _ref2.anchorRect, - getAnchorRect = _ref2.getAnchorRect, - expandOnMobile = _ref2.expandOnMobile, - _ref2$animate = _ref2.animate, - animate = _ref2$animate === void 0 ? true : _ref2$animate, - onClickOutside = _ref2.onClickOutside, - onFocusOutside = _ref2.onFocusOutside, - __unstableSticky = _ref2.__unstableSticky, - _ref2$__unstableSlotN = _ref2.__unstableSlotName, - __unstableSlotName = _ref2$__unstableSlotN === void 0 ? SLOT_NAME : _ref2$__unstableSlotN, - __unstableObserveElement = _ref2.__unstableObserveElement, - __unstableBoundaryParent = _ref2.__unstableBoundaryParent, - contentProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["headerTitle", "onClose", "onKeyDown", "children", "className", "noArrow", "isAlternate", "position", "range", "focusOnMount", "anchorRef", "shouldAnchorIncludePadding", "anchorRect", "getAnchorRect", "expandOnMobile", "animate", "onClickOutside", "onFocusOutside", "__unstableSticky", "__unstableSlotName", "__unstableObserveElement", "__unstableBoundaryParent"]); - - var anchorRefFallback = Object(external_this_wp_element_["useRef"])(null); - var contentRef = Object(external_this_wp_element_["useRef"])(null); - var containerRef = Object(external_this_wp_element_["useRef"])(); - var isMobileViewport = Object(use_viewport_match["a" /* default */])('medium', '<'); - - var _useState = Object(external_this_wp_element_["useState"])(), - _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), - animateOrigin = _useState2[0], - setAnimateOrigin = _useState2[1]; - - var slot = Object(use_slot["a" /* default */])(__unstableSlotName); - var isExpanded = expandOnMobile && isMobileViewport; - - var _useResizeObserver = Object(use_resize_observer["a" /* default */])(), - _useResizeObserver2 = Object(slicedToArray["a" /* default */])(_useResizeObserver, 2), - containerResizeListener = _useResizeObserver2[0], - contentSize = _useResizeObserver2[1]; - - noArrow = isExpanded || noArrow; - Object(external_this_wp_element_["useLayoutEffect"])(function () { - if (isExpanded) { - setClass(containerRef.current, 'is-without-arrow', noArrow); - setClass(containerRef.current, 'is-alternate', isAlternate); - setAttribute(containerRef.current, 'data-x-axis'); - setAttribute(containerRef.current, 'data-y-axis'); - setStyle(containerRef.current, 'top'); - setStyle(containerRef.current, 'left'); - setStyle(contentRef.current, 'maxHeight'); - setStyle(contentRef.current, 'maxWidth'); - return; - } - var refresh = function refresh() { - if (!containerRef.current || !contentRef.current) { - return; - } - var anchor = computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding); - if (!anchor) { - return; - } +/** + * Internal dependencies + */ - var _containerRef$current = containerRef.current, - offsetParent = _containerRef$current.offsetParent, - ownerDocument = _containerRef$current.ownerDocument; - var relativeOffsetTop = 0; // If there is a positioned ancestor element that is not the body, - // subtract the position from the anchor rect. If the position of - // the popover is fixed, the offset parent is null or the body - // element, in which case the position is relative to the viewport. - // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent - - if (offsetParent && offsetParent !== ownerDocument.body) { - var offsetParentRect = offsetParent.getBoundingClientRect(); - relativeOffsetTop = offsetParentRect.top; - anchor = new window.DOMRect(anchor.left - offsetParentRect.left, anchor.top - offsetParentRect.top, anchor.width, anchor.height); - } - var boundaryElement; +var SHOW_CLASS = 'highlight-tooltip__show'; + +function HighlightTooltip(_ref) { + var title = _ref.title, + closeButtonText = _ref.closeButtonText, + content = _ref.content, + _ref$show = _ref.show, + show = _ref$show === void 0 ? true : _ref$show, + id = _ref.id, + onClose = _ref.onClose, + delay = _ref.delay, + _ref$onShow = _ref.onShow, + onShow = _ref$onShow === void 0 ? external_lodash_["noop"] : _ref$onShow, + _ref$useAnchor = _ref.useAnchor, + useAnchor = _ref$useAnchor === void 0 ? false : _ref$useAnchor; - if (__unstableBoundaryParent) { - var _containerRef$current2; + var _useState = Object(external_wp_element_["useState"])(delay > 0 ? null : show), + _useState2 = slicedToArray_default()(_useState, 2), + showHighlight = _useState2[0], + setShowHighlight = _useState2[1]; - boundaryElement = (_containerRef$current2 = containerRef.current.closest('.popover-slot')) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.parentNode; + var _useState3 = Object(external_wp_element_["useState"])(null), + _useState4 = slicedToArray_default()(_useState3, 2), + node = _useState4[0], + setNode = _useState4[1]; + + var _useState5 = Object(external_wp_element_["useState"])(null), + _useState6 = slicedToArray_default()(_useState5, 2), + anchorRect = _useState6[0], + setAnchorRect = _useState6[1]; + + Object(external_wp_element_["useEffect"])(function () { + var element = document.getElementById(id); + var container, parent; + + if (element && !node) { + // Add tooltip container + if (!useAnchor) { + parent = element.parentElement; + } else { + parent = document.createElement('div'); + document.body.appendChild(parent); } - var usedContentSize = !contentSize.height ? contentRef.current.getBoundingClientRect() : contentSize; + container = document.createElement('div'); + container.classList.add('highlight-tooltip__container'); + parent.appendChild(container); + setNode(container); + } - var _computePopoverPositi = computePopoverPosition(anchor, usedContentSize, position, __unstableSticky, containerRef.current, relativeOffsetTop, boundaryElement), - popoverTop = _computePopoverPositi.popoverTop, - popoverLeft = _computePopoverPositi.popoverLeft, - xAxis = _computePopoverPositi.xAxis, - yAxis = _computePopoverPositi.yAxis, - contentHeight = _computePopoverPositi.contentHeight, - contentWidth = _computePopoverPositi.contentWidth; + var timeoutId = triggerShowTooltip(container); + return function () { + if (container) { + var parentElement = container.parentElement; + parentElement.removeChild(container); - if (typeof popoverTop === 'number' && typeof popoverLeft === 'number') { - setStyle(containerRef.current, 'top', popoverTop + 'px'); - setStyle(containerRef.current, 'left', popoverLeft + 'px'); + if (useAnchor) { + parentElement.remove(); + } } - setClass(containerRef.current, 'is-without-arrow', noArrow || xAxis === 'center' && yAxis === 'middle'); - setClass(containerRef.current, 'is-alternate', isAlternate); - setAttribute(containerRef.current, 'data-x-axis', xAxis); - setAttribute(containerRef.current, 'data-y-axis', yAxis); - setStyle(contentRef.current, 'maxHeight', typeof contentHeight === 'number' ? contentHeight + 'px' : ''); - setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position - - var yAxisMapping = { - top: 'bottom', - bottom: 'top' - }; - var xAxisMapping = { - left: 'right', - right: 'left' - }; - var animateYAxis = yAxisMapping[yAxis] || 'middle'; - var animateXAxis = xAxisMapping[xAxis] || 'center'; - setAnimateOrigin(animateXAxis + ' ' + animateYAxis); + if (timeoutId) { + clearTimeout(timeoutId); + } }; - - refresh(); - /* - * There are sometimes we need to reposition or resize the popover that - * are not handled by the resize/scroll window events (i.e. CSS changes - * in the layout that changes the position of the anchor). - * - * For these situations, we refresh the popover every 0.5s - */ - - var intervalHandle = window.setInterval(refresh, 500); - var rafId; - - var refreshOnAnimationFrame = function refreshOnAnimationFrame() { - window.cancelAnimationFrame(rafId); - rafId = window.requestAnimationFrame(refresh); - }; // Sometimes a click trigger a layout change that affects the popover - // position. This is an opportunity to immediately refresh rather than - // at the interval. - - - window.addEventListener('click', refreshOnAnimationFrame); - window.addEventListener('resize', refresh); - window.addEventListener('scroll', refresh, true); - var observer; - - if (__unstableObserveElement) { - observer = new window.MutationObserver(refresh); - observer.observe(__unstableObserveElement, { - attributes: true - }); + }, []); + Object(external_wp_element_["useEffect"])(function () { + if (!showHighlight && node) { + node.classList.remove(SHOW_CLASS); + } + }, [showHighlight]); + Object(external_wp_element_["useEffect"])(function () { + if (show !== showHighlight && showHighlight !== null && node) { + setShowHighlight(show); + + if (!show) { + node.classList.remove(SHOW_CLASS); + } else if (node) { + triggerShowTooltip(node); + } } - + }, [show]); + Object(external_wp_element_["useLayoutEffect"])(function () { + window.addEventListener('resize', updateSize); return function () { - window.clearInterval(intervalHandle); - window.removeEventListener('resize', refresh); - window.removeEventListener('scroll', refresh, true); - window.removeEventListener('click', refreshOnAnimationFrame); - window.cancelAnimationFrame(rafId); - - if (observer) { - observer.disconnect(); - } + return window.removeEventListener('resize', updateSize); }; - }, [isExpanded, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding, position, contentSize, __unstableSticky, __unstableObserveElement, __unstableBoundaryParent]); - useFocusContentOnMount(focusOnMount, contentRef); // Event handlers + }, []); - var maybeClose = function maybeClose(event) { - // Close on escape - if (event.keyCode === keycodes_build_module["b" /* ESCAPE */] && onClose) { - event.stopPropagation(); - onClose(); - } // Preserve original content prop behavior + function updateSize() { + if (useAnchor) { + var element = document.getElementById(id); + setAnchorRect(element.getBoundingClientRect()); + } + } + var triggerShowTooltip = function triggerShowTooltip(container) { + var timeoutId = null; - if (onKeyDown) { - onKeyDown(event); + if (delay > 0) { + timeoutId = setTimeout(function () { + timeoutId = null; + showTooltip(container); + }, delay); + } else if (!showHighlight) { + showTooltip(container); } + + return timeoutId; }; - /** - * Shims an onFocusOutside callback to be compatible with a deprecated - * onClickOutside prop function, if provided. - * - * @param {FocusEvent} event Focus event from onFocusOutside. - */ + var showTooltip = function showTooltip(container) { + var element = document.getElementById(id); - function handleOnFocusOutside(event) { - // Defer to given `onFocusOutside` if specified. Call `onClose` only if - // both `onFocusOutside` and `onClickOutside` are unspecified. Doing so - // assures backwards-compatibility for prior `onClickOutside` default. - if (onFocusOutside) { - onFocusOutside(event); - return; - } else if (!onClickOutside) { - if (onClose) { - onClose(); - } + if (element && useAnchor) { + setAnchorRect(element.getBoundingClientRect()); + } - return; - } // Simulate MouseEvent using FocusEvent#relatedTarget as emulated click - // target. MouseEvent constructor is unsupported in Internet Explorer. + if (container) { + container.classList.add(SHOW_CLASS); + } + setShowHighlight(true); + onShow(); + }; - var clickEvent; + var triggerClose = function triggerClose() { + setShowHighlight(false); - try { - clickEvent = new window.MouseEvent('click'); - } catch (error) { - clickEvent = document.createEvent('MouseEvent'); - clickEvent.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + if (onClose) { + onClose(); } + }; - Object.defineProperty(clickEvent, 'target', { - get: function get() { - return event.relatedTarget; - } - }); - Object(deprecated_build_module["a" /* default */])('Popover onClickOutside prop', { - alternative: 'onFocusOutside' - }); - onClickOutside(clickEvent); - } // Disable reason: We care to capture the _bubbled_ events from inputs - // within popover as inferring close intent. - - - var content = Object(external_this_wp_element_["createElement"])(detect_outside, { - onFocusOutside: handleOnFocusOutside - }, Object(external_this_wp_element_["createElement"])(build_module_animate["a" /* default */], { - type: animate && animateOrigin ? 'appear' : null, - options: { - origin: animateOrigin - } - }, function (_ref3) { - var animateClassName = _ref3.className; - return Object(external_this_wp_element_["createElement"])(isolated_event_container["a" /* default */], Object(esm_extends["a" /* default */])({ - className: classnames_default()('components-popover', className, animateClassName, { - 'is-expanded': isExpanded, - 'is-without-arrow': noArrow, - 'is-alternate': isAlternate - }) - }, contentProps, { - onKeyDown: maybeClose, - ref: containerRef - }), isExpanded && Object(external_this_wp_element_["createElement"])(scroll_lock, null), isExpanded && Object(external_this_wp_element_["createElement"])("div", { - className: "components-popover__header" - }, Object(external_this_wp_element_["createElement"])("span", { - className: "components-popover__header-title" - }, headerTitle), Object(external_this_wp_element_["createElement"])(build_module_button["a" /* default */], { - className: "components-popover__close", - icon: library_close["a" /* default */], - onClick: onClose - })), Object(external_this_wp_element_["createElement"])("div", { - ref: contentRef, - className: "components-popover__content", - tabIndex: "-1" - }, Object(external_this_wp_element_["createElement"])("div", { - style: { - position: 'relative' - } - }, containerResizeListener, children))); - })); // Apply focus to element as long as focusOnMount is truthy; false is - // the only "disabled" value. - - if (focusOnMount) { - content = Object(external_this_wp_element_["createElement"])(FocusManaged, null, content); + if (!node) { + return null; } - if (slot.ref) { - content = Object(external_this_wp_element_["createElement"])(slot_fill["a" /* Fill */], { - name: __unstableSlotName - }, content); - } + return Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])("div", { + className: "highlight-tooltip__portal" + }, showHighlight ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["IsolatedEventContainer"], { + className: "highlight-tooltip__overlay" + }), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], { + className: "highlight-tooltip__popover", + noArrow: false, + anchorRect: anchorRect, + focusOnMount: "container" + }, Object(external_wp_element_["createElement"])(external_wp_components_["Card"], { + size: "medium" + }, Object(external_wp_element_["createElement"])(external_wp_components_["CardHeader"], null, title, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + isSmall: true, + onClick: triggerClose, + icon: library_close["a" /* default */] + })), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, content || null), Object(external_wp_element_["createElement"])(external_wp_components_["CardFooter"], { + isBorderless: true + }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + size: "small", + isPrimary: true, + onClick: triggerClose + }, closeButtonText || Object(external_wp_i18n_["__"])('Close', 'woocommerce-admin')))))) : null), node); +} + +HighlightTooltip.propTypes = { + /** + * The id of the element it should highlight, should be unique per HighlightTooltip. + */ + id: prop_types_default.a.string.isRequired, - if (anchorRef || anchorRect) { - return content; - } + /** + * Title of the popup + */ + title: prop_types_default.a.string.isRequired, - return Object(external_this_wp_element_["createElement"])("span", { - ref: anchorRefFallback - }, content); -}; + /** + * Text of the close button. + */ + closeButtonText: prop_types_default.a.string.isRequired, + + /** + * Content of the popup, can be either text or react element. + */ + content: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]), -var PopoverContainer = popover_Popover; + /** + * If to show the popup, defaults to true. + */ + show: prop_types_default.a.bool, -PopoverContainer.Slot = function (_ref4) { - var _ref4$name = _ref4.name, - name = _ref4$name === void 0 ? SLOT_NAME : _ref4$name; - return Object(external_this_wp_element_["createElement"])(slot_fill["b" /* Slot */], { - bubblesVirtually: true, - name: name, - className: "popover-slot" - }); + /** + * Callback for when the user closes the popup. + */ + onClose: prop_types_default.a.func, + + /** + * This will delay the popup from appearing by the number of ms. + */ + delay: prop_types_default.a.number, + + /** + * A callback for when the tooltip is shown. + */ + onShow: prop_types_default.a.func, + + /** + * useAnchor, will append the tooltip to the body tag, and make use of the anchorRect to display the tooltip. + * Defaults to false. + */ + useAnchor: prop_types_default.a.bool }; -/* harmony default export */ var popover = __webpack_exports__["a"] = (PopoverContainer); -//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js +var es_array_find = __webpack_require__(192); -/***/ }), -/* 118 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// EXTERNAL MODULE: external ["wp","dom"] +var external_wp_dom_ = __webpack_require__(262); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STORE_KEY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_NAMESPACE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return QUEUE_OPTION_NAME; }); -var STORE_KEY = 'wc/customer-effort-score'; -var API_NAMESPACE = '/wc-admin'; -var QUEUE_OPTION_NAME = 'woocommerce_ces_tracks_queue'; +// CONCATENATED MODULE: ./client/hooks/useFocusOnMount.js -/***/ }), -/* 119 */ -/***/ (function(module, exports, __webpack_require__) { /** - * Copyright (c) 2014-present, Facebook, Inc. + * This hook was directly copied from https://github.com/WordPress/gutenberg/blob/master/packages/compose/src/hooks/use-focus-on-mount/index.js + * to avoid its absence in older versions of WordPress. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * This can be removed once the minimum supported version of WordPress includes this hook. */ -var runtime = (function (exports) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - function define(obj, key, value) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - return obj[key]; - } - try { - // IE 8 has a broken Object.defineProperty that only works on DOM objects. - define({}, ""); - } catch (err) { - define = function(obj, key, value) { - return obj[key] = value; - }; - } - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); +/** + * External dependencies + */ - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - exports.wrap = wrap; +/** + * Hook used to focus the first tabbable element on mount. + * + * @param {boolean|string} focusOnMount Focus on mount mode. + * @return {Function} Ref callback. + * + * @example + * ```js + * import { useFocusOnMount } from '@wordpress/compose'; + * + * const WithFocusOnMount = () => { + * const ref = useFocusOnMount() + * return ( + *
+ *
+ * ); + * } + * ``` + */ - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; +function useFocusOnMount() { + var focusOnMount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'firstElement'; + var focusOnMountRef = Object(external_wp_element_["useRef"])(focusOnMount); + Object(external_wp_element_["useEffect"])(function () { + focusOnMountRef.current = focusOnMount; + }, [focusOnMount]); + return Object(external_wp_element_["useCallback"])(function (node) { + if (!node || focusOnMountRef.current === false) { + return; } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = define( - GeneratorFunctionPrototype, - toStringTagSymbol, - "GeneratorFunction" - ); - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - define(prototype, method, function(arg) { - return this._invoke(method, arg); - }); - }); - } - - exports.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - exports.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - define(genFun, toStringTagSymbol, "GeneratorFunction"); + if (node.contains(node.ownerDocument.activeElement)) { + return; } - genFun.prototype = Object.create(Gp); - return genFun; - }; - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - exports.awrap = function(arg) { - return { __await: arg }; - }; + var target = node; - function AsyncIterator(generator, PromiseImpl) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return PromiseImpl.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } + if (focusOnMountRef.current === 'firstElement') { + var firstTabbable = external_wp_dom_["focus"].tabbable.find(node)[0]; - return PromiseImpl.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); + if (firstTabbable) { + target = firstTabbable; } } - var previousPromise; + target.focus(); + }, []); +} +// CONCATENATED MODULE: ./client/hooks/useFocusOutside.js +/** + * External dependencies + */ - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new PromiseImpl(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - exports.AsyncIterator = AsyncIterator; +/** + * Input types which are classified as button types, for use in considering + * whether element is a (focus-normalized) button. + * + * @type {string[]} + */ - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { - if (PromiseImpl === void 0) PromiseImpl = Promise; +var INPUT_BUTTON_TYPES = ['button', 'submit']; +/** + * @typedef {HTMLButtonElement | HTMLLinkElement | HTMLInputElement} FocusNormalizedButton + */ +// Disable reason: Rule doesn't support predicate return types - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList), - PromiseImpl - ); +/* eslint-disable jsdoc/valid-types */ - return exports.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; +/** + * Returns true if the given element is a button element subject to focus + * normalization, or false otherwise. + * + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus + * + * @param {EventTarget} eventTarget The target from a mouse or touch event. + * + * @return {eventTarget is FocusNormalizedButton} Whether element is a button. + */ - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; +function isFocusNormalizedButton(eventTarget) { + if (!(eventTarget instanceof window.HTMLElement)) { + return false; + } - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } + switch (eventTarget.nodeName) { + case 'A': + case 'BUTTON': + return true; - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } + case 'INPUT': + return Object(external_lodash_["includes"])(INPUT_BUTTON_TYPES, + /** @type {HTMLInputElement} */ + eventTarget.type); + } - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } + return false; +} +/* eslint-enable jsdoc/valid-types */ - context.method = method; - context.arg = arg; +/** + * @typedef {import('react').SyntheticEvent} SyntheticEvent + */ - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } +/** + * @callback EventCallback + * @param {SyntheticEvent} event input related event. + */ - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; +/** + * @typedef FocusOutsideReactElement + * @property {EventCallback} handleFocusOutside callback for a focus outside event. + */ - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } +/** + * @typedef {import('react').MutableRefObject} FocusOutsideRef + */ - context.dispatchException(context.arg); +/** + * @typedef {Object} FocusOutsideReturnValue + * @property {EventCallback} onFocus An event handler for focus events. + * @property {EventCallback} onBlur An event handler for blur events. + * @property {EventCallback} onMouseDown An event handler for mouse down events. + * @property {EventCallback} onMouseUp An event handler for mouse up events. + * @property {EventCallback} onTouchStart An event handler for touch start events. + * @property {EventCallback} onTouchEnd An event handler for touch end events. + */ - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } +/** + * A react hook that can be used to check whether focus has moved outside the + * element the event handlers are bound to. + * + * @param {EventCallback} onFocusOutside A callback triggered when focus moves outside + * the element the event handlers are bound to. + * + * @return {FocusOutsideReturnValue} An object containing event handlers. Bind the event handlers + * to a wrapping element element to capture when focus moves + * outside that element. + */ - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; +function useFocusOutside(onFocusOutside) { + var currentOnFocusOutside = Object(external_wp_element_["useRef"])(onFocusOutside); + Object(external_wp_element_["useEffect"])(function () { + currentOnFocusOutside.current = onFocusOutside; + }, [onFocusOutside]); + var preventBlurCheck = Object(external_wp_element_["useRef"])(false); + /** + * @type {import('react').MutableRefObject} + */ - if (record.arg === ContinueSentinel) { - continue; - } + var blurCheckTimeoutId = Object(external_wp_element_["useRef"])(); + /** + * Cancel a blur check timeout. + */ - return { - value: record.arg, - done: context.done - }; + var cancelBlurCheck = Object(external_wp_element_["useCallback"])(function () { + clearTimeout(blurCheckTimeoutId.current); + }, []); // Cancel blur checks on unmount. - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } + Object(external_wp_element_["useEffect"])(function () { + return function () { + return cancelBlurCheck(); }; - } + }, []); // Cancel a blur check if the callback or ref is no longer provided. - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - // Note: ["return"] must be used for ES3 parsing compatibility. - if (delegate.iterator["return"]) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } + Object(external_wp_element_["useEffect"])(function () { + if (!onFocusOutside) { + cancelBlurCheck(); + } + }, [onFocusOutside, cancelBlurCheck]); + /** + * Handles a mousedown or mouseup event to respectively assign and + * unassign a flag for preventing blur check on button elements. Some + * browsers, namely Firefox and Safari, do not emit a focus event on + * button elements when clicked, while others do. The logic here + * intends to normalize this as treating click on buttons as focus. + * + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus + * + * @param {SyntheticEvent} event Event for mousedown or mouseup. + */ - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } + var normalizeButtonFocus = Object(external_wp_element_["useCallback"])(function (event) { + var type = event.type, + target = event.target; + var isInteractionEnd = Object(external_lodash_["includes"])(['mouseup', 'touchend'], type); - return ContinueSentinel; + if (isInteractionEnd) { + preventBlurCheck.current = false; + } else if (isFocusNormalizedButton(target)) { + preventBlurCheck.current = true; } + }, []); + /** + * A callback triggered when a blur event occurs on the element the handler + * is bound to. + * + * Calls the `onFocusOutside` callback in an immediate timeout if focus has + * move outside the bound element and is still within the document. + * + * @param {SyntheticEvent} event Blur event. + */ - var record = tryCatch(method, delegate.iterator, context.arg); + var queueBlurCheck = Object(external_wp_element_["useCallback"])(function (event) { + // React does not allow using an event reference asynchronously + // due to recycling behavior, except when explicitly persisted. + event.persist(); // Skip blur check if clicking button. See `normalizeButtonFocus`. - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; + if (preventBlurCheck.current) { + return; } - var info = record.arg; + blurCheckTimeoutId.current = setTimeout(function () { + // If document is not focused then focus should remain + // inside the wrapped component and therefore we cancel + // this blur event thereby leaving focus in place. + // https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus. + if (!document.hasFocus()) { + event.preventDefault(); + return; + } - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } + if (typeof currentOnFocusOutside.current === 'function') { + currentOnFocusOutside.current(event); + } + }, 0); + }, []); + return { + onFocus: cancelBlurCheck, + onMouseDown: normalizeButtonFocus, + onMouseUp: normalizeButtonFocus, + onTouchStart: normalizeButtonFocus, + onTouchEnd: normalizeButtonFocus, + onBlur: queueBlurCheck + }; +} +// CONCATENATED MODULE: ./client/header/activity-panel/panel.js - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } +/** + * External dependencies + */ - } else { - // Re-yield the result returned by the delegate method. - return info; - } - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); +/** + * Internal dependencies + */ - define(Gp, toStringTagSymbol, "Generator"); - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return "[object Generator]"; - }; +var panel_Panel = function Panel(_ref) { + var content = _ref.content, + isPanelOpen = _ref.isPanelOpen, + isPanelSwitching = _ref.isPanelSwitching, + currentTab = _ref.currentTab, + tab = _ref.tab, + closePanel = _ref.closePanel, + clearPanel = _ref.clearPanel; + var panelClass = 'woocommerce-layout__activity-panel-wrapper'; - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; + var handleFocusOutside = function handleFocusOutside(event) { + var isClickOnModalOrSnackbar = event.relatedTarget && (event.relatedTarget.closest('.woocommerce-inbox-dismiss-confirmation_modal') || event.relatedTarget.closest('.components-snackbar__action')); - if (1 in locs) { - entry.catchLoc = locs[1]; + if (isPanelOpen && !isClickOnModalOrSnackbar) { + closePanel(); } + }; - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; + var possibleFocusPanel = function possibleFocusPanel() { + if (!containerRef.current || !isPanelOpen || !tab) { + return; } - this.tryEntries.push(entry); - } + focusOnMountRef(containerRef.current); + }; + + var finishTransition = function finishTransition(e) { + if (e && e.propertyName === 'transform') { + clearPanel(); + possibleFocusPanel(); + } + }; + + var focusOnMountRef = useFocusOnMount(); + var useFocusOutsideProps = useFocusOutside(handleFocusOutside); + var containerRef = Object(external_wp_element_["useRef"])(null); + var mergedContainerRef = Object(external_wp_element_["useCallback"])(function (node) { + containerRef.current = node; + focusOnMountRef(node); + }, []); - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; + if (!tab) { + return Object(external_wp_element_["createElement"])("div", { + className: panelClass + }); } - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); + if (!content) { + return null; } - exports.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } + var classNames = classnames_default()(panelClass, { + 'is-open': isPanelOpen, + 'is-switching': isPanelSwitching + }); + return Object(external_wp_element_["createElement"])("div", extends_default()({ + className: classNames, + tabIndex: 0, + role: "tabpanel", + "aria-label": tab.title, + onTransitionEnd: finishTransition + }, useFocusOutsideProps, { + ref: mergedContainerRef + }), Object(external_wp_element_["createElement"])("div", { + className: "woocommerce-layout__activity-panel-content", + key: 'activity-panel-' + currentTab, + id: 'activity-panel-' + currentTab + }, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], { + fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null) + }, content))); +}; +/* harmony default export */ var panel = (panel_Panel); +// CONCATENATED MODULE: ./client/header/activity-panel/index.js - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === "function") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - // Return an iterator with no values. - return { next: doneResult }; - } - exports.values = values; - function doneResult() { - return { value: undefined, done: true }; - } - Context.prototype = { - constructor: Context, - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = "next"; - this.arg = undefined; +/** + * External dependencies + */ - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - return !! caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } +/** + * Internal dependencies + */ - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } +var HelpPanel = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | activity-panels-help */[__webpack_require__.e(54), __webpack_require__.e(6), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 705)); +}); +var InboxPanel = Object(external_wp_element_["lazy"])(function () { + return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 689)); +}); +var activity_panel_ActivityPanel = function ActivityPanel(_ref) { + var isEmbedded = _ref.isEmbedded, + query = _ref.query, + userPreferencesData = _ref.userPreferencesData; - return this.complete(record); - }, + var _useState = Object(external_wp_element_["useState"])(''), + _useState2 = slicedToArray_default()(_useState, 2), + currentTab = _useState2[0], + setCurrentTab = _useState2[1]; - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } + var _useState3 = Object(external_wp_element_["useState"])(false), + _useState4 = slicedToArray_default()(_useState3, 2), + isPanelClosing = _useState4[0], + setIsPanelClosing = _useState4[1]; + + var _useState5 = Object(external_wp_element_["useState"])(false), + _useState6 = slicedToArray_default()(_useState5, 2), + isPanelOpen = _useState6[0], + setIsPanelOpen = _useState6[1]; + + var _useState7 = Object(external_wp_element_["useState"])(false), + _useState8 = slicedToArray_default()(_useState7, 2), + isPanelSwitching = _useState8[0], + setIsPanelSwitching = _useState8[1]; + + var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { + var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]), + getOption = _select.getOption, + isResolving = _select.isResolving; - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } + return { + hasUnreadNotes: getUnreadNotes(select), + requestingTaskListOptions: isResolving('getOption', ['woocommerce_task_list_complete']) || isResolving('getOption', ['woocommerce_task_list_hidden']), + setupTaskListComplete: getOption('woocommerce_task_list_complete') === 'yes', + setupTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes', + trackedCompletedTasks: getOption('woocommerce_task_list_tracked_completed_tasks') || [] + }; + }), + hasUnreadNotes = _useSelect.hasUnreadNotes, + requestingTaskListOptions = _useSelect.requestingTaskListOptions, + setupTaskListComplete = _useSelect.setupTaskListComplete, + setupTaskListHidden = _useSelect.setupTaskListHidden, + trackedCompletedTasks = _useSelect.trackedCompletedTasks; - return ContinueSentinel; - }, + var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]), + updateOptions = _useDispatch.updateOptions; - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, + var _useUser = Object(external_wc_data_["useUser"])(), + currentUserCan = _useUser.currentUserCan; - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } + var togglePanel = function togglePanel(_ref2, isTabOpen) { + var tabName = _ref2.name; + var panelSwitching = tabName !== currentTab && currentTab !== '' && isTabOpen && isPanelOpen; - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, + if (isPanelClosing) { + return; + } - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; + setCurrentTab(tabName); + setIsPanelOpen(isTabOpen); + setIsPanelSwitching(panelSwitching); + }; - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } + var _closePanel = function closePanel() { + setIsPanelClosing(true); + setIsPanelOpen(false); + }; - return ContinueSentinel; + var _clearPanel = function clearPanel() { + if (!isPanelOpen) { + setIsPanelClosing(false); + setIsPanelSwitching(false); + setCurrentTab(''); } }; - // Regardless of whether this script is executing as a CommonJS module - // or not, return the runtime object so that we can declare the variable - // regeneratorRuntime in the outer scope, which allows this module to be - // injected easily by `bin/regenerator --include-runtime script.js`. - return exports; - -}( - // If this script is executing as a CommonJS module, use module.exports - // as the regeneratorRuntime namespace. Otherwise create a new empty - // object. Either way, the resulting object will be used to initialize - // the regeneratorRuntime variable at the top of this file. - true ? module.exports : undefined -)); + var isHomescreen = function isHomescreen() { + return query.page === 'wc-admin' && !query.path; + }; -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - // This module should not be running in strict mode, so the above - // assignment should always work unless something is misconfigured. Just - // in case runtime.js accidentally runs in strict mode, we can escape - // strict mode using a global Function call. This could conceivably fail - // if a Content Security Policy forbids using Function, but in that case - // the proper solution is to fix the accidental strict mode problem. If - // you've misconfigured your bundler to force strict mode and applied a - // CSP to forbid Function, and you're not willing to fix either of those - // problems, please detail your unique predicament in a GitHub issue. - Function("r", "regeneratorRuntime = r")(runtime); -} + var isPerformingSetupTask = function isPerformingSetupTask() { + return query.task && !query.path && (requestingTaskListOptions === true || setupTaskListHidden === false && setupTaskListComplete === false); + }; // @todo Pull in dynamic unread status/count -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { + var getTabs = function getTabs() { + var inbox = { + name: 'inbox', + title: Object(external_wp_i18n_["__"])('Inbox', 'woocommerce-admin'), + icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { + icon: library_inbox + }), + unread: hasUnreadNotes, + visible: (isEmbedded || !isHomescreen()) && !isPerformingSetupTask() + }; + var setup = { + name: 'setup', + title: Object(external_wp_i18n_["__"])('Finish setup', 'woocommerce-admin'), + icon: Object(external_wp_element_["createElement"])(setup_progress_SetupProgress, null), + onClick: function onClick() { + var currentLocation = window.location.href; + var homescreenLocation = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin'); // Don't navigate if we're already on the homescreen, this will cause an infinite loop -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ + if (currentLocation !== homescreenLocation) { + // Ensure that if the user is trying to get to the task list they can see it even if + // it was dismissed. + if (setupTaskListHidden === 'no') { + redirectToHomeScreen(); + } else { + updateOptions({ + woocommerce_task_list_hidden: 'no' + }).then(redirectToHomeScreen); + } + } + return null; + }, + visible: currentUserCan('manage_woocommerce') && !setupTaskListComplete && !setupTaskListHidden && !isPerformingSetupTask() && (!isHomescreen() || isEmbedded) + }; + var help = { + name: 'help', + title: Object(external_wp_i18n_["__"])('Help', 'woocommerce-admin'), + icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { + icon: library_help + }), + visible: isHomescreen() && !isEmbedded || isPerformingSetupTask() + }; + var displayOptions = { + component: display_options_DisplayOptions, + visible: !isEmbedded && isHomescreen() && !isPerformingSetupTask() + }; + var previewSite = { + name: 'previewSite', + title: Object(external_wp_i18n_["__"])('Preview site', 'woocommerce-admin'), + icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { + icon: external["a" /* default */] + }), + visible: query.page === 'wc-admin' && query.task === 'appearance', + onClick: function onClick() { + window.open(window.wcSettings.siteUrl); + return null; + } + }; + return [inbox, setup, previewSite, displayOptions, help].filter(function (tab) { + return tab.visible; + }); + }; + var getPanelContent = function getPanelContent(tab) { + var task = query.task; -var ReactPropTypesSecret = __webpack_require__(121); + switch (tab) { + case 'inbox': + return Object(external_wp_element_["createElement"])(InboxPanel, null); -function emptyFunction() {} -function emptyFunctionWithReset() {} -emptyFunctionWithReset.resetWarningCache = emptyFunction; + case 'help': + return Object(external_wp_element_["createElement"])(HelpPanel, { + taskName: task + }); -module.exports = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; + default: + return null; } - var err = 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' - ); - err.name = 'Invariant Violation'; - throw err; }; - shim.isRequired = shim; - function getShim() { - return shim; + + var redirectToHomeScreen = function redirectToHomeScreen() { + if (Object(utils["f" /* isWCAdmin */])(window.location.href)) { + Object(external_wc_navigation_["getHistory"])().push(Object(external_wc_navigation_["getNewPath"])({}, '/', {})); + } else { + window.location.href = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin'); + } }; - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - any: shim, - arrayOf: getShim, - element: shim, - elementType: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim, - exact: getShim, + var closedHelpPanelHighlight = function closedHelpPanelHighlight() { + Object(external_wc_tracks_["recordEvent"])('help_tooltip_click'); - checkPropTypes: emptyFunctionWithReset, - resetWarningCache: emptyFunction + if (userPreferencesData && userPreferencesData.updateUserPreferences) { + userPreferencesData.updateUserPreferences({ + help_panel_highlight_shown: 'yes' + }); + } }; - ReactPropTypes.PropTypes = ReactPropTypes; + var shouldShowHelpTooltip = function shouldShowHelpTooltip() { + var task = query.task; + var startedTasks = userPreferencesData && userPreferencesData.task_list_tracked_started_tasks; + var highlightShown = userPreferencesData && userPreferencesData.help_panel_highlight_shown; - return ReactPropTypes; -}; + if (task && highlightShown !== 'yes' && (startedTasks || {})[task] > 1 && !trackedCompletedTasks.includes(task)) { + return true; + } + return false; + }; -/***/ }), -/* 121 */ -/***/ (function(module, exports, __webpack_require__) { + var tabs = getTabs(); + var headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_'); + var showHelpHighlightTooltip = shouldShowHelpTooltip(); + return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wc_components_["H"], { + id: headerId, + className: "screen-reader-text" + }, Object(external_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_components_["Section"], { + component: "aside", + id: "woocommerce-activity-panel", + className: "woocommerce-layout__activity-panel", + "aria-labelledby": headerId + }, Object(external_wp_element_["createElement"])(tabs_Tabs, { + tabs: tabs, + tabOpen: isPanelOpen, + selectedTab: currentTab, + onTabClick: function onTabClick(tab, tabOpen) { + if (tab.onClick) { + tab.onClick(); + return; + } -"use strict"; + togglePanel(tab, tabOpen); + } + }), Object(external_wp_element_["createElement"])(panel_Panel, { + currentTab: true, + isPanelOpen: isPanelOpen, + isPanelSwitching: isPanelSwitching, + tab: Object(external_lodash_["find"])(getTabs(), { + name: currentTab + }), + content: getPanelContent(currentTab), + closePanel: function closePanel() { + return _closePanel(); + }, + clearPanel: function clearPanel() { + return _clearPanel(); + } + })), showHelpHighlightTooltip ? Object(external_wp_element_["createElement"])(HighlightTooltip, { + delay: 1000, + useAnchor: true, + title: Object(external_wp_i18n_["__"])("We're here for help", 'woocommerce-admin'), + content: Object(external_wp_i18n_["__"])('If you have any questions, feel free to explore the WooCommerce docs listed here.', 'woocommerce-admin'), + closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'), + id: "activity-panel-tab-help", + onClose: function onClose() { + return closedHelpPanelHighlight(); + }, + onShow: function onShow() { + return Object(external_wc_tracks_["recordEvent"])('help_tooltip_view'); + } + }) : null); +}; +activity_panel_ActivityPanel.defaultProps = { + getHistory: external_wc_navigation_["getHistory"] +}; +/* harmony default export */ var activity_panel = (activity_panel_ActivityPanel); +// CONCATENATED MODULE: ./client/lib/platform/index.js +var ANDROID_PLATFORM = 'android'; +var IOS_PLATFORM = 'ios'; +var UNKNOWN_PLATFORM = 'unknown'; /** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * Provide basic detection of platform based on user agent. This is not + * a robust check for browser features or the like. You should only use + * this for non-critical display logic. */ +var platform = function platform() { + if (/iPhone|iPad|iPod/i.test(window.navigator.userAgent)) { + return IOS_PLATFORM; + } else if (/Android/i.test(window.navigator.userAgent)) { + return ANDROID_PLATFORM; + } + return UNKNOWN_PLATFORM; +}; +// CONCATENATED MODULE: ./client/mobile-banner/app-icon.js -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; - -module.exports = ReactPropTypesSecret; - - -/***/ }), -/* 122 */, -/* 123 */, -/* 124 */, -/* 125 */, -/* 126 */, -/* 127 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} +var app_icon_AppIcon = function AppIcon() { + return Object(external_wp_element_["createElement"])("svg", { + width: "37", + height: "37", + viewBox: "0 0 92 92", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, Object(external_wp_element_["createElement"])("rect", { + width: "92", + height: "92", + rx: "21.3953", + fill: "#7F54B3" + }), Object(external_wp_element_["createElement"])("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z", + fill: "white" + })); +}; +// EXTERNAL MODULE: ./client/mobile-banner/style.scss +var mobile_banner_style = __webpack_require__(427); -module.exports = g; +// CONCATENATED MODULE: ./client/mobile-banner/constants.js +// The Play Store link is defined as an exported constant mainly for the sake of testing the Mobile App Banner. +// It is nearly impossible to fake navigation in JSDOM 16, so exposing this link for mocking allows us to +// avoid triggering a navigation. +var PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.woocommerce.android'; +var TRACKING_EVENT_NAME = 'wcadmin_mobile_android_banner_click'; +// CONCATENATED MODULE: ./client/mobile-banner/index.js -/***/ }), -/* 128 */, -/* 129 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* unused harmony export isHorizontalEdge */ -/* unused harmony export isVerticalEdge */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getRectangleFromRange; }); -/* unused harmony export computeCaretRect */ -/* unused harmony export placeCaretAtHorizontalEdge */ -/* unused harmony export placeCaretAtVerticalEdge */ -/* unused harmony export isTextField */ -/* unused harmony export isNumberInput */ -/* unused harmony export documentHasTextSelection */ -/* unused harmony export documentHasUncollapsedSelection */ -/* unused harmony export documentHasSelection */ -/* unused harmony export isEntirelySelected */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; }); -/* unused harmony export getOffsetParent */ -/* unused harmony export replace */ -/* unused harmony export remove */ -/* unused harmony export insertAfter */ -/* unused harmony export unwrap */ -/* unused harmony export replaceTag */ -/* unused harmony export wrap */ -/* unused harmony export __unstableStripHTML */ -/* unused harmony export isEmpty */ -/* unused harmony export removeInvalidHTML */ -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _phrasing_content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70); /** * External dependencies */ -/** - * Internal dependencies - */ -function getComputedStyle(node) { - return node.ownerDocument.defaultView.getComputedStyle(node); -} /** - * Returns true if the given selection object is in the forward direction, or - * false otherwise. - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition - * - * @param {Selection} selection Selection object to check. - * - * @return {boolean} Whether the selection is forward. + * Internal dependencies */ -function isSelectionForward(selection) { - var anchorNode = selection.anchorNode, - focusNode = selection.focusNode, - anchorOffset = selection.anchorOffset, - focusOffset = selection.focusOffset; - var position = anchorNode.compareDocumentPosition(focusNode); // Disable reason: `Node#compareDocumentPosition` returns a bitmask value, - // so bitwise operators are intended. - - /* eslint-disable no-bitwise */ - // Compare whether anchor node precedes focus node. If focus node (where - // end of selection occurs) is after the anchor node, it is forward. - - if (position & anchorNode.DOCUMENT_POSITION_PRECEDING) { - return false; - } - if (position & anchorNode.DOCUMENT_POSITION_FOLLOWING) { - return true; - } - /* eslint-enable no-bitwise */ - // `compareDocumentPosition` returns 0 when passed the same node, in which - // case compare offsets. - if (position === 0) { - return anchorOffset <= focusOffset; - } // This should never be reached, but return true as default case. +var SHOW_APP_BANNER_MODIFIER_CLASS = 'woocommerce-layout__show-app-banner'; +var mobile_banner_MobileAppBanner = function MobileAppBanner(_ref) { + var onInstall = _ref.onInstall, + onDismiss = _ref.onDismiss; + Object(external_wp_element_["useEffect"])(function () { + var layout = document.getElementsByClassName('woocommerce-layout')[0]; + if (platform() === ANDROID_PLATFORM) { + if (layout) { + // This is a hack to allow the mobile banner to work in the context of the header which is + // position fixed. This can be refactored away when we move away from the activity panel + // in future. + layout.classList.add(SHOW_APP_BANNER_MODIFIER_CLASS); + } + } - return true; -} -/** - * Check whether the selection is at the edge of the container. Checks for - * horizontal position by default. Set `onlyVertical` to true to check only - * vertically. - * - * @param {Element} container Focusable element. - * @param {boolean} isReverse Set to true to check left, false to check right. - * @param {boolean} onlyVertical Set to true to check only vertical position. - * - * @return {boolean} True if at the edge, false if not. - */ - - -function isEdge(container, isReverse, onlyVertical) { - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(['INPUT', 'TEXTAREA'], container.tagName)) { - if (container.selectionStart !== container.selectionEnd) { - return false; - } - - if (isReverse) { - return container.selectionStart === 0; - } - - return container.value.length === container.selectionStart; - } - - if (!container.isContentEditable) { - return true; - } - - var ownerDocument = container.ownerDocument; - var defaultView = ownerDocument.defaultView; - var selection = defaultView.getSelection(); + return function () { + if (layout) { + layout.classList.remove(SHOW_APP_BANNER_MODIFIER_CLASS); + } + }; + }, []); - if (!selection.rangeCount) { - return false; - } + var _useState = Object(external_wp_element_["useState"])(false), + _useState2 = slicedToArray_default()(_useState, 2), + isDismissed = _useState2[0], + setDismissed = _useState2[1]; // On iOS the "Smart App Banner" meta tag is used so only display this on Android. - var originalRange = selection.getRangeAt(0); - var range = originalRange.cloneRange(); - var isForward = isSelectionForward(selection); - var isCollapsed = selection.isCollapsed; // Collapse in direction of selection. - if (!isCollapsed) { - range.collapse(!isForward); + if (platform() === ANDROID_PLATFORM && !isDismissed) { + return Object(external_wp_element_["createElement"])("div", { + className: "woocommerce-mobile-app-banner" + }, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], { + icon: "no-alt", + "data-testid": "dismiss-btn", + onClick: function onClick() { + onDismiss(); + setDismissed(true); + Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, { + action: 'dismiss' + }); + } + }), Object(external_wp_element_["createElement"])(app_icon_AppIcon, null), Object(external_wp_element_["createElement"])("div", { + className: "woocommerce-mobile-app-banner__description" + }, Object(external_wp_element_["createElement"])("p", { + className: "woocommerce-mobile-app-banner__description__text" + }, Object(external_wp_i18n_["__"])('Run your store from anywhere', 'woocommerce-admin')), Object(external_wp_element_["createElement"])("p", { + className: "woocommerce-mobile-app-banner__description__text" + }, Object(external_wp_i18n_["__"])('Download the WooCommerce app', 'woocommerce-admin'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + href: PLAY_STORE_LINK, + isSecondary: true, + onClick: function onClick() { + onInstall(); + setDismissed(true); + Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, { + action: 'install' + }); + } + }, Object(external_wp_i18n_["__"])('Install', 'woocommerce-admin'))); } - var rangeRect = getRectangleFromRange(range); - - if (!rangeRect) { - return false; - } + return null; +}; +// CONCATENATED MODULE: ./client/hooks/useIsScrolled.js - var computedStyle = getComputedStyle(container); - var lineHeight = parseInt(computedStyle.lineHeight, 10) || 0; // Only consider the multiline selection at the edge if the direction is - // towards the edge. - if (!isCollapsed && rangeRect.height > lineHeight && isForward === isReverse) { - return false; - } +/** + * External dependencies + */ - var padding = parseInt(computedStyle["padding".concat(isReverse ? 'Top' : 'Bottom')], 10) || 0; // Calculate a buffer that is half the line height. In some browsers, the - // selection rectangle may not fill the entire height of the line, so we add - // 3/4 the line height to the selection rectangle to ensure that it is well - // over its line boundary. +function useIsScrolled() { + var _useState = Object(external_wp_element_["useState"])(false), + _useState2 = slicedToArray_default()(_useState, 2), + isScrolled = _useState2[0], + setIsScrolled = _useState2[1]; - var buffer = 3 * parseInt(lineHeight, 10) / 4; - var containerRect = container.getBoundingClientRect(); - var originalRangeRect = getRectangleFromRange(originalRange); - var verticalEdge = isReverse ? containerRect.top + padding > originalRangeRect.top - buffer : containerRect.bottom - padding < originalRangeRect.bottom + buffer; + var rafHandle = Object(external_wp_element_["useRef"])(null); + Object(external_wp_element_["useEffect"])(function () { + var updateIsScrolled = function updateIsScrolled() { + setIsScrolled(window.pageYOffset > 20); + }; - if (!verticalEdge) { - return false; - } + var scrollListener = function scrollListener() { + rafHandle.current = window.requestAnimationFrame(updateIsScrolled); + }; - if (onlyVertical) { - return true; - } // In the case of RTL scripts, the horizontal edge is at the opposite side. + window.addEventListener('scroll', scrollListener); + return function () { + window.removeEventListener('scroll', scrollListener); + window.cancelAnimationFrame(rafHandle.current); + }; + }, []); + return isScrolled; +} +// EXTERNAL MODULE: external ["wp","plugins"] +var external_wp_plugins_ = __webpack_require__(279); +// EXTERNAL MODULE: ./client/navigation/style.scss +var navigation_style = __webpack_require__(428); - var direction = computedStyle.direction; - var isReverseDir = direction === 'rtl' ? !isReverse : isReverse; // To calculate the horizontal position, we insert a test range and see if - // this test range has the same horizontal position. This method proves to - // be better than a DOM-based calculation, because it ignores empty text - // nodes and a trailing line break element. In other words, we need to check - // visual positioning, not DOM positioning. +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(44); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); - var x = isReverseDir ? containerRect.left + 1 : containerRect.right - 1; - var y = isReverse ? containerRect.top + buffer : containerRect.bottom - buffer; - var testRange = hiddenCaretRangeFromPoint(ownerDocument, x, y, container); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.values.js +var es_object_values = __webpack_require__(285); - if (!testRange) { - return false; - } +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.max-safe-integer.js +var es_number_max_safe_integer = __webpack_require__(429); - var side = isReverseDir ? 'left' : 'right'; - var testRect = getRectangleFromRange(testRange); // Allow the position to be 1px off. +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js +var es_number_constructor = __webpack_require__(178); - return Math.abs(testRect[side] - rangeRect[side]) <= 1; -} -/** - * Check whether the selection is horizontally at the edge of the container. - * - * @param {Element} container Focusable element. - * @param {boolean} isReverse Set to true to check left, false for right. - * - * @return {boolean} True if at the horizontal edge, false if not. - */ +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js +var es_regexp_constructor = __webpack_require__(209); +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js +var es_regexp_to_string = __webpack_require__(142); -function isHorizontalEdge(container, isReverse) { - return isEdge(container, isReverse); -} -/** - * Check whether the selection is vertically at the edge of the container. - * - * @param {Element} container Focusable element. - * @param {boolean} isReverse Set to true to check top, false for bottom. - * - * @return {boolean} True if at the vertical edge, false if not. - */ +// CONCATENATED MODULE: ./client/navigation/utils.ts -function isVerticalEdge(container, isReverse) { - return isEdge(container, isReverse, true); -} -/** - * Get the rectangle of a given Range. - * - * @param {Range} range The range. - * - * @return {DOMRect} The rectangle. - */ -function getRectangleFromRange(range) { - // For uncollapsed ranges, get the rectangle that bounds the contents of the - // range; this a rectangle enclosing the union of the bounding rectangles - // for all the elements in the range. - if (!range.collapsed) { - return range.getBoundingClientRect(); - } - var _range = range, - startContainer = _range.startContainer; - var ownerDocument = startContainer.ownerDocument; // Correct invalid "BR" ranges. The cannot contain any children. +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - if (startContainer.nodeName === 'BR') { - var parentNode = startContainer.parentNode; - var index = Array.from(parentNode.childNodes).indexOf(startContainer); - range = ownerDocument.createRange(); - range.setStart(parentNode, index); - range.setEnd(parentNode, index); - } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - var rect = range.getClientRects()[0]; // If the collapsed range starts (and therefore ends) at an element node, - // `getClientRects` can be empty in some browsers. This can be resolved - // by adding a temporary text node with zero-width space to the range. - // - // See: https://stackoverflow.com/a/6847328/995445 - if (!rect) { - var padNode = ownerDocument.createTextNode("\u200B"); // Do not modify the live range. - range = range.cloneRange(); - range.insertNode(padNode); - rect = range.getClientRects()[0]; - padNode.parentNode.removeChild(padNode); - } - return rect; -} -/** - * Get the rectangle for the selection in a container. - * - * @param {Window} win The window of the selection. - * - * @return {?DOMRect} The rectangle. - */ -function computeCaretRect(win) { - var selection = win.getSelection(); - var range = selection.rangeCount ? selection.getRangeAt(0) : null; - if (!range) { - return; - } - return getRectangleFromRange(range); -} -/** - * Places the caret at start or end of a given element. - * - * @param {Element} container Focusable element. - * @param {boolean} isReverse True for end, false for start. - */ -function placeCaretAtHorizontalEdge(container, isReverse) { - if (!container) { - return; - } - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(['INPUT', 'TEXTAREA'], container.tagName)) { - container.focus(); - if (isReverse) { - container.selectionStart = container.value.length; - container.selectionEnd = container.value.length; - } else { - container.selectionStart = 0; - container.selectionEnd = 0; - } - return; - } - container.focus(); - if (!container.isContentEditable) { - return; - } // Select on extent child of the container, not the container itself. This - // avoids the selection always being `endOffset` of 1 when placed at end, - // where `startContainer`, `endContainer` would always be container itself. - var rangeTarget = container[isReverse ? 'lastChild' : 'firstChild']; // If no range target, it implies that the container is empty. Focusing is - // sufficient for caret to be placed correctly. - if (!rangeTarget) { - return; - } - var ownerDocument = container.ownerDocument; - var defaultView = ownerDocument.defaultView; - var selection = defaultView.getSelection(); - var range = ownerDocument.createRange(); - range.selectNodeContents(rangeTarget); - range.collapse(!isReverse); - selection.removeAllRanges(); - selection.addRange(range); -} /** - * Polyfill. - * Get a collapsed range for a given point. - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint - * - * @param {Document} doc The document of the range. - * @param {number} x Horizontal position within the current viewport. - * @param {number} y Vertical position within the current viewport. - * - * @return {?Range} The best range for the given point. + * External dependencies */ -function caretRangeFromPoint(doc, x, y) { - if (doc.caretRangeFromPoint) { - return doc.caretRangeFromPoint(x, y); - } - - if (!doc.caretPositionFromPoint) { - return null; - } - var point = doc.caretPositionFromPoint(x, y); // If x or y are negative, outside viewport, or there is no text entry node. - // https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint - - if (!point) { - return null; +/** + * Get the full URL if a relative path is passed. + */ +var utils_getFullUrl = function getFullUrl(url) { + if (url.indexOf('http') === 0) { + return url; } - var range = doc.createRange(); - range.setStart(point.offsetNode, point.offset); - range.collapse(true); - return range; -} + return Object(wc_admin_settings["f" /* getAdminLink */])(url); +}; /** - * Get a collapsed range for a given point. - * Gives the container a temporary high z-index (above any UI). - * This is preferred over getting the UI nodes and set styles there. - * - * @param {Document} doc The document of the range. - * @param {number} x Horizontal position within the current viewport. - * @param {number} y Vertical position within the current viewport. - * @param {Element} container Container in which the range is expected to be found. - * - * @return {?Range} The best range for the given point. + * Get a default regex expression to match the path and provided params. */ +var utils_getDefaultMatchExpression = function getDefaultMatchExpression(url) { + var escapedUrl = url.replace(/[-\/\\^$*+?.()|[\]{}]/gi, '\\$&'); -function hiddenCaretRangeFromPoint(doc, x, y, container) { - var originalZIndex = container.style.zIndex; - var originalPosition = container.style.position; // A z-index only works if the element position is not static. + var _escapedUrl$split = escapedUrl.split(/\\\?|#/), + _escapedUrl$split2 = slicedToArray_default()(_escapedUrl$split, 3), + path = _escapedUrl$split2[0], + args = _escapedUrl$split2[1], + hash = _escapedUrl$split2[2]; - container.style.zIndex = '10000'; - container.style.position = 'relative'; - var range = caretRangeFromPoint(doc, x, y); - container.style.zIndex = originalZIndex; - container.style.position = originalPosition; - return range; -} + var hashExpression = hash ? "(.*#".concat(hash, "$)") : ''; + var argsExpression = args ? args.split('&').reduce(function (acc, param) { + return "".concat(acc, "(?=.*[?|&]").concat(param, "(&|$|#))"); + }, '') : ''; + return '^' + path + argsExpression + hashExpression; +}; /** - * Places the caret at the top or bottom of a given element. - * - * @param {Element} container Focusable element. - * @param {boolean} isReverse True for bottom, false for top. - * @param {DOMRect} [rect] The rectangle to position the caret with. - * @param {boolean} [mayUseScroll=true] True to allow scrolling, false to disallow. + * Get a match score for a menu item given a location. */ +var getMatchScore = function getMatchScore(location, itemUrl) { + var itemExpression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; -function placeCaretAtVerticalEdge(container, isReverse, rect) { - var mayUseScroll = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - - if (!container) { - return; + if (!itemUrl) { + return 0; } - if (!rect || !container.isContentEditable) { - placeCaretAtHorizontalEdge(container, isReverse); - return; - } // Offset by a buffer half the height of the caret rect. This is needed - // because caretRangeFromPoint may default to the end of the selection if - // offset is too close to the edge. It's unclear how to precisely calculate - // this threshold; it may be the padded area of some combination of line - // height, caret height, and font size. The buffer offset is effectively - // equivalent to a point at half the height of a line of text. - - - var buffer = rect.height / 2; - var editableRect = container.getBoundingClientRect(); - var x = rect.left; - var y = isReverse ? editableRect.bottom - buffer : editableRect.top + buffer; - var ownerDocument = container.ownerDocument; - var defaultView = ownerDocument.defaultView; - var range = hiddenCaretRangeFromPoint(ownerDocument, x, y, container); - - if (!range || !container.contains(range.startContainer)) { - if (mayUseScroll && (!range || !range.startContainer || !range.startContainer.contains(container))) { - // Might be out of view. - // Easier than attempting to calculate manually. - container.scrollIntoView(isReverse); - placeCaretAtVerticalEdge(container, isReverse, rect, false); - return; - } + var fullUrl = utils_getFullUrl(itemUrl); + var href = location.href; // Return highest possible score for exact match. - placeCaretAtHorizontalEdge(container, isReverse); - return; + if (fullUrl === href) { + return Number.MAX_SAFE_INTEGER; } - var selection = defaultView.getSelection(); - selection.removeAllRanges(); - selection.addRange(range); - container.focus(); // Editable was already focussed, it goes back to old range... - // This fixes it. + var defaultExpression = utils_getDefaultMatchExpression(fullUrl); + var regexp = new RegExp(itemExpression || defaultExpression, 'i'); + return (decodeURIComponent(href).match(regexp) || []).length; +}; - selection.removeAllRanges(); - selection.addRange(range); -} /** - * Check whether the given element is a text field, where text field is defined - * by the ability to select within the input, or that it is contenteditable. - * - * See: https://html.spec.whatwg.org/#textFieldSelection - * - * @param {HTMLElement} element The HTML element. + * Adds a listener that runs on history change. * - * @return {boolean} True if the element is an text field, false if not. + * @param {Function} listener Listener to add on history change. + * @return {Function} Function to remove listeners. */ +var addHistoryListener = function addHistoryListener(listener) { + // Monkey patch pushState to allow trigger the pushstate event listener. + if (!window.wcNavigation.historyPatched) { + (function (history) { + /* global CustomEvent */ + var pushState = history.pushState; + var replaceState = history.replaceState; -function isTextField(element) { - var nodeName = element.nodeName, - contentEditable = element.contentEditable; - var nonTextInputs = ['button', 'checkbox', 'hidden', 'file', 'radio', 'image', 'range', 'reset', 'submit', 'number']; - return nodeName === 'INPUT' && !nonTextInputs.includes(element.type) || nodeName === 'TEXTAREA' || contentEditable === 'true'; -} -/** - * Check whether the given element is an input field of type number - * and has a valueAsNumber - * - * @param {HTMLElement} element The HTML element. - * - * @return {boolean} True if the element is input and holds a number. - */ + history.pushState = function (state, title, url) { + var pushStateEvent = new CustomEvent('pushstate', state); + window.dispatchEvent(pushStateEvent); + return pushState.apply(history, [state, title, url]); + }; -function isNumberInput(element) { - var nodeName = element.nodeName, - type = element.type, - valueAsNumber = element.valueAsNumber; - return nodeName === 'INPUT' && type === 'number' && !!valueAsNumber; -} + history.replaceState = function (state, title, url) { + var replaceStateEvent = new CustomEvent('replacestate', state); + window.dispatchEvent(replaceStateEvent); + return replaceState.apply(history, [state, title, url]); + }; + + window.wcNavigation.historyPatched = true; + })(window.history); + } + + window.addEventListener('popstate', listener); + window.addEventListener('pushstate', listener); + window.addEventListener('replacestate', listener); + return function () { + window.removeEventListener('popstate', listener); + window.removeEventListener('pushstate', listener); + window.removeEventListener('replacestate', listener); + }; +}; /** - * Check whether the current document has selected text. This applies to ranges - * of text in the document, and not selection inside and