From 2450303404ebc212d5324401c17d0e5351a69b1d Mon Sep 17 00:00:00 2001 From: Utsav Patel Date: Fri, 25 Jul 2025 18:30:23 +0530 Subject: [PATCH 01/83] fix: missing metadata from page issue --- src/Metadata/class-front-page-builder.php | 36 +++++++++++++++++++ src/class-metadata.php | 6 ++-- .../Metadata/GetCurrentUrlTest.php | 6 ++-- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/Metadata/class-front-page-builder.php b/src/Metadata/class-front-page-builder.php index b07122ef0c..68df97bc36 100644 --- a/src/Metadata/class-front-page-builder.php +++ b/src/Metadata/class-front-page-builder.php @@ -10,6 +10,9 @@ namespace Parsely\Metadata; +use Parsely\Parsely; +use WP_Post; + /** * Implements abstract Metadata Builder class to generate the metadata array * for a front page. @@ -17,6 +20,27 @@ * @since 3.4.0 */ class Front_Page_Builder extends Metadata_Builder { + + /** + * The post object for which the metadata is being generated. + * + * @since 3.20.7 - this needs to be updated as per version in which this will be released. + * + * @var WP_Post + */ + private $post; + + /** + * Constructor. + * + * @param Parsely $parsely Instance of Parsely class. + * @param WP_Post $post Post object to generate the metadata for. + */ + public function __construct( Parsely $parsely, WP_Post $post ) { + parent::__construct( $parsely ); + $this->post = $post; + } + /** * Generates the metadata object by calling the build_* methods and * returns the value. @@ -30,6 +54,18 @@ public function get_metadata(): array { $this->build_headline(); $this->build_url(); + if ( true === $this->parsely->get_options()['full_metadata_in_non_posts'] ) { + $this->build_type( $this->post, $this->post->post_type ); + $this->build_main_entity( $this->post->post_type ); + $this->build_thumbnail_url( $this->post ); + $this->build_image( $this->post ); + $this->build_article_section( $this->post ); + $this->build_author( $this->post ); + $this->build_publisher(); + $this->build_keywords( $this->post ); + $this->build_metadata_post_times( $this->post ); + } + return $this->metadata; } diff --git a/src/class-metadata.php b/src/class-metadata.php index 6752ebc583..793298950b 100644 --- a/src/class-metadata.php +++ b/src/class-metadata.php @@ -91,12 +91,12 @@ public function construct_metadata( WP_Post $post ): array { if ( is_front_page() ) { if ( ! is_paged() ) { - $builder = new Front_Page_Builder( $this->parsely ); + $builder = new Front_Page_Builder( $this->parsely, $post ); } else { - $builder = new Paginated_Front_Page_Builder( $this->parsely ); + $builder = new Paginated_Front_Page_Builder( $this->parsely, $post ); } } elseif ( 'page' === get_option( 'show_on_front' ) && ! Utils::get_page_on_front() ) { - $builder = new Front_Page_Builder( $this->parsely ); + $builder = new Front_Page_Builder( $this->parsely, $post ); } elseif ( is_home() && ( ! ( 'page' === get_option( 'show_on_front' ) && ! Utils::get_page_on_front() ) || diff --git a/tests/Integration/Metadata/GetCurrentUrlTest.php b/tests/Integration/Metadata/GetCurrentUrlTest.php index d9f2390344..adf7cea613 100644 --- a/tests/Integration/Metadata/GetCurrentUrlTest.php +++ b/tests/Integration/Metadata/GetCurrentUrlTest.php @@ -132,7 +132,7 @@ private function assert_current_url_for_homepage( string $expected ): void { // Using Front_Page_Builder since we can't instantiate abstract // Metadata_Builder. - $builder = new Front_Page_Builder( new Parsely() ); + $builder = new Front_Page_Builder( new Parsely(), $this->get_post( 0 ) ); $get_current_url = self::get_method( 'get_current_url', Front_Page_Builder::class ); $res = $get_current_url->invoke( $builder ); @@ -149,7 +149,7 @@ private function assert_current_url_for_post_with_id( string $expected ): void { // Using Front_Page_Builder since we can't instantiate abstract // Metadata_Builder. - $builder = new Front_Page_Builder( new Parsely() ); + $builder = new Front_Page_Builder( new Parsely(), $this->get_post( $post_id ) ); $get_current_url = self::get_method( 'get_current_url', Front_Page_Builder::class ); $res = $get_current_url->invoke( $builder, 'post', $post_id ); @@ -166,7 +166,7 @@ private function assert_current_url_for_random_url( string $expected ): void { // Using Front_Page_Builder since we can't instantiate abstract // Metadata_Builder. - $builder = new Front_Page_Builder( new Parsely() ); + $builder = new Front_Page_Builder( new Parsely(), $this->get_post( 0 ) ); $get_current_url = self::get_method( 'get_current_url', Front_Page_Builder::class ); $res = $get_current_url->invoke( $builder ); From 1f289ac5b31754edb024e7710ae94b6054fbd22d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:16:53 +0000 Subject: [PATCH 02/83] Bump @testing-library/jest-dom from 6.6.3 to 6.6.4 (#3572) --- package-lock.json | 61 +++++------------------------------------------ package.json | 2 +- 2 files changed, 7 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33cdb6871e..fa17c2238c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@playwright/test": "^1.54.1", - "@testing-library/jest-dom": "^6.6.3", + "@testing-library/jest-dom": "^6.6.4", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", "@types/js-cookie": "^3.0.6", @@ -4975,17 +4975,18 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz", - "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.4.tgz", + "integrity": "sha512-xDXgLjVunjHqczScfkCJ9iyjdNOVHvvCdqHSSxwM9L0l/wHkTRum67SDc020uAlCoqktJplgO2AAQeLP1wgqDQ==", "dev": true, + "license": "MIT", "dependencies": { "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", - "chalk": "^3.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.21", + "picocolors": "^1.1.1", "redent": "^3.0.0" }, "engines": { @@ -4994,56 +4995,6 @@ "yarn": ">=1" } }, - "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", diff --git a/package.json b/package.json index d09ab207c1..77982794d7 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@playwright/test": "^1.54.1", - "@testing-library/jest-dom": "^6.6.3", + "@testing-library/jest-dom": "^6.6.4", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", "@types/js-cookie": "^3.0.6", From 6732ba3f0e81f4ab7638d6df713dc4626286eac9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:22:53 +0000 Subject: [PATCH 03/83] Bump @wordpress/url from 4.26.0 to 4.28.0 (#3578) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa17c2238c..fa3f28736c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", - "@wordpress/url": "^4.26.0", + "@wordpress/url": "^4.28.0", "@wordpress/wordcount": "^4.26.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", @@ -10047,9 +10047,9 @@ } }, "node_modules/@wordpress/url": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.26.0.tgz", - "integrity": "sha512-DFZ37e352xItHTMi2Sk2+O3YI87sWGdYtnMwTuSzhDgGHktKIJAfsEMJA259lclpf/7KPckQj8pbKrWcE9Sr7w==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.28.0.tgz", + "integrity": "sha512-bzPHaZJshxIg7UvXTXSPeIB6+MwBKJBenaufU0VGoFeWOTUCUxQDWZcU3ESCJ9DIb10soERr2BOu6jpk3RVI5A==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/package.json b/package.json index 77982794d7..2a5dce469b 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", - "@wordpress/url": "^4.26.0", + "@wordpress/url": "^4.28.0", "@wordpress/wordcount": "^4.26.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", From 805882312b35d78fc0a6b765e7932db8f61f078f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:28:06 +0000 Subject: [PATCH 04/83] Bump @wordpress/dom-ready from 4.26.0 to 4.28.0 (#3585) --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa3f28736c..8a1e62acdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "GPL-2.0-or-later", "dependencies": { "@types/js-cookie": "^3.0.6", - "@wordpress/dom-ready": "^4.26.0", + "@wordpress/dom-ready": "^4.28.0", "js-cookie": "^3.0.5", "lodash.debounce": "^4.0.8" }, @@ -8072,9 +8072,10 @@ } }, "node_modules/@wordpress/dom-ready": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.26.0.tgz", - "integrity": "sha512-VfKcvB2XtXZHluits/RY9O4VhpZ+YG5SQVN07SwbtSg1vaFJSkUnp31qOsLuVrFyhiUUYkZ/liCpO/vbalZqxQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.28.0.tgz", + "integrity": "sha512-kry2EKpIrXbOwxnZ8tDr1ZfvSRLnKzTa35xlEtkIVyjDE8K+k7CCMbz5+9pFyo+uwVjk9yjJ9SHcviMr985WSA==", + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7" }, diff --git a/package.json b/package.json index 2a5dce469b..291890699e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ], "dependencies": { "@types/js-cookie": "^3.0.6", - "@wordpress/dom-ready": "^4.26.0", + "@wordpress/dom-ready": "^4.28.0", "js-cookie": "^3.0.5", "lodash.debounce": "^4.0.8" }, From 34d2f53b0a49a88af53c5082c0ef8c6fdd7233cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:33:36 +0000 Subject: [PATCH 05/83] Bump @wordpress/wordcount from 4.26.0 to 4.28.0 (#3577) --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a1e62acdf..f53ccad51c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", "@wordpress/url": "^4.28.0", - "@wordpress/wordcount": "^4.26.0", + "@wordpress/wordcount": "^4.28.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", "husky": "^9.1.7", @@ -10121,10 +10121,11 @@ } }, "node_modules/@wordpress/wordcount": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-4.26.0.tgz", - "integrity": "sha512-xYF9yKvfkFmDZrX9OF5ocNnxkCfdt6hvrDZJDOKZvY74BRzaDqqczCtTEx/UADvHN8Lz1iQX38FwpBEMnjO4Eg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-4.28.0.tgz", + "integrity": "sha512-6/tZ7KpVjKRREegyFtV2k+T+zlZSetCvGHzZfbDW5gB3eWOftUUrGbvrJTXTF0FDlYFWStQ1EKPDb2/4zwTNxQ==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7" }, diff --git a/package.json b/package.json index 291890699e..51ab3c36e8 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", "@wordpress/url": "^4.28.0", - "@wordpress/wordcount": "^4.26.0", + "@wordpress/wordcount": "^4.28.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", "husky": "^9.1.7", From 366ad81986c4b64acbd016489cab1f5c90efe080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:40:20 +0000 Subject: [PATCH 06/83] Bump @playwright/test from 1.54.1 to 1.54.2 (#3575) --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index f53ccad51c..ba27fb086c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "lodash.debounce": "^4.0.8" }, "devDependencies": { - "@playwright/test": "^1.54.1", + "@playwright/test": "^1.54.2", "@testing-library/jest-dom": "^6.6.4", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", @@ -3641,13 +3641,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.54.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.1.tgz", - "integrity": "sha512-FS8hQ12acieG2dYSksmLOF7BNxnVf2afRJdCuM1eMSxj6QTSE6G4InGF7oApGgDb65MX7AwMVlIkpru0yZA4Xw==", + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz", + "integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.54.1" + "playwright": "1.54.2" }, "bin": { "playwright": "cli.js" @@ -21137,13 +21137,13 @@ } }, "node_modules/playwright": { - "version": "1.54.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.1.tgz", - "integrity": "sha512-peWpSwIBmSLi6aW2auvrUtf2DqY16YYcCMO8rTVx486jKmDTJg7UAhyrraP98GB8BoPURZP8+nxO7TSd4cPr5g==", + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz", + "integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.54.1" + "playwright-core": "1.54.2" }, "bin": { "playwright": "cli.js" @@ -21156,9 +21156,9 @@ } }, "node_modules/playwright-core": { - "version": "1.54.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.1.tgz", - "integrity": "sha512-Nbjs2zjj0htNhzgiy5wu+3w09YetDx5pkrpI/kZotDlDUaYk0HVA5xrBVPdow4SAUIlhgKcJeJg4GRKW6xHusA==", + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz", + "integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 51ab3c36e8..61f2237d55 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "lodash.debounce": "^4.0.8" }, "devDependencies": { - "@playwright/test": "^1.54.1", + "@playwright/test": "^1.54.2", "@testing-library/jest-dom": "^6.6.4", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", From 48b09fb4fbb64ffc352505696536eb571703f85e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:47:41 +0000 Subject: [PATCH 07/83] Bump @wordpress/hooks from 4.26.0 to 4.28.0 (#3595) --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba27fb086c..e7adbb70c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "@wordpress/element": "^6.26.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.12.0", - "@wordpress/hooks": "^4.26.0", + "@wordpress/hooks": "^4.28.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", @@ -8916,10 +8916,11 @@ } }, "node_modules/@wordpress/hooks": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.26.0.tgz", - "integrity": "sha512-pYbk2Oz4EbFge2AYnCeaLXKOP9JOleJDw3qTn8NY863ufKqU2i4Ttu3lYjJPk/+YIE3LZ7bdUtYypD1cltWVcg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.28.0.tgz", + "integrity": "sha512-NE7ObdwcVDNHz19UVOjcbO6BlRLXQtRnZWWyFLNttFTmXEJo5wNbG1hTPaDQCGdV71mmHvGYJat9JqY04tIO9g==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7" }, diff --git a/package.json b/package.json index 61f2237d55..7e77d65a36 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@wordpress/element": "^6.26.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.12.0", - "@wordpress/hooks": "^4.26.0", + "@wordpress/hooks": "^4.28.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", From a21ed163fe118b4932949b9b911d1d4e5dfa9543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 02:00:49 +0000 Subject: [PATCH 08/83] Bump @wordpress/eslint-plugin from 22.12.0 to 22.15.0 Bumps [@wordpress/eslint-plugin](https://github.com/WordPress/gutenberg/tree/HEAD/packages/eslint-plugin) from 22.12.0 to 22.15.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/eslint-plugin@22.15.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@wordpress/eslint-plugin" dependency-version: 22.15.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 45 +++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7adbb70c9..4bedd947bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "@wordpress/editor": "^14.26.0", "@wordpress/element": "^6.26.0", "@wordpress/env": "^10.26.0", - "@wordpress/eslint-plugin": "^22.12.0", + "@wordpress/eslint-plugin": "^22.15.0", "@wordpress/hooks": "^4.28.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", @@ -8591,16 +8591,17 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "22.12.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-22.12.0.tgz", - "integrity": "sha512-MBNMbVBMU/NBn3cSa+v/o3Avq6+A0nzVkiLGdvTfE1MG8C9/AQDopV4jA6RN0zAw/vxgEm5roGqU/0QZ8MhoAw==", + "version": "22.15.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-22.15.0.tgz", + "integrity": "sha512-rK1UhWET5yXsydPwjtx6xPITq+I6eukmefOWWtIpzGJcJIrLHVZqeis8k170CKT+RQSDm2jEdmJXmfrZUiAz2Q==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/eslint-parser": "7.25.7", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^8.26.0", - "@wordpress/prettier-config": "^4.26.0", + "@wordpress/babel-preset-default": "^8.29.0", + "@wordpress/prettier-config": "^4.29.0", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -8739,10 +8740,11 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/babel-preset-default": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.26.0.tgz", - "integrity": "sha512-i4TOscjPkrzQPf5+M+1ls+GSYzZtF0/wU/8KYlEhkUGALlru4zUeWXY+XOXgpsOJKs07bMwBXGPmQMPoy/mfgw==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.29.0.tgz", + "integrity": "sha512-iBCYVOaT9Lj5hZbd8tTzTkiU1sPVEqWuUvwN3ozd8pe05Ka8/3RiAfLRHJvVeV5w6w/YNtJPIxujJqB0KGZW5A==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/core": "7.25.7", "@babel/plugin-transform-react-jsx": "7.25.7", @@ -8750,8 +8752,8 @@ "@babel/preset-env": "7.25.7", "@babel/preset-typescript": "7.25.7", "@babel/runtime": "7.25.7", - "@wordpress/browserslist-config": "^6.26.0", - "@wordpress/warning": "^3.26.0", + "@wordpress/browserslist-config": "^6.29.0", + "@wordpress/warning": "^3.29.0", "browserslist": "^4.21.10", "core-js": "^3.31.0", "react": "^18.3.0" @@ -8762,20 +8764,22 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/browserslist-config": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.26.0.tgz", - "integrity": "sha512-mPM9apzbkA7itrXUheh8hSlWXw6RIWs6ohWWbWYID8PeNo8PY24lnAoAD9zPij447dbkeIR7sjDpq2A7GbUGAA==", + "version": "6.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.29.0.tgz", + "integrity": "sha512-MXdhwaVMwr/kv93wr5EwzQgC/l5OTT537iVC6uZrGvGAn/cnrGkkgtanyoX+U4jOkAzB6JZ76Ox4QIhPj1DQPw==", "dev": true, + "license": "GPL-2.0-or-later", "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/prettier-config": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.26.0.tgz", - "integrity": "sha512-tcPFZKRG6lpoYo3Dbpw/Zlkbp6ZUVUDrcq8C9wIjKzuNjRssKxr2jBmCfoERMzNRE+3d0nlpqo+3iBFnlraKSA==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.29.0.tgz", + "integrity": "sha512-x7gubWEowdN3/UO2OsTh+XbAx2+OiWdeAjVTcXRRzzpzXALxPl0bm+NKcnFX6ZnkSWvfPqvpyTQXVLPXlVOVmA==", "dev": true, + "license": "GPL-2.0-or-later", "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" @@ -8785,10 +8789,11 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/warning": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", - "integrity": "sha512-7vVvrG29eMaH7lxr5ZYDPUMalACZoBqblK8UzZBunXROXmiBfhhZPylfj9DK4wxrfyvhsLWnvewHWxim/pZ3Zg==", + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.29.0.tgz", + "integrity": "sha512-tBHml9xjK89eyvhzupgaMoki3MD4xQ80/gxPLxANXah8+YGOm2GPnEqDxk2PLeIUYjQy5TorQ+mY9/aYKUK1Jg==", "dev": true, + "license": "GPL-2.0-or-later", "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" diff --git a/package.json b/package.json index 7e77d65a36..7c0070cc54 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@wordpress/editor": "^14.26.0", "@wordpress/element": "^6.26.0", "@wordpress/env": "^10.26.0", - "@wordpress/eslint-plugin": "^22.12.0", + "@wordpress/eslint-plugin": "^22.15.0", "@wordpress/hooks": "^4.28.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", From d19f77365429a0c775e7c0c1d5c6ef3683e1cb73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 08:56:02 +0000 Subject: [PATCH 09/83] Bump @wordpress/url from 4.28.0 to 4.29.0 (#3609) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7adbb70c9..5eaaaab507 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", - "@wordpress/url": "^4.28.0", + "@wordpress/url": "^4.29.0", "@wordpress/wordcount": "^4.28.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", @@ -10049,9 +10049,9 @@ } }, "node_modules/@wordpress/url": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.28.0.tgz", - "integrity": "sha512-bzPHaZJshxIg7UvXTXSPeIB6+MwBKJBenaufU0VGoFeWOTUCUxQDWZcU3ESCJ9DIb10soERr2BOu6jpk3RVI5A==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.29.0.tgz", + "integrity": "sha512-RYf6iY+zSdfnM68CO5ZUUj8aQhoCvoa9xnuuOGwmLCHHIuMEgotktVeJLz7x3u7xjNtxEfxd000j9wDPnvwtNw==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/package.json b/package.json index 7e77d65a36..b621dba1e9 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", - "@wordpress/url": "^4.28.0", + "@wordpress/url": "^4.29.0", "@wordpress/wordcount": "^4.28.0", "concurrently": "^9.2.0", "eslint-plugin-jest": "^28.14.0", From 1353e03917deac8e23dc3a64fb113ae34b47c021 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:11:09 +0000 Subject: [PATCH 10/83] Bump tmp and @inquirer/editor (#3602) --- package-lock.json | 135 +++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5eaaaab507..29264de41c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2680,23 +2680,31 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.2.tgz", - "integrity": "sha512-bHd96F3ezHg1mf/J0Rb4CV8ndCN0v28kUlrHqP7+ECm1C/A+paB7Xh2lbMk6x+kweQC+rZOxM/YeKikzxco8bQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", + "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", "dev": true, + "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.9", - "@inquirer/type": "^3.0.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", - "strip-ansi": "^6.0.1", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/core/node_modules/ansi-styles": { @@ -2768,20 +2776,26 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.1.tgz", - "integrity": "sha512-xn9aDaiP6nFa432i68JCaL302FyL6y/6EG97nAtfIPnWZ+mWPgCMLGc4XZ2QQMsZtu9q3Jd5AzBPjXh10aX9kA==", + "version": "4.2.18", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", + "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", "dev": true, + "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.2", - "@inquirer/type": "^3.0.2", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.2.0", + "@inquirer/external-editor": "^1.0.1", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" }, "peerDependencies": { "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/expand": { @@ -2801,11 +2815,34 @@ "@types/node": ">=18" } }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", + "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.6.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/figures": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.9.tgz", - "integrity": "sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" } @@ -2938,15 +2975,21 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.2.tgz", - "integrity": "sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, "peerDependencies": { "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@isaacs/cliui": { @@ -11648,10 +11691,11 @@ } }, "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "dev": true, + "license": "MIT" }, "node_modules/check-node-version": { "version": "4.2.1", @@ -15025,32 +15069,6 @@ "dev": true, "license": "MIT" }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/external-editor/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/extract-zip": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", @@ -20684,15 +20702,6 @@ "node": ">=0.10.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -25336,18 +25345,6 @@ "tldts-core": "^6.1.67" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", From cbc80b2184a0f8ed7ef87c4e3e961c878a0a76a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:18:13 +0000 Subject: [PATCH 11/83] Bump @wordpress/element from 6.26.0 to 6.29.0 (#3624) --- package-lock.json | 18 ++++++++++-------- package.json | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29264de41c..daecb241a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "@wordpress/e2e-test-utils-playwright": "^1.26.0", "@wordpress/edit-post": "^8.26.0", "@wordpress/editor": "^14.26.0", - "@wordpress/element": "^6.26.0", + "@wordpress/element": "^6.29.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.12.0", "@wordpress/hooks": "^4.28.0", @@ -8524,15 +8524,16 @@ } }, "node_modules/@wordpress/element": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.26.0.tgz", - "integrity": "sha512-IlzQE7oVG4fuwRA5N7vhnr57kvf1HS08kwJwP+EC/olREnFEi8XOIeDa7rAEVXNAx2xeoLKQ6+K7Banp7+c6GA==", + "version": "6.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.29.0.tgz", + "integrity": "sha512-hQZuSjFKrHnAeVmfQftcaG5r5Vu4nAhSeRGbx4CUeK0+BngWJpjaPfdieQ/QytSQTSQm3fEfIMsHJUKXopv7ug==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", - "@wordpress/escape-html": "^3.26.0", + "@wordpress/escape-html": "^3.29.0", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.3.0", @@ -8621,10 +8622,11 @@ } }, "node_modules/@wordpress/escape-html": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.26.0.tgz", - "integrity": "sha512-SQfSmUOMP32duStoxvrkydCtD/ELyNXpAwkE414swo8AQAKxBJMQDYE3PZy1uZ6YCtbSX7EHHAX9G1EeoHUzgg==", + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.29.0.tgz", + "integrity": "sha512-Nk3k0G04PfX34HSk9B8TcPJsn3kwigQrQi4UXgEtxcELoBWIwbLjn3J3dvNDNEy88kS9oCae5lChzCKo3bY7AA==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7" }, diff --git a/package.json b/package.json index b621dba1e9..10d98e8a6c 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@wordpress/e2e-test-utils-playwright": "^1.26.0", "@wordpress/edit-post": "^8.26.0", "@wordpress/editor": "^14.26.0", - "@wordpress/element": "^6.26.0", + "@wordpress/element": "^6.29.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.12.0", "@wordpress/hooks": "^4.28.0", From 5b3614095bf65c46e8513f18fa5d573c2cecfc27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:25:10 +0000 Subject: [PATCH 12/83] Bump @wordpress/dom-ready from 4.28.0 to 4.29.0 (#3614) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index daecb241a7..e152508856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "GPL-2.0-or-later", "dependencies": { "@types/js-cookie": "^3.0.6", - "@wordpress/dom-ready": "^4.28.0", + "@wordpress/dom-ready": "^4.29.0", "js-cookie": "^3.0.5", "lodash.debounce": "^4.0.8" }, @@ -8115,9 +8115,9 @@ } }, "node_modules/@wordpress/dom-ready": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.28.0.tgz", - "integrity": "sha512-kry2EKpIrXbOwxnZ8tDr1ZfvSRLnKzTa35xlEtkIVyjDE8K+k7CCMbz5+9pFyo+uwVjk9yjJ9SHcviMr985WSA==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.29.0.tgz", + "integrity": "sha512-B1hoNo8uYYVsAlKXkbuMbn7InRksxXAYLdfM0Nuz/Ab+k8AoY3IUqufd2PAwLo+JzkLsyDeyvvLG8VgmK7+uFw==", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7" diff --git a/package.json b/package.json index 10d98e8a6c..c8cc1dfd11 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ], "dependencies": { "@types/js-cookie": "^3.0.6", - "@wordpress/dom-ready": "^4.28.0", + "@wordpress/dom-ready": "^4.29.0", "js-cookie": "^3.0.5", "lodash.debounce": "^4.0.8" }, From 763b8eada98d0ca04f839ef6aadc3f082ecc16ba Mon Sep 17 00:00:00 2001 From: Alex Cicovic <23142906+acicovic@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:27:08 +0300 Subject: [PATCH 13/83] Fix lint errors --- build/content-helper/editor-sidebar.asset.php | 2 +- build/content-helper/editor-sidebar.js | 10 +++++----- .../posts-table/components/suggestion-bubble.tsx | 2 +- .../editor-sidebar/performance-stats/provider.ts | 4 ++-- .../editor-sidebar/smart-linking/component.tsx | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build/content-helper/editor-sidebar.asset.php b/build/content-helper/editor-sidebar.asset.php index e2af50b31f..1ac7c144bf 100644 --- a/build/content-helper/editor-sidebar.asset.php +++ b/build/content-helper/editor-sidebar.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => '56726f91b0ebe7c12b61'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => '69bcaa223a337d85b847'); diff --git a/build/content-helper/editor-sidebar.js b/build/content-helper/editor-sidebar.js index 682e0ee6ea..8a4439f2fc 100644 --- a/build/content-helper/editor-sidebar.js +++ b/build/content-helper/editor-sidebar.js @@ -2,9 +2,9 @@ // Translators: %1$s the number of words in the excerpt. // Translators: %1$s the number of words in the excerpt. (0,w._n)("%1$s word","%1$s words",e,"wp-parsely"),e):"")}),[u.currentExcerpt,D]),(0,m.useEffect)((function(){var e=document.querySelector(".editor-post-excerpt textarea");e&&(e.scrollTop=0)}),[u.newExcerptGeneratedCount]);var G=(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator-header",children:[(0,f.jsx)(j,{size:16}),(0,f.jsx)("div",{className:"wp-parsely-excerpt-generator-header-label",children:(0,w.__)("Generate With Parse.ly","wp-parsely")})]}),H=n?(0,w.__)("Write an excerpt (optional)","wp-parsely"):(0,w.__)("Excerpt","wp-parsely");return(0,f.jsxs)("div",{className:"editor-post-excerpt",children:[!n&&(0,f.jsxs)("div",{className:"excerpt-suggestions-text",children:[(0,w.__)("Use Parse.ly AI to generate a concise, engaging excerpt for your post.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,w.__)("Learn more about Excerpt Suggestions","wp-parsely"),(0,f.jsx)(h.Icon,{icon:$,size:18,className:"parsely-external-link-icon"})]})]}),(0,f.jsxs)("div",{style:{position:"relative"},children:[g&&(0,f.jsx)("div",{className:"editor-post-excerpt__loading_animation",children:(0,f.jsx)(Te,{})}),(0,f.jsx)(h.TextareaControl,{__nextHasNoMarginBottom:!0,label:H,className:"editor-post-excerpt__textarea",onChange:function(e){u.isUnderReview||R({excerpt:e}),p(ke(ke({},u),{currentExcerpt:e})),_(!0)},onKeyUp:function(){var e;if(x)_(!1);else{var t=document.querySelector(".editor-post-excerpt textarea"),n=null!==(e=null==t?void 0:t.textContent)&&void 0!==e?e:"";p(ke(ke({},u),{currentExcerpt:n}))}},value:g?"":u.isUnderReview?u.currentExcerpt:D,help:O||null})]}),n&&(0,f.jsxs)(h.Button,{href:(0,w.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),target:"_blank",variant:"link",rel:"noopener",children:[(0,w.__)("Learn more about manual excerpts","wp-parsely"),(0,f.jsx)(h.Icon,{icon:$,size:18,className:"parsely-external-link-icon"})]}),(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator"+(n?" is-doc-set-panel":""),children:[a&&(0,f.jsx)(h.Notice,{className:"wp-parsely-excerpt-generator-error",onRemove:function(){return l(void 0)},status:"info",children:a.Message()}),u.isUnderReview?(0,f.jsxs)(f.Fragment,{children:[n&&G,(0,f.jsxs)("div",{className:"wp-parsely-excerpt-suggestions-review-controls",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){switch(e.label){case 0:return[4,R({excerpt:u.currentExcerpt})];case 1:return e.sent(),p(ke(ke({},u),{isUnderReview:!1})),k.trackEvent("excerpt_generator_accepted"),[2]}}))}))},children:(0,w.__)("Accept","wp-parsely")}),(0,f.jsx)(h.Button,{isDestructive:!0,variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){return R({excerpt:u.oldExcerpt}),p(ke(ke({},u),{currentExcerpt:u.oldExcerpt,isUnderReview:!1})),k.trackEvent("excerpt_generator_discarded"),[2]}))}))},children:(0,w.__)("Discard","wp-parsely")})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(me,{isLoading:g,onPersonaChange:function(e){B("Persona",e),T(e)},onSettingChange:B,onToneChange:function(e){B("Tone",e),N(e)},persona:i.ExcerptSuggestions.Persona,tone:i.ExcerptSuggestions.Tone}),n&&G,(0,f.jsx)("div",{className:"excerpt-suggestions-generate",children:(0,f.jsxs)(h.Button,{onClick:function(){return Se(void 0,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:y(!0),l(void 0),n.label=1;case 1:return n.trys.push([1,3,4,5]),k.trackEvent("excerpt_generator_pressed"),[4,_e.getInstance().generateExcerpt(V,F,P,L)];case 2:return e=n.sent(),p({currentExcerpt:e,isUnderReview:!0,newExcerptGeneratedCount:u.newExcerptGeneratedCount+1,oldExcerpt:D}),[3,5];case 3:return(t=n.sent())instanceof te?l(t):(l(new te((0,w.__)("An unknown error occurred.","wp-parsely"),U.UnknownError)),console.error(t)),[3,5];case 4:return y(!1),[7];case 5:return[2]}}))}))},variant:"secondary",isBusy:g,disabled:g||!F,children:[g&&(0,w.__)("Generating Excerpt…","wp-parsely"),!g&&u.newExcerptGeneratedCount>0&&(0,w.__)("Regenerate Excerpt","wp-parsely"),!g&&0===u.newExcerptGeneratedCount&&(0,w.__)("Generate Excerpt","wp-parsely")]})})]}),n&&(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,w.__)("Learn more about Excerpt Suggestions","wp-parsely"),(0,f.jsx)(h.Icon,{icon:$,size:18,className:"parsely-external-link-icon"})]})]})]})},Te=function(){return(0,f.jsx)(h.Animate,{type:"loading",children:function(e){var t=e.className;return(0,f.jsx)("span",{className:t,children:(0,w.__)("Generating…","wp-parsely")})}})},Ee=function(){return(0,f.jsx)(q.PostTypeSupportCheck,{supportKeys:"excerpt",children:(0,f.jsx)(p,{name:"parsely-post-excerpt",title:(0,w.__)("Excerpt","wp-parsely"),children:(0,f.jsx)(D,{endpoint:"editor-sidebar",defaultSettings:Ir(window.wpParselyContentHelperSettings),children:(0,f.jsx)(Pe,{isDocumentSettingPanel:!0})})})})},Le=function(e,t){var n,r,i;return t!==Ar?e:H().ExcerptSuggestions?((null===(n=null===window||void 0===window?void 0:window.Jetpack_Editor_Initial_State)||void 0===n?void 0:n.available_blocks["ai-content-lens"])&&(console.log("Parse.ly: Jetpack AI is enabled and will be disabled."),(0,K.removeFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features")),(0,_.registerPlugin)("wp-parsely-excerpt-suggestions",{render:function(){return(0,f.jsx)(Ee,{})}}),(null===(r=(0,v.dispatch)("core/editor"))||void 0===r?void 0:r.removeEditorPanel)?null===(i=(0,v.dispatch)("core/editor"))||void 0===i||i.removeEditorPanel("post-excerpt"):null==Y||Y.removeEditorPanel("post-excerpt"),e):e};function Ne(){(0,K.addFilter)("plugins.registerPlugin","wp-parsely-excerpt-suggestions",Le,1e3)}var Ce=window.wp.blockEditor;function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ae=function(){return Ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)return r(e.innerBlocks,t[s].innerBlocks);if(JSON.stringify(e)!==JSON.stringify(t[s])){var o=t[s],a=i.parseFromString(e.attributes.content||"","text/html"),l=i.parseFromString((null==o?void 0:o.attributes.content)||"","text/html"),c=Array.from(a.querySelectorAll("a[data-smartlink]")),u=Array.from(l.querySelectorAll("a[data-smartlink]")),p=c.filter((function(e){return!u.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),d=u.filter((function(e){return!c.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),f=c.filter((function(e){var t=u.find((function(t){return t.dataset.smartlink===e.dataset.smartlink}));return t&&t.outerHTML!==e.outerHTML}));(p.length>0||d.length>0||f.length>0)&&n.push({block:e,prevBlock:o,addedLinks:p,removedLinks:d,changedLinks:f})}}}))};return r(e,t),n}(a,l.current);o.length>0&&(o.forEach((function(e){e.changedLinks.length>0&&n&&n(e),e.addedLinks.length>0&&i&&i(e),e.removedLinks.length>0&&r&&r(e)})),l.current=a)}),o);return e(t),function(){e.cancel()}}),[a,o,t,i,n,r]),null},Me=function(e){var t=e.value,n=e.onChange,r=e.max,i=e.min,s=e.suffix,o=e.size,a=e.label,l=e.initialPosition,c=e.disabled,u=e.className,p="parsely-inputrange-control-".concat((0,ne.useInstanceId)(Me));return(0,f.jsxs)("div",{className:"parsely-inputrange-control ".concat(u||""),children:[(0,f.jsx)("label",{htmlFor:p,className:"wp-parsely-editor-sidebar-label",children:a}),(0,f.jsxs)("div",{className:"parsely-inputrange-control__controls",children:[(0,f.jsx)(h.__experimentalNumberControl,{id:p,disabled:c,value:t,suffix:(0,f.jsx)(h.__experimentalInputControlSuffixWrapper,{children:s}),size:null!=o?o:"__unstable-large",min:i,max:r,onChange:function(e){var t=parseInt(e,10);isNaN(t)||n(t)}}),(0,f.jsx)(h.RangeControl,{disabled:c,value:t,showTooltip:!1,initialPosition:l,onChange:function(e){n(e)},withInputField:!1,min:i,max:r})]})]})},De=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))},Fe=function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&d((0,Re.parse)(n))}),[s]),(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:o,right:a,up:o,down:a}}),(0,f.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=s.post_data)||void 0===t?void 0:t.title}),(0,f.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=s.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,f.jsx)(Pt,{topOrBottom:"top"}),(0,f.jsx)(jt,{block:p[0],link:s,useOriginalBlock:!0}),!(null===(r=s.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,f.jsx)(Pt,{topOrBottom:"bottom"})]}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(Tt,{link:s}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,w.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:o,icon:xt,children:(0,w.__)("Previous","wp-parsely")})}),(0,f.jsx)("div",{className:"reviews-controls-middle",children:(0,f.jsx)(h.Button,{target:"_blank",href:(null===(i=s.post_data)||void 0===i?void 0:i.edit_link)+"&smart-link="+s.uid,variant:"secondary",onClick:function(){k.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:s.uid})},children:(0,w.__)("Open in the Editor","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,w.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:a,className:"wp-parsely-review-suggestion-next",children:[(0,w.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:_t})]})})]})]})},Lt=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",className:i,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)(h.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},Nt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,l]);var u=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},p=(0,f.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,w.__)("NEW","wp-parsely"),(0,f.jsx)(Lt,{})]}),d=[];n&&n.length>0&&d.push({name:"outbound",title:(0,w.__)("Outbound","wp-parsely")}),r&&r.length>0&&d.push({name:"inbound",title:(0,w.__)("Inbound","wp-parsely")});var v="outbound";return d=d.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,w.__)("Outbound Smart Links","wp-parsely"),v="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,w.__)("Inbound Smart Links","wp-parsely"),v="inbound"),e})),(0,f.jsxs)("div",{className:"smart-linking-review-sidebar",ref:s,children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{tab:function(){return u()},"shift+tab":function(){return u()}}}),(0,f.jsx)(h.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:v,tabs:d,onSelect:function(e){var t,s;"outbound"===e&&n&&n.length>0&&i(n[0]),"inbound"===e&&r&&r.length>0&&i(r[0]),k.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0})},children:function(e){return(0,f.jsxs)(f.Fragment,{children:["outbound"===e.name&&(0,f.jsx)(f.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,f.jsxs)(h.MenuItem,{ref:function(e){o.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:[(0,f.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&p]},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,w.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"review-sidebar-tip",children:(0,w.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var s;return(0,f.jsx)(h.MenuItem,{ref:function(e){o.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:(0,f.jsx)("span",{className:"smart-linking-menu-item",children:null===(s=e.post_data)||void 0===s?void 0:s.title})},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,w.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Ot=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})}),At=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})}),It=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),Rt=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),Bt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),Mt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),Dt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Ft=function(e){var t,n,r=e.post,i=e.imageUrl,s=e.icon,o=void 0===s?bt:s,a=e.size,l=void 0===a?100:a,c=e.className,u=void 0===c?"":c,p=null!==(t=null==r?void 0:r.thumbnail)&&void 0!==t?t:i,d=null!==(n=null==r?void 0:r.title.rendered)&&void 0!==n?n:"";return(0,f.jsx)("div",{className:"parsely-thumbnail ".concat(u),style:{width:l,height:l},children:p?(0,f.jsx)("img",{src:p,alt:d,width:l,height:l,loading:"lazy","aria-hidden":""===d}):(0,f.jsx)("div",{className:"parsely-thumbnail-icon-container",children:(0,f.jsx)(h.Icon,{icon:o,size:l})})})};function Vt(e,t,n){void 0===t&&(t=1),void 0===n&&(n="");var r=parseInt(e.replace(/\D/g,""),10);if(r<1e3)return e;r<1e4&&(t=1);var i=r,s=r.toString(),o="",a=0;return Object.entries({1e3:"k","1,000,000":"M","1,000,000,000":"B","1,000,000,000,000":"T","1,000,000,000,000,000":"Q"}).forEach((function(e){var n=e[0],l=e[1],c=parseInt(n.replace(/\D/g,""),10);if(r>=c){var u=t;(i=r/c)%1>1/a&&(u=i>10?1:2),u=parseFloat(i.toFixed(2))===parseFloat(i.toFixed(0))?0:u,s=i.toFixed(u),o=l}a=c})),s+n+o}var Gt,Ht=function(e){var t,n,r,i,s=null===(t=e.link.match)||void 0===t?void 0:t.blockId,o=(0,v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return s?{block:n(s),parents:r(s).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[s]),a=o.block,l=o.parents;return a?(0,f.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[l.map((function(e,t){var n;return(0,f.jsxs)("span",{children:[(0,f.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,Re.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,f.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,f.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,f.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,Re.getBlockType)(a.name))||void 0===n?void 0:n.title}),(null===(i=null===(r=a.attributes)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.name)&&(0,f.jsx)("span",{className:"breadcrumbs-current-block-name",children:a.attributes.metadata.name})]})]}):(0,f.jsx)(f.Fragment,{})},zt=function(e){var t,n,r,i,s,o,a,l,c,u,p,d,v,g,y=e.link,m=null!==(n=null===(t=y.wp_post_meta)||void 0===t?void 0:t.author)&&void 0!==n?n:(0,w.__)("N/A","wp-parsely"),b=null!==(i=null===(r=y.post_stats)||void 0===r?void 0:r.avg_engaged)&&void 0!==i?i:(0,w.__)("N/A","wp-parsely"),x=(null===(s=y.wp_post_meta)||void 0===s?void 0:s.date)?function(e){if(!1===function(e){return!isNaN(+e)&&0!==e.getTime()}(e))return pt;var t=ct;return e.getUTCFullYear()===(new Date).getUTCFullYear()&&(t=ut),Intl.DateTimeFormat(document.documentElement.lang||"en",t).format(e)}(new Date(y.wp_post_meta.date)):(0,w.__)("N/A","wp-parsely"),_=null!==(a=null===(o=y.wp_post_meta)||void 0===o?void 0:o.thumbnail)&&void 0!==a&&a,k=null!==(c=null===(l=y.wp_post_meta)||void 0===l?void 0:l.title)&&void 0!==c?c:(0,w.__)("N/A","wp-parsely"),S=null!==(p=null===(u=y.wp_post_meta)||void 0===u?void 0:u.type)&&void 0!==p?p:(0,w.__)("External","wp-parsely"),j=null===(d=y.wp_post_meta)||void 0===d?void 0:d.url,P=(null===(v=y.post_stats)||void 0===v?void 0:v.views)?Vt(y.post_stats.views):(0,w.__)("N/A","wp-parsely"),T=(null===(g=y.post_stats)||void 0===g?void 0:g.visitors)?Vt(y.post_stats.visitors):(0,w.__)("N/A","wp-parsely");return(0,f.jsxs)("div",{className:"wp-parsely-link-suggestion-link-details",children:[(0,f.jsx)("div",{className:"thumbnail-column",children:_?(0,f.jsx)(Ft,{imageUrl:_,size:52}):(0,f.jsx)(Ft,{icon:bt,size:52})}),(0,f.jsxs)("div",{className:"data-column",children:[(0,f.jsxs)("div",{className:"title-row",children:[(0,f.jsx)(h.Tooltip,{text:k,children:(0,f.jsx)("span",{children:k})}),j&&(0,f.jsx)(h.Button,{href:j,target:"_blank",variant:"link",rel:"noopener",children:(0,f.jsx)(ie,{icon:$,size:18})})]}),(0,f.jsxs)("div",{className:"data-row",children:[(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Ot,size:16}),(0,f.jsx)("span",{children:x})]}),(0,f.jsxs)("div",{className:"data-point shrinkable",children:[(0,f.jsx)(ie,{icon:At,size:16}),(0,f.jsx)(h.Tooltip,{text:m,children:(0,f.jsx)("span",{children:m})})]}),(0,f.jsxs)("div",{className:"data-point shrinkable",children:[(0,f.jsx)(ie,{icon:It,size:16}),(0,f.jsx)(h.Tooltip,{text:S,children:(0,f.jsx)("span",{children:S})})]})]}),y.post_stats&&(0,f.jsxs)("div",{className:"data-row",children:[P&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Rt,size:16}),(0,f.jsx)("span",{children:P})]}),T&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Bt,size:16}),(0,f.jsx)("span",{children:T})]}),b&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(h.Dashicon,{icon:"clock",size:16}),(0,f.jsx)("span",{children:b})]})]})]})]})},Ut=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,i=e.onAccept,s=e.onReject,o=e.onRemove,a=e.onSelectInEditor,l=e.hasPrevious,c=e.hasNext;if(t&&void 0!==t.post_data)return(0,f.jsx)(Et,{link:t,onNext:n,onPrevious:r,onAccept:i,onReject:s,onRemove:o,onSelectInEditor:a,hasPrevious:l,hasNext:c});if(!(null==t?void 0:t.match))return(0,f.jsx)(f.Fragment,{children:(0,w.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var u=t.match.blockId,p=(0,v.select)("core/block-editor").getBlock(u),d=t.applied;return p?(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&i()},r:function(){t&&(t.applied?o():s())}}}),(0,f.jsx)(Ht,{link:t}),(0,f.jsx)("div",{className:"review-suggestion-preview",children:(0,f.jsx)(jt,{block:p,link:t})}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(zt,{link:t}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,w.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:xt,children:(0,w.__)("Previous","wp-parsely")})}),(0,f.jsxs)("div",{className:"reviews-controls-middle",children:[!d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,w.__)("Reject","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Mt,onClick:s,variant:"secondary",children:(0,w.__)("Reject","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"A",text:(0,w.__)("Accept","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",icon:Dt,onClick:i,variant:"secondary",children:(0,w.__)("Accept","wp-parsely")})})]}),d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,w.__)("Remove","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Mt,onClick:o,variant:"secondary",children:(0,w.__)("Remove","wp-parsely")})}),(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",onClick:a,variant:"secondary",children:(0,w.__)("Select in Editor","wp-parsely")})]})]}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,w.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,w.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:_t})]})})]})]}):(0,f.jsx)(f.Fragment,{children:(0,w.__)("No block is selected.","wp-parsely")})},qt=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))},Kt=function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(a=o[0],(l=a.parentNode)&&(c=document.createTextNode(null!==(u=a.textContent)&&void 0!==u?u:""),l.replaceChild(c,a),Z.updateBlockAttributes(n,{content:s.innerHTML}))),[4,L(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},C=(0,m.useCallback)((function(){c(!1),x().filter((function(e){return!e.applied})).length>0?o(!0):(W.unlockPostAutosaving("smart-linking-review-modal"),t())}),[x,t]),O=function(e){o(!1),e?(c(!1),T().then((function(){C()}))):c(!0)},A=function(){if(Ge(S)){var e=g.indexOf(S);if(!g[t=e+1])return;j(g[t])}else{var t;if(e=d.indexOf(S),!d[t=e+1])return;j(d[t])}},I=function(){if(Ge(S)){var e=g.indexOf(S);if(!g[t=e-1])return;j(g[t])}else{var t;if(e=d.indexOf(S),!d[t=e-1])return;j(d[t])}};return(0,m.useEffect)((function(){l?W.lockPostAutosaving("smart-linking-review-modal"):l&&0===p.length&&C()}),[l,t,p,C]),(0,m.useEffect)((function(){c(n)}),[n]),(0,f.jsxs)(f.Fragment,{children:[l&&(0,f.jsx)(h.Modal,{title:(0,w.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:C,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,f.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,f.jsx)(Ct,{outboundLinks:d,inboundLinks:g,activeLink:S,setSelectedLink:j}),S&&(Ge(S)?(0,f.jsx)(Et,{link:S,onNext:A,onPrevious:I,hasNext:g.indexOf(S)0}):(0,f.jsx)(Ut,{link:S,hasNext:b().indexOf(S)0,onNext:A,onPrevious:I,onAccept:function(){return qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return S.match?(r(S),[4,(i=S.match.blockId,s=S,qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=s.href.itm,e.title=s.title,e.setAttribute("data-smartlink",s.uid),(t=(0,v.select)("core/block-editor").getBlock(i))?(Ue(t,s,e),s.applied=!0,[4,E(s)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),k.trackEvent("smart_linking_link_accepted",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),0===y().length?(C(),[2]):(e=d.indexOf(S),d[t=e+1]?j(d[t]):j(d[0]),[2])}var i,s}))}))},onReject:function(){return qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return e=d.indexOf(S),d[t=e+1]?j(d[t]):d[0]?j(d[0]):C(),[4,L(S.uid)];case 1:return n.sent(),k.trackEvent("smart_linking_link_rejected",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),[2]}}))}))},onRemove:function(){return qt(void 0,void 0,void 0,(function(){var e,t,n,r;return Kt(this,(function(i){switch(i.label){case 0:return S.match?(e=(0,v.select)("core/block-editor").getBlock(S.match.blockId))?(t=b(),n=t.indexOf(S),r=n-1,[4,N(e,S)]):[3,2]:[2];case 1:if(i.sent(),k.trackEvent("smart_linking_link_removed",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),0===(t=b()).length&&g.length>0)return j(g[0]),[2];if(0===t.length&&0===g.length)return C(),[2];if(t[r])return j(t[r]),[2];j(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(S.match){var e=(0,v.select)("core/block-editor").getBlock(S.match.blockId);if(e){Z.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&Xe(t,S.uid),k.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:S.uid}),C()}}}}))]})}),s&&(0,f.jsxs)(h.Modal,{title:(0,w.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return O(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,w.__)("Are you sure you want to close? All un-accepted Smart Links will not be added.","wp-parsely"),(0,f.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return O(!1)},children:(0,w.__)("Go Back","wp-parsely")}),(0,f.jsx)(h.Button,{variant:"secondary",isDestructive:!0,onClick:function(){return O(!0)},children:(0,w.__)("Close","wp-parsely")})]})]})]})})),Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&S("success",/* translators: %d: number of smart links applied */ /* translators: %d: number of smart links applied */ -(0,w.sprintf)((0,w.__)("%s Smart Links successfully applied.","wp-parsely"),g),{type:"snackbar"}):y(0)}),[x]),(0,m.useEffect)((function(){if(!(Object.keys(R).length>0)){var e={maxLinksPerPost:a.SmartLinking.MaxLinks};ee(e)}}),[ee,a]);var de=(0,v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,i=t.getBlock,s=t.getBlocks,o=e("core/editor"),a=o.getEditedPostContent,l=o.getCurrentPostAttribute;return{allBlocks:s(),selectedBlock:n?i(n):r(),postContent:a(),postPermalink:l("link")}}),[n]),fe=de.allBlocks,he=de.selectedBlock,ve=de.postContent,ge=de.postPermalink,ye=function(e){return Yt(void 0,void 0,void 0,(function(){var t,n,r,i,s;return $t(this,(function(o){switch(o.label){case 0:t=[],o.label=1;case 1:return o.trys.push([1,4,,9]),[4,re((n=L||!he)?et.All:et.Selected)];case 2:return o.sent(),a=ge.replace(/^https?:\/\//i,""),r=["http://"+a,"https://"+a],i=function(e){return e.map((function(e){return e.href.raw}))}(F),r.push.apply(r,i),[4,yt.getInstance().generateSmartLinks(he&&!n?(0,Re.getBlockContent)(he):ve,A,r)];case 3:return t=o.sent(),[3,9];case 4:if((s=o.sent()).code&&s.code===U.ParselyAborted)throw s.numRetries=3-e,s;return e>0&&s.retryFetch?(console.error(s),[4,oe(!0)]):[3,8];case 5:return o.sent(),[4,ae()];case 6:return o.sent(),[4,ye(e-1)];case 7:return[2,o.sent()];case 8:throw s;case 9:return[2,t]}var a}))}))},me=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},xe=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),W.unlockPostSaving("wp-parsely-block-overlay")};return(0,f.jsxs)("div",{className:"wp-parsely-smart-linking",children:[(0,f.jsx)(Be,{isDetectingEnabled:!E,onLinkRemove:function(e){!function(e){De(this,void 0,void 0,(function(){var t,n,r;return Fe(this,(function(i){switch(i.label){case 0:return[4,$e((0,Re.getBlockContent)(e),e.clientId)];case 1:return t=i.sent(),n=t.missingSmartLinks,r=t.didAnyFixes,n.forEach((function(e){(0,v.dispatch)(st).removeSmartLink(e.uid)})),[2,r]}}))}))}(e.block)}}),(0,f.jsxs)(h.PanelRow,{className:t,children:[(0,f.jsxs)("div",{className:"smart-linking-text",children:[(0,w.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/smart-linking/",target:"_blank",variant:"link",children:[(0,w.__)("Learn more about Smart Linking","wp-parsely"),(0,f.jsx)(ie,{icon:$,size:18,className:"parsely-external-link-icon"})]})]}),C&&(0,f.jsx)(h.Notice,{status:"info",onRemove:function(){return Z(null)},className:"wp-parsely-content-helper-error",children:C.Message()}),x&&g>0&&(0,f.jsx)(h.Notice,{status:"success",onRemove:function(){return _(!1)},className:"wp-parsely-smart-linking-suggested-links",children:(0,w.sprintf)(/* translators: 1 - number of smart links generated */ /* translators: 1 - number of smart links generated */ -(0,w.__)("Successfully added %s Smart Links.","wp-parsely"),g>0?g:O.length)}),(0,f.jsx)(lt,{disabled:T,selectedBlock:he,onSettingChange:function(e,t){var n;p({SmartLinking:Wt(Wt({},a.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&se(t)}}),(0,f.jsx)("div",{className:"smart-linking-generate",children:(0,f.jsx)(h.Button,{onClick:function(){return Yt(void 0,void 0,void 0,(function(){var e,t,n,r,s,o,a,l;return $t(this,(function(c){switch(c.label){case 0:return[4,K(!0)];case 1:return c.sent(),[4,le()];case 2:return c.sent(),[4,Z(null)];case 3:return c.sent(),_(!1),k.trackEvent("smart_linking_generate_pressed",{is_full_content:L,selected_block:null!==(o=null==he?void 0:he.name)&&void 0!==o?o:"none",context:i}),[4,me(L?"all":null==he?void 0:he.clientId)];case 4:c.sent(),e=setTimeout((function(){var e;K(!1),k.trackEvent("smart_linking_generate_timeout",{is_full_content:L,selected_block:null!==(e=null==he?void 0:he.name)&&void 0!==e?e:"none",context:i}),we(L?"all":null==he?void 0:he.clientId)}),18e4),t=B,c.label=5;case 5:return c.trys.push([5,8,10,15]),[4,ye(3)];case 6:return n=c.sent(),[4,(u=n,Yt(void 0,void 0,void 0,(function(){var e;return $t(this,(function(t){switch(t.label){case 0:return u=u.filter((function(e){return!F.some((function(t){return t.uid===e.uid&&t.applied}))})),e=ge.replace(/^https?:\/\//,"").replace(/\/+$/,""),u=(u=u.filter((function(t){return!t.href.raw.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!F.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),u=(u=Ze(L?fe:[he],u,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!F.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,s=i+r.text.length;return t>=i&&n<=s}))})),[4,Y(u)];case 1:return t.sent(),[2,u]}}))})))];case 7:if(0===c.sent().length)throw new te((0,w.__)("No Smart Links were generated.","wp-parsely"),U.ParselySuggestionsApiNoData,"");return ce(!0),[3,15];case 8:return r=c.sent(),s=new te(null!==(a=r.message)&&void 0!==a?a:"An unknown error has occurred.",null!==(l=r.code)&&void 0!==l?l:U.UnknownError),r.code&&r.code===U.ParselyAborted&&(s.message=(0,w.sprintf)(/* translators: %d: number of retry attempts, %s: attempt plural */ /* translators: %d: number of retry attempts, %s: attempt plural */ +/* translators: %s: block name */n((0,w.sprintf)((0,w.__)("%s blocks are not supported for Smart Links.","wp-parsely"),s))}T(et.All===C)}}),[p,S,C,r,i,y,L,T,c]),(0,m.useEffect)((function(){if(!r&&o.current&&C&&!k&&y){var e=o.current.querySelector('button[data-value="'.concat(C,'"]'));e&&"true"!==e.getAttribute("aria-checked")&&(L(C),E(!0))}}),[y,_,r,S]),(0,m.useEffect)((function(){c(null)}),[y]),(0,f.jsx)("div",{className:"parsely-panel-settings",children:(0,f.jsxs)("div",{className:"parsely-panel-settings-body",children:[(0,f.jsxs)("div",{className:"smart-linking-block-select",children:[(0,f.jsx)(h.Disabled,{isDisabled:r,children:(0,f.jsxs)(h.__experimentalToggleGroupControl,{ref:o,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:C,label:(0,w.__)("Apply Smart Links to","wp-parsely"),onChange:function(e){return ot(void 0,void 0,void 0,(function(){return at(this,(function(t){switch(t.label){case 0:return r?[2]:(d(!0),[4,T(et.All===e)]);case 1:return t.sent(),[4,L(e)];case 2:return t.sent(),setTimeout((function(){d(!1)}),500),[2]}}))}))},children:[(0,f.jsx)(h.__experimentalToggleGroupControlOption,{label:(0,w.__)("Selected Block","wp-parsely"),value:"selected"}),(0,f.jsx)(h.__experimentalToggleGroupControlOption,{label:(0,w.__)("All Blocks","wp-parsely"),value:"all"})]})}),l&&(0,f.jsxs)("div",{className:"wp-parsely-smart-linking-hint",children:[(0,f.jsx)("strong",{children:(0,w.__)("Hint:","wp-parsely")})," ",l]})]}),(0,f.jsx)("div",{className:"smart-linking-settings",children:(0,f.jsx)(Me,{value:x,onChange:function(e){P(null!=e?e:1),s("MaxLinks",null!=e?e:on)},label:(0,w.__)("Target Number of Links","wp-parsely"),suffix:(0,w.__)("Links","wp-parsely"),min:1,max:20,initialPosition:x,disabled:r})})]})})},ct={month:"short",day:"numeric",year:"numeric"},ut={month:"short",day:"numeric"},pt=(0,w.__)("Date N/A","wp-parsely");function dt(e){return{period_start:e,period_end:""}}var ft=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),ht=function(){return ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&d((0,Re.parse)(n))}),[s]),(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:o,right:a,up:o,down:a}}),(0,f.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=s.post_data)||void 0===t?void 0:t.title}),(0,f.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=s.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,f.jsx)(Pt,{topOrBottom:"top"}),(0,f.jsx)(jt,{block:p[0],link:s,useOriginalBlock:!0}),!(null===(r=s.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,f.jsx)(Pt,{topOrBottom:"bottom"})]}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(Tt,{link:s}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,w.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:o,icon:xt,children:(0,w.__)("Previous","wp-parsely")})}),(0,f.jsx)("div",{className:"reviews-controls-middle",children:(0,f.jsx)(h.Button,{target:"_blank",href:(null===(i=s.post_data)||void 0===i?void 0:i.edit_link)+"&smart-link="+s.uid,variant:"secondary",onClick:function(){k.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:s.uid})},children:(0,w.__)("Open in the Editor","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,w.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:a,className:"wp-parsely-review-suggestion-next",children:[(0,w.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:_t})]})})]})]})},Lt=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",className:i,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)(h.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},Nt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,l]);var u=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},p=(0,f.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,w.__)("NEW","wp-parsely"),(0,f.jsx)(Lt,{})]}),d=[];n&&n.length>0&&d.push({name:"outbound",title:(0,w.__)("Outbound","wp-parsely")}),r&&r.length>0&&d.push({name:"inbound",title:(0,w.__)("Inbound","wp-parsely")});var v="outbound";return d=d.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,w.__)("Outbound Smart Links","wp-parsely"),v="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,w.__)("Inbound Smart Links","wp-parsely"),v="inbound"),e})),(0,f.jsxs)("div",{className:"smart-linking-review-sidebar",ref:s,children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{tab:function(){return u()},"shift+tab":function(){return u()}}}),(0,f.jsx)(h.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:v,tabs:d,onSelect:function(e){var t,s;"outbound"===e&&n&&n.length>0&&i(n[0]),"inbound"===e&&r&&r.length>0&&i(r[0]),k.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0})},children:function(e){return(0,f.jsxs)(f.Fragment,{children:["outbound"===e.name&&(0,f.jsx)(f.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,f.jsxs)(h.MenuItem,{ref:function(e){o.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:[(0,f.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&p]},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,w.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"review-sidebar-tip",children:(0,w.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var s;return(0,f.jsx)(h.MenuItem,{ref:function(e){o.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:(0,f.jsx)("span",{className:"smart-linking-menu-item",children:null===(s=e.post_data)||void 0===s?void 0:s.title})},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,w.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Ot=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})}),At=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})}),It=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),Rt=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),Bt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),Mt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),Dt=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Ft=function(e){var t,n,r=e.post,i=e.imageUrl,s=e.icon,o=void 0===s?bt:s,a=e.size,l=void 0===a?100:a,c=e.className,u=void 0===c?"":c,p=null!==(t=null==r?void 0:r.thumbnail)&&void 0!==t?t:i,d=null!==(n=null==r?void 0:r.title.rendered)&&void 0!==n?n:"";return(0,f.jsx)("div",{className:"parsely-thumbnail ".concat(u),style:{width:l,height:l},children:p?(0,f.jsx)("img",{src:p,alt:d,width:l,height:l,loading:"lazy","aria-hidden":""===d}):(0,f.jsx)("div",{className:"parsely-thumbnail-icon-container",children:(0,f.jsx)(h.Icon,{icon:o,size:l})})})};function Vt(e,t,n){void 0===t&&(t=1),void 0===n&&(n="");var r=parseInt(e.replace(/\D/g,""),10);if(r<1e3)return e;r<1e4&&(t=1);var i=r,s=r.toString(),o="",a=0;return Object.entries({1e3:"k","1,000,000":"M","1,000,000,000":"B","1,000,000,000,000":"T","1,000,000,000,000,000":"Q"}).forEach((function(e){var n=e[0],l=e[1],c=parseInt(n.replace(/\D/g,""),10);if(r>=c){var u=t;(i=r/c)%1>1/a&&(u=i>10?1:2),u=parseFloat(i.toFixed(2))===parseFloat(i.toFixed(0))?0:u,s=i.toFixed(u),o=l}a=c})),s+n+o}var Gt,Ht=function(e){var t,n,r,i,s=null===(t=e.link.match)||void 0===t?void 0:t.blockId,o=(0,v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return s?{block:n(s),parents:r(s).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[s]),a=o.block,l=o.parents;return a?(0,f.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[l.map((function(e,t){var n;return(0,f.jsxs)("span",{children:[(0,f.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,Re.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,f.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,f.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,f.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,Re.getBlockType)(a.name))||void 0===n?void 0:n.title}),(null===(i=null===(r=a.attributes)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.name)&&(0,f.jsx)("span",{className:"breadcrumbs-current-block-name",children:a.attributes.metadata.name})]})]}):(0,f.jsx)(f.Fragment,{})},zt=function(e){var t,n,r,i,s,o,a,l,c,u,p,d,v,g,y=e.link,m=null!==(n=null===(t=y.wp_post_meta)||void 0===t?void 0:t.author)&&void 0!==n?n:(0,w.__)("N/A","wp-parsely"),b=null!==(i=null===(r=y.post_stats)||void 0===r?void 0:r.avg_engaged)&&void 0!==i?i:(0,w.__)("N/A","wp-parsely"),x=(null===(s=y.wp_post_meta)||void 0===s?void 0:s.date)?function(e){if(!1===function(e){return!isNaN(+e)&&0!==e.getTime()}(e))return pt;var t=ct;return e.getUTCFullYear()===(new Date).getUTCFullYear()&&(t=ut),Intl.DateTimeFormat(document.documentElement.lang||"en",t).format(e)}(new Date(y.wp_post_meta.date)):(0,w.__)("N/A","wp-parsely"),_=null!==(a=null===(o=y.wp_post_meta)||void 0===o?void 0:o.thumbnail)&&void 0!==a&&a,k=null!==(c=null===(l=y.wp_post_meta)||void 0===l?void 0:l.title)&&void 0!==c?c:(0,w.__)("N/A","wp-parsely"),S=null!==(p=null===(u=y.wp_post_meta)||void 0===u?void 0:u.type)&&void 0!==p?p:(0,w.__)("External","wp-parsely"),j=null===(d=y.wp_post_meta)||void 0===d?void 0:d.url,P=(null===(v=y.post_stats)||void 0===v?void 0:v.views)?Vt(y.post_stats.views):(0,w.__)("N/A","wp-parsely"),T=(null===(g=y.post_stats)||void 0===g?void 0:g.visitors)?Vt(y.post_stats.visitors):(0,w.__)("N/A","wp-parsely");return(0,f.jsxs)("div",{className:"wp-parsely-link-suggestion-link-details",children:[(0,f.jsx)("div",{className:"thumbnail-column",children:_?(0,f.jsx)(Ft,{imageUrl:_,size:52}):(0,f.jsx)(Ft,{icon:bt,size:52})}),(0,f.jsxs)("div",{className:"data-column",children:[(0,f.jsxs)("div",{className:"title-row",children:[(0,f.jsx)(h.Tooltip,{text:k,children:(0,f.jsx)("span",{children:k})}),j&&(0,f.jsx)(h.Button,{href:j,target:"_blank",variant:"link",rel:"noopener",children:(0,f.jsx)(ie,{icon:$,size:18})})]}),(0,f.jsxs)("div",{className:"data-row",children:[(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Ot,size:16}),(0,f.jsx)("span",{children:x})]}),(0,f.jsxs)("div",{className:"data-point shrinkable",children:[(0,f.jsx)(ie,{icon:At,size:16}),(0,f.jsx)(h.Tooltip,{text:m,children:(0,f.jsx)("span",{children:m})})]}),(0,f.jsxs)("div",{className:"data-point shrinkable",children:[(0,f.jsx)(ie,{icon:It,size:16}),(0,f.jsx)(h.Tooltip,{text:S,children:(0,f.jsx)("span",{children:S})})]})]}),y.post_stats&&(0,f.jsxs)("div",{className:"data-row",children:[P&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Rt,size:16}),(0,f.jsx)("span",{children:P})]}),T&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(ie,{icon:Bt,size:16}),(0,f.jsx)("span",{children:T})]}),b&&(0,f.jsxs)("div",{className:"data-point",children:[(0,f.jsx)(h.Dashicon,{icon:"clock",size:16}),(0,f.jsx)("span",{children:b})]})]})]})]})},Ut=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,i=e.onAccept,s=e.onReject,o=e.onRemove,a=e.onSelectInEditor,l=e.hasPrevious,c=e.hasNext;if(t&&void 0!==t.post_data)return(0,f.jsx)(Et,{link:t,onNext:n,onPrevious:r,onAccept:i,onReject:s,onRemove:o,onSelectInEditor:a,hasPrevious:l,hasNext:c});if(!(null==t?void 0:t.match))return(0,f.jsx)(f.Fragment,{children:(0,w.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var u=t.match.blockId,p=(0,v.select)("core/block-editor").getBlock(u),d=t.applied;return p?(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&i()},r:function(){t&&(t.applied?o():s())}}}),(0,f.jsx)(Ht,{link:t}),(0,f.jsx)("div",{className:"review-suggestion-preview",children:(0,f.jsx)(jt,{block:p,link:t})}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(zt,{link:t}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,w.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:xt,children:(0,w.__)("Previous","wp-parsely")})}),(0,f.jsxs)("div",{className:"reviews-controls-middle",children:[!d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,w.__)("Reject","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Mt,onClick:s,variant:"secondary",children:(0,w.__)("Reject","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"A",text:(0,w.__)("Accept","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",icon:Dt,onClick:i,variant:"secondary",children:(0,w.__)("Accept","wp-parsely")})})]}),d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,w.__)("Remove","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Mt,onClick:o,variant:"secondary",children:(0,w.__)("Remove","wp-parsely")})}),(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",onClick:a,variant:"secondary",children:(0,w.__)("Select in Editor","wp-parsely")})]})]}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,w.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,w.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:_t})]})})]})]}):(0,f.jsx)(f.Fragment,{children:(0,w.__)("No block is selected.","wp-parsely")})},qt=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))},Kt=function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(a=o[0],(l=a.parentNode)&&(c=document.createTextNode(null!==(u=a.textContent)&&void 0!==u?u:""),l.replaceChild(c,a),Z.updateBlockAttributes(n,{content:s.innerHTML}))),[4,L(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},C=(0,m.useCallback)((function(){c(!1),x().filter((function(e){return!e.applied})).length>0?o(!0):(W.unlockPostAutosaving("smart-linking-review-modal"),t())}),[x,t]),O=function(e){o(!1),e?(c(!1),T().then((function(){C()}))):c(!0)},A=function(){if(Ge(S)){var e=g.indexOf(S);if(!g[t=e+1])return;j(g[t])}else{var t;if(e=d.indexOf(S),!d[t=e+1])return;j(d[t])}},I=function(){if(Ge(S)){var e=g.indexOf(S);if(!g[t=e-1])return;j(g[t])}else{var t;if(e=d.indexOf(S),!d[t=e-1])return;j(d[t])}};return(0,m.useEffect)((function(){l?W.lockPostAutosaving("smart-linking-review-modal"):l&&0===p.length&&C()}),[l,t,p,C]),(0,m.useEffect)((function(){c(n)}),[n]),(0,f.jsxs)(f.Fragment,{children:[l&&(0,f.jsx)(h.Modal,{title:(0,w.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:C,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,f.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,f.jsx)(Ct,{outboundLinks:d,inboundLinks:g,activeLink:S,setSelectedLink:j}),S&&(Ge(S)?(0,f.jsx)(Et,{link:S,onNext:A,onPrevious:I,hasNext:g.indexOf(S)0}):(0,f.jsx)(Ut,{link:S,hasNext:b().indexOf(S)0,onNext:A,onPrevious:I,onAccept:function(){return qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return S.match?(r(S),[4,(i=S.match.blockId,s=S,qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=s.href.itm,e.title=s.title,e.setAttribute("data-smartlink",s.uid),(t=(0,v.select)("core/block-editor").getBlock(i))?(Ue(t,s,e),s.applied=!0,[4,E(s)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),k.trackEvent("smart_linking_link_accepted",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),0===y().length?(C(),[2]):(e=d.indexOf(S),d[t=e+1]?j(d[t]):j(d[0]),[2])}var i,s}))}))},onReject:function(){return qt(void 0,void 0,void 0,(function(){var e,t;return Kt(this,(function(n){switch(n.label){case 0:return e=d.indexOf(S),d[t=e+1]?j(d[t]):d[0]?j(d[0]):C(),[4,L(S.uid)];case 1:return n.sent(),k.trackEvent("smart_linking_link_rejected",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),[2]}}))}))},onRemove:function(){return qt(void 0,void 0,void 0,(function(){var e,t,n,r;return Kt(this,(function(i){switch(i.label){case 0:return S.match?(e=(0,v.select)("core/block-editor").getBlock(S.match.blockId))?(t=b(),n=t.indexOf(S),r=n-1,[4,N(e,S)]):[3,2]:[2];case 1:if(i.sent(),k.trackEvent("smart_linking_link_removed",{link:S.href.raw,title:S.title,text:S.text,uid:S.uid}),0===(t=b()).length&&g.length>0)return j(g[0]),[2];if(0===t.length&&0===g.length)return C(),[2];if(t[r])return j(t[r]),[2];j(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(S.match){var e=(0,v.select)("core/block-editor").getBlock(S.match.blockId);if(e){Z.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&Xe(t,S.uid),k.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:S.uid}),C()}}}}))]})}),s&&(0,f.jsxs)(h.Modal,{title:(0,w.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return O(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,w.__)("Are you sure you want to close? All un-accepted Smart Links will not be added.","wp-parsely"),(0,f.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return O(!1)},children:(0,w.__)("Go Back","wp-parsely")}),(0,f.jsx)(h.Button,{variant:"secondary",isDestructive:!0,onClick:function(){return O(!0)},children:(0,w.__)("Close","wp-parsely")})]})]})]})})),Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&S("success",/* translators: %s: number of smart links applied */ /* translators: %s: number of smart links applied */ +(0,w.sprintf)((0,w.__)("%s Smart Links successfully applied.","wp-parsely"),g),{type:"snackbar"}):y(0)}),[x]),(0,m.useEffect)((function(){if(!(Object.keys(R).length>0)){var e={maxLinksPerPost:a.SmartLinking.MaxLinks};ee(e)}}),[ee,a]);var de=(0,v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,i=t.getBlock,s=t.getBlocks,o=e("core/editor"),a=o.getEditedPostContent,l=o.getCurrentPostAttribute;return{allBlocks:s(),selectedBlock:n?i(n):r(),postContent:a(),postPermalink:l("link")}}),[n]),fe=de.allBlocks,he=de.selectedBlock,ve=de.postContent,ge=de.postPermalink,ye=function(e){return Yt(void 0,void 0,void 0,(function(){var t,n,r,i,s;return $t(this,(function(o){switch(o.label){case 0:t=[],o.label=1;case 1:return o.trys.push([1,4,,9]),[4,re((n=L||!he)?et.All:et.Selected)];case 2:return o.sent(),a=ge.replace(/^https?:\/\//i,""),r=["http://"+a,"https://"+a],i=function(e){return e.map((function(e){return e.href.raw}))}(F),r.push.apply(r,i),[4,yt.getInstance().generateSmartLinks(he&&!n?(0,Re.getBlockContent)(he):ve,A,r)];case 3:return t=o.sent(),[3,9];case 4:if((s=o.sent()).code&&s.code===U.ParselyAborted)throw s.numRetries=3-e,s;return e>0&&s.retryFetch?(console.error(s),[4,oe(!0)]):[3,8];case 5:return o.sent(),[4,ae()];case 6:return o.sent(),[4,ye(e-1)];case 7:return[2,o.sent()];case 8:throw s;case 9:return[2,t]}var a}))}))},me=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},xe=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),W.unlockPostSaving("wp-parsely-block-overlay")};return(0,f.jsxs)("div",{className:"wp-parsely-smart-linking",children:[(0,f.jsx)(Be,{isDetectingEnabled:!E,onLinkRemove:function(e){!function(e){De(this,void 0,void 0,(function(){var t,n,r;return Fe(this,(function(i){switch(i.label){case 0:return[4,$e((0,Re.getBlockContent)(e),e.clientId)];case 1:return t=i.sent(),n=t.missingSmartLinks,r=t.didAnyFixes,n.forEach((function(e){(0,v.dispatch)(st).removeSmartLink(e.uid)})),[2,r]}}))}))}(e.block)}}),(0,f.jsxs)(h.PanelRow,{className:t,children:[(0,f.jsxs)("div",{className:"smart-linking-text",children:[(0,w.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/smart-linking/",target:"_blank",variant:"link",children:[(0,w.__)("Learn more about Smart Linking","wp-parsely"),(0,f.jsx)(ie,{icon:$,size:18,className:"parsely-external-link-icon"})]})]}),C&&(0,f.jsx)(h.Notice,{status:"info",onRemove:function(){return Z(null)},className:"wp-parsely-content-helper-error",children:C.Message()}),x&&g>0&&(0,f.jsx)(h.Notice,{status:"success",onRemove:function(){return _(!1)},className:"wp-parsely-smart-linking-suggested-links",children:(0,w.sprintf)(/* translators: %s: number of smart links generated */ /* translators: %s: number of smart links generated */ +(0,w.__)("Successfully added %s Smart Links.","wp-parsely"),g>0?g:O.length)}),(0,f.jsx)(lt,{disabled:T,selectedBlock:he,onSettingChange:function(e,t){var n;p({SmartLinking:Wt(Wt({},a.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&se(t)}}),(0,f.jsx)("div",{className:"smart-linking-generate",children:(0,f.jsx)(h.Button,{onClick:function(){return Yt(void 0,void 0,void 0,(function(){var e,t,n,r,s,o,a,l;return $t(this,(function(c){switch(c.label){case 0:return[4,K(!0)];case 1:return c.sent(),[4,le()];case 2:return c.sent(),[4,Z(null)];case 3:return c.sent(),_(!1),k.trackEvent("smart_linking_generate_pressed",{is_full_content:L,selected_block:null!==(o=null==he?void 0:he.name)&&void 0!==o?o:"none",context:i}),[4,me(L?"all":null==he?void 0:he.clientId)];case 4:c.sent(),e=setTimeout((function(){var e;K(!1),k.trackEvent("smart_linking_generate_timeout",{is_full_content:L,selected_block:null!==(e=null==he?void 0:he.name)&&void 0!==e?e:"none",context:i}),we(L?"all":null==he?void 0:he.clientId)}),18e4),t=B,c.label=5;case 5:return c.trys.push([5,8,10,15]),[4,ye(3)];case 6:return n=c.sent(),[4,(u=n,Yt(void 0,void 0,void 0,(function(){var e;return $t(this,(function(t){switch(t.label){case 0:return u=u.filter((function(e){return!F.some((function(t){return t.uid===e.uid&&t.applied}))})),e=ge.replace(/^https?:\/\//,"").replace(/\/+$/,""),u=(u=u.filter((function(t){return!t.href.raw.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!F.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),u=(u=Ze(L?fe:[he],u,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!F.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,s=i+r.text.length;return t>=i&&n<=s}))})),[4,Y(u)];case 1:return t.sent(),[2,u]}}))})))];case 7:if(0===c.sent().length)throw new te((0,w.__)("No Smart Links were generated.","wp-parsely"),U.ParselySuggestionsApiNoData,"");return ce(!0),[3,15];case 8:return r=c.sent(),s=new te(null!==(a=r.message)&&void 0!==a?a:"An unknown error has occurred.",null!==(l=r.code)&&void 0!==l?l:U.UnknownError),r.code&&r.code===U.ParselyAborted&&(s.message=(0,w.sprintf)(/* translators: 1: number of retry attempts, 2: attempt plural */ /* translators: 1: number of retry attempts, 2: attempt plural */ (0,w.__)("The Smart Linking process was cancelled after %1$d %2$s.","wp-parsely"),r.numRetries,(0,w._n)("attempt","attempts",r.numRetries,"wp-parsely"))),console.error(r),[4,Z(s)];case 9:return c.sent(),s.createErrorSnackbar(),[3,15];case 10:return[4,K(!1)];case 11:return c.sent(),[4,re(t)];case 12:return c.sent(),[4,oe(!1)];case 13:return c.sent(),[4,we(L?"all":null==he?void 0:he.clientId)];case 14:return c.sent(),clearTimeout(e),[7];case 15:return[2]}var u}))}))},variant:"secondary",isBusy:T,disabled:T,children:M?(0,w.sprintf)(/* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ /* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ (0,w.__)("Retrying… Attempt %1$d of %2$d","wp-parsely"),D,3):T?(0,w.__)("Generating Smart Links…","wp-parsely"):(0,w.__)("Add Smart Links","wp-parsely")})}),(G.length>0||V.length>0)&&(0,f.jsx)("div",{className:"smart-linking-manage",children:(0,f.jsx)(h.Button,{onClick:function(){return Yt(void 0,void 0,void 0,(function(){var e,t;return $t(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return e=n.sent(),t=We(),[4,Y(t)];case 2:return n.sent(),ce(!0),k.trackEvent("smart_linking_review_pressed",{num_smart_links:F.length,has_fixed_links:e,context:i}),[2]}}))}))},variant:"secondary",disabled:T,children:(0,w.__)("Review Smart Links","wp-parsely")})})]}),E&&(0,f.jsx)(Zt,{isOpen:E,onAppliedLink:function(){y((function(e){return e+1}))},onClose:function(){_(!0),ce(!1)}})]})},en=function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&(t(),e())}))}))]}))},new((n=void 0)||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}().then((function(){var t=document.querySelector(".wp-block-post-content");Xe(t,e)}))})))},fn=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M7 11.5h10V13H7z"})}),hn=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),vn=function(e){var t=e.title,n=e.icon,r=e.subtitle,i=e.level,s=void 0===i?2:i,o=e.children,a=e.controls,l=e.onClick,c=e.isOpen,u=e.isLoading,p=e.dropdownChildren;return(0,f.jsxs)("div",{className:"performance-stat-panel",children:[(0,f.jsxs)(h.__experimentalHStack,{className:"panel-header level-"+s,children:[(0,f.jsx)(h.__experimentalHeading,{level:s,children:t}),r&&!c&&(0,f.jsx)("span",{className:"panel-subtitle",children:r}),a&&!p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,w.__)("Settings","wp-parsely"),className:"panel-settings-button",controls:a}),p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,w.__)("Settings","wp-parsely"),className:"panel-settings-button",children:p}),n&&!p&&!a&&(0,f.jsx)(h.Button,{icon:n,className:"panel-settings-button",isPressed:c,onClick:l})]}),(0,f.jsx)("div",{className:"panel-body",children:u?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):o})]})},gn=function(e){var t=e.data,n=e.isLoading,r=(0,m.useState)(B.Views),i=r[0],s=r[1],o=(0,m.useState)(!1),a=o[0],l=o[1];n||delete t.referrers.types.totals;var c=function(e){switch(e){case"social":return(0,w.__)("Social","wp-parsely");case"search":return(0,w.__)("Search","wp-parsely");case"other":return(0,w.__)("Other","wp-parsely");case"internal":return(0,w.__)("Internal","wp-parsely");case"direct":return(0,w.__)("Direct","wp-parsely")}return e},u=(0,w.sprintf)((0,w.__)("By %s","wp-parsely"),G(i)); /* translators: %s: metric description */return(0,f.jsxs)(vn,{title:(0,w.__)("Categories","wp-parsely"),level:3,subtitle:u,isOpen:a,onClick:function(){return l(!a)},children:[a&&(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{value:i,prefix:(0,w.__)("By:","wp-parsely"),onChange:function(e){F(e,B)&&s(e)},children:Object.values(B).map((function(e){return(0,f.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[G(e),"avg_engaged"===e&&" "+(0,w.__)("(coming soon)","wp-parsely")]},e)}))})}),n?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(t.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,w.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ /* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ @@ -12,8 +12,8 @@ /* translators: %s: percentage value */,{ /* translators: %s: percentage value */ text:"".concat(c(t)," - ").concat((0,w.sprintf)((0,w.__)("%s%%","wp-parsely"),n.viewsPercentage)),delay:150,children:(0,f.jsx)("div",{"aria-label":r,className:"bar-fill "+t,style:{width:n.viewsPercentage+"%"}})},t)}))}),(0,f.jsx)("div",{className:"percentage-bar-labels",children:Object.entries(t.referrers.types).map((function(e){var t=e[0],n=e[1];return(0,f.jsxs)("div",{className:"single-label "+t,children:[(0,f.jsx)("div",{className:"label-color "+t}),(0,f.jsx)("div",{className:"label-text",children:c(t)}),(0,f.jsx)("div",{className:"label-value",children:Vt(n.views)})]},t)}))})]})]})},yn=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),mn=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})}),wn=function(){return wn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]%s has 0 views, or the Parse.ly API returned no data.","wp-parsely"),r),U.ParselyApiReturnedNoData,""))]):n.length>1?[2,Promise.reject(new te((0,w.sprintf)(/* translators: URL of the published post */ /* translators: URL of the published post */ +/* translators: %s: Percentage value, %%: Escaped percent sign */;var i=(0,w.sprintf)((0,w.__)("%s%%","wp-parsely"),n.viewsPercentage);return(0,f.jsxs)("div",{className:"referrers-row",children:[(0,f.jsx)("div",{className:"referrers-row-title",children:(0,f.jsx)("span",{children:r})}),(0,f.jsx)("div",{className:"referrers-row-bar",children:(0,f.jsx)("div",{"aria-label":i,className:"percentage-bar",style:{"--bar-fill":n.viewsPercentage+"%"}})}),(0,f.jsx)("div",{className:"referrers-row-value",children:(0,f.jsx)("span",{children:n.views})})]},t)}))})]})},Ln=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),Nn=function(){return Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]%s has 0 views, or the Parse.ly API returned no data.","wp-parsely"),r),U.ParselyApiReturnedNoData,""))]):n.length>1?[2,Promise.reject(new te((0,w.sprintf)(/* translators: %d: URL of the published post */ /* translators: %d: URL of the published post */ (0,w.__)("Multiple results were returned for the post %d by the Parse.ly API.","wp-parsely"),t),U.ParselyApiReturnedTooManyResults))]:[2,n[0]]}}))}))},t.prototype.fetchReferrerDataFromWpEndpoint=function(e,t,n){return Cn(this,void 0,void 0,(function(){return On(this,(function(r){switch(r.label){case 0:return[4,this.fetch({path:(0,we.addQueryArgs)("/wp-parsely/v2/stats/post/".concat(t,"/referrers"),Nn(Nn({},dt(e)),{itm_source:this.itmSource,total_views:n}))})];case 1:return[2,r.sent()]}}))}))},t}(be),In=function(){return In=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&e.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return t.sent(),[4,n(r-1)];case 2:return t.sent(),[3,4];case 3:a(e),i(!1),t.label=4;case 4:return[2]}}))}))})),[2]}))}))};return i(!0),n(1),function(){a(void 0)}}),[t]),(0,f.jsxs)("div",{className:"wp-parsely-performance-panel",children:[(0,f.jsx)(vn,{title:(0,w.__)("Performance Stats","wp-parsely"),icon:hn,dropdownChildren:function(e){var t=e.onClose;return(0,f.jsx)(Vn,{onClose:t})},children:(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:d.PerformanceStats.Period,prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,w.__)("Period:","wp-parsely")}),onChange:function(e){F(e,R)&&(v({PerformanceStats:In(In({},d.PerformanceStats),{Period:e})}),k.trackEvent("editor_sidebar_performance_period_changed",{period:e}))},children:Object.values(R).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})})}),o?o.Message():(0,f.jsxs)(f.Fragment,{children:[Fn(d,"overview")&&(0,f.jsx)(Tn,{data:c,isLoading:r}),Fn(d,"categories")&&(0,f.jsx)(gn,{data:c,isLoading:r}),Fn(d,"referrers")&&(0,f.jsx)(En,{data:c,isLoading:r})]}),window.wpParselyPostUrl&&(0,f.jsx)(h.Button,{className:"wp-parsely-view-post",variant:"secondary",onClick:function(){k.trackEvent("editor_sidebar_view_post_pressed")},href:window.wpParselyPostUrl,rel:"noopener",target:"_blank",children:(0,w.__)("View this in Parse.ly","wp-parsely")})]})},Hn=function(e){var t=e.period;return(0,f.jsx)(h.Panel,{children:(0,f.jsx)(Ie,{children:(0,f.jsx)(Gn,{period:t})})})},zn=function(e){var t=e.filters,n=e.postData,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=1&&(0,f.jsx)(h.ComboboxControl,{__next40pxDefaultSize:!0,allowReset:!0,placeholder:(0,w.__)("Author","wp-parsely"),onChange:function(e){return r.onFiltersChange(e,M.Author)},options:s,value:t.author}),n.categories.length>=1&&(0,f.jsx)(h.ComboboxControl,{__next40pxDefaultSize:!0,allowReset:!0,placeholder:(0,w.__)("Section","wp-parsely"),onChange:function(e){return r.onFiltersChange(e,M.Section)},options:i,value:t.section}),n.tags.length>=1&&(0,f.jsx)(h.FormTokenField,{__experimentalShowHowTo:!1,__next40pxDefaultSize:!0,label:"",placeholder:(0,w.__)("Tags","wp-parsely"),onChange:function(e){return r.onFiltersChange(e.toString(),M.Tag)},value:t.tags,suggestions:n.tags,maxLength:5})]})},Un=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),qn=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),Kn=function(e){var t=e.size,n=void 0===t?40:t,r=e.color,i=void 0===r?"#cccccc":r;return(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"3",height:n,viewBox:"0 0 1 ".concat(n),fill:"none",children:(0,f.jsx)(h.Rect,{width:"1",height:n,fill:i})})})};function Zn(e){var t=e.metric,n=e.post,r=e.avgEngagedIcon,i=e.viewsIcon;return"views"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,w.__)("Number of Views","wp-parsely")}),i,Vt(n.views.toString())]}):"avg_engaged"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,w.__)("Average Time","wp-parsely")}),r,n.avgEngaged]}):(0,f.jsx)("span",{className:"parsely-post-metric-data",children:"-"})}var Wn=function(e){var t,n,r=e.metric,i=e.post,s=e.postContent,o=(0,v.useDispatch)("core/notices").createNotice,a=s&&(t=s,n=Oe(i.rawUrl),new RegExp("]*href=[\"'](http://|https://)?.*".concat(n,".*[\"'][^>]*>"),"i").test(t));return(0,f.jsxs)("div",{className:"related-post-single","data-testid":"related-post-single",children:[(0,f.jsx)("div",{className:"related-post-title",children:(0,f.jsxs)("a",{href:i.url,target:"_blank",rel:"noreferrer",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,w.__)("View on website (opens new tab)","wp-parsely")}),i.title]})}),(0,f.jsx)("div",{className:"related-post-actions",children:(0,f.jsxs)("div",{className:"related-post-info",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"related-post-metric",children:(0,f.jsx)(Zn,{metric:r,post:i,viewsIcon:(0,f.jsx)(ie,{icon:Rt}),avgEngagedIcon:(0,f.jsx)(h.Dashicon,{icon:"clock",size:24})})}),a&&(0,f.jsx)("div",{className:"related-post-linked",children:(0,f.jsx)(h.Tooltip,{text:(0,w.__)("This post is linked in the content","wp-parsely"),children:(0,f.jsx)(ie,{icon:Un,size:24})})})]}),(0,f.jsx)(Kn,{}),(0,f.jsxs)("div",{children:[(0,f.jsx)(h.Button,{icon:qn,iconSize:24,onClick:function(){navigator.clipboard.writeText(i.rawUrl).then((function(){o("success",(0,w.__)("URL copied to clipboard","wp-parsely"),{type:"snackbar"})}))},label:(0,w.__)("Copy URL to clipboard","wp-parsely")}),(0,f.jsx)(h.Button,{icon:(0,f.jsx)(j,{}),iconSize:18,href:i.dashUrl,target:"_blank",label:(0,w.__)("View in Parse.ly","wp-parsely")})]})]})})]})},Yn=window.wp.coreData,$n=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),Jn=function(){return Jn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&f.every(Number.isInteger)?null!==(n=l("taxonomy","category",{include:f,context:"view"}))&&void 0!==n?n:void 0:null,tagRecords:o=Array.isArray(h)&&h.length>0&&h.every(Number.isInteger)?null!==(r=l("taxonomy","post_tag",{include:h,context:"view"}))&&void 0!==r?r:void 0:null,isLoading:u("getEntityRecords",["root","user",{include:[d],context:"view"}])||u("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||u("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}]),hasResolved:(c("getEntityRecords",["root","user",{include:[d],context:"view"}])||null===i)&&(c("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||null===s)&&(c("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}])||null===o)}}),[]);return(0,m.useEffect)((function(){var e=r.authorRecords,t=r.categoryRecords,i=r.tagRecords,s=r.isLoading;r.hasResolved&&!s&&n({authors:e,categories:t,tags:i,isReady:!0})}),[r]),t}(),c=l.authors,u=l.categories,p=l.tags,d=l.isReady,g=function(e){return!(!Array.isArray(e)||0===e.length)&&e.every((function(e){return"name"in e&&"id"in e&&"slug"in e&&"description"in e&&"link"in e}))};(0,m.useEffect)((function(){if(d){var e,t=function(e){return g(e)?e.map((function(e){return e.name})):[]};a({authors:t(c),categories:(e=u,g(e)?e.map((function(e){return{name:e.name,slug:e.slug}})):[]),tags:t(p)})}}),[c,u,p,d]);var y=(0,v.useSelect)((function(e){var t=e(rr),n=t.isLoading,r=t.getPosts,i=t.getFilters;return{firstRun:(0,t.isFirstRun)(),loading:n(),posts:r(),filters:i()}}),[]),b=y.firstRun,x=y.loading,_=y.posts,S=y.filters,j=(0,v.useDispatch)(rr),P=j.setFirstRun,T=j.setLoading,E=j.setPosts,L=j.setFilters,N=(0,m.useState)(),C=N[0],O=N[1],A=(0,m.useState)(void 0),D=A[0],H=A[1],z=(0,ne.useDebounce)(H,1e3);(0,v.useSelect)((function(e){if("undefined"==typeof jest){var t=e("core/editor").getEditedPostContent;z(t())}else z("Jest test is running")}),[z]);var U=function(e,t,n,r){return or(void 0,void 0,void 0,(function(){return ar(this,(function(i){return T(!0),er.getInstance().getRelatedPosts(e,t,n).then((function(e){E(e),T(!1)})).catch((function(i){return or(void 0,void 0,void 0,(function(){return ar(this,(function(s){switch(s.label){case 0:return r>0&&i.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return s.sent(),[4,U(e,t,n,r-1)];case 2:return s.sent(),[3,4];case 3:T(!1),O(i),E([]),s.label=4;case 4:return[2]}}))}))})),[2]}))}))};return b&&(U(r,i,S,1),P(!1)),0===o.authors.length&&0===o.categories.length&&0===o.tags.length&&d?(0,f.jsx)("div",{className:"wp-parsely-related-posts",children:(0,f.jsx)("div",{className:"related-posts-body",children:(0,w.__)("Error: No author, section, or tags could be found for this post.","wp-parsely")})}):(0,f.jsxs)("div",{className:"wp-parsely-related-posts",children:[(0,f.jsx)("div",{className:"related-posts-description",children:(0,w.__)("Find top-performing related posts.","wp-parsely")}),(0,f.jsxs)("div",{className:"related-posts-body",children:[(0,f.jsxs)("div",{className:"related-posts-settings",children:[(0,f.jsx)(h.SelectControl,{size:"__unstable-large",onChange:function(e){return function(e){if(F(e,B)){var i=e;n({RelatedPosts:sr(sr({},t.RelatedPosts),{Metric:i})}),k.trackEvent("related_posts_metric_changed",{metric:i}),U(r,i,S,1)}}(e)},prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,w.__)("Metric:","wp-parsely")}),value:i,children:Object.values(B).map((function(e){return(0,f.jsx)("option",{value:e,children:G(e)},e)}))}),(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:r,prefix:(0,f.jsxs)(h.__experimentalInputControlPrefixWrapper,{children:[(0,w.__)("Period:","wp-parsely")," "]}),onChange:function(e){return function(e){if(F(e,R)){var r=e;n({RelatedPosts:sr(sr({},t.RelatedPosts),{Period:r})}),k.trackEvent("related_posts_period_changed",{period:r}),U(r,i,S,1)}}(e)},children:Object.values(R).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})]}),(0,f.jsx)(zn,{label:(0,w.__)("Filter by","wp-parsely"),filters:S,onFiltersChange:function(e,t){var n,s;if(null==e&&(e=""),M.Tag===t){var o=[];""!==e&&(o=e.split(",").map((function(e){return e.trim()}))),s=sr(sr({},S),{tags:o})}else s=sr(sr({},S),((n={})[t]=e,n));L(s),U(r,i,s,1)},postData:o}),(0,f.jsxs)("div",{className:"related-posts-wrapper",children:[C&&C.Message(),x&&(0,f.jsx)("div",{className:"related-posts-loading-message","data-testid":"parsely-related-posts-loading-message",children:(0,w.__)("Loading…","wp-parsely")}),!b&&!x&&!C&&0===_.length&&(0,f.jsx)("div",{className:"related-posts-empty",children:(0,w.__)("No related posts found.","wp-parsely")}),!x&&_.length>0&&(0,f.jsx)("div",{className:"related-posts-list",children:_.map((function(e){return(0,f.jsx)(Wn,{metric:i,post:e,postContent:D},e.id)}))})]})]})]})},cr=(0,f.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(b.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),ur=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),pr=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),dr=(0,f.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(b.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})}),fr=function(){return fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(0,f.jsx)("span",{className:"parsely-write-titles-text",children:(0,m.createInterpolateElement)( // translators: %1$s is the tone, %2$s is the persona. // translators: %1$s is the tone, %2$s is the persona. diff --git a/src/content-helper/dashboard-page/components/posts-table/components/suggestion-bubble.tsx b/src/content-helper/dashboard-page/components/posts-table/components/suggestion-bubble.tsx index 9ba91b5676..5642621982 100644 --- a/src/content-helper/dashboard-page/components/posts-table/components/suggestion-bubble.tsx +++ b/src/content-helper/dashboard-page/components/posts-table/components/suggestion-bubble.tsx @@ -40,7 +40,7 @@ export const SuggestionBubble = ( { postId, numberOfSuggestions }: SuggestionBub navigate( `/engagement-boost/${ postId }` ); }; - const pendingSuggestionsText = sprintf( /* translators: 1: Number of suggestions generated on this post */ + const pendingSuggestionsText = sprintf( /* translators: %d: Number of suggestions generated on this post */ _n( '%d pending suggestion', '%d pending suggestions', numberOfSuggestions, 'wp-parsely' ), numberOfSuggestions ); diff --git a/src/content-helper/editor-sidebar/performance-stats/provider.ts b/src/content-helper/editor-sidebar/performance-stats/provider.ts index 95a1d6229f..fab946a142 100644 --- a/src/content-helper/editor-sidebar/performance-stats/provider.ts +++ b/src/content-helper/editor-sidebar/performance-stats/provider.ts @@ -125,7 +125,7 @@ export class PerformanceStatsProvider extends BaseProvider { const postTitle = select( 'core/editor' ).getEditedPostAttribute( 'title' ) ?? ''; return Promise.reject( new ContentHelperError( sprintf( - /* translators: Title of the published post */ + /* translators: %s: Title of the published post */ __( '%s has 0 views, or the Parse.ly API returned no data.', 'wp-parsely' ), postTitle ), ContentHelperErrorCode.ParselyApiReturnedNoData, '' @@ -136,7 +136,7 @@ export class PerformanceStatsProvider extends BaseProvider { if ( response.length > 1 ) { return Promise.reject( new ContentHelperError( sprintf( - /* translators: URL of the published post */ + /* translators: %d: URL of the published post */ __( 'Multiple results were returned for the post %d by the Parse.ly API.', 'wp-parsely' ), postId ), ContentHelperErrorCode.ParselyApiReturnedTooManyResults diff --git a/src/content-helper/editor-sidebar/smart-linking/component.tsx b/src/content-helper/editor-sidebar/smart-linking/component.tsx index f8f561355e..435eff9181 100644 --- a/src/content-helper/editor-sidebar/smart-linking/component.tsx +++ b/src/content-helper/editor-sidebar/smart-linking/component.tsx @@ -265,7 +265,7 @@ export const SmartLinkingPanel = ( { } else if ( numAddedLinks > 0 ) { createNotice( 'success', - /* translators: %d: number of smart links applied */ + /* translators: %s: number of smart links applied */ sprintf( __( '%s Smart Links successfully applied.', 'wp-parsely' ), numAddedLinks ), { type: 'snackbar', @@ -499,7 +499,7 @@ export const SmartLinkingPanel = ( { // Handle the case where the operation was aborted by the user. if ( e.code && e.code === ContentHelperErrorCode.ParselyAborted ) { contentHelperError.message = sprintf( - /* translators: %d: number of retry attempts, %s: attempt plural */ + /* translators: 1: number of retry attempts, 2: attempt plural */ __( 'The Smart Linking process was cancelled after %1$d %2$s.', 'wp-parsely' ), e.numRetries, _n( 'attempt', 'attempts', e.numRetries, 'wp-parsely' ) @@ -695,7 +695,7 @@ export const SmartLinkingPanel = ( { className="wp-parsely-smart-linking-suggested-links" > { sprintf( - /* translators: 1 - number of smart links generated */ + /* translators: %s: number of smart links generated */ __( 'Successfully added %s Smart Links.', 'wp-parsely' ), numAddedLinks > 0 ? numAddedLinks : suggestedLinks.length, ) } From 6c44e4aedc25788d637b8245bb7319eb328b25dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:42:09 +0000 Subject: [PATCH 14/83] Bump @wordpress/hooks from 4.28.0 to 4.29.0 Bumps [@wordpress/hooks](https://github.com/WordPress/gutenberg/tree/HEAD/packages/hooks) from 4.28.0 to 4.29.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/hooks/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/hooks@4.29.0/packages/hooks) --- updated-dependencies: - dependency-name: "@wordpress/hooks" dependency-version: 4.29.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb63f46a90..3de8b4f301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "@wordpress/element": "^6.29.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.15.0", - "@wordpress/hooks": "^4.28.0", + "@wordpress/hooks": "^4.29.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", @@ -8966,9 +8966,9 @@ } }, "node_modules/@wordpress/hooks": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.28.0.tgz", - "integrity": "sha512-NE7ObdwcVDNHz19UVOjcbO6BlRLXQtRnZWWyFLNttFTmXEJo5wNbG1hTPaDQCGdV71mmHvGYJat9JqY04tIO9g==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.29.0.tgz", + "integrity": "sha512-CGRhbqGAjgG/M00SiQywRedYpQ5qoj5L44KdJ9qfex75jGZsGHToztajWPT/2TfTcMz3WHaeIOs+iHokTOmIMg==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/package.json b/package.json index a2483af6e8..3d89d39be9 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@wordpress/element": "^6.29.0", "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.15.0", - "@wordpress/hooks": "^4.28.0", + "@wordpress/hooks": "^4.29.0", "@wordpress/i18n": "^5.26.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", From 4dcc829914f3d754467d01277acab3507db68730 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:04:12 +0000 Subject: [PATCH 15/83] Bump @testing-library/jest-dom from 6.6.4 to 6.8.0 (#3626) --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3de8b4f301..c7abb770b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@playwright/test": "^1.54.2", - "@testing-library/jest-dom": "^6.6.4", + "@testing-library/jest-dom": "^6.8.0", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", "@types/js-cookie": "^3.0.6", @@ -5018,9 +5018,9 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.4.tgz", - "integrity": "sha512-xDXgLjVunjHqczScfkCJ9iyjdNOVHvvCdqHSSxwM9L0l/wHkTRum67SDc020uAlCoqktJplgO2AAQeLP1wgqDQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.8.0.tgz", + "integrity": "sha512-WgXcWzVM6idy5JaftTVC8Vs83NKRmGJz4Hqs4oyOuO2J4r/y79vvKZsb+CaGyCSEbUPI6OsewfPd0G1A0/TUZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5028,7 +5028,6 @@ "aria-query": "^5.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.6.3", - "lodash": "^4.17.21", "picocolors": "^1.1.1", "redent": "^3.0.0" }, diff --git a/package.json b/package.json index 3d89d39be9..df0b7f2b08 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@playwright/test": "^1.54.2", - "@testing-library/jest-dom": "^6.6.4", + "@testing-library/jest-dom": "^6.8.0", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", "@types/js-cookie": "^3.0.6", From 2905ef285ee62cefadf4abbf6c9bf6be6c91e794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:17:58 +0000 Subject: [PATCH 16/83] Bump actions/checkout from 4 to 5 (#3599) --- .github/workflows/build-plugin.yml | 2 +- .github/workflows/bump-version.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/cs-lint.yml | 2 +- .github/workflows/dependency-review.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/e2e-tests.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- .github/workflows/node.js.yml | 2 +- .github/workflows/release-plugin.yml | 6 +++--- .github/workflows/unit-tests.yml | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index 96a877a572..41ec9a374a 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -28,7 +28,7 @@ jobs: git config --global user.email 'github-actions[bot]@users.noreply.github.com' - name: Checkout the specific branch/ref - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ env.SOURCE_REF }} fetch-depth: 0 diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 0a665cbda6..1140e47e8c 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -34,7 +34,7 @@ jobs: extensions: mbstring, json - name: Checkout ${{ github.ref_name }} branch - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.ref_name }} fetch-depth: 0 @@ -85,7 +85,7 @@ jobs: git config --global user.email 'github-actions[bot]@users.noreply.github.com' - name: Checkout ${{ github.ref_name }} branch - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.ref_name }} fetch-depth: 0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 84235fc401..c387ec0054 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/cs-lint.yml b/.github/workflows/cs-lint.yml index 64ad9a8092..3824b279cd 100644 --- a/.github/workflows/cs-lint.yml +++ b/.github/workflows/cs-lint.yml @@ -43,7 +43,7 @@ jobs: uses: korelstar/xmllint-problem-matcher@v1 - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Validate the composer.json file. # @link https://getcomposer.org/doc/03-cli.md#validate diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 59f29acaf3..c933ec8fc7 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Check out the source code - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Checks for dependencies with known vulnerabilities - name: Review dependencies diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 15cd30e7d5..2961c8e9e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ jobs: name: New tag runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Build # Remove or modify this step as needed run: | npm ci diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 3f0d4dd7a5..3b2fd1dc63 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Refresh Composer autoload files run: composer dump-autoload --classmap-authoritative diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 97dc284efd..7d30cc08a4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,7 +47,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0d5031a74e..6f75625578 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Read .nvmrc run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV diff --git a/.github/workflows/release-plugin.yml b/.github/workflows/release-plugin.yml index df73d44d75..333fb18ac3 100644 --- a/.github/workflows/release-plugin.yml +++ b/.github/workflows/release-plugin.yml @@ -52,7 +52,7 @@ jobs: fi - name: Checkout the specific branch/ref - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ env.SOURCE_REF }} fetch-depth: 0 @@ -131,7 +131,7 @@ jobs: git config --global user.email 'github-actions[bot]@users.noreply.github.com' - name: Checkout the specific branch/ref - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ env.SOURCE_REF }} fetch-depth: 0 @@ -221,7 +221,7 @@ jobs: echo "Skip Tests: ${{ env.SKIP_TESTS }}" echo "Version: ${{ env.VERSION }}" - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: ${{ needs.tag_and_release.outputs.tag_name }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index cf9c796f58..653aa83043 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,7 +46,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 From 31b63f5aa791082764254a605fb74700958c338e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:22:55 +0000 Subject: [PATCH 17/83] Bump @wordpress/i18n from 5.26.0 to 6.2.0 Bumps [@wordpress/i18n](https://github.com/WordPress/gutenberg/tree/HEAD/packages/i18n) from 5.26.0 to 6.2.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/i18n/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/i18n@6.2.0/packages/i18n) --- updated-dependencies: - dependency-name: "@wordpress/i18n" dependency-version: 6.2.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 564 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 551 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index c7abb770b7..59950decde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.15.0", "@wordpress/hooks": "^4.29.0", - "@wordpress/i18n": "^5.26.0", + "@wordpress/i18n": "^6.2.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", @@ -4996,6 +4996,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@tannin/sprintf": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@tannin/sprintf/-/sprintf-1.3.2.tgz", + "integrity": "sha512-zH2b4ptpfW4mEzt++2nKwTVgBNvfZEH1DgWAlE9uCxZceyH9uUET1Oqvz0LFxaC633WTOHxNxceA0ViJy8X9EA==", + "dev": true, + "license": "MIT" + }, "node_modules/@testing-library/dom": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", @@ -7327,6 +7334,28 @@ "npm": ">=8.19.2" } }, + "node_modules/@wordpress/a11y/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/api-fetch": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-7.26.0.tgz", @@ -7342,6 +7371,28 @@ "npm": ">=8.19.2" } }, + "node_modules/@wordpress/api-fetch/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/autop": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-4.26.0.tgz", @@ -7478,6 +7529,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/block-editor/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -7575,6 +7648,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/block-library/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/block-library/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -7644,6 +7739,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/blocks/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/blocks/node_modules/@wordpress/warning": { "version": "3.26.0", "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", @@ -7690,6 +7807,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/commands/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/components": { "version": "29.12.0", "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-29.12.0.tgz", @@ -7751,6 +7890,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/components/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/components/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -7812,6 +7973,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/compose/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/compose/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -7884,6 +8067,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/core-commands/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/core-data": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-7.26.0.tgz", @@ -7922,6 +8127,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/core-data/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/core-data/node_modules/@wordpress/undo-manager": { "version": "1.26.0", "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-1.26.0.tgz", @@ -8043,6 +8270,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/dataviews/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/dataviews/node_modules/@wordpress/warning": { "version": "3.26.0", "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", @@ -8411,23 +8660,45 @@ "react-dom": "^18.0.0" } }, - "node_modules/@wordpress/edit-post/node_modules/@wordpress/keycodes": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", - "integrity": "sha512-R+mKsQoHdqxnay2f5DOMbqCP0BnKwgWNGoBGCazviy0gfesvEbNPpOOtJS8magujILSgg6tQ4UQcz5Y0bx7Dig==", + "node_modules/@wordpress/edit-post/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7", - "@wordpress/i18n": "^5.26.0" + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" }, "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" } }, - "node_modules/@wordpress/edit-post/node_modules/@wordpress/warning": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", + "node_modules/@wordpress/edit-post/node_modules/@wordpress/keycodes": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", + "integrity": "sha512-R+mKsQoHdqxnay2f5DOMbqCP0BnKwgWNGoBGCazviy0gfesvEbNPpOOtJS8magujILSgg6tQ4UQcz5Y0bx7Dig==", + "dev": true, + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/i18n": "^5.26.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/edit-post/node_modules/@wordpress/warning": { + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", "integrity": "sha512-7vVvrG29eMaH7lxr5ZYDPUMalACZoBqblK8UzZBunXROXmiBfhhZPylfj9DK4wxrfyvhsLWnvewHWxim/pZ3Zg==", "dev": true, "engines": { @@ -8498,6 +8769,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/editor/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/editor/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -8954,6 +9247,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/fields/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/fields/node_modules/@wordpress/warning": { "version": "3.26.0", "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.26.0.tgz", @@ -8992,16 +9307,17 @@ } }, "node_modules/@wordpress/i18n": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", - "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-6.2.0.tgz", + "integrity": "sha512-6x7m5KQiE/6FKknIh8UBfEgT5THZQe+m0u2FYYWwro7nhtwzJ9ymlYLij5lnX3fEAJHKE2AdeH/13zchKRv79w==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "7.25.7", - "@wordpress/hooks": "^4.26.0", + "@tannin/sprintf": "^1.3.2", + "@wordpress/hooks": "^4.29.0", "gettext-parser": "^1.3.1", "memize": "^2.1.0", - "sprintf-js": "^1.1.1", "tannin": "^1.2.0" }, "bin": { @@ -9085,6 +9401,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/interface/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/is-shallow-equal": { "version": "5.26.0", "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-5.26.0.tgz", @@ -9152,6 +9490,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/keyboard-shortcuts/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/keyboard-shortcuts/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -9232,6 +9592,28 @@ "npm": ">=8.19.2" } }, + "node_modules/@wordpress/media-utils/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/notices": { "version": "5.26.0", "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-5.26.0.tgz", @@ -9294,6 +9676,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/patterns/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/plugins": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-7.26.0.tgz", @@ -9363,6 +9767,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/preferences/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/prettier-config": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.15.0.tgz", @@ -9468,6 +9894,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/reusable-blocks/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/rich-text": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-7.26.0.tgz", @@ -9493,6 +9941,28 @@ "react": "^18.0.0" } }, + "node_modules/@wordpress/rich-text/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/rich-text/node_modules/@wordpress/keycodes": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.26.0.tgz", @@ -9963,6 +10433,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/server-side-render/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/shortcode": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-4.26.0.tgz", @@ -10097,6 +10589,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/upload-media/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/url": { "version": "4.29.0", "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.29.0.tgz", @@ -10170,6 +10684,28 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/widgets/node_modules/@wordpress/i18n": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.26.0.tgz", + "integrity": "sha512-YHzaUWlCuN2ynl47qbsdMkTGtP52+E1giDOdWBgUaSexUYjbeFxKFUzRMB0Wuh1psL80+VzvJOH/mU440KAJnA==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "^4.26.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + }, + "bin": { + "pot-to-php": "tools/pot-to-php.js" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/wordcount": { "version": "4.28.0", "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-4.28.0.tgz", diff --git a/package.json b/package.json index df0b7f2b08..e43f5150b1 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@wordpress/env": "^10.26.0", "@wordpress/eslint-plugin": "^22.15.0", "@wordpress/hooks": "^4.29.0", - "@wordpress/i18n": "^5.26.0", + "@wordpress/i18n": "^6.2.0", "@wordpress/icons": "^10.26.0", "@wordpress/plugins": "^7.26.0", "@wordpress/scripts": "^27.9.0", From 77f3e5ca1c2fc485465f013ec939febd46bed5fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:33:15 +0000 Subject: [PATCH 18/83] Bump react-router from 7.6.3 to 7.8.2 (#3630) --- build/content-helper/dashboard-page.asset.php | 2 +- build/content-helper/dashboard-page.js | 2 +- package-lock.json | 9 +++++---- package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build/content-helper/dashboard-page.asset.php b/build/content-helper/dashboard-page.asset.php index eee7b05c41..54621e57b0 100644 --- a/build/content-helper/dashboard-page.asset.php +++ b/build/content-helper/dashboard-page.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '86966deca1032417599c'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '953920372c078d05c4be'); diff --git a/build/content-helper/dashboard-page.js b/build/content-helper/dashboard-page.js index 4ec0b87156..fd3069356f 100644 --- a/build/content-helper/dashboard-page.js +++ b/build/content-helper/dashboard-page.js @@ -1,4 +1,4 @@ -!function(){"use strict";var e={69:function(e,t){Object.prototype.toString},20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=n(848),t=n(609),r=(n(69),"popstate");function o(e={}){return function(e,t,n,o={}){let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,p="POP",f=null,h=g();function g(){return(d.state||{idx:null}).idx}function v(){p="POP";let e=g(),t=null==e?null:e-h;h=e,f&&f({action:p,location:y.location,delta:t})}function m(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),i(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:c(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==h&&(h=0,d.replaceState({...d.state,idx:h},""));let y={get action(){return p},get location(){return e(a,d)},listen(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(r,v),f=e,()=>{a.removeEventListener(r,v),f=null}},createHref(e){return t(a,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p="PUSH";let r=l(y.location,e,t);n&&n(r,e),h=g()+1;let o=s(r,h),i=y.createHref(r);try{d.pushState(o,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(i)}u&&f&&f({action:p,location:y.location,delta:1})},replace:function(e,t){p="REPLACE";let r=l(y.location,e,t);n&&n(r,e),h=g();let o=s(r,h),i=y.createHref(r);d.replaceState(o,"",i),u&&f&&f({action:p,location:y.location,delta:0})},go(e){return d.go(e)}};return y}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=u(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),l("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:c(t))}),(function(e,t){a("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function i(e,t){if(!1===e||null==e)throw new Error(t)}function a(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function s(e,t){return{usr:e.state,key:e.key,idx:t}}function l(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?u(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function c({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function u(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function d(e,t,n="/"){return function(e,t,n,r){let o=E(("string"==typeof t?u(t):t).pathname||"/",n);if(null==o)return null;let i=p(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let s={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(i(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length));let l=T([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(i(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),p(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:x(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of f(e.path))o(e,t,n);else o(e,t)})),t}function f(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=f(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}new WeakMap;var h=/^:[\w-]+$/,g=3,v=2,m=1,y=10,w=-2,b=e=>"*"===e;function x(e,t){let n=e.split("/"),r=n.length;return n.some(b)&&(r+=w),t&&(r+=v),n.filter((e=>!b(e))).reduce(((e,t)=>e+(h.test(t)?g:""===t?m:y)),r)}function k(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function S(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return a(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function E(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function L(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function P(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function j(e,t,n,r=!1){let o;"string"==typeof e?o=u(e):(o={...e},i(!o.pathname||!o.pathname.includes("?"),L("?","pathname","search",o)),i(!o.pathname||!o.pathname.includes("#"),L("#","pathname","hash",o)),i(!o.search||!o.search.includes("#"),L("#","search","hash",o)));let a,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=function(e,t="/"){let{pathname:n,search:r="",hash:o=""}="string"==typeof e?u(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:N(r),hash:I(o)}}(o,a),d=l&&"/"!==l&&l.endsWith("/"),p=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!p||(c.pathname+="/"),c}var T=e=>e.join("/").replace(/\/\/+/g,"/"),C=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",I=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function R(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var A=["POST","PUT","PATCH","DELETE"],O=(new Set(A),["GET",...A]);new Set(O),Symbol("ResetLoaderData");var D=t.createContext(null);D.displayName="DataRouter";var B=t.createContext(null);B.displayName="DataRouterState";var M=t.createContext({isTransitioning:!1});M.displayName="ViewTransition",t.createContext(new Map).displayName="Fetchers",t.createContext(null).displayName="Await";var G=t.createContext(null);G.displayName="Navigation";var U=t.createContext(null);U.displayName="Location";var F=t.createContext({outlet:null,matches:[],isDataRoute:!1});F.displayName="Route";var H=t.createContext(null);function V(){return null!=t.useContext(U)}function $(){return i(V(),"useLocation() may be used only in the context of a component."),t.useContext(U).location}H.displayName="RouteError";var W="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function z(e){t.useContext(G).static||t.useLayoutEffect(e)}function q(){let{isDataRoute:e}=t.useContext(F);return e?function(){let{router:e}=function(e){let n=t.useContext(D);return i(n,te(e)),n}("useNavigate"),n=ne("useNavigate"),r=t.useRef(!1);return z((()=>{r.current=!0})),t.useCallback((async(t,o={})=>{a(r.current,W),r.current&&("number"==typeof t?e.navigate(t):await e.navigate(t,{fromRouteId:n,...o}))}),[e,n])}():function(){i(V(),"useNavigate() may be used only in the context of a component.");let e=t.useContext(D),{basename:n,navigator:r}=t.useContext(G),{matches:o}=t.useContext(F),{pathname:s}=$(),l=JSON.stringify(P(o)),c=t.useRef(!1);return z((()=>{c.current=!0})),t.useCallback(((t,o={})=>{if(a(c.current,W),!c.current)return;if("number"==typeof t)return void r.go(t);let i=j(t,JSON.parse(l),s,"path"===o.relative);null==e&&"/"!==n&&(i.pathname="/"===i.pathname?n:T([n,i.pathname])),(o.replace?r.replace:r.push)(i,o.state,o)}),[n,r,l,s,e])}()}function Z(){let{matches:e}=t.useContext(F),n=e[e.length-1];return n?n.params:{}}function K(e,{relative:n}={}){let{matches:r}=t.useContext(F),{pathname:o}=$(),i=JSON.stringify(P(r));return t.useMemo((()=>j(e,JSON.parse(i),o,"path"===n)),[e,i,o,n])}function Y(e,n,r,o){i(V(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=t.useContext(G),{matches:l}=t.useContext(F),c=l[l.length-1],p=c?c.params:{},f=c?c.pathname:"/",h=c?c.pathnameBase:"/",g=c&&c.route;{let e=g&&g.path||"";oe(f,!g||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent to .`)}let v,m=$();if(n){let e="string"==typeof n?u(n):n;i("/"===h||e.pathname?.startsWith(h),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${e.pathname}" was given in the \`location\` prop.`),v=e}else v=m;let y=v.pathname||"/",w=y;if("/"!==h){let e=h.replace(/^\//,"").split("/");w="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=d(e,{pathname:w});a(g||null!=b,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),a(null==b||void 0!==b[b.length-1].route.element||void 0!==b[b.length-1].route.Component||void 0!==b[b.length-1].route.lazy,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let x=function(e,n=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==n.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,a=r?.errors;if(null!=a){let e=o.findIndex((e=>e.route.id&&void 0!==a?.[e.route.id]));i(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(r)for(let e=0;e=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((e,i,c)=>{let u,d=!1,p=null,f=null;r&&(u=a&&i.route.id?a[i.route.id]:void 0,p=i.route.errorElement||J,s&&(l<0&&0===c?(oe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):l===c&&(d=!0,f=i.route.hydrateFallbackElement||null)));let h=n.concat(o.slice(0,c+1)),g=()=>{let n;return n=u?p:d?f:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(ee,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===c)?t.createElement(Q,{location:r.location,revalidation:r.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):g()}),null)}(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:T([h,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:T([h,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,o);return n&&x?t.createElement(U.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},x):x}function X(){let e=function(){let e=t.useContext(H),n=function(e){let n=t.useContext(B);return i(n,te(e)),n}("useRouteError"),r=ne("useRouteError");return void 0!==e?e:n.errors?.[r]}(),n=R(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=t.createElement(t.Fragment,null,t.createElement("p",null,"💿 Hey developer 👋"),t.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",t.createElement("code",{style:s},"ErrorBoundary")," or"," ",t.createElement("code",{style:s},"errorElement")," prop on your route.")),t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,l)}t.createContext(null);var J=t.createElement(X,null),Q=class extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(F.Provider,{value:this.props.routeContext},t.createElement(H.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ee({routeContext:e,match:n,children:r}){let o=t.useContext(D);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),t.createElement(F.Provider,{value:e},r)}function te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ne(e){let n=function(e){let n=t.useContext(F);return i(n,te(e)),n}(e),r=n.matches[n.matches.length-1];return i(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var re={};function oe(e,t,n){t||re[e]||(re[e]=!0,a(!1,n))}function ie({to:e,replace:n,state:r,relative:o}){i(V()," may be used only in the context of a component.");let{static:s}=t.useContext(G);a(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:l}=t.useContext(F),{pathname:c}=$(),u=q(),d=j(e,P(l),c,"path"===o),p=JSON.stringify(d);return t.useEffect((()=>{u(JSON.parse(p),{replace:n,state:r,relative:o})}),[u,p,o,n,r]),null}function ae(e){i(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function se({basename:e="/",children:n=null,location:r,navigationType:o="POP",navigator:s,static:l=!1}){i(!V(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:c,navigator:s,static:l,future:{}})),[c,s,l]);"string"==typeof r&&(r=u(r));let{pathname:p="/",search:f="",hash:h="",state:g=null,key:v="default"}=r,m=t.useMemo((()=>{let e=E(p,c);return null==e?null:{location:{pathname:e,search:f,hash:h,state:g,key:v},navigationType:o}}),[c,p,f,h,g,v,o]);return a(null!=m,` is not able to match the URL "${p}${f}${h}" because it does not start with the basename, so the won't render anything.`),null==m?null:t.createElement(G.Provider,{value:d},t.createElement(U.Provider,{children:n,value:m}))}function le({children:e,location:t}){return Y(ce(e),t)}function ce(e,n=[]){let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,ce(e.props.children,a));i(e.type===ae,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),i(!e.props.index||!e.props.children,"An index route cannot have child routes.");let s={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=ce(e.props.children,a)),r.push(s)})),r}t.memo((function({routes:e,future:t,state:n}){return Y(e,void 0,n,t)})),t.Component;var ue="get",de="application/x-www-form-urlencoded";function pe(e){return null!=e&&"string"==typeof e.tagName}var fe=null,he=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ge(e){return null==e||he.has(e)?e:(a(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${de}"`),null)}function ve(e,t){if(!1===e||null==e)throw new Error(t)}function me(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function ye(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function we(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");function be(){let e=t.useContext(D);return ve(e,"You must render this element inside a element"),e}function xe(){let e=t.useContext(B);return ve(e,"You must render this element inside a element"),e}t.Component;var ke=t.createContext(void 0);function _e(){let e=t.useContext(ke);return ve(e,"You must render this element inside a element"),e}function Se(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ee({page:e,...n}){let{router:r}=be(),o=t.useMemo((()=>d(r.routes,e,r.basename)),[r.routes,e,r.basename]);return o?t.createElement(Pe,{page:e,matches:o,...n}):null}function Le(e){let{manifest:n,routeModules:r}=_e(),[o,i]=t.useState([]);return t.useEffect((()=>{let t=!1;return async function(e,t,n){return function(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&(null==(i=o)||"string"!=typeof i.page)&&"script"===o.as&&o.href&&r.has(o.href))return e;var i;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(a)||(n.add(a),e.push({key:a,link:o})),e}),[])}((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(me).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,n,r).then((e=>{t||i(e)})),()=>{t=!0}}),[e,n,r]),o}function Pe({page:e,matches:n,...r}){let o=$(),{manifest:i,routeModules:a}=_e(),{basename:s}=be(),{loaderData:l,matches:c}=xe(),u=t.useMemo((()=>ye(e,n,c,i,o,"data")),[e,n,c,i,o]),d=t.useMemo((()=>ye(e,n,c,i,o,"assets")),[e,n,c,i,o]),p=t.useMemo((()=>{if(e===o.pathname+o.search+o.hash)return[];let t=new Set,r=!1;if(n.forEach((e=>{let n=i.routes[e.route.id];n&&n.hasLoader&&(!u.some((t=>t.route.id===e.route.id))&&e.route.id in l&&a[e.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:t.add(e.route.id))})),0===t.size)return[];let c=function(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname="_root.data":t&&"/"===E(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}(e,s);return r&&t.size>0&&c.searchParams.set("_routes",n.filter((e=>t.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[s,l,o,i,u,n,e,a]),f=t.useMemo((()=>we(d,i)),[d,i]),h=Le(d);return t.createElement(t.Fragment,null,p.map((e=>t.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),f.map((e=>t.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),h.map((({key:e,link:n})=>t.createElement("link",{key:e,...n}))))}ke.displayName="FrameworkContext";function je(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}var Te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Te&&(window.__reactRouterVersion="7.6.3")}catch(e){}function Ce({basename:e,children:n,window:r}){let i=t.useRef();null==i.current&&(i.current=o({window:r,v5Compat:!0}));let a=i.current,[s,l]=t.useState({action:a.action,location:a.location}),c=t.useCallback((e=>{t.startTransition((()=>l(e)))}),[l]);return t.useLayoutEffect((()=>a.listen(c)),[a,c]),t.createElement(se,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:a})}var Ne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ie=t.forwardRef((function({onClick:e,discover:n="render",prefetch:r="none",relative:o,reloadDocument:s,replace:l,state:u,target:d,to:p,preventScrollReset:f,viewTransition:h,...g},v){let m,{basename:y}=t.useContext(G),w="string"==typeof p&&Ne.test(p),b=!1;if("string"==typeof p&&w&&(m=p,Te))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),n=E(t.pathname,y);t.origin===e.origin&&null!=n?p=n+t.search+t.hash:b=!0}catch(e){a(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=function(e,{relative:n}={}){i(V(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:o}=t.useContext(G),{hash:a,pathname:s,search:l}=K(e,{relative:n}),c=s;return"/"!==r&&(c="/"===s?r:T([r,s])),o.createHref({pathname:c,search:l,hash:a})}(p,{relative:o}),[k,_,S]=function(e,n){let r=t.useContext(ke),[o,i]=t.useState(!1),[a,s]=t.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=t.useRef(null);t.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),t.useEffect((()=>{if(o){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let h=()=>{i(!0)},g=()=>{i(!1),s(!1)};return r?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Se(l,h),onBlur:Se(c,g),onMouseEnter:Se(u,h),onMouseLeave:Se(d,g),onTouchStart:Se(p,h)}]:[!1,f,{}]}(r,g),L=function(e,{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}={}){let l=q(),u=$(),d=K(e,{relative:a});return t.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:c(u)===c(d);l(e,{replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s})}}),[u,l,d,r,o,n,e,i,a,s])}(p,{replace:l,state:u,target:d,preventScrollReset:f,relative:o,viewTransition:h}),P=t.createElement("a",{...g,...S,href:m||x,onClick:b||s?e:function(t){e&&e(t),t.defaultPrevented||L(t)},ref:je(v,_),target:d,"data-discover":w||"render"!==n?void 0:"true"});return k&&!w?t.createElement(t.Fragment,null,P,t.createElement(Ee,{page:x})):P}));function Re(e){let n=t.useContext(D);return i(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),n}Ie.displayName="Link",t.forwardRef((function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:s,viewTransition:l,children:c,...u},d){let p=K(s,{relative:u.relative}),f=$(),h=t.useContext(B),{navigator:g,basename:v}=t.useContext(G),m=null!=h&&function(e,n={}){let r=t.useContext(M);i(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Re("useViewTransitionState"),a=K(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=E(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=E(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=_(a.pathname,l)||null!=_(a.pathname,s)}(p)&&!0===l,y=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,w=f.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(w=w.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=E(b,v)||b);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,S=w===y||!o&&w.startsWith(y)&&"/"===w.charAt(x),L=null!=b&&(b===y||!o&&b.startsWith(y)&&"/"===b.charAt(y.length)),P={isActive:S,isPending:L,isTransitioning:m},j=S?e:void 0;k="function"==typeof r?r(P):[r,S?"active":null,L?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof a?a(P):a;return t.createElement(Ie,{...u,"aria-current":j,className:k,ref:d,style:T,to:s,viewTransition:l},"function"==typeof c?c(P):c)})).displayName="NavLink",t.forwardRef((({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:l=ue,action:u,onSubmit:d,relative:p,preventScrollReset:f,viewTransition:h,...g},v)=>{let m=function(){let{router:e}=Re("useSubmit"),{basename:n}=t.useContext(G),r=ne("useRouteId");return t.useCallback((async(t,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=function(e,t){let n,r,o,i,a;if(pe(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?E(a,t):null,n=e.getAttribute("method")||ue,o=ge(e.getAttribute("enctype"))||de,i=new FormData(e)}else if(function(e){return pe(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return pe(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a